Expose sync resetKey in plugin SDK

This commit is contained in:
2026-06-27 18:46:05 +08:00
parent 3ff01460ac
commit d15e79db13
9 changed files with 9 additions and 4 deletions
+1
View File
@@ -29,6 +29,7 @@ describe('VerstakPluginAPI contract', () => {
expect(typeof api.workbench.editResource).toBe('function');
expect(typeof api.sync.status).toBe('function');
expect(typeof api.sync.configure).toBe('function');
expect(typeof api.sync.resetKey).toBe('function');
expect(typeof api.sync.now).toBe('function');
});
+1
View File
@@ -126,6 +126,7 @@ export interface VerstakPluginAPI {
disconnect(): Promise<void>;
testConnection(serverUrl: string, username: string, password: string): Promise<void>;
setInterval(minutes: number): Promise<void>;
resetKey(): Promise<void>;
now(): Promise<SyncNowResult>;
};
+1
View File
@@ -247,6 +247,7 @@ export function createMockPluginAPI(pluginId = 'test.plugin'): VerstakPluginAPI
disconnect: vi.fn(async () => {}),
testConnection: vi.fn(async () => {}),
setInterval: vi.fn(async () => {}),
resetKey: vi.fn(async () => {}),
now: vi.fn(async () => ({ pushed: 0, pulled: 0, serverSequence: 0 })),
},
dispose: vi.fn(),