@haex-space/vault-sdk 2.3.16 → 2.5.0
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-ChH7wiuU.d.ts → client-BNq2TcVs.d.ts} +25 -95
- package/dist/{client-8eGxojZ1.d.mts → client-DQ6VwHic.d.mts} +25 -95
- package/dist/index.d.mts +75 -5
- package/dist/index.d.ts +75 -5
- package/dist/index.js +1076 -680
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1074 -680
- 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 +1025 -658
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +1025 -658
- 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 +1034 -667
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +1034 -667
- 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 +1027 -660
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +1027 -660
- package/dist/svelte.mjs.map +1 -1
- package/dist/{types-DBF83o_W.d.mts → types-Bw5uc1vm.d.mts} +70 -11
- package/dist/{types-DBF83o_W.d.ts → types-Bw5uc1vm.d.ts} +70 -11
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +1025 -658
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +1025 -658
- 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-Bw5uc1vm.js';
|
|
2
2
|
import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
|
|
4
4
|
declare class StorageAPI {
|
|
@@ -376,23 +376,30 @@ declare class PermissionsAPI {
|
|
|
376
376
|
checkFilesystemAsync(path: string, operation: "read" | "write"): Promise<boolean>;
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
+
/**
|
|
380
|
+
* HaexVault Client
|
|
381
|
+
*
|
|
382
|
+
* Main SDK client for extensions running in HaexVault.
|
|
383
|
+
* Supports both native WebView mode (Tauri) and iframe mode (mobile/web).
|
|
384
|
+
*/
|
|
385
|
+
|
|
379
386
|
declare class HaexVaultClient {
|
|
380
|
-
private config;
|
|
381
|
-
private pendingRequests;
|
|
382
|
-
private eventListeners;
|
|
383
|
-
private externalRequestHandlers;
|
|
384
|
-
private messageHandler;
|
|
387
|
+
private readonly config;
|
|
385
388
|
private initialized;
|
|
389
|
+
private isNativeWindow;
|
|
386
390
|
private requestCounter;
|
|
387
391
|
private _extensionInfo;
|
|
388
392
|
private _context;
|
|
389
|
-
private
|
|
390
|
-
private
|
|
393
|
+
private _setupCompleted;
|
|
394
|
+
private readonly pendingRequests;
|
|
395
|
+
private readonly eventListeners;
|
|
396
|
+
private readonly externalRequestHandlers;
|
|
397
|
+
private readonly reactiveSubscribers;
|
|
398
|
+
private messageHandler;
|
|
391
399
|
private readyPromise;
|
|
392
400
|
private resolveReady;
|
|
393
401
|
private setupPromise;
|
|
394
402
|
private setupHook;
|
|
395
|
-
private _setupCompleted;
|
|
396
403
|
orm: SqliteRemoteDatabase<Record<string, unknown>> | null;
|
|
397
404
|
readonly storage: StorageAPI;
|
|
398
405
|
readonly database: DatabaseAPI;
|
|
@@ -400,40 +407,14 @@ declare class HaexVaultClient {
|
|
|
400
407
|
readonly web: WebAPI;
|
|
401
408
|
readonly permissions: PermissionsAPI;
|
|
402
409
|
constructor(config?: HaexHubConfig);
|
|
403
|
-
/**
|
|
404
|
-
* Gibt ein Promise zurück, das aufgelöst wird, sobald der Client
|
|
405
|
-
* initialisiert ist und Extension-Infos empfangen hat.
|
|
406
|
-
*/
|
|
407
410
|
ready(): Promise<void>;
|
|
408
|
-
/**
|
|
409
|
-
* Gibt zurück, ob das Setup bereits abgeschlossen wurde.
|
|
410
|
-
*/
|
|
411
411
|
get setupCompleted(): boolean;
|
|
412
|
-
/**
|
|
413
|
-
* Registriert eine Setup-Funktion, die nach der Initialisierung ausgeführt wird.
|
|
414
|
-
* Diese Funktion sollte für Aufgaben wie Tabellenerstellung, Migrationen, etc. verwendet werden.
|
|
415
|
-
* @param setupFn Die Setup-Funktion, die ausgeführt werden soll
|
|
416
|
-
*/
|
|
417
412
|
onSetup(setupFn: () => Promise<void>): void;
|
|
418
|
-
/**
|
|
419
|
-
* Gibt ein Promise zurück, das aufgelöst wird, sobald der Client vollständig eingerichtet ist.
|
|
420
|
-
* Dies umfasst die Initialisierung UND das Setup (z.B. Tabellenerstellung).
|
|
421
|
-
* Falls kein Setup-Hook registriert wurde, entspricht dies ready().
|
|
422
|
-
*/
|
|
423
413
|
setupComplete(): Promise<void>;
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
* Initialisiert die Drizzle-Datenbankinstanz.
|
|
427
|
-
* Muss nach der Definition des Schemas aufgerufen werden.
|
|
428
|
-
* @param schema Das Drizzle-Schemaobjekt (mit bereits geprefixten Tabellennamen).
|
|
429
|
-
* @returns Die typsichere Drizzle-Datenbankinstanz.
|
|
430
|
-
*/
|
|
431
|
-
initializeDatabase<T extends Record<string, unknown>>(schema: T): SqliteRemoteDatabase<T>;
|
|
414
|
+
destroy(): void;
|
|
432
415
|
get extensionInfo(): ExtensionInfo | null;
|
|
433
416
|
get context(): ApplicationContext | null;
|
|
434
417
|
subscribe(callback: () => void): () => void;
|
|
435
|
-
private notifySubscribers;
|
|
436
|
-
getDependencies(): Promise<ExtensionInfo[]>;
|
|
437
418
|
getTableName(tableName: string): string;
|
|
438
419
|
getDependencyTableName(publicKey: string, extensionName: string, tableName: string): string;
|
|
439
420
|
parseTableName(fullTableName: string): {
|
|
@@ -441,81 +422,30 @@ declare class HaexVaultClient {
|
|
|
441
422
|
extensionName: string;
|
|
442
423
|
tableName: string;
|
|
443
424
|
} | null;
|
|
444
|
-
|
|
445
|
-
* Execute a raw SQL query (SELECT)
|
|
446
|
-
* Returns rows as an array of objects
|
|
447
|
-
*/
|
|
425
|
+
initializeDatabase<T extends Record<string, unknown>>(schema: T): SqliteRemoteDatabase<T>;
|
|
448
426
|
query<T = Record<string, unknown>>(sql: string, params?: unknown[]): Promise<T[]>;
|
|
449
|
-
/**
|
|
450
|
-
* Alias for query() - more intuitive for SELECT statements
|
|
451
|
-
*/
|
|
452
427
|
select<T = Record<string, unknown>>(sql: string, params?: unknown[]): Promise<T[]>;
|
|
453
|
-
/**
|
|
454
|
-
* Execute a raw SQL statement (INSERT, UPDATE, DELETE, CREATE, etc.)
|
|
455
|
-
* Returns rowsAffected and lastInsertId
|
|
456
|
-
*/
|
|
457
428
|
execute(sql: string, params?: unknown[]): Promise<{
|
|
458
429
|
rowsAffected: number;
|
|
459
430
|
lastInsertId?: number;
|
|
460
431
|
}>;
|
|
461
|
-
/**
|
|
462
|
-
* Registers and applies extension migrations with HaexVault
|
|
463
|
-
*
|
|
464
|
-
* HaexVault will:
|
|
465
|
-
* 1. Validate all SQL statements (ensure only extension's own tables are accessed)
|
|
466
|
-
* 2. Store migrations with applied_at = NULL
|
|
467
|
-
* 3. Query pending migrations sorted by name
|
|
468
|
-
* 4. Apply pending migrations and set up CRDT triggers
|
|
469
|
-
* 5. Mark successful migrations with applied_at timestamp
|
|
470
|
-
*
|
|
471
|
-
* @param extensionVersion - The version of the extension
|
|
472
|
-
* @param migrations - Array of migration objects with name and SQL content
|
|
473
|
-
* @returns Promise with migration result (applied count, already applied count, applied migration names)
|
|
474
|
-
*/
|
|
475
432
|
registerMigrationsAsync(extensionVersion: string, migrations: Migration[]): Promise<MigrationResult>;
|
|
433
|
+
getDependencies(): Promise<ExtensionInfo[]>;
|
|
476
434
|
requestDatabasePermission(request: DatabasePermissionRequest): Promise<PermissionResponse>;
|
|
477
435
|
checkDatabasePermission(resource: string, operation: "read" | "write"): Promise<boolean>;
|
|
478
436
|
respondToSearch(requestId: string, results: SearchResult[]): Promise<void>;
|
|
479
|
-
/**
|
|
480
|
-
* Register a handler for external requests (from browser extensions, CLI, servers, etc.)
|
|
481
|
-
*
|
|
482
|
-
* @param action - The action/method name to handle (e.g., "get-logins", "get-totp")
|
|
483
|
-
* @param handler - Function that processes the request and returns a response
|
|
484
|
-
* @returns Unsubscribe function to remove the handler
|
|
485
|
-
*
|
|
486
|
-
* @example
|
|
487
|
-
* ```typescript
|
|
488
|
-
* client.onExternalRequest("get-logins", async (request) => {
|
|
489
|
-
* const entries = await getMatchingEntries(request.payload.url);
|
|
490
|
-
* return {
|
|
491
|
-
* requestId: request.requestId,
|
|
492
|
-
* success: true,
|
|
493
|
-
* data: { entries }
|
|
494
|
-
* };
|
|
495
|
-
* });
|
|
496
|
-
* ```
|
|
497
|
-
*/
|
|
498
437
|
onExternalRequest(action: string, handler: ExternalRequestHandler): () => void;
|
|
499
|
-
/**
|
|
500
|
-
* Send a response to an external request back to haex-vault
|
|
501
|
-
* This is called internally after a handler processes a request
|
|
502
|
-
*/
|
|
503
438
|
respondToExternalRequest(response: ExternalResponse): Promise<void>;
|
|
504
|
-
request<T = unknown, P = Record<string, unknown>>(method: string, params?: P): Promise<T>;
|
|
505
|
-
private postMessage;
|
|
506
|
-
private invoke;
|
|
507
439
|
on(eventType: string, callback: EventCallback): void;
|
|
508
440
|
off(eventType: string, callback: EventCallback): void;
|
|
509
|
-
|
|
441
|
+
request<T = unknown, P = Record<string, unknown>>(method: string, params?: P): Promise<T>;
|
|
510
442
|
private init;
|
|
511
|
-
private
|
|
443
|
+
private initNative;
|
|
444
|
+
private initIframe;
|
|
512
445
|
private handleEvent;
|
|
513
|
-
private
|
|
514
|
-
private
|
|
515
|
-
private
|
|
516
|
-
private validatePublicKey;
|
|
517
|
-
private validateExtensionName;
|
|
518
|
-
private validateTableName;
|
|
446
|
+
private handleExternalRequestInternal;
|
|
447
|
+
private runSetupAsync;
|
|
448
|
+
private notifySubscribersInternal;
|
|
519
449
|
private log;
|
|
520
450
|
}
|
|
521
451
|
|
|
@@ -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-Bw5uc1vm.mjs';
|
|
2
2
|
import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
|
|
4
4
|
declare class StorageAPI {
|
|
@@ -376,23 +376,30 @@ declare class PermissionsAPI {
|
|
|
376
376
|
checkFilesystemAsync(path: string, operation: "read" | "write"): Promise<boolean>;
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
+
/**
|
|
380
|
+
* HaexVault Client
|
|
381
|
+
*
|
|
382
|
+
* Main SDK client for extensions running in HaexVault.
|
|
383
|
+
* Supports both native WebView mode (Tauri) and iframe mode (mobile/web).
|
|
384
|
+
*/
|
|
385
|
+
|
|
379
386
|
declare class HaexVaultClient {
|
|
380
|
-
private config;
|
|
381
|
-
private pendingRequests;
|
|
382
|
-
private eventListeners;
|
|
383
|
-
private externalRequestHandlers;
|
|
384
|
-
private messageHandler;
|
|
387
|
+
private readonly config;
|
|
385
388
|
private initialized;
|
|
389
|
+
private isNativeWindow;
|
|
386
390
|
private requestCounter;
|
|
387
391
|
private _extensionInfo;
|
|
388
392
|
private _context;
|
|
389
|
-
private
|
|
390
|
-
private
|
|
393
|
+
private _setupCompleted;
|
|
394
|
+
private readonly pendingRequests;
|
|
395
|
+
private readonly eventListeners;
|
|
396
|
+
private readonly externalRequestHandlers;
|
|
397
|
+
private readonly reactiveSubscribers;
|
|
398
|
+
private messageHandler;
|
|
391
399
|
private readyPromise;
|
|
392
400
|
private resolveReady;
|
|
393
401
|
private setupPromise;
|
|
394
402
|
private setupHook;
|
|
395
|
-
private _setupCompleted;
|
|
396
403
|
orm: SqliteRemoteDatabase<Record<string, unknown>> | null;
|
|
397
404
|
readonly storage: StorageAPI;
|
|
398
405
|
readonly database: DatabaseAPI;
|
|
@@ -400,40 +407,14 @@ declare class HaexVaultClient {
|
|
|
400
407
|
readonly web: WebAPI;
|
|
401
408
|
readonly permissions: PermissionsAPI;
|
|
402
409
|
constructor(config?: HaexHubConfig);
|
|
403
|
-
/**
|
|
404
|
-
* Gibt ein Promise zurück, das aufgelöst wird, sobald der Client
|
|
405
|
-
* initialisiert ist und Extension-Infos empfangen hat.
|
|
406
|
-
*/
|
|
407
410
|
ready(): Promise<void>;
|
|
408
|
-
/**
|
|
409
|
-
* Gibt zurück, ob das Setup bereits abgeschlossen wurde.
|
|
410
|
-
*/
|
|
411
411
|
get setupCompleted(): boolean;
|
|
412
|
-
/**
|
|
413
|
-
* Registriert eine Setup-Funktion, die nach der Initialisierung ausgeführt wird.
|
|
414
|
-
* Diese Funktion sollte für Aufgaben wie Tabellenerstellung, Migrationen, etc. verwendet werden.
|
|
415
|
-
* @param setupFn Die Setup-Funktion, die ausgeführt werden soll
|
|
416
|
-
*/
|
|
417
412
|
onSetup(setupFn: () => Promise<void>): void;
|
|
418
|
-
/**
|
|
419
|
-
* Gibt ein Promise zurück, das aufgelöst wird, sobald der Client vollständig eingerichtet ist.
|
|
420
|
-
* Dies umfasst die Initialisierung UND das Setup (z.B. Tabellenerstellung).
|
|
421
|
-
* Falls kein Setup-Hook registriert wurde, entspricht dies ready().
|
|
422
|
-
*/
|
|
423
413
|
setupComplete(): Promise<void>;
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
* Initialisiert die Drizzle-Datenbankinstanz.
|
|
427
|
-
* Muss nach der Definition des Schemas aufgerufen werden.
|
|
428
|
-
* @param schema Das Drizzle-Schemaobjekt (mit bereits geprefixten Tabellennamen).
|
|
429
|
-
* @returns Die typsichere Drizzle-Datenbankinstanz.
|
|
430
|
-
*/
|
|
431
|
-
initializeDatabase<T extends Record<string, unknown>>(schema: T): SqliteRemoteDatabase<T>;
|
|
414
|
+
destroy(): void;
|
|
432
415
|
get extensionInfo(): ExtensionInfo | null;
|
|
433
416
|
get context(): ApplicationContext | null;
|
|
434
417
|
subscribe(callback: () => void): () => void;
|
|
435
|
-
private notifySubscribers;
|
|
436
|
-
getDependencies(): Promise<ExtensionInfo[]>;
|
|
437
418
|
getTableName(tableName: string): string;
|
|
438
419
|
getDependencyTableName(publicKey: string, extensionName: string, tableName: string): string;
|
|
439
420
|
parseTableName(fullTableName: string): {
|
|
@@ -441,81 +422,30 @@ declare class HaexVaultClient {
|
|
|
441
422
|
extensionName: string;
|
|
442
423
|
tableName: string;
|
|
443
424
|
} | null;
|
|
444
|
-
|
|
445
|
-
* Execute a raw SQL query (SELECT)
|
|
446
|
-
* Returns rows as an array of objects
|
|
447
|
-
*/
|
|
425
|
+
initializeDatabase<T extends Record<string, unknown>>(schema: T): SqliteRemoteDatabase<T>;
|
|
448
426
|
query<T = Record<string, unknown>>(sql: string, params?: unknown[]): Promise<T[]>;
|
|
449
|
-
/**
|
|
450
|
-
* Alias for query() - more intuitive for SELECT statements
|
|
451
|
-
*/
|
|
452
427
|
select<T = Record<string, unknown>>(sql: string, params?: unknown[]): Promise<T[]>;
|
|
453
|
-
/**
|
|
454
|
-
* Execute a raw SQL statement (INSERT, UPDATE, DELETE, CREATE, etc.)
|
|
455
|
-
* Returns rowsAffected and lastInsertId
|
|
456
|
-
*/
|
|
457
428
|
execute(sql: string, params?: unknown[]): Promise<{
|
|
458
429
|
rowsAffected: number;
|
|
459
430
|
lastInsertId?: number;
|
|
460
431
|
}>;
|
|
461
|
-
/**
|
|
462
|
-
* Registers and applies extension migrations with HaexVault
|
|
463
|
-
*
|
|
464
|
-
* HaexVault will:
|
|
465
|
-
* 1. Validate all SQL statements (ensure only extension's own tables are accessed)
|
|
466
|
-
* 2. Store migrations with applied_at = NULL
|
|
467
|
-
* 3. Query pending migrations sorted by name
|
|
468
|
-
* 4. Apply pending migrations and set up CRDT triggers
|
|
469
|
-
* 5. Mark successful migrations with applied_at timestamp
|
|
470
|
-
*
|
|
471
|
-
* @param extensionVersion - The version of the extension
|
|
472
|
-
* @param migrations - Array of migration objects with name and SQL content
|
|
473
|
-
* @returns Promise with migration result (applied count, already applied count, applied migration names)
|
|
474
|
-
*/
|
|
475
432
|
registerMigrationsAsync(extensionVersion: string, migrations: Migration[]): Promise<MigrationResult>;
|
|
433
|
+
getDependencies(): Promise<ExtensionInfo[]>;
|
|
476
434
|
requestDatabasePermission(request: DatabasePermissionRequest): Promise<PermissionResponse>;
|
|
477
435
|
checkDatabasePermission(resource: string, operation: "read" | "write"): Promise<boolean>;
|
|
478
436
|
respondToSearch(requestId: string, results: SearchResult[]): Promise<void>;
|
|
479
|
-
/**
|
|
480
|
-
* Register a handler for external requests (from browser extensions, CLI, servers, etc.)
|
|
481
|
-
*
|
|
482
|
-
* @param action - The action/method name to handle (e.g., "get-logins", "get-totp")
|
|
483
|
-
* @param handler - Function that processes the request and returns a response
|
|
484
|
-
* @returns Unsubscribe function to remove the handler
|
|
485
|
-
*
|
|
486
|
-
* @example
|
|
487
|
-
* ```typescript
|
|
488
|
-
* client.onExternalRequest("get-logins", async (request) => {
|
|
489
|
-
* const entries = await getMatchingEntries(request.payload.url);
|
|
490
|
-
* return {
|
|
491
|
-
* requestId: request.requestId,
|
|
492
|
-
* success: true,
|
|
493
|
-
* data: { entries }
|
|
494
|
-
* };
|
|
495
|
-
* });
|
|
496
|
-
* ```
|
|
497
|
-
*/
|
|
498
437
|
onExternalRequest(action: string, handler: ExternalRequestHandler): () => void;
|
|
499
|
-
/**
|
|
500
|
-
* Send a response to an external request back to haex-vault
|
|
501
|
-
* This is called internally after a handler processes a request
|
|
502
|
-
*/
|
|
503
438
|
respondToExternalRequest(response: ExternalResponse): Promise<void>;
|
|
504
|
-
request<T = unknown, P = Record<string, unknown>>(method: string, params?: P): Promise<T>;
|
|
505
|
-
private postMessage;
|
|
506
|
-
private invoke;
|
|
507
439
|
on(eventType: string, callback: EventCallback): void;
|
|
508
440
|
off(eventType: string, callback: EventCallback): void;
|
|
509
|
-
|
|
441
|
+
request<T = unknown, P = Record<string, unknown>>(method: string, params?: P): Promise<T>;
|
|
510
442
|
private init;
|
|
511
|
-
private
|
|
443
|
+
private initNative;
|
|
444
|
+
private initIframe;
|
|
512
445
|
private handleEvent;
|
|
513
|
-
private
|
|
514
|
-
private
|
|
515
|
-
private
|
|
516
|
-
private validatePublicKey;
|
|
517
|
-
private validateExtensionName;
|
|
518
|
-
private validateTableName;
|
|
446
|
+
private handleExternalRequestInternal;
|
|
447
|
+
private runSetupAsync;
|
|
448
|
+
private notifySubscribersInternal;
|
|
519
449
|
private log;
|
|
520
450
|
}
|
|
521
451
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as HaexVaultClient } from './client-
|
|
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-
|
|
3
|
-
import { E as ExtensionManifest, H as HaexHubConfig } from './types-
|
|
4
|
-
export { A as ApplicationContext, C as ContextChangedEvent,
|
|
1
|
+
import { H as HaexVaultClient } from './client-DQ6VwHic.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-DQ6VwHic.mjs';
|
|
3
|
+
import { E as ExtensionManifest, H as HaexHubConfig } from './types-Bw5uc1vm.mjs';
|
|
4
|
+
export { A as ApplicationContext, t as AuthorizedClient, B as BlockedClient, C as ContextChangedEvent, y as DEFAULT_TIMEOUT, o as DatabaseColumnInfo, m as DatabaseExecuteParams, k as DatabasePermission, d as DatabasePermissionRequest, l as DatabaseQueryParams, D as DatabaseQueryResult, n as DatabaseTableInfo, J as EXTERNAL_EVENTS, x as ErrorCode, g as EventCallback, a as ExtensionInfo, v as ExternalAuthDecision, K as ExternalEvent, s as ExternalRequest, r as ExternalRequestEvent, e as ExternalRequestHandler, f as ExternalResponse, G as HAEXTENSION_EVENTS, j as HaexHubEvent, h as HaexHubRequest, i as HaexHubResponse, F as HaexVaultSdkError, I as HaextensionEvent, u as PendingAuthorization, P as PermissionResponse, w as PermissionStatus, p as SearchQuery, q as SearchRequestEvent, S as SearchResult, T as TABLE_SEPARATOR, W as WebRequestOptions, c as WebResponse, z as getTableName } from './types-Bw5uc1vm.mjs';
|
|
5
5
|
export { H as HaextensionConfig } from './config-D_HXjsEV.mjs';
|
|
6
6
|
import 'drizzle-orm/sqlite-proxy';
|
|
7
7
|
|
|
@@ -159,6 +159,76 @@ declare const HAEXSPACE_MESSAGE_TYPES: {
|
|
|
159
159
|
};
|
|
160
160
|
type HaexspaceMessageType = (typeof HAEXSPACE_MESSAGE_TYPES)[keyof typeof HAEXSPACE_MESSAGE_TYPES];
|
|
161
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Tauri Command Names
|
|
164
|
+
*
|
|
165
|
+
* Central definition of all Tauri invoke command names.
|
|
166
|
+
* These must match the #[tauri::command] function names in Rust.
|
|
167
|
+
*/
|
|
168
|
+
declare const TAURI_COMMANDS: {
|
|
169
|
+
readonly database: {
|
|
170
|
+
readonly query: "webview_extension_db_query";
|
|
171
|
+
readonly execute: "webview_extension_db_execute";
|
|
172
|
+
readonly registerMigrations: "webview_extension_db_register_migrations";
|
|
173
|
+
};
|
|
174
|
+
readonly permissions: {
|
|
175
|
+
readonly checkWeb: "webview_extension_check_web_permission";
|
|
176
|
+
readonly checkDatabase: "webview_extension_check_database_permission";
|
|
177
|
+
readonly checkFilesystem: "webview_extension_check_filesystem_permission";
|
|
178
|
+
};
|
|
179
|
+
readonly web: {
|
|
180
|
+
readonly open: "webview_extension_web_open";
|
|
181
|
+
readonly fetch: "webview_extension_web_request";
|
|
182
|
+
};
|
|
183
|
+
readonly filesystem: {
|
|
184
|
+
readonly saveFile: "webview_extension_fs_save_file";
|
|
185
|
+
readonly openFile: "webview_extension_fs_open_file";
|
|
186
|
+
readonly showImage: "webview_extension_fs_show_image";
|
|
187
|
+
};
|
|
188
|
+
readonly external: {
|
|
189
|
+
readonly respond: "external_respond";
|
|
190
|
+
readonly bridgeStart: "external_bridge_start";
|
|
191
|
+
readonly bridgeStop: "external_bridge_stop";
|
|
192
|
+
readonly bridgeGetStatus: "external_bridge_get_status";
|
|
193
|
+
readonly clientAllow: "external_client_allow";
|
|
194
|
+
readonly clientBlock: "external_client_block";
|
|
195
|
+
readonly getAuthorizedClients: "external_get_authorized_clients";
|
|
196
|
+
readonly revokeClient: "external_revoke_client";
|
|
197
|
+
readonly getBlockedClients: "external_get_blocked_clients";
|
|
198
|
+
readonly unblockClient: "external_unblock_client";
|
|
199
|
+
readonly isClientBlocked: "external_is_client_blocked";
|
|
200
|
+
readonly getPendingAuthorizations: "external_get_pending_authorizations";
|
|
201
|
+
};
|
|
202
|
+
readonly extension: {
|
|
203
|
+
readonly getInfo: "webview_extension_get_info";
|
|
204
|
+
readonly getContext: "webview_extension_context_get";
|
|
205
|
+
};
|
|
206
|
+
readonly filesync: {
|
|
207
|
+
readonly listSpaces: "filesync_list_spaces";
|
|
208
|
+
readonly createSpace: "filesync_create_space";
|
|
209
|
+
readonly deleteSpace: "filesync_delete_space";
|
|
210
|
+
readonly listFiles: "filesync_list_files";
|
|
211
|
+
readonly getFile: "filesync_get_file";
|
|
212
|
+
readonly uploadFile: "filesync_upload_file";
|
|
213
|
+
readonly downloadFile: "filesync_download_file";
|
|
214
|
+
readonly deleteFile: "filesync_delete_file";
|
|
215
|
+
readonly listBackends: "filesync_list_backends";
|
|
216
|
+
readonly addBackend: "filesync_add_backend";
|
|
217
|
+
readonly removeBackend: "filesync_remove_backend";
|
|
218
|
+
readonly testBackend: "filesync_test_backend";
|
|
219
|
+
readonly listSyncRules: "filesync_list_sync_rules";
|
|
220
|
+
readonly addSyncRule: "filesync_add_sync_rule";
|
|
221
|
+
readonly removeSyncRule: "filesync_remove_sync_rule";
|
|
222
|
+
readonly getSyncStatus: "filesync_get_sync_status";
|
|
223
|
+
readonly triggerSync: "filesync_trigger_sync";
|
|
224
|
+
readonly pauseSync: "filesync_pause_sync";
|
|
225
|
+
readonly resumeSync: "filesync_resume_sync";
|
|
226
|
+
readonly resolveConflict: "filesync_resolve_conflict";
|
|
227
|
+
readonly selectFolder: "filesync_select_folder";
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
type TauriCommand = (typeof TAURI_COMMANDS.database)[keyof typeof TAURI_COMMANDS.database] | (typeof TAURI_COMMANDS.permissions)[keyof typeof TAURI_COMMANDS.permissions] | (typeof TAURI_COMMANDS.web)[keyof typeof TAURI_COMMANDS.web] | (typeof TAURI_COMMANDS.filesystem)[keyof typeof TAURI_COMMANDS.filesystem] | (typeof TAURI_COMMANDS.external)[keyof typeof TAURI_COMMANDS.external] | (typeof TAURI_COMMANDS.extension)[keyof typeof TAURI_COMMANDS.extension] | (typeof TAURI_COMMANDS.filesync)[keyof typeof TAURI_COMMANDS.filesync];
|
|
231
|
+
|
|
162
232
|
interface VerifyResult {
|
|
163
233
|
valid: boolean;
|
|
164
234
|
error?: string;
|
|
@@ -287,4 +357,4 @@ declare function base64ToArrayBuffer(base64: string): Uint8Array;
|
|
|
287
357
|
|
|
288
358
|
declare function createHaexVaultClient(config?: HaexHubConfig): HaexVaultClient;
|
|
289
359
|
|
|
290
|
-
export { ExtensionManifest, HAEXSPACE_MESSAGE_TYPES, HAEXTENSION_METHODS, HaexHubConfig, HaexVaultClient, type HaexspaceMessageType, type HaextensionMethod, type VerifyResult, type ZipFileEntry, arrayBufferToBase64, base64ToArrayBuffer, createHaexVaultClient, decryptCrdtData, decryptString, decryptVaultKey, decryptVaultName, deriveKeyFromPassword, encryptCrdtData, encryptString, encryptVaultKey, generateVaultKey, hexToBytes, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, sortObjectKeysRecursively, unwrapKey, verifyExtensionSignature, wrapKey };
|
|
360
|
+
export { ExtensionManifest, HAEXSPACE_MESSAGE_TYPES, HAEXTENSION_METHODS, HaexHubConfig, HaexVaultClient, type HaexspaceMessageType, type HaextensionMethod, TAURI_COMMANDS, type TauriCommand, type VerifyResult, type ZipFileEntry, arrayBufferToBase64, base64ToArrayBuffer, createHaexVaultClient, decryptCrdtData, decryptString, decryptVaultKey, decryptVaultName, deriveKeyFromPassword, encryptCrdtData, encryptString, encryptVaultKey, generateVaultKey, hexToBytes, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, sortObjectKeysRecursively, unwrapKey, verifyExtensionSignature, wrapKey };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as HaexVaultClient } from './client-
|
|
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-
|
|
3
|
-
import { E as ExtensionManifest, H as HaexHubConfig } from './types-
|
|
4
|
-
export { A as ApplicationContext, C as ContextChangedEvent,
|
|
1
|
+
import { H as HaexVaultClient } from './client-BNq2TcVs.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-BNq2TcVs.js';
|
|
3
|
+
import { E as ExtensionManifest, H as HaexHubConfig } from './types-Bw5uc1vm.js';
|
|
4
|
+
export { A as ApplicationContext, t as AuthorizedClient, B as BlockedClient, C as ContextChangedEvent, y as DEFAULT_TIMEOUT, o as DatabaseColumnInfo, m as DatabaseExecuteParams, k as DatabasePermission, d as DatabasePermissionRequest, l as DatabaseQueryParams, D as DatabaseQueryResult, n as DatabaseTableInfo, J as EXTERNAL_EVENTS, x as ErrorCode, g as EventCallback, a as ExtensionInfo, v as ExternalAuthDecision, K as ExternalEvent, s as ExternalRequest, r as ExternalRequestEvent, e as ExternalRequestHandler, f as ExternalResponse, G as HAEXTENSION_EVENTS, j as HaexHubEvent, h as HaexHubRequest, i as HaexHubResponse, F as HaexVaultSdkError, I as HaextensionEvent, u as PendingAuthorization, P as PermissionResponse, w as PermissionStatus, p as SearchQuery, q as SearchRequestEvent, S as SearchResult, T as TABLE_SEPARATOR, W as WebRequestOptions, c as WebResponse, z as getTableName } from './types-Bw5uc1vm.js';
|
|
5
5
|
export { H as HaextensionConfig } from './config-D_HXjsEV.js';
|
|
6
6
|
import 'drizzle-orm/sqlite-proxy';
|
|
7
7
|
|
|
@@ -159,6 +159,76 @@ declare const HAEXSPACE_MESSAGE_TYPES: {
|
|
|
159
159
|
};
|
|
160
160
|
type HaexspaceMessageType = (typeof HAEXSPACE_MESSAGE_TYPES)[keyof typeof HAEXSPACE_MESSAGE_TYPES];
|
|
161
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Tauri Command Names
|
|
164
|
+
*
|
|
165
|
+
* Central definition of all Tauri invoke command names.
|
|
166
|
+
* These must match the #[tauri::command] function names in Rust.
|
|
167
|
+
*/
|
|
168
|
+
declare const TAURI_COMMANDS: {
|
|
169
|
+
readonly database: {
|
|
170
|
+
readonly query: "webview_extension_db_query";
|
|
171
|
+
readonly execute: "webview_extension_db_execute";
|
|
172
|
+
readonly registerMigrations: "webview_extension_db_register_migrations";
|
|
173
|
+
};
|
|
174
|
+
readonly permissions: {
|
|
175
|
+
readonly checkWeb: "webview_extension_check_web_permission";
|
|
176
|
+
readonly checkDatabase: "webview_extension_check_database_permission";
|
|
177
|
+
readonly checkFilesystem: "webview_extension_check_filesystem_permission";
|
|
178
|
+
};
|
|
179
|
+
readonly web: {
|
|
180
|
+
readonly open: "webview_extension_web_open";
|
|
181
|
+
readonly fetch: "webview_extension_web_request";
|
|
182
|
+
};
|
|
183
|
+
readonly filesystem: {
|
|
184
|
+
readonly saveFile: "webview_extension_fs_save_file";
|
|
185
|
+
readonly openFile: "webview_extension_fs_open_file";
|
|
186
|
+
readonly showImage: "webview_extension_fs_show_image";
|
|
187
|
+
};
|
|
188
|
+
readonly external: {
|
|
189
|
+
readonly respond: "external_respond";
|
|
190
|
+
readonly bridgeStart: "external_bridge_start";
|
|
191
|
+
readonly bridgeStop: "external_bridge_stop";
|
|
192
|
+
readonly bridgeGetStatus: "external_bridge_get_status";
|
|
193
|
+
readonly clientAllow: "external_client_allow";
|
|
194
|
+
readonly clientBlock: "external_client_block";
|
|
195
|
+
readonly getAuthorizedClients: "external_get_authorized_clients";
|
|
196
|
+
readonly revokeClient: "external_revoke_client";
|
|
197
|
+
readonly getBlockedClients: "external_get_blocked_clients";
|
|
198
|
+
readonly unblockClient: "external_unblock_client";
|
|
199
|
+
readonly isClientBlocked: "external_is_client_blocked";
|
|
200
|
+
readonly getPendingAuthorizations: "external_get_pending_authorizations";
|
|
201
|
+
};
|
|
202
|
+
readonly extension: {
|
|
203
|
+
readonly getInfo: "webview_extension_get_info";
|
|
204
|
+
readonly getContext: "webview_extension_context_get";
|
|
205
|
+
};
|
|
206
|
+
readonly filesync: {
|
|
207
|
+
readonly listSpaces: "filesync_list_spaces";
|
|
208
|
+
readonly createSpace: "filesync_create_space";
|
|
209
|
+
readonly deleteSpace: "filesync_delete_space";
|
|
210
|
+
readonly listFiles: "filesync_list_files";
|
|
211
|
+
readonly getFile: "filesync_get_file";
|
|
212
|
+
readonly uploadFile: "filesync_upload_file";
|
|
213
|
+
readonly downloadFile: "filesync_download_file";
|
|
214
|
+
readonly deleteFile: "filesync_delete_file";
|
|
215
|
+
readonly listBackends: "filesync_list_backends";
|
|
216
|
+
readonly addBackend: "filesync_add_backend";
|
|
217
|
+
readonly removeBackend: "filesync_remove_backend";
|
|
218
|
+
readonly testBackend: "filesync_test_backend";
|
|
219
|
+
readonly listSyncRules: "filesync_list_sync_rules";
|
|
220
|
+
readonly addSyncRule: "filesync_add_sync_rule";
|
|
221
|
+
readonly removeSyncRule: "filesync_remove_sync_rule";
|
|
222
|
+
readonly getSyncStatus: "filesync_get_sync_status";
|
|
223
|
+
readonly triggerSync: "filesync_trigger_sync";
|
|
224
|
+
readonly pauseSync: "filesync_pause_sync";
|
|
225
|
+
readonly resumeSync: "filesync_resume_sync";
|
|
226
|
+
readonly resolveConflict: "filesync_resolve_conflict";
|
|
227
|
+
readonly selectFolder: "filesync_select_folder";
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
type TauriCommand = (typeof TAURI_COMMANDS.database)[keyof typeof TAURI_COMMANDS.database] | (typeof TAURI_COMMANDS.permissions)[keyof typeof TAURI_COMMANDS.permissions] | (typeof TAURI_COMMANDS.web)[keyof typeof TAURI_COMMANDS.web] | (typeof TAURI_COMMANDS.filesystem)[keyof typeof TAURI_COMMANDS.filesystem] | (typeof TAURI_COMMANDS.external)[keyof typeof TAURI_COMMANDS.external] | (typeof TAURI_COMMANDS.extension)[keyof typeof TAURI_COMMANDS.extension] | (typeof TAURI_COMMANDS.filesync)[keyof typeof TAURI_COMMANDS.filesync];
|
|
231
|
+
|
|
162
232
|
interface VerifyResult {
|
|
163
233
|
valid: boolean;
|
|
164
234
|
error?: string;
|
|
@@ -287,4 +357,4 @@ declare function base64ToArrayBuffer(base64: string): Uint8Array;
|
|
|
287
357
|
|
|
288
358
|
declare function createHaexVaultClient(config?: HaexHubConfig): HaexVaultClient;
|
|
289
359
|
|
|
290
|
-
export { ExtensionManifest, HAEXSPACE_MESSAGE_TYPES, HAEXTENSION_METHODS, HaexHubConfig, HaexVaultClient, type HaexspaceMessageType, type HaextensionMethod, type VerifyResult, type ZipFileEntry, arrayBufferToBase64, base64ToArrayBuffer, createHaexVaultClient, decryptCrdtData, decryptString, decryptVaultKey, decryptVaultName, deriveKeyFromPassword, encryptCrdtData, encryptString, encryptVaultKey, generateVaultKey, hexToBytes, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, sortObjectKeysRecursively, unwrapKey, verifyExtensionSignature, wrapKey };
|
|
360
|
+
export { ExtensionManifest, HAEXSPACE_MESSAGE_TYPES, HAEXTENSION_METHODS, HaexHubConfig, HaexVaultClient, type HaexspaceMessageType, type HaextensionMethod, TAURI_COMMANDS, type TauriCommand, type VerifyResult, type ZipFileEntry, arrayBufferToBase64, base64ToArrayBuffer, createHaexVaultClient, decryptCrdtData, decryptString, decryptVaultKey, decryptVaultName, deriveKeyFromPassword, encryptCrdtData, encryptString, encryptVaultKey, generateVaultKey, hexToBytes, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, sortObjectKeysRecursively, unwrapKey, verifyExtensionSignature, wrapKey };
|