import { DefineApiModule, ApiMap } from '@/api/api'

const apiModules = import.meta.glob<Record<'default', object>>('./*.ts', { eager: true })

export default Object.values(apiModules).reduce((maps, module) => {
  return {
    ...maps,
    ...(module.default || {}),
  }
}, {}) as DefineApiModule<ApiMap>
