feat: hey-api and projects fetch

This commit is contained in:
2025-08-03 11:07:56 +04:00
parent 459487a896
commit 3e1d544b33
26 changed files with 1825 additions and 684 deletions

39
src/client/sdk.gen.ts Normal file
View File

@ -0,0 +1,39 @@
// This file is auto-generated by @hey-api/openapi-ts
import type { Client, Options as ClientOptions, TDataShape } from "./client";
import { client as _heyApiClient } from "./client.gen";
import type { GetProjectsData, GetProjectsResponses } from "./types.gen";
export type Options<
TData extends TDataShape = TDataShape,
ThrowOnError extends boolean = boolean,
> = ClientOptions<TData, ThrowOnError> & {
/**
* You can provide a client instance returned by `createClient()` instead of
* individual options. This might be also useful if you want to implement a
* custom client.
*/
client?: Client;
/**
* You can pass arbitrary values through the `meta` object. This can be
* used to access values that aren't defined as part of the SDK function.
*/
meta?: Record<string, unknown>;
};
/**
* Get Projects
*/
export const getProjects = <ThrowOnError extends boolean = false>(
options?: Options<GetProjectsData, ThrowOnError>
) => {
return (options?.client ?? _heyApiClient).get<
GetProjectsResponses,
unknown,
ThrowOnError
>({
responseType: "json",
url: "/project/",
...options,
});
};