refactor(api)!: align client with canonical HTTP contract

Route all feature requests through business API modules, sync generated DTOs, and add communication tests and architecture documentation.

BREAKING CHANGE: migrate the client to plural resource paths, canonical snake_case fields, ISO timestamps, and explicit paginated responses.
This commit is contained in:
2026-09-30 12:04:58 +08:00
parent 00c6eccb63
commit 8ba0212eec
34 changed files with 1137 additions and 1623 deletions
+23 -1
View File
@@ -43,11 +43,33 @@ export default defineConfig([
},
},
{
files: ['*.{js,mjs,cjs,ts,mts,cts}', 'scripts/**/*.{js,mjs,cjs,ts,mts,cts}'],
files: [
'*.{js,mjs,cjs,ts,mts,cts}',
'scripts/**/*.{js,mjs,cjs,ts,mts,cts}',
'tests/**/*.mjs',
],
languageOptions: {
globals: globals.node,
},
},
{
files: ['src/features/**/*.{ts,vue}'],
ignores: ['src/features/*/api.ts', 'src/features/auth/authClient.ts'],
rules: {
'no-restricted-imports': [
'error',
{
paths: [
{
name: '@/lib/api',
importNames: ['apiRequest'],
message: '请通过所属业务的 api.ts 调用接口。',
},
],
},
],
},
},
// Keep formatting in Prettier; this must follow the rule presets.
prettier,
])