feat: Added package management

This commit is contained in:
domrichardson committed 2026-06-24 16:31:51 +01:00
1 parent fab87c82c6
commit 5c91db0d4c
16 files changed
+976 -799

No files matched your search

+14
View File
@@ -1,6 +1,12 @@
export type ServerStatus = "pending" | "active" | "offline";
export type KeySource = "uploaded" | "generated";
export interface PackageUpdate {
name: string;
current_version?: string;
new_version: string;
}
export interface Server {
id: string;
server_id: string;
@@ -11,6 +17,8 @@ export interface Server {
agent_version?: string;
last_seen: string;
created_at: string;
available_updates?: PackageUpdate[];
updates_checked_at?: string;
}
export interface Key {
@@ -127,6 +135,12 @@ export const api = {
});
},
applyUpdates(serverId: string): Promise<{ message: string }> {
return request<{ message: string }>(`/servers/${serverId}/apply-updates`, {
method: "POST",
});
},
// Keys
listKeys(): Promise<Key[]> {
return request<Key[]>("/keys");