import { loginApi } from './Login';
import { menuApi } from './Menu';
import { postApi } from './Post';
import { roleApi } from './Role';
import { rolePageApi, pageUiComponentApi } from './RolePage';
import { dictTypeApi } from './DictType';
import { dictDataApi } from './DictData';
import { userApi } from './user';
import { userPermissionApi } from './user/permission';
import { userImportApi } from './user/import';
import { userCharacteristicApi } from './user/characteristic';
import { userProfileApi } from './user/profile';
import { systemApi } from './System';
import { hardwareApi } from './Hardware';
import { deptApi } from './dept';
import { padLockApi } from './PadLock';
import { padLockTypeApi } from './PadLockType';
import { lockCabinetApi } from './lockCabinet';
import { workstationApi } from './workstation';
import { fileApi } from './file';
import { mailNotifyConfigApi } from './mailNotifyConfig';
import { emailTemplateApi } from './emailTemplate';
import { cockpitApi } from './cockpit';
import { workflowDesignApi } from './WorkflowDesign';
import { workJobApi } from './WorkJob';
import { workHandleApi } from './WorkHandle';
import { managerHomeApi } from './managerHome';
import { in_site } from './notification/in_site';
import { app_message } from './notification/app_message';
import { materialApi } from './material';

// API 响应类型
export interface ApiResponse<T = any> {
  code: number;
  data: T;
  message: string;
}

// 导出所有 API 模块
export { loginApi } from './Login';
export { menuApi } from './Menu';
export { postApi } from './Post';
export { roleApi } from './Role';
export { rolePageApi, pageUiComponentApi } from './RolePage';
export { dictTypeApi } from './DictType';
export { dictDataApi } from './DictData';
export { userApi } from './user';
export { userPermissionApi } from './user/permission';
export { userImportApi } from './user/import';
export { userCharacteristicApi } from './user/characteristic';
export { userProfileApi } from './user/profile';
export { systemApi } from './System';
export { hardwareApi } from './Hardware';
export { deptApi } from './dept';
export { padLockApi } from './PadLock';
export { padLockTypeApi } from './PadLockType';
export { lockCabinetApi } from './lockCabinet';
export { workstationApi } from './workstation';
export { fileApi } from './file';
export { mailNotifyConfigApi } from './mailNotifyConfig';
export { emailTemplateApi } from './emailTemplate';
export { workflowDesignApi } from './WorkflowDesign';
export { workJobApi } from './WorkJob';
export { workHandleApi } from './WorkHandle';
export { managerHomeApi } from './managerHome';
export { in_site, type NotifyMessageVO, type NotifyMessageQueryParams } from './notification/in_site';
export { app_message } from './notification/app_message';
export { materialApi } from './material';
export type { NotifyMessageVO as AppNotifyMessageVO, NotifyMessageQueryParams as AppNotifyMessageQueryParams } from './notification/app_message';

// 为了兼容旧代码，导出 authApi 作为 loginApi 的别名
export { loginApi as authApi } from './Login';

// 默认导出所有 API
export default {
  login: loginApi,
  auth: loginApi, // 兼容旧代码
  menu: menuApi,
  post: postApi,
  role: roleApi,
  rolePage: rolePageApi,
  pageUiComponent: pageUiComponentApi,
  dictType: dictTypeApi,
  dictData: dictDataApi,
  user: userApi,
  userPermission: userPermissionApi,
  userImport: userImportApi,
  userCharacteristic: userCharacteristicApi,
  userProfile: userProfileApi,
  system: systemApi,
  hardware: hardwareApi,
  dept: deptApi,
  padLock: padLockApi,
  padLockType: padLockTypeApi,
  lockCabinet: lockCabinetApi,
  workstation: workstationApi,
  file: fileApi,
  mailNotifyConfig: mailNotifyConfigApi,
  emailTemplate: emailTemplateApi,
  cockpit: cockpitApi,
  workflowDesign: workflowDesignApi,
  workJob: workJobApi,
  workHandle: workHandleApi,
  managerHome: managerHomeApi,
  in_site: in_site,
  app_message: app_message,
  material: materialApi,
};

