87e329207c
Wires up Baijiahao (百家号) and Jianshu (简书) as first-class desktop publish targets, with risk-control prompts surfaced in the runtime controller and a normalized error message in publish records. Adds external-link buttons in the publish management table, an asset format conversion endpoint for cover image compatibility, and reorders publish-status display priority so failures take precedence over partial successes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
43 lines
1.6 KiB
TypeScript
43 lines
1.6 KiB
TypeScript
import type {
|
|
CreatePublishJobResponse,
|
|
DesktopAccountInfo,
|
|
DesktopPublishTaskListResponse,
|
|
DesktopRuntimeSessionSyncRequest,
|
|
ListDesktopPublishTasksParams,
|
|
} from "@geo/shared-types";
|
|
import type { DesktopObservedRequest } from "../shared/network-debug";
|
|
import type { DesktopRuntimeSnapshot } from "./types";
|
|
|
|
export {};
|
|
|
|
declare global {
|
|
interface Window {
|
|
desktopBridge: {
|
|
app: {
|
|
ping(): Promise<string>;
|
|
deviceInfo(): Promise<{ device_name: string; os: string; cpu_arch: string }>;
|
|
runtimeSnapshot(): Promise<DesktopRuntimeSnapshot>;
|
|
bindPublishAccount(platformId: string): Promise<DesktopAccountInfo>;
|
|
refreshRuntimeAccounts(): Promise<null>;
|
|
openPublishAccountConsole(account: {
|
|
id: string;
|
|
platform: string;
|
|
platformUid: string;
|
|
displayName: string;
|
|
}): Promise<null>;
|
|
unbindPublishAccount(accountId: string, syncVersion: number): Promise<null>;
|
|
listPublishTasks(params?: ListDesktopPublishTasksParams): Promise<DesktopPublishTaskListResponse>;
|
|
retryPublishTask(taskId: string): Promise<CreatePublishJobResponse>;
|
|
openExternalUrl(url: string): Promise<null>;
|
|
syncRuntimeSession(session: DesktopRuntimeSessionSyncRequest | null): Promise<null>;
|
|
releaseRuntimeSession(revoke?: boolean): Promise<null>;
|
|
setWindowMode(mode: "login" | "main"): Promise<null>;
|
|
onRuntimeInvalidated(
|
|
listener: (event: { reason: "account-health"; at: number }) => void,
|
|
): () => void;
|
|
onNetworkObserved(listener: (event: DesktopObservedRequest) => void): () => void;
|
|
};
|
|
};
|
|
}
|
|
}
|