@haex-space/vault-sdk 2.5.17 → 2.5.19

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.
@@ -3,7 +3,7 @@ import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
3
3
 
4
4
  declare class StorageAPI {
5
5
  private client;
6
- constructor(client: HaexVaultClient);
6
+ constructor(client: HaexVaultSdk);
7
7
  getItem(key: string): Promise<string | null>;
8
8
  setItem(key: string, value: string): Promise<void>;
9
9
  removeItem(key: string): Promise<void>;
@@ -13,7 +13,7 @@ declare class StorageAPI {
13
13
 
14
14
  declare class DatabaseAPI {
15
15
  private client;
16
- constructor(client: HaexVaultClient);
16
+ constructor(client: HaexVaultSdk);
17
17
  query<T>(query: string, params?: unknown[]): Promise<T[]>;
18
18
  queryOne<T = unknown>(query: string, params?: unknown[]): Promise<T | null>;
19
19
  execute(query: string, params?: unknown[]): Promise<DatabaseQueryResult>;
@@ -148,7 +148,7 @@ interface DownloadFileOptions {
148
148
  */
149
149
  declare class FileSyncAPI {
150
150
  private client;
151
- constructor(client: HaexVaultClient);
151
+ constructor(client: HaexVaultSdk);
152
152
  /**
153
153
  * List all file spaces
154
154
  */
@@ -293,7 +293,7 @@ interface ShowImageResult {
293
293
  declare class FilesystemAPI {
294
294
  private client;
295
295
  readonly sync: FileSyncAPI;
296
- constructor(client: HaexVaultClient);
296
+ constructor(client: HaexVaultSdk);
297
297
  /**
298
298
  * Opens a save file dialog and saves the provided data to the selected location
299
299
  * @param data The file data as Uint8Array
@@ -320,7 +320,7 @@ declare class FilesystemAPI {
320
320
 
321
321
  declare class WebAPI {
322
322
  private client;
323
- constructor(client: HaexVaultClient);
323
+ constructor(client: HaexVaultSdk);
324
324
  /**
325
325
  * Performs a web request through the HaexHub host application
326
326
  * @param url The URL to fetch
@@ -352,7 +352,7 @@ declare class WebAPI {
352
352
 
353
353
  declare class PermissionsAPI {
354
354
  private client;
355
- constructor(client: HaexVaultClient);
355
+ constructor(client: HaexVaultSdk);
356
356
  /**
357
357
  * Checks if the extension has permission for a database operation
358
358
  * @param resource The database resource (table name or "*" for all tables)
@@ -383,7 +383,7 @@ declare class PermissionsAPI {
383
383
  * Supports both native WebView mode (Tauri) and iframe mode (mobile/web).
384
384
  */
385
385
 
386
- declare class HaexVaultClient {
386
+ declare class HaexVaultSdk {
387
387
  private readonly config;
388
388
  private initialized;
389
389
  private isNativeWindow;
@@ -449,4 +449,4 @@ declare class HaexVaultClient {
449
449
  private log;
450
450
  }
451
451
 
452
- export { type AddBackendOptions as A, type CreateSpaceOptions as C, DatabaseAPI as D, FilesystemAPI as F, HaexVaultClient 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 };
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 };
@@ -3,7 +3,7 @@ import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
3
3
 
4
4
  declare class StorageAPI {
5
5
  private client;
6
- constructor(client: HaexVaultClient);
6
+ constructor(client: HaexVaultSdk);
7
7
  getItem(key: string): Promise<string | null>;
8
8
  setItem(key: string, value: string): Promise<void>;
9
9
  removeItem(key: string): Promise<void>;
@@ -13,7 +13,7 @@ declare class StorageAPI {
13
13
 
14
14
  declare class DatabaseAPI {
15
15
  private client;
16
- constructor(client: HaexVaultClient);
16
+ constructor(client: HaexVaultSdk);
17
17
  query<T>(query: string, params?: unknown[]): Promise<T[]>;
18
18
  queryOne<T = unknown>(query: string, params?: unknown[]): Promise<T | null>;
19
19
  execute(query: string, params?: unknown[]): Promise<DatabaseQueryResult>;
@@ -148,7 +148,7 @@ interface DownloadFileOptions {
148
148
  */
149
149
  declare class FileSyncAPI {
150
150
  private client;
151
- constructor(client: HaexVaultClient);
151
+ constructor(client: HaexVaultSdk);
152
152
  /**
153
153
  * List all file spaces
154
154
  */
@@ -293,7 +293,7 @@ interface ShowImageResult {
293
293
  declare class FilesystemAPI {
294
294
  private client;
295
295
  readonly sync: FileSyncAPI;
296
- constructor(client: HaexVaultClient);
296
+ constructor(client: HaexVaultSdk);
297
297
  /**
298
298
  * Opens a save file dialog and saves the provided data to the selected location
299
299
  * @param data The file data as Uint8Array
@@ -320,7 +320,7 @@ declare class FilesystemAPI {
320
320
 
321
321
  declare class WebAPI {
322
322
  private client;
323
- constructor(client: HaexVaultClient);
323
+ constructor(client: HaexVaultSdk);
324
324
  /**
325
325
  * Performs a web request through the HaexHub host application
326
326
  * @param url The URL to fetch
@@ -352,7 +352,7 @@ declare class WebAPI {
352
352
 
353
353
  declare class PermissionsAPI {
354
354
  private client;
355
- constructor(client: HaexVaultClient);
355
+ constructor(client: HaexVaultSdk);
356
356
  /**
357
357
  * Checks if the extension has permission for a database operation
358
358
  * @param resource The database resource (table name or "*" for all tables)
@@ -383,7 +383,7 @@ declare class PermissionsAPI {
383
383
  * Supports both native WebView mode (Tauri) and iframe mode (mobile/web).
384
384
  */
385
385
 
386
- declare class HaexVaultClient {
386
+ declare class HaexVaultSdk {
387
387
  private readonly config;
388
388
  private initialized;
389
389
  private isNativeWindow;
@@ -449,4 +449,4 @@ declare class HaexVaultClient {
449
449
  private log;
450
450
  }
451
451
 
452
- export { type AddBackendOptions as A, type CreateSpaceOptions as C, DatabaseAPI as D, FilesystemAPI as F, HaexVaultClient 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 };
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 };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as HaexVaultClient } from './client-ChcEv5iE.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-ChcEv5iE.mjs';
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';
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';
@@ -62,7 +62,7 @@ declare function installBaseTag(): void;
62
62
  * These polyfills are automatically installed when you import the SDK:
63
63
  *
64
64
  * ```typescript
65
- * import { createHaexVaultClient } from '@haex-space/vault-sdk';
65
+ * import { createHaexVaultSdk } from '@haex-space/vault-sdk';
66
66
  * // Polyfills are active!
67
67
  * ```
68
68
  *
@@ -357,6 +357,6 @@ declare function decryptCrdtData<T = object>(encryptedData: string, nonce: strin
357
357
  declare function arrayBufferToBase64(buffer: ArrayBuffer | Uint8Array): string;
358
358
  declare function base64ToArrayBuffer(base64: string): Uint8Array;
359
359
 
360
- declare function createHaexVaultClient(config?: HaexHubConfig): HaexVaultClient;
360
+ declare function createHaexVaultSdk(config?: HaexHubConfig): HaexVaultSdk;
361
361
 
362
- 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 };
362
+ export { ExtensionManifest, HAEXSPACE_MESSAGE_TYPES, HAEXTENSION_METHODS, HaexHubConfig, HaexVaultSdk, type HaexspaceMessageType, type HaextensionMethod, TAURI_COMMANDS, type TauriCommand, type VerifyResult, type ZipFileEntry, arrayBufferToBase64, base64ToArrayBuffer, createHaexVaultSdk, 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,5 +1,5 @@
1
- import { H as HaexVaultClient } from './client-B2k574Va.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-B2k574Va.js';
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';
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';
@@ -62,7 +62,7 @@ declare function installBaseTag(): void;
62
62
  * These polyfills are automatically installed when you import the SDK:
63
63
  *
64
64
  * ```typescript
65
- * import { createHaexVaultClient } from '@haex-space/vault-sdk';
65
+ * import { createHaexVaultSdk } from '@haex-space/vault-sdk';
66
66
  * // Polyfills are active!
67
67
  * ```
68
68
  *
@@ -357,6 +357,6 @@ declare function decryptCrdtData<T = object>(encryptedData: string, nonce: strin
357
357
  declare function arrayBufferToBase64(buffer: ArrayBuffer | Uint8Array): string;
358
358
  declare function base64ToArrayBuffer(base64: string): Uint8Array;
359
359
 
360
- declare function createHaexVaultClient(config?: HaexHubConfig): HaexVaultClient;
360
+ declare function createHaexVaultSdk(config?: HaexHubConfig): HaexVaultSdk;
361
361
 
362
- 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 };
362
+ export { ExtensionManifest, HAEXSPACE_MESSAGE_TYPES, HAEXTENSION_METHODS, HaexHubConfig, HaexVaultSdk, type HaexspaceMessageType, type HaextensionMethod, TAURI_COMMANDS, type TauriCommand, type VerifyResult, type ZipFileEntry, arrayBufferToBase64, base64ToArrayBuffer, createHaexVaultSdk, decryptCrdtData, decryptString, decryptVaultKey, decryptVaultName, deriveKeyFromPassword, encryptCrdtData, encryptString, encryptVaultKey, generateVaultKey, hexToBytes, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, sortObjectKeysRecursively, unwrapKey, verifyExtensionSignature, wrapKey };
package/dist/index.js CHANGED
@@ -1852,7 +1852,7 @@ async function respondToExternalRequest(response, request) {
1852
1852
  }
1853
1853
 
1854
1854
  // src/client.ts
1855
- var HaexVaultClient = class {
1855
+ var HaexVaultSdk = class {
1856
1856
  constructor(config = {}) {
1857
1857
  // State
1858
1858
  this.initialized = false;
@@ -2502,8 +2502,8 @@ function base64ToArrayBuffer(base64) {
2502
2502
  }
2503
2503
 
2504
2504
  // src/index.ts
2505
- function createHaexVaultClient(config = {}) {
2506
- return new HaexVaultClient(config);
2505
+ function createHaexVaultSdk(config = {}) {
2506
+ return new HaexVaultSdk(config);
2507
2507
  }
2508
2508
 
2509
2509
  exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;
@@ -2517,7 +2517,7 @@ exports.FilesystemAPI = FilesystemAPI;
2517
2517
  exports.HAEXSPACE_MESSAGE_TYPES = HAEXSPACE_MESSAGE_TYPES;
2518
2518
  exports.HAEXTENSION_EVENTS = HAEXTENSION_EVENTS;
2519
2519
  exports.HAEXTENSION_METHODS = HAEXTENSION_METHODS;
2520
- exports.HaexVaultClient = HaexVaultClient;
2520
+ exports.HaexVaultSdk = HaexVaultSdk;
2521
2521
  exports.HaexVaultSdkError = HaexVaultSdkError;
2522
2522
  exports.PermissionStatus = PermissionStatus;
2523
2523
  exports.PermissionsAPI = PermissionsAPI;
@@ -2527,7 +2527,7 @@ exports.WebAPI = WebAPI;
2527
2527
  exports.arrayBufferToBase64 = arrayBufferToBase64;
2528
2528
  exports.base64ToArrayBuffer = base64ToArrayBuffer;
2529
2529
  exports.canExternalClientSendRequests = canExternalClientSendRequests;
2530
- exports.createHaexVaultClient = createHaexVaultClient;
2530
+ exports.createHaexVaultSdk = createHaexVaultSdk;
2531
2531
  exports.decryptCrdtData = decryptCrdtData;
2532
2532
  exports.decryptString = decryptString;
2533
2533
  exports.decryptVaultKey = decryptVaultKey;