@haex-space/vault-sdk 2.5.23 → 2.5.25

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.
@@ -41,6 +41,29 @@ declare class DatabaseAPI {
41
41
  count(tableName: string, where?: string, whereParams?: unknown[]): Promise<number>;
42
42
  }
43
43
 
44
+ /** File sync state constants */
45
+ declare const FILE_SYNC_STATE: {
46
+ readonly SYNCED: "synced";
47
+ readonly SYNCING: "syncing";
48
+ readonly LOCAL_ONLY: "localOnly";
49
+ readonly REMOTE_ONLY: "remoteOnly";
50
+ readonly CONFLICT: "conflict";
51
+ readonly ERROR: "error";
52
+ };
53
+ /** Sync direction constants */
54
+ declare const SYNC_DIRECTION: {
55
+ readonly UP: "up";
56
+ readonly DOWN: "down";
57
+ readonly BOTH: "both";
58
+ };
59
+ /** Storage backend type constants */
60
+ declare const STORAGE_BACKEND_TYPE: {
61
+ readonly S3: "s3";
62
+ readonly R2: "r2";
63
+ readonly MINIO: "minio";
64
+ readonly GDRIVE: "gdrive";
65
+ readonly DROPBOX: "dropbox";
66
+ };
44
67
  interface FileSpace {
45
68
  id: string;
46
69
  name: string;
@@ -72,7 +95,7 @@ interface StorageBackendInfo {
72
95
  enabled: boolean;
73
96
  createdAt: string;
74
97
  }
75
- type StorageBackendType = "s3" | "r2" | "minio" | "supabase" | "gdrive" | "dropbox";
98
+ type StorageBackendType = "s3" | "r2" | "minio" | "gdrive" | "dropbox";
76
99
  interface S3BackendConfig {
77
100
  type: "s3" | "r2" | "minio";
78
101
  endpoint?: string;
@@ -81,17 +104,8 @@ interface S3BackendConfig {
81
104
  accessKeyId: string;
82
105
  secretAccessKey: string;
83
106
  }
84
- interface SupabaseBackendConfig {
85
- type: "supabase";
86
- /** Supabase project URL (e.g., https://xxx.supabase.co) */
87
- projectUrl: string;
88
- /** Supabase service role key (for server-side access) */
89
- serviceRoleKey: string;
90
- /** Storage bucket name */
91
- bucket: string;
92
- }
93
- /** Backend configuration - can be S3-compatible or Supabase */
94
- type BackendConfig = S3BackendConfig | SupabaseBackendConfig;
107
+ /** Backend configuration for S3-compatible storage */
108
+ type BackendConfig = S3BackendConfig;
95
109
  interface SyncRule {
96
110
  id: string;
97
111
  spaceId: string;
@@ -459,4 +473,4 @@ declare class HaexVaultSdk {
459
473
  private log;
460
474
  }
461
475
 
462
- export { type AddBackendOptions as A, type BackendConfig as B, type CreateSpaceOptions as C, DatabaseAPI as D, FilesystemAPI as F, HaexVaultSdk as H, type ListFilesOptions as L, PermissionsAPI as P, StorageAPI as S, type UploadFileOptions as U, WebAPI as W, FileSyncAPI as a, type FileSpace as b, type FileInfo as c, type FileSyncState as d, type StorageBackendInfo as e, type StorageBackendType as f, type S3BackendConfig as g, type SupabaseBackendConfig as h, type SyncRule as i, type SyncDirection as j, type SyncStatus as k, type SyncError as l, type SyncProgress as m, type AddSyncRuleOptions as n, type DownloadFileOptions as o };
476
+ export { type AddBackendOptions as A, type BackendConfig as B, type CreateSpaceOptions as C, DatabaseAPI as D, FilesystemAPI as F, HaexVaultSdk as H, type ListFilesOptions as L, PermissionsAPI as P, StorageAPI as S, type UploadFileOptions as U, WebAPI as W, FileSyncAPI as a, type FileSpace as b, type FileInfo as c, type FileSyncState as d, type StorageBackendInfo as e, type StorageBackendType as f, type S3BackendConfig as g, type SyncRule as h, type SyncDirection as i, type SyncStatus as j, type SyncError as k, type SyncProgress as l, type AddSyncRuleOptions as m, type DownloadFileOptions as n, FILE_SYNC_STATE as o, SYNC_DIRECTION as p, STORAGE_BACKEND_TYPE as q };
@@ -41,6 +41,29 @@ declare class DatabaseAPI {
41
41
  count(tableName: string, where?: string, whereParams?: unknown[]): Promise<number>;
42
42
  }
43
43
 
44
+ /** File sync state constants */
45
+ declare const FILE_SYNC_STATE: {
46
+ readonly SYNCED: "synced";
47
+ readonly SYNCING: "syncing";
48
+ readonly LOCAL_ONLY: "localOnly";
49
+ readonly REMOTE_ONLY: "remoteOnly";
50
+ readonly CONFLICT: "conflict";
51
+ readonly ERROR: "error";
52
+ };
53
+ /** Sync direction constants */
54
+ declare const SYNC_DIRECTION: {
55
+ readonly UP: "up";
56
+ readonly DOWN: "down";
57
+ readonly BOTH: "both";
58
+ };
59
+ /** Storage backend type constants */
60
+ declare const STORAGE_BACKEND_TYPE: {
61
+ readonly S3: "s3";
62
+ readonly R2: "r2";
63
+ readonly MINIO: "minio";
64
+ readonly GDRIVE: "gdrive";
65
+ readonly DROPBOX: "dropbox";
66
+ };
44
67
  interface FileSpace {
45
68
  id: string;
46
69
  name: string;
@@ -72,7 +95,7 @@ interface StorageBackendInfo {
72
95
  enabled: boolean;
73
96
  createdAt: string;
74
97
  }
75
- type StorageBackendType = "s3" | "r2" | "minio" | "supabase" | "gdrive" | "dropbox";
98
+ type StorageBackendType = "s3" | "r2" | "minio" | "gdrive" | "dropbox";
76
99
  interface S3BackendConfig {
77
100
  type: "s3" | "r2" | "minio";
78
101
  endpoint?: string;
@@ -81,17 +104,8 @@ interface S3BackendConfig {
81
104
  accessKeyId: string;
82
105
  secretAccessKey: string;
83
106
  }
84
- interface SupabaseBackendConfig {
85
- type: "supabase";
86
- /** Supabase project URL (e.g., https://xxx.supabase.co) */
87
- projectUrl: string;
88
- /** Supabase service role key (for server-side access) */
89
- serviceRoleKey: string;
90
- /** Storage bucket name */
91
- bucket: string;
92
- }
93
- /** Backend configuration - can be S3-compatible or Supabase */
94
- type BackendConfig = S3BackendConfig | SupabaseBackendConfig;
107
+ /** Backend configuration for S3-compatible storage */
108
+ type BackendConfig = S3BackendConfig;
95
109
  interface SyncRule {
96
110
  id: string;
97
111
  spaceId: string;
@@ -459,4 +473,4 @@ declare class HaexVaultSdk {
459
473
  private log;
460
474
  }
461
475
 
462
- export { type AddBackendOptions as A, type BackendConfig as B, type CreateSpaceOptions as C, DatabaseAPI as D, FilesystemAPI as F, HaexVaultSdk as H, type ListFilesOptions as L, PermissionsAPI as P, StorageAPI as S, type UploadFileOptions as U, WebAPI as W, FileSyncAPI as a, type FileSpace as b, type FileInfo as c, type FileSyncState as d, type StorageBackendInfo as e, type StorageBackendType as f, type S3BackendConfig as g, type SupabaseBackendConfig as h, type SyncRule as i, type SyncDirection as j, type SyncStatus as k, type SyncError as l, type SyncProgress as m, type AddSyncRuleOptions as n, type DownloadFileOptions as o };
476
+ export { type AddBackendOptions as A, type BackendConfig as B, type CreateSpaceOptions as C, DatabaseAPI as D, FilesystemAPI as F, HaexVaultSdk as H, type ListFilesOptions as L, PermissionsAPI as P, StorageAPI as S, type UploadFileOptions as U, WebAPI as W, FileSyncAPI as a, type FileSpace as b, type FileInfo as c, type FileSyncState as d, type StorageBackendInfo as e, type StorageBackendType as f, type S3BackendConfig as g, type SyncRule as h, type SyncDirection as i, type SyncStatus as j, type SyncError as k, type SyncProgress as l, type AddSyncRuleOptions as m, type DownloadFileOptions as n, FILE_SYNC_STATE as o, SYNC_DIRECTION as p, STORAGE_BACKEND_TYPE as q };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as HaexVaultSdk } from './client-DXhovPAD.mjs';
2
- export { A as AddBackendOptions, n as AddSyncRuleOptions, B as BackendConfig, C as CreateSpaceOptions, D as DatabaseAPI, o as DownloadFileOptions, c as FileInfo, b as FileSpace, a as FileSyncAPI, d as FileSyncState, F as FilesystemAPI, L as ListFilesOptions, P as PermissionsAPI, g as S3BackendConfig, e as StorageBackendInfo, f as StorageBackendType, h as SupabaseBackendConfig, j as SyncDirection, l as SyncError, m as SyncProgress, i as SyncRule, k as SyncStatus, U as UploadFileOptions, W as WebAPI } from './client-DXhovPAD.mjs';
1
+ import { H as HaexVaultSdk } from './client-Rqbzd23b.mjs';
2
+ export { A as AddBackendOptions, m as AddSyncRuleOptions, B as BackendConfig, C as CreateSpaceOptions, D as DatabaseAPI, n as DownloadFileOptions, o 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, q as STORAGE_BACKEND_TYPE, p 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 UploadFileOptions, W as WebAPI } from './client-Rqbzd23b.mjs';
3
3
  import { E as ExtensionManifest, H as HaexHubConfig } from './types-C4BTOGe5.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-C4BTOGe5.mjs';
5
5
  export { H as HaextensionConfig } from './config-D_HXjsEV.mjs';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as HaexVaultSdk } from './client-CndFXN7L.js';
2
- export { A as AddBackendOptions, n as AddSyncRuleOptions, B as BackendConfig, C as CreateSpaceOptions, D as DatabaseAPI, o as DownloadFileOptions, c as FileInfo, b as FileSpace, a as FileSyncAPI, d as FileSyncState, F as FilesystemAPI, L as ListFilesOptions, P as PermissionsAPI, g as S3BackendConfig, e as StorageBackendInfo, f as StorageBackendType, h as SupabaseBackendConfig, j as SyncDirection, l as SyncError, m as SyncProgress, i as SyncRule, k as SyncStatus, U as UploadFileOptions, W as WebAPI } from './client-CndFXN7L.js';
1
+ import { H as HaexVaultSdk } from './client-AdojmCk8.js';
2
+ export { A as AddBackendOptions, m as AddSyncRuleOptions, B as BackendConfig, C as CreateSpaceOptions, D as DatabaseAPI, n as DownloadFileOptions, o 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, q as STORAGE_BACKEND_TYPE, p 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 UploadFileOptions, W as WebAPI } from './client-AdojmCk8.js';
3
3
  import { E as ExtensionManifest, H as HaexHubConfig } from './types-C4BTOGe5.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-C4BTOGe5.js';
5
5
  export { H as HaextensionConfig } from './config-D_HXjsEV.js';
package/dist/index.js CHANGED
@@ -651,6 +651,26 @@ var DatabaseAPI = class {
651
651
  };
652
652
 
653
653
  // src/api/filesync.ts
654
+ var FILE_SYNC_STATE = {
655
+ SYNCED: "synced",
656
+ SYNCING: "syncing",
657
+ LOCAL_ONLY: "localOnly",
658
+ REMOTE_ONLY: "remoteOnly",
659
+ CONFLICT: "conflict",
660
+ ERROR: "error"
661
+ };
662
+ var SYNC_DIRECTION = {
663
+ UP: "up",
664
+ DOWN: "down",
665
+ BOTH: "both"
666
+ };
667
+ var STORAGE_BACKEND_TYPE = {
668
+ S3: "s3",
669
+ R2: "r2",
670
+ MINIO: "minio",
671
+ GDRIVE: "gdrive",
672
+ DROPBOX: "dropbox"
673
+ };
654
674
  var FileSyncAPI = class {
655
675
  constructor(client) {
656
676
  this.client = client;
@@ -2512,6 +2532,7 @@ exports.EXTERNAL_EVENTS = EXTERNAL_EVENTS;
2512
2532
  exports.ErrorCode = ErrorCode;
2513
2533
  exports.ExternalConnectionErrorCode = ExternalConnectionErrorCode;
2514
2534
  exports.ExternalConnectionState = ExternalConnectionState;
2535
+ exports.FILE_SYNC_STATE = FILE_SYNC_STATE;
2515
2536
  exports.FileSyncAPI = FileSyncAPI;
2516
2537
  exports.FilesystemAPI = FilesystemAPI;
2517
2538
  exports.HAEXSPACE_MESSAGE_TYPES = HAEXSPACE_MESSAGE_TYPES;
@@ -2521,6 +2542,8 @@ exports.HaexVaultSdk = HaexVaultSdk;
2521
2542
  exports.HaexVaultSdkError = HaexVaultSdkError;
2522
2543
  exports.PermissionStatus = PermissionStatus;
2523
2544
  exports.PermissionsAPI = PermissionsAPI;
2545
+ exports.STORAGE_BACKEND_TYPE = STORAGE_BACKEND_TYPE;
2546
+ exports.SYNC_DIRECTION = SYNC_DIRECTION;
2524
2547
  exports.TABLE_SEPARATOR = TABLE_SEPARATOR;
2525
2548
  exports.TAURI_COMMANDS = TAURI_COMMANDS;
2526
2549
  exports.WebAPI = WebAPI;