1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
use crate::{judged::Judged, HeaderType};
use crate::{EntryType, SignedHeader};
use holo_hash::HeaderHash;
use holochain_serialized_bytes::prelude::*;
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
pub struct GetAgentActivityInput {
pub agent_pubkey: holo_hash::AgentPubKey,
pub chain_query_filter: crate::query::ChainQueryFilter,
pub activity_request: crate::query::ActivityRequest,
}
impl GetAgentActivityInput {
pub fn new(
agent_pubkey: holo_hash::AgentPubKey,
chain_query_filter: crate::query::ChainQueryFilter,
activity_request: crate::query::ActivityRequest,
) -> Self {
Self {
agent_pubkey,
chain_query_filter,
activity_request,
}
}
}
#[derive(serde::Serialize, serde::Deserialize, SerializedBytes, PartialEq, Clone, Debug)]
pub struct DeterministicGetAgentActivityFilter {
pub range: (Option<HeaderHash>, HeaderHash),
pub entry_type: Option<EntryType>,
pub header_type: Option<HeaderType>,
pub include_entries: bool,
}
#[derive(Debug)]
pub struct DeterministicGetAgentActivityResponse {
pub chain: Vec<Judged<SignedHeader>>,
}
impl DeterministicGetAgentActivityResponse {
pub fn new(chain: Vec<Judged<SignedHeader>>) -> Self {
Self { chain }
}
}