@haex-space/vault-sdk 2.5.19 → 2.5.22

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.
@@ -72,7 +72,7 @@ interface StorageBackendInfo {
72
72
  enabled: boolean;
73
73
  createdAt: string;
74
74
  }
75
- type StorageBackendType = "s3" | "r2" | "minio" | "gdrive" | "dropbox";
75
+ type StorageBackendType = "s3" | "r2" | "minio" | "supabase" | "gdrive" | "dropbox";
76
76
  interface S3BackendConfig {
77
77
  type: "s3" | "r2" | "minio";
78
78
  endpoint?: string;
@@ -81,6 +81,17 @@ interface S3BackendConfig {
81
81
  accessKeyId: string;
82
82
  secretAccessKey: string;
83
83
  }
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;
84
95
  interface SyncRule {
85
96
  id: string;
86
97
  spaceId: string;
@@ -116,9 +127,8 @@ interface CreateSpaceOptions {
116
127
  name: string;
117
128
  }
118
129
  interface AddBackendOptions {
119
- type: StorageBackendType;
120
130
  name: string;
121
- config: S3BackendConfig;
131
+ config: BackendConfig;
122
132
  }
123
133
  interface AddSyncRuleOptions {
124
134
  spaceId: string;
@@ -449,4 +459,4 @@ declare class HaexVaultSdk {
449
459
  private log;
450
460
  }
451
461
 
452
- export { type AddBackendOptions as A, 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 };
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 };
@@ -72,7 +72,7 @@ interface StorageBackendInfo {
72
72
  enabled: boolean;
73
73
  createdAt: string;
74
74
  }
75
- type StorageBackendType = "s3" | "r2" | "minio" | "gdrive" | "dropbox";
75
+ type StorageBackendType = "s3" | "r2" | "minio" | "supabase" | "gdrive" | "dropbox";
76
76
  interface S3BackendConfig {
77
77
  type: "s3" | "r2" | "minio";
78
78
  endpoint?: string;
@@ -81,6 +81,17 @@ interface S3BackendConfig {
81
81
  accessKeyId: string;
82
82
  secretAccessKey: string;
83
83
  }
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;
84
95
  interface SyncRule {
85
96
  id: string;
86
97
  spaceId: string;
@@ -116,9 +127,8 @@ interface CreateSpaceOptions {
116
127
  name: string;
117
128
  }
118
129
  interface AddBackendOptions {
119
- type: StorageBackendType;
120
130
  name: string;
121
- config: S3BackendConfig;
131
+ config: BackendConfig;
122
132
  }
123
133
  interface AddSyncRuleOptions {
124
134
  spaceId: string;
@@ -449,4 +459,4 @@ declare class HaexVaultSdk {
449
459
  private log;
450
460
  }
451
461
 
452
- export { type AddBackendOptions as A, 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 };
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 };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as HaexVaultSdk } from './client-BTKbN_IB.mjs';
2
- export { A as AddBackendOptions, m as AddSyncRuleOptions, C as CreateSpaceOptions, D as DatabaseAPI, n 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, i as SyncDirection, k as SyncError, l as SyncProgress, h as SyncRule, j as SyncStatus, U as UploadFileOptions, W as WebAPI } from './client-BTKbN_IB.mjs';
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';
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-CP2zRPsi.js';
2
- export { A as AddBackendOptions, m as AddSyncRuleOptions, C as CreateSpaceOptions, D as DatabaseAPI, n 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, i as SyncDirection, k as SyncError, l as SyncProgress, h as SyncRule, j as SyncStatus, U as UploadFileOptions, W as WebAPI } from './client-CP2zRPsi.js';
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';
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
@@ -1215,6 +1215,8 @@ async function setupTauriEventListeners(ctx, log, onEvent, onContextChange) {
1215
1215
  console.error("[HaexVault SDK] Failed to setup context change listener:", error);
1216
1216
  log("Failed to setup context change listener:", error);
1217
1217
  }
1218
+ console.log("[HaexVault SDK] Setting up Tauri event listener for:", EXTERNAL_EVENTS.REQUEST);
1219
+ console.log("[HaexVault SDK] listen function:", typeof listen, listen);
1218
1220
  try {
1219
1221
  await listen(EXTERNAL_EVENTS.REQUEST, (event) => {
1220
1222
  console.log("[HaexVault SDK] ====== EXTERNAL REQUEST RECEIVED ======");