feat: file explorer (#1)

* feat: list volume files backend

* feat: file tree component

* feat: load sub folders

* fix: filetree wrong opening order

* temp: open / close icons

* chore: remove all hc files when cleaning

* chore: file-tree optimizations
This commit is contained in:
Nico
2025-10-06 19:46:49 +02:00
committed by GitHub
parent a5e0fb6aa2
commit 1e3419c250
10 changed files with 707 additions and 2 deletions

View File

@@ -41,6 +41,9 @@ import type {
HealthCheckVolumeData,
HealthCheckVolumeResponses,
HealthCheckVolumeErrors,
ListFilesData,
ListFilesResponses,
ListFilesErrors,
} from "./types.gen";
import { client as _heyApiClient } from "./client.gen";
@@ -248,3 +251,13 @@ export const healthCheckVolume = <ThrowOnError extends boolean = false>(
...options,
});
};
/**
* List files in a volume directory
*/
export const listFiles = <ThrowOnError extends boolean = false>(options: Options<ListFilesData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).get<ListFilesResponses, ListFilesErrors, ThrowOnError>({
url: "/api/v1/volumes/{name}/files",
...options,
});
};