@blockscout/autoscout-types 0.0.1 → 0.0.3

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.
@@ -1,5 +1,5 @@
1
1
  import { type DeployConfig, type DeployConfigPartial } from "./config";
2
- export declare enum DeploymentStatus {
2
+ export declare enum Status {
3
3
  NO_STATUS = "NO_STATUS",
4
4
  CREATED = "CREATED",
5
5
  PENDING = "PENDING",
@@ -7,7 +7,6 @@ export declare enum DeploymentStatus {
7
7
  STOPPING = "STOPPING",
8
8
  STOPPED = "STOPPED",
9
9
  FAILED = "FAILED",
10
- UNHEALTHY = "UNHEALTHY",
11
10
  UNRECOGNIZED = "UNRECOGNIZED"
12
11
  }
13
12
  export declare enum UpdateInstanceAction {
@@ -40,12 +39,27 @@ export interface UpdateConfigPartialRequest {
40
39
  instance_id: string;
41
40
  config: DeployConfigPartial | undefined;
42
41
  }
42
+ export interface HealthStatus {
43
+ ok: boolean;
44
+ last_check: string;
45
+ http_code?: number | undefined;
46
+ error_description?: string | undefined;
47
+ response?: {
48
+ [key: string]: any;
49
+ } | undefined;
50
+ }
51
+ export interface IndexingStatus {
52
+ finished_indexing: boolean;
53
+ finished_indexing_blocks: boolean;
54
+ indexed_blocks_ratio?: string | undefined;
55
+ indexed_internal_transactions_ratio?: string | undefined;
56
+ }
43
57
  export interface UpdateInstanceStatusRequest {
44
58
  instance_id: string;
45
59
  action: UpdateInstanceAction;
46
60
  }
47
61
  export interface UpdateInstanceStatusResponse {
48
- status: DeploymentStatus;
62
+ status: Status;
49
63
  deployment_id: string;
50
64
  }
51
65
  export interface Instance {
@@ -59,7 +73,7 @@ export interface Instance {
59
73
  export interface Deployment {
60
74
  deployment_id: string;
61
75
  instance_id: string;
62
- status: DeploymentStatus;
76
+ status: Status;
63
77
  error?: string | undefined;
64
78
  created_at: string;
65
79
  started_at?: string | undefined;
@@ -67,6 +81,8 @@ export interface Deployment {
67
81
  config: DeployConfig | undefined;
68
82
  blockscout_url?: string | undefined;
69
83
  total_cost: string;
84
+ health_status: HealthStatus | undefined;
85
+ indexing_status: IndexingStatus | undefined;
70
86
  }
71
87
  export interface GetInstanceRequest {
72
88
  instance_id: string;
@@ -5,19 +5,18 @@
5
5
  // protoc v5.27.0
6
6
  // source: v1/autoscout.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.UpdateInstanceAction = exports.DeploymentStatus = void 0;
9
- var DeploymentStatus;
10
- (function (DeploymentStatus) {
11
- DeploymentStatus["NO_STATUS"] = "NO_STATUS";
12
- DeploymentStatus["CREATED"] = "CREATED";
13
- DeploymentStatus["PENDING"] = "PENDING";
14
- DeploymentStatus["RUNNING"] = "RUNNING";
15
- DeploymentStatus["STOPPING"] = "STOPPING";
16
- DeploymentStatus["STOPPED"] = "STOPPED";
17
- DeploymentStatus["FAILED"] = "FAILED";
18
- DeploymentStatus["UNHEALTHY"] = "UNHEALTHY";
19
- DeploymentStatus["UNRECOGNIZED"] = "UNRECOGNIZED";
20
- })(DeploymentStatus || (exports.DeploymentStatus = DeploymentStatus = {}));
8
+ exports.UpdateInstanceAction = exports.Status = void 0;
9
+ var Status;
10
+ (function (Status) {
11
+ Status["NO_STATUS"] = "NO_STATUS";
12
+ Status["CREATED"] = "CREATED";
13
+ Status["PENDING"] = "PENDING";
14
+ Status["RUNNING"] = "RUNNING";
15
+ Status["STOPPING"] = "STOPPING";
16
+ Status["STOPPED"] = "STOPPED";
17
+ Status["FAILED"] = "FAILED";
18
+ Status["UNRECOGNIZED"] = "UNRECOGNIZED";
19
+ })(Status || (exports.Status = Status = {}));
21
20
  var UpdateInstanceAction;
22
21
  (function (UpdateInstanceAction) {
23
22
  UpdateInstanceAction["START"] = "START";
@@ -7,7 +7,7 @@
7
7
  /* eslint-disable */
8
8
  import { type DeployConfig, type DeployConfigPartial } from "./config";
9
9
 
10
- export enum DeploymentStatus {
10
+ export enum Status {
11
11
  NO_STATUS = "NO_STATUS",
12
12
  CREATED = "CREATED",
13
13
  PENDING = "PENDING",
@@ -15,7 +15,6 @@ export enum DeploymentStatus {
15
15
  STOPPING = "STOPPING",
16
16
  STOPPED = "STOPPED",
17
17
  FAILED = "FAILED",
18
- UNHEALTHY = "UNHEALTHY",
19
18
  UNRECOGNIZED = "UNRECOGNIZED",
20
19
  }
21
20
 
@@ -57,13 +56,28 @@ export interface UpdateConfigPartialRequest {
57
56
  config: DeployConfigPartial | undefined;
58
57
  }
59
58
 
59
+ export interface HealthStatus {
60
+ ok: boolean;
61
+ last_check: string;
62
+ http_code?: number | undefined;
63
+ error_description?: string | undefined;
64
+ response?: { [key: string]: any } | undefined;
65
+ }
66
+
67
+ export interface IndexingStatus {
68
+ finished_indexing: boolean;
69
+ finished_indexing_blocks: boolean;
70
+ indexed_blocks_ratio?: string | undefined;
71
+ indexed_internal_transactions_ratio?: string | undefined;
72
+ }
73
+
60
74
  export interface UpdateInstanceStatusRequest {
61
75
  instance_id: string;
62
76
  action: UpdateInstanceAction;
63
77
  }
64
78
 
65
79
  export interface UpdateInstanceStatusResponse {
66
- status: DeploymentStatus;
80
+ status: Status;
67
81
  deployment_id: string;
68
82
  }
69
83
 
@@ -79,7 +93,7 @@ export interface Instance {
79
93
  export interface Deployment {
80
94
  deployment_id: string;
81
95
  instance_id: string;
82
- status: DeploymentStatus;
96
+ status: Status;
83
97
  error?: string | undefined;
84
98
  created_at: string;
85
99
  started_at?: string | undefined;
@@ -87,6 +101,8 @@ export interface Deployment {
87
101
  config: DeployConfig | undefined;
88
102
  blockscout_url?: string | undefined;
89
103
  total_cost: string;
104
+ health_status: HealthStatus | undefined;
105
+ indexing_status: IndexingStatus | undefined;
90
106
  }
91
107
 
92
108
  export interface GetInstanceRequest {
@@ -17,6 +17,7 @@ export interface DeployConfig {
17
17
  public_rpc_url?: string | undefined;
18
18
  wallet_connect_project_id?: string | undefined;
19
19
  optimism?: OptimismConfig | undefined;
20
+ arbitrum?: ArbitrumConfig | undefined;
20
21
  }
21
22
  export interface DeployConfigPartial {
22
23
  rpc_url?: string | undefined;
@@ -37,6 +38,7 @@ export interface DeployConfigPartial {
37
38
  public_rpc_url?: string | undefined;
38
39
  wallet_connect_project_id?: string | undefined;
39
40
  optimism?: OptimismConfig | undefined;
41
+ arbitrum?: ArbitrumConfig | undefined;
40
42
  }
41
43
  /** https://github.com/blockscout/docs/blob/df6996a0f8e553c2d4b1c3dcda6ef2518a8b39f9/for-developers/information-and-settings/env-variables/backend-envs-chain-specific.md?plain=1#L102-L119 */
42
44
  export interface OptimismConfig {
@@ -61,3 +63,27 @@ export interface OptimismConfig {
61
63
  /** changes blockscout env INDEXER_OPTIMISM_L2_MESSAGE_PASSER_CONTRACT */
62
64
  l2_message_passer_contract?: string | undefined;
63
65
  }
66
+ /** https://github.com/blockscout/docs/blob/594e4c2ef83556b3cb41e9fd43bca776afb63c05/for-developers/information-and-settings/env-variables/backend-envs-chain-specific.md?plain=1#L136 */
67
+ export interface ArbitrumConfig {
68
+ arbsys_contract?: string | undefined;
69
+ node_interface_contract?: string | undefined;
70
+ l1_rpc_url?: string | undefined;
71
+ l1_rpc_chunk_size?: number | undefined;
72
+ l1_rpc_historical_blocks_range?: number | undefined;
73
+ l1_rollup_contract?: string | undefined;
74
+ l1_rollup_init_block?: number | undefined;
75
+ l1_common_start_block?: number | undefined;
76
+ l1_finalization_threshold?: number | undefined;
77
+ rollup_chunk_size?: number | undefined;
78
+ bridge_messages_tracking_enabled?: boolean | undefined;
79
+ missed_messages_recheck_interval?: number | undefined;
80
+ missed_messages_blocks_depth?: number | undefined;
81
+ tracking_messages_on_l1_recheck_interval?: number | undefined;
82
+ batches_tracking_enabled?: boolean | undefined;
83
+ batches_tracking_recheck_interval?: number | undefined;
84
+ batches_tracking_l1_finalization_check_enabled?: boolean | undefined;
85
+ batches_tracking_messages_to_blocks_shift?: number | undefined;
86
+ missing_batches_range?: number | undefined;
87
+ confirmations_tracking_finalized?: boolean | undefined;
88
+ new_batches_limit?: number | undefined;
89
+ }
package/dist/v1/config.ts CHANGED
@@ -25,6 +25,7 @@ export interface DeployConfig {
25
25
  public_rpc_url?: string | undefined;
26
26
  wallet_connect_project_id?: string | undefined;
27
27
  optimism?: OptimismConfig | undefined;
28
+ arbitrum?: ArbitrumConfig | undefined;
28
29
  }
29
30
 
30
31
  export interface DeployConfigPartial {
@@ -46,6 +47,7 @@ export interface DeployConfigPartial {
46
47
  public_rpc_url?: string | undefined;
47
48
  wallet_connect_project_id?: string | undefined;
48
49
  optimism?: OptimismConfig | undefined;
50
+ arbitrum?: ArbitrumConfig | undefined;
49
51
  }
50
52
 
51
53
  /** https://github.com/blockscout/docs/blob/df6996a0f8e553c2d4b1c3dcda6ef2518a8b39f9/for-developers/information-and-settings/env-variables/backend-envs-chain-specific.md?plain=1#L102-L119 */
@@ -89,3 +91,28 @@ export interface OptimismConfig {
89
91
  /** changes blockscout env INDEXER_OPTIMISM_L2_MESSAGE_PASSER_CONTRACT */
90
92
  l2_message_passer_contract?: string | undefined;
91
93
  }
94
+
95
+ /** https://github.com/blockscout/docs/blob/594e4c2ef83556b3cb41e9fd43bca776afb63c05/for-developers/information-and-settings/env-variables/backend-envs-chain-specific.md?plain=1#L136 */
96
+ export interface ArbitrumConfig {
97
+ arbsys_contract?: string | undefined;
98
+ node_interface_contract?: string | undefined;
99
+ l1_rpc_url?: string | undefined;
100
+ l1_rpc_chunk_size?: number | undefined;
101
+ l1_rpc_historical_blocks_range?: number | undefined;
102
+ l1_rollup_contract?: string | undefined;
103
+ l1_rollup_init_block?: number | undefined;
104
+ l1_common_start_block?: number | undefined;
105
+ l1_finalization_threshold?: number | undefined;
106
+ rollup_chunk_size?: number | undefined;
107
+ bridge_messages_tracking_enabled?: boolean | undefined;
108
+ missed_messages_recheck_interval?: number | undefined;
109
+ missed_messages_blocks_depth?: number | undefined;
110
+ tracking_messages_on_l1_recheck_interval?: number | undefined;
111
+ batches_tracking_enabled?: boolean | undefined;
112
+ batches_tracking_recheck_interval?: number | undefined;
113
+ batches_tracking_l1_finalization_check_enabled?: boolean | undefined;
114
+ batches_tracking_messages_to_blocks_shift?: number | undefined;
115
+ missing_batches_range?: number | undefined;
116
+ confirmations_tracking_finalized?: boolean | undefined;
117
+ new_batches_limit?: number | undefined;
118
+ }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@blockscout/autoscout-types",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "TypeScript definitions for Autoscout microservice",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
7
7
  "scripts": {
8
8
  "build": "npm run compile:proto && npm run compile:ts",
9
- "compile:proto": "mkdir -p ./dist && protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_opt=snakeToCamel=false --ts_proto_opt=stringEnums=true --ts_proto_opt=onlyTypes=true --ts_proto_opt=emitImportedFiles=false --ts_proto_opt=exportCommonSymbols=false --proto_path=../autoscout-proto/proto --proto_path=../../blockscout-rs/proto --ts_proto_out=./dist ../autoscout-proto/proto/v1/autoscout.proto ../autoscout-proto/proto/v1/config.proto",
9
+ "compile:proto": "mkdir -p ./dist && protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_opt=snakeToCamel=false --ts_proto_opt=stringEnums=true --ts_proto_opt=onlyTypes=true --ts_proto_opt=emitImportedFiles=false --ts_proto_opt=exportCommonSymbols=false --ts_proto_opt=forceLong=string --proto_path=../autoscout-proto/proto --proto_path=../../blockscout-rs/proto --ts_proto_out=./dist ../autoscout-proto/proto/v1/autoscout.proto ../autoscout-proto/proto/v1/config.proto",
10
10
  "compile:ts": "tsc --declaration ./index.ts"
11
11
  },
12
12
  "repository": {