@sentio/runtime 2.32.10-rc.1 → 2.33.0-rc.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1558,6 +1558,8 @@ export interface ComputeStats {
1558
1558
  computeCostMs: bigint;
1559
1559
  binaryVersionHash: bigint;
1560
1560
  computedBy: string;
1561
+ isCached: boolean;
1562
+ isRefreshing: boolean;
1561
1563
  }
1562
1564
 
1563
1565
  export interface ClickhouseStatus {
@@ -1589,6 +1591,115 @@ export interface ClickhouseStatus_ProcessesEntry {
1589
1591
  value: ClickhouseStatus_Processes | undefined;
1590
1592
  }
1591
1593
 
1594
+ export interface ProjectVariables {
1595
+ projectId: string;
1596
+ variables: ProjectVariables_Variable[];
1597
+ }
1598
+
1599
+ export interface ProjectVariables_Variable {
1600
+ key: string;
1601
+ value: string;
1602
+ isSecret: boolean;
1603
+ updatedAt: Date | undefined;
1604
+ }
1605
+
1606
+ export interface CachePolicy {
1607
+ cacheTtlSecs: number;
1608
+ cacheRefreshTtlSecs: number;
1609
+ forceRefresh: boolean;
1610
+ noCache: boolean;
1611
+ }
1612
+
1613
+ export interface SystemSQLQuery {
1614
+ id: string;
1615
+ alias: string;
1616
+ name: string;
1617
+ tableName: string;
1618
+ aggregation: SystemSQLQuery_Aggregation | undefined;
1619
+ selectorExpr: SelectorExpr | undefined;
1620
+ groupBy: string[];
1621
+ disabled: boolean;
1622
+ }
1623
+
1624
+ export interface SystemSQLQuery_Aggregation {
1625
+ total?: SystemSQLQuery_Aggregation_Total | undefined;
1626
+ countUnique?: SystemSQLQuery_Aggregation_CountUnique | undefined;
1627
+ aggregateProperties?: SystemSQLQuery_Aggregation_AggregateProperties | undefined;
1628
+ }
1629
+
1630
+ export interface SystemSQLQuery_Aggregation_Total {
1631
+ }
1632
+
1633
+ export interface SystemSQLQuery_Aggregation_CountUnique {
1634
+ duration: Duration | undefined;
1635
+ }
1636
+
1637
+ export interface SystemSQLQuery_Aggregation_AggregateProperties {
1638
+ type: SystemSQLQuery_Aggregation_AggregateProperties_AggregationType;
1639
+ propertyName: string;
1640
+ }
1641
+
1642
+ export enum SystemSQLQuery_Aggregation_AggregateProperties_AggregationType {
1643
+ SUM = 0,
1644
+ AVG = 1,
1645
+ MEDIAN = 2,
1646
+ MIN = 3,
1647
+ MAX = 4,
1648
+ DISTINCT_COUNT = 5,
1649
+ UNRECOGNIZED = -1,
1650
+ }
1651
+
1652
+ export function systemSQLQuery_Aggregation_AggregateProperties_AggregationTypeFromJSON(
1653
+ object: any,
1654
+ ): SystemSQLQuery_Aggregation_AggregateProperties_AggregationType {
1655
+ switch (object) {
1656
+ case 0:
1657
+ case "SUM":
1658
+ return SystemSQLQuery_Aggregation_AggregateProperties_AggregationType.SUM;
1659
+ case 1:
1660
+ case "AVG":
1661
+ return SystemSQLQuery_Aggregation_AggregateProperties_AggregationType.AVG;
1662
+ case 2:
1663
+ case "MEDIAN":
1664
+ return SystemSQLQuery_Aggregation_AggregateProperties_AggregationType.MEDIAN;
1665
+ case 3:
1666
+ case "MIN":
1667
+ return SystemSQLQuery_Aggregation_AggregateProperties_AggregationType.MIN;
1668
+ case 4:
1669
+ case "MAX":
1670
+ return SystemSQLQuery_Aggregation_AggregateProperties_AggregationType.MAX;
1671
+ case 5:
1672
+ case "DISTINCT_COUNT":
1673
+ return SystemSQLQuery_Aggregation_AggregateProperties_AggregationType.DISTINCT_COUNT;
1674
+ case -1:
1675
+ case "UNRECOGNIZED":
1676
+ default:
1677
+ return SystemSQLQuery_Aggregation_AggregateProperties_AggregationType.UNRECOGNIZED;
1678
+ }
1679
+ }
1680
+
1681
+ export function systemSQLQuery_Aggregation_AggregateProperties_AggregationTypeToJSON(
1682
+ object: SystemSQLQuery_Aggregation_AggregateProperties_AggregationType,
1683
+ ): string {
1684
+ switch (object) {
1685
+ case SystemSQLQuery_Aggregation_AggregateProperties_AggregationType.SUM:
1686
+ return "SUM";
1687
+ case SystemSQLQuery_Aggregation_AggregateProperties_AggregationType.AVG:
1688
+ return "AVG";
1689
+ case SystemSQLQuery_Aggregation_AggregateProperties_AggregationType.MEDIAN:
1690
+ return "MEDIAN";
1691
+ case SystemSQLQuery_Aggregation_AggregateProperties_AggregationType.MIN:
1692
+ return "MIN";
1693
+ case SystemSQLQuery_Aggregation_AggregateProperties_AggregationType.MAX:
1694
+ return "MAX";
1695
+ case SystemSQLQuery_Aggregation_AggregateProperties_AggregationType.DISTINCT_COUNT:
1696
+ return "DISTINCT_COUNT";
1697
+ case SystemSQLQuery_Aggregation_AggregateProperties_AggregationType.UNRECOGNIZED:
1698
+ default:
1699
+ return "UNRECOGNIZED";
1700
+ }
1701
+ }
1702
+
1592
1703
  function createBaseUsageTracker(): UsageTracker {
1593
1704
  return {
1594
1705
  apiSku: "",
@@ -8495,7 +8606,14 @@ export const RetentionMatrix_Sample_LabelsEntry = {
8495
8606
  };
8496
8607
 
8497
8608
  function createBaseComputeStats(): ComputeStats {
8498
- return { computedAt: undefined, computeCostMs: BigInt("0"), binaryVersionHash: BigInt("0"), computedBy: "" };
8609
+ return {
8610
+ computedAt: undefined,
8611
+ computeCostMs: BigInt("0"),
8612
+ binaryVersionHash: BigInt("0"),
8613
+ computedBy: "",
8614
+ isCached: false,
8615
+ isRefreshing: false,
8616
+ };
8499
8617
  }
8500
8618
 
8501
8619
  export const ComputeStats = {
@@ -8512,6 +8630,12 @@ export const ComputeStats = {
8512
8630
  if (message.computedBy !== "") {
8513
8631
  writer.uint32(34).string(message.computedBy);
8514
8632
  }
8633
+ if (message.isCached === true) {
8634
+ writer.uint32(40).bool(message.isCached);
8635
+ }
8636
+ if (message.isRefreshing === true) {
8637
+ writer.uint32(48).bool(message.isRefreshing);
8638
+ }
8515
8639
  return writer;
8516
8640
  },
8517
8641
 
@@ -8534,6 +8658,12 @@ export const ComputeStats = {
8534
8658
  case 4:
8535
8659
  message.computedBy = reader.string();
8536
8660
  break;
8661
+ case 5:
8662
+ message.isCached = reader.bool();
8663
+ break;
8664
+ case 6:
8665
+ message.isRefreshing = reader.bool();
8666
+ break;
8537
8667
  default:
8538
8668
  reader.skipType(tag & 7);
8539
8669
  break;
@@ -8548,6 +8678,8 @@ export const ComputeStats = {
8548
8678
  computeCostMs: isSet(object.computeCostMs) ? BigInt(object.computeCostMs) : BigInt("0"),
8549
8679
  binaryVersionHash: isSet(object.binaryVersionHash) ? BigInt(object.binaryVersionHash) : BigInt("0"),
8550
8680
  computedBy: isSet(object.computedBy) ? String(object.computedBy) : "",
8681
+ isCached: isSet(object.isCached) ? Boolean(object.isCached) : false,
8682
+ isRefreshing: isSet(object.isRefreshing) ? Boolean(object.isRefreshing) : false,
8551
8683
  };
8552
8684
  },
8553
8685
 
@@ -8557,6 +8689,8 @@ export const ComputeStats = {
8557
8689
  message.computeCostMs !== undefined && (obj.computeCostMs = message.computeCostMs.toString());
8558
8690
  message.binaryVersionHash !== undefined && (obj.binaryVersionHash = message.binaryVersionHash.toString());
8559
8691
  message.computedBy !== undefined && (obj.computedBy = message.computedBy);
8692
+ message.isCached !== undefined && (obj.isCached = message.isCached);
8693
+ message.isRefreshing !== undefined && (obj.isRefreshing = message.isRefreshing);
8560
8694
  return obj;
8561
8695
  },
8562
8696
 
@@ -8570,6 +8704,8 @@ export const ComputeStats = {
8570
8704
  message.computeCostMs = object.computeCostMs ?? BigInt("0");
8571
8705
  message.binaryVersionHash = object.binaryVersionHash ?? BigInt("0");
8572
8706
  message.computedBy = object.computedBy ?? "";
8707
+ message.isCached = object.isCached ?? false;
8708
+ message.isRefreshing = object.isRefreshing ?? false;
8573
8709
  return message;
8574
8710
  },
8575
8711
  };
@@ -8992,6 +9128,624 @@ export const ClickhouseStatus_ProcessesEntry = {
8992
9128
  },
8993
9129
  };
8994
9130
 
9131
+ function createBaseProjectVariables(): ProjectVariables {
9132
+ return { projectId: "", variables: [] };
9133
+ }
9134
+
9135
+ export const ProjectVariables = {
9136
+ encode(message: ProjectVariables, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
9137
+ if (message.projectId !== "") {
9138
+ writer.uint32(10).string(message.projectId);
9139
+ }
9140
+ for (const v of message.variables) {
9141
+ ProjectVariables_Variable.encode(v!, writer.uint32(18).fork()).ldelim();
9142
+ }
9143
+ return writer;
9144
+ },
9145
+
9146
+ decode(input: _m0.Reader | Uint8Array, length?: number): ProjectVariables {
9147
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
9148
+ let end = length === undefined ? reader.len : reader.pos + length;
9149
+ const message = createBaseProjectVariables();
9150
+ while (reader.pos < end) {
9151
+ const tag = reader.uint32();
9152
+ switch (tag >>> 3) {
9153
+ case 1:
9154
+ message.projectId = reader.string();
9155
+ break;
9156
+ case 2:
9157
+ message.variables.push(ProjectVariables_Variable.decode(reader, reader.uint32()));
9158
+ break;
9159
+ default:
9160
+ reader.skipType(tag & 7);
9161
+ break;
9162
+ }
9163
+ }
9164
+ return message;
9165
+ },
9166
+
9167
+ fromJSON(object: any): ProjectVariables {
9168
+ return {
9169
+ projectId: isSet(object.projectId) ? String(object.projectId) : "",
9170
+ variables: Array.isArray(object?.variables)
9171
+ ? object.variables.map((e: any) => ProjectVariables_Variable.fromJSON(e))
9172
+ : [],
9173
+ };
9174
+ },
9175
+
9176
+ toJSON(message: ProjectVariables): unknown {
9177
+ const obj: any = {};
9178
+ message.projectId !== undefined && (obj.projectId = message.projectId);
9179
+ if (message.variables) {
9180
+ obj.variables = message.variables.map((e) => e ? ProjectVariables_Variable.toJSON(e) : undefined);
9181
+ } else {
9182
+ obj.variables = [];
9183
+ }
9184
+ return obj;
9185
+ },
9186
+
9187
+ create(base?: DeepPartial<ProjectVariables>): ProjectVariables {
9188
+ return ProjectVariables.fromPartial(base ?? {});
9189
+ },
9190
+
9191
+ fromPartial(object: DeepPartial<ProjectVariables>): ProjectVariables {
9192
+ const message = createBaseProjectVariables();
9193
+ message.projectId = object.projectId ?? "";
9194
+ message.variables = object.variables?.map((e) => ProjectVariables_Variable.fromPartial(e)) || [];
9195
+ return message;
9196
+ },
9197
+ };
9198
+
9199
+ function createBaseProjectVariables_Variable(): ProjectVariables_Variable {
9200
+ return { key: "", value: "", isSecret: false, updatedAt: undefined };
9201
+ }
9202
+
9203
+ export const ProjectVariables_Variable = {
9204
+ encode(message: ProjectVariables_Variable, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
9205
+ if (message.key !== "") {
9206
+ writer.uint32(26).string(message.key);
9207
+ }
9208
+ if (message.value !== "") {
9209
+ writer.uint32(34).string(message.value);
9210
+ }
9211
+ if (message.isSecret === true) {
9212
+ writer.uint32(56).bool(message.isSecret);
9213
+ }
9214
+ if (message.updatedAt !== undefined) {
9215
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(42).fork()).ldelim();
9216
+ }
9217
+ return writer;
9218
+ },
9219
+
9220
+ decode(input: _m0.Reader | Uint8Array, length?: number): ProjectVariables_Variable {
9221
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
9222
+ let end = length === undefined ? reader.len : reader.pos + length;
9223
+ const message = createBaseProjectVariables_Variable();
9224
+ while (reader.pos < end) {
9225
+ const tag = reader.uint32();
9226
+ switch (tag >>> 3) {
9227
+ case 3:
9228
+ message.key = reader.string();
9229
+ break;
9230
+ case 4:
9231
+ message.value = reader.string();
9232
+ break;
9233
+ case 7:
9234
+ message.isSecret = reader.bool();
9235
+ break;
9236
+ case 5:
9237
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
9238
+ break;
9239
+ default:
9240
+ reader.skipType(tag & 7);
9241
+ break;
9242
+ }
9243
+ }
9244
+ return message;
9245
+ },
9246
+
9247
+ fromJSON(object: any): ProjectVariables_Variable {
9248
+ return {
9249
+ key: isSet(object.key) ? String(object.key) : "",
9250
+ value: isSet(object.value) ? String(object.value) : "",
9251
+ isSecret: isSet(object.isSecret) ? Boolean(object.isSecret) : false,
9252
+ updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined,
9253
+ };
9254
+ },
9255
+
9256
+ toJSON(message: ProjectVariables_Variable): unknown {
9257
+ const obj: any = {};
9258
+ message.key !== undefined && (obj.key = message.key);
9259
+ message.value !== undefined && (obj.value = message.value);
9260
+ message.isSecret !== undefined && (obj.isSecret = message.isSecret);
9261
+ message.updatedAt !== undefined && (obj.updatedAt = message.updatedAt.toISOString());
9262
+ return obj;
9263
+ },
9264
+
9265
+ create(base?: DeepPartial<ProjectVariables_Variable>): ProjectVariables_Variable {
9266
+ return ProjectVariables_Variable.fromPartial(base ?? {});
9267
+ },
9268
+
9269
+ fromPartial(object: DeepPartial<ProjectVariables_Variable>): ProjectVariables_Variable {
9270
+ const message = createBaseProjectVariables_Variable();
9271
+ message.key = object.key ?? "";
9272
+ message.value = object.value ?? "";
9273
+ message.isSecret = object.isSecret ?? false;
9274
+ message.updatedAt = object.updatedAt ?? undefined;
9275
+ return message;
9276
+ },
9277
+ };
9278
+
9279
+ function createBaseCachePolicy(): CachePolicy {
9280
+ return { cacheTtlSecs: 0, cacheRefreshTtlSecs: 0, forceRefresh: false, noCache: false };
9281
+ }
9282
+
9283
+ export const CachePolicy = {
9284
+ encode(message: CachePolicy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
9285
+ if (message.cacheTtlSecs !== 0) {
9286
+ writer.uint32(8).int32(message.cacheTtlSecs);
9287
+ }
9288
+ if (message.cacheRefreshTtlSecs !== 0) {
9289
+ writer.uint32(16).int32(message.cacheRefreshTtlSecs);
9290
+ }
9291
+ if (message.forceRefresh === true) {
9292
+ writer.uint32(24).bool(message.forceRefresh);
9293
+ }
9294
+ if (message.noCache === true) {
9295
+ writer.uint32(32).bool(message.noCache);
9296
+ }
9297
+ return writer;
9298
+ },
9299
+
9300
+ decode(input: _m0.Reader | Uint8Array, length?: number): CachePolicy {
9301
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
9302
+ let end = length === undefined ? reader.len : reader.pos + length;
9303
+ const message = createBaseCachePolicy();
9304
+ while (reader.pos < end) {
9305
+ const tag = reader.uint32();
9306
+ switch (tag >>> 3) {
9307
+ case 1:
9308
+ message.cacheTtlSecs = reader.int32();
9309
+ break;
9310
+ case 2:
9311
+ message.cacheRefreshTtlSecs = reader.int32();
9312
+ break;
9313
+ case 3:
9314
+ message.forceRefresh = reader.bool();
9315
+ break;
9316
+ case 4:
9317
+ message.noCache = reader.bool();
9318
+ break;
9319
+ default:
9320
+ reader.skipType(tag & 7);
9321
+ break;
9322
+ }
9323
+ }
9324
+ return message;
9325
+ },
9326
+
9327
+ fromJSON(object: any): CachePolicy {
9328
+ return {
9329
+ cacheTtlSecs: isSet(object.cacheTtlSecs) ? Number(object.cacheTtlSecs) : 0,
9330
+ cacheRefreshTtlSecs: isSet(object.cacheRefreshTtlSecs) ? Number(object.cacheRefreshTtlSecs) : 0,
9331
+ forceRefresh: isSet(object.forceRefresh) ? Boolean(object.forceRefresh) : false,
9332
+ noCache: isSet(object.noCache) ? Boolean(object.noCache) : false,
9333
+ };
9334
+ },
9335
+
9336
+ toJSON(message: CachePolicy): unknown {
9337
+ const obj: any = {};
9338
+ message.cacheTtlSecs !== undefined && (obj.cacheTtlSecs = Math.round(message.cacheTtlSecs));
9339
+ message.cacheRefreshTtlSecs !== undefined && (obj.cacheRefreshTtlSecs = Math.round(message.cacheRefreshTtlSecs));
9340
+ message.forceRefresh !== undefined && (obj.forceRefresh = message.forceRefresh);
9341
+ message.noCache !== undefined && (obj.noCache = message.noCache);
9342
+ return obj;
9343
+ },
9344
+
9345
+ create(base?: DeepPartial<CachePolicy>): CachePolicy {
9346
+ return CachePolicy.fromPartial(base ?? {});
9347
+ },
9348
+
9349
+ fromPartial(object: DeepPartial<CachePolicy>): CachePolicy {
9350
+ const message = createBaseCachePolicy();
9351
+ message.cacheTtlSecs = object.cacheTtlSecs ?? 0;
9352
+ message.cacheRefreshTtlSecs = object.cacheRefreshTtlSecs ?? 0;
9353
+ message.forceRefresh = object.forceRefresh ?? false;
9354
+ message.noCache = object.noCache ?? false;
9355
+ return message;
9356
+ },
9357
+ };
9358
+
9359
+ function createBaseSystemSQLQuery(): SystemSQLQuery {
9360
+ return {
9361
+ id: "",
9362
+ alias: "",
9363
+ name: "",
9364
+ tableName: "",
9365
+ aggregation: undefined,
9366
+ selectorExpr: undefined,
9367
+ groupBy: [],
9368
+ disabled: false,
9369
+ };
9370
+ }
9371
+
9372
+ export const SystemSQLQuery = {
9373
+ encode(message: SystemSQLQuery, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
9374
+ if (message.id !== "") {
9375
+ writer.uint32(10).string(message.id);
9376
+ }
9377
+ if (message.alias !== "") {
9378
+ writer.uint32(18).string(message.alias);
9379
+ }
9380
+ if (message.name !== "") {
9381
+ writer.uint32(26).string(message.name);
9382
+ }
9383
+ if (message.tableName !== "") {
9384
+ writer.uint32(34).string(message.tableName);
9385
+ }
9386
+ if (message.aggregation !== undefined) {
9387
+ SystemSQLQuery_Aggregation.encode(message.aggregation, writer.uint32(42).fork()).ldelim();
9388
+ }
9389
+ if (message.selectorExpr !== undefined) {
9390
+ SelectorExpr.encode(message.selectorExpr, writer.uint32(50).fork()).ldelim();
9391
+ }
9392
+ for (const v of message.groupBy) {
9393
+ writer.uint32(58).string(v!);
9394
+ }
9395
+ if (message.disabled === true) {
9396
+ writer.uint32(64).bool(message.disabled);
9397
+ }
9398
+ return writer;
9399
+ },
9400
+
9401
+ decode(input: _m0.Reader | Uint8Array, length?: number): SystemSQLQuery {
9402
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
9403
+ let end = length === undefined ? reader.len : reader.pos + length;
9404
+ const message = createBaseSystemSQLQuery();
9405
+ while (reader.pos < end) {
9406
+ const tag = reader.uint32();
9407
+ switch (tag >>> 3) {
9408
+ case 1:
9409
+ message.id = reader.string();
9410
+ break;
9411
+ case 2:
9412
+ message.alias = reader.string();
9413
+ break;
9414
+ case 3:
9415
+ message.name = reader.string();
9416
+ break;
9417
+ case 4:
9418
+ message.tableName = reader.string();
9419
+ break;
9420
+ case 5:
9421
+ message.aggregation = SystemSQLQuery_Aggregation.decode(reader, reader.uint32());
9422
+ break;
9423
+ case 6:
9424
+ message.selectorExpr = SelectorExpr.decode(reader, reader.uint32());
9425
+ break;
9426
+ case 7:
9427
+ message.groupBy.push(reader.string());
9428
+ break;
9429
+ case 8:
9430
+ message.disabled = reader.bool();
9431
+ break;
9432
+ default:
9433
+ reader.skipType(tag & 7);
9434
+ break;
9435
+ }
9436
+ }
9437
+ return message;
9438
+ },
9439
+
9440
+ fromJSON(object: any): SystemSQLQuery {
9441
+ return {
9442
+ id: isSet(object.id) ? String(object.id) : "",
9443
+ alias: isSet(object.alias) ? String(object.alias) : "",
9444
+ name: isSet(object.name) ? String(object.name) : "",
9445
+ tableName: isSet(object.tableName) ? String(object.tableName) : "",
9446
+ aggregation: isSet(object.aggregation) ? SystemSQLQuery_Aggregation.fromJSON(object.aggregation) : undefined,
9447
+ selectorExpr: isSet(object.selectorExpr) ? SelectorExpr.fromJSON(object.selectorExpr) : undefined,
9448
+ groupBy: Array.isArray(object?.groupBy) ? object.groupBy.map((e: any) => String(e)) : [],
9449
+ disabled: isSet(object.disabled) ? Boolean(object.disabled) : false,
9450
+ };
9451
+ },
9452
+
9453
+ toJSON(message: SystemSQLQuery): unknown {
9454
+ const obj: any = {};
9455
+ message.id !== undefined && (obj.id = message.id);
9456
+ message.alias !== undefined && (obj.alias = message.alias);
9457
+ message.name !== undefined && (obj.name = message.name);
9458
+ message.tableName !== undefined && (obj.tableName = message.tableName);
9459
+ message.aggregation !== undefined &&
9460
+ (obj.aggregation = message.aggregation ? SystemSQLQuery_Aggregation.toJSON(message.aggregation) : undefined);
9461
+ message.selectorExpr !== undefined &&
9462
+ (obj.selectorExpr = message.selectorExpr ? SelectorExpr.toJSON(message.selectorExpr) : undefined);
9463
+ if (message.groupBy) {
9464
+ obj.groupBy = message.groupBy.map((e) => e);
9465
+ } else {
9466
+ obj.groupBy = [];
9467
+ }
9468
+ message.disabled !== undefined && (obj.disabled = message.disabled);
9469
+ return obj;
9470
+ },
9471
+
9472
+ create(base?: DeepPartial<SystemSQLQuery>): SystemSQLQuery {
9473
+ return SystemSQLQuery.fromPartial(base ?? {});
9474
+ },
9475
+
9476
+ fromPartial(object: DeepPartial<SystemSQLQuery>): SystemSQLQuery {
9477
+ const message = createBaseSystemSQLQuery();
9478
+ message.id = object.id ?? "";
9479
+ message.alias = object.alias ?? "";
9480
+ message.name = object.name ?? "";
9481
+ message.tableName = object.tableName ?? "";
9482
+ message.aggregation = (object.aggregation !== undefined && object.aggregation !== null)
9483
+ ? SystemSQLQuery_Aggregation.fromPartial(object.aggregation)
9484
+ : undefined;
9485
+ message.selectorExpr = (object.selectorExpr !== undefined && object.selectorExpr !== null)
9486
+ ? SelectorExpr.fromPartial(object.selectorExpr)
9487
+ : undefined;
9488
+ message.groupBy = object.groupBy?.map((e) => e) || [];
9489
+ message.disabled = object.disabled ?? false;
9490
+ return message;
9491
+ },
9492
+ };
9493
+
9494
+ function createBaseSystemSQLQuery_Aggregation(): SystemSQLQuery_Aggregation {
9495
+ return { total: undefined, countUnique: undefined, aggregateProperties: undefined };
9496
+ }
9497
+
9498
+ export const SystemSQLQuery_Aggregation = {
9499
+ encode(message: SystemSQLQuery_Aggregation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
9500
+ if (message.total !== undefined) {
9501
+ SystemSQLQuery_Aggregation_Total.encode(message.total, writer.uint32(10).fork()).ldelim();
9502
+ }
9503
+ if (message.countUnique !== undefined) {
9504
+ SystemSQLQuery_Aggregation_CountUnique.encode(message.countUnique, writer.uint32(26).fork()).ldelim();
9505
+ }
9506
+ if (message.aggregateProperties !== undefined) {
9507
+ SystemSQLQuery_Aggregation_AggregateProperties.encode(message.aggregateProperties, writer.uint32(34).fork())
9508
+ .ldelim();
9509
+ }
9510
+ return writer;
9511
+ },
9512
+
9513
+ decode(input: _m0.Reader | Uint8Array, length?: number): SystemSQLQuery_Aggregation {
9514
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
9515
+ let end = length === undefined ? reader.len : reader.pos + length;
9516
+ const message = createBaseSystemSQLQuery_Aggregation();
9517
+ while (reader.pos < end) {
9518
+ const tag = reader.uint32();
9519
+ switch (tag >>> 3) {
9520
+ case 1:
9521
+ message.total = SystemSQLQuery_Aggregation_Total.decode(reader, reader.uint32());
9522
+ break;
9523
+ case 3:
9524
+ message.countUnique = SystemSQLQuery_Aggregation_CountUnique.decode(reader, reader.uint32());
9525
+ break;
9526
+ case 4:
9527
+ message.aggregateProperties = SystemSQLQuery_Aggregation_AggregateProperties.decode(reader, reader.uint32());
9528
+ break;
9529
+ default:
9530
+ reader.skipType(tag & 7);
9531
+ break;
9532
+ }
9533
+ }
9534
+ return message;
9535
+ },
9536
+
9537
+ fromJSON(object: any): SystemSQLQuery_Aggregation {
9538
+ return {
9539
+ total: isSet(object.total) ? SystemSQLQuery_Aggregation_Total.fromJSON(object.total) : undefined,
9540
+ countUnique: isSet(object.countUnique)
9541
+ ? SystemSQLQuery_Aggregation_CountUnique.fromJSON(object.countUnique)
9542
+ : undefined,
9543
+ aggregateProperties: isSet(object.aggregateProperties)
9544
+ ? SystemSQLQuery_Aggregation_AggregateProperties.fromJSON(object.aggregateProperties)
9545
+ : undefined,
9546
+ };
9547
+ },
9548
+
9549
+ toJSON(message: SystemSQLQuery_Aggregation): unknown {
9550
+ const obj: any = {};
9551
+ message.total !== undefined &&
9552
+ (obj.total = message.total ? SystemSQLQuery_Aggregation_Total.toJSON(message.total) : undefined);
9553
+ message.countUnique !== undefined && (obj.countUnique = message.countUnique
9554
+ ? SystemSQLQuery_Aggregation_CountUnique.toJSON(message.countUnique)
9555
+ : undefined);
9556
+ message.aggregateProperties !== undefined && (obj.aggregateProperties = message.aggregateProperties
9557
+ ? SystemSQLQuery_Aggregation_AggregateProperties.toJSON(message.aggregateProperties)
9558
+ : undefined);
9559
+ return obj;
9560
+ },
9561
+
9562
+ create(base?: DeepPartial<SystemSQLQuery_Aggregation>): SystemSQLQuery_Aggregation {
9563
+ return SystemSQLQuery_Aggregation.fromPartial(base ?? {});
9564
+ },
9565
+
9566
+ fromPartial(object: DeepPartial<SystemSQLQuery_Aggregation>): SystemSQLQuery_Aggregation {
9567
+ const message = createBaseSystemSQLQuery_Aggregation();
9568
+ message.total = (object.total !== undefined && object.total !== null)
9569
+ ? SystemSQLQuery_Aggregation_Total.fromPartial(object.total)
9570
+ : undefined;
9571
+ message.countUnique = (object.countUnique !== undefined && object.countUnique !== null)
9572
+ ? SystemSQLQuery_Aggregation_CountUnique.fromPartial(object.countUnique)
9573
+ : undefined;
9574
+ message.aggregateProperties = (object.aggregateProperties !== undefined && object.aggregateProperties !== null)
9575
+ ? SystemSQLQuery_Aggregation_AggregateProperties.fromPartial(object.aggregateProperties)
9576
+ : undefined;
9577
+ return message;
9578
+ },
9579
+ };
9580
+
9581
+ function createBaseSystemSQLQuery_Aggregation_Total(): SystemSQLQuery_Aggregation_Total {
9582
+ return {};
9583
+ }
9584
+
9585
+ export const SystemSQLQuery_Aggregation_Total = {
9586
+ encode(_: SystemSQLQuery_Aggregation_Total, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
9587
+ return writer;
9588
+ },
9589
+
9590
+ decode(input: _m0.Reader | Uint8Array, length?: number): SystemSQLQuery_Aggregation_Total {
9591
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
9592
+ let end = length === undefined ? reader.len : reader.pos + length;
9593
+ const message = createBaseSystemSQLQuery_Aggregation_Total();
9594
+ while (reader.pos < end) {
9595
+ const tag = reader.uint32();
9596
+ switch (tag >>> 3) {
9597
+ default:
9598
+ reader.skipType(tag & 7);
9599
+ break;
9600
+ }
9601
+ }
9602
+ return message;
9603
+ },
9604
+
9605
+ fromJSON(_: any): SystemSQLQuery_Aggregation_Total {
9606
+ return {};
9607
+ },
9608
+
9609
+ toJSON(_: SystemSQLQuery_Aggregation_Total): unknown {
9610
+ const obj: any = {};
9611
+ return obj;
9612
+ },
9613
+
9614
+ create(base?: DeepPartial<SystemSQLQuery_Aggregation_Total>): SystemSQLQuery_Aggregation_Total {
9615
+ return SystemSQLQuery_Aggregation_Total.fromPartial(base ?? {});
9616
+ },
9617
+
9618
+ fromPartial(_: DeepPartial<SystemSQLQuery_Aggregation_Total>): SystemSQLQuery_Aggregation_Total {
9619
+ const message = createBaseSystemSQLQuery_Aggregation_Total();
9620
+ return message;
9621
+ },
9622
+ };
9623
+
9624
+ function createBaseSystemSQLQuery_Aggregation_CountUnique(): SystemSQLQuery_Aggregation_CountUnique {
9625
+ return { duration: undefined };
9626
+ }
9627
+
9628
+ export const SystemSQLQuery_Aggregation_CountUnique = {
9629
+ encode(message: SystemSQLQuery_Aggregation_CountUnique, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
9630
+ if (message.duration !== undefined) {
9631
+ Duration.encode(message.duration, writer.uint32(10).fork()).ldelim();
9632
+ }
9633
+ return writer;
9634
+ },
9635
+
9636
+ decode(input: _m0.Reader | Uint8Array, length?: number): SystemSQLQuery_Aggregation_CountUnique {
9637
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
9638
+ let end = length === undefined ? reader.len : reader.pos + length;
9639
+ const message = createBaseSystemSQLQuery_Aggregation_CountUnique();
9640
+ while (reader.pos < end) {
9641
+ const tag = reader.uint32();
9642
+ switch (tag >>> 3) {
9643
+ case 1:
9644
+ message.duration = Duration.decode(reader, reader.uint32());
9645
+ break;
9646
+ default:
9647
+ reader.skipType(tag & 7);
9648
+ break;
9649
+ }
9650
+ }
9651
+ return message;
9652
+ },
9653
+
9654
+ fromJSON(object: any): SystemSQLQuery_Aggregation_CountUnique {
9655
+ return { duration: isSet(object.duration) ? Duration.fromJSON(object.duration) : undefined };
9656
+ },
9657
+
9658
+ toJSON(message: SystemSQLQuery_Aggregation_CountUnique): unknown {
9659
+ const obj: any = {};
9660
+ message.duration !== undefined && (obj.duration = message.duration ? Duration.toJSON(message.duration) : undefined);
9661
+ return obj;
9662
+ },
9663
+
9664
+ create(base?: DeepPartial<SystemSQLQuery_Aggregation_CountUnique>): SystemSQLQuery_Aggregation_CountUnique {
9665
+ return SystemSQLQuery_Aggregation_CountUnique.fromPartial(base ?? {});
9666
+ },
9667
+
9668
+ fromPartial(object: DeepPartial<SystemSQLQuery_Aggregation_CountUnique>): SystemSQLQuery_Aggregation_CountUnique {
9669
+ const message = createBaseSystemSQLQuery_Aggregation_CountUnique();
9670
+ message.duration = (object.duration !== undefined && object.duration !== null)
9671
+ ? Duration.fromPartial(object.duration)
9672
+ : undefined;
9673
+ return message;
9674
+ },
9675
+ };
9676
+
9677
+ function createBaseSystemSQLQuery_Aggregation_AggregateProperties(): SystemSQLQuery_Aggregation_AggregateProperties {
9678
+ return { type: 0, propertyName: "" };
9679
+ }
9680
+
9681
+ export const SystemSQLQuery_Aggregation_AggregateProperties = {
9682
+ encode(
9683
+ message: SystemSQLQuery_Aggregation_AggregateProperties,
9684
+ writer: _m0.Writer = _m0.Writer.create(),
9685
+ ): _m0.Writer {
9686
+ if (message.type !== 0) {
9687
+ writer.uint32(8).int32(message.type);
9688
+ }
9689
+ if (message.propertyName !== "") {
9690
+ writer.uint32(18).string(message.propertyName);
9691
+ }
9692
+ return writer;
9693
+ },
9694
+
9695
+ decode(input: _m0.Reader | Uint8Array, length?: number): SystemSQLQuery_Aggregation_AggregateProperties {
9696
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
9697
+ let end = length === undefined ? reader.len : reader.pos + length;
9698
+ const message = createBaseSystemSQLQuery_Aggregation_AggregateProperties();
9699
+ while (reader.pos < end) {
9700
+ const tag = reader.uint32();
9701
+ switch (tag >>> 3) {
9702
+ case 1:
9703
+ message.type = reader.int32() as any;
9704
+ break;
9705
+ case 2:
9706
+ message.propertyName = reader.string();
9707
+ break;
9708
+ default:
9709
+ reader.skipType(tag & 7);
9710
+ break;
9711
+ }
9712
+ }
9713
+ return message;
9714
+ },
9715
+
9716
+ fromJSON(object: any): SystemSQLQuery_Aggregation_AggregateProperties {
9717
+ return {
9718
+ type: isSet(object.type)
9719
+ ? systemSQLQuery_Aggregation_AggregateProperties_AggregationTypeFromJSON(object.type)
9720
+ : 0,
9721
+ propertyName: isSet(object.propertyName) ? String(object.propertyName) : "",
9722
+ };
9723
+ },
9724
+
9725
+ toJSON(message: SystemSQLQuery_Aggregation_AggregateProperties): unknown {
9726
+ const obj: any = {};
9727
+ message.type !== undefined &&
9728
+ (obj.type = systemSQLQuery_Aggregation_AggregateProperties_AggregationTypeToJSON(message.type));
9729
+ message.propertyName !== undefined && (obj.propertyName = message.propertyName);
9730
+ return obj;
9731
+ },
9732
+
9733
+ create(
9734
+ base?: DeepPartial<SystemSQLQuery_Aggregation_AggregateProperties>,
9735
+ ): SystemSQLQuery_Aggregation_AggregateProperties {
9736
+ return SystemSQLQuery_Aggregation_AggregateProperties.fromPartial(base ?? {});
9737
+ },
9738
+
9739
+ fromPartial(
9740
+ object: DeepPartial<SystemSQLQuery_Aggregation_AggregateProperties>,
9741
+ ): SystemSQLQuery_Aggregation_AggregateProperties {
9742
+ const message = createBaseSystemSQLQuery_Aggregation_AggregateProperties();
9743
+ message.type = object.type ?? 0;
9744
+ message.propertyName = object.propertyName ?? "";
9745
+ return message;
9746
+ },
9747
+ };
9748
+
8995
9749
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
8996
9750
 
8997
9751
  type DeepPartial<T> = T extends Builtin ? T