updates
This commit is contained in:
+11
-2
@@ -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),
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user