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

// 平台列表查询参数类型
export type PlatformSearchParams = {
  page: number;
  pageSize: number;
  keyword?: string;
};


// 分页响应类型
export type PaginatedResponse<T> = {
  data: T[];
  pagination: {
    total: number;
    page: number;
    pageSize: number;
    totalPages: number;
  };
};

// 使用Hono类型推导
export type CreatePlatformRequest = InferRequestType<typeof platformClient.index.$post>['json'];
export type UpdatePlatformRequest = InferRequestType<typeof platformClient[':id']['$put']>['json'];
export type DeletePlatformRequest = InferRequestType<typeof platformClient[':id']['$delete']>['param'];

export type PlatformResponse = InferResponseType<typeof platformClient.index.$get, 200>['data'][0];
export type PlatformListResponse = InferResponseType<typeof platformClient.index.$get, 200>;