import { LowSync } from 'lowdb/lib'; import { Flow } from '@nosana/sdk'; import { CudaCheckSuccessResponse } from '../types/index.js'; export type NodeDb = { flows: { [key: string]: Flow; }; resources: Resources; info: { version: string; country: string; network: { ip: string; ping_ms: number; download_mbps: number; upload_mbps: number; }; system_environment: string; cpu: { model: string; physical_cores: number; logical_cores: number; }; disk_gb: number; ram_mb: number; gpus: CudaCheckSuccessResponse; protocol: string; }; }; export type Resources = { images: { [key: string]: ResourceHistory; }; volumes: { [key: string]: VolumeResource; }; }; export type ResourceHistory = { lastUsed: Date; usage: number; required: boolean; isPrivate?: boolean; }; export type VolumeResource = ResourceHistory & { volume: string; /** * True from the moment the Docker volume is created until its download * completes. The entry is written before the download starts so that a * crash mid-download cannot orphan the volume: a pending entry is resynced * when its resource is requested again, and expired like any other entry * otherwise. Absent on entries written before this field existed. */ pending?: boolean; }; export declare class DB { db: LowSync; constructor(configLocation: string); }