@haex-space/vault-sdk 2.5.0 → 2.5.2
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-DQ6VwHic.d.mts → client-DTqEEmX-.d.mts} +1 -1
- package/dist/{client-BNq2TcVs.d.ts → client-DfmTO8Mz.d.ts} +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -1
- 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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/svelte.mjs.map +1 -1
- package/dist/{types-Bw5uc1vm.d.mts → types-Dzp3QG4t.d.mts} +37 -1
- package/dist/{types-Bw5uc1vm.d.ts → types-Dzp3QG4t.d.ts} +37 -1
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -254,6 +254,42 @@ interface PendingAuthorization {
|
|
|
254
254
|
* Decision type for external authorization prompts
|
|
255
255
|
*/
|
|
256
256
|
type ExternalAuthDecision = 'allow' | 'deny';
|
|
257
|
+
/**
|
|
258
|
+
* Connection state for external clients connecting to haex-vault via WebSocket.
|
|
259
|
+
* Used by browser extensions, CLI tools, servers, and other external clients.
|
|
260
|
+
*/
|
|
261
|
+
declare enum ExternalConnectionState {
|
|
262
|
+
/** Not connected to haex-vault */
|
|
263
|
+
DISCONNECTED = "disconnected",
|
|
264
|
+
/** Attempting to establish connection */
|
|
265
|
+
CONNECTING = "connecting",
|
|
266
|
+
/** WebSocket connected but not yet authorized */
|
|
267
|
+
CONNECTED = "connected",
|
|
268
|
+
/** Connected and waiting for user approval in haex-vault */
|
|
269
|
+
PENDING_APPROVAL = "pending_approval",
|
|
270
|
+
/** Connected and authorized to communicate */
|
|
271
|
+
PAIRED = "paired"
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Full connection status including state, client ID, and any error
|
|
275
|
+
*/
|
|
276
|
+
interface ExternalConnection {
|
|
277
|
+
/** Current connection state */
|
|
278
|
+
state: ExternalConnectionState;
|
|
279
|
+
/** Client identifier (derived from public key) */
|
|
280
|
+
clientId: string | null;
|
|
281
|
+
/** Error message if connection failed */
|
|
282
|
+
error: string | null;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Check if external client connection state indicates an active connection
|
|
286
|
+
* (connected, pending approval, or paired)
|
|
287
|
+
*/
|
|
288
|
+
declare function isExternalClientConnected(state: ExternalConnectionState): boolean;
|
|
289
|
+
/**
|
|
290
|
+
* Check if external client can send requests (only when paired/authorized)
|
|
291
|
+
*/
|
|
292
|
+
declare function canExternalClientSendRequests(state: ExternalConnectionState): boolean;
|
|
257
293
|
type EventCallback = (event: HaexHubEvent) => void;
|
|
258
294
|
interface ExtensionManifest {
|
|
259
295
|
name: string;
|
|
@@ -334,4 +370,4 @@ declare class HaexVaultSdkError extends Error {
|
|
|
334
370
|
};
|
|
335
371
|
}
|
|
336
372
|
|
|
337
|
-
export { type ApplicationContext as A, type BlockedClient as B, type ContextChangedEvent as C, type DatabaseQueryResult as D, type ExtensionManifest as E,
|
|
373
|
+
export { type ApplicationContext as A, type BlockedClient as B, type ContextChangedEvent as C, type DatabaseQueryResult as D, type ExtensionManifest as E, getTableName as F, ExternalConnectionState as G, type HaexHubConfig as H, isExternalClientConnected as I, canExternalClientSendRequests as J, HaexVaultSdkError as K, HAEXTENSION_EVENTS as L, type Migration as M, type HaextensionEvent as N, EXTERNAL_EVENTS as O, type PermissionResponse as P, type ExternalEvent as Q, type SearchResult as S, TABLE_SEPARATOR as T, type WebRequestOptions as W, type ExtensionInfo as a, type MigrationResult as b, type WebResponse as c, type DatabasePermissionRequest as d, type ExternalRequestHandler as e, type ExternalResponse as f, type EventCallback as g, type HaexHubRequest as h, type HaexHubResponse as i, type HaexHubEvent as j, type DatabasePermission as k, type DatabaseQueryParams as l, type DatabaseExecuteParams as m, type DatabaseTableInfo as n, type DatabaseColumnInfo as o, type SearchQuery as p, type SearchRequestEvent as q, type ExternalRequestEvent as r, type ExternalRequest as s, type AuthorizedClient as t, type PendingAuthorization as u, type ExternalAuthDecision as v, type ExternalConnection as w, PermissionStatus as x, ErrorCode as y, DEFAULT_TIMEOUT as z };
|
|
@@ -254,6 +254,42 @@ interface PendingAuthorization {
|
|
|
254
254
|
* Decision type for external authorization prompts
|
|
255
255
|
*/
|
|
256
256
|
type ExternalAuthDecision = 'allow' | 'deny';
|
|
257
|
+
/**
|
|
258
|
+
* Connection state for external clients connecting to haex-vault via WebSocket.
|
|
259
|
+
* Used by browser extensions, CLI tools, servers, and other external clients.
|
|
260
|
+
*/
|
|
261
|
+
declare enum ExternalConnectionState {
|
|
262
|
+
/** Not connected to haex-vault */
|
|
263
|
+
DISCONNECTED = "disconnected",
|
|
264
|
+
/** Attempting to establish connection */
|
|
265
|
+
CONNECTING = "connecting",
|
|
266
|
+
/** WebSocket connected but not yet authorized */
|
|
267
|
+
CONNECTED = "connected",
|
|
268
|
+
/** Connected and waiting for user approval in haex-vault */
|
|
269
|
+
PENDING_APPROVAL = "pending_approval",
|
|
270
|
+
/** Connected and authorized to communicate */
|
|
271
|
+
PAIRED = "paired"
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Full connection status including state, client ID, and any error
|
|
275
|
+
*/
|
|
276
|
+
interface ExternalConnection {
|
|
277
|
+
/** Current connection state */
|
|
278
|
+
state: ExternalConnectionState;
|
|
279
|
+
/** Client identifier (derived from public key) */
|
|
280
|
+
clientId: string | null;
|
|
281
|
+
/** Error message if connection failed */
|
|
282
|
+
error: string | null;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Check if external client connection state indicates an active connection
|
|
286
|
+
* (connected, pending approval, or paired)
|
|
287
|
+
*/
|
|
288
|
+
declare function isExternalClientConnected(state: ExternalConnectionState): boolean;
|
|
289
|
+
/**
|
|
290
|
+
* Check if external client can send requests (only when paired/authorized)
|
|
291
|
+
*/
|
|
292
|
+
declare function canExternalClientSendRequests(state: ExternalConnectionState): boolean;
|
|
257
293
|
type EventCallback = (event: HaexHubEvent) => void;
|
|
258
294
|
interface ExtensionManifest {
|
|
259
295
|
name: string;
|
|
@@ -334,4 +370,4 @@ declare class HaexVaultSdkError extends Error {
|
|
|
334
370
|
};
|
|
335
371
|
}
|
|
336
372
|
|
|
337
|
-
export { type ApplicationContext as A, type BlockedClient as B, type ContextChangedEvent as C, type DatabaseQueryResult as D, type ExtensionManifest as E,
|
|
373
|
+
export { type ApplicationContext as A, type BlockedClient as B, type ContextChangedEvent as C, type DatabaseQueryResult as D, type ExtensionManifest as E, getTableName as F, ExternalConnectionState as G, type HaexHubConfig as H, isExternalClientConnected as I, canExternalClientSendRequests as J, HaexVaultSdkError as K, HAEXTENSION_EVENTS as L, type Migration as M, type HaextensionEvent as N, EXTERNAL_EVENTS as O, type PermissionResponse as P, type ExternalEvent as Q, type SearchResult as S, TABLE_SEPARATOR as T, type WebRequestOptions as W, type ExtensionInfo as a, type MigrationResult as b, type WebResponse as c, type DatabasePermissionRequest as d, type ExternalRequestHandler as e, type ExternalResponse as f, type EventCallback as g, type HaexHubRequest as h, type HaexHubResponse as i, type HaexHubEvent as j, type DatabasePermission as k, type DatabaseQueryParams as l, type DatabaseExecuteParams as m, type DatabaseTableInfo as n, type DatabaseColumnInfo as o, type SearchQuery as p, type SearchRequestEvent as q, type ExternalRequestEvent as r, type ExternalRequest as s, type AuthorizedClient as t, type PendingAuthorization as u, type ExternalAuthDecision as v, type ExternalConnection as w, PermissionStatus as x, ErrorCode as y, DEFAULT_TIMEOUT as z };
|
package/dist/vue.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as HaexVaultClient, S as StorageAPI } from './client-
|
|
1
|
+
import { H as HaexVaultClient, S as StorageAPI } from './client-DTqEEmX-.mjs';
|
|
2
2
|
import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
|
-
import { H as HaexHubConfig } from './types-
|
|
4
|
+
import { H as HaexHubConfig } from './types-Dzp3QG4t.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Vue 3 composable for HaexHub SDK
|
package/dist/vue.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as HaexVaultClient, S as StorageAPI } from './client-
|
|
1
|
+
import { H as HaexVaultClient, S as StorageAPI } from './client-DfmTO8Mz.js';
|
|
2
2
|
import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
|
-
import { H as HaexHubConfig } from './types-
|
|
4
|
+
import { H as HaexHubConfig } from './types-Dzp3QG4t.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Vue 3 composable for HaexHub SDK
|