updates
Agent Release / build (push) Successful in 44s
Server Deploy / deploy (push) Successful in 1m24s

This commit is contained in:
domrichardson
2026-06-16 10:28:46 +01:00
parent 2166a483ca
commit 4ea7f369f1
9 changed files with 263 additions and 24 deletions
+11 -2
View File
@@ -38,6 +38,14 @@ export interface NewServerResponse {
install_command: string;
}
export interface GenerateKeyOptions {
label: string;
key_type: "ed25519" | "rsa" | "ecdsa";
key_size?: number;
passphrase?: string;
comment?: string;
}
export interface KeyWithAssignments extends Key {
assignments: (Assignment & { server: Server })[];
}
@@ -96,9 +104,10 @@ export const api = {
return request<void>(`/servers/${serverId}`, { method: "DELETE" });
},
generateKeyForServer(serverId: string): Promise<{ key_id: string }> {
return request<{ key_id: string }>(`/servers/${serverId}/generate-key`, {
generateKeyForServer(serverId: string, opts: GenerateKeyOptions): Promise<{ command_id: string }> {
return request<{ command_id: string }>(`/servers/${serverId}/generate-key`, {
method: "POST",
body: JSON.stringify(opts),
});
},