@haex-space/vault-sdk 2.5.112 → 2.5.113
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-GPE112vL.d.mts → client-Dfy9UQeu.d.mts} +87 -1
- package/dist/{client-BVMJXZiK.d.ts → client-Dhn288AJ.d.ts} +87 -1
- package/dist/index.d.mts +24 -50
- package/dist/index.d.ts +24 -50
- package/dist/index.js +67 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +66 -10
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +44 -9
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +44 -9
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.d.mts +1 -1
- package/dist/runtime/nuxt.plugin.client.d.ts +1 -1
- package/dist/runtime/nuxt.plugin.client.js +44 -9
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +44 -9
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
- package/dist/svelte.d.mts +1 -1
- package/dist/svelte.d.ts +1 -1
- package/dist/svelte.js +44 -9
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +44 -9
- package/dist/svelte.mjs.map +1 -1
- package/dist/vue.d.mts +1 -1
- package/dist/vue.d.ts +1 -1
- package/dist/vue.js +44 -9
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +44 -9
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HaexVaultSdk, S as StorageAPI } from './client-
|
|
1
|
+
import { H as HaexVaultSdk, S as StorageAPI } from './client-Dfy9UQeu.mjs';
|
|
2
2
|
import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
import { H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext } from './types-gfc9eCL4.mjs';
|
|
4
4
|
|
package/dist/react.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HaexVaultSdk, S as StorageAPI } from './client-
|
|
1
|
+
import { H as HaexVaultSdk, S as StorageAPI } from './client-Dhn288AJ.js';
|
|
2
2
|
import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
import { H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext } from './types-gfc9eCL4.js';
|
|
4
4
|
|
package/dist/react.js
CHANGED
|
@@ -564,7 +564,13 @@ var SPACE_COMMANDS = {
|
|
|
564
564
|
/** Bulk unassign rows from spaces */
|
|
565
565
|
unassign: "extension_space_unassign",
|
|
566
566
|
/** Get space assignments for a table */
|
|
567
|
-
getAssignments: "extension_space_get_assignments"
|
|
567
|
+
getAssignments: "extension_space_get_assignments",
|
|
568
|
+
/** List all spaces the user is a member of (with decrypted names) */
|
|
569
|
+
list: "extension_space_list",
|
|
570
|
+
/** Create a new shared space */
|
|
571
|
+
create: "extension_space_create",
|
|
572
|
+
/** List available sync backends */
|
|
573
|
+
listBackends: "extension_space_list_backends"
|
|
568
574
|
};
|
|
569
575
|
|
|
570
576
|
// src/api/storage.ts
|
|
@@ -1436,19 +1442,48 @@ var SpacesAPI = class {
|
|
|
1436
1442
|
async unassignRowAsync(tableName, rowPks, spaceId) {
|
|
1437
1443
|
return this.unassignAsync([{ tableName, rowPks, spaceId }]);
|
|
1438
1444
|
}
|
|
1445
|
+
// ==========================================================================
|
|
1446
|
+
// Space Management
|
|
1447
|
+
// ==========================================================================
|
|
1448
|
+
/**
|
|
1449
|
+
* List all shared spaces the user is a member of.
|
|
1450
|
+
* Returns spaces with decrypted names (decryption happens vault-side).
|
|
1451
|
+
*/
|
|
1452
|
+
async listSpacesAsync() {
|
|
1453
|
+
return this.client.request(SPACE_COMMANDS.list);
|
|
1454
|
+
}
|
|
1455
|
+
/**
|
|
1456
|
+
* Create a new shared space.
|
|
1457
|
+
* @param name - Human-readable space name
|
|
1458
|
+
* @param serverUrl - The sync server URL to create the space on
|
|
1459
|
+
* @returns The created space with decrypted name
|
|
1460
|
+
*/
|
|
1461
|
+
async createSpaceAsync(name, serverUrl) {
|
|
1462
|
+
return this.client.request(SPACE_COMMANDS.create, {
|
|
1463
|
+
name,
|
|
1464
|
+
server_url: serverUrl
|
|
1465
|
+
});
|
|
1466
|
+
}
|
|
1467
|
+
/**
|
|
1468
|
+
* List available sync backends that can host shared spaces.
|
|
1469
|
+
* @returns Array of backend info with server URLs
|
|
1470
|
+
*/
|
|
1471
|
+
async listSyncBackendsAsync() {
|
|
1472
|
+
return this.client.request(SPACE_COMMANDS.listBackends);
|
|
1473
|
+
}
|
|
1439
1474
|
};
|
|
1440
|
-
function toSnakeCase(
|
|
1475
|
+
function toSnakeCase(assignment) {
|
|
1441
1476
|
return {
|
|
1442
|
-
table_name:
|
|
1443
|
-
row_pks:
|
|
1444
|
-
space_id:
|
|
1477
|
+
table_name: assignment.tableName,
|
|
1478
|
+
row_pks: assignment.rowPks,
|
|
1479
|
+
space_id: assignment.spaceId
|
|
1445
1480
|
};
|
|
1446
1481
|
}
|
|
1447
|
-
function fromSnakeCase(
|
|
1482
|
+
function fromSnakeCase(assignment) {
|
|
1448
1483
|
return {
|
|
1449
|
-
tableName:
|
|
1450
|
-
rowPks:
|
|
1451
|
-
spaceId:
|
|
1484
|
+
tableName: assignment.table_name,
|
|
1485
|
+
rowPks: assignment.row_pks,
|
|
1486
|
+
spaceId: assignment.space_id
|
|
1452
1487
|
};
|
|
1453
1488
|
}
|
|
1454
1489
|
|