feat(portal-shell): add lib/api skeleton with errors and types
M1 Task 1: 创建 4 层数据抽象层的骨架文件 - errors.ts: ApiError + GraphQLErrorCode 枚举 - types.ts: Pagination / PaginatedResult / UseQueryResult / UseMutationResult - internal.ts: normalizeError 把 ApolloError 转为 ApiError - index.ts: barrel 出口
This commit is contained in:
10
apps/portal-shell/src/lib/api/index.ts
Normal file
10
apps/portal-shell/src/lib/api/index.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* API 层统一出口
|
||||
*
|
||||
* widget 通过 `import { useParentChildren } from "@/lib/api"` 调用。
|
||||
* 各 domain 文件在 M2 阶段逐步加入。
|
||||
*
|
||||
* 关联:spec §2.2
|
||||
*/
|
||||
export * from "./errors";
|
||||
export * from "./types";
|
||||
Reference in New Issue
Block a user