Integrate api with hey-api
This commit is contained in:
24
app/openapi/generated/sdk.gen.ts
Normal file
24
app/openapi/generated/sdk.gen.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
// This file is auto-generated by @hey-api/openapi-ts
|
||||
|
||||
import type { Client, Composable, Options as Options2, TDataShape } from './client';
|
||||
import { client } from './client.gen';
|
||||
import type { GetSearchData, GetSearchResponse } from './types.gen';
|
||||
|
||||
export type Options<TComposable extends Composable = '$fetch', TData extends TDataShape = TDataShape, ResT = unknown, DefaultT = undefined> = Options2<TComposable, TData, ResT, DefaultT> & {
|
||||
/**
|
||||
* 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>;
|
||||
};
|
||||
|
||||
/**
|
||||
* Search
|
||||
*/
|
||||
export const getSearch = <TComposable extends Composable = '$fetch', DefaultT extends GetSearchResponse = GetSearchResponse>(options: Options<TComposable, GetSearchData, GetSearchResponse, DefaultT>) => (options.client ?? client).get<TComposable, GetSearchResponse | DefaultT, unknown, DefaultT>({ url: '/search', ...options });
|
||||
Reference in New Issue
Block a user