feat(sources): site center backend (credentials, refresh login, user data, health check, delete)
PUT /sites/{id}/credentials by kind (moved from auth-settings, legacy body
accepted), POST refresh-login (async task or wait), POST health-check,
GET user-data history, DELETE /sites/{id} (soft delete, releases kept),
DELETE /site-accounts/{id}, GET /sites?include=accounts; refreshSiteAccount
task with login-failure decisions and auto re-login on auth_expired;
scheduled jobs sites.user_data (6h) and sites.health_check (1h);
settings.sites defaults for rate limit, snapshot interval, UA and proxy.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
d6fca25679
commit
05a7706dde
15 files changed
+1602
-179
No files matched your search
@@ -33,6 +33,8 @@ import {
|
||||
SiteAccountCreate,
|
||||
SiteAccountUpdate,
|
||||
SiteCreate,
|
||||
SiteListItem,
|
||||
SiteListQuery,
|
||||
SiteUpdate,
|
||||
SourceRelease,
|
||||
TitleAlias,
|
||||
@@ -96,7 +98,15 @@ const TD = ["decisions"];
|
||||
|
||||
export const D = {
|
||||
sites: {
|
||||
list: list("/sites", "站点列表", Site, {}, TS),
|
||||
list: {
|
||||
method: "get" as const,
|
||||
path: "/sites",
|
||||
scope: "read" as const,
|
||||
summary: "站点列表(include=accounts 附带账号与整体账号状态)",
|
||||
tags: TS,
|
||||
query: SiteListQuery,
|
||||
response: cursorPage(SiteListItem),
|
||||
},
|
||||
get: get("/sites/{id}", "站点详情", Site, TS),
|
||||
create: {
|
||||
method: "post" as const,
|
||||
@@ -107,7 +117,7 @@ export const D = {
|
||||
body: SiteCreate,
|
||||
response: Site,
|
||||
},
|
||||
update: write("patch", "/sites/{id}", "admin", "修改站点(启停、快照周期、限流)", SiteUpdate, Site, TS),
|
||||
update: write("patch", "/sites/{id}", "admin", "修改站点(启停、快照周期、限流、代理)", SiteUpdate, Site, TS),
|
||||
},
|
||||
siteAccounts: {
|
||||
list: list("/site-accounts", "站点账号列表", SiteAccount, { siteId: Id.optional() }, TS),
|
||||
|
||||
Reference in new issue
Block a user