@blockscout/autoscout-types 1.8.0 → 1.8.2-alpha

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.
@@ -32,6 +32,21 @@ export declare enum DepositType {
32
32
  DAIMO = "DEPOSIT_TYPE_DAIMO",
33
33
  PROMOTION_FLAT_BONUS = "DEPOSIT_TYPE_PROMOTION_FLAT_BONUS"
34
34
  }
35
+ export declare enum PluginVariant {
36
+ UNSPECIFIED_PLUGIN_VARIANT = "UNSPECIFIED_PLUGIN_VARIANT",
37
+ STATS = "PLUGIN_VARIANT_STATS",
38
+ USER_OPS = "PLUGIN_VARIANT_USER_OPS"
39
+ }
40
+ export declare enum PluginStatus {
41
+ UNSPECIFIED_PLUGIN_STATUS = "UNSPECIFIED_PLUGIN_STATUS",
42
+ STOPPED = "PLUGIN_STATUS_STOPPED",
43
+ RUNNING = "PLUGIN_STATUS_RUNNING"
44
+ }
45
+ export declare enum PluginEventType {
46
+ UNSPECIFIED_PLUGIN_EVENT_TYPE = "UNSPECIFIED_PLUGIN_EVENT_TYPE",
47
+ STATUS_CHANGE = "PLUGIN_EVENT_TYPE_STATUS_CHANGE",
48
+ HEALTH_CHANGE = "PLUGIN_EVENT_TYPE_HEALTH_CHANGE"
49
+ }
35
50
  export interface HealthStatus {
36
51
  ok: boolean;
37
52
  last_check: string;
@@ -70,6 +85,7 @@ export interface Deployment {
70
85
  total_cost: string;
71
86
  health_status: HealthStatus | undefined;
72
87
  indexing_status: IndexingStatus | undefined;
88
+ plugins_status: DeploymentPluginStatuses | undefined;
73
89
  }
74
90
  export interface DeploymentLog {
75
91
  id: number;
@@ -87,6 +103,22 @@ export interface DeploymentHourStorageUsage {
87
103
  free_quota_mb: number;
88
104
  overage_cost_per_gb_hour: string;
89
105
  }
106
+ export interface PluginEvent {
107
+ variant: PluginVariant;
108
+ timestamp: string;
109
+ event_type: PluginEventType;
110
+ event_data?: {
111
+ [key: string]: any;
112
+ } | undefined;
113
+ }
114
+ export interface PluginStatuses {
115
+ launch_status: PluginStatus;
116
+ health_status: HealthStatus | undefined;
117
+ }
118
+ export interface DeploymentPluginStatuses {
119
+ stats_status: PluginStatuses | undefined;
120
+ user_ops_status: PluginStatuses | undefined;
121
+ }
90
122
  export interface UserAction {
91
123
  action: string;
92
124
  instance_id?: string | undefined;
@@ -229,9 +261,12 @@ export interface GetInstanceRequest {
229
261
  instance_id: string;
230
262
  }
231
263
  export interface ListInstancesRequest {
264
+ page?: number | undefined;
265
+ per_page?: number | undefined;
232
266
  }
233
267
  export interface ListInstancesResponse {
234
268
  items: Instance[];
269
+ pagination: PaginationResult | undefined;
235
270
  }
236
271
  export interface SearchInstancesRequest {
237
272
  instance_id?: number | undefined;
@@ -239,6 +274,7 @@ export interface SearchInstancesRequest {
239
274
  instance_slug?: string | undefined;
240
275
  user_id?: number | undefined;
241
276
  user_email?: string | undefined;
277
+ deployment_status: DeploymentStatus;
242
278
  page?: number | undefined;
243
279
  per_page?: number | undefined;
244
280
  }
@@ -296,6 +332,35 @@ export interface GetDeploymentLogRequest {
296
332
  deployment_id: string;
297
333
  id: number;
298
334
  }
335
+ export interface ListPluginEventsRequest {
336
+ deployment_id: string;
337
+ /**
338
+ * comma-separated list of plugin variants to return;
339
+ * see `PluginVariant` for available values
340
+ */
341
+ variants: string[];
342
+ /**
343
+ * comma-separated list of plugin event types to return;
344
+ * see `PluginEventType` for available values
345
+ */
346
+ event_types: string[];
347
+ page?: number | undefined;
348
+ per_page?: number | undefined;
349
+ }
350
+ export interface ListPluginEventsResponse {
351
+ items: PluginEvent[];
352
+ pagination: PaginationResult | undefined;
353
+ }
354
+ export interface ListPluginLogsRequest {
355
+ deployment_id: string;
356
+ plugin_variant: string;
357
+ page?: number | undefined;
358
+ per_page?: number | undefined;
359
+ }
360
+ export interface ListPluginLogsResponse {
361
+ items: DeploymentLog[];
362
+ pagination: PaginationResult | undefined;
363
+ }
299
364
  export interface GetProfileRequest {
300
365
  }
301
366
  export interface ListAuthTokensRequest {
@@ -446,7 +511,11 @@ export interface Autoscout {
446
511
  GetCurrentDeployment(request: GetCurrentDeploymentRequest): Promise<Deployment>;
447
512
  /** Get list of deployments of the instance */
448
513
  ListDeployments(request: ListDeploymentsRequest): Promise<ListDeploymentsResponse>;
514
+ /** Get hourly storage usage information on the deployment */
449
515
  GetDeploymentStorageUsage(request: GetDeploymentStorageUsageRequest): Promise<GetDeploymentStorageUsageResponse>;
516
+ /** Get detailed history of (all) plugin events */
517
+ ListPluginEvents(request: ListPluginEventsRequest): Promise<ListPluginEventsResponse>;
518
+ ListPluginLogs(request: ListPluginLogsRequest): Promise<ListPluginLogsResponse>;
450
519
  ListDeploymentLogs(request: ListDeploymentLogsRequest): Promise<ListDeploymentLogsResponse>;
451
520
  GetDeploymentLog(request: GetDeploymentLogRequest): Promise<DeploymentLog>;
452
521
  /** Register new profile */
@@ -5,7 +5,7 @@
5
5
  // protoc v4.23.4
6
6
  // source: v1/autoscout.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.DepositType = exports.DepositStatus = exports.UpdateInstanceAction = exports.DeploymentStatus = void 0;
8
+ exports.PluginEventType = exports.PluginStatus = exports.PluginVariant = exports.DepositType = exports.DepositStatus = exports.UpdateInstanceAction = exports.DeploymentStatus = void 0;
9
9
  var DeploymentStatus;
10
10
  (function (DeploymentStatus) {
11
11
  DeploymentStatus["NO_STATUS"] = "NO_STATUS";
@@ -42,3 +42,21 @@ var DepositType;
42
42
  DepositType["DAIMO"] = "DEPOSIT_TYPE_DAIMO";
43
43
  DepositType["PROMOTION_FLAT_BONUS"] = "DEPOSIT_TYPE_PROMOTION_FLAT_BONUS";
44
44
  })(DepositType || (exports.DepositType = DepositType = {}));
45
+ var PluginVariant;
46
+ (function (PluginVariant) {
47
+ PluginVariant["UNSPECIFIED_PLUGIN_VARIANT"] = "UNSPECIFIED_PLUGIN_VARIANT";
48
+ PluginVariant["STATS"] = "PLUGIN_VARIANT_STATS";
49
+ PluginVariant["USER_OPS"] = "PLUGIN_VARIANT_USER_OPS";
50
+ })(PluginVariant || (exports.PluginVariant = PluginVariant = {}));
51
+ var PluginStatus;
52
+ (function (PluginStatus) {
53
+ PluginStatus["UNSPECIFIED_PLUGIN_STATUS"] = "UNSPECIFIED_PLUGIN_STATUS";
54
+ PluginStatus["STOPPED"] = "PLUGIN_STATUS_STOPPED";
55
+ PluginStatus["RUNNING"] = "PLUGIN_STATUS_RUNNING";
56
+ })(PluginStatus || (exports.PluginStatus = PluginStatus = {}));
57
+ var PluginEventType;
58
+ (function (PluginEventType) {
59
+ PluginEventType["UNSPECIFIED_PLUGIN_EVENT_TYPE"] = "UNSPECIFIED_PLUGIN_EVENT_TYPE";
60
+ PluginEventType["STATUS_CHANGE"] = "PLUGIN_EVENT_TYPE_STATUS_CHANGE";
61
+ PluginEventType["HEALTH_CHANGE"] = "PLUGIN_EVENT_TYPE_HEALTH_CHANGE";
62
+ })(PluginEventType || (exports.PluginEventType = PluginEventType = {}));
@@ -44,6 +44,24 @@ export enum DepositType {
44
44
  PROMOTION_FLAT_BONUS = "DEPOSIT_TYPE_PROMOTION_FLAT_BONUS",
45
45
  }
46
46
 
47
+ export enum PluginVariant {
48
+ UNSPECIFIED_PLUGIN_VARIANT = "UNSPECIFIED_PLUGIN_VARIANT",
49
+ STATS = "PLUGIN_VARIANT_STATS",
50
+ USER_OPS = "PLUGIN_VARIANT_USER_OPS",
51
+ }
52
+
53
+ export enum PluginStatus {
54
+ UNSPECIFIED_PLUGIN_STATUS = "UNSPECIFIED_PLUGIN_STATUS",
55
+ STOPPED = "PLUGIN_STATUS_STOPPED",
56
+ RUNNING = "PLUGIN_STATUS_RUNNING",
57
+ }
58
+
59
+ export enum PluginEventType {
60
+ UNSPECIFIED_PLUGIN_EVENT_TYPE = "UNSPECIFIED_PLUGIN_EVENT_TYPE",
61
+ STATUS_CHANGE = "PLUGIN_EVENT_TYPE_STATUS_CHANGE",
62
+ HEALTH_CHANGE = "PLUGIN_EVENT_TYPE_HEALTH_CHANGE",
63
+ }
64
+
47
65
  export interface HealthStatus {
48
66
  ok: boolean;
49
67
  last_check: string;
@@ -83,6 +101,7 @@ export interface Deployment {
83
101
  total_cost: string;
84
102
  health_status: HealthStatus | undefined;
85
103
  indexing_status: IndexingStatus | undefined;
104
+ plugins_status: DeploymentPluginStatuses | undefined;
86
105
  }
87
106
 
88
107
  export interface DeploymentLog {
@@ -103,6 +122,23 @@ export interface DeploymentHourStorageUsage {
103
122
  overage_cost_per_gb_hour: string;
104
123
  }
105
124
 
125
+ export interface PluginEvent {
126
+ variant: PluginVariant;
127
+ timestamp: string;
128
+ event_type: PluginEventType;
129
+ event_data?: { [key: string]: any } | undefined;
130
+ }
131
+
132
+ export interface PluginStatuses {
133
+ launch_status: PluginStatus;
134
+ health_status: HealthStatus | undefined;
135
+ }
136
+
137
+ export interface DeploymentPluginStatuses {
138
+ stats_status: PluginStatuses | undefined;
139
+ user_ops_status: PluginStatuses | undefined;
140
+ }
141
+
106
142
  export interface UserAction {
107
143
  action: string;
108
144
  instance_id?: string | undefined;
@@ -269,10 +305,13 @@ export interface GetInstanceRequest {
269
305
  }
270
306
 
271
307
  export interface ListInstancesRequest {
308
+ page?: number | undefined;
309
+ per_page?: number | undefined;
272
310
  }
273
311
 
274
312
  export interface ListInstancesResponse {
275
313
  items: Instance[];
314
+ pagination: PaginationResult | undefined;
276
315
  }
277
316
 
278
317
  export interface SearchInstancesRequest {
@@ -281,6 +320,7 @@ export interface SearchInstancesRequest {
281
320
  instance_slug?: string | undefined;
282
321
  user_id?: number | undefined;
283
322
  user_email?: string | undefined;
323
+ deployment_status: DeploymentStatus;
284
324
  page?: number | undefined;
285
325
  per_page?: number | undefined;
286
326
  }
@@ -352,6 +392,39 @@ export interface GetDeploymentLogRequest {
352
392
  id: number;
353
393
  }
354
394
 
395
+ export interface ListPluginEventsRequest {
396
+ deployment_id: string;
397
+ /**
398
+ * comma-separated list of plugin variants to return;
399
+ * see `PluginVariant` for available values
400
+ */
401
+ variants: string[];
402
+ /**
403
+ * comma-separated list of plugin event types to return;
404
+ * see `PluginEventType` for available values
405
+ */
406
+ event_types: string[];
407
+ page?: number | undefined;
408
+ per_page?: number | undefined;
409
+ }
410
+
411
+ export interface ListPluginEventsResponse {
412
+ items: PluginEvent[];
413
+ pagination: PaginationResult | undefined;
414
+ }
415
+
416
+ export interface ListPluginLogsRequest {
417
+ deployment_id: string;
418
+ plugin_variant: string;
419
+ page?: number | undefined;
420
+ per_page?: number | undefined;
421
+ }
422
+
423
+ export interface ListPluginLogsResponse {
424
+ items: DeploymentLog[];
425
+ pagination: PaginationResult | undefined;
426
+ }
427
+
355
428
  export interface GetProfileRequest {
356
429
  }
357
430
 
@@ -534,7 +607,11 @@ export interface Autoscout {
534
607
  GetCurrentDeployment(request: GetCurrentDeploymentRequest): Promise<Deployment>;
535
608
  /** Get list of deployments of the instance */
536
609
  ListDeployments(request: ListDeploymentsRequest): Promise<ListDeploymentsResponse>;
610
+ /** Get hourly storage usage information on the deployment */
537
611
  GetDeploymentStorageUsage(request: GetDeploymentStorageUsageRequest): Promise<GetDeploymentStorageUsageResponse>;
612
+ /** Get detailed history of (all) plugin events */
613
+ ListPluginEvents(request: ListPluginEventsRequest): Promise<ListPluginEventsResponse>;
614
+ ListPluginLogs(request: ListPluginLogsRequest): Promise<ListPluginLogsResponse>;
538
615
  ListDeploymentLogs(request: ListDeploymentLogsRequest): Promise<ListDeploymentLogsResponse>;
539
616
  GetDeploymentLog(request: GetDeploymentLogRequest): Promise<DeploymentLog>;
540
617
  /** Register new profile */
@@ -48,6 +48,11 @@ export declare enum IndexerBlockTransformer {
48
48
  BASE = "BASE",
49
49
  CLIQUE = "CLIQUE"
50
50
  }
51
+ export declare enum UserOpsTraceClient {
52
+ UNSPECIFIED_TRACE_CLIENT = "UNSPECIFIED_TRACE_CLIENT",
53
+ DEBUG = "DEBUG",
54
+ TRACE = "TRACE"
55
+ }
51
56
  export interface DeployConfig {
52
57
  rpc_url: string;
53
58
  server_size: string;
@@ -97,6 +102,8 @@ export interface DeployConfig {
97
102
  google_analytics_property_id?: string | undefined;
98
103
  production_ready?: boolean | undefined;
99
104
  api_docs_tabs?: StringList | undefined;
105
+ stats_plugin_config?: StatsPluginConfig | undefined;
106
+ user_ops_plugin_config?: UserOpsPluginConfig | undefined;
100
107
  }
101
108
  export interface Footer {
102
109
  columns: FooterColumn[];
@@ -279,3 +286,29 @@ export interface ZksyncConfig {
279
286
  /** INDEXER_ZKSYNC_BATCHES_STATUS_RECHECK_INTERVAL */
280
287
  batches_status_recheck_interval?: string | undefined;
281
288
  }
289
+ export interface StatsPluginConfig {
290
+ enabled: boolean;
291
+ }
292
+ export interface UserOpsPluginConfig {
293
+ enabled: boolean;
294
+ rpc_url?: string | undefined;
295
+ entrypoints_v06?: UserOpsEntrypointConfig | undefined;
296
+ entrypoints_v07?: UserOpsEntrypointConfig | undefined;
297
+ entrypoints_v08?: UserOpsEntrypointConfig | undefined;
298
+ realtime_enabled?: boolean | undefined;
299
+ realtime_polling_interval?: string | undefined;
300
+ realtime_polling_block_range?: number | undefined;
301
+ realtime_max_block_range?: number | undefined;
302
+ past_rpc_logs_indexer_enabled?: boolean | undefined;
303
+ past_rpc_logs_indexer_block_range?: number | undefined;
304
+ past_db_logs_indexer_enabled?: boolean | undefined;
305
+ past_db_logs_indexer_start_block?: string | undefined;
306
+ past_db_logs_indexer_end_block?: string | undefined;
307
+ trace_client: UserOpsTraceClient;
308
+ }
309
+ export interface UserOpsEntrypointConfig {
310
+ /** / Enabled by default */
311
+ enabled?: boolean | undefined;
312
+ /** / Empty - default (see user ops docs for default) */
313
+ entry_point: string[];
314
+ }
package/dist/v1/config.js CHANGED
@@ -5,7 +5,7 @@
5
5
  // protoc v4.23.4
6
6
  // source: v1/config.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.IndexerBlockTransformer = exports.AdBannerProvider = exports.AdTextProvider = exports.Identicon = exports.ColorTheme = exports.NavigationLayout = exports.NodeType = exports.ChainType = void 0;
8
+ exports.UserOpsTraceClient = exports.IndexerBlockTransformer = exports.AdBannerProvider = exports.AdTextProvider = exports.Identicon = exports.ColorTheme = exports.NavigationLayout = exports.NodeType = exports.ChainType = void 0;
9
9
  /* eslint-disable */
10
10
  var ChainType;
11
11
  (function (ChainType) {
@@ -65,3 +65,9 @@ var IndexerBlockTransformer;
65
65
  IndexerBlockTransformer["BASE"] = "BASE";
66
66
  IndexerBlockTransformer["CLIQUE"] = "CLIQUE";
67
67
  })(IndexerBlockTransformer || (exports.IndexerBlockTransformer = IndexerBlockTransformer = {}));
68
+ var UserOpsTraceClient;
69
+ (function (UserOpsTraceClient) {
70
+ UserOpsTraceClient["UNSPECIFIED_TRACE_CLIENT"] = "UNSPECIFIED_TRACE_CLIENT";
71
+ UserOpsTraceClient["DEBUG"] = "DEBUG";
72
+ UserOpsTraceClient["TRACE"] = "TRACE";
73
+ })(UserOpsTraceClient || (exports.UserOpsTraceClient = UserOpsTraceClient = {}));
package/dist/v1/config.ts CHANGED
@@ -64,6 +64,12 @@ export enum IndexerBlockTransformer {
64
64
  CLIQUE = "CLIQUE",
65
65
  }
66
66
 
67
+ export enum UserOpsTraceClient {
68
+ UNSPECIFIED_TRACE_CLIENT = "UNSPECIFIED_TRACE_CLIENT",
69
+ DEBUG = "DEBUG",
70
+ TRACE = "TRACE",
71
+ }
72
+
67
73
  export interface DeployConfig {
68
74
  rpc_url: string;
69
75
  server_size: string;
@@ -115,6 +121,8 @@ export interface DeployConfig {
115
121
  google_analytics_property_id?: string | undefined;
116
122
  production_ready?: boolean | undefined;
117
123
  api_docs_tabs?: StringList | undefined;
124
+ stats_plugin_config?: StatsPluginConfig | undefined;
125
+ user_ops_plugin_config?: UserOpsPluginConfig | undefined;
118
126
  }
119
127
 
120
128
  export interface Footer {
@@ -384,3 +392,34 @@ export interface ZksyncConfig {
384
392
  /** INDEXER_ZKSYNC_BATCHES_STATUS_RECHECK_INTERVAL */
385
393
  batches_status_recheck_interval?: string | undefined;
386
394
  }
395
+
396
+ export interface StatsPluginConfig {
397
+ enabled: boolean;
398
+ }
399
+
400
+ export interface UserOpsPluginConfig {
401
+ enabled: boolean;
402
+ rpc_url?: string | undefined;
403
+ entrypoints_v06?: UserOpsEntrypointConfig | undefined;
404
+ entrypoints_v07?: UserOpsEntrypointConfig | undefined;
405
+ entrypoints_v08?: UserOpsEntrypointConfig | undefined;
406
+ realtime_enabled?: boolean | undefined;
407
+ realtime_polling_interval?: string | undefined;
408
+ realtime_polling_block_range?: number | undefined;
409
+ realtime_max_block_range?: number | undefined;
410
+ past_rpc_logs_indexer_enabled?: boolean | undefined;
411
+ past_rpc_logs_indexer_block_range?: number | undefined;
412
+ past_db_logs_indexer_enabled?: boolean | undefined;
413
+ past_db_logs_indexer_start_block?: string | undefined;
414
+ past_db_logs_indexer_end_block?: string | undefined;
415
+ trace_client: UserOpsTraceClient;
416
+ }
417
+
418
+ export interface UserOpsEntrypointConfig {
419
+ /** / Enabled by default */
420
+ enabled?:
421
+ | boolean
422
+ | undefined;
423
+ /** / Empty - default (see user ops docs for default) */
424
+ entry_point: string[];
425
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockscout/autoscout-types",
3
- "version": "1.8.0",
3
+ "version": "1.8.2-alpha",
4
4
  "description": "TypeScript definitions for Autoscout microservice",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",