@haex-space/vault-sdk 2.5.22 → 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.
- package/dist/{client-CndFXN7L.d.ts → client-AdojmCk8.d.ts} +27 -13
- package/dist/{client-DXhovPAD.d.mts → client-Rqbzd23b.d.mts} +27 -13
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +23 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -3
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +0 -2
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +0 -2
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.d.mts +1 -1
- package/dist/runtime/nuxt.plugin.client.d.ts +1 -1
- package/dist/runtime/nuxt.plugin.client.js +0 -2
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +0 -2
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
- package/dist/svelte.d.mts +1 -1
- package/dist/svelte.d.ts +1 -1
- package/dist/svelte.js +0 -2
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +0 -2
- package/dist/svelte.mjs.map +1 -1
- package/dist/vue.d.mts +1 -1
- package/dist/vue.d.ts +1 -1
- package/dist/vue.js +0 -2
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +0 -2
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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" | "
|
|
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
|
-
|
|
85
|
-
|
|
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
|
|
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" | "
|
|
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
|
-
|
|
85
|
-
|
|
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
|
|
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-
|
|
2
|
-
export { A as AddBackendOptions,
|
|
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-
|
|
2
|
-
export { A as AddBackendOptions,
|
|
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;
|
|
@@ -1215,8 +1235,6 @@ async function setupTauriEventListeners(ctx, log, onEvent, onContextChange) {
|
|
|
1215
1235
|
console.error("[HaexVault SDK] Failed to setup context change listener:", error);
|
|
1216
1236
|
log("Failed to setup context change listener:", error);
|
|
1217
1237
|
}
|
|
1218
|
-
console.log("[HaexVault SDK] Setting up Tauri event listener for:", EXTERNAL_EVENTS.REQUEST);
|
|
1219
|
-
console.log("[HaexVault SDK] listen function:", typeof listen, listen);
|
|
1220
1238
|
try {
|
|
1221
1239
|
await listen(EXTERNAL_EVENTS.REQUEST, (event) => {
|
|
1222
1240
|
console.log("[HaexVault SDK] ====== EXTERNAL REQUEST RECEIVED ======");
|
|
@@ -2514,6 +2532,7 @@ exports.EXTERNAL_EVENTS = EXTERNAL_EVENTS;
|
|
|
2514
2532
|
exports.ErrorCode = ErrorCode;
|
|
2515
2533
|
exports.ExternalConnectionErrorCode = ExternalConnectionErrorCode;
|
|
2516
2534
|
exports.ExternalConnectionState = ExternalConnectionState;
|
|
2535
|
+
exports.FILE_SYNC_STATE = FILE_SYNC_STATE;
|
|
2517
2536
|
exports.FileSyncAPI = FileSyncAPI;
|
|
2518
2537
|
exports.FilesystemAPI = FilesystemAPI;
|
|
2519
2538
|
exports.HAEXSPACE_MESSAGE_TYPES = HAEXSPACE_MESSAGE_TYPES;
|
|
@@ -2523,6 +2542,8 @@ exports.HaexVaultSdk = HaexVaultSdk;
|
|
|
2523
2542
|
exports.HaexVaultSdkError = HaexVaultSdkError;
|
|
2524
2543
|
exports.PermissionStatus = PermissionStatus;
|
|
2525
2544
|
exports.PermissionsAPI = PermissionsAPI;
|
|
2545
|
+
exports.STORAGE_BACKEND_TYPE = STORAGE_BACKEND_TYPE;
|
|
2546
|
+
exports.SYNC_DIRECTION = SYNC_DIRECTION;
|
|
2526
2547
|
exports.TABLE_SEPARATOR = TABLE_SEPARATOR;
|
|
2527
2548
|
exports.TAURI_COMMANDS = TAURI_COMMANDS;
|
|
2528
2549
|
exports.WebAPI = WebAPI;
|