import type { InferRequestType, InferResponseType } from 'hono/client';
import type { supplierClient } from '../api/supplierClient';

// 供应商响应类型
export type SupplierResponse = InferResponseType<typeof supplierClient.index.$get, 200>;

// 供应商项类型
export type SupplierItem = SupplierResponse['data'][0];

// 创建请求类型
export type CreateRequest = InferRequestType<typeof supplierClient.index.$post>['json'];

// 更新请求类型
export type UpdateRequest = InferRequestType<typeof supplierClient[':id']['$put']>['json'];

// 搜索参数类型
export interface SearchParams {
  page: number;
  limit: number;
  search: string;
}