|
@@ -73,42 +73,42 @@ impl From<PrimaryFilter> for Vec<FilterableValue> {
|
|
|
#[derive(Clone, Debug, Serialize, PartialEq, Eq, Hash, Deserialize, Default)]
|
|
|
pub struct Filter {
|
|
|
/// List of transaction IDs to query
|
|
|
- #[serde(skip_serializing_if = "Vec::is_empty")]
|
|
|
+ #[serde(skip_serializing_if = "Vec::is_empty", default)]
|
|
|
pub ids: Vec<TxId>,
|
|
|
/// List of revisions to query
|
|
|
- #[serde(skip_serializing_if = "Vec::is_empty")]
|
|
|
+ #[serde(skip_serializing_if = "Vec::is_empty", default)]
|
|
|
pub revisions: Vec<RevId>,
|
|
|
/// List of accounts to query their transactions
|
|
|
- #[serde(skip_serializing_if = "Vec::is_empty")]
|
|
|
+ #[serde(skip_serializing_if = "Vec::is_empty", default)]
|
|
|
pub accounts: Vec<AccountId>,
|
|
|
/// List of transaction types-kind
|
|
|
- #[serde(rename = "type", skip_serializing_if = "Vec::is_empty")]
|
|
|
+ #[serde(rename = "type", skip_serializing_if = "Vec::is_empty", default)]
|
|
|
pub typ: Vec<Type>,
|
|
|
/// List of statuses to query
|
|
|
- #[serde(skip_serializing_if = "Vec::is_empty")]
|
|
|
+ #[serde(skip_serializing_if = "Vec::is_empty", default)]
|
|
|
pub status: Vec<Status>,
|
|
|
/// List of transactions by tags
|
|
|
- #[serde(skip_serializing_if = "Vec::is_empty")]
|
|
|
+ #[serde(skip_serializing_if = "Vec::is_empty", default)]
|
|
|
pub tags: Vec<Tag>,
|
|
|
/// List transactions newer than this timestamp
|
|
|
#[serde(
|
|
|
- default,
|
|
|
with = "option_ts_seconds",
|
|
|
- skip_serializing_if = "Option::is_none"
|
|
|
+ skip_serializing_if = "Option::is_none",
|
|
|
+ default
|
|
|
)]
|
|
|
pub since: Option<DateTime<Utc>>,
|
|
|
/// List transactions upto this timestamp
|
|
|
#[serde(
|
|
|
- default,
|
|
|
with = "option_ts_seconds",
|
|
|
- skip_serializing_if = "Option::is_none"
|
|
|
+ skip_serializing_if = "Option::is_none",
|
|
|
+ default
|
|
|
)]
|
|
|
pub until: Option<DateTime<Utc>>,
|
|
|
/// Limit for transactions
|
|
|
- #[serde(default, skip_serializing_if = "is_zero")]
|
|
|
+ #[serde(skip_serializing_if = "is_zero", default)]
|
|
|
pub limit: usize,
|
|
|
/// Skip the first `skip` transactions
|
|
|
- #[serde(default, skip_serializing_if = "is_zero")]
|
|
|
+ #[serde(skip_serializing_if = "is_zero", default)]
|
|
|
pub skip: usize,
|
|
|
}
|
|
|
|