@blockscout/autoscout-types 1.10.0 → 1.11.0-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.
@@ -30,7 +30,8 @@ export declare enum DepositType {
30
30
  STRIPE = "DEPOSIT_TYPE_STRIPE",
31
31
  COINBASE = "DEPOSIT_TYPE_COINBASE",
32
32
  DAIMO = "DEPOSIT_TYPE_DAIMO",
33
- PROMOTION_FLAT_BONUS = "DEPOSIT_TYPE_PROMOTION_FLAT_BONUS"
33
+ PROMOTION_FLAT_BONUS = "DEPOSIT_TYPE_PROMOTION_FLAT_BONUS",
34
+ REQUEST_NETWORK = "DEPOSIT_TYPE_REQUEST_NETWORK"
34
35
  }
35
36
  export declare enum PluginVariant {
36
37
  UNSPECIFIED_PLUGIN_VARIANT = "UNSPECIFIED_PLUGIN_VARIANT",
@@ -47,6 +48,18 @@ export declare enum PluginEventType {
47
48
  STATUS_CHANGE = "PLUGIN_EVENT_TYPE_STATUS_CHANGE",
48
49
  HEALTH_CHANGE = "PLUGIN_EVENT_TYPE_HEALTH_CHANGE"
49
50
  }
51
+ export declare enum BillingProviderType {
52
+ UNSPECIFIED_BILLING_PROVIDER_TYPE = "UNSPECIFIED_BILLING_PROVIDER_TYPE",
53
+ STRIPE = "BILLING_PROVIDER_TYPE_STRIPE",
54
+ DAIMO = "BILLING_PROVIDER_TYPE_DAIMO"
55
+ }
56
+ export declare enum BillingSubscriptionStatus {
57
+ UNSPECIFIED_BILLING_SUBSCRIPTION_STATUS = "UNSPECIFIED_BILLING_SUBSCRIPTION_STATUS",
58
+ ACTIVE = "BILLING_SUBSCRIPTION_STATUS_ACTIVE",
59
+ PAUSED = "BILLING_SUBSCRIPTION_STATUS_PAUSED",
60
+ CANCELED = "BILLING_SUBSCRIPTION_STATUS_CANCELED",
61
+ UNCONFIRMED = "BILLING_SUBSCRIPTION_STATUS_UNCONFIRMED"
62
+ }
50
63
  export interface HealthStatus {
51
64
  ok: boolean;
52
65
  last_check: string;
@@ -368,6 +381,60 @@ export interface ListPluginLogsResponse {
368
381
  }
369
382
  export interface GetProfileRequest {
370
383
  }
384
+ export interface GetBillingRequest {
385
+ }
386
+ export interface PayAsYouGoEstimation {
387
+ amount_usd: string;
388
+ period_start?: string | undefined;
389
+ period_seconds_passed?: string | undefined;
390
+ period_end?: string | undefined;
391
+ period_seconds_remaining?: string | undefined;
392
+ estimated_amount_usd_for_remaining_period: string;
393
+ total_estimated_amount_usd_full_period: string;
394
+ }
395
+ export interface PayAsYouGoInfo {
396
+ enabled: boolean;
397
+ estimation: PayAsYouGoEstimation | undefined;
398
+ provider_type: BillingProviderType;
399
+ status: BillingSubscriptionStatus;
400
+ customer_portal_url?: string | undefined;
401
+ }
402
+ export interface BillingDeploymentStatus {
403
+ status: DeploymentStatus;
404
+ }
405
+ export interface BillingPluginPrice {
406
+ plugin_type: PluginVariant;
407
+ base_price_per_month_usd: string;
408
+ }
409
+ export interface BillingStorageEstimation {
410
+ current_overage_mb: string;
411
+ cost_per_gb_hour_usd: string;
412
+ per_month_if_usage_same_usd: string;
413
+ }
414
+ export interface BillingPriceEstimation {
415
+ total_per_month_usd: string;
416
+ base_per_month_usd: string;
417
+ plugins: BillingPluginPrice[];
418
+ storage: BillingStorageEstimation | undefined;
419
+ }
420
+ export interface BillingInstanceItem {
421
+ name: string;
422
+ instance_id: string;
423
+ deployment: BillingDeploymentStatus | undefined;
424
+ price_estimation: BillingPriceEstimation | undefined;
425
+ }
426
+ export interface BillingInstancesPrice {
427
+ total_items: number;
428
+ total_price_per_month: string;
429
+ items: BillingInstanceItem[];
430
+ }
431
+ export interface GetBillingResponse {
432
+ pay_as_you_go: PayAsYouGoInfo | undefined;
433
+ balance_reaches_zero_in_seconds?: string | undefined;
434
+ estimated_amount_usd_per_second?: string | undefined;
435
+ estimated_total_amount_usd_per_month?: string | undefined;
436
+ instances_price: BillingInstancesPrice | undefined;
437
+ }
371
438
  export interface ListAuthTokensRequest {
372
439
  page?: number | undefined;
373
440
  per_page?: number | undefined;
@@ -485,6 +552,9 @@ export interface GetStripeSubscriptionStatusRequest {
485
552
  }
486
553
  export interface GetStripeSubscriptionStatusResponse {
487
554
  is_active: boolean;
555
+ current_period_end?: string | undefined;
556
+ cancels_at?: string | undefined;
557
+ current_period_start?: string | undefined;
488
558
  }
489
559
  export interface GetStripeCustomerPortalRequest {
490
560
  }
@@ -547,6 +617,8 @@ export interface Autoscout {
547
617
  RegisterProfile(request: RegisterProfileRequest): Promise<RegisterProfileResponse>;
548
618
  /** Get information about current account */
549
619
  GetProfile(request: GetProfileRequest): Promise<UserProfile>;
620
+ /** Get current billing status for the authenticated user */
621
+ GetBilling(request: GetBillingRequest): Promise<GetBillingResponse>;
550
622
  /** Generate auth api token for current account */
551
623
  CreateAuthToken(request: CreateAuthTokenRequest): Promise<AuthToken>;
552
624
  /** Get list of all auth tokens for current account */
@@ -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.PluginEventType = exports.PluginStatus = exports.PluginVariant = exports.DepositType = exports.DepositStatus = exports.UpdateInstanceAction = exports.DeploymentStatus = void 0;
8
+ exports.BillingSubscriptionStatus = exports.BillingProviderType = 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";
@@ -41,6 +41,7 @@ var DepositType;
41
41
  DepositType["COINBASE"] = "DEPOSIT_TYPE_COINBASE";
42
42
  DepositType["DAIMO"] = "DEPOSIT_TYPE_DAIMO";
43
43
  DepositType["PROMOTION_FLAT_BONUS"] = "DEPOSIT_TYPE_PROMOTION_FLAT_BONUS";
44
+ DepositType["REQUEST_NETWORK"] = "DEPOSIT_TYPE_REQUEST_NETWORK";
44
45
  })(DepositType || (exports.DepositType = DepositType = {}));
45
46
  var PluginVariant;
46
47
  (function (PluginVariant) {
@@ -60,3 +61,17 @@ var PluginEventType;
60
61
  PluginEventType["STATUS_CHANGE"] = "PLUGIN_EVENT_TYPE_STATUS_CHANGE";
61
62
  PluginEventType["HEALTH_CHANGE"] = "PLUGIN_EVENT_TYPE_HEALTH_CHANGE";
62
63
  })(PluginEventType || (exports.PluginEventType = PluginEventType = {}));
64
+ var BillingProviderType;
65
+ (function (BillingProviderType) {
66
+ BillingProviderType["UNSPECIFIED_BILLING_PROVIDER_TYPE"] = "UNSPECIFIED_BILLING_PROVIDER_TYPE";
67
+ BillingProviderType["STRIPE"] = "BILLING_PROVIDER_TYPE_STRIPE";
68
+ BillingProviderType["DAIMO"] = "BILLING_PROVIDER_TYPE_DAIMO";
69
+ })(BillingProviderType || (exports.BillingProviderType = BillingProviderType = {}));
70
+ var BillingSubscriptionStatus;
71
+ (function (BillingSubscriptionStatus) {
72
+ BillingSubscriptionStatus["UNSPECIFIED_BILLING_SUBSCRIPTION_STATUS"] = "UNSPECIFIED_BILLING_SUBSCRIPTION_STATUS";
73
+ BillingSubscriptionStatus["ACTIVE"] = "BILLING_SUBSCRIPTION_STATUS_ACTIVE";
74
+ BillingSubscriptionStatus["PAUSED"] = "BILLING_SUBSCRIPTION_STATUS_PAUSED";
75
+ BillingSubscriptionStatus["CANCELED"] = "BILLING_SUBSCRIPTION_STATUS_CANCELED";
76
+ BillingSubscriptionStatus["UNCONFIRMED"] = "BILLING_SUBSCRIPTION_STATUS_UNCONFIRMED";
77
+ })(BillingSubscriptionStatus || (exports.BillingSubscriptionStatus = BillingSubscriptionStatus = {}));
@@ -42,6 +42,7 @@ export enum DepositType {
42
42
  COINBASE = "DEPOSIT_TYPE_COINBASE",
43
43
  DAIMO = "DEPOSIT_TYPE_DAIMO",
44
44
  PROMOTION_FLAT_BONUS = "DEPOSIT_TYPE_PROMOTION_FLAT_BONUS",
45
+ REQUEST_NETWORK = "DEPOSIT_TYPE_REQUEST_NETWORK",
45
46
  }
46
47
 
47
48
  export enum PluginVariant {
@@ -62,6 +63,20 @@ export enum PluginEventType {
62
63
  HEALTH_CHANGE = "PLUGIN_EVENT_TYPE_HEALTH_CHANGE",
63
64
  }
64
65
 
66
+ export enum BillingProviderType {
67
+ UNSPECIFIED_BILLING_PROVIDER_TYPE = "UNSPECIFIED_BILLING_PROVIDER_TYPE",
68
+ STRIPE = "BILLING_PROVIDER_TYPE_STRIPE",
69
+ DAIMO = "BILLING_PROVIDER_TYPE_DAIMO",
70
+ }
71
+
72
+ export enum BillingSubscriptionStatus {
73
+ UNSPECIFIED_BILLING_SUBSCRIPTION_STATUS = "UNSPECIFIED_BILLING_SUBSCRIPTION_STATUS",
74
+ ACTIVE = "BILLING_SUBSCRIPTION_STATUS_ACTIVE",
75
+ PAUSED = "BILLING_SUBSCRIPTION_STATUS_PAUSED",
76
+ CANCELED = "BILLING_SUBSCRIPTION_STATUS_CANCELED",
77
+ UNCONFIRMED = "BILLING_SUBSCRIPTION_STATUS_UNCONFIRMED",
78
+ }
79
+
65
80
  export interface HealthStatus {
66
81
  ok: boolean;
67
82
  last_check: string;
@@ -433,6 +448,70 @@ export interface ListPluginLogsResponse {
433
448
  export interface GetProfileRequest {
434
449
  }
435
450
 
451
+ export interface GetBillingRequest {
452
+ }
453
+
454
+ export interface PayAsYouGoEstimation {
455
+ amount_usd: string;
456
+ period_start?: string | undefined;
457
+ period_seconds_passed?: string | undefined;
458
+ period_end?: string | undefined;
459
+ period_seconds_remaining?: string | undefined;
460
+ estimated_amount_usd_for_remaining_period: string;
461
+ total_estimated_amount_usd_full_period: string;
462
+ }
463
+
464
+ export interface PayAsYouGoInfo {
465
+ enabled: boolean;
466
+ estimation: PayAsYouGoEstimation | undefined;
467
+ provider_type: BillingProviderType;
468
+ status: BillingSubscriptionStatus;
469
+ customer_portal_url?: string | undefined;
470
+ }
471
+
472
+ export interface BillingDeploymentStatus {
473
+ status: DeploymentStatus;
474
+ }
475
+
476
+ export interface BillingPluginPrice {
477
+ plugin_type: PluginVariant;
478
+ base_price_per_month_usd: string;
479
+ }
480
+
481
+ export interface BillingStorageEstimation {
482
+ current_overage_mb: string;
483
+ cost_per_gb_hour_usd: string;
484
+ per_month_if_usage_same_usd: string;
485
+ }
486
+
487
+ export interface BillingPriceEstimation {
488
+ total_per_month_usd: string;
489
+ base_per_month_usd: string;
490
+ plugins: BillingPluginPrice[];
491
+ storage: BillingStorageEstimation | undefined;
492
+ }
493
+
494
+ export interface BillingInstanceItem {
495
+ name: string;
496
+ instance_id: string;
497
+ deployment: BillingDeploymentStatus | undefined;
498
+ price_estimation: BillingPriceEstimation | undefined;
499
+ }
500
+
501
+ export interface BillingInstancesPrice {
502
+ total_items: number;
503
+ total_price_per_month: string;
504
+ items: BillingInstanceItem[];
505
+ }
506
+
507
+ export interface GetBillingResponse {
508
+ pay_as_you_go: PayAsYouGoInfo | undefined;
509
+ balance_reaches_zero_in_seconds?: string | undefined;
510
+ estimated_amount_usd_per_second?: string | undefined;
511
+ estimated_total_amount_usd_per_month?: string | undefined;
512
+ instances_price: BillingInstancesPrice | undefined;
513
+ }
514
+
436
515
  export interface ListAuthTokensRequest {
437
516
  page?: number | undefined;
438
517
  per_page?: number | undefined;
@@ -582,6 +661,9 @@ export interface GetStripeSubscriptionStatusRequest {
582
661
 
583
662
  export interface GetStripeSubscriptionStatusResponse {
584
663
  is_active: boolean;
664
+ current_period_end?: string | undefined;
665
+ cancels_at?: string | undefined;
666
+ current_period_start?: string | undefined;
585
667
  }
586
668
 
587
669
  export interface GetStripeCustomerPortalRequest {
@@ -651,6 +733,8 @@ export interface Autoscout {
651
733
  RegisterProfile(request: RegisterProfileRequest): Promise<RegisterProfileResponse>;
652
734
  /** Get information about current account */
653
735
  GetProfile(request: GetProfileRequest): Promise<UserProfile>;
736
+ /** Get current billing status for the authenticated user */
737
+ GetBilling(request: GetBillingRequest): Promise<GetBillingResponse>;
654
738
  /** Generate auth api token for current account */
655
739
  CreateAuthToken(request: CreateAuthTokenRequest): Promise<AuthToken>;
656
740
  /** Get list of all auth tokens for current account */
@@ -106,6 +106,16 @@ export interface DeployConfig {
106
106
  user_ops_plugin_config?: UserOpsPluginConfig | undefined;
107
107
  monitoring?: MonitoringConfig | undefined;
108
108
  versions_stack?: string | undefined;
109
+ parent_chain?: ParentChainConfig | undefined;
110
+ rpc_user?: string | undefined;
111
+ rpc_password?: string | undefined;
112
+ eip_1559_base_fee_max_change_denominator?: string | undefined;
113
+ basic_auth?: BasicAuthConfig | undefined;
114
+ }
115
+ export interface BasicAuthConfig {
116
+ enabled?: boolean | undefined;
117
+ username?: string | undefined;
118
+ password?: string | undefined;
109
119
  }
110
120
  export interface Footer {
111
121
  columns: FooterColumn[];
@@ -142,6 +152,20 @@ export interface MenuItem {
142
152
  export interface StringList {
143
153
  values: string[];
144
154
  }
155
+ export interface ParentChainCurrency {
156
+ name?: string | undefined;
157
+ symbol?: string | undefined;
158
+ decimals?: string | undefined;
159
+ }
160
+ export interface ParentChainConfig {
161
+ id?: string | undefined;
162
+ name?: string | undefined;
163
+ /** Required: parent chain blockscout explorer URL */
164
+ base_url: string;
165
+ rpc_urls: string[];
166
+ currency?: ParentChainCurrency | undefined;
167
+ is_testnet?: boolean | undefined;
168
+ }
145
169
  export interface HeroBanner {
146
170
  background: string[];
147
171
  text_color: string[];
@@ -209,14 +233,32 @@ export interface OptimismConfig {
209
233
  l2_withdrawals_start_block?: string | undefined;
210
234
  /** changes blockscout env INDEXER_OPTIMISM_L2_MESSAGE_PASSER_CONTRACT */
211
235
  l2_message_passer_contract?: string | undefined;
212
- /** NEXT_PUBLIC_ROLLUP_L1_BASE_URL */
213
- l1_blockscout_url: string;
236
+ /** Deprecated: use parent_chain.base_url instead */
237
+ l1_blockscout_url?: string | undefined;
214
238
  /** NEXT_PUBLIC_ROLLUP_L2_WITHDRAWAL_URL */
215
239
  l2_withdrawal_url: string;
216
240
  /** NEXT_PUBLIC_FAULT_PROOF_ENABLED */
217
241
  l2_fault_proof_enabled?: boolean | undefined;
218
242
  /** NEXT_PUBLIC_HAS_MUD_FRAMEWORK */
219
243
  has_mud_framework?: boolean | undefined;
244
+ /** NEXT_PUBLIC_FLASHBLOCKS_SOCKET_URL */
245
+ flashblocks_socket_url?: string | undefined;
246
+ /** INDEXER_OPTIMISM_BLOCK_DURATION */
247
+ block_duration?: string | undefined;
248
+ /** INDEXER_OPTIMISM_L1_DEPOSITS_TRANSACTION_TYPE */
249
+ l1_deposits_transaction_type?: string | undefined;
250
+ /** INDEXER_OPTIMISM_L1_ETH_GET_LOGS_RANGE_SIZE */
251
+ l1_eth_get_logs_range_size?: string | undefined;
252
+ /** INDEXER_OPTIMISM_L2_ETH_GET_LOGS_RANGE_SIZE */
253
+ l2_eth_get_logs_range_size?: string | undefined;
254
+ /** INDEXER_OPTIMISM_L2_HOLOCENE_TIMESTAMP */
255
+ l2_holocene_timestamp?: string | undefined;
256
+ /** INDEXER_OPTIMISM_L2_ISTHMUS_TIMESTAMP */
257
+ l2_isthmus_timestamp?: string | undefined;
258
+ /** INDEXER_OPTIMISM_L2_JOVIAN_TIMESTAMP */
259
+ l2_jovian_timestamp?: string | undefined;
260
+ /** INDEXER_OPTIMISM_L1_BATCH_ALT_DA_SERVER_URL */
261
+ l1_batch_alt_da_server_url?: string | undefined;
220
262
  beacon_rpc_url?: string | undefined;
221
263
  beacon_blob_fetcher_reference_slot?: string | undefined;
222
264
  beacon_blob_fetcher_slot_duration?: string | undefined;
package/dist/v1/config.ts CHANGED
@@ -125,6 +125,17 @@ export interface DeployConfig {
125
125
  user_ops_plugin_config?: UserOpsPluginConfig | undefined;
126
126
  monitoring?: MonitoringConfig | undefined;
127
127
  versions_stack?: string | undefined;
128
+ parent_chain?: ParentChainConfig | undefined;
129
+ rpc_user?: string | undefined;
130
+ rpc_password?: string | undefined;
131
+ eip_1559_base_fee_max_change_denominator?: string | undefined;
132
+ basic_auth?: BasicAuthConfig | undefined;
133
+ }
134
+
135
+ export interface BasicAuthConfig {
136
+ enabled?: boolean | undefined;
137
+ username?: string | undefined;
138
+ password?: string | undefined;
128
139
  }
129
140
 
130
141
  export interface Footer {
@@ -171,6 +182,24 @@ export interface StringList {
171
182
  values: string[];
172
183
  }
173
184
 
185
+ export interface ParentChainCurrency {
186
+ name?: string | undefined;
187
+ symbol?: string | undefined;
188
+ decimals?: string | undefined;
189
+ }
190
+
191
+ export interface ParentChainConfig {
192
+ id?: string | undefined;
193
+ name?:
194
+ | string
195
+ | undefined;
196
+ /** Required: parent chain blockscout explorer URL */
197
+ base_url: string;
198
+ rpc_urls: string[];
199
+ currency?: ParentChainCurrency | undefined;
200
+ is_testnet?: boolean | undefined;
201
+ }
202
+
174
203
  export interface HeroBanner {
175
204
  background: string[];
176
205
  text_color: string[];
@@ -285,8 +314,10 @@ export interface OptimismConfig {
285
314
  l2_message_passer_contract?:
286
315
  | string
287
316
  | undefined;
288
- /** NEXT_PUBLIC_ROLLUP_L1_BASE_URL */
289
- l1_blockscout_url: string;
317
+ /** Deprecated: use parent_chain.base_url instead */
318
+ l1_blockscout_url?:
319
+ | string
320
+ | undefined;
290
321
  /** NEXT_PUBLIC_ROLLUP_L2_WITHDRAWAL_URL */
291
322
  l2_withdrawal_url: string;
292
323
  /** NEXT_PUBLIC_FAULT_PROOF_ENABLED */
@@ -294,7 +325,43 @@ export interface OptimismConfig {
294
325
  | boolean
295
326
  | undefined;
296
327
  /** NEXT_PUBLIC_HAS_MUD_FRAMEWORK */
297
- has_mud_framework?: boolean | undefined;
328
+ has_mud_framework?:
329
+ | boolean
330
+ | undefined;
331
+ /** NEXT_PUBLIC_FLASHBLOCKS_SOCKET_URL */
332
+ flashblocks_socket_url?:
333
+ | string
334
+ | undefined;
335
+ /** INDEXER_OPTIMISM_BLOCK_DURATION */
336
+ block_duration?:
337
+ | string
338
+ | undefined;
339
+ /** INDEXER_OPTIMISM_L1_DEPOSITS_TRANSACTION_TYPE */
340
+ l1_deposits_transaction_type?:
341
+ | string
342
+ | undefined;
343
+ /** INDEXER_OPTIMISM_L1_ETH_GET_LOGS_RANGE_SIZE */
344
+ l1_eth_get_logs_range_size?:
345
+ | string
346
+ | undefined;
347
+ /** INDEXER_OPTIMISM_L2_ETH_GET_LOGS_RANGE_SIZE */
348
+ l2_eth_get_logs_range_size?:
349
+ | string
350
+ | undefined;
351
+ /** INDEXER_OPTIMISM_L2_HOLOCENE_TIMESTAMP */
352
+ l2_holocene_timestamp?:
353
+ | string
354
+ | undefined;
355
+ /** INDEXER_OPTIMISM_L2_ISTHMUS_TIMESTAMP */
356
+ l2_isthmus_timestamp?:
357
+ | string
358
+ | undefined;
359
+ /** INDEXER_OPTIMISM_L2_JOVIAN_TIMESTAMP */
360
+ l2_jovian_timestamp?:
361
+ | string
362
+ | undefined;
363
+ /** INDEXER_OPTIMISM_L1_BATCH_ALT_DA_SERVER_URL */
364
+ l1_batch_alt_da_server_url?: string | undefined;
298
365
  beacon_rpc_url?: string | undefined;
299
366
  beacon_blob_fetcher_reference_slot?: string | undefined;
300
367
  beacon_blob_fetcher_slot_duration?: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockscout/autoscout-types",
3
- "version": "1.10.0",
3
+ "version": "1.11.0-alpha",
4
4
  "description": "TypeScript definitions for Autoscout microservice",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",