@blockscout/autoscout-types 0.0.4 → 0.0.6

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,4 +1,5 @@
1
1
  import { type DeployConfig, type DeployConfigPartial } from "./config";
2
+ import { type ConfigSchema } from "./config_schema";
2
3
  export declare enum DeploymentStatus {
3
4
  NO_STATUS = "NO_STATUS",
4
5
  CREATED = "CREATED",
@@ -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 */
@@ -68,6 +71,7 @@ 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 {
@@ -79,6 +83,7 @@ export interface Deployment {
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 */
@@ -2,7 +2,7 @@
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
4
  // protoc-gen-ts_proto v1.176.2
5
- // protoc v5.27.0
5
+ // protoc v4.23.4
6
6
  // source: v1/autoscout.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.UpdateInstanceAction = exports.DeploymentStatus = void 0;
@@ -1,11 +1,12 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v1.176.2
4
- // protoc v5.27.0
4
+ // protoc v4.23.4
5
5
  // source: v1/autoscout.proto
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
11
  export enum DeploymentStatus {
11
12
  NO_STATUS = "NO_STATUS",
@@ -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 */
@@ -87,6 +91,7 @@ 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
 
@@ -99,6 +104,7 @@ export interface Deployment {
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;
package/dist/v1/config.js CHANGED
@@ -2,6 +2,25 @@
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
4
  // protoc-gen-ts_proto v1.176.2
5
- // protoc v5.27.0
5
+ // protoc v4.23.4
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
@@ -1,16 +1,33 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v1.176.2
4
- // protoc v5.27.0
4
+ // protoc v4.23.4
5
5
  // source: v1/config.proto
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;
@@ -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 v4.23.4
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 v4.23.4
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.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './dist/v1/autoscout';
2
2
  export * from './dist/v1/config';
3
+ export * from './dist/v1/config_schema';
package/index.js CHANGED
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./dist/v1/autoscout"), exports);
18
18
  __exportStar(require("./dist/v1/config"), exports);
19
+ __exportStar(require("./dist/v1/config_schema"), exports);
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.4",
3
+ "version": "0.0.6",
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": {