@solazah/solazah-runtime 0.0.171 → 0.0.173

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solazah/solazah-runtime",
3
- "version": "0.0.171",
3
+ "version": "0.0.173",
4
4
  "main": "index.cjs",
5
5
  "module": "index.js",
6
6
  "types": "types/index.d.ts",
package/types/Mail.d.ts CHANGED
@@ -91,7 +91,6 @@ export default class Mail {
91
91
  messages: {
92
92
  /**
93
93
  * 拉取指定文件夹的邮件头列表(不含正文),按逻辑文件夹寻址。
94
- * 会顺带刷新账户的 lastSyncAt。
95
94
  *
96
95
  * @param accountId 账户唯一标识。
97
96
  * @param folder 逻辑文件夹:`inbox` / `sent` / `drafts` / `trash` / `junk` / `archive`。
package/types/Sync.d.ts CHANGED
@@ -31,6 +31,18 @@ export interface SyncAppliedPayload {
31
31
  db?: boolean;
32
32
  files?: boolean;
33
33
  }
34
+ /** 一条同步变更日志(仅记"有活动/出错"的同步),给账号-同步页排障。 */
35
+ export interface SyncLogEntry {
36
+ at: number;
37
+ reason: string;
38
+ ns: string;
39
+ dbPulled: number;
40
+ dbPushed: number;
41
+ filesPulled: number;
42
+ filesPushed: number;
43
+ ok: boolean;
44
+ error?: string;
45
+ }
34
46
  /**
35
47
  * window.sync —— 数据库/工作空间同步的公共 API(sync.* IPC)。
36
48
  * 状态变更通过 ipcRenderer 的 "sync.statusChanged" 事件推送(渲染层自行监听)。
@@ -51,6 +63,8 @@ export default class Sync {
51
63
  configure: (patch: SyncConfigPatch) => Promise<SyncStatusDto>;
52
64
  /** 立即同步一次,返回最新状态。 */
53
65
  now: () => Promise<SyncStatusDto>;
66
+ /** 读同步变更日志(最新在前),给账号-同步页排障。 */
67
+ getLog: (limit?: number) => Promise<SyncLogEntry[]>;
54
68
  /**
55
69
  * 订阅"同步已应用"(主进程拉到远端 DB/文件变更后广播)→ 据此重拉刷新。返回退订闭包。
56
70
  * 多订阅者共用单条 ipcRenderer 通道(宿主 on 会 removeAllListeners,故在本实例内自行分发)。