use crate::dto::{canister::CanisterInfo, prelude::*};
#[derive(CandidType, Deserialize)]
pub struct AppRegistryResponse(pub Vec<AppRegistryEntry>);
#[derive(CandidType, Deserialize)]
pub struct AppRegistryEntry {
pub subnet_pid: Principal,
pub root_pid: Principal,
}
#[derive(CandidType, Deserialize)]
pub struct SubnetRegistryResponse(pub Vec<SubnetRegistryEntry>);
#[derive(CandidType, Deserialize)]
pub struct SubnetRegistryEntry {
pub pid: Principal,
pub role: CanisterRole,
pub record: CanisterInfo,
}
#[derive(CandidType, Clone, Debug, Deserialize, Eq, PartialEq)]
pub struct AppIndexArgs(pub Vec<IndexEntryInput>);
#[derive(CandidType, Clone, Debug, Deserialize, Eq, PartialEq)]
pub struct SubnetIndexArgs(pub Vec<IndexEntryInput>);
#[derive(CandidType, Clone, Debug, Deserialize, Eq, PartialEq)]
pub struct IndexEntryInput {
pub role: CanisterRole,
pub pid: Principal,
}
#[derive(CandidType, Debug, Deserialize, Eq, PartialEq)]
pub struct IndexEntryResponse {
pub role: CanisterRole,
pub pid: Principal,
}