@haex-space/vault-sdk 2.5.30 → 2.5.32

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.
@@ -87,6 +87,25 @@ interface FileInfo {
87
87
  createdAt: string;
88
88
  updatedAt: string;
89
89
  }
90
+ /** Local file info (unencrypted, scanned from local filesystem) */
91
+ interface LocalFileInfo {
92
+ /** Unique ID (hash of rule_id + relative path) */
93
+ id: string;
94
+ /** File name */
95
+ name: string;
96
+ /** Full local path */
97
+ path: string;
98
+ /** Relative path from sync root */
99
+ relativePath: string;
100
+ /** MIME type (null for directories) */
101
+ mimeType: string | null;
102
+ /** File size in bytes */
103
+ size: number;
104
+ /** Whether this is a directory */
105
+ isDirectory: boolean;
106
+ /** Last modified timestamp (ISO 8601) */
107
+ modifiedAt: string | null;
108
+ }
90
109
  type FileSyncState = "synced" | "syncing" | "localOnly" | "remoteOnly" | "conflict" | "error";
91
110
  interface StorageBackendInfo {
92
111
  id: string;
@@ -161,6 +180,12 @@ interface ListFilesOptions {
161
180
  path?: string;
162
181
  recursive?: boolean;
163
182
  }
183
+ interface ScanLocalOptions {
184
+ /** Sync rule ID to scan */
185
+ ruleId: string;
186
+ /** Optional subpath within the sync root to scan */
187
+ subpath?: string;
188
+ }
164
189
  interface UploadFileOptions {
165
190
  spaceId: string;
166
191
  localPath: string;
@@ -195,6 +220,11 @@ declare class FileSyncAPI {
195
220
  * List files in a space
196
221
  */
197
222
  listFilesAsync(options: ListFilesOptions): Promise<FileInfo[]>;
223
+ /**
224
+ * Scan local files in a sync rule folder
225
+ * Returns unencrypted local files for display in the UI
226
+ */
227
+ scanLocalAsync(options: ScanLocalOptions): Promise<LocalFileInfo[]>;
198
228
  /**
199
229
  * Get file info by ID
200
230
  */
@@ -87,6 +87,25 @@ interface FileInfo {
87
87
  createdAt: string;
88
88
  updatedAt: string;
89
89
  }
90
+ /** Local file info (unencrypted, scanned from local filesystem) */
91
+ interface LocalFileInfo {
92
+ /** Unique ID (hash of rule_id + relative path) */
93
+ id: string;
94
+ /** File name */
95
+ name: string;
96
+ /** Full local path */
97
+ path: string;
98
+ /** Relative path from sync root */
99
+ relativePath: string;
100
+ /** MIME type (null for directories) */
101
+ mimeType: string | null;
102
+ /** File size in bytes */
103
+ size: number;
104
+ /** Whether this is a directory */
105
+ isDirectory: boolean;
106
+ /** Last modified timestamp (ISO 8601) */
107
+ modifiedAt: string | null;
108
+ }
90
109
  type FileSyncState = "synced" | "syncing" | "localOnly" | "remoteOnly" | "conflict" | "error";
91
110
  interface StorageBackendInfo {
92
111
  id: string;
@@ -161,6 +180,12 @@ interface ListFilesOptions {
161
180
  path?: string;
162
181
  recursive?: boolean;
163
182
  }
183
+ interface ScanLocalOptions {
184
+ /** Sync rule ID to scan */
185
+ ruleId: string;
186
+ /** Optional subpath within the sync root to scan */
187
+ subpath?: string;
188
+ }
164
189
  interface UploadFileOptions {
165
190
  spaceId: string;
166
191
  localPath: string;
@@ -195,6 +220,11 @@ declare class FileSyncAPI {
195
220
  * List files in a space
196
221
  */
197
222
  listFilesAsync(options: ListFilesOptions): Promise<FileInfo[]>;
223
+ /**
224
+ * Scan local files in a sync rule folder
225
+ * Returns unencrypted local files for display in the UI
226
+ */
227
+ scanLocalAsync(options: ScanLocalOptions): Promise<LocalFileInfo[]>;
198
228
  /**
199
229
  * Get file info by ID
200
230
  */
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as HaexVaultSdk } from './client-1LC_-rtY.mjs';
2
- export { A as AddBackendOptions, m as AddSyncRuleOptions, B as BackendConfig, C as CreateSpaceOptions, D as DatabaseAPI, o as DownloadFileOptions, p as FILE_SYNC_STATE, c as FileInfo, b as FileSpace, a as FileSyncAPI, d as FileSyncState, F as FilesystemAPI, L as ListFilesOptions, P as PermissionsAPI, g as S3BackendConfig, r as STORAGE_BACKEND_TYPE, q as SYNC_DIRECTION, e as StorageBackendInfo, f as StorageBackendType, i as SyncDirection, k as SyncError, l as SyncProgress, h as SyncRule, j as SyncStatus, U as UpdateSyncRuleOptions, n as UploadFileOptions, W as WebAPI } from './client-1LC_-rtY.mjs';
1
+ import { H as HaexVaultSdk } from './client-jH1y-T2e.mjs';
2
+ export { A as AddBackendOptions, m as AddSyncRuleOptions, B as BackendConfig, C as CreateSpaceOptions, D as DatabaseAPI, o as DownloadFileOptions, p as FILE_SYNC_STATE, c as FileInfo, b as FileSpace, a as FileSyncAPI, d as FileSyncState, F as FilesystemAPI, L as ListFilesOptions, P as PermissionsAPI, g as S3BackendConfig, r as STORAGE_BACKEND_TYPE, q as SYNC_DIRECTION, e as StorageBackendInfo, f as StorageBackendType, i as SyncDirection, k as SyncError, l as SyncProgress, h as SyncRule, j as SyncStatus, U as UpdateSyncRuleOptions, n as UploadFileOptions, W as WebAPI } from './client-jH1y-T2e.mjs';
3
3
  import { E as ExtensionManifest, H as HaexHubConfig } from './types-DiXJ5SF6.mjs';
4
4
  export { A as ApplicationContext, t as AuthorizedClient, B as BlockedClient, C as ContextChangedEvent, F as DEFAULT_TIMEOUT, o as DatabaseColumnInfo, m as DatabaseExecuteParams, k as DatabasePermission, d as DatabasePermissionRequest, l as DatabaseQueryParams, D as DatabaseQueryResult, n as DatabaseTableInfo, U as EXTERNAL_EVENTS, z as ErrorCode, g as EventCallback, a as ExtensionInfo, v as ExternalAuthDecision, x as ExternalConnection, J as ExternalConnectionErrorCode, I as ExternalConnectionState, V as ExternalEvent, s as ExternalRequest, r as ExternalRequestEvent, e as ExternalRequestHandler, f as ExternalResponse, O as HAEXTENSION_EVENTS, j as HaexHubEvent, h as HaexHubRequest, i as HaexHubResponse, N as HaexVaultSdkError, Q as HaextensionEvent, u as PendingAuthorization, P as PermissionResponse, y as PermissionStatus, R as RequestedExtension, p as SearchQuery, q as SearchRequestEvent, S as SearchResult, w as SessionAuthorization, T as TABLE_SEPARATOR, W as WebRequestOptions, c as WebResponse, L as canExternalClientSendRequests, G as getTableName, K as isExternalClientConnected } from './types-DiXJ5SF6.mjs';
5
5
  export { H as HaextensionConfig } from './config-D_HXjsEV.mjs';
@@ -126,6 +126,7 @@ declare const HAEXTENSION_METHODS: {
126
126
  readonly resumeSync: "haextension:filesystem:sync:resume-sync";
127
127
  readonly resolveConflict: "haextension:filesystem:sync:resolve-conflict";
128
128
  readonly selectFolder: "haextension:filesystem:sync:select-folder";
129
+ readonly scanLocal: "haextension:filesystem:sync:scan-local";
129
130
  };
130
131
  };
131
132
  readonly storage: {
@@ -229,6 +230,7 @@ declare const TAURI_COMMANDS: {
229
230
  readonly resumeSync: "filesync_resume_sync";
230
231
  readonly resolveConflict: "filesync_resolve_conflict";
231
232
  readonly selectFolder: "filesync_select_folder";
233
+ readonly scanLocal: "filesync_scan_local";
232
234
  };
233
235
  };
234
236
  type TauriCommand = (typeof TAURI_COMMANDS.database)[keyof typeof TAURI_COMMANDS.database] | (typeof TAURI_COMMANDS.permissions)[keyof typeof TAURI_COMMANDS.permissions] | (typeof TAURI_COMMANDS.web)[keyof typeof TAURI_COMMANDS.web] | (typeof TAURI_COMMANDS.filesystem)[keyof typeof TAURI_COMMANDS.filesystem] | (typeof TAURI_COMMANDS.external)[keyof typeof TAURI_COMMANDS.external] | (typeof TAURI_COMMANDS.extension)[keyof typeof TAURI_COMMANDS.extension] | (typeof TAURI_COMMANDS.filesync)[keyof typeof TAURI_COMMANDS.filesync];
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as HaexVaultSdk } from './client-LNxaanOT.js';
2
- export { A as AddBackendOptions, m as AddSyncRuleOptions, B as BackendConfig, C as CreateSpaceOptions, D as DatabaseAPI, o as DownloadFileOptions, p as FILE_SYNC_STATE, c as FileInfo, b as FileSpace, a as FileSyncAPI, d as FileSyncState, F as FilesystemAPI, L as ListFilesOptions, P as PermissionsAPI, g as S3BackendConfig, r as STORAGE_BACKEND_TYPE, q as SYNC_DIRECTION, e as StorageBackendInfo, f as StorageBackendType, i as SyncDirection, k as SyncError, l as SyncProgress, h as SyncRule, j as SyncStatus, U as UpdateSyncRuleOptions, n as UploadFileOptions, W as WebAPI } from './client-LNxaanOT.js';
1
+ import { H as HaexVaultSdk } from './client-Crs2CqUM.js';
2
+ export { A as AddBackendOptions, m as AddSyncRuleOptions, B as BackendConfig, C as CreateSpaceOptions, D as DatabaseAPI, o as DownloadFileOptions, p as FILE_SYNC_STATE, c as FileInfo, b as FileSpace, a as FileSyncAPI, d as FileSyncState, F as FilesystemAPI, L as ListFilesOptions, P as PermissionsAPI, g as S3BackendConfig, r as STORAGE_BACKEND_TYPE, q as SYNC_DIRECTION, e as StorageBackendInfo, f as StorageBackendType, i as SyncDirection, k as SyncError, l as SyncProgress, h as SyncRule, j as SyncStatus, U as UpdateSyncRuleOptions, n as UploadFileOptions, W as WebAPI } from './client-Crs2CqUM.js';
3
3
  import { E as ExtensionManifest, H as HaexHubConfig } from './types-DiXJ5SF6.js';
4
4
  export { A as ApplicationContext, t as AuthorizedClient, B as BlockedClient, C as ContextChangedEvent, F as DEFAULT_TIMEOUT, o as DatabaseColumnInfo, m as DatabaseExecuteParams, k as DatabasePermission, d as DatabasePermissionRequest, l as DatabaseQueryParams, D as DatabaseQueryResult, n as DatabaseTableInfo, U as EXTERNAL_EVENTS, z as ErrorCode, g as EventCallback, a as ExtensionInfo, v as ExternalAuthDecision, x as ExternalConnection, J as ExternalConnectionErrorCode, I as ExternalConnectionState, V as ExternalEvent, s as ExternalRequest, r as ExternalRequestEvent, e as ExternalRequestHandler, f as ExternalResponse, O as HAEXTENSION_EVENTS, j as HaexHubEvent, h as HaexHubRequest, i as HaexHubResponse, N as HaexVaultSdkError, Q as HaextensionEvent, u as PendingAuthorization, P as PermissionResponse, y as PermissionStatus, R as RequestedExtension, p as SearchQuery, q as SearchRequestEvent, S as SearchResult, w as SessionAuthorization, T as TABLE_SEPARATOR, W as WebRequestOptions, c as WebResponse, L as canExternalClientSendRequests, G as getTableName, K as isExternalClientConnected } from './types-DiXJ5SF6.js';
5
5
  export { H as HaextensionConfig } from './config-D_HXjsEV.js';
@@ -126,6 +126,7 @@ declare const HAEXTENSION_METHODS: {
126
126
  readonly resumeSync: "haextension:filesystem:sync:resume-sync";
127
127
  readonly resolveConflict: "haextension:filesystem:sync:resolve-conflict";
128
128
  readonly selectFolder: "haextension:filesystem:sync:select-folder";
129
+ readonly scanLocal: "haextension:filesystem:sync:scan-local";
129
130
  };
130
131
  };
131
132
  readonly storage: {
@@ -229,6 +230,7 @@ declare const TAURI_COMMANDS: {
229
230
  readonly resumeSync: "filesync_resume_sync";
230
231
  readonly resolveConflict: "filesync_resolve_conflict";
231
232
  readonly selectFolder: "filesync_select_folder";
233
+ readonly scanLocal: "filesync_scan_local";
232
234
  };
233
235
  };
234
236
  type TauriCommand = (typeof TAURI_COMMANDS.database)[keyof typeof TAURI_COMMANDS.database] | (typeof TAURI_COMMANDS.permissions)[keyof typeof TAURI_COMMANDS.permissions] | (typeof TAURI_COMMANDS.web)[keyof typeof TAURI_COMMANDS.web] | (typeof TAURI_COMMANDS.filesystem)[keyof typeof TAURI_COMMANDS.filesystem] | (typeof TAURI_COMMANDS.external)[keyof typeof TAURI_COMMANDS.external] | (typeof TAURI_COMMANDS.extension)[keyof typeof TAURI_COMMANDS.extension] | (typeof TAURI_COMMANDS.filesync)[keyof typeof TAURI_COMMANDS.filesync];
package/dist/index.js CHANGED
@@ -517,7 +517,8 @@ var HAEXTENSION_METHODS = {
517
517
  // Conflict Resolution
518
518
  resolveConflict: "haextension:filesystem:sync:resolve-conflict",
519
519
  // UI Helpers
520
- selectFolder: "haextension:filesystem:sync:select-folder"
520
+ selectFolder: "haextension:filesystem:sync:select-folder",
521
+ scanLocal: "haextension:filesystem:sync:scan-local"
521
522
  }
522
523
  },
523
524
  storage: {
@@ -716,6 +717,16 @@ var FileSyncAPI = class {
716
717
  options
717
718
  );
718
719
  }
720
+ /**
721
+ * Scan local files in a sync rule folder
722
+ * Returns unencrypted local files for display in the UI
723
+ */
724
+ async scanLocalAsync(options) {
725
+ return this.client.request(
726
+ HAEXTENSION_METHODS.filesystem.sync.scanLocal,
727
+ options
728
+ );
729
+ }
719
730
  /**
720
731
  * Get file info by ID
721
732
  */
@@ -1385,7 +1396,8 @@ var TAURI_COMMANDS = {
1385
1396
  // Conflict Resolution
1386
1397
  resolveConflict: "filesync_resolve_conflict",
1387
1398
  // UI Helpers
1388
- selectFolder: "filesync_select_folder"
1399
+ selectFolder: "filesync_select_folder",
1400
+ scanLocal: "filesync_scan_local"
1389
1401
  }
1390
1402
  };
1391
1403
 
@@ -1606,6 +1618,10 @@ var filesyncHandlers = {
1606
1618
  [HAEXTENSION_METHODS.filesystem.sync.selectFolder]: {
1607
1619
  command: TAURI_COMMANDS.filesync.selectFolder,
1608
1620
  args: () => ({})
1621
+ },
1622
+ [HAEXTENSION_METHODS.filesystem.sync.scanLocal]: {
1623
+ command: TAURI_COMMANDS.filesync.scanLocal,
1624
+ args: (p) => ({ request: p })
1609
1625
  }
1610
1626
  };
1611
1627