@dashevo/dapi-grpc 4.2.0-dev.1 → 4.2.0-dev.11

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.
package/build.rs CHANGED
@@ -10,6 +10,7 @@ use tonic_prost_build::Builder;
10
10
  const SERDE_WITH_BYTES: &str = r#"#[cfg_attr(feature = "serde", serde(with = "serde_bytes"))]"#;
11
11
  const SERDE_WITH_BASE64: &str =
12
12
  r#"#[cfg_attr(feature = "serde", serde(with = "crate::deserialization::vec_base64string"))]"#;
13
+ const SERDE_DEFAULT: &str = r#"#[cfg_attr(feature = "serde", serde(default))]"#;
13
14
  const SERDE_WITH_STRING: &str =
14
15
  r#"#[cfg_attr(feature = "serde", serde(with = "crate::deserialization::from_to_string"))]"#;
15
16
 
@@ -85,10 +86,12 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig {
85
86
  // Derive features for versioned messages
86
87
  //
87
88
  // "GetConsensusParamsRequest" is excluded as this message does not support proofs
88
- const VERSIONED_REQUESTS: [&str; 56] = [
89
+ const VERSIONED_REQUESTS: [&str; 58] = [
89
90
  "GetDataContractHistoryRequest",
91
+ "GetDataContractsLatestVersionsRequest",
90
92
  "GetDataContractRequest",
91
93
  "GetDataContractsRequest",
94
+ "GetDataContractsByRangeRequest",
92
95
  "GetDocumentHistoryRequest",
93
96
  "GetDocumentsRequest",
94
97
  "GetIdentitiesByPublicKeyHashesRequest",
@@ -156,8 +159,9 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig {
156
159
  // - "GetIdentityByNonUniquePublicKeyHashResponse"
157
160
  //
158
161
  // "GetEvonodesProposedEpochBlocksResponse" is used for 2 Requests
159
- const VERSIONED_RESPONSES: [&str; 54] = [
162
+ const VERSIONED_RESPONSES: [&str; 55] = [
160
163
  "GetDataContractHistoryResponse",
164
+ "GetDataContractsLatestVersionsResponse",
161
165
  "GetDataContractResponse",
162
166
  "GetDataContractsResponse",
163
167
  "GetDocumentHistoryResponse",
@@ -335,6 +339,16 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig {
335
339
  .field_attribute("id", SERDE_WITH_BYTES)
336
340
  .field_attribute("identity_id", SERDE_WITH_BYTES)
337
341
  .field_attribute("ids", SERDE_WITH_BASE64)
342
+ // Wire-format compat for mock vectors captured before the chained
343
+ // surface existed: the field deserializes to its default when
344
+ // absent (same pattern DocumentQuery's own serde defaults follow
345
+ // for pre-SQL-surface fixtures).
346
+ .field_attribute("GetDocumentsRequestV1.chained", SERDE_DEFAULT)
347
+ .field_attribute("GetDocumentsRequestV1.sub_queries", SERDE_DEFAULT)
348
+ // Same compat rule for the typed IN_TIME_RANGE operand: mock
349
+ // vectors captured while the operand still rode `value` carry no
350
+ // `time_range` key.
351
+ .field_attribute("GetDocumentsRequest.WhereClause.time_range", SERDE_DEFAULT)
338
352
  .field_attribute("ResponseMetadata.height", SERDE_WITH_STRING)
339
353
  .field_attribute("ResponseMetadata.time_ms", SERDE_WITH_STRING)
340
354
  .field_attribute("start_at_ms", SERDE_WITH_STRING)