@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
|
@@ -17,10 +17,18 @@ declare const HAEXTENSION_EVENTS: {
|
|
|
17
17
|
readonly CONTEXT_CHANGED: "haextension:context:changed";
|
|
18
18
|
/** Search request from HaexHub */
|
|
19
19
|
readonly SEARCH_REQUEST: "haextension:search:request";
|
|
20
|
-
/** External request from authorized client (browser extension, CLI, server, etc.) */
|
|
21
|
-
readonly EXTERNAL_REQUEST: "haextension:external:request";
|
|
22
20
|
};
|
|
23
21
|
type HaextensionEvent = typeof HAEXTENSION_EVENTS[keyof typeof HAEXTENSION_EVENTS];
|
|
22
|
+
/**
|
|
23
|
+
* Events for external client communication (browser extensions, CLI tools, servers, etc.)
|
|
24
|
+
*/
|
|
25
|
+
declare const EXTERNAL_EVENTS: {
|
|
26
|
+
/** External request from authorized client */
|
|
27
|
+
readonly REQUEST: "haextension:external:request";
|
|
28
|
+
/** New external client requesting authorization */
|
|
29
|
+
readonly AUTHORIZATION_REQUEST: "external:authorization-request";
|
|
30
|
+
};
|
|
31
|
+
type ExternalEvent = typeof EXTERNAL_EVENTS[keyof typeof EXTERNAL_EVENTS];
|
|
24
32
|
|
|
25
33
|
declare const DEFAULT_TIMEOUT = 30000;
|
|
26
34
|
declare const TABLE_SEPARATOR = "__";
|
|
@@ -54,7 +62,12 @@ interface HaexHubRequest {
|
|
|
54
62
|
interface HaexHubResponse<T = unknown> {
|
|
55
63
|
id: string;
|
|
56
64
|
result?: T;
|
|
57
|
-
error?:
|
|
65
|
+
error?: HaexVaultSdkErrorData;
|
|
66
|
+
}
|
|
67
|
+
interface HaexVaultSdkErrorData {
|
|
68
|
+
code: ErrorCode;
|
|
69
|
+
message: string;
|
|
70
|
+
details?: Record<string, unknown>;
|
|
58
71
|
}
|
|
59
72
|
interface ExtensionInfo {
|
|
60
73
|
publicKey: string;
|
|
@@ -157,7 +170,7 @@ interface SearchRequestEvent extends HaexHubEvent {
|
|
|
157
170
|
* These requests come through the WebSocket bridge and are routed to the appropriate extension.
|
|
158
171
|
*/
|
|
159
172
|
interface ExternalRequestEvent extends HaexHubEvent {
|
|
160
|
-
type: typeof
|
|
173
|
+
type: typeof EXTERNAL_EVENTS.REQUEST;
|
|
161
174
|
data: ExternalRequest;
|
|
162
175
|
}
|
|
163
176
|
/**
|
|
@@ -190,6 +203,57 @@ interface ExternalResponse {
|
|
|
190
203
|
* Handler function type for external requests
|
|
191
204
|
*/
|
|
192
205
|
type ExternalRequestHandler = (request: ExternalRequest) => Promise<ExternalResponse> | ExternalResponse;
|
|
206
|
+
/**
|
|
207
|
+
* An authorized external client stored in the database
|
|
208
|
+
*/
|
|
209
|
+
interface AuthorizedClient {
|
|
210
|
+
/** Row ID */
|
|
211
|
+
id: string;
|
|
212
|
+
/** Unique client identifier (public key fingerprint) */
|
|
213
|
+
clientId: string;
|
|
214
|
+
/** Human-readable client name */
|
|
215
|
+
clientName: string;
|
|
216
|
+
/** Client's public key (base64) */
|
|
217
|
+
publicKey: string;
|
|
218
|
+
/** Extension ID this client can access */
|
|
219
|
+
extensionId: string;
|
|
220
|
+
/** When the client was authorized (ISO 8601) */
|
|
221
|
+
authorizedAt: string | null;
|
|
222
|
+
/** Last time the client connected (ISO 8601) */
|
|
223
|
+
lastSeen: string | null;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* A blocked external client stored in the database
|
|
227
|
+
*/
|
|
228
|
+
interface BlockedClient {
|
|
229
|
+
/** Row ID */
|
|
230
|
+
id: string;
|
|
231
|
+
/** Unique client identifier (public key fingerprint) */
|
|
232
|
+
clientId: string;
|
|
233
|
+
/** Human-readable client name */
|
|
234
|
+
clientName: string;
|
|
235
|
+
/** Client's public key (base64) */
|
|
236
|
+
publicKey: string;
|
|
237
|
+
/** When the client was blocked (ISO 8601) */
|
|
238
|
+
blockedAt: string | null;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Pending authorization request waiting for user approval
|
|
242
|
+
*/
|
|
243
|
+
interface PendingAuthorization {
|
|
244
|
+
/** Unique client identifier */
|
|
245
|
+
clientId: string;
|
|
246
|
+
/** Human-readable client name */
|
|
247
|
+
clientName: string;
|
|
248
|
+
/** Client's public key (base64) */
|
|
249
|
+
publicKey: string;
|
|
250
|
+
/** Requested extension ID */
|
|
251
|
+
extensionId: string;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Decision type for external authorization prompts
|
|
255
|
+
*/
|
|
256
|
+
type ExternalAuthDecision = 'allow' | 'deny';
|
|
193
257
|
type EventCallback = (event: HaexHubEvent) => void;
|
|
194
258
|
interface ExtensionManifest {
|
|
195
259
|
name: string;
|
|
@@ -252,12 +316,7 @@ declare enum ErrorCode {
|
|
|
252
316
|
DATABASE_ERROR = "DATABASE_ERROR",
|
|
253
317
|
WEB_ERROR = "WEB_ERROR"
|
|
254
318
|
}
|
|
255
|
-
|
|
256
|
-
code: ErrorCode;
|
|
257
|
-
message: string;
|
|
258
|
-
details?: Record<string, unknown>;
|
|
259
|
-
}
|
|
260
|
-
declare class HaexHubError extends Error {
|
|
319
|
+
declare class HaexVaultSdkError extends Error {
|
|
261
320
|
code: ErrorCode;
|
|
262
321
|
messageKey: string;
|
|
263
322
|
details?: Record<string, unknown> | undefined;
|
|
@@ -275,4 +334,4 @@ declare class HaexHubError extends Error {
|
|
|
275
334
|
};
|
|
276
335
|
}
|
|
277
336
|
|
|
278
|
-
export { type ApplicationContext as A, type ContextChangedEvent as C, type DatabaseQueryResult as D, type ExtensionManifest as E, type HaexHubConfig as H, type Migration as M, type PermissionResponse as P, 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,
|
|
337
|
+
export { type ApplicationContext as A, type BlockedClient as B, type ContextChangedEvent as C, type DatabaseQueryResult as D, type ExtensionManifest as E, HaexVaultSdkError as F, HAEXTENSION_EVENTS as G, type HaexHubConfig as H, type HaextensionEvent as I, EXTERNAL_EVENTS as J, type ExternalEvent as K, type Migration as M, type PermissionResponse as P, 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, PermissionStatus as w, ErrorCode as x, DEFAULT_TIMEOUT as y, getTableName as z };
|
|
@@ -17,10 +17,18 @@ declare const HAEXTENSION_EVENTS: {
|
|
|
17
17
|
readonly CONTEXT_CHANGED: "haextension:context:changed";
|
|
18
18
|
/** Search request from HaexHub */
|
|
19
19
|
readonly SEARCH_REQUEST: "haextension:search:request";
|
|
20
|
-
/** External request from authorized client (browser extension, CLI, server, etc.) */
|
|
21
|
-
readonly EXTERNAL_REQUEST: "haextension:external:request";
|
|
22
20
|
};
|
|
23
21
|
type HaextensionEvent = typeof HAEXTENSION_EVENTS[keyof typeof HAEXTENSION_EVENTS];
|
|
22
|
+
/**
|
|
23
|
+
* Events for external client communication (browser extensions, CLI tools, servers, etc.)
|
|
24
|
+
*/
|
|
25
|
+
declare const EXTERNAL_EVENTS: {
|
|
26
|
+
/** External request from authorized client */
|
|
27
|
+
readonly REQUEST: "haextension:external:request";
|
|
28
|
+
/** New external client requesting authorization */
|
|
29
|
+
readonly AUTHORIZATION_REQUEST: "external:authorization-request";
|
|
30
|
+
};
|
|
31
|
+
type ExternalEvent = typeof EXTERNAL_EVENTS[keyof typeof EXTERNAL_EVENTS];
|
|
24
32
|
|
|
25
33
|
declare const DEFAULT_TIMEOUT = 30000;
|
|
26
34
|
declare const TABLE_SEPARATOR = "__";
|
|
@@ -54,7 +62,12 @@ interface HaexHubRequest {
|
|
|
54
62
|
interface HaexHubResponse<T = unknown> {
|
|
55
63
|
id: string;
|
|
56
64
|
result?: T;
|
|
57
|
-
error?:
|
|
65
|
+
error?: HaexVaultSdkErrorData;
|
|
66
|
+
}
|
|
67
|
+
interface HaexVaultSdkErrorData {
|
|
68
|
+
code: ErrorCode;
|
|
69
|
+
message: string;
|
|
70
|
+
details?: Record<string, unknown>;
|
|
58
71
|
}
|
|
59
72
|
interface ExtensionInfo {
|
|
60
73
|
publicKey: string;
|
|
@@ -157,7 +170,7 @@ interface SearchRequestEvent extends HaexHubEvent {
|
|
|
157
170
|
* These requests come through the WebSocket bridge and are routed to the appropriate extension.
|
|
158
171
|
*/
|
|
159
172
|
interface ExternalRequestEvent extends HaexHubEvent {
|
|
160
|
-
type: typeof
|
|
173
|
+
type: typeof EXTERNAL_EVENTS.REQUEST;
|
|
161
174
|
data: ExternalRequest;
|
|
162
175
|
}
|
|
163
176
|
/**
|
|
@@ -190,6 +203,57 @@ interface ExternalResponse {
|
|
|
190
203
|
* Handler function type for external requests
|
|
191
204
|
*/
|
|
192
205
|
type ExternalRequestHandler = (request: ExternalRequest) => Promise<ExternalResponse> | ExternalResponse;
|
|
206
|
+
/**
|
|
207
|
+
* An authorized external client stored in the database
|
|
208
|
+
*/
|
|
209
|
+
interface AuthorizedClient {
|
|
210
|
+
/** Row ID */
|
|
211
|
+
id: string;
|
|
212
|
+
/** Unique client identifier (public key fingerprint) */
|
|
213
|
+
clientId: string;
|
|
214
|
+
/** Human-readable client name */
|
|
215
|
+
clientName: string;
|
|
216
|
+
/** Client's public key (base64) */
|
|
217
|
+
publicKey: string;
|
|
218
|
+
/** Extension ID this client can access */
|
|
219
|
+
extensionId: string;
|
|
220
|
+
/** When the client was authorized (ISO 8601) */
|
|
221
|
+
authorizedAt: string | null;
|
|
222
|
+
/** Last time the client connected (ISO 8601) */
|
|
223
|
+
lastSeen: string | null;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* A blocked external client stored in the database
|
|
227
|
+
*/
|
|
228
|
+
interface BlockedClient {
|
|
229
|
+
/** Row ID */
|
|
230
|
+
id: string;
|
|
231
|
+
/** Unique client identifier (public key fingerprint) */
|
|
232
|
+
clientId: string;
|
|
233
|
+
/** Human-readable client name */
|
|
234
|
+
clientName: string;
|
|
235
|
+
/** Client's public key (base64) */
|
|
236
|
+
publicKey: string;
|
|
237
|
+
/** When the client was blocked (ISO 8601) */
|
|
238
|
+
blockedAt: string | null;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Pending authorization request waiting for user approval
|
|
242
|
+
*/
|
|
243
|
+
interface PendingAuthorization {
|
|
244
|
+
/** Unique client identifier */
|
|
245
|
+
clientId: string;
|
|
246
|
+
/** Human-readable client name */
|
|
247
|
+
clientName: string;
|
|
248
|
+
/** Client's public key (base64) */
|
|
249
|
+
publicKey: string;
|
|
250
|
+
/** Requested extension ID */
|
|
251
|
+
extensionId: string;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Decision type for external authorization prompts
|
|
255
|
+
*/
|
|
256
|
+
type ExternalAuthDecision = 'allow' | 'deny';
|
|
193
257
|
type EventCallback = (event: HaexHubEvent) => void;
|
|
194
258
|
interface ExtensionManifest {
|
|
195
259
|
name: string;
|
|
@@ -252,12 +316,7 @@ declare enum ErrorCode {
|
|
|
252
316
|
DATABASE_ERROR = "DATABASE_ERROR",
|
|
253
317
|
WEB_ERROR = "WEB_ERROR"
|
|
254
318
|
}
|
|
255
|
-
|
|
256
|
-
code: ErrorCode;
|
|
257
|
-
message: string;
|
|
258
|
-
details?: Record<string, unknown>;
|
|
259
|
-
}
|
|
260
|
-
declare class HaexHubError extends Error {
|
|
319
|
+
declare class HaexVaultSdkError extends Error {
|
|
261
320
|
code: ErrorCode;
|
|
262
321
|
messageKey: string;
|
|
263
322
|
details?: Record<string, unknown> | undefined;
|
|
@@ -275,4 +334,4 @@ declare class HaexHubError extends Error {
|
|
|
275
334
|
};
|
|
276
335
|
}
|
|
277
336
|
|
|
278
|
-
export { type ApplicationContext as A, type ContextChangedEvent as C, type DatabaseQueryResult as D, type ExtensionManifest as E, type HaexHubConfig as H, type Migration as M, type PermissionResponse as P, 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,
|
|
337
|
+
export { type ApplicationContext as A, type BlockedClient as B, type ContextChangedEvent as C, type DatabaseQueryResult as D, type ExtensionManifest as E, HaexVaultSdkError as F, HAEXTENSION_EVENTS as G, type HaexHubConfig as H, type HaextensionEvent as I, EXTERNAL_EVENTS as J, type ExternalEvent as K, type Migration as M, type PermissionResponse as P, 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, PermissionStatus as w, ErrorCode as x, DEFAULT_TIMEOUT as y, getTableName 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-DQ6VwHic.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-Bw5uc1vm.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-BNq2TcVs.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-Bw5uc1vm.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Vue 3 composable for HaexHub SDK
|