@haex-space/vault-sdk 2.5.73 → 2.5.76
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-DTXGxFqD.d.mts → client-C0fkm4FE.d.mts} +19 -1
- package/dist/{client-C_0ajqhQ.d.ts → client-C8JtjQzm.d.ts} +19 -1
- package/dist/index.d.mts +13 -4
- package/dist/index.d.ts +13 -4
- package/dist/index.js +50 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +50 -8
- package/dist/index.mjs.map +1 -1
- package/dist/node.d.mts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +50 -8
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +50 -8
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.d.mts +2 -2
- package/dist/runtime/nuxt.plugin.client.d.ts +2 -2
- package/dist/runtime/nuxt.plugin.client.js +50 -8
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +50 -8
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
- package/dist/svelte.d.mts +2 -2
- package/dist/svelte.d.ts +2 -2
- package/dist/svelte.js +50 -8
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +50 -8
- package/dist/svelte.mjs.map +1 -1
- package/dist/{types-DiXJ5SF6.d.mts → types-CS-ggsXY.d.mts} +19 -1
- package/dist/{types-DiXJ5SF6.d.ts → types-CS-ggsXY.d.ts} +19 -1
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +50 -8
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +50 -8
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DatabaseQueryResult, M as Migration, b as MigrationResult, W as WebRequestOptions, c as WebResponse, H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext, d as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult, e as ExternalRequestHandler, f as ExternalResponse, g as EventCallback } from './types-
|
|
1
|
+
import { D as DatabaseQueryResult, M as Migration, b as MigrationResult, W as WebRequestOptions, c as WebResponse, H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext, d as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult, e as ExternalRequestHandler, f as ExternalResponse, g as EventCallback } from './types-CS-ggsXY.mjs';
|
|
2
2
|
import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
|
|
4
4
|
declare class StorageAPI {
|
|
@@ -244,6 +244,24 @@ declare class FilesystemAPI {
|
|
|
244
244
|
* @param to Destination path
|
|
245
245
|
*/
|
|
246
246
|
copy(from: string, to: string): Promise<void>;
|
|
247
|
+
/**
|
|
248
|
+
* Start watching a directory for file changes
|
|
249
|
+
* When files change, the "filesync:file-changed" event is emitted
|
|
250
|
+
* @param ruleId Unique identifier for this watch (e.g., sync rule ID)
|
|
251
|
+
* @param path Absolute path to the directory to watch
|
|
252
|
+
*/
|
|
253
|
+
watch(ruleId: string, path: string): Promise<void>;
|
|
254
|
+
/**
|
|
255
|
+
* Stop watching a directory
|
|
256
|
+
* @param ruleId The rule ID that was used when starting the watch
|
|
257
|
+
*/
|
|
258
|
+
unwatch(ruleId: string): Promise<void>;
|
|
259
|
+
/**
|
|
260
|
+
* Check if a directory is currently being watched
|
|
261
|
+
* @param ruleId The rule ID to check
|
|
262
|
+
* @returns True if the directory is being watched
|
|
263
|
+
*/
|
|
264
|
+
isWatching(ruleId: string): Promise<boolean>;
|
|
247
265
|
}
|
|
248
266
|
|
|
249
267
|
declare class WebAPI {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DatabaseQueryResult, M as Migration, b as MigrationResult, W as WebRequestOptions, c as WebResponse, H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext, d as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult, e as ExternalRequestHandler, f as ExternalResponse, g as EventCallback } from './types-
|
|
1
|
+
import { D as DatabaseQueryResult, M as Migration, b as MigrationResult, W as WebRequestOptions, c as WebResponse, H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext, d as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult, e as ExternalRequestHandler, f as ExternalResponse, g as EventCallback } from './types-CS-ggsXY.js';
|
|
2
2
|
import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
|
|
4
4
|
declare class StorageAPI {
|
|
@@ -244,6 +244,24 @@ declare class FilesystemAPI {
|
|
|
244
244
|
* @param to Destination path
|
|
245
245
|
*/
|
|
246
246
|
copy(from: string, to: string): Promise<void>;
|
|
247
|
+
/**
|
|
248
|
+
* Start watching a directory for file changes
|
|
249
|
+
* When files change, the "filesync:file-changed" event is emitted
|
|
250
|
+
* @param ruleId Unique identifier for this watch (e.g., sync rule ID)
|
|
251
|
+
* @param path Absolute path to the directory to watch
|
|
252
|
+
*/
|
|
253
|
+
watch(ruleId: string, path: string): Promise<void>;
|
|
254
|
+
/**
|
|
255
|
+
* Stop watching a directory
|
|
256
|
+
* @param ruleId The rule ID that was used when starting the watch
|
|
257
|
+
*/
|
|
258
|
+
unwatch(ruleId: string): Promise<void>;
|
|
259
|
+
/**
|
|
260
|
+
* Check if a directory is currently being watched
|
|
261
|
+
* @param ruleId The rule ID to check
|
|
262
|
+
* @returns True if the directory is being watched
|
|
263
|
+
*/
|
|
264
|
+
isWatching(ruleId: string): Promise<boolean>;
|
|
247
265
|
}
|
|
248
266
|
|
|
249
267
|
declare class WebAPI {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as HaexVaultSdk } from './client-
|
|
2
|
-
export { D as DatabaseAPI, b as DirEntry, a as FileStat, F as FilesystemAPI, P as PermissionsAPI, A as RemoteAddBackendRequest, f as RemoteS3Config, g as RemoteS3PublicConfig, R as RemoteStorageAPI, e as RemoteStorageBackendInfo, h as RemoteStorageObjectInfo, U as RemoteUpdateBackendRequest, d as SelectFileOptions, c as SelectFolderOptions, W as WebAPI } from './client-
|
|
3
|
-
import { E as ExtensionManifest, H as HaexHubConfig } from './types-
|
|
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,
|
|
1
|
+
import { H as HaexVaultSdk } from './client-C0fkm4FE.mjs';
|
|
2
|
+
export { D as DatabaseAPI, b as DirEntry, a as FileStat, F as FilesystemAPI, P as PermissionsAPI, A as RemoteAddBackendRequest, f as RemoteS3Config, g as RemoteS3PublicConfig, R as RemoteStorageAPI, e as RemoteStorageBackendInfo, h as RemoteStorageObjectInfo, U as RemoteUpdateBackendRequest, d as SelectFileOptions, c as SelectFolderOptions, W as WebAPI } from './client-C0fkm4FE.mjs';
|
|
3
|
+
import { E as ExtensionManifest, H as HaexHubConfig } from './types-CS-ggsXY.mjs';
|
|
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, X as EXTERNAL_EVENTS, z as ErrorCode, g as EventCallback, a as ExtensionInfo, v as ExternalAuthDecision, x as ExternalConnection, J as ExternalConnectionErrorCode, I as ExternalConnectionState, Y as ExternalEvent, s as ExternalRequest, r as ExternalRequestEvent, e as ExternalRequestHandler, f as ExternalResponse, O as FileChangeEvent, Q as FileChangeType, U as HAEXTENSION_EVENTS, j as HaexHubEvent, h as HaexHubRequest, i as HaexHubResponse, N as HaexVaultSdkError, V 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-CS-ggsXY.mjs';
|
|
5
5
|
export { H as HaextensionConfig } from './config-D_HXjsEV.mjs';
|
|
6
6
|
import 'drizzle-orm/sqlite-proxy';
|
|
7
7
|
|
|
@@ -216,6 +216,12 @@ declare const FILESYSTEM_COMMANDS: {
|
|
|
216
216
|
readonly rename: "extension_filesystem_rename";
|
|
217
217
|
/** Copy file or directory */
|
|
218
218
|
readonly copy: "extension_filesystem_copy";
|
|
219
|
+
/** Start watching a directory for changes */
|
|
220
|
+
readonly watch: "extension_filesystem_watch";
|
|
221
|
+
/** Stop watching a directory */
|
|
222
|
+
readonly unwatch: "extension_filesystem_unwatch";
|
|
223
|
+
/** Check if a directory is being watched */
|
|
224
|
+
readonly isWatching: "extension_filesystem_is_watching";
|
|
219
225
|
};
|
|
220
226
|
|
|
221
227
|
/**
|
|
@@ -362,6 +368,9 @@ declare const TAURI_COMMANDS: {
|
|
|
362
368
|
readonly selectFile: "extension_filesystem_select_file";
|
|
363
369
|
readonly rename: "extension_filesystem_rename";
|
|
364
370
|
readonly copy: "extension_filesystem_copy";
|
|
371
|
+
readonly watch: "extension_filesystem_watch";
|
|
372
|
+
readonly unwatch: "extension_filesystem_unwatch";
|
|
373
|
+
readonly isWatching: "extension_filesystem_is_watching";
|
|
365
374
|
};
|
|
366
375
|
readonly externalBridge: {
|
|
367
376
|
readonly respond: "external_bridge_respond";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as HaexVaultSdk } from './client-
|
|
2
|
-
export { D as DatabaseAPI, b as DirEntry, a as FileStat, F as FilesystemAPI, P as PermissionsAPI, A as RemoteAddBackendRequest, f as RemoteS3Config, g as RemoteS3PublicConfig, R as RemoteStorageAPI, e as RemoteStorageBackendInfo, h as RemoteStorageObjectInfo, U as RemoteUpdateBackendRequest, d as SelectFileOptions, c as SelectFolderOptions, W as WebAPI } from './client-
|
|
3
|
-
import { E as ExtensionManifest, H as HaexHubConfig } from './types-
|
|
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,
|
|
1
|
+
import { H as HaexVaultSdk } from './client-C8JtjQzm.js';
|
|
2
|
+
export { D as DatabaseAPI, b as DirEntry, a as FileStat, F as FilesystemAPI, P as PermissionsAPI, A as RemoteAddBackendRequest, f as RemoteS3Config, g as RemoteS3PublicConfig, R as RemoteStorageAPI, e as RemoteStorageBackendInfo, h as RemoteStorageObjectInfo, U as RemoteUpdateBackendRequest, d as SelectFileOptions, c as SelectFolderOptions, W as WebAPI } from './client-C8JtjQzm.js';
|
|
3
|
+
import { E as ExtensionManifest, H as HaexHubConfig } from './types-CS-ggsXY.js';
|
|
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, X as EXTERNAL_EVENTS, z as ErrorCode, g as EventCallback, a as ExtensionInfo, v as ExternalAuthDecision, x as ExternalConnection, J as ExternalConnectionErrorCode, I as ExternalConnectionState, Y as ExternalEvent, s as ExternalRequest, r as ExternalRequestEvent, e as ExternalRequestHandler, f as ExternalResponse, O as FileChangeEvent, Q as FileChangeType, U as HAEXTENSION_EVENTS, j as HaexHubEvent, h as HaexHubRequest, i as HaexHubResponse, N as HaexVaultSdkError, V 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-CS-ggsXY.js';
|
|
5
5
|
export { H as HaextensionConfig } from './config-D_HXjsEV.js';
|
|
6
6
|
import 'drizzle-orm/sqlite-proxy';
|
|
7
7
|
|
|
@@ -216,6 +216,12 @@ declare const FILESYSTEM_COMMANDS: {
|
|
|
216
216
|
readonly rename: "extension_filesystem_rename";
|
|
217
217
|
/** Copy file or directory */
|
|
218
218
|
readonly copy: "extension_filesystem_copy";
|
|
219
|
+
/** Start watching a directory for changes */
|
|
220
|
+
readonly watch: "extension_filesystem_watch";
|
|
221
|
+
/** Stop watching a directory */
|
|
222
|
+
readonly unwatch: "extension_filesystem_unwatch";
|
|
223
|
+
/** Check if a directory is being watched */
|
|
224
|
+
readonly isWatching: "extension_filesystem_is_watching";
|
|
219
225
|
};
|
|
220
226
|
|
|
221
227
|
/**
|
|
@@ -362,6 +368,9 @@ declare const TAURI_COMMANDS: {
|
|
|
362
368
|
readonly selectFile: "extension_filesystem_select_file";
|
|
363
369
|
readonly rename: "extension_filesystem_rename";
|
|
364
370
|
readonly copy: "extension_filesystem_copy";
|
|
371
|
+
readonly watch: "extension_filesystem_watch";
|
|
372
|
+
readonly unwatch: "extension_filesystem_unwatch";
|
|
373
|
+
readonly isWatching: "extension_filesystem_is_watching";
|
|
365
374
|
};
|
|
366
375
|
readonly externalBridge: {
|
|
367
376
|
readonly respond: "external_bridge_respond";
|
package/dist/index.js
CHANGED
|
@@ -375,7 +375,9 @@ var HAEXTENSION_EVENTS = {
|
|
|
375
375
|
/** Context (theme, locale, platform) has changed */
|
|
376
376
|
CONTEXT_CHANGED: "haextension:context:changed",
|
|
377
377
|
/** Search request from HaexHub */
|
|
378
|
-
SEARCH_REQUEST: "haextension:search:request"
|
|
378
|
+
SEARCH_REQUEST: "haextension:search:request",
|
|
379
|
+
/** File system change detected (from native file watcher) */
|
|
380
|
+
FILE_CHANGED: "filesync:file-changed"
|
|
379
381
|
};
|
|
380
382
|
var EXTERNAL_EVENTS = {
|
|
381
383
|
/** External request from authorized client */
|
|
@@ -548,7 +550,14 @@ var FILESYSTEM_COMMANDS = {
|
|
|
548
550
|
/** Rename file or directory */
|
|
549
551
|
rename: "extension_filesystem_rename",
|
|
550
552
|
/** Copy file or directory */
|
|
551
|
-
copy: "extension_filesystem_copy"
|
|
553
|
+
copy: "extension_filesystem_copy",
|
|
554
|
+
// File watcher operations
|
|
555
|
+
/** Start watching a directory for changes */
|
|
556
|
+
watch: "extension_filesystem_watch",
|
|
557
|
+
/** Stop watching a directory */
|
|
558
|
+
unwatch: "extension_filesystem_unwatch",
|
|
559
|
+
/** Check if a directory is being watched */
|
|
560
|
+
isWatching: "extension_filesystem_is_watching"
|
|
552
561
|
};
|
|
553
562
|
|
|
554
563
|
// src/commands/externalBridge.ts
|
|
@@ -1151,6 +1160,42 @@ var FilesystemAPI = class {
|
|
|
1151
1160
|
{ from, to }
|
|
1152
1161
|
);
|
|
1153
1162
|
}
|
|
1163
|
+
// ==========================================================================
|
|
1164
|
+
// File Watcher Operations
|
|
1165
|
+
// ==========================================================================
|
|
1166
|
+
/**
|
|
1167
|
+
* Start watching a directory for file changes
|
|
1168
|
+
* When files change, the "filesync:file-changed" event is emitted
|
|
1169
|
+
* @param ruleId Unique identifier for this watch (e.g., sync rule ID)
|
|
1170
|
+
* @param path Absolute path to the directory to watch
|
|
1171
|
+
*/
|
|
1172
|
+
async watch(ruleId, path) {
|
|
1173
|
+
await this.client.request(
|
|
1174
|
+
FILESYSTEM_COMMANDS.watch,
|
|
1175
|
+
{ ruleId, path }
|
|
1176
|
+
);
|
|
1177
|
+
}
|
|
1178
|
+
/**
|
|
1179
|
+
* Stop watching a directory
|
|
1180
|
+
* @param ruleId The rule ID that was used when starting the watch
|
|
1181
|
+
*/
|
|
1182
|
+
async unwatch(ruleId) {
|
|
1183
|
+
await this.client.request(
|
|
1184
|
+
FILESYSTEM_COMMANDS.unwatch,
|
|
1185
|
+
{ ruleId }
|
|
1186
|
+
);
|
|
1187
|
+
}
|
|
1188
|
+
/**
|
|
1189
|
+
* Check if a directory is currently being watched
|
|
1190
|
+
* @param ruleId The rule ID to check
|
|
1191
|
+
* @returns True if the directory is being watched
|
|
1192
|
+
*/
|
|
1193
|
+
async isWatching(ruleId) {
|
|
1194
|
+
return this.client.request(
|
|
1195
|
+
FILESYSTEM_COMMANDS.isWatching,
|
|
1196
|
+
{ ruleId }
|
|
1197
|
+
);
|
|
1198
|
+
}
|
|
1154
1199
|
};
|
|
1155
1200
|
|
|
1156
1201
|
// src/api/web.ts
|
|
@@ -1332,9 +1377,7 @@ var RemoteStorageAPI = class {
|
|
|
1332
1377
|
async upload(backendId, key, data) {
|
|
1333
1378
|
const base64 = arrayBufferToBase64(data);
|
|
1334
1379
|
await this.client.request(REMOTE_STORAGE_COMMANDS.upload, {
|
|
1335
|
-
backendId,
|
|
1336
|
-
key,
|
|
1337
|
-
data: base64
|
|
1380
|
+
request: { backendId, key, data: base64 }
|
|
1338
1381
|
});
|
|
1339
1382
|
}
|
|
1340
1383
|
/**
|
|
@@ -1346,7 +1389,7 @@ var RemoteStorageAPI = class {
|
|
|
1346
1389
|
async download(backendId, key) {
|
|
1347
1390
|
const base64 = await this.client.request(
|
|
1348
1391
|
REMOTE_STORAGE_COMMANDS.download,
|
|
1349
|
-
{ backendId, key }
|
|
1392
|
+
{ request: { backendId, key } }
|
|
1350
1393
|
);
|
|
1351
1394
|
return base64ToArrayBuffer(base64);
|
|
1352
1395
|
}
|
|
@@ -1357,8 +1400,7 @@ var RemoteStorageAPI = class {
|
|
|
1357
1400
|
*/
|
|
1358
1401
|
async delete(backendId, key) {
|
|
1359
1402
|
await this.client.request(REMOTE_STORAGE_COMMANDS.delete, {
|
|
1360
|
-
backendId,
|
|
1361
|
-
key
|
|
1403
|
+
request: { backendId, key }
|
|
1362
1404
|
});
|
|
1363
1405
|
}
|
|
1364
1406
|
/**
|