@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as nuxt_app from 'nuxt/app';
|
|
2
2
|
import { ShallowRef } from 'vue';
|
|
3
|
-
import { H as HaexVaultSdk } from '../client-
|
|
3
|
+
import { H as HaexVaultSdk } from '../client-Dfy9UQeu.mjs';
|
|
4
4
|
import { A as ApplicationContext } from '../types-gfc9eCL4.mjs';
|
|
5
5
|
import 'drizzle-orm/sqlite-proxy';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as nuxt_app from 'nuxt/app';
|
|
2
2
|
import { ShallowRef } from 'vue';
|
|
3
|
-
import { H as HaexVaultSdk } from '../client-
|
|
3
|
+
import { H as HaexVaultSdk } from '../client-Dhn288AJ.js';
|
|
4
4
|
import { A as ApplicationContext } from '../types-gfc9eCL4.js';
|
|
5
5
|
import 'drizzle-orm/sqlite-proxy';
|
|
6
6
|
|
|
@@ -239,7 +239,13 @@ var SPACE_COMMANDS = {
|
|
|
239
239
|
/** Bulk unassign rows from spaces */
|
|
240
240
|
unassign: "extension_space_unassign",
|
|
241
241
|
/** Get space assignments for a table */
|
|
242
|
-
getAssignments: "extension_space_get_assignments"
|
|
242
|
+
getAssignments: "extension_space_get_assignments",
|
|
243
|
+
/** List all spaces the user is a member of (with decrypted names) */
|
|
244
|
+
list: "extension_space_list",
|
|
245
|
+
/** Create a new shared space */
|
|
246
|
+
create: "extension_space_create",
|
|
247
|
+
/** List available sync backends */
|
|
248
|
+
listBackends: "extension_space_list_backends"
|
|
243
249
|
};
|
|
244
250
|
|
|
245
251
|
// src/api/storage.ts
|
|
@@ -1111,19 +1117,48 @@ var SpacesAPI = class {
|
|
|
1111
1117
|
async unassignRowAsync(tableName, rowPks, spaceId) {
|
|
1112
1118
|
return this.unassignAsync([{ tableName, rowPks, spaceId }]);
|
|
1113
1119
|
}
|
|
1120
|
+
// ==========================================================================
|
|
1121
|
+
// Space Management
|
|
1122
|
+
// ==========================================================================
|
|
1123
|
+
/**
|
|
1124
|
+
* List all shared spaces the user is a member of.
|
|
1125
|
+
* Returns spaces with decrypted names (decryption happens vault-side).
|
|
1126
|
+
*/
|
|
1127
|
+
async listSpacesAsync() {
|
|
1128
|
+
return this.client.request(SPACE_COMMANDS.list);
|
|
1129
|
+
}
|
|
1130
|
+
/**
|
|
1131
|
+
* Create a new shared space.
|
|
1132
|
+
* @param name - Human-readable space name
|
|
1133
|
+
* @param serverUrl - The sync server URL to create the space on
|
|
1134
|
+
* @returns The created space with decrypted name
|
|
1135
|
+
*/
|
|
1136
|
+
async createSpaceAsync(name, serverUrl) {
|
|
1137
|
+
return this.client.request(SPACE_COMMANDS.create, {
|
|
1138
|
+
name,
|
|
1139
|
+
server_url: serverUrl
|
|
1140
|
+
});
|
|
1141
|
+
}
|
|
1142
|
+
/**
|
|
1143
|
+
* List available sync backends that can host shared spaces.
|
|
1144
|
+
* @returns Array of backend info with server URLs
|
|
1145
|
+
*/
|
|
1146
|
+
async listSyncBackendsAsync() {
|
|
1147
|
+
return this.client.request(SPACE_COMMANDS.listBackends);
|
|
1148
|
+
}
|
|
1114
1149
|
};
|
|
1115
|
-
function toSnakeCase(
|
|
1150
|
+
function toSnakeCase(assignment) {
|
|
1116
1151
|
return {
|
|
1117
|
-
table_name:
|
|
1118
|
-
row_pks:
|
|
1119
|
-
space_id:
|
|
1152
|
+
table_name: assignment.tableName,
|
|
1153
|
+
row_pks: assignment.rowPks,
|
|
1154
|
+
space_id: assignment.spaceId
|
|
1120
1155
|
};
|
|
1121
1156
|
}
|
|
1122
|
-
function fromSnakeCase(
|
|
1157
|
+
function fromSnakeCase(assignment) {
|
|
1123
1158
|
return {
|
|
1124
|
-
tableName:
|
|
1125
|
-
rowPks:
|
|
1126
|
-
spaceId:
|
|
1159
|
+
tableName: assignment.table_name,
|
|
1160
|
+
rowPks: assignment.row_pks,
|
|
1161
|
+
spaceId: assignment.space_id
|
|
1127
1162
|
};
|
|
1128
1163
|
}
|
|
1129
1164
|
|