Skip to main content

ic_query/sns/report/model/requests/
neurons.rs

1//! Module: sns::report::model::requests::neurons
2//!
3//! Responsibility: request DTOs for SNS neuron reports and cache commands.
4//! Does not own: command option parsing, cache storage, or live neuron fetches.
5//! Boundary: carries validated neuron inputs into SNS report builders.
6
7use crate::sns::report::SnsNeuronsSort;
8use std::path::PathBuf;
9
10///
11/// SnsNeuronsCacheListRequest
12///
13/// Request accepted by the local SNS neuron cache list report builder.
14///
15
16#[derive(Clone, Debug, Eq, PartialEq)]
17pub struct SnsNeuronsCacheListRequest {
18    pub network: String,
19    pub icp_root: PathBuf,
20}
21
22///
23/// SnsNeuronsCacheStatusRequest
24///
25/// Request accepted by the local SNS neuron cache status report builder.
26///
27
28#[derive(Clone, Debug, Eq, PartialEq)]
29pub struct SnsNeuronsCacheStatusRequest {
30    pub network: String,
31    pub icp_root: PathBuf,
32    pub input: String,
33}
34
35///
36/// SnsNeuronsRequest
37///
38/// Request accepted by the SNS neuron listing report builder.
39///
40
41#[derive(Clone, Debug, Eq, PartialEq)]
42pub struct SnsNeuronsRequest {
43    pub network: String,
44    pub source_endpoint: String,
45    pub now_unix_secs: u64,
46    pub input: String,
47    pub limit: u32,
48    pub owner_principal_id: Option<String>,
49    pub sort: SnsNeuronsSort,
50    pub icp_root: Option<PathBuf>,
51    pub verbose: bool,
52}
53
54///
55/// SnsNeuronsRefreshRequest
56///
57/// Request accepted by the complete SNS neuron snapshot refresh builder.
58///
59
60#[derive(Clone, Debug, Eq, PartialEq)]
61pub struct SnsNeuronsRefreshRequest {
62    pub network: String,
63    pub source_endpoint: String,
64    pub now_unix_secs: u64,
65    pub input: String,
66    pub icp_root: PathBuf,
67    pub page_size: u32,
68    pub max_pages: Option<u32>,
69}