Skip to main content

ic_query/sns/report/model/reports/proposals/
report.rs

1//! Module: sns::report::model::reports::proposals::report
2//!
3//! Responsibility: define SNS proposal list and detail report DTOs.
4//! Does not own: live governance calls, row conversion, cache reads, or rendering.
5//! Boundary: preserves report-level fields for text and JSON output.
6
7use super::row::SnsProposalRow;
8
9use serde::Serialize;
10
11///
12/// SnsProposalReport
13///
14/// Serializable report for one SNS governance proposal detail lookup.
15///
16
17#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
18pub struct SnsProposalReport {
19    pub schema_version: u32,
20    pub network: String,
21    pub sns_wasm_canister_id: String,
22    pub fetched_at: String,
23    pub source_endpoint: String,
24    pub fetched_by: String,
25    pub id: usize,
26    pub name: String,
27    pub root_canister_id: String,
28    pub governance_canister_id: String,
29    pub proposal_id: u64,
30    pub verbose: bool,
31    pub show_ballots: bool,
32    pub data_source: String,
33    pub cache_path: Option<String>,
34    pub cache_complete: Option<bool>,
35    pub proposal: SnsProposalRow,
36}
37
38///
39/// SnsProposalsReport
40///
41/// Serializable report for a bounded SNS governance proposal listing.
42///
43
44#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
45pub struct SnsProposalsReport {
46    pub schema_version: u32,
47    pub network: String,
48    pub sns_wasm_canister_id: String,
49    pub fetched_at: String,
50    pub source_endpoint: String,
51    pub fetched_by: String,
52    pub id: usize,
53    pub name: String,
54    pub root_canister_id: String,
55    pub governance_canister_id: String,
56    pub requested_limit: u32,
57    pub before_proposal_id: Option<u64>,
58    pub status_filter: String,
59    pub topic_filter: String,
60    pub eligibility_filter: String,
61    pub proposer_filter: Option<String>,
62    pub query_filter: Option<String>,
63    pub sort: String,
64    pub sort_direction: String,
65    pub verbose: bool,
66    pub data_source: String,
67    pub cache_path: Option<String>,
68    pub cache_complete: Option<bool>,
69    pub proposal_count: usize,
70    pub proposals: Vec<SnsProposalRow>,
71}