Integrate api with hey-api

This commit is contained in:
2026-03-06 16:38:04 +05:00
parent 3de38c650b
commit 5a69c6f39f
22 changed files with 2217 additions and 174 deletions

View 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 });