import * as API from "../../common/api"; import { CollectionDoc, Events, QueryParams, Resource, ResourceId, SingleDoc, State, Time } from "../../common/structures"; export declare function document(container: ResourceId): CollectionRequest; export declare function document(container: ResourceId, id: ResourceId): SingleRequest; export interface Collection extends CollectionDoc { data: Instance[]; } export interface Single extends SingleDoc { data: Instance | null; } export interface Log extends SingleDoc { data: { id: ResourceId; events: Events; output: string; type: string; instance: ResourceId; }; } export declare type ContainerState = "starting" | "running" | "stopping" | "stopped" | "deleting" | "deleted" | "error"; export interface Instance extends Resource { hostname: string; state: State; location: Location; environment: ResourceId; container: ResourceId; events: Events & { first_boot: Time; started: Time; }; meta?: { networks?: Network[]; volumes?: Volume[]; }; } export interface Network { id: ResourceId; gateway: string; broadcast: string; name: string; cidr: string; type: string; assignment: { ip: { address: string; mask: number; }; }; instance: string; released: string; claimed: string; } export interface Location { continent: string; country: string; city: string; state: string; } export interface Network { id: ResourceId; gateway: string; broadcast: string; name: string; cidr: string; type: string; assignment: { ip: { address: string; mask: number; }; }; instance: string; released: string; claimed: string; } export interface Volume { container_volume: ResourceId; path: string; password: string; endpoint: string; username: string; remote_access: boolean; } export declare type LogTypes = "startup_process_first" | "startup_process" | "shutdown_process"; export declare class CollectionRequest { private target; constructor(containerId: ResourceId); get(query?: QueryParams): Promise>; } export declare class SingleRequest { private target; constructor(containerId: ResourceId, instanceId: ResourceId); get(query?: QueryParams): Promise>; log(type: LogTypes): { get: (query?: QueryParams | undefined) => Promise>; }; }