Files
Auto_Bangumi/webui/src/api/setup.ts
Estrella Pan 5382aec8dc feat: add first-run setup wizard with guided configuration
Add a multi-step setup wizard that guides new users through initial
configuration on first run. The wizard covers account credentials,
download client connection (with test), RSS source, media paths,
and optional notification setup.

Backend: new /api/v1/setup/ endpoints with sentinel file mechanism.
Frontend: 7-step wizard with validation and i18n (en/zh-CN).

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-24 08:16:41 +01:00

47 lines
1.0 KiB
TypeScript

import type {
SetupCompleteRequest,
SetupStatus,
TestDownloaderRequest,
TestNotificationRequest,
TestResult,
} from '#/setup';
import type { ApiSuccess } from '#/api';
export const apiSetup = {
async getStatus() {
const { data } = await axios.get<SetupStatus>('api/v1/setup/status');
return data;
},
async testDownloader(config: TestDownloaderRequest) {
const { data } = await axios.post<TestResult>(
'api/v1/setup/test-downloader',
config
);
return data;
},
async testRSS(url: string) {
const { data } = await axios.post<TestResult>('api/v1/setup/test-rss', {
url,
});
return data;
},
async testNotification(config: TestNotificationRequest) {
const { data } = await axios.post<TestResult>(
'api/v1/setup/test-notification',
config
);
return data;
},
async complete(config: SetupCompleteRequest) {
const { data } = await axios.post<ApiSuccess>(
'api/v1/setup/complete',
config
);
return data;
},
};