feat: add Z12/Z13 bind APIs, stock import, and sync docs

Enable auto default sync channels on agent activate, bind-code/phone confirm flows, publish ALTER, and align admin/yuheng docs with the production bind path.
This commit is contained in:
whm
2026-08-05 11:47:20 +08:00
parent b04b180d30
commit cb56e6847e
31 changed files with 1882 additions and 91 deletions

View File

@@ -296,6 +296,25 @@ export async function listApps(session: Session) {
};
}
/** Z9e为本租户已发布模块补齐 import/export一键开启导入 */
export async function ensureAppsImport(session: Session, dryRun = false) {
const q = dryRun ? "?dry_run=1" : "";
const res = await apiFetch(`${PLATFORM}/api/v1/admin/apps/ensure-import${q}`, {
method: "POST",
headers: { Authorization: `Bearer ${session.accessToken}` },
});
const data = await readJson(res);
throwIfBad(res, data, "一键开启导入失败");
return data as {
scanned: number;
updated: number;
skipped: number;
dry_run: boolean;
updated_slugs?: string[];
message?: string;
};
}
export async function saveDraft(session: Session, slug: string, blueprint: any) {
const res = await apiFetch(`${PLATFORM}/api/v1/apps/${slug}/draft`, {
method: "PUT",