@sentio/runtime 2.62.0-rc.3 → 2.62.0-rc.5

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.
@@ -10,8 +10,8 @@ import {
10
10
  require_cjs,
11
11
  require_lib3 as require_lib,
12
12
  require_lib4 as require_lib2
13
- } from "./chunk-BUEDBCDW.js";
14
- import "./chunk-ID7RUJZE.js";
13
+ } from "./chunk-RPV67F56.js";
14
+ import "./chunk-I5YHR3CE.js";
15
15
  import "./chunk-W3VN25ER.js";
16
16
  import {
17
17
  __toESM
@@ -1,4 +1,4 @@
1
- import { P as Plugin, c as DataBinding, d as ProcessResult, H as HandlerType } from './processor-DwZlMkFj.js';
1
+ import { P as Plugin, D as DataBinding, a as ProcessResult, H as HandlerType } from './processor-HNY62jHs.js';
2
2
  import { ProcessStreamResponse_Partitions, InitResponse, ProcessConfigResponse } from '@sentio/protos';
3
3
  import 'rxjs';
4
4
  import 'node:async_hooks';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/runtime",
3
- "version": "2.62.0-rc.3",
3
+ "version": "2.62.0-rc.5",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -18,8 +18,6 @@
18
18
  "piscina": "5.1.3"
19
19
  },
20
20
  "devDependencies": {
21
- "@types/command-line-args": "^5.2.3",
22
- "@types/command-line-usage": "^5.0.4",
23
21
  "@types/fs-extra": "^11.0.4"
24
22
  },
25
23
  "engines": {
@@ -406,12 +406,50 @@ export interface ProjectConfig {
406
406
  export interface ExecutionConfig {
407
407
  sequential: boolean;
408
408
  forceExactBlockTime: boolean;
409
+ handlerOrderInsideTransaction: ExecutionConfig_HandlerOrderInsideTransaction;
409
410
  processBindingTimeout: number;
410
411
  skipStartBlockValidation: boolean;
411
412
  rpcRetryTimes: number;
412
413
  ethAbiDecoderConfig?: ExecutionConfig_DecoderWorkerConfig | undefined;
413
414
  }
414
415
 
416
+ export enum ExecutionConfig_HandlerOrderInsideTransaction {
417
+ BY_LOG_INDEX = 0,
418
+ BY_PROCESSOR_AND_LOG_INDEX = 1,
419
+ UNRECOGNIZED = -1,
420
+ }
421
+
422
+ export function executionConfig_HandlerOrderInsideTransactionFromJSON(
423
+ object: any,
424
+ ): ExecutionConfig_HandlerOrderInsideTransaction {
425
+ switch (object) {
426
+ case 0:
427
+ case "BY_LOG_INDEX":
428
+ return ExecutionConfig_HandlerOrderInsideTransaction.BY_LOG_INDEX;
429
+ case 1:
430
+ case "BY_PROCESSOR_AND_LOG_INDEX":
431
+ return ExecutionConfig_HandlerOrderInsideTransaction.BY_PROCESSOR_AND_LOG_INDEX;
432
+ case -1:
433
+ case "UNRECOGNIZED":
434
+ default:
435
+ return ExecutionConfig_HandlerOrderInsideTransaction.UNRECOGNIZED;
436
+ }
437
+ }
438
+
439
+ export function executionConfig_HandlerOrderInsideTransactionToJSON(
440
+ object: ExecutionConfig_HandlerOrderInsideTransaction,
441
+ ): string {
442
+ switch (object) {
443
+ case ExecutionConfig_HandlerOrderInsideTransaction.BY_LOG_INDEX:
444
+ return "BY_LOG_INDEX";
445
+ case ExecutionConfig_HandlerOrderInsideTransaction.BY_PROCESSOR_AND_LOG_INDEX:
446
+ return "BY_PROCESSOR_AND_LOG_INDEX";
447
+ case ExecutionConfig_HandlerOrderInsideTransaction.UNRECOGNIZED:
448
+ default:
449
+ return "UNRECOGNIZED";
450
+ }
451
+ }
452
+
415
453
  export interface ExecutionConfig_DecoderWorkerConfig {
416
454
  enabled: boolean;
417
455
  workerCount?: number | undefined;
@@ -428,7 +466,6 @@ export interface ProcessConfigResponse {
428
466
  templateInstances: TemplateInstance[];
429
467
  accountConfigs: AccountConfig[];
430
468
  metricConfigs: MetricConfig[];
431
- eventTrackingConfigs: EventTrackingConfig[];
432
469
  exportConfigs: ExportConfig[];
433
470
  eventLogConfigs: EventLogConfig[];
434
471
  dbSchema: DataBaseSchema | undefined;
@@ -510,15 +547,6 @@ export interface RetentionConfig {
510
547
  days: number;
511
548
  }
512
549
 
513
- export interface EventTrackingConfig {
514
- eventName: string;
515
- totalByDay: boolean;
516
- unique: boolean;
517
- totalPerEntity: TotalPerEntityAggregation | undefined;
518
- distinctAggregationByDays: number[];
519
- retentionConfig: RetentionConfig | undefined;
520
- }
521
-
522
550
  export interface ExportConfig {
523
551
  name: string;
524
552
  channel: string;
@@ -1433,8 +1461,6 @@ export interface StateResult {
1433
1461
  export interface ProcessResult {
1434
1462
  gauges: GaugeResult[];
1435
1463
  counters: CounterResult[];
1436
- /** @deprecated */
1437
- logs: LogResult[];
1438
1464
  events: EventTrackingResult[];
1439
1465
  exports: ExportResult[];
1440
1466
  states: StateResult | undefined;
@@ -1505,17 +1531,6 @@ export interface CounterResult {
1505
1531
  runtimeInfo: RuntimeInfo | undefined;
1506
1532
  }
1507
1533
 
1508
- /** @deprecated */
1509
- export interface LogResult {
1510
- metadata: RecordMetaData | undefined;
1511
- level: LogLevel;
1512
- message: string;
1513
- /** @deprecated */
1514
- attributes: string;
1515
- attributes2: { [key: string]: any } | undefined;
1516
- runtimeInfo: RuntimeInfo | undefined;
1517
- }
1518
-
1519
1534
  export interface EventTrackingResult {
1520
1535
  metadata: RecordMetaData | undefined;
1521
1536
  distinctEntityId: string;
@@ -1657,6 +1672,7 @@ function createBaseExecutionConfig(): ExecutionConfig {
1657
1672
  return {
1658
1673
  sequential: false,
1659
1674
  forceExactBlockTime: false,
1675
+ handlerOrderInsideTransaction: 0,
1660
1676
  processBindingTimeout: 0,
1661
1677
  skipStartBlockValidation: false,
1662
1678
  rpcRetryTimes: 0,
@@ -1672,6 +1688,9 @@ export const ExecutionConfig = {
1672
1688
  if (message.forceExactBlockTime !== false) {
1673
1689
  writer.uint32(16).bool(message.forceExactBlockTime);
1674
1690
  }
1691
+ if (message.handlerOrderInsideTransaction !== 0) {
1692
+ writer.uint32(56).int32(message.handlerOrderInsideTransaction);
1693
+ }
1675
1694
  if (message.processBindingTimeout !== 0) {
1676
1695
  writer.uint32(24).int32(message.processBindingTimeout);
1677
1696
  }
@@ -1708,6 +1727,13 @@ export const ExecutionConfig = {
1708
1727
 
1709
1728
  message.forceExactBlockTime = reader.bool();
1710
1729
  continue;
1730
+ case 7:
1731
+ if (tag !== 56) {
1732
+ break;
1733
+ }
1734
+
1735
+ message.handlerOrderInsideTransaction = reader.int32() as any;
1736
+ continue;
1711
1737
  case 3:
1712
1738
  if (tag !== 24) {
1713
1739
  break;
@@ -1749,6 +1775,9 @@ export const ExecutionConfig = {
1749
1775
  return {
1750
1776
  sequential: isSet(object.sequential) ? globalThis.Boolean(object.sequential) : false,
1751
1777
  forceExactBlockTime: isSet(object.forceExactBlockTime) ? globalThis.Boolean(object.forceExactBlockTime) : false,
1778
+ handlerOrderInsideTransaction: isSet(object.handlerOrderInsideTransaction)
1779
+ ? executionConfig_HandlerOrderInsideTransactionFromJSON(object.handlerOrderInsideTransaction)
1780
+ : 0,
1752
1781
  processBindingTimeout: isSet(object.processBindingTimeout) ? globalThis.Number(object.processBindingTimeout) : 0,
1753
1782
  skipStartBlockValidation: isSet(object.skipStartBlockValidation)
1754
1783
  ? globalThis.Boolean(object.skipStartBlockValidation)
@@ -1768,6 +1797,11 @@ export const ExecutionConfig = {
1768
1797
  if (message.forceExactBlockTime !== false) {
1769
1798
  obj.forceExactBlockTime = message.forceExactBlockTime;
1770
1799
  }
1800
+ if (message.handlerOrderInsideTransaction !== 0) {
1801
+ obj.handlerOrderInsideTransaction = executionConfig_HandlerOrderInsideTransactionToJSON(
1802
+ message.handlerOrderInsideTransaction,
1803
+ );
1804
+ }
1771
1805
  if (message.processBindingTimeout !== 0) {
1772
1806
  obj.processBindingTimeout = Math.round(message.processBindingTimeout);
1773
1807
  }
@@ -1790,6 +1824,7 @@ export const ExecutionConfig = {
1790
1824
  const message = createBaseExecutionConfig();
1791
1825
  message.sequential = object.sequential ?? false;
1792
1826
  message.forceExactBlockTime = object.forceExactBlockTime ?? false;
1827
+ message.handlerOrderInsideTransaction = object.handlerOrderInsideTransaction ?? 0;
1793
1828
  message.processBindingTimeout = object.processBindingTimeout ?? 0;
1794
1829
  message.skipStartBlockValidation = object.skipStartBlockValidation ?? false;
1795
1830
  message.rpcRetryTimes = object.rpcRetryTimes ?? 0;
@@ -1942,7 +1977,6 @@ function createBaseProcessConfigResponse(): ProcessConfigResponse {
1942
1977
  templateInstances: [],
1943
1978
  accountConfigs: [],
1944
1979
  metricConfigs: [],
1945
- eventTrackingConfigs: [],
1946
1980
  exportConfigs: [],
1947
1981
  eventLogConfigs: [],
1948
1982
  dbSchema: undefined,
@@ -1969,9 +2003,6 @@ export const ProcessConfigResponse = {
1969
2003
  for (const v of message.metricConfigs) {
1970
2004
  MetricConfig.encode(v!, writer.uint32(42).fork()).ldelim();
1971
2005
  }
1972
- for (const v of message.eventTrackingConfigs) {
1973
- EventTrackingConfig.encode(v!, writer.uint32(50).fork()).ldelim();
1974
- }
1975
2006
  for (const v of message.exportConfigs) {
1976
2007
  ExportConfig.encode(v!, writer.uint32(58).fork()).ldelim();
1977
2008
  }
@@ -2033,13 +2064,6 @@ export const ProcessConfigResponse = {
2033
2064
 
2034
2065
  message.metricConfigs.push(MetricConfig.decode(reader, reader.uint32()));
2035
2066
  continue;
2036
- case 6:
2037
- if (tag !== 50) {
2038
- break;
2039
- }
2040
-
2041
- message.eventTrackingConfigs.push(EventTrackingConfig.decode(reader, reader.uint32()));
2042
- continue;
2043
2067
  case 7:
2044
2068
  if (tag !== 58) {
2045
2069
  break;
@@ -2086,9 +2110,6 @@ export const ProcessConfigResponse = {
2086
2110
  metricConfigs: globalThis.Array.isArray(object?.metricConfigs)
2087
2111
  ? object.metricConfigs.map((e: any) => MetricConfig.fromJSON(e))
2088
2112
  : [],
2089
- eventTrackingConfigs: globalThis.Array.isArray(object?.eventTrackingConfigs)
2090
- ? object.eventTrackingConfigs.map((e: any) => EventTrackingConfig.fromJSON(e))
2091
- : [],
2092
2113
  exportConfigs: globalThis.Array.isArray(object?.exportConfigs)
2093
2114
  ? object.exportConfigs.map((e: any) => ExportConfig.fromJSON(e))
2094
2115
  : [],
@@ -2119,9 +2140,6 @@ export const ProcessConfigResponse = {
2119
2140
  if (message.metricConfigs?.length) {
2120
2141
  obj.metricConfigs = message.metricConfigs.map((e) => MetricConfig.toJSON(e));
2121
2142
  }
2122
- if (message.eventTrackingConfigs?.length) {
2123
- obj.eventTrackingConfigs = message.eventTrackingConfigs.map((e) => EventTrackingConfig.toJSON(e));
2124
- }
2125
2143
  if (message.exportConfigs?.length) {
2126
2144
  obj.exportConfigs = message.exportConfigs.map((e) => ExportConfig.toJSON(e));
2127
2145
  }
@@ -2149,7 +2167,6 @@ export const ProcessConfigResponse = {
2149
2167
  message.templateInstances = object.templateInstances?.map((e) => TemplateInstance.fromPartial(e)) || [];
2150
2168
  message.accountConfigs = object.accountConfigs?.map((e) => AccountConfig.fromPartial(e)) || [];
2151
2169
  message.metricConfigs = object.metricConfigs?.map((e) => MetricConfig.fromPartial(e)) || [];
2152
- message.eventTrackingConfigs = object.eventTrackingConfigs?.map((e) => EventTrackingConfig.fromPartial(e)) || [];
2153
2170
  message.exportConfigs = object.exportConfigs?.map((e) => ExportConfig.fromPartial(e)) || [];
2154
2171
  message.eventLogConfigs = object.eventLogConfigs?.map((e) => EventLogConfig.fromPartial(e)) || [];
2155
2172
  message.dbSchema = (object.dbSchema !== undefined && object.dbSchema !== null)
@@ -2840,167 +2857,6 @@ export const RetentionConfig = {
2840
2857
  },
2841
2858
  };
2842
2859
 
2843
- function createBaseEventTrackingConfig(): EventTrackingConfig {
2844
- return {
2845
- eventName: "",
2846
- totalByDay: false,
2847
- unique: false,
2848
- totalPerEntity: undefined,
2849
- distinctAggregationByDays: [],
2850
- retentionConfig: undefined,
2851
- };
2852
- }
2853
-
2854
- export const EventTrackingConfig = {
2855
- encode(message: EventTrackingConfig, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
2856
- if (message.eventName !== "") {
2857
- writer.uint32(10).string(message.eventName);
2858
- }
2859
- if (message.totalByDay !== false) {
2860
- writer.uint32(16).bool(message.totalByDay);
2861
- }
2862
- if (message.unique !== false) {
2863
- writer.uint32(24).bool(message.unique);
2864
- }
2865
- if (message.totalPerEntity !== undefined) {
2866
- TotalPerEntityAggregation.encode(message.totalPerEntity, writer.uint32(34).fork()).ldelim();
2867
- }
2868
- writer.uint32(42).fork();
2869
- for (const v of message.distinctAggregationByDays) {
2870
- writer.int32(v);
2871
- }
2872
- writer.ldelim();
2873
- if (message.retentionConfig !== undefined) {
2874
- RetentionConfig.encode(message.retentionConfig, writer.uint32(50).fork()).ldelim();
2875
- }
2876
- return writer;
2877
- },
2878
-
2879
- decode(input: _m0.Reader | Uint8Array, length?: number): EventTrackingConfig {
2880
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
2881
- let end = length === undefined ? reader.len : reader.pos + length;
2882
- const message = createBaseEventTrackingConfig();
2883
- while (reader.pos < end) {
2884
- const tag = reader.uint32();
2885
- switch (tag >>> 3) {
2886
- case 1:
2887
- if (tag !== 10) {
2888
- break;
2889
- }
2890
-
2891
- message.eventName = reader.string();
2892
- continue;
2893
- case 2:
2894
- if (tag !== 16) {
2895
- break;
2896
- }
2897
-
2898
- message.totalByDay = reader.bool();
2899
- continue;
2900
- case 3:
2901
- if (tag !== 24) {
2902
- break;
2903
- }
2904
-
2905
- message.unique = reader.bool();
2906
- continue;
2907
- case 4:
2908
- if (tag !== 34) {
2909
- break;
2910
- }
2911
-
2912
- message.totalPerEntity = TotalPerEntityAggregation.decode(reader, reader.uint32());
2913
- continue;
2914
- case 5:
2915
- if (tag === 40) {
2916
- message.distinctAggregationByDays.push(reader.int32());
2917
-
2918
- continue;
2919
- }
2920
-
2921
- if (tag === 42) {
2922
- const end2 = reader.uint32() + reader.pos;
2923
- while (reader.pos < end2) {
2924
- message.distinctAggregationByDays.push(reader.int32());
2925
- }
2926
-
2927
- continue;
2928
- }
2929
-
2930
- break;
2931
- case 6:
2932
- if (tag !== 50) {
2933
- break;
2934
- }
2935
-
2936
- message.retentionConfig = RetentionConfig.decode(reader, reader.uint32());
2937
- continue;
2938
- }
2939
- if ((tag & 7) === 4 || tag === 0) {
2940
- break;
2941
- }
2942
- reader.skipType(tag & 7);
2943
- }
2944
- return message;
2945
- },
2946
-
2947
- fromJSON(object: any): EventTrackingConfig {
2948
- return {
2949
- eventName: isSet(object.eventName) ? globalThis.String(object.eventName) : "",
2950
- totalByDay: isSet(object.totalByDay) ? globalThis.Boolean(object.totalByDay) : false,
2951
- unique: isSet(object.unique) ? globalThis.Boolean(object.unique) : false,
2952
- totalPerEntity: isSet(object.totalPerEntity)
2953
- ? TotalPerEntityAggregation.fromJSON(object.totalPerEntity)
2954
- : undefined,
2955
- distinctAggregationByDays: globalThis.Array.isArray(object?.distinctAggregationByDays)
2956
- ? object.distinctAggregationByDays.map((e: any) => globalThis.Number(e))
2957
- : [],
2958
- retentionConfig: isSet(object.retentionConfig) ? RetentionConfig.fromJSON(object.retentionConfig) : undefined,
2959
- };
2960
- },
2961
-
2962
- toJSON(message: EventTrackingConfig): unknown {
2963
- const obj: any = {};
2964
- if (message.eventName !== "") {
2965
- obj.eventName = message.eventName;
2966
- }
2967
- if (message.totalByDay !== false) {
2968
- obj.totalByDay = message.totalByDay;
2969
- }
2970
- if (message.unique !== false) {
2971
- obj.unique = message.unique;
2972
- }
2973
- if (message.totalPerEntity !== undefined) {
2974
- obj.totalPerEntity = TotalPerEntityAggregation.toJSON(message.totalPerEntity);
2975
- }
2976
- if (message.distinctAggregationByDays?.length) {
2977
- obj.distinctAggregationByDays = message.distinctAggregationByDays.map((e) => Math.round(e));
2978
- }
2979
- if (message.retentionConfig !== undefined) {
2980
- obj.retentionConfig = RetentionConfig.toJSON(message.retentionConfig);
2981
- }
2982
- return obj;
2983
- },
2984
-
2985
- create(base?: DeepPartial<EventTrackingConfig>): EventTrackingConfig {
2986
- return EventTrackingConfig.fromPartial(base ?? {});
2987
- },
2988
- fromPartial(object: DeepPartial<EventTrackingConfig>): EventTrackingConfig {
2989
- const message = createBaseEventTrackingConfig();
2990
- message.eventName = object.eventName ?? "";
2991
- message.totalByDay = object.totalByDay ?? false;
2992
- message.unique = object.unique ?? false;
2993
- message.totalPerEntity = (object.totalPerEntity !== undefined && object.totalPerEntity !== null)
2994
- ? TotalPerEntityAggregation.fromPartial(object.totalPerEntity)
2995
- : undefined;
2996
- message.distinctAggregationByDays = object.distinctAggregationByDays?.map((e) => e) || [];
2997
- message.retentionConfig = (object.retentionConfig !== undefined && object.retentionConfig !== null)
2998
- ? RetentionConfig.fromPartial(object.retentionConfig)
2999
- : undefined;
3000
- return message;
3001
- },
3002
- };
3003
-
3004
2860
  function createBaseExportConfig(): ExportConfig {
3005
2861
  return { name: "", channel: "" };
3006
2862
  }
@@ -13396,7 +13252,7 @@ export const StateResult = {
13396
13252
  };
13397
13253
 
13398
13254
  function createBaseProcessResult(): ProcessResult {
13399
- return { gauges: [], counters: [], logs: [], events: [], exports: [], states: undefined, timeseriesResult: [] };
13255
+ return { gauges: [], counters: [], events: [], exports: [], states: undefined, timeseriesResult: [] };
13400
13256
  }
13401
13257
 
13402
13258
  export const ProcessResult = {
@@ -13407,9 +13263,6 @@ export const ProcessResult = {
13407
13263
  for (const v of message.counters) {
13408
13264
  CounterResult.encode(v!, writer.uint32(18).fork()).ldelim();
13409
13265
  }
13410
- for (const v of message.logs) {
13411
- LogResult.encode(v!, writer.uint32(26).fork()).ldelim();
13412
- }
13413
13266
  for (const v of message.events) {
13414
13267
  EventTrackingResult.encode(v!, writer.uint32(34).fork()).ldelim();
13415
13268
  }
@@ -13446,13 +13299,6 @@ export const ProcessResult = {
13446
13299
 
13447
13300
  message.counters.push(CounterResult.decode(reader, reader.uint32()));
13448
13301
  continue;
13449
- case 3:
13450
- if (tag !== 26) {
13451
- break;
13452
- }
13453
-
13454
- message.logs.push(LogResult.decode(reader, reader.uint32()));
13455
- continue;
13456
13302
  case 4:
13457
13303
  if (tag !== 34) {
13458
13304
  break;
@@ -13496,7 +13342,6 @@ export const ProcessResult = {
13496
13342
  counters: globalThis.Array.isArray(object?.counters)
13497
13343
  ? object.counters.map((e: any) => CounterResult.fromJSON(e))
13498
13344
  : [],
13499
- logs: globalThis.Array.isArray(object?.logs) ? object.logs.map((e: any) => LogResult.fromJSON(e)) : [],
13500
13345
  events: globalThis.Array.isArray(object?.events)
13501
13346
  ? object.events.map((e: any) => EventTrackingResult.fromJSON(e))
13502
13347
  : [],
@@ -13518,9 +13363,6 @@ export const ProcessResult = {
13518
13363
  if (message.counters?.length) {
13519
13364
  obj.counters = message.counters.map((e) => CounterResult.toJSON(e));
13520
13365
  }
13521
- if (message.logs?.length) {
13522
- obj.logs = message.logs.map((e) => LogResult.toJSON(e));
13523
- }
13524
13366
  if (message.events?.length) {
13525
13367
  obj.events = message.events.map((e) => EventTrackingResult.toJSON(e));
13526
13368
  }
@@ -13543,7 +13385,6 @@ export const ProcessResult = {
13543
13385
  const message = createBaseProcessResult();
13544
13386
  message.gauges = object.gauges?.map((e) => GaugeResult.fromPartial(e)) || [];
13545
13387
  message.counters = object.counters?.map((e) => CounterResult.fromPartial(e)) || [];
13546
- message.logs = object.logs?.map((e) => LogResult.fromPartial(e)) || [];
13547
13388
  message.events = object.events?.map((e) => EventTrackingResult.fromPartial(e)) || [];
13548
13389
  message.exports = object.exports?.map((e) => ExportResult.fromPartial(e)) || [];
13549
13390
  message.states = (object.states !== undefined && object.states !== null)
@@ -14573,144 +14414,6 @@ export const CounterResult = {
14573
14414
  },
14574
14415
  };
14575
14416
 
14576
- function createBaseLogResult(): LogResult {
14577
- return { metadata: undefined, level: 0, message: "", attributes: "", attributes2: undefined, runtimeInfo: undefined };
14578
- }
14579
-
14580
- export const LogResult = {
14581
- encode(message: LogResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
14582
- if (message.metadata !== undefined) {
14583
- RecordMetaData.encode(message.metadata, writer.uint32(10).fork()).ldelim();
14584
- }
14585
- if (message.level !== 0) {
14586
- writer.uint32(16).int32(message.level);
14587
- }
14588
- if (message.message !== "") {
14589
- writer.uint32(26).string(message.message);
14590
- }
14591
- if (message.attributes !== "") {
14592
- writer.uint32(50).string(message.attributes);
14593
- }
14594
- if (message.attributes2 !== undefined) {
14595
- Struct.encode(Struct.wrap(message.attributes2), writer.uint32(58).fork()).ldelim();
14596
- }
14597
- if (message.runtimeInfo !== undefined) {
14598
- RuntimeInfo.encode(message.runtimeInfo, writer.uint32(34).fork()).ldelim();
14599
- }
14600
- return writer;
14601
- },
14602
-
14603
- decode(input: _m0.Reader | Uint8Array, length?: number): LogResult {
14604
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
14605
- let end = length === undefined ? reader.len : reader.pos + length;
14606
- const message = createBaseLogResult();
14607
- while (reader.pos < end) {
14608
- const tag = reader.uint32();
14609
- switch (tag >>> 3) {
14610
- case 1:
14611
- if (tag !== 10) {
14612
- break;
14613
- }
14614
-
14615
- message.metadata = RecordMetaData.decode(reader, reader.uint32());
14616
- continue;
14617
- case 2:
14618
- if (tag !== 16) {
14619
- break;
14620
- }
14621
-
14622
- message.level = reader.int32() as any;
14623
- continue;
14624
- case 3:
14625
- if (tag !== 26) {
14626
- break;
14627
- }
14628
-
14629
- message.message = reader.string();
14630
- continue;
14631
- case 6:
14632
- if (tag !== 50) {
14633
- break;
14634
- }
14635
-
14636
- message.attributes = reader.string();
14637
- continue;
14638
- case 7:
14639
- if (tag !== 58) {
14640
- break;
14641
- }
14642
-
14643
- message.attributes2 = Struct.unwrap(Struct.decode(reader, reader.uint32()));
14644
- continue;
14645
- case 4:
14646
- if (tag !== 34) {
14647
- break;
14648
- }
14649
-
14650
- message.runtimeInfo = RuntimeInfo.decode(reader, reader.uint32());
14651
- continue;
14652
- }
14653
- if ((tag & 7) === 4 || tag === 0) {
14654
- break;
14655
- }
14656
- reader.skipType(tag & 7);
14657
- }
14658
- return message;
14659
- },
14660
-
14661
- fromJSON(object: any): LogResult {
14662
- return {
14663
- metadata: isSet(object.metadata) ? RecordMetaData.fromJSON(object.metadata) : undefined,
14664
- level: isSet(object.level) ? logLevelFromJSON(object.level) : 0,
14665
- message: isSet(object.message) ? globalThis.String(object.message) : "",
14666
- attributes: isSet(object.attributes) ? globalThis.String(object.attributes) : "",
14667
- attributes2: isObject(object.attributes2) ? object.attributes2 : undefined,
14668
- runtimeInfo: isSet(object.runtimeInfo) ? RuntimeInfo.fromJSON(object.runtimeInfo) : undefined,
14669
- };
14670
- },
14671
-
14672
- toJSON(message: LogResult): unknown {
14673
- const obj: any = {};
14674
- if (message.metadata !== undefined) {
14675
- obj.metadata = RecordMetaData.toJSON(message.metadata);
14676
- }
14677
- if (message.level !== 0) {
14678
- obj.level = logLevelToJSON(message.level);
14679
- }
14680
- if (message.message !== "") {
14681
- obj.message = message.message;
14682
- }
14683
- if (message.attributes !== "") {
14684
- obj.attributes = message.attributes;
14685
- }
14686
- if (message.attributes2 !== undefined) {
14687
- obj.attributes2 = message.attributes2;
14688
- }
14689
- if (message.runtimeInfo !== undefined) {
14690
- obj.runtimeInfo = RuntimeInfo.toJSON(message.runtimeInfo);
14691
- }
14692
- return obj;
14693
- },
14694
-
14695
- create(base?: DeepPartial<LogResult>): LogResult {
14696
- return LogResult.fromPartial(base ?? {});
14697
- },
14698
- fromPartial(object: DeepPartial<LogResult>): LogResult {
14699
- const message = createBaseLogResult();
14700
- message.metadata = (object.metadata !== undefined && object.metadata !== null)
14701
- ? RecordMetaData.fromPartial(object.metadata)
14702
- : undefined;
14703
- message.level = object.level ?? 0;
14704
- message.message = object.message ?? "";
14705
- message.attributes = object.attributes ?? "";
14706
- message.attributes2 = object.attributes2 ?? undefined;
14707
- message.runtimeInfo = (object.runtimeInfo !== undefined && object.runtimeInfo !== null)
14708
- ? RuntimeInfo.fromPartial(object.runtimeInfo)
14709
- : undefined;
14710
- return message;
14711
- },
14712
- };
14713
-
14714
14417
  function createBaseEventTrackingResult(): EventTrackingResult {
14715
14418
  return {
14716
14419
  metadata: undefined,
@@ -220,6 +220,7 @@ export enum NotificationType {
220
220
  BILLING_INVOICE = 301,
221
221
  BILLING_PAYMENT = 302,
222
222
  BILLING_SUBSCRIPTION = 303,
223
+ BILLING_USAGE = 304,
223
224
  UNRECOGNIZED = -1,
224
225
  }
225
226
 
@@ -264,6 +265,9 @@ export function notificationTypeFromJSON(object: any): NotificationType {
264
265
  case 303:
265
266
  case "BILLING_SUBSCRIPTION":
266
267
  return NotificationType.BILLING_SUBSCRIPTION;
268
+ case 304:
269
+ case "BILLING_USAGE":
270
+ return NotificationType.BILLING_USAGE;
267
271
  case -1:
268
272
  case "UNRECOGNIZED":
269
273
  default:
@@ -299,6 +303,8 @@ export function notificationTypeToJSON(object: NotificationType): string {
299
303
  return "BILLING_PAYMENT";
300
304
  case NotificationType.BILLING_SUBSCRIPTION:
301
305
  return "BILLING_SUBSCRIPTION";
306
+ case NotificationType.BILLING_USAGE:
307
+ return "BILLING_USAGE";
302
308
  case NotificationType.UNRECOGNIZED:
303
309
  default:
304
310
  return "UNRECOGNIZED";