diff --git a/core-rust/core-api-server/core-api-schema.yaml b/core-rust/core-api-server/core-api-schema.yaml index a96fefb585..8f3dcc0625 100644 --- a/core-rust/core-api-server/core-api-schema.yaml +++ b/core-rust/core-api-server/core-api-schema.yaml @@ -7153,7 +7153,6 @@ components: type: object required: - network - - filter properties: network: $ref: "#/components/schemas/NetworkIdentifier" @@ -7167,12 +7166,13 @@ components: StreamProofsFilterType: type: string enum: - - All + - Any - NewEpochs - - ProtocolUpdateTriggers + - ProtocolUpdateInitializations - ProtocolUpdateExecution StreamProofsFilter: type: object + description: If not provided, defaults to "Any". required: - type properties: @@ -7182,11 +7182,11 @@ components: propertyName: type mapping: # NOTE: These need to match StreamProofsFilterType - All: '#/components/schemas/StreamProofsFilterAll' + Any: '#/components/schemas/StreamProofsFilterAny' NewEpochs: '#/components/schemas/StreamProofsFilterNewEpochs' ProtocolUpdateInitializations: '#/components/schemas/StreamProofsFilterProtocolUpdateInitializations' ProtocolUpdateExecution: '#/components/schemas/StreamProofsFilterProtocolUpdateExecution' - StreamProofsFilterAll: + StreamProofsFilterAny: allOf: - $ref: "#/components/schemas/StreamProofsFilter" - type: object @@ -7228,7 +7228,7 @@ components: protocol_version: type: string description: | - The protocol version name to filter to. This can be returned from looking at the protocol updates. + The protocol version name to filter to. from_state_version: $ref: "#/components/schemas/StateVersion" description: @@ -7366,7 +7366,7 @@ components: format: int32 minimum: 0 maximum: 10000 - description: An integer between `0` and `10000`, giving the total count of proofs in the returned response + description: An integer between `0` and `10000`, giving the total count of transactions in the returned response max_ledger_state_version: $ref: "#/components/schemas/StateVersion" description: The maximum state version currently committed on this node's ledger. diff --git a/core-rust/core-api-server/src/core_api/conversions/pagination.rs b/core-rust/core-api-server/src/core_api/conversions/pagination.rs index 8f7e87ebea..6914db6fbe 100644 --- a/core-rust/core-api-server/src/core_api/conversions/pagination.rs +++ b/core-rust/core-api-server/src/core_api/conversions/pagination.rs @@ -8,29 +8,34 @@ pub struct SizeRange { pub max: usize, } +// Extracts a valid page size as per the API consistency guidelines. pub fn extract_valid_size( provided: Option, size_range: SizeRange, ) -> Result { let SizeRange { min, default, max } = size_range; - match provided { + let valid_size = match provided { Some(provided) => { if provided < 0 { - None + return Err(ExtractionError::InvalidSize { min, max }); + } + let provided = provided as usize; + if provided < min || provided > max { + return Err(ExtractionError::InvalidSize { min, max }); } else { - let provided = provided as usize; - if provided < min || provided > max { - None - } else { - Some(provided) - } + provided } } - None => Some(default), - } - .ok_or(ExtractionError::InvalidSize { min, max }) + None => default, + }; + Ok(valid_size) } +/// Extracts a valid optional continuation token as per the API consistency guidelines. +/// +/// Whilst normally such methods would not take/return an option, this is an active choice +/// to encourage/simplify following of the API guidelines, where a `continuation_token` is always +/// optional. pub fn extract_continuation_token( continuation_token: Option, ) -> Result, ExtractionError> { @@ -42,6 +47,7 @@ pub fn extract_continuation_token( Ok(Some(id)) } +/// Maps a valid optional continuation token as per the API consistency guidelines. pub fn to_api_continuation_token( id_of_start_of_next_page: Option<&T>, ) -> Option { @@ -55,7 +61,10 @@ pub fn optional_max(value: T, option: Option) -> T { } } -/// Returns a page and a continuation token, representing the id of the item at the start of the next page +/// Returns a page and a continuation token from an iterator. +/// +/// This follows the API consistency guidelines, although NOTE that it encodes the continuation token +/// as the id of the item at the *start of the next page*. pub fn to_api_page( iter: &mut dyn Iterator, page_size: usize, diff --git a/core-rust/core-api-server/src/core_api/generated/models/mod.rs b/core-rust/core-api-server/src/core_api/generated/models/mod.rs index 58d7de9f7a..dbae2cdcac 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/mod.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/mod.rs @@ -1006,10 +1006,10 @@ pub mod stream_proofs_error_response_all_of; pub use self::stream_proofs_error_response_all_of::StreamProofsErrorResponseAllOf; pub mod stream_proofs_filter; pub use self::stream_proofs_filter::StreamProofsFilter; -pub mod stream_proofs_filter_all; -pub use self::stream_proofs_filter_all::StreamProofsFilterAll; -pub mod stream_proofs_filter_all_all_of; -pub use self::stream_proofs_filter_all_all_of::StreamProofsFilterAllAllOf; +pub mod stream_proofs_filter_any; +pub use self::stream_proofs_filter_any::StreamProofsFilterAny; +pub mod stream_proofs_filter_any_all_of; +pub use self::stream_proofs_filter_any_all_of::StreamProofsFilterAnyAllOf; pub mod stream_proofs_filter_new_epochs; pub use self::stream_proofs_filter_new_epochs::StreamProofsFilterNewEpochs; pub mod stream_proofs_filter_new_epochs_all_of; diff --git a/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter.rs b/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter.rs index 49635ae3a9..07b853a813 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter.rs @@ -8,13 +8,14 @@ * Generated by: https://openapi-generator.tech */ +/// StreamProofsFilter : If not provided, defaults to \"Any\". #[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize)] #[serde(tag = "type")] pub enum StreamProofsFilter { - #[serde(rename="All")] - StreamProofsFilterAll { + #[serde(rename="Any")] + StreamProofsFilterAny { #[serde(rename = "from_state_version", skip_serializing_if = "Option::is_none")] from_state_version: Option, }, @@ -26,7 +27,7 @@ pub enum StreamProofsFilter { }, #[serde(rename="ProtocolUpdateExecution")] StreamProofsFilterProtocolUpdateExecution { - /// The protocol version name to filter to. This can be returned from looking at the protocol updates. + /// The protocol version name to filter to. #[serde(rename = "protocol_version", skip_serializing_if = "Option::is_none")] protocol_version: Option, #[serde(rename = "from_state_version", skip_serializing_if = "Option::is_none")] diff --git a/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_all.rs b/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_any.rs similarity index 94% rename from core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_all.rs rename to core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_any.rs index aa3740a6ba..e70434db7c 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_all.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_any.rs @@ -12,16 +12,16 @@ #[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] -pub struct StreamProofsFilterAll { +pub struct StreamProofsFilterAny { #[serde(rename = "type")] pub _type: crate::core_api::generated::models::StreamProofsFilterType, #[serde(rename = "from_state_version", skip_serializing_if = "Option::is_none")] pub from_state_version: Option, } -impl StreamProofsFilterAll { - pub fn new(_type: crate::core_api::generated::models::StreamProofsFilterType) -> StreamProofsFilterAll { - StreamProofsFilterAll { +impl StreamProofsFilterAny { + pub fn new(_type: crate::core_api::generated::models::StreamProofsFilterType) -> StreamProofsFilterAny { + StreamProofsFilterAny { _type, from_state_version: None, } diff --git a/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_all_all_of.rs b/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_any_all_of.rs similarity index 93% rename from core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_all_all_of.rs rename to core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_any_all_of.rs index 9e532c88e2..8eec55a89c 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_all_all_of.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_any_all_of.rs @@ -12,14 +12,14 @@ #[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] -pub struct StreamProofsFilterAllAllOf { +pub struct StreamProofsFilterAnyAllOf { #[serde(rename = "from_state_version", skip_serializing_if = "Option::is_none")] pub from_state_version: Option, } -impl StreamProofsFilterAllAllOf { - pub fn new() -> StreamProofsFilterAllAllOf { - StreamProofsFilterAllAllOf { +impl StreamProofsFilterAnyAllOf { + pub fn new() -> StreamProofsFilterAnyAllOf { + StreamProofsFilterAnyAllOf { from_state_version: None, } } diff --git a/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_protocol_update_execution.rs b/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_protocol_update_execution.rs index 7de37e99ce..7b5d65703d 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_protocol_update_execution.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_protocol_update_execution.rs @@ -15,7 +15,7 @@ pub struct StreamProofsFilterProtocolUpdateExecution { #[serde(rename = "type")] pub _type: crate::core_api::generated::models::StreamProofsFilterType, - /// The protocol version name to filter to. This can be returned from looking at the protocol updates. + /// The protocol version name to filter to. #[serde(rename = "protocol_version", skip_serializing_if = "Option::is_none")] pub protocol_version: Option, #[serde(rename = "from_state_version", skip_serializing_if = "Option::is_none")] diff --git a/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_protocol_update_execution_all_of.rs b/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_protocol_update_execution_all_of.rs index e0ef48f028..76e9693518 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_protocol_update_execution_all_of.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_protocol_update_execution_all_of.rs @@ -13,7 +13,7 @@ #[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] pub struct StreamProofsFilterProtocolUpdateExecutionAllOf { - /// The protocol version name to filter to. This can be returned from looking at the protocol updates. + /// The protocol version name to filter to. #[serde(rename = "protocol_version", skip_serializing_if = "Option::is_none")] pub protocol_version: Option, #[serde(rename = "from_state_version", skip_serializing_if = "Option::is_none")] diff --git a/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_type.rs b/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_type.rs index 41a78a3388..0889f80719 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_type.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_filter_type.rs @@ -12,12 +12,12 @@ /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, serde::Serialize, serde::Deserialize)] pub enum StreamProofsFilterType { - #[serde(rename = "All")] - All, + #[serde(rename = "Any")] + Any, #[serde(rename = "NewEpochs")] NewEpochs, - #[serde(rename = "ProtocolUpdateTriggers")] - ProtocolUpdateTriggers, + #[serde(rename = "ProtocolUpdateInitializations")] + ProtocolUpdateInitializations, #[serde(rename = "ProtocolUpdateExecution")] ProtocolUpdateExecution, @@ -26,9 +26,9 @@ pub enum StreamProofsFilterType { impl ToString for StreamProofsFilterType { fn to_string(&self) -> String { match self { - Self::All => String::from("All"), + Self::Any => String::from("Any"), Self::NewEpochs => String::from("NewEpochs"), - Self::ProtocolUpdateTriggers => String::from("ProtocolUpdateTriggers"), + Self::ProtocolUpdateInitializations => String::from("ProtocolUpdateInitializations"), Self::ProtocolUpdateExecution => String::from("ProtocolUpdateExecution"), } } @@ -36,7 +36,7 @@ impl ToString for StreamProofsFilterType { impl Default for StreamProofsFilterType { fn default() -> StreamProofsFilterType { - Self::All + Self::Any } } diff --git a/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_request.rs b/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_request.rs index 5e60107589..71ba7c439f 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_request.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/stream_proofs_request.rs @@ -17,8 +17,8 @@ pub struct StreamProofsRequest { /// The logical name of the network #[serde(rename = "network")] pub network: String, - #[serde(rename = "filter")] - pub filter: Option, // Using Option permits Default trait; Will always be Some in normal use + #[serde(rename = "filter", skip_serializing_if = "Option::is_none")] + pub filter: Option>, /// If specified, the maximum number of proofs that will be returned. #[serde(rename = "max_page_size", skip_serializing_if = "Option::is_none")] pub max_page_size: Option, @@ -29,10 +29,10 @@ pub struct StreamProofsRequest { impl StreamProofsRequest { /// A request to retrieve a sublist of proofs. - pub fn new(network: String, filter: crate::core_api::generated::models::StreamProofsFilter) -> StreamProofsRequest { + pub fn new(network: String) -> StreamProofsRequest { StreamProofsRequest { network, - filter: Option::Some(filter), + filter: None, max_page_size: None, continuation_token: None, } diff --git a/core-rust/core-api-server/src/core_api/generated/models/stream_transactions_response.rs b/core-rust/core-api-server/src/core_api/generated/models/stream_transactions_response.rs index e0bde27665..1da1757340 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/stream_transactions_response.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/stream_transactions_response.rs @@ -17,7 +17,7 @@ pub struct StreamTransactionsResponse { pub previous_state_identifiers: Option>, #[serde(rename = "from_state_version")] pub from_state_version: i64, - /// An integer between `0` and `10000`, giving the total count of proofs in the returned response + /// An integer between `0` and `10000`, giving the total count of transactions in the returned response #[serde(rename = "count")] pub count: i32, #[serde(rename = "max_ledger_state_version")] diff --git a/core-rust/core-api-server/src/core_api/handlers/stream_proofs.rs b/core-rust/core-api-server/src/core_api/handlers/stream_proofs.rs index eb479b8822..2b04f326df 100644 --- a/core-rust/core-api-server/src/core_api/handlers/stream_proofs.rs +++ b/core-rust/core-api-server/src/core_api/handlers/stream_proofs.rs @@ -13,9 +13,9 @@ pub(crate) async fn handle_stream_proofs( assert_matching_network(&request.network, &state.network)?; let mapping_context = MappingContext::new(&state.network); - let filter = request - .filter - .ok_or_else(|| client_error("filter must be present"))?; + let filter = request.filter.unwrap_or(Box::new(StreamProofsFilterAny { + from_state_version: None, + })); let page_size = extract_valid_size( request.max_page_size, @@ -34,8 +34,8 @@ pub(crate) async fn handle_stream_proofs( let database = state.state_manager.database.read_current(); use models::StreamProofsFilter::*; - let mut proofs_iter = match filter { - StreamProofsFilterAll { from_state_version } => iterate_all_proofs( + let mut proofs_iter = match *filter { + StreamProofsFilterAny { from_state_version } => iterate_all_proofs( &database, continue_from_state_version, extract_from_state_version(&database, from_state_version)?, diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilter.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilter.java index 78836243c3..02dfaeb8d4 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilter.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilter.java @@ -25,7 +25,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import com.radixdlt.api.core.generated.models.StreamProofsFilterAll; +import com.radixdlt.api.core.generated.models.StreamProofsFilterAny; import com.radixdlt.api.core.generated.models.StreamProofsFilterNewEpochs; import com.radixdlt.api.core.generated.models.StreamProofsFilterProtocolUpdateExecution; import com.radixdlt.api.core.generated.models.StreamProofsFilterProtocolUpdateInitializations; @@ -37,8 +37,9 @@ import com.radixdlt.api.core.generated.client.JSON; /** - * StreamProofsFilter + * If not provided, defaults to \"Any\". */ +@ApiModel(description = "If not provided, defaults to \"Any\".") @JsonPropertyOrder({ StreamProofsFilter.JSON_PROPERTY_TYPE }) @@ -49,11 +50,11 @@ ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = StreamProofsFilterAll.class, name = "All"), + @JsonSubTypes.Type(value = StreamProofsFilterAny.class, name = "Any"), @JsonSubTypes.Type(value = StreamProofsFilterNewEpochs.class, name = "NewEpochs"), @JsonSubTypes.Type(value = StreamProofsFilterProtocolUpdateExecution.class, name = "ProtocolUpdateExecution"), @JsonSubTypes.Type(value = StreamProofsFilterProtocolUpdateInitializations.class, name = "ProtocolUpdateInitializations"), - @JsonSubTypes.Type(value = StreamProofsFilterAll.class, name = "StreamProofsFilterAll"), + @JsonSubTypes.Type(value = StreamProofsFilterAny.class, name = "StreamProofsFilterAny"), @JsonSubTypes.Type(value = StreamProofsFilterNewEpochs.class, name = "StreamProofsFilterNewEpochs"), @JsonSubTypes.Type(value = StreamProofsFilterProtocolUpdateExecution.class, name = "StreamProofsFilterProtocolUpdateExecution"), @JsonSubTypes.Type(value = StreamProofsFilterProtocolUpdateInitializations.class, name = "StreamProofsFilterProtocolUpdateInitializations"), @@ -135,11 +136,11 @@ private String toIndentedString(Object o) { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); - mappings.put("All", StreamProofsFilterAll.class); + mappings.put("Any", StreamProofsFilterAny.class); mappings.put("NewEpochs", StreamProofsFilterNewEpochs.class); mappings.put("ProtocolUpdateExecution", StreamProofsFilterProtocolUpdateExecution.class); mappings.put("ProtocolUpdateInitializations", StreamProofsFilterProtocolUpdateInitializations.class); - mappings.put("StreamProofsFilterAll", StreamProofsFilterAll.class); + mappings.put("StreamProofsFilterAny", StreamProofsFilterAny.class); mappings.put("StreamProofsFilterNewEpochs", StreamProofsFilterNewEpochs.class); mappings.put("StreamProofsFilterProtocolUpdateExecution", StreamProofsFilterProtocolUpdateExecution.class); mappings.put("StreamProofsFilterProtocolUpdateInitializations", StreamProofsFilterProtocolUpdateInitializations.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterAll.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterAny.java similarity index 89% rename from core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterAll.java rename to core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterAny.java index 793305493c..47f1c4330f 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterAll.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterAny.java @@ -26,8 +26,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.radixdlt.api.core.generated.models.StreamProofsFilter; -import com.radixdlt.api.core.generated.models.StreamProofsFilterAll; -import com.radixdlt.api.core.generated.models.StreamProofsFilterAllAllOf; +import com.radixdlt.api.core.generated.models.StreamProofsFilterAny; +import com.radixdlt.api.core.generated.models.StreamProofsFilterAnyAllOf; import com.radixdlt.api.core.generated.models.StreamProofsFilterNewEpochs; import com.radixdlt.api.core.generated.models.StreamProofsFilterProtocolUpdateExecution; import com.radixdlt.api.core.generated.models.StreamProofsFilterProtocolUpdateInitializations; @@ -39,10 +39,10 @@ import com.radixdlt.api.core.generated.client.JSON; /** - * StreamProofsFilterAll + * StreamProofsFilterAny */ @JsonPropertyOrder({ - StreamProofsFilterAll.JSON_PROPERTY_FROM_STATE_VERSION + StreamProofsFilterAny.JSON_PROPERTY_FROM_STATE_VERSION }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @JsonIgnoreProperties( @@ -51,20 +51,20 @@ ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = StreamProofsFilterAll.class, name = "All"), + @JsonSubTypes.Type(value = StreamProofsFilterAny.class, name = "Any"), @JsonSubTypes.Type(value = StreamProofsFilterNewEpochs.class, name = "NewEpochs"), @JsonSubTypes.Type(value = StreamProofsFilterProtocolUpdateExecution.class, name = "ProtocolUpdateExecution"), @JsonSubTypes.Type(value = StreamProofsFilterProtocolUpdateInitializations.class, name = "ProtocolUpdateInitializations"), }) -public class StreamProofsFilterAll extends StreamProofsFilter { +public class StreamProofsFilterAny extends StreamProofsFilter { public static final String JSON_PROPERTY_FROM_STATE_VERSION = "from_state_version"; private Long fromStateVersion; - public StreamProofsFilterAll() { + public StreamProofsFilterAny() { } - public StreamProofsFilterAll fromStateVersion(Long fromStateVersion) { + public StreamProofsFilterAny fromStateVersion(Long fromStateVersion) { this.fromStateVersion = fromStateVersion; return this; } @@ -93,7 +93,7 @@ public void setFromStateVersion(Long fromStateVersion) { /** - * Return true if this StreamProofsFilterAll object is equal to o. + * Return true if this StreamProofsFilterAny object is equal to o. */ @Override public boolean equals(Object o) { @@ -103,8 +103,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - StreamProofsFilterAll streamProofsFilterAll = (StreamProofsFilterAll) o; - return Objects.equals(this.fromStateVersion, streamProofsFilterAll.fromStateVersion) && + StreamProofsFilterAny streamProofsFilterAny = (StreamProofsFilterAny) o; + return Objects.equals(this.fromStateVersion, streamProofsFilterAny.fromStateVersion) && super.equals(o); } @@ -116,7 +116,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class StreamProofsFilterAll {\n"); + sb.append("class StreamProofsFilterAny {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" fromStateVersion: ").append(toIndentedString(fromStateVersion)).append("\n"); sb.append("}"); @@ -137,12 +137,12 @@ private String toIndentedString(Object o) { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); - mappings.put("All", StreamProofsFilterAll.class); + mappings.put("Any", StreamProofsFilterAny.class); mappings.put("NewEpochs", StreamProofsFilterNewEpochs.class); mappings.put("ProtocolUpdateExecution", StreamProofsFilterProtocolUpdateExecution.class); mappings.put("ProtocolUpdateInitializations", StreamProofsFilterProtocolUpdateInitializations.class); - mappings.put("StreamProofsFilterAll", StreamProofsFilterAll.class); - JSON.registerDiscriminator(StreamProofsFilterAll.class, "type", mappings); + mappings.put("StreamProofsFilterAny", StreamProofsFilterAny.class); + JSON.registerDiscriminator(StreamProofsFilterAny.class, "type", mappings); } } diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterAllAllOf.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterAnyAllOf.java similarity index 90% rename from core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterAllAllOf.java rename to core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterAnyAllOf.java index 051f22515a..ee56935c57 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterAllAllOf.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterAnyAllOf.java @@ -28,20 +28,20 @@ /** - * StreamProofsFilterAllAllOf + * StreamProofsFilterAnyAllOf */ @JsonPropertyOrder({ - StreamProofsFilterAllAllOf.JSON_PROPERTY_FROM_STATE_VERSION + StreamProofsFilterAnyAllOf.JSON_PROPERTY_FROM_STATE_VERSION }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StreamProofsFilterAllAllOf { +public class StreamProofsFilterAnyAllOf { public static final String JSON_PROPERTY_FROM_STATE_VERSION = "from_state_version"; private Long fromStateVersion; - public StreamProofsFilterAllAllOf() { + public StreamProofsFilterAnyAllOf() { } - public StreamProofsFilterAllAllOf fromStateVersion(Long fromStateVersion) { + public StreamProofsFilterAnyAllOf fromStateVersion(Long fromStateVersion) { this.fromStateVersion = fromStateVersion; return this; } @@ -70,7 +70,7 @@ public void setFromStateVersion(Long fromStateVersion) { /** - * Return true if this StreamProofsFilterAll_allOf object is equal to o. + * Return true if this StreamProofsFilterAny_allOf object is equal to o. */ @Override public boolean equals(Object o) { @@ -80,8 +80,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - StreamProofsFilterAllAllOf streamProofsFilterAllAllOf = (StreamProofsFilterAllAllOf) o; - return Objects.equals(this.fromStateVersion, streamProofsFilterAllAllOf.fromStateVersion); + StreamProofsFilterAnyAllOf streamProofsFilterAnyAllOf = (StreamProofsFilterAnyAllOf) o; + return Objects.equals(this.fromStateVersion, streamProofsFilterAnyAllOf.fromStateVersion); } @Override @@ -92,7 +92,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class StreamProofsFilterAllAllOf {\n"); + sb.append("class StreamProofsFilterAnyAllOf {\n"); sb.append(" fromStateVersion: ").append(toIndentedString(fromStateVersion)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterNewEpochs.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterNewEpochs.java index b94a77e15e..c9861da950 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterNewEpochs.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterNewEpochs.java @@ -26,7 +26,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.radixdlt.api.core.generated.models.StreamProofsFilter; -import com.radixdlt.api.core.generated.models.StreamProofsFilterAll; +import com.radixdlt.api.core.generated.models.StreamProofsFilterAny; import com.radixdlt.api.core.generated.models.StreamProofsFilterNewEpochs; import com.radixdlt.api.core.generated.models.StreamProofsFilterNewEpochsAllOf; import com.radixdlt.api.core.generated.models.StreamProofsFilterProtocolUpdateExecution; @@ -51,7 +51,7 @@ ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = StreamProofsFilterAll.class, name = "All"), + @JsonSubTypes.Type(value = StreamProofsFilterAny.class, name = "Any"), @JsonSubTypes.Type(value = StreamProofsFilterNewEpochs.class, name = "NewEpochs"), @JsonSubTypes.Type(value = StreamProofsFilterProtocolUpdateExecution.class, name = "ProtocolUpdateExecution"), @JsonSubTypes.Type(value = StreamProofsFilterProtocolUpdateInitializations.class, name = "ProtocolUpdateInitializations"), @@ -137,7 +137,7 @@ private String toIndentedString(Object o) { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); - mappings.put("All", StreamProofsFilterAll.class); + mappings.put("Any", StreamProofsFilterAny.class); mappings.put("NewEpochs", StreamProofsFilterNewEpochs.class); mappings.put("ProtocolUpdateExecution", StreamProofsFilterProtocolUpdateExecution.class); mappings.put("ProtocolUpdateInitializations", StreamProofsFilterProtocolUpdateInitializations.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterProtocolUpdateExecution.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterProtocolUpdateExecution.java index c8071c37d7..2d648a8234 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterProtocolUpdateExecution.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterProtocolUpdateExecution.java @@ -26,7 +26,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.radixdlt.api.core.generated.models.StreamProofsFilter; -import com.radixdlt.api.core.generated.models.StreamProofsFilterAll; +import com.radixdlt.api.core.generated.models.StreamProofsFilterAny; import com.radixdlt.api.core.generated.models.StreamProofsFilterNewEpochs; import com.radixdlt.api.core.generated.models.StreamProofsFilterProtocolUpdateExecution; import com.radixdlt.api.core.generated.models.StreamProofsFilterProtocolUpdateExecutionAllOf; @@ -52,7 +52,7 @@ ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = StreamProofsFilterAll.class, name = "All"), + @JsonSubTypes.Type(value = StreamProofsFilterAny.class, name = "Any"), @JsonSubTypes.Type(value = StreamProofsFilterNewEpochs.class, name = "NewEpochs"), @JsonSubTypes.Type(value = StreamProofsFilterProtocolUpdateExecution.class, name = "ProtocolUpdateExecution"), @JsonSubTypes.Type(value = StreamProofsFilterProtocolUpdateInitializations.class, name = "ProtocolUpdateInitializations"), @@ -74,11 +74,11 @@ public StreamProofsFilterProtocolUpdateExecution protocolVersion(String protocol } /** - * The protocol version name to filter to. This can be returned from looking at the protocol updates. + * The protocol version name to filter to. * @return protocolVersion **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The protocol version name to filter to. This can be returned from looking at the protocol updates. ") + @ApiModelProperty(value = "The protocol version name to filter to. ") @JsonProperty(JSON_PROPERTY_PROTOCOL_VERSION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -169,7 +169,7 @@ private String toIndentedString(Object o) { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); - mappings.put("All", StreamProofsFilterAll.class); + mappings.put("Any", StreamProofsFilterAny.class); mappings.put("NewEpochs", StreamProofsFilterNewEpochs.class); mappings.put("ProtocolUpdateExecution", StreamProofsFilterProtocolUpdateExecution.class); mappings.put("ProtocolUpdateInitializations", StreamProofsFilterProtocolUpdateInitializations.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterProtocolUpdateExecutionAllOf.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterProtocolUpdateExecutionAllOf.java index a3708478d2..265aee874f 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterProtocolUpdateExecutionAllOf.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterProtocolUpdateExecutionAllOf.java @@ -51,11 +51,11 @@ public StreamProofsFilterProtocolUpdateExecutionAllOf protocolVersion(String pro } /** - * The protocol version name to filter to. This can be returned from looking at the protocol updates. + * The protocol version name to filter to. * @return protocolVersion **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The protocol version name to filter to. This can be returned from looking at the protocol updates. ") + @ApiModelProperty(value = "The protocol version name to filter to. ") @JsonProperty(JSON_PROPERTY_PROTOCOL_VERSION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterProtocolUpdateInitializations.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterProtocolUpdateInitializations.java index d5afbabd48..822f83e53a 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterProtocolUpdateInitializations.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterProtocolUpdateInitializations.java @@ -26,8 +26,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.radixdlt.api.core.generated.models.StreamProofsFilter; -import com.radixdlt.api.core.generated.models.StreamProofsFilterAll; -import com.radixdlt.api.core.generated.models.StreamProofsFilterAllAllOf; +import com.radixdlt.api.core.generated.models.StreamProofsFilterAny; +import com.radixdlt.api.core.generated.models.StreamProofsFilterAnyAllOf; import com.radixdlt.api.core.generated.models.StreamProofsFilterNewEpochs; import com.radixdlt.api.core.generated.models.StreamProofsFilterProtocolUpdateExecution; import com.radixdlt.api.core.generated.models.StreamProofsFilterProtocolUpdateInitializations; @@ -51,7 +51,7 @@ ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = StreamProofsFilterAll.class, name = "All"), + @JsonSubTypes.Type(value = StreamProofsFilterAny.class, name = "Any"), @JsonSubTypes.Type(value = StreamProofsFilterNewEpochs.class, name = "NewEpochs"), @JsonSubTypes.Type(value = StreamProofsFilterProtocolUpdateExecution.class, name = "ProtocolUpdateExecution"), @JsonSubTypes.Type(value = StreamProofsFilterProtocolUpdateInitializations.class, name = "ProtocolUpdateInitializations"), @@ -137,7 +137,7 @@ private String toIndentedString(Object o) { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); - mappings.put("All", StreamProofsFilterAll.class); + mappings.put("Any", StreamProofsFilterAny.class); mappings.put("NewEpochs", StreamProofsFilterNewEpochs.class); mappings.put("ProtocolUpdateExecution", StreamProofsFilterProtocolUpdateExecution.class); mappings.put("ProtocolUpdateInitializations", StreamProofsFilterProtocolUpdateInitializations.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterType.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterType.java index 739f540730..8fe561d07d 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterType.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsFilterType.java @@ -28,11 +28,11 @@ */ public enum StreamProofsFilterType { - ALL("All"), + ANY("Any"), NEWEPOCHS("NewEpochs"), - PROTOCOLUPDATETRIGGERS("ProtocolUpdateTriggers"), + PROTOCOLUPDATEINITIALIZATIONS("ProtocolUpdateInitializations"), PROTOCOLUPDATEEXECUTION("ProtocolUpdateExecution"); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsRequest.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsRequest.java index 691437d7e1..c1c6a8bc7e 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsRequest.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamProofsRequest.java @@ -90,10 +90,10 @@ public StreamProofsRequest filter(StreamProofsFilter filter) { * Get filter * @return filter **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") + @javax.annotation.Nullable + @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public StreamProofsFilter getFilter() { return filter; @@ -101,7 +101,7 @@ public StreamProofsFilter getFilter() { @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setFilter(StreamProofsFilter filter) { this.filter = filter; } diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamTransactionsResponse.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamTransactionsResponse.java index 6c10a65451..65d5361e2c 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamTransactionsResponse.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/StreamTransactionsResponse.java @@ -126,13 +126,13 @@ public StreamTransactionsResponse count(Integer count) { } /** - * An integer between `0` and `10000`, giving the total count of proofs in the returned response + * An integer between `0` and `10000`, giving the total count of transactions in the returned response * minimum: 0 * maximum: 10000 * @return count **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "An integer between `0` and `10000`, giving the total count of proofs in the returned response") + @ApiModelProperty(required = true, value = "An integer between `0` and `10000`, giving the total count of transactions in the returned response") @JsonProperty(JSON_PROPERTY_COUNT) @JsonInclude(value = JsonInclude.Include.ALWAYS) diff --git a/sdk/typescript/lib/generated/.openapi-generator/FILES b/sdk/typescript/lib/generated/.openapi-generator/FILES index 8c741ffef9..9a362e4eef 100644 --- a/sdk/typescript/lib/generated/.openapi-generator/FILES +++ b/sdk/typescript/lib/generated/.openapi-generator/FILES @@ -552,8 +552,8 @@ models/StreamProofsErrorDetailsType.ts models/StreamProofsErrorResponse.ts models/StreamProofsErrorResponseAllOf.ts models/StreamProofsFilter.ts -models/StreamProofsFilterAll.ts -models/StreamProofsFilterAllAllOf.ts +models/StreamProofsFilterAny.ts +models/StreamProofsFilterAnyAllOf.ts models/StreamProofsFilterBase.ts models/StreamProofsFilterNewEpochs.ts models/StreamProofsFilterNewEpochsAllOf.ts diff --git a/sdk/typescript/lib/generated/models/StreamProofsFilter.ts b/sdk/typescript/lib/generated/models/StreamProofsFilter.ts index fb2b644e35..345051d3a6 100644 --- a/sdk/typescript/lib/generated/models/StreamProofsFilter.ts +++ b/sdk/typescript/lib/generated/models/StreamProofsFilter.ts @@ -13,12 +13,12 @@ */ import { - StreamProofsFilterAll, - instanceOfStreamProofsFilterAll, - StreamProofsFilterAllFromJSON, - StreamProofsFilterAllFromJSONTyped, - StreamProofsFilterAllToJSON, -} from './StreamProofsFilterAll'; + StreamProofsFilterAny, + instanceOfStreamProofsFilterAny, + StreamProofsFilterAnyFromJSON, + StreamProofsFilterAnyFromJSONTyped, + StreamProofsFilterAnyToJSON, +} from './StreamProofsFilterAny'; import { StreamProofsFilterNewEpochs, instanceOfStreamProofsFilterNewEpochs, @@ -46,7 +46,7 @@ import { * * @export */ -export type StreamProofsFilter = { type: 'All' } & StreamProofsFilterAll | { type: 'NewEpochs' } & StreamProofsFilterNewEpochs | { type: 'ProtocolUpdateExecution' } & StreamProofsFilterProtocolUpdateExecution | { type: 'ProtocolUpdateInitializations' } & StreamProofsFilterProtocolUpdateInitializations; +export type StreamProofsFilter = { type: 'Any' } & StreamProofsFilterAny | { type: 'NewEpochs' } & StreamProofsFilterNewEpochs | { type: 'ProtocolUpdateExecution' } & StreamProofsFilterProtocolUpdateExecution | { type: 'ProtocolUpdateInitializations' } & StreamProofsFilterProtocolUpdateInitializations; export function StreamProofsFilterFromJSON(json: any): StreamProofsFilter { return StreamProofsFilterFromJSONTyped(json, false); @@ -57,8 +57,8 @@ export function StreamProofsFilterFromJSONTyped(json: any, ignoreDiscriminator: return json; } switch (json['type']) { - case 'All': - return {...StreamProofsFilterAllFromJSONTyped(json, true), type: 'All'}; + case 'Any': + return {...StreamProofsFilterAnyFromJSONTyped(json, true), type: 'Any'}; case 'NewEpochs': return {...StreamProofsFilterNewEpochsFromJSONTyped(json, true), type: 'NewEpochs'}; case 'ProtocolUpdateExecution': @@ -78,8 +78,8 @@ export function StreamProofsFilterToJSON(value?: StreamProofsFilter | null): any return null; } switch (value['type']) { - case 'All': - return StreamProofsFilterAllToJSON(value); + case 'Any': + return StreamProofsFilterAnyToJSON(value); case 'NewEpochs': return StreamProofsFilterNewEpochsToJSON(value); case 'ProtocolUpdateExecution': diff --git a/sdk/typescript/lib/generated/models/StreamProofsFilterAll.ts b/sdk/typescript/lib/generated/models/StreamProofsFilterAny.ts similarity index 77% rename from sdk/typescript/lib/generated/models/StreamProofsFilterAll.ts rename to sdk/typescript/lib/generated/models/StreamProofsFilterAny.ts index ea0083977f..74db16af65 100644 --- a/sdk/typescript/lib/generated/models/StreamProofsFilterAll.ts +++ b/sdk/typescript/lib/generated/models/StreamProofsFilterAny.ts @@ -16,19 +16,19 @@ import { exists, mapValues } from '../runtime'; /** * * @export - * @interface StreamProofsFilterAll + * @interface StreamProofsFilterAny */ -export interface StreamProofsFilterAll { +export interface StreamProofsFilterAny { /** * * @type {string} - * @memberof StreamProofsFilterAll + * @memberof StreamProofsFilterAny */ - type: StreamProofsFilterAllTypeEnum; + type: StreamProofsFilterAnyTypeEnum; /** * * @type {number} - * @memberof StreamProofsFilterAll + * @memberof StreamProofsFilterAny */ from_state_version?: number; } @@ -37,27 +37,27 @@ export interface StreamProofsFilterAll { /** * @export */ -export const StreamProofsFilterAllTypeEnum = { - All: 'All' +export const StreamProofsFilterAnyTypeEnum = { + Any: 'Any' } as const; -export type StreamProofsFilterAllTypeEnum = typeof StreamProofsFilterAllTypeEnum[keyof typeof StreamProofsFilterAllTypeEnum]; +export type StreamProofsFilterAnyTypeEnum = typeof StreamProofsFilterAnyTypeEnum[keyof typeof StreamProofsFilterAnyTypeEnum]; /** - * Check if a given object implements the StreamProofsFilterAll interface. + * Check if a given object implements the StreamProofsFilterAny interface. */ -export function instanceOfStreamProofsFilterAll(value: object): boolean { +export function instanceOfStreamProofsFilterAny(value: object): boolean { let isInstance = true; isInstance = isInstance && "type" in value; return isInstance; } -export function StreamProofsFilterAllFromJSON(json: any): StreamProofsFilterAll { - return StreamProofsFilterAllFromJSONTyped(json, false); +export function StreamProofsFilterAnyFromJSON(json: any): StreamProofsFilterAny { + return StreamProofsFilterAnyFromJSONTyped(json, false); } -export function StreamProofsFilterAllFromJSONTyped(json: any, ignoreDiscriminator: boolean): StreamProofsFilterAll { +export function StreamProofsFilterAnyFromJSONTyped(json: any, ignoreDiscriminator: boolean): StreamProofsFilterAny { if ((json === undefined) || (json === null)) { return json; } @@ -68,7 +68,7 @@ export function StreamProofsFilterAllFromJSONTyped(json: any, ignoreDiscriminato }; } -export function StreamProofsFilterAllToJSON(value?: StreamProofsFilterAll | null): any { +export function StreamProofsFilterAnyToJSON(value?: StreamProofsFilterAny | null): any { if (value === undefined) { return undefined; } diff --git a/sdk/typescript/lib/generated/models/StreamProofsFilterAllAllOf.ts b/sdk/typescript/lib/generated/models/StreamProofsFilterAnyAllOf.ts similarity index 76% rename from sdk/typescript/lib/generated/models/StreamProofsFilterAllAllOf.ts rename to sdk/typescript/lib/generated/models/StreamProofsFilterAnyAllOf.ts index b2df2828f6..cac1209210 100644 --- a/sdk/typescript/lib/generated/models/StreamProofsFilterAllAllOf.ts +++ b/sdk/typescript/lib/generated/models/StreamProofsFilterAnyAllOf.ts @@ -16,47 +16,47 @@ import { exists, mapValues } from '../runtime'; /** * * @export - * @interface StreamProofsFilterAllAllOf + * @interface StreamProofsFilterAnyAllOf */ -export interface StreamProofsFilterAllAllOf { +export interface StreamProofsFilterAnyAllOf { /** * * @type {number} - * @memberof StreamProofsFilterAllAllOf + * @memberof StreamProofsFilterAnyAllOf */ from_state_version?: number; /** * * @type {string} - * @memberof StreamProofsFilterAllAllOf + * @memberof StreamProofsFilterAnyAllOf */ - type?: StreamProofsFilterAllAllOfTypeEnum; + type?: StreamProofsFilterAnyAllOfTypeEnum; } /** * @export */ -export const StreamProofsFilterAllAllOfTypeEnum = { - All: 'All' +export const StreamProofsFilterAnyAllOfTypeEnum = { + Any: 'Any' } as const; -export type StreamProofsFilterAllAllOfTypeEnum = typeof StreamProofsFilterAllAllOfTypeEnum[keyof typeof StreamProofsFilterAllAllOfTypeEnum]; +export type StreamProofsFilterAnyAllOfTypeEnum = typeof StreamProofsFilterAnyAllOfTypeEnum[keyof typeof StreamProofsFilterAnyAllOfTypeEnum]; /** - * Check if a given object implements the StreamProofsFilterAllAllOf interface. + * Check if a given object implements the StreamProofsFilterAnyAllOf interface. */ -export function instanceOfStreamProofsFilterAllAllOf(value: object): boolean { +export function instanceOfStreamProofsFilterAnyAllOf(value: object): boolean { let isInstance = true; return isInstance; } -export function StreamProofsFilterAllAllOfFromJSON(json: any): StreamProofsFilterAllAllOf { - return StreamProofsFilterAllAllOfFromJSONTyped(json, false); +export function StreamProofsFilterAnyAllOfFromJSON(json: any): StreamProofsFilterAnyAllOf { + return StreamProofsFilterAnyAllOfFromJSONTyped(json, false); } -export function StreamProofsFilterAllAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): StreamProofsFilterAllAllOf { +export function StreamProofsFilterAnyAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): StreamProofsFilterAnyAllOf { if ((json === undefined) || (json === null)) { return json; } @@ -67,7 +67,7 @@ export function StreamProofsFilterAllAllOfFromJSONTyped(json: any, ignoreDiscrim }; } -export function StreamProofsFilterAllAllOfToJSON(value?: StreamProofsFilterAllAllOf | null): any { +export function StreamProofsFilterAnyAllOfToJSON(value?: StreamProofsFilterAnyAllOf | null): any { if (value === undefined) { return undefined; } diff --git a/sdk/typescript/lib/generated/models/StreamProofsFilterBase.ts b/sdk/typescript/lib/generated/models/StreamProofsFilterBase.ts index 353de9e3e0..f9d5e62685 100644 --- a/sdk/typescript/lib/generated/models/StreamProofsFilterBase.ts +++ b/sdk/typescript/lib/generated/models/StreamProofsFilterBase.ts @@ -21,7 +21,7 @@ import { } from './StreamProofsFilterType'; /** - * + * If not provided, defaults to "Any". * @export * @interface StreamProofsFilterBase */ diff --git a/sdk/typescript/lib/generated/models/StreamProofsFilterProtocolUpdateExecution.ts b/sdk/typescript/lib/generated/models/StreamProofsFilterProtocolUpdateExecution.ts index 7d6097233b..d70d483f69 100644 --- a/sdk/typescript/lib/generated/models/StreamProofsFilterProtocolUpdateExecution.ts +++ b/sdk/typescript/lib/generated/models/StreamProofsFilterProtocolUpdateExecution.ts @@ -26,7 +26,7 @@ export interface StreamProofsFilterProtocolUpdateExecution { */ type: StreamProofsFilterProtocolUpdateExecutionTypeEnum; /** - * The protocol version name to filter to. This can be returned from looking at the protocol updates. + * The protocol version name to filter to. * @type {string} * @memberof StreamProofsFilterProtocolUpdateExecution */ diff --git a/sdk/typescript/lib/generated/models/StreamProofsFilterProtocolUpdateExecutionAllOf.ts b/sdk/typescript/lib/generated/models/StreamProofsFilterProtocolUpdateExecutionAllOf.ts index bd29849fa1..5e291eac44 100644 --- a/sdk/typescript/lib/generated/models/StreamProofsFilterProtocolUpdateExecutionAllOf.ts +++ b/sdk/typescript/lib/generated/models/StreamProofsFilterProtocolUpdateExecutionAllOf.ts @@ -20,7 +20,7 @@ import { exists, mapValues } from '../runtime'; */ export interface StreamProofsFilterProtocolUpdateExecutionAllOf { /** - * The protocol version name to filter to. This can be returned from looking at the protocol updates. + * The protocol version name to filter to. * @type {string} * @memberof StreamProofsFilterProtocolUpdateExecutionAllOf */ diff --git a/sdk/typescript/lib/generated/models/StreamProofsFilterType.ts b/sdk/typescript/lib/generated/models/StreamProofsFilterType.ts index d677feb3b2..a44062d5bb 100644 --- a/sdk/typescript/lib/generated/models/StreamProofsFilterType.ts +++ b/sdk/typescript/lib/generated/models/StreamProofsFilterType.ts @@ -18,9 +18,9 @@ * @export */ export const StreamProofsFilterType = { - All: 'All', + Any: 'Any', NewEpochs: 'NewEpochs', - ProtocolUpdateTriggers: 'ProtocolUpdateTriggers', + ProtocolUpdateInitializations: 'ProtocolUpdateInitializations', ProtocolUpdateExecution: 'ProtocolUpdateExecution' } as const; export type StreamProofsFilterType = typeof StreamProofsFilterType[keyof typeof StreamProofsFilterType]; diff --git a/sdk/typescript/lib/generated/models/StreamProofsRequest.ts b/sdk/typescript/lib/generated/models/StreamProofsRequest.ts index 1b6e3ffa11..051a4ee012 100644 --- a/sdk/typescript/lib/generated/models/StreamProofsRequest.ts +++ b/sdk/typescript/lib/generated/models/StreamProofsRequest.ts @@ -37,7 +37,7 @@ export interface StreamProofsRequest { * @type {StreamProofsFilter} * @memberof StreamProofsRequest */ - filter: StreamProofsFilter; + filter?: StreamProofsFilter; /** * If specified, the maximum number of proofs that will be returned. * @type {number} @@ -60,7 +60,6 @@ export interface StreamProofsRequest { export function instanceOfStreamProofsRequest(value: object): boolean { let isInstance = true; isInstance = isInstance && "network" in value; - isInstance = isInstance && "filter" in value; return isInstance; } @@ -76,7 +75,7 @@ export function StreamProofsRequestFromJSONTyped(json: any, ignoreDiscriminator: return { 'network': json['network'], - 'filter': StreamProofsFilterFromJSON(json['filter']), + 'filter': !exists(json, 'filter') ? undefined : StreamProofsFilterFromJSON(json['filter']), 'max_page_size': !exists(json, 'max_page_size') ? undefined : json['max_page_size'], 'continuation_token': !exists(json, 'continuation_token') ? undefined : json['continuation_token'], }; diff --git a/sdk/typescript/lib/generated/models/StreamTransactionsResponse.ts b/sdk/typescript/lib/generated/models/StreamTransactionsResponse.ts index d8c46804ca..91664c4da3 100644 --- a/sdk/typescript/lib/generated/models/StreamTransactionsResponse.ts +++ b/sdk/typescript/lib/generated/models/StreamTransactionsResponse.ts @@ -51,7 +51,7 @@ export interface StreamTransactionsResponse { */ from_state_version: number; /** - * An integer between `0` and `10000`, giving the total count of proofs in the returned response + * An integer between `0` and `10000`, giving the total count of transactions in the returned response * @type {number} * @memberof StreamTransactionsResponse */ diff --git a/sdk/typescript/lib/generated/models/index.ts b/sdk/typescript/lib/generated/models/index.ts index 0d52ff53b9..0bab7c5acf 100644 --- a/sdk/typescript/lib/generated/models/index.ts +++ b/sdk/typescript/lib/generated/models/index.ts @@ -545,8 +545,8 @@ export * from './StreamProofsErrorDetailsType'; export * from './StreamProofsErrorResponse'; export * from './StreamProofsErrorResponseAllOf'; export * from './StreamProofsFilter'; -export * from './StreamProofsFilterAll'; -export * from './StreamProofsFilterAllAllOf'; +export * from './StreamProofsFilterAny'; +export * from './StreamProofsFilterAnyAllOf'; export * from './StreamProofsFilterBase'; export * from './StreamProofsFilterNewEpochs'; export * from './StreamProofsFilterNewEpochsAllOf';