Files
knowai/api/index.ts
tobegold574 382e3aff21 feat(reset): 以构造器模式重构
- 加了大文件传输自定义分片协议

BREAKING CHANGES: 0.1.0(latest)
2025-11-30 20:27:53 +08:00

44 lines
1.3 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 导出公共接口和常量
export { API_ENDPOINTS } from './common';
export type { ApiError } from './common';
// 导出帖子相关API
export { PostApiService } from './post-api';
// 导出聊天相关API
export { ChatApiService } from './chat-api';
// 导出模型相关API
export { ModelApiService } from './model-api';
// 导出用户相关API
export { UserApiService } from './user-api';
// 导出上传相关API
export { UploadApiService } from './upload-api';
/**
* API模块入口
*
* 本模块提供了所有业务相关的API服务包括
* - 帖子相关:创建、查询、点赞、收藏等操作
* - 聊天相关:会话管理、消息发送与接收
* - 模型相关:模型查询、评论、点赞等
* - 用户相关:登录、注册、个人资料管理
*
* 所有API服务都使用装饰器模式实现通过ApiClientBound装饰器注入HTTP客户端实例
* 使用HTTP方法装饰器GET、POST等定义请求方法和路径
* 通过Request装饰器自动处理请求逻辑。
*/
import { postApi } from './post-api';
import { chatApi } from './chat-api';
import { modelApi } from './model-api';
import { userApi } from './user-api';
import { uploadApi } from './upload-api';
export const api = {
post: postApi,
chat: chatApi,
model: modelApi,
user: userApi,
upload: uploadApi,
};