Files
HostKeeper/template/src/types.ts
T
2026-07-07 11:53:16 +07:00

62 lines
1.4 KiB
TypeScript

export type ViewType = 'hosts' | 'sftp' | 'snippets' | 'keychain' | 'terminal' | 'settings';
export interface Host {
id: string;
name: string;
ip: string;
os: 'Ubuntu 22.04' | 'Debian 11' | 'Windows Server' | 'macOS Ventura' | 'CentOS 7' | 'Alpine Linux';
provider: 'AWS US-East' | 'GCP Cloud' | 'Hetzner' | 'Vercel Proxy' | 'Local Docker' | 'Bare Metal';
status: 'active' | 'offline';
lastSeen: string;
type: 'api' | 'db' | 'edge' | 'web' | 'desktop' | 'server';
}
export interface FileItem {
name: string;
size: string;
modified: string;
type: 'folder' | 'file' | 'image' | 'code' | 'lock';
extension?: string;
}
export interface Snippet {
id: string;
title: string;
description: string;
code: string;
tags: string[];
collection: 'favorites' | 'recent' | 'trash';
updatedAt: string;
icon: string;
}
export interface KeychainItem {
id: string;
name: string;
type: 'SSH RSA' | 'PASSWORD' | 'ED25519' | 'Bearer Token' | 'AWS Key';
user: string;
lastUsed: string;
strength: 'secure' | 'weak' | 'moderate';
fingerprint?: string;
passphrase?: string;
connectedHosts?: string[];
keyFile?: string;
}
export interface Device {
id: string;
name: string;
type: 'desktop' | 'tablet' | 'mobile';
status: 'online' | 'offline';
}
export interface BackgroundTransfer {
id: string;
fileName: string;
source: string;
destination: string;
progress: number;
speed: string;
type: 'upload' | 'download';
}