fix ts-rs-cli by deriving ts_rs::TS on new nym-api-requests types
This commit is contained in:
@@ -420,8 +420,17 @@ pub struct NodeAnnotationV1 {
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, ToSchema)]
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/ChainInteractionCapabilitiesDetailed.ts"
|
||||
)
|
||||
)]
|
||||
pub struct ChainInteractionCapabilitiesDetailed {
|
||||
#[schema(value_type = CoinSchema)]
|
||||
#[cfg_attr(feature = "generate-ts", ts(type = "Coin"))]
|
||||
pub on_chain_balance: Coin,
|
||||
|
||||
// later to be expanded with information on whether the grant would cover
|
||||
@@ -430,6 +439,14 @@ pub struct ChainInteractionCapabilitiesDetailed {
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema, ToSchema)]
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/NodeAnnotationV2.ts"
|
||||
)
|
||||
)]
|
||||
pub struct NodeAnnotationV2 {
|
||||
pub current_role: Option<DisplayRole>,
|
||||
|
||||
@@ -727,6 +744,14 @@ pub struct AnnotationResponseV1 {
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, ToSchema)]
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/AnnotationResponseV2.ts"
|
||||
)
|
||||
)]
|
||||
pub struct AnnotationResponseV2 {
|
||||
#[schema(value_type = u32)]
|
||||
pub node_id: NodeId,
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#![allow(deprecated)]
|
||||
|
||||
use nym_api_requests::models::described::type_translation::DeclaredRolesV1;
|
||||
use nym_api_requests::models::described::v1::DescribedNodeTypeV1;
|
||||
use nym_api_requests::models::{
|
||||
AnnotationResponseV1, AnnotationResponseV2, DeclaredRolesV1, DescribedNodeTypeV1,
|
||||
GatewayCoreStatusResponse, HistoricalPerformanceResponse, HistoricalUptimeResponse,
|
||||
MixnodeCoreStatusResponse, MixnodeStatus, MixnodeStatusResponse, NodeAnnotationV1,
|
||||
NodeAnnotationV2, NodeDatePerformanceResponse, NodePerformanceResponse,
|
||||
PerformanceHistoryResponse, StakeSaturationResponse, UptimeHistoryResponse,
|
||||
AnnotationResponseV1, AnnotationResponseV2, GatewayCoreStatusResponse,
|
||||
HistoricalPerformanceResponse, HistoricalUptimeResponse, MixnodeCoreStatusResponse,
|
||||
MixnodeStatus, MixnodeStatusResponse, NodeAnnotationV1, NodeAnnotationV2,
|
||||
NodeDatePerformanceResponse, NodePerformanceResponse, PerformanceHistoryResponse,
|
||||
StakeSaturationResponse, UptimeHistoryResponse,
|
||||
};
|
||||
use nym_api_requests::pagination::{PaginatedResponse, Pagination};
|
||||
use nym_mixnet_contract_common::nym_node::{NodeConfigUpdate, Role};
|
||||
|
||||
Reference in New Issue
Block a user