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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user