import type { AuthRoutes, UserRoutes, RoleRoutes, FileRoutes, AreasUserRoutes, LocationsUserRoutes, RoutesRoutes, PassengersRoutes, OrdersRoutes, PaymentRoutes } from '@d8d/server'
import { rpcClient } from './utils/rpc-client'

// 创建各个模块的RPC客户端
// @ts-ignore
export const authClient = rpcClient<AuthRoutes>().api.v1.auth
// @ts-ignore
export const userClient = rpcClient<UserRoutes>().api.v1.users
// @ts-ignore
export const roleClient = rpcClient<RoleRoutes>().api.v1.roles
// @ts-ignore
export const fileClient = rpcClient<FileRoutes>().api.v1.files
// @ts-ignore
export const areaClient = rpcClient<AreasUserRoutes>().api.v1.areas
// @ts-ignore
export const locationClient = rpcClient<LocationsUserRoutes>().api.v1.locations
// @ts-ignore
export const routeClient = rpcClient<RoutesRoutes>().api.v1.routes
// @ts-ignore
export const passengerClient = rpcClient<PassengersRoutes>().api.v1.passengers
// @ts-ignore
export const orderClient = rpcClient<OrdersRoutes>().api.v1.orders
// @ts-ignore
export const paymentClient = rpcClient<PaymentRoutes>().api.v1.payment