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 AppDirectoryArgs(pub Vec<DirectoryEntryInput>);
#[derive(CandidType, Clone, Debug, Deserialize, Eq, PartialEq)]
pub struct SubnetDirectoryArgs(pub Vec<DirectoryEntryInput>);
#[derive(CandidType, Clone, Debug, Deserialize, Eq, PartialEq)]
pub struct DirectoryEntryInput {
pub role: CanisterRole,
pub pid: Principal,
}
#[derive(CandidType, Debug, Deserialize, Eq, PartialEq)]
pub struct DirectoryEntryResponse {
pub role: CanisterRole,
pub pid: Principal,
}