@haex-space/vault-sdk 2.5.43 → 2.5.45

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.
@@ -1,6 +1,6 @@
1
1
  import * as nuxt_app from 'nuxt/app';
2
2
  import { ShallowRef } from 'vue';
3
- import { H as HaexVaultSdk } from '../client-9QruY0rX.mjs';
3
+ import { H as HaexVaultSdk } from '../client-BDxVgihp.mjs';
4
4
  import { A as ApplicationContext } from '../types-DiXJ5SF6.mjs';
5
5
  import 'drizzle-orm/sqlite-proxy';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import * as nuxt_app from 'nuxt/app';
2
2
  import { ShallowRef } from 'vue';
3
- import { H as HaexVaultSdk } from '../client-Bp4IqvzW.js';
3
+ import { H as HaexVaultSdk } from '../client-Bgu2k1yJ.js';
4
4
  import { A as ApplicationContext } from '../types-DiXJ5SF6.js';
5
5
  import 'drizzle-orm/sqlite-proxy';
6
6
 
@@ -88,49 +88,6 @@ var HAEXTENSION_METHODS = {
88
88
  rename: "haextension:filesystem:rename",
89
89
  copy: "haextension:filesystem:copy"
90
90
  },
91
- filesync: {
92
- // Spaces
93
- listSpaces: "haextension:filesync:list-spaces",
94
- createSpace: "haextension:filesync:create-space",
95
- deleteSpace: "haextension:filesync:delete-space",
96
- // Files
97
- listFiles: "haextension:filesync:list-files",
98
- getFile: "haextension:filesync:get-file",
99
- uploadFile: "haextension:filesync:upload-file",
100
- downloadFile: "haextension:filesync:download-file",
101
- deleteFile: "haextension:filesync:delete-file",
102
- // Backends
103
- listBackends: "haextension:filesync:list-backends",
104
- addBackend: "haextension:filesync:add-backend",
105
- removeBackend: "haextension:filesync:remove-backend",
106
- testBackend: "haextension:filesync:test-backend",
107
- // Sync Rules
108
- listSyncRules: "haextension:filesync:list-sync-rules",
109
- addSyncRule: "haextension:filesync:add-sync-rule",
110
- updateSyncRule: "haextension:filesync:update-sync-rule",
111
- removeSyncRule: "haextension:filesync:remove-sync-rule",
112
- // Sync Operations
113
- getSyncStatus: "haextension:filesync:get-sync-status",
114
- triggerSync: "haextension:filesync:trigger-sync",
115
- pauseSync: "haextension:filesync:pause-sync",
116
- resumeSync: "haextension:filesync:resume-sync",
117
- // Conflict Resolution
118
- resolveConflict: "haextension:filesync:resolve-conflict",
119
- // UI Helpers
120
- selectFolder: "haextension:filesync:select-folder",
121
- scanLocal: "haextension:filesync:scan-local",
122
- // Sync Queue (persistent upload/download queue)
123
- addToQueue: "haextension:filesync:add-to-queue",
124
- getQueue: "haextension:filesync:get-queue",
125
- getQueueSummary: "haextension:filesync:get-queue-summary",
126
- startQueueEntry: "haextension:filesync:start-queue-entry",
127
- completeQueueEntry: "haextension:filesync:complete-queue-entry",
128
- failQueueEntry: "haextension:filesync:fail-queue-entry",
129
- retryFailedQueue: "haextension:filesync:retry-failed-queue",
130
- removeQueueEntry: "haextension:filesync:remove-queue-entry",
131
- clearQueue: "haextension:filesync:clear-queue",
132
- recoverQueue: "haextension:filesync:recover-queue"
133
- },
134
91
  storage: {
135
92
  getItem: "haextension:storage:get-item",
136
93
  setItem: "haextension:storage:set-item",
@@ -275,311 +232,10 @@ var DatabaseAPI = class {
275
232
  }
276
233
  };
277
234
 
278
- // src/api/filesync.ts
279
- var FileSyncAPI = class {
280
- constructor(client) {
281
- this.client = client;
282
- }
283
- // --------------------------------------------------------------------------
284
- // Spaces
285
- // --------------------------------------------------------------------------
286
- /**
287
- * List all file spaces
288
- */
289
- async listSpacesAsync() {
290
- return this.client.request(
291
- HAEXTENSION_METHODS.filesync.listSpaces
292
- );
293
- }
294
- /**
295
- * Create a new file space
296
- */
297
- async createSpaceAsync(options) {
298
- return this.client.request(
299
- HAEXTENSION_METHODS.filesync.createSpace,
300
- options
301
- );
302
- }
303
- /**
304
- * Delete a file space
305
- */
306
- async deleteSpaceAsync(spaceId) {
307
- await this.client.request(HAEXTENSION_METHODS.filesync.deleteSpace, {
308
- spaceId
309
- });
310
- }
311
- // --------------------------------------------------------------------------
312
- // Files
313
- // --------------------------------------------------------------------------
314
- /**
315
- * List files in a space
316
- */
317
- async listFilesAsync(options) {
318
- return this.client.request(
319
- HAEXTENSION_METHODS.filesync.listFiles,
320
- options
321
- );
322
- }
323
- /**
324
- * Scan local files in a sync rule folder
325
- * Returns unencrypted local files for display in the UI
326
- */
327
- async scanLocalAsync(options) {
328
- return this.client.request(
329
- HAEXTENSION_METHODS.filesync.scanLocal,
330
- options
331
- );
332
- }
333
- /**
334
- * Get file info by ID
335
- */
336
- async getFileAsync(fileId) {
337
- return this.client.request(
338
- HAEXTENSION_METHODS.filesync.getFile,
339
- { fileId }
340
- );
341
- }
342
- /**
343
- * Upload a file to the sync system
344
- */
345
- async uploadFileAsync(options) {
346
- return this.client.request(
347
- HAEXTENSION_METHODS.filesync.uploadFile,
348
- options
349
- );
350
- }
351
- /**
352
- * Download a file to local storage
353
- */
354
- async downloadFileAsync(options) {
355
- await this.client.request(
356
- HAEXTENSION_METHODS.filesync.downloadFile,
357
- options
358
- );
359
- }
360
- /**
361
- * Delete a file from the sync system
362
- */
363
- async deleteFileAsync(fileId) {
364
- await this.client.request(HAEXTENSION_METHODS.filesync.deleteFile, {
365
- fileId
366
- });
367
- }
368
- // --------------------------------------------------------------------------
369
- // Storage Backends
370
- // --------------------------------------------------------------------------
371
- /**
372
- * List configured storage backends
373
- */
374
- async listBackendsAsync() {
375
- return this.client.request(
376
- HAEXTENSION_METHODS.filesync.listBackends
377
- );
378
- }
379
- /**
380
- * Add a new storage backend
381
- */
382
- async addBackendAsync(options) {
383
- return this.client.request(
384
- HAEXTENSION_METHODS.filesync.addBackend,
385
- options
386
- );
387
- }
388
- /**
389
- * Remove a storage backend
390
- */
391
- async removeBackendAsync(backendId) {
392
- await this.client.request(HAEXTENSION_METHODS.filesync.removeBackend, {
393
- backendId
394
- });
395
- }
396
- /**
397
- * Test backend connection
398
- */
399
- async testBackendAsync(backendId) {
400
- return this.client.request(
401
- HAEXTENSION_METHODS.filesync.testBackend,
402
- { backendId }
403
- );
404
- }
405
- // --------------------------------------------------------------------------
406
- // Sync Rules
407
- // --------------------------------------------------------------------------
408
- /**
409
- * List sync rules
410
- */
411
- async listSyncRulesAsync() {
412
- return this.client.request(
413
- HAEXTENSION_METHODS.filesync.listSyncRules
414
- );
415
- }
416
- /**
417
- * Add a sync rule
418
- */
419
- async addSyncRuleAsync(options) {
420
- return this.client.request(
421
- HAEXTENSION_METHODS.filesync.addSyncRule,
422
- options
423
- );
424
- }
425
- /**
426
- * Update a sync rule
427
- */
428
- async updateSyncRuleAsync(options) {
429
- return this.client.request(
430
- HAEXTENSION_METHODS.filesync.updateSyncRule,
431
- options
432
- );
433
- }
434
- /**
435
- * Remove a sync rule
436
- */
437
- async removeSyncRuleAsync(ruleId) {
438
- await this.client.request(HAEXTENSION_METHODS.filesync.removeSyncRule, {
439
- ruleId
440
- });
441
- }
442
- // --------------------------------------------------------------------------
443
- // Sync Operations
444
- // --------------------------------------------------------------------------
445
- /**
446
- * Get current sync status
447
- */
448
- async getSyncStatusAsync() {
449
- return this.client.request(
450
- HAEXTENSION_METHODS.filesync.getSyncStatus
451
- );
452
- }
453
- /**
454
- * Trigger a manual sync
455
- */
456
- async triggerSyncAsync() {
457
- await this.client.request(HAEXTENSION_METHODS.filesync.triggerSync);
458
- }
459
- /**
460
- * Pause syncing
461
- */
462
- async pauseSyncAsync() {
463
- await this.client.request(HAEXTENSION_METHODS.filesync.pauseSync);
464
- }
465
- /**
466
- * Resume syncing
467
- */
468
- async resumeSyncAsync() {
469
- await this.client.request(HAEXTENSION_METHODS.filesync.resumeSync);
470
- }
471
- // --------------------------------------------------------------------------
472
- // Conflict Resolution
473
- // --------------------------------------------------------------------------
474
- /**
475
- * Resolve a file conflict
476
- */
477
- async resolveConflictAsync(fileId, resolution) {
478
- await this.client.request(HAEXTENSION_METHODS.filesync.resolveConflict, {
479
- fileId,
480
- resolution
481
- });
482
- }
483
- // --------------------------------------------------------------------------
484
- // Folder Selection (Native Dialog)
485
- // --------------------------------------------------------------------------
486
- /**
487
- * Open a folder selection dialog
488
- */
489
- async selectFolderAsync() {
490
- return this.client.request(
491
- HAEXTENSION_METHODS.filesync.selectFolder
492
- );
493
- }
494
- // --------------------------------------------------------------------------
495
- // Sync Queue
496
- // --------------------------------------------------------------------------
497
- /**
498
- * Add files to the sync queue
499
- */
500
- async addToQueueAsync(options) {
501
- return this.client.request(
502
- HAEXTENSION_METHODS.filesync.addToQueue,
503
- options
504
- );
505
- }
506
- /**
507
- * Get queue entries for the current device
508
- */
509
- async getQueueAsync(options) {
510
- return this.client.request(
511
- HAEXTENSION_METHODS.filesync.getQueue,
512
- options
513
- );
514
- }
515
- /**
516
- * Get aggregated queue summary for the current device
517
- */
518
- async getQueueSummaryAsync() {
519
- return this.client.request(
520
- HAEXTENSION_METHODS.filesync.getQueueSummary
521
- );
522
- }
523
- /**
524
- * Mark a queue entry as started (in_progress)
525
- */
526
- async startQueueEntryAsync(entryId) {
527
- await this.client.request(HAEXTENSION_METHODS.filesync.startQueueEntry, {
528
- entryId
529
- });
530
- }
531
- /**
532
- * Mark a queue entry as completed
533
- */
534
- async completeQueueEntryAsync(entryId) {
535
- await this.client.request(HAEXTENSION_METHODS.filesync.completeQueueEntry, {
536
- entryId
537
- });
538
- }
539
- /**
540
- * Mark a queue entry as failed
541
- */
542
- async failQueueEntryAsync(entryId, errorMessage) {
543
- await this.client.request(HAEXTENSION_METHODS.filesync.failQueueEntry, {
544
- entryId,
545
- errorMessage
546
- });
547
- }
548
- /**
549
- * Retry all failed queue entries (reset to pending)
550
- */
551
- async retryFailedQueueAsync() {
552
- await this.client.request(HAEXTENSION_METHODS.filesync.retryFailedQueue);
553
- }
554
- /**
555
- * Remove a queue entry
556
- */
557
- async removeQueueEntryAsync(entryId) {
558
- await this.client.request(HAEXTENSION_METHODS.filesync.removeQueueEntry, {
559
- entryId
560
- });
561
- }
562
- /**
563
- * Clear all queue entries for a sync rule
564
- */
565
- async clearQueueAsync(ruleId) {
566
- await this.client.request(HAEXTENSION_METHODS.filesync.clearQueue, {
567
- ruleId
568
- });
569
- }
570
- /**
571
- * Reset in_progress entries to pending (for recovery after crash)
572
- */
573
- async recoverQueueAsync() {
574
- await this.client.request(HAEXTENSION_METHODS.filesync.recoverQueue);
575
- }
576
- };
577
-
578
235
  // src/api/filesystem.ts
579
236
  var FilesystemAPI = class {
580
237
  constructor(client) {
581
238
  this.client = client;
582
- this.sync = new FileSyncAPI(client);
583
239
  }
584
240
  /**
585
241
  * Opens a save file dialog and saves the provided data to the selected location