refactor(core): simplify location filesystem (#31545)

This commit is contained in:
Dax
2026-06-09 14:28:45 -04:00
committed by GitHub
parent 0777cf1ccf
commit 132ef57272
73 changed files with 1054 additions and 1422 deletions
+39
View File
@@ -266,6 +266,8 @@ import type {
V2CommandListResponses,
V2EventSubscribeErrors,
V2EventSubscribeResponses,
V2FsFindErrors,
V2FsFindResponses,
V2FsListErrors,
V2FsListResponses,
V2FsReadErrors,
@@ -5601,6 +5603,43 @@ export class Fs extends HeyApiClient {
...params,
})
}
/**
* Find files
*
* Find recursively ranked filesystem entries relative to the requested location.
*/
public find<ThrowOnError extends boolean = false>(
parameters: {
location?: {
directory?: string
workspace?: string
}
query: string
type?: "file" | "directory"
limit?: string
},
options?: Options<never, ThrowOnError>,
) {
const params = buildClientParams(
[parameters],
[
{
args: [
{ in: "query", key: "location" },
{ in: "query", key: "query" },
{ in: "query", key: "type" },
{ in: "query", key: "limit" },
],
},
],
)
return (options?.client ?? this.client).get<V2FsFindResponses, V2FsFindErrors, ThrowOnError>({
url: "/api/fs/find",
...options,
...params,
})
}
}
export class Command2 extends HeyApiClient {