use crate::{judged::Judged, ActionType};
use crate::{EntryType, SignedAction};
use holo_hash::ActionHash;
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<ActionHash>, ActionHash),
pub entry_type: Option<EntryType>,
pub action_type: Option<ActionType>,
pub include_entries: bool,
}
#[derive(Debug)]
pub struct DeterministicGetAgentActivityResponse {
pub chain: Vec<Judged<SignedAction>>,
}
impl DeterministicGetAgentActivityResponse {
pub fn new(chain: Vec<Judged<SignedAction>>) -> Self {
Self { chain }
}
}