mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
refactor: switch from go to bun
This commit is contained in:
41
apps/client/app/api-client/sdk.gen.ts
Normal file
41
apps/client/app/api-client/sdk.gen.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
// This file is auto-generated by @hey-api/openapi-ts
|
||||
|
||||
import type { Options as ClientOptions, TDataShape, Client } from "./client";
|
||||
import type {
|
||||
GetApiV1VolumesData,
|
||||
GetApiV1VolumesResponses,
|
||||
} from "./types.gen";
|
||||
import { client as _heyApiClient } from "./client.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>;
|
||||
};
|
||||
|
||||
/**
|
||||
* List all volumes
|
||||
*/
|
||||
export const getApiV1Volumes = <ThrowOnError extends boolean = false>(
|
||||
options?: Options<GetApiV1VolumesData, ThrowOnError>,
|
||||
) => {
|
||||
return (options?.client ?? _heyApiClient).get<
|
||||
GetApiV1VolumesResponses,
|
||||
unknown,
|
||||
ThrowOnError
|
||||
>({
|
||||
url: "/api/v1/volumes",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user