@sentio/runtime 2.54.0-rc.6 → 2.54.0-rc.8

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.
@@ -166,6 +166,45 @@ export function permissionToJSON(object: Permission): string {
166
166
  }
167
167
  }
168
168
 
169
+ export enum PayMethod {
170
+ CREDIT_CARD = 0,
171
+ INVOICE_FIAT = 1,
172
+ INVOICE_CRYPTO = 2,
173
+ UNRECOGNIZED = -1,
174
+ }
175
+
176
+ export function payMethodFromJSON(object: any): PayMethod {
177
+ switch (object) {
178
+ case 0:
179
+ case "CREDIT_CARD":
180
+ return PayMethod.CREDIT_CARD;
181
+ case 1:
182
+ case "INVOICE_FIAT":
183
+ return PayMethod.INVOICE_FIAT;
184
+ case 2:
185
+ case "INVOICE_CRYPTO":
186
+ return PayMethod.INVOICE_CRYPTO;
187
+ case -1:
188
+ case "UNRECOGNIZED":
189
+ default:
190
+ return PayMethod.UNRECOGNIZED;
191
+ }
192
+ }
193
+
194
+ export function payMethodToJSON(object: PayMethod): string {
195
+ switch (object) {
196
+ case PayMethod.CREDIT_CARD:
197
+ return "CREDIT_CARD";
198
+ case PayMethod.INVOICE_FIAT:
199
+ return "INVOICE_FIAT";
200
+ case PayMethod.INVOICE_CRYPTO:
201
+ return "INVOICE_CRYPTO";
202
+ case PayMethod.UNRECOGNIZED:
203
+ default:
204
+ return "UNRECOGNIZED";
205
+ }
206
+ }
207
+
169
208
  export enum NotificationType {
170
209
  GENERAL = 0,
171
210
  PROCESSOR_UPLOAD_FAILED = 101,
@@ -1523,7 +1562,8 @@ export interface Account {
1523
1562
  ownerId: string;
1524
1563
  owner: Owner | undefined;
1525
1564
  address: string;
1526
- paymentMethod: string;
1565
+ paymentMethod: PayMethod;
1566
+ usageOverCapLimit: string;
1527
1567
  }
1528
1568
 
1529
1569
  export interface ImportedProject {
@@ -1708,6 +1748,16 @@ export interface ComputeStats {
1708
1748
  computedBy: string;
1709
1749
  isCached: boolean;
1710
1750
  isRefreshing: boolean;
1751
+ clickhouseStats: ComputeStats_ClickhouseStats | undefined;
1752
+ }
1753
+
1754
+ export interface ComputeStats_ClickhouseStats {
1755
+ readRows: bigint;
1756
+ readBytes: bigint;
1757
+ memoryUsage: bigint;
1758
+ queryDurationMs: bigint;
1759
+ resultRows: bigint;
1760
+ resultBytes: bigint;
1711
1761
  }
1712
1762
 
1713
1763
  export interface ClickhouseStatus {
@@ -10055,7 +10105,8 @@ function createBaseAccount(): Account {
10055
10105
  ownerId: "",
10056
10106
  owner: undefined,
10057
10107
  address: "",
10058
- paymentMethod: "",
10108
+ paymentMethod: 0,
10109
+ usageOverCapLimit: "",
10059
10110
  };
10060
10111
  }
10061
10112
 
@@ -10082,8 +10133,11 @@ export const Account = {
10082
10133
  if (message.address !== "") {
10083
10134
  writer.uint32(74).string(message.address);
10084
10135
  }
10085
- if (message.paymentMethod !== "") {
10086
- writer.uint32(82).string(message.paymentMethod);
10136
+ if (message.paymentMethod !== 0) {
10137
+ writer.uint32(80).int32(message.paymentMethod);
10138
+ }
10139
+ if (message.usageOverCapLimit !== "") {
10140
+ writer.uint32(90).string(message.usageOverCapLimit);
10087
10141
  }
10088
10142
  return writer;
10089
10143
  },
@@ -10145,11 +10199,18 @@ export const Account = {
10145
10199
  message.address = reader.string();
10146
10200
  continue;
10147
10201
  case 10:
10148
- if (tag !== 82) {
10202
+ if (tag !== 80) {
10203
+ break;
10204
+ }
10205
+
10206
+ message.paymentMethod = reader.int32() as any;
10207
+ continue;
10208
+ case 11:
10209
+ if (tag !== 90) {
10149
10210
  break;
10150
10211
  }
10151
10212
 
10152
- message.paymentMethod = reader.string();
10213
+ message.usageOverCapLimit = reader.string();
10153
10214
  continue;
10154
10215
  }
10155
10216
  if ((tag & 7) === 4 || tag === 0) {
@@ -10169,7 +10230,8 @@ export const Account = {
10169
10230
  ownerId: isSet(object.ownerId) ? globalThis.String(object.ownerId) : "",
10170
10231
  owner: isSet(object.owner) ? Owner.fromJSON(object.owner) : undefined,
10171
10232
  address: isSet(object.address) ? globalThis.String(object.address) : "",
10172
- paymentMethod: isSet(object.paymentMethod) ? globalThis.String(object.paymentMethod) : "",
10233
+ paymentMethod: isSet(object.paymentMethod) ? payMethodFromJSON(object.paymentMethod) : 0,
10234
+ usageOverCapLimit: isSet(object.usageOverCapLimit) ? globalThis.String(object.usageOverCapLimit) : "",
10173
10235
  };
10174
10236
  },
10175
10237
 
@@ -10196,8 +10258,11 @@ export const Account = {
10196
10258
  if (message.address !== "") {
10197
10259
  obj.address = message.address;
10198
10260
  }
10199
- if (message.paymentMethod !== "") {
10200
- obj.paymentMethod = message.paymentMethod;
10261
+ if (message.paymentMethod !== 0) {
10262
+ obj.paymentMethod = payMethodToJSON(message.paymentMethod);
10263
+ }
10264
+ if (message.usageOverCapLimit !== "") {
10265
+ obj.usageOverCapLimit = message.usageOverCapLimit;
10201
10266
  }
10202
10267
  return obj;
10203
10268
  },
@@ -10214,7 +10279,8 @@ export const Account = {
10214
10279
  message.ownerId = object.ownerId ?? "";
10215
10280
  message.owner = (object.owner !== undefined && object.owner !== null) ? Owner.fromPartial(object.owner) : undefined;
10216
10281
  message.address = object.address ?? "";
10217
- message.paymentMethod = object.paymentMethod ?? "";
10282
+ message.paymentMethod = object.paymentMethod ?? 0;
10283
+ message.usageOverCapLimit = object.usageOverCapLimit ?? "";
10218
10284
  return message;
10219
10285
  },
10220
10286
  };
@@ -11249,6 +11315,7 @@ function createBaseComputeStats(): ComputeStats {
11249
11315
  computedBy: "",
11250
11316
  isCached: false,
11251
11317
  isRefreshing: false,
11318
+ clickhouseStats: undefined,
11252
11319
  };
11253
11320
  }
11254
11321
 
@@ -11278,6 +11345,9 @@ export const ComputeStats = {
11278
11345
  if (message.isRefreshing !== false) {
11279
11346
  writer.uint32(48).bool(message.isRefreshing);
11280
11347
  }
11348
+ if (message.clickhouseStats !== undefined) {
11349
+ ComputeStats_ClickhouseStats.encode(message.clickhouseStats, writer.uint32(58).fork()).ldelim();
11350
+ }
11281
11351
  return writer;
11282
11352
  },
11283
11353
 
@@ -11330,6 +11400,13 @@ export const ComputeStats = {
11330
11400
 
11331
11401
  message.isRefreshing = reader.bool();
11332
11402
  continue;
11403
+ case 7:
11404
+ if (tag !== 58) {
11405
+ break;
11406
+ }
11407
+
11408
+ message.clickhouseStats = ComputeStats_ClickhouseStats.decode(reader, reader.uint32());
11409
+ continue;
11333
11410
  }
11334
11411
  if ((tag & 7) === 4 || tag === 0) {
11335
11412
  break;
@@ -11347,6 +11424,9 @@ export const ComputeStats = {
11347
11424
  computedBy: isSet(object.computedBy) ? globalThis.String(object.computedBy) : "",
11348
11425
  isCached: isSet(object.isCached) ? globalThis.Boolean(object.isCached) : false,
11349
11426
  isRefreshing: isSet(object.isRefreshing) ? globalThis.Boolean(object.isRefreshing) : false,
11427
+ clickhouseStats: isSet(object.clickhouseStats)
11428
+ ? ComputeStats_ClickhouseStats.fromJSON(object.clickhouseStats)
11429
+ : undefined,
11350
11430
  };
11351
11431
  },
11352
11432
 
@@ -11370,6 +11450,9 @@ export const ComputeStats = {
11370
11450
  if (message.isRefreshing !== false) {
11371
11451
  obj.isRefreshing = message.isRefreshing;
11372
11452
  }
11453
+ if (message.clickhouseStats !== undefined) {
11454
+ obj.clickhouseStats = ComputeStats_ClickhouseStats.toJSON(message.clickhouseStats);
11455
+ }
11373
11456
  return obj;
11374
11457
  },
11375
11458
 
@@ -11384,6 +11467,168 @@ export const ComputeStats = {
11384
11467
  message.computedBy = object.computedBy ?? "";
11385
11468
  message.isCached = object.isCached ?? false;
11386
11469
  message.isRefreshing = object.isRefreshing ?? false;
11470
+ message.clickhouseStats = (object.clickhouseStats !== undefined && object.clickhouseStats !== null)
11471
+ ? ComputeStats_ClickhouseStats.fromPartial(object.clickhouseStats)
11472
+ : undefined;
11473
+ return message;
11474
+ },
11475
+ };
11476
+
11477
+ function createBaseComputeStats_ClickhouseStats(): ComputeStats_ClickhouseStats {
11478
+ return {
11479
+ readRows: BigInt("0"),
11480
+ readBytes: BigInt("0"),
11481
+ memoryUsage: BigInt("0"),
11482
+ queryDurationMs: BigInt("0"),
11483
+ resultRows: BigInt("0"),
11484
+ resultBytes: BigInt("0"),
11485
+ };
11486
+ }
11487
+
11488
+ export const ComputeStats_ClickhouseStats = {
11489
+ encode(message: ComputeStats_ClickhouseStats, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
11490
+ if (message.readRows !== BigInt("0")) {
11491
+ if (BigInt.asUintN(64, message.readRows) !== message.readRows) {
11492
+ throw new globalThis.Error("value provided for field message.readRows of type uint64 too large");
11493
+ }
11494
+ writer.uint32(8).uint64(message.readRows.toString());
11495
+ }
11496
+ if (message.readBytes !== BigInt("0")) {
11497
+ if (BigInt.asUintN(64, message.readBytes) !== message.readBytes) {
11498
+ throw new globalThis.Error("value provided for field message.readBytes of type uint64 too large");
11499
+ }
11500
+ writer.uint32(16).uint64(message.readBytes.toString());
11501
+ }
11502
+ if (message.memoryUsage !== BigInt("0")) {
11503
+ if (BigInt.asUintN(64, message.memoryUsage) !== message.memoryUsage) {
11504
+ throw new globalThis.Error("value provided for field message.memoryUsage of type uint64 too large");
11505
+ }
11506
+ writer.uint32(24).uint64(message.memoryUsage.toString());
11507
+ }
11508
+ if (message.queryDurationMs !== BigInt("0")) {
11509
+ if (BigInt.asUintN(64, message.queryDurationMs) !== message.queryDurationMs) {
11510
+ throw new globalThis.Error("value provided for field message.queryDurationMs of type uint64 too large");
11511
+ }
11512
+ writer.uint32(32).uint64(message.queryDurationMs.toString());
11513
+ }
11514
+ if (message.resultRows !== BigInt("0")) {
11515
+ if (BigInt.asUintN(64, message.resultRows) !== message.resultRows) {
11516
+ throw new globalThis.Error("value provided for field message.resultRows of type uint64 too large");
11517
+ }
11518
+ writer.uint32(40).uint64(message.resultRows.toString());
11519
+ }
11520
+ if (message.resultBytes !== BigInt("0")) {
11521
+ if (BigInt.asUintN(64, message.resultBytes) !== message.resultBytes) {
11522
+ throw new globalThis.Error("value provided for field message.resultBytes of type uint64 too large");
11523
+ }
11524
+ writer.uint32(48).uint64(message.resultBytes.toString());
11525
+ }
11526
+ return writer;
11527
+ },
11528
+
11529
+ decode(input: _m0.Reader | Uint8Array, length?: number): ComputeStats_ClickhouseStats {
11530
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
11531
+ let end = length === undefined ? reader.len : reader.pos + length;
11532
+ const message = createBaseComputeStats_ClickhouseStats();
11533
+ while (reader.pos < end) {
11534
+ const tag = reader.uint32();
11535
+ switch (tag >>> 3) {
11536
+ case 1:
11537
+ if (tag !== 8) {
11538
+ break;
11539
+ }
11540
+
11541
+ message.readRows = longToBigint(reader.uint64() as Long);
11542
+ continue;
11543
+ case 2:
11544
+ if (tag !== 16) {
11545
+ break;
11546
+ }
11547
+
11548
+ message.readBytes = longToBigint(reader.uint64() as Long);
11549
+ continue;
11550
+ case 3:
11551
+ if (tag !== 24) {
11552
+ break;
11553
+ }
11554
+
11555
+ message.memoryUsage = longToBigint(reader.uint64() as Long);
11556
+ continue;
11557
+ case 4:
11558
+ if (tag !== 32) {
11559
+ break;
11560
+ }
11561
+
11562
+ message.queryDurationMs = longToBigint(reader.uint64() as Long);
11563
+ continue;
11564
+ case 5:
11565
+ if (tag !== 40) {
11566
+ break;
11567
+ }
11568
+
11569
+ message.resultRows = longToBigint(reader.uint64() as Long);
11570
+ continue;
11571
+ case 6:
11572
+ if (tag !== 48) {
11573
+ break;
11574
+ }
11575
+
11576
+ message.resultBytes = longToBigint(reader.uint64() as Long);
11577
+ continue;
11578
+ }
11579
+ if ((tag & 7) === 4 || tag === 0) {
11580
+ break;
11581
+ }
11582
+ reader.skipType(tag & 7);
11583
+ }
11584
+ return message;
11585
+ },
11586
+
11587
+ fromJSON(object: any): ComputeStats_ClickhouseStats {
11588
+ return {
11589
+ readRows: isSet(object.readRows) ? BigInt(object.readRows) : BigInt("0"),
11590
+ readBytes: isSet(object.readBytes) ? BigInt(object.readBytes) : BigInt("0"),
11591
+ memoryUsage: isSet(object.memoryUsage) ? BigInt(object.memoryUsage) : BigInt("0"),
11592
+ queryDurationMs: isSet(object.queryDurationMs) ? BigInt(object.queryDurationMs) : BigInt("0"),
11593
+ resultRows: isSet(object.resultRows) ? BigInt(object.resultRows) : BigInt("0"),
11594
+ resultBytes: isSet(object.resultBytes) ? BigInt(object.resultBytes) : BigInt("0"),
11595
+ };
11596
+ },
11597
+
11598
+ toJSON(message: ComputeStats_ClickhouseStats): unknown {
11599
+ const obj: any = {};
11600
+ if (message.readRows !== BigInt("0")) {
11601
+ obj.readRows = message.readRows.toString();
11602
+ }
11603
+ if (message.readBytes !== BigInt("0")) {
11604
+ obj.readBytes = message.readBytes.toString();
11605
+ }
11606
+ if (message.memoryUsage !== BigInt("0")) {
11607
+ obj.memoryUsage = message.memoryUsage.toString();
11608
+ }
11609
+ if (message.queryDurationMs !== BigInt("0")) {
11610
+ obj.queryDurationMs = message.queryDurationMs.toString();
11611
+ }
11612
+ if (message.resultRows !== BigInt("0")) {
11613
+ obj.resultRows = message.resultRows.toString();
11614
+ }
11615
+ if (message.resultBytes !== BigInt("0")) {
11616
+ obj.resultBytes = message.resultBytes.toString();
11617
+ }
11618
+ return obj;
11619
+ },
11620
+
11621
+ create(base?: DeepPartial<ComputeStats_ClickhouseStats>): ComputeStats_ClickhouseStats {
11622
+ return ComputeStats_ClickhouseStats.fromPartial(base ?? {});
11623
+ },
11624
+ fromPartial(object: DeepPartial<ComputeStats_ClickhouseStats>): ComputeStats_ClickhouseStats {
11625
+ const message = createBaseComputeStats_ClickhouseStats();
11626
+ message.readRows = object.readRows ?? BigInt("0");
11627
+ message.readBytes = object.readBytes ?? BigInt("0");
11628
+ message.memoryUsage = object.memoryUsage ?? BigInt("0");
11629
+ message.queryDurationMs = object.queryDurationMs ?? BigInt("0");
11630
+ message.resultRows = object.resultRows ?? BigInt("0");
11631
+ message.resultBytes = object.resultBytes ?? BigInt("0");
11387
11632
  return message;
11388
11633
  },
11389
11634
  };