feat(desktop): drop parked review flow, add publish management
SaaS 侧人工审核后才创建 publish job,desktop 不再做二次审核:移除 manual/waiting_user/parked/from_parked 状态机与 LeaseFromParked 查询, desktop client 只执行发布并新增"发布管理"页(待发布队列 / 历史 / 再次 发送)。同时抽离 @geo/publisher-platforms 共享适配器包、新增 Redis-based desktop_presence 与 publish_record_support,刷新 admin-web 发布弹窗与 媒体库;plan A / spec 文档同步口径。
This commit is contained in:
@@ -80,6 +80,7 @@ export interface DesktopClientInfo {
|
||||
}
|
||||
|
||||
export interface DesktopClientRegisterRequest {
|
||||
client_id?: string;
|
||||
device_name: string;
|
||||
os: string;
|
||||
cpu_arch?: string;
|
||||
@@ -100,6 +101,7 @@ export interface DesktopClientHeartbeatRequest {
|
||||
cpu_arch?: string;
|
||||
client_version?: string;
|
||||
channel?: string;
|
||||
account_ids?: string[];
|
||||
}
|
||||
|
||||
export interface DesktopClientHeartbeatResponse {
|
||||
@@ -118,6 +120,7 @@ export interface DesktopAccountInfo {
|
||||
platform: string;
|
||||
platform_uid: string;
|
||||
display_name: string;
|
||||
avatar_url: string | null;
|
||||
health: "live" | "expired" | "captcha" | "risk";
|
||||
client_id: string | null;
|
||||
account_fingerprint: string | null;
|
||||
@@ -126,6 +129,9 @@ export interface DesktopAccountInfo {
|
||||
sync_version: number;
|
||||
deleted_at: string | null;
|
||||
delete_requested_at: string | null;
|
||||
client_online: boolean | null;
|
||||
client_last_seen_at: string | null;
|
||||
client_device_name: string | null;
|
||||
}
|
||||
|
||||
export interface UpsertDesktopAccountRequest {
|
||||
@@ -133,6 +139,7 @@ export interface UpsertDesktopAccountRequest {
|
||||
platform_uid: string;
|
||||
account_fingerprint?: string | null;
|
||||
display_name: string;
|
||||
avatar_url?: string | null;
|
||||
health: "live" | "expired" | "captcha" | "risk";
|
||||
verified_at?: string | null;
|
||||
tags?: string[];
|
||||
@@ -157,18 +164,32 @@ export interface DesktopTaskInfo {
|
||||
platform: string;
|
||||
kind: "publish" | "monitor";
|
||||
payload: Record<string, JsonValue> | null;
|
||||
status: "queued" | "in_progress" | "waiting_user" | "succeeded" | "failed" | "unknown" | "aborted";
|
||||
status: "queued" | "in_progress" | "succeeded" | "failed" | "unknown" | "aborted";
|
||||
dedup_key: string | null;
|
||||
active_attempt_id: string | null;
|
||||
lease_expires_at: string | null;
|
||||
attempts: number;
|
||||
parked_reason: string | null;
|
||||
result: Record<string, JsonValue> | null;
|
||||
error: Record<string, JsonValue> | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface ListDesktopPublishTasksParams {
|
||||
page?: number;
|
||||
page_size?: number;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export interface DesktopPublishTaskListResponse {
|
||||
items: DesktopTaskInfo[];
|
||||
page: number;
|
||||
page_size: number;
|
||||
total: number;
|
||||
pending_count: number;
|
||||
history_total: number;
|
||||
}
|
||||
|
||||
export interface LeaseDesktopTaskRequest {
|
||||
task_id?: string;
|
||||
kind?: "publish" | "monitor";
|
||||
@@ -185,11 +206,6 @@ export interface ExtendDesktopTaskRequest {
|
||||
lease_token: string;
|
||||
}
|
||||
|
||||
export interface ParkDesktopTaskRequest {
|
||||
lease_token: string;
|
||||
reason: "waiting_user" | "captcha";
|
||||
}
|
||||
|
||||
export interface CompleteDesktopTaskRequest {
|
||||
lease_token: string;
|
||||
status: "succeeded" | "failed" | "unknown";
|
||||
@@ -213,7 +229,6 @@ export interface DesktopTaskEventMessage {
|
||||
| "task_available"
|
||||
| "task_leased"
|
||||
| "task_extended"
|
||||
| "task_parked"
|
||||
| "task_completed"
|
||||
| "task_canceled"
|
||||
| "task_reconciled";
|
||||
@@ -224,7 +239,6 @@ export interface DesktopTaskEventMessage {
|
||||
status:
|
||||
| "queued"
|
||||
| "in_progress"
|
||||
| "waiting_user"
|
||||
| "succeeded"
|
||||
| "failed"
|
||||
| "unknown"
|
||||
@@ -250,7 +264,6 @@ export interface DesktopRuntimeSessionSyncRequest {
|
||||
|
||||
export interface CreatePublishJobAccountRequest {
|
||||
account_id: string;
|
||||
mode: "auto" | "manual";
|
||||
}
|
||||
|
||||
export interface CreatePublishJobRequest {
|
||||
|
||||
Reference in New Issue
Block a user