type AddAgentDataType = { agentName: string; description: string; }; type UpdateAgentDataType = { agentKey: string; } & AddAgentDataType; type AgentKeyParam = { agentKey: string; }; type RevokeAPIKeyParam = { agentKey: string; id: string; }; type DeleteSMTPPasswordParam = { agentKey: string; passwordId: string; }; interface Agent { mailagent_key: string; mailagent_name: string; description: string; created_time: string; status: "active" | "inactive" | "blocked" | "shutdown"; } /** Shape of an entry returned by the list API-keys endpoint. */ interface AgentAPIKeyItem { id: string; /** The masked/full API key string. */ apikey: string; username: string; created_time: string; } /** Shape returned when generating an API key or SMTP password (contains plaintext `password`). */ interface AgentCredential { id: string; password: string; username: string; created_time: string; } interface GetAllAgentsResponse { data: Agent[]; status: "success"; } interface AgentDetailResponse { data: Agent; status: "success"; } interface GetAPIKeysResponse { data: AgentAPIKeyItem[]; status: "success"; } interface GenerateAPIKeyResponse { data: AgentCredential; status: "success"; } interface GetSMTPListResponse { data: AgentCredential[]; status: "success"; } interface GenerateSMTPPasswordResponse { data: AgentCredential; status: "success"; } export type { ResponseType } from "../BaseModel/types"; export type { AddAgentDataType, UpdateAgentDataType, AgentKeyParam, RevokeAPIKeyParam, DeleteSMTPPasswordParam, Agent, AgentAPIKeyItem, AgentCredential, GetAllAgentsResponse, AgentDetailResponse, GetAPIKeysResponse, GenerateAPIKeyResponse, GetSMTPListResponse, GenerateSMTPPasswordResponse };