@blockscout/autoscout-types 0.0.3 → 0.0.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.
@@ -1,5 +1,6 @@
1
1
  import { type DeployConfig, type DeployConfigPartial } from "./config";
2
- export declare enum Status {
2
+ import { type ConfigSchema } from "./config_schema";
3
+ export declare enum DeploymentStatus {
3
4
  NO_STATUS = "NO_STATUS",
4
5
  CREATED = "CREATED",
5
6
  PENDING = "PENDING",
@@ -15,6 +16,8 @@ export declare enum UpdateInstanceAction {
15
16
  RESTART = "RESTART",
16
17
  UNRECOGNIZED = "UNRECOGNIZED"
17
18
  }
19
+ export interface GetConfigSchemaRequest {
20
+ }
18
21
  export interface CreateInstanceRequest {
19
22
  name: string;
20
23
  /** initial config */
@@ -59,7 +62,7 @@ export interface UpdateInstanceStatusRequest {
59
62
  action: UpdateInstanceAction;
60
63
  }
61
64
  export interface UpdateInstanceStatusResponse {
62
- status: Status;
65
+ status: DeploymentStatus;
63
66
  deployment_id: string;
64
67
  }
65
68
  export interface Instance {
@@ -68,17 +71,19 @@ export interface Instance {
68
71
  slug: string;
69
72
  created_at: string;
70
73
  config: DeployConfig | undefined;
74
+ config_state_hash: string;
71
75
  deployment: Deployment | undefined;
72
76
  }
73
77
  export interface Deployment {
74
78
  deployment_id: string;
75
79
  instance_id: string;
76
- status: Status;
80
+ status: DeploymentStatus;
77
81
  error?: string | undefined;
78
82
  created_at: string;
79
83
  started_at?: string | undefined;
80
84
  finished_at?: string | undefined;
81
85
  config: DeployConfig | undefined;
86
+ config_state_hash: string;
82
87
  blockscout_url?: string | undefined;
83
88
  total_cost: string;
84
89
  health_status: HealthStatus | undefined;
@@ -139,6 +144,7 @@ export interface CreateAuthTokenRequest {
139
144
  name: string;
140
145
  }
141
146
  export interface Autoscout {
147
+ GetConfigSchema(request: GetConfigSchemaRequest): Promise<ConfigSchema>;
142
148
  /** Creating blockscout instance with config */
143
149
  CreateInstance(request: CreateInstanceRequest): Promise<CreateInstanceResponse>;
144
150
  /** Update configuration of blockscout instance */
@@ -5,18 +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.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 = {}));
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["UNRECOGNIZED"] = "UNRECOGNIZED";
19
+ })(DeploymentStatus || (exports.DeploymentStatus = DeploymentStatus = {}));
20
20
  var UpdateInstanceAction;
21
21
  (function (UpdateInstanceAction) {
22
22
  UpdateInstanceAction["START"] = "START";
@@ -6,8 +6,9 @@
6
6
 
7
7
  /* eslint-disable */
8
8
  import { type DeployConfig, type DeployConfigPartial } from "./config";
9
+ import { type ConfigSchema } from "./config_schema";
9
10
 
10
- export enum Status {
11
+ export enum DeploymentStatus {
11
12
  NO_STATUS = "NO_STATUS",
12
13
  CREATED = "CREATED",
13
14
  PENDING = "PENDING",
@@ -25,6 +26,9 @@ export enum UpdateInstanceAction {
25
26
  UNRECOGNIZED = "UNRECOGNIZED",
26
27
  }
27
28
 
29
+ export interface GetConfigSchemaRequest {
30
+ }
31
+
28
32
  export interface CreateInstanceRequest {
29
33
  name: string;
30
34
  /** initial config */
@@ -77,7 +81,7 @@ export interface UpdateInstanceStatusRequest {
77
81
  }
78
82
 
79
83
  export interface UpdateInstanceStatusResponse {
80
- status: Status;
84
+ status: DeploymentStatus;
81
85
  deployment_id: string;
82
86
  }
83
87
 
@@ -87,18 +91,20 @@ export interface Instance {
87
91
  slug: string;
88
92
  created_at: string;
89
93
  config: DeployConfig | undefined;
94
+ config_state_hash: string;
90
95
  deployment: Deployment | undefined;
91
96
  }
92
97
 
93
98
  export interface Deployment {
94
99
  deployment_id: string;
95
100
  instance_id: string;
96
- status: Status;
101
+ status: DeploymentStatus;
97
102
  error?: string | undefined;
98
103
  created_at: string;
99
104
  started_at?: string | undefined;
100
105
  finished_at?: string | undefined;
101
106
  config: DeployConfig | undefined;
107
+ config_state_hash: string;
102
108
  blockscout_url?: string | undefined;
103
109
  total_cost: string;
104
110
  health_status: HealthStatus | undefined;
@@ -175,6 +181,7 @@ export interface CreateAuthTokenRequest {
175
181
  }
176
182
 
177
183
  export interface Autoscout {
184
+ GetConfigSchema(request: GetConfigSchemaRequest): Promise<ConfigSchema>;
178
185
  /** Creating blockscout instance with config */
179
186
  CreateInstance(request: CreateInstanceRequest): Promise<CreateInstanceResponse>;
180
187
  /** Update configuration of blockscout instance */
@@ -1,8 +1,23 @@
1
+ export declare enum ChainType {
2
+ UNSPECIFIED_CHAIN_TYPE = "UNSPECIFIED_CHAIN_TYPE",
3
+ ARBITRUM = "ARBITRUM",
4
+ OPTIMISM = "OPTIMISM",
5
+ UNRECOGNIZED = "UNRECOGNIZED"
6
+ }
7
+ export declare enum NodeType {
8
+ UNSPECIFIED_NODE_TYPE = "UNSPECIFIED_NODE_TYPE",
9
+ PARITY = "PARITY",
10
+ ERIGON = "ERIGON",
11
+ GETH = "GETH",
12
+ BESU = "BESU",
13
+ GANACHE = "GANACHE",
14
+ UNRECOGNIZED = "UNRECOGNIZED"
15
+ }
1
16
  export interface DeployConfig {
2
17
  rpc_url: string;
3
18
  server_size: string;
4
- chain_type?: string | undefined;
5
- node_type?: string | undefined;
19
+ chain_type: ChainType;
20
+ node_type: NodeType;
6
21
  chain_id?: string | undefined;
7
22
  token_symbol?: string | undefined;
8
23
  instance_url?: string | undefined;
@@ -22,8 +37,8 @@ export interface DeployConfig {
22
37
  export interface DeployConfigPartial {
23
38
  rpc_url?: string | undefined;
24
39
  server_size?: string | undefined;
25
- chain_type?: string | undefined;
26
- node_type?: string | undefined;
40
+ chain_type: ChainType;
41
+ node_type: NodeType;
27
42
  chain_id?: string | undefined;
28
43
  token_symbol?: string | undefined;
29
44
  instance_url?: string | undefined;
@@ -51,15 +66,15 @@ export interface OptimismConfig {
51
66
  /** changes blockscout env INDEXER_OPTIMISM_L1_BATCH_CELESTIA_BLOBS_API_URL */
52
67
  l1_batch_celestia_blobs_api_url?: string | undefined;
53
68
  /** changes blockscout env INDEXER_OPTIMISM_L1_BATCH_BLOCKS_CHUNK_SIZE */
54
- l1_batch_blocks_chunk_size?: number | undefined;
69
+ l1_batch_blocks_chunk_size?: string | undefined;
55
70
  /** changes blockscout env INDEXER_OPTIMISM_L2_BATCH_GENESIS_BLOCK_NUMBER */
56
- l2_batch_genesis_block_number?: number | undefined;
71
+ l2_batch_genesis_block_number?: string | undefined;
57
72
  /** changes blockscout env INDEXER_OPTIMISM_L1_OUTPUT_ORACLE_CONTRACT */
58
73
  l1_output_oracle_contract?: string | undefined;
59
74
  /** changes blockscout env INDEXER_OPTIMISM_L1_DEPOSITS_BATCH_SIZE */
60
- l1_deposits_batch_size?: number | undefined;
75
+ l1_deposits_batch_size?: string | undefined;
61
76
  /** changes blockscout env INDEXER_OPTIMISM_L2_WITHDRAWALS_START_BLOCK */
62
- l2_withdrawals_start_block?: number | undefined;
77
+ l2_withdrawals_start_block?: string | undefined;
63
78
  /** changes blockscout env INDEXER_OPTIMISM_L2_MESSAGE_PASSER_CONTRACT */
64
79
  l2_message_passer_contract?: string | undefined;
65
80
  }
@@ -68,22 +83,22 @@ export interface ArbitrumConfig {
68
83
  arbsys_contract?: string | undefined;
69
84
  node_interface_contract?: string | undefined;
70
85
  l1_rpc_url?: string | undefined;
71
- l1_rpc_chunk_size?: number | undefined;
72
- l1_rpc_historical_blocks_range?: number | undefined;
86
+ l1_rpc_chunk_size?: string | undefined;
87
+ l1_rpc_historical_blocks_range?: string | undefined;
73
88
  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;
89
+ l1_rollup_init_block?: string | undefined;
90
+ l1_common_start_block?: string | undefined;
91
+ l1_finalization_threshold?: string | undefined;
92
+ rollup_chunk_size?: string | undefined;
78
93
  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;
94
+ missed_messages_recheck_interval?: string | undefined;
95
+ missed_messages_blocks_depth?: string | undefined;
96
+ tracking_messages_on_l1_recheck_interval?: string | undefined;
82
97
  batches_tracking_enabled?: boolean | undefined;
83
- batches_tracking_recheck_interval?: number | undefined;
98
+ batches_tracking_recheck_interval?: string | undefined;
84
99
  batches_tracking_l1_finalization_check_enabled?: boolean | undefined;
85
- batches_tracking_messages_to_blocks_shift?: number | undefined;
86
- missing_batches_range?: number | undefined;
100
+ batches_tracking_messages_to_blocks_shift?: string | undefined;
101
+ missing_batches_range?: string | undefined;
87
102
  confirmations_tracking_finalized?: boolean | undefined;
88
- new_batches_limit?: number | undefined;
103
+ new_batches_limit?: string | undefined;
89
104
  }
package/dist/v1/config.js CHANGED
@@ -5,3 +5,22 @@
5
5
  // protoc v5.27.0
6
6
  // source: v1/config.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.NodeType = exports.ChainType = void 0;
9
+ /* eslint-disable */
10
+ var ChainType;
11
+ (function (ChainType) {
12
+ ChainType["UNSPECIFIED_CHAIN_TYPE"] = "UNSPECIFIED_CHAIN_TYPE";
13
+ ChainType["ARBITRUM"] = "ARBITRUM";
14
+ ChainType["OPTIMISM"] = "OPTIMISM";
15
+ ChainType["UNRECOGNIZED"] = "UNRECOGNIZED";
16
+ })(ChainType || (exports.ChainType = ChainType = {}));
17
+ var NodeType;
18
+ (function (NodeType) {
19
+ NodeType["UNSPECIFIED_NODE_TYPE"] = "UNSPECIFIED_NODE_TYPE";
20
+ NodeType["PARITY"] = "PARITY";
21
+ NodeType["ERIGON"] = "ERIGON";
22
+ NodeType["GETH"] = "GETH";
23
+ NodeType["BESU"] = "BESU";
24
+ NodeType["GANACHE"] = "GANACHE";
25
+ NodeType["UNRECOGNIZED"] = "UNRECOGNIZED";
26
+ })(NodeType || (exports.NodeType = NodeType = {}));
package/dist/v1/config.ts CHANGED
@@ -6,11 +6,28 @@
6
6
 
7
7
  /* eslint-disable */
8
8
 
9
+ export enum ChainType {
10
+ UNSPECIFIED_CHAIN_TYPE = "UNSPECIFIED_CHAIN_TYPE",
11
+ ARBITRUM = "ARBITRUM",
12
+ OPTIMISM = "OPTIMISM",
13
+ UNRECOGNIZED = "UNRECOGNIZED",
14
+ }
15
+
16
+ export enum NodeType {
17
+ UNSPECIFIED_NODE_TYPE = "UNSPECIFIED_NODE_TYPE",
18
+ PARITY = "PARITY",
19
+ ERIGON = "ERIGON",
20
+ GETH = "GETH",
21
+ BESU = "BESU",
22
+ GANACHE = "GANACHE",
23
+ UNRECOGNIZED = "UNRECOGNIZED",
24
+ }
25
+
9
26
  export interface DeployConfig {
10
27
  rpc_url: string;
11
28
  server_size: string;
12
- chain_type?: string | undefined;
13
- node_type?: string | undefined;
29
+ chain_type: ChainType;
30
+ node_type: NodeType;
14
31
  chain_id?: string | undefined;
15
32
  token_symbol?: string | undefined;
16
33
  instance_url?: string | undefined;
@@ -31,8 +48,8 @@ export interface DeployConfig {
31
48
  export interface DeployConfigPartial {
32
49
  rpc_url?: string | undefined;
33
50
  server_size?: string | undefined;
34
- chain_type?: string | undefined;
35
- node_type?: string | undefined;
51
+ chain_type: ChainType;
52
+ node_type: NodeType;
36
53
  chain_id?: string | undefined;
37
54
  token_symbol?: string | undefined;
38
55
  instance_url?: string | undefined;
@@ -70,11 +87,11 @@ export interface OptimismConfig {
70
87
  | undefined;
71
88
  /** changes blockscout env INDEXER_OPTIMISM_L1_BATCH_BLOCKS_CHUNK_SIZE */
72
89
  l1_batch_blocks_chunk_size?:
73
- | number
90
+ | string
74
91
  | undefined;
75
92
  /** changes blockscout env INDEXER_OPTIMISM_L2_BATCH_GENESIS_BLOCK_NUMBER */
76
93
  l2_batch_genesis_block_number?:
77
- | number
94
+ | string
78
95
  | undefined;
79
96
  /** changes blockscout env INDEXER_OPTIMISM_L1_OUTPUT_ORACLE_CONTRACT */
80
97
  l1_output_oracle_contract?:
@@ -82,11 +99,11 @@ export interface OptimismConfig {
82
99
  | undefined;
83
100
  /** changes blockscout env INDEXER_OPTIMISM_L1_DEPOSITS_BATCH_SIZE */
84
101
  l1_deposits_batch_size?:
85
- | number
102
+ | string
86
103
  | undefined;
87
104
  /** changes blockscout env INDEXER_OPTIMISM_L2_WITHDRAWALS_START_BLOCK */
88
105
  l2_withdrawals_start_block?:
89
- | number
106
+ | string
90
107
  | undefined;
91
108
  /** changes blockscout env INDEXER_OPTIMISM_L2_MESSAGE_PASSER_CONTRACT */
92
109
  l2_message_passer_contract?: string | undefined;
@@ -97,22 +114,22 @@ export interface ArbitrumConfig {
97
114
  arbsys_contract?: string | undefined;
98
115
  node_interface_contract?: string | undefined;
99
116
  l1_rpc_url?: string | undefined;
100
- l1_rpc_chunk_size?: number | undefined;
101
- l1_rpc_historical_blocks_range?: number | undefined;
117
+ l1_rpc_chunk_size?: string | undefined;
118
+ l1_rpc_historical_blocks_range?: string | undefined;
102
119
  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;
120
+ l1_rollup_init_block?: string | undefined;
121
+ l1_common_start_block?: string | undefined;
122
+ l1_finalization_threshold?: string | undefined;
123
+ rollup_chunk_size?: string | undefined;
107
124
  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;
125
+ missed_messages_recheck_interval?: string | undefined;
126
+ missed_messages_blocks_depth?: string | undefined;
127
+ tracking_messages_on_l1_recheck_interval?: string | undefined;
111
128
  batches_tracking_enabled?: boolean | undefined;
112
- batches_tracking_recheck_interval?: number | undefined;
129
+ batches_tracking_recheck_interval?: string | undefined;
113
130
  batches_tracking_l1_finalization_check_enabled?: boolean | undefined;
114
- batches_tracking_messages_to_blocks_shift?: number | undefined;
115
- missing_batches_range?: number | undefined;
131
+ batches_tracking_messages_to_blocks_shift?: string | undefined;
132
+ missing_batches_range?: string | undefined;
116
133
  confirmations_tracking_finalized?: boolean | undefined;
117
- new_batches_limit?: number | undefined;
134
+ new_batches_limit?: string | undefined;
118
135
  }
@@ -0,0 +1,24 @@
1
+ export interface ConfigSchema {
2
+ type: string;
3
+ properties: ConfigPropertiesSchema | undefined;
4
+ }
5
+ export interface ConfigPropertiesSchema {
6
+ server_size: ServerSizeSchema | undefined;
7
+ }
8
+ export interface ServerSizeSchema {
9
+ type: string;
10
+ enum: string[];
11
+ description: string;
12
+ details: {
13
+ [key: string]: ServerSizeSchemaDetails;
14
+ };
15
+ }
16
+ export interface ServerSizeSchema_DetailsEntry {
17
+ key: string;
18
+ value: ServerSizeSchemaDetails | undefined;
19
+ }
20
+ export interface ServerSizeSchemaDetails {
21
+ cost_per_hour: string;
22
+ cpu: string;
23
+ memory: string;
24
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v1.176.2
5
+ // protoc v5.27.0
6
+ // source: v1/config_schema.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,34 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v1.176.2
4
+ // protoc v5.27.0
5
+ // source: v1/config_schema.proto
6
+
7
+ /* eslint-disable */
8
+
9
+ export interface ConfigSchema {
10
+ type: string;
11
+ properties: ConfigPropertiesSchema | undefined;
12
+ }
13
+
14
+ export interface ConfigPropertiesSchema {
15
+ server_size: ServerSizeSchema | undefined;
16
+ }
17
+
18
+ export interface ServerSizeSchema {
19
+ type: string;
20
+ enum: string[];
21
+ description: string;
22
+ details: { [key: string]: ServerSizeSchemaDetails };
23
+ }
24
+
25
+ export interface ServerSizeSchema_DetailsEntry {
26
+ key: string;
27
+ value: ServerSizeSchemaDetails | undefined;
28
+ }
29
+
30
+ export interface ServerSizeSchemaDetails {
31
+ cost_per_hour: string;
32
+ cpu: string;
33
+ memory: string;
34
+ }
package/index.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './dist/v1/autoscout';
2
- export * from './dist/v1/config';
2
+ export * from './dist/v1/config';
3
+ export * from './dist/v1/config_schema';
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@blockscout/autoscout-types",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
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 --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",
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 ../autoscout-proto/proto/v1/config_schema.proto",
10
10
  "compile:ts": "tsc --declaration ./index.ts"
11
11
  },
12
12
  "repository": {