@haex-space/vault-sdk 2.5.110 → 2.5.112

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.
@@ -939,6 +939,79 @@ declare class LocalSendAPI {
939
939
  cancelSend(sessionId: string): Promise<void>;
940
940
  }
941
941
 
942
+ /**
943
+ * A mapping of a row to a shared space.
944
+ */
945
+ interface SpaceAssignment {
946
+ /** The extension-scoped table name */
947
+ tableName: string;
948
+ /** Serialized primary key(s) identifying the row */
949
+ rowPks: string;
950
+ /** The shared space ID this row is assigned to */
951
+ spaceId: string;
952
+ }
953
+ /**
954
+ * Spaces API for managing row-to-space assignments.
955
+ *
956
+ * Extensions use this API to control which rows are synced to which
957
+ * shared spaces. The sync engine reads these assignments to filter
958
+ * data when pushing to space backends.
959
+ *
960
+ * @example
961
+ * ```typescript
962
+ * // Assign a single row to a space
963
+ * await sdk.spaces.assignRowAsync("events", "evt_123", "space_abc");
964
+ *
965
+ * // Bulk assign multiple rows
966
+ * await sdk.spaces.assignAsync([
967
+ * { tableName: "events", rowPks: "evt_1", spaceId: "space_abc" },
968
+ * { tableName: "events", rowPks: "evt_2", spaceId: "space_abc" },
969
+ * ]);
970
+ *
971
+ * // Query assignments
972
+ * const assignments = await sdk.spaces.getAssignmentsAsync("events");
973
+ * ```
974
+ */
975
+ declare class SpacesAPI {
976
+ private client;
977
+ constructor(client: HaexVaultSdk);
978
+ /**
979
+ * Bulk assign rows to spaces.
980
+ * @param assignments - Array of row-to-space mappings
981
+ * @returns Number of assignments created
982
+ */
983
+ assignAsync(assignments: SpaceAssignment[]): Promise<number>;
984
+ /**
985
+ * Bulk unassign rows from spaces.
986
+ * @param assignments - Array of row-to-space mappings to remove
987
+ * @returns Number of assignments removed
988
+ */
989
+ unassignAsync(assignments: SpaceAssignment[]): Promise<number>;
990
+ /**
991
+ * Get space assignments for a table, optionally filtered by row.
992
+ * @param tableName - The table to query assignments for
993
+ * @param rowPks - Optional row primary key(s) to filter by
994
+ * @returns Array of space assignments
995
+ */
996
+ getAssignmentsAsync(tableName: string, rowPks?: string): Promise<SpaceAssignment[]>;
997
+ /**
998
+ * Convenience method to assign a single row to a space.
999
+ * @param tableName - The table name
1000
+ * @param rowPks - The row primary key(s)
1001
+ * @param spaceId - The space ID to assign to
1002
+ * @returns Number of assignments created (0 or 1)
1003
+ */
1004
+ assignRowAsync(tableName: string, rowPks: string, spaceId: string): Promise<number>;
1005
+ /**
1006
+ * Convenience method to unassign a single row from a space.
1007
+ * @param tableName - The table name
1008
+ * @param rowPks - The row primary key(s)
1009
+ * @param spaceId - The space ID to unassign from
1010
+ * @returns Number of assignments removed (0 or 1)
1011
+ */
1012
+ unassignRowAsync(tableName: string, rowPks: string, spaceId: string): Promise<number>;
1013
+ }
1014
+
942
1015
  /**
943
1016
  * HaexVault Client
944
1017
  *
@@ -971,6 +1044,7 @@ declare class HaexVaultSdk {
971
1044
  readonly permissions: PermissionsAPI;
972
1045
  readonly remoteStorage: RemoteStorageAPI;
973
1046
  readonly localsend: LocalSendAPI;
1047
+ readonly spaces: SpacesAPI;
974
1048
  constructor(config?: HaexHubConfig);
975
1049
  ready(): Promise<void>;
976
1050
  get setupCompleted(): boolean;
@@ -1014,4 +1088,4 @@ declare class HaexVaultSdk {
1014
1088
  private log;
1015
1089
  }
1016
1090
 
1017
- export { type AuthorizedClient as A, type BlockedClient as B, type SelectFolderOptions as C, DatabaseAPI as D, type ExternalAuthDecision as E, type FileStat as F, type ServerInfo as G, HaexVaultSdk as H, type ServerStatus as I, type SessionAuthorization as J, type TransferProgress as K, LOCALSEND_EVENTS as L, type TransferState as M, canExternalClientSendRequests as N, isExternalClientConnected as O, type PendingAuthorization as P, RemoteStorageAPI as R, StorageAPI as S, type TransferDirection as T, type UpdateBackendRequest as U, WebAPI as W, type Device as a, type DeviceInfo as b, type DeviceType as c, type DirEntry as d, type ExternalConnection as e, ExternalConnectionErrorCode as f, ExternalConnectionState as g, type ExternalRequest as h, type ExternalRequestEvent as i, type ExternalRequestHandler as j, type ExternalRequestPayload as k, type ExternalResponse as l, FilesystemAPI as m, LocalSendAPI as n, type LocalSendEvent as o, type FileInfo as p, type LocalSendSettings as q, type PendingTransfer as r, PermissionsAPI as s, type AddBackendRequest as t, type S3Config as u, type S3PublicConfig as v, type StorageBackendInfo as w, type StorageObjectInfo as x, type RequestedExtension as y, type SelectFileOptions as z };
1091
+ export { type AuthorizedClient as A, type BlockedClient as B, type SelectFolderOptions as C, DatabaseAPI as D, type ExternalAuthDecision as E, type FileStat as F, type ServerInfo as G, HaexVaultSdk as H, type ServerStatus as I, type SessionAuthorization as J, type SpaceAssignment as K, LOCALSEND_EVENTS as L, SpacesAPI as M, type TransferProgress as N, type TransferState as O, type PendingAuthorization as P, canExternalClientSendRequests as Q, RemoteStorageAPI as R, StorageAPI as S, type TransferDirection as T, type UpdateBackendRequest as U, isExternalClientConnected as V, WebAPI as W, type Device as a, type DeviceInfo as b, type DeviceType as c, type DirEntry as d, type ExternalConnection as e, ExternalConnectionErrorCode as f, ExternalConnectionState as g, type ExternalRequest as h, type ExternalRequestEvent as i, type ExternalRequestHandler as j, type ExternalRequestPayload as k, type ExternalResponse as l, FilesystemAPI as m, LocalSendAPI as n, type LocalSendEvent as o, type FileInfo as p, type LocalSendSettings as q, type PendingTransfer as r, PermissionsAPI as s, type AddBackendRequest as t, type S3Config as u, type S3PublicConfig as v, type StorageBackendInfo as w, type StorageObjectInfo as x, type RequestedExtension as y, type SelectFileOptions as z };
@@ -939,6 +939,79 @@ declare class LocalSendAPI {
939
939
  cancelSend(sessionId: string): Promise<void>;
940
940
  }
941
941
 
942
+ /**
943
+ * A mapping of a row to a shared space.
944
+ */
945
+ interface SpaceAssignment {
946
+ /** The extension-scoped table name */
947
+ tableName: string;
948
+ /** Serialized primary key(s) identifying the row */
949
+ rowPks: string;
950
+ /** The shared space ID this row is assigned to */
951
+ spaceId: string;
952
+ }
953
+ /**
954
+ * Spaces API for managing row-to-space assignments.
955
+ *
956
+ * Extensions use this API to control which rows are synced to which
957
+ * shared spaces. The sync engine reads these assignments to filter
958
+ * data when pushing to space backends.
959
+ *
960
+ * @example
961
+ * ```typescript
962
+ * // Assign a single row to a space
963
+ * await sdk.spaces.assignRowAsync("events", "evt_123", "space_abc");
964
+ *
965
+ * // Bulk assign multiple rows
966
+ * await sdk.spaces.assignAsync([
967
+ * { tableName: "events", rowPks: "evt_1", spaceId: "space_abc" },
968
+ * { tableName: "events", rowPks: "evt_2", spaceId: "space_abc" },
969
+ * ]);
970
+ *
971
+ * // Query assignments
972
+ * const assignments = await sdk.spaces.getAssignmentsAsync("events");
973
+ * ```
974
+ */
975
+ declare class SpacesAPI {
976
+ private client;
977
+ constructor(client: HaexVaultSdk);
978
+ /**
979
+ * Bulk assign rows to spaces.
980
+ * @param assignments - Array of row-to-space mappings
981
+ * @returns Number of assignments created
982
+ */
983
+ assignAsync(assignments: SpaceAssignment[]): Promise<number>;
984
+ /**
985
+ * Bulk unassign rows from spaces.
986
+ * @param assignments - Array of row-to-space mappings to remove
987
+ * @returns Number of assignments removed
988
+ */
989
+ unassignAsync(assignments: SpaceAssignment[]): Promise<number>;
990
+ /**
991
+ * Get space assignments for a table, optionally filtered by row.
992
+ * @param tableName - The table to query assignments for
993
+ * @param rowPks - Optional row primary key(s) to filter by
994
+ * @returns Array of space assignments
995
+ */
996
+ getAssignmentsAsync(tableName: string, rowPks?: string): Promise<SpaceAssignment[]>;
997
+ /**
998
+ * Convenience method to assign a single row to a space.
999
+ * @param tableName - The table name
1000
+ * @param rowPks - The row primary key(s)
1001
+ * @param spaceId - The space ID to assign to
1002
+ * @returns Number of assignments created (0 or 1)
1003
+ */
1004
+ assignRowAsync(tableName: string, rowPks: string, spaceId: string): Promise<number>;
1005
+ /**
1006
+ * Convenience method to unassign a single row from a space.
1007
+ * @param tableName - The table name
1008
+ * @param rowPks - The row primary key(s)
1009
+ * @param spaceId - The space ID to unassign from
1010
+ * @returns Number of assignments removed (0 or 1)
1011
+ */
1012
+ unassignRowAsync(tableName: string, rowPks: string, spaceId: string): Promise<number>;
1013
+ }
1014
+
942
1015
  /**
943
1016
  * HaexVault Client
944
1017
  *
@@ -971,6 +1044,7 @@ declare class HaexVaultSdk {
971
1044
  readonly permissions: PermissionsAPI;
972
1045
  readonly remoteStorage: RemoteStorageAPI;
973
1046
  readonly localsend: LocalSendAPI;
1047
+ readonly spaces: SpacesAPI;
974
1048
  constructor(config?: HaexHubConfig);
975
1049
  ready(): Promise<void>;
976
1050
  get setupCompleted(): boolean;
@@ -1014,4 +1088,4 @@ declare class HaexVaultSdk {
1014
1088
  private log;
1015
1089
  }
1016
1090
 
1017
- export { type AuthorizedClient as A, type BlockedClient as B, type SelectFolderOptions as C, DatabaseAPI as D, type ExternalAuthDecision as E, type FileStat as F, type ServerInfo as G, HaexVaultSdk as H, type ServerStatus as I, type SessionAuthorization as J, type TransferProgress as K, LOCALSEND_EVENTS as L, type TransferState as M, canExternalClientSendRequests as N, isExternalClientConnected as O, type PendingAuthorization as P, RemoteStorageAPI as R, StorageAPI as S, type TransferDirection as T, type UpdateBackendRequest as U, WebAPI as W, type Device as a, type DeviceInfo as b, type DeviceType as c, type DirEntry as d, type ExternalConnection as e, ExternalConnectionErrorCode as f, ExternalConnectionState as g, type ExternalRequest as h, type ExternalRequestEvent as i, type ExternalRequestHandler as j, type ExternalRequestPayload as k, type ExternalResponse as l, FilesystemAPI as m, LocalSendAPI as n, type LocalSendEvent as o, type FileInfo as p, type LocalSendSettings as q, type PendingTransfer as r, PermissionsAPI as s, type AddBackendRequest as t, type S3Config as u, type S3PublicConfig as v, type StorageBackendInfo as w, type StorageObjectInfo as x, type RequestedExtension as y, type SelectFileOptions as z };
1091
+ export { type AuthorizedClient as A, type BlockedClient as B, type SelectFolderOptions as C, DatabaseAPI as D, type ExternalAuthDecision as E, type FileStat as F, type ServerInfo as G, HaexVaultSdk as H, type ServerStatus as I, type SessionAuthorization as J, type SpaceAssignment as K, LOCALSEND_EVENTS as L, SpacesAPI as M, type TransferProgress as N, type TransferState as O, type PendingAuthorization as P, canExternalClientSendRequests as Q, RemoteStorageAPI as R, StorageAPI as S, type TransferDirection as T, type UpdateBackendRequest as U, isExternalClientConnected as V, WebAPI as W, type Device as a, type DeviceInfo as b, type DeviceType as c, type DirEntry as d, type ExternalConnection as e, ExternalConnectionErrorCode as f, ExternalConnectionState as g, type ExternalRequest as h, type ExternalRequestEvent as i, type ExternalRequestHandler as j, type ExternalRequestPayload as k, type ExternalResponse as l, FilesystemAPI as m, LocalSendAPI as n, type LocalSendEvent as o, type FileInfo as p, type LocalSendSettings as q, type PendingTransfer as r, PermissionsAPI as s, type AddBackendRequest as t, type S3Config as u, type S3PublicConfig as v, type StorageBackendInfo as w, type StorageObjectInfo as x, type RequestedExtension as y, type SelectFileOptions as z };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as HaexVaultSdk } from './client-DFGx115H.mjs';
2
- export { A as AuthorizedClient, B as BlockedClient, D as DatabaseAPI, a as Device, b as DeviceInfo, c as DeviceType, d as DirEntry, E as ExternalAuthDecision, e as ExternalConnection, f as ExternalConnectionErrorCode, g as ExternalConnectionState, h as ExternalRequest, i as ExternalRequestEvent, j as ExternalRequestHandler, k as ExternalRequestPayload, l as ExternalResponse, F as FileStat, m as FilesystemAPI, L as LOCALSEND_EVENTS, n as LocalSendAPI, o as LocalSendEvent, p as LocalSendFileInfo, q as LocalSendSettings, P as PendingAuthorization, r as PendingTransfer, s as PermissionsAPI, t as RemoteAddBackendRequest, u as RemoteS3Config, v as RemoteS3PublicConfig, R as RemoteStorageAPI, w as RemoteStorageBackendInfo, x as RemoteStorageObjectInfo, U as RemoteUpdateBackendRequest, y as RequestedExtension, z as SelectFileOptions, C as SelectFolderOptions, G as ServerInfo, I as ServerStatus, J as SessionAuthorization, T as TransferDirection, K as TransferProgress, M as TransferState, W as WebAPI, N as canExternalClientSendRequests, O as isExternalClientConnected } from './client-DFGx115H.mjs';
1
+ import { H as HaexVaultSdk } from './client-GPE112vL.mjs';
2
+ export { A as AuthorizedClient, B as BlockedClient, D as DatabaseAPI, a as Device, b as DeviceInfo, c as DeviceType, d as DirEntry, E as ExternalAuthDecision, e as ExternalConnection, f as ExternalConnectionErrorCode, g as ExternalConnectionState, h as ExternalRequest, i as ExternalRequestEvent, j as ExternalRequestHandler, k as ExternalRequestPayload, l as ExternalResponse, F as FileStat, m as FilesystemAPI, L as LOCALSEND_EVENTS, n as LocalSendAPI, o as LocalSendEvent, p as LocalSendFileInfo, q as LocalSendSettings, P as PendingAuthorization, r as PendingTransfer, s as PermissionsAPI, t as RemoteAddBackendRequest, u as RemoteS3Config, v as RemoteS3PublicConfig, R as RemoteStorageAPI, w as RemoteStorageBackendInfo, x as RemoteStorageObjectInfo, U as RemoteUpdateBackendRequest, y as RequestedExtension, z as SelectFileOptions, C as SelectFolderOptions, G as ServerInfo, I as ServerStatus, J as SessionAuthorization, K as SpaceAssignment, M as SpacesAPI, T as TransferDirection, N as TransferProgress, O as TransferState, W as WebAPI, Q as canExternalClientSendRequests, V as isExternalClientConnected } from './client-GPE112vL.mjs';
3
3
  import { E as ExtensionManifest, H as HaexHubConfig } from './types-gfc9eCL4.mjs';
4
4
  export { A as ApplicationContext, C as ContextChangedEvent, h as DEFAULT_TIMEOUT, i as DatabaseColumnInfo, j as DatabaseExecuteParams, k as DatabasePermission, f as DatabasePermissionRequest, l as DatabaseQueryParams, D as DatabaseQueryResult, m as DatabaseTableInfo, c as EXTERNAL_EVENTS, n as ErrorCode, g as EventCallback, a as ExtensionInfo, o as ExtensionRuntimeMode, p as ExternalEvent, F as FileChangeEvent, q as FileChangePayload, r as FileChangeType, s as FilteredSyncTablesResult, t as HAEXTENSION_EVENTS, b as HaexHubEvent, u as HaexHubRequest, v as HaexHubResponse, w as HaexVaultSdkError, x as HaextensionEvent, y as PermissionDeniedError, z as PermissionErrorBase, B as PermissionErrorCode, G as PermissionPromptError, P as PermissionResponse, I as PermissionStatus, J as SearchQuery, K as SearchRequestEvent, S as SearchResult, L as SyncTablesUpdatedEvent, T as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, N as getTableName, O as isPermissionDeniedError, Q as isPermissionError, R as isPermissionPromptError } from './types-gfc9eCL4.mjs';
5
5
  export { H as HaextensionConfig } from './config-D_HXjsEV.mjs';
@@ -82,53 +82,6 @@ declare function installBaseTag(): void;
82
82
  */
83
83
  declare function installPolyfills(): void;
84
84
 
85
- type SpaceRole = 'admin' | 'member' | 'viewer';
86
- interface SharedSpace {
87
- id: string;
88
- ownerId: string;
89
- encryptedName: string;
90
- nameNonce: string;
91
- currentKeyGeneration: number;
92
- role: SpaceRole;
93
- canInvite: boolean;
94
- createdAt: string;
95
- }
96
- interface SpaceMemberInfo {
97
- publicKey: string;
98
- label: string;
99
- role: SpaceRole;
100
- canInvite: boolean;
101
- invitedBy: string | null;
102
- joinedAt: string;
103
- }
104
- interface SpaceKeyGrantInfo {
105
- spaceId: string;
106
- generation: number;
107
- encryptedSpaceKey: string;
108
- keyNonce: string;
109
- ephemeralPublicKey: string;
110
- }
111
- interface SpaceInvite {
112
- spaceId: string;
113
- serverUrl: string;
114
- spaceName: string;
115
- accessToken: string;
116
- encryptedSpaceKey: string;
117
- keyNonce: string;
118
- ephemeralPublicKey: string;
119
- generation: number;
120
- role: SpaceRole;
121
- }
122
- interface SpaceAccessTokenInfo {
123
- id: string;
124
- publicKey: string;
125
- role: SpaceRole;
126
- label: string | null;
127
- revoked: boolean;
128
- createdAt: string;
129
- lastUsedAt: string | null;
130
- }
131
-
132
85
  /**
133
86
  * Sync Server API Types
134
87
  *
@@ -264,6 +217,53 @@ interface RegisterKeypairRequest {
264
217
  privateKeySalt: string;
265
218
  }
266
219
 
220
+ type SpaceRole = 'admin' | 'member' | 'viewer';
221
+ interface SharedSpace {
222
+ id: string;
223
+ ownerId: string;
224
+ encryptedName: string;
225
+ nameNonce: string;
226
+ currentKeyGeneration: number;
227
+ role: SpaceRole;
228
+ canInvite: boolean;
229
+ createdAt: string;
230
+ }
231
+ interface SpaceMemberInfo {
232
+ publicKey: string;
233
+ label: string;
234
+ role: SpaceRole;
235
+ canInvite: boolean;
236
+ invitedBy: string | null;
237
+ joinedAt: string;
238
+ }
239
+ interface SpaceKeyGrantInfo {
240
+ spaceId: string;
241
+ generation: number;
242
+ encryptedSpaceKey: string;
243
+ keyNonce: string;
244
+ ephemeralPublicKey: string;
245
+ }
246
+ interface SpaceInvite {
247
+ spaceId: string;
248
+ serverUrl: string;
249
+ spaceName: string;
250
+ accessToken: string;
251
+ encryptedSpaceKey: string;
252
+ keyNonce: string;
253
+ ephemeralPublicKey: string;
254
+ generation: number;
255
+ role: SpaceRole;
256
+ }
257
+ interface SpaceAccessTokenInfo {
258
+ id: string;
259
+ publicKey: string;
260
+ role: SpaceRole;
261
+ label: string | null;
262
+ revoked: boolean;
263
+ createdAt: string;
264
+ lastUsedAt: string | null;
265
+ }
266
+
267
267
  /**
268
268
  * Central message type definitions for HaexSpace SDK
269
269
  *
@@ -551,6 +551,25 @@ declare const LOCALSEND_COMMANDS: {
551
551
  readonly cancelSend: "localsend_cancel_send";
552
552
  };
553
553
 
554
+ /**
555
+ * Space Commands
556
+ *
557
+ * Commands for managing row-to-space assignments (shared space sync).
558
+ * These commands are used for both:
559
+ * - Tauri invoke (WebView extensions)
560
+ * - postMessage (iframe extensions)
561
+ *
562
+ * Naming convention: `extension_space_<action>`
563
+ */
564
+ declare const SPACE_COMMANDS: {
565
+ /** Bulk assign rows to spaces */
566
+ readonly assign: "extension_space_assign";
567
+ /** Bulk unassign rows from spaces */
568
+ readonly unassign: "extension_space_unassign";
569
+ /** Get space assignments for a table */
570
+ readonly getAssignments: "extension_space_get_assignments";
571
+ };
572
+
554
573
  /**
555
574
  * Tauri Command Names
556
575
  *
@@ -669,8 +688,13 @@ declare const TAURI_COMMANDS: {
669
688
  readonly sendFiles: "localsend_send_files";
670
689
  readonly cancelSend: "localsend_cancel_send";
671
690
  };
691
+ readonly spaces: {
692
+ readonly assign: "extension_space_assign";
693
+ readonly unassign: "extension_space_unassign";
694
+ readonly getAssignments: "extension_space_get_assignments";
695
+ };
672
696
  };
673
- type TauriCommand = (typeof DATABASE_COMMANDS)[keyof typeof DATABASE_COMMANDS] | (typeof PERMISSIONS_COMMANDS)[keyof typeof PERMISSIONS_COMMANDS] | (typeof WEB_COMMANDS)[keyof typeof WEB_COMMANDS] | (typeof WEB_STORAGE_COMMANDS)[keyof typeof WEB_STORAGE_COMMANDS] | (typeof FILESYSTEM_COMMANDS)[keyof typeof FILESYSTEM_COMMANDS] | (typeof EXTERNAL_BRIDGE_COMMANDS)[keyof typeof EXTERNAL_BRIDGE_COMMANDS] | (typeof EXTENSION_COMMANDS)[keyof typeof EXTENSION_COMMANDS] | (typeof REMOTE_STORAGE_COMMANDS)[keyof typeof REMOTE_STORAGE_COMMANDS] | (typeof LOCALSEND_COMMANDS)[keyof typeof LOCALSEND_COMMANDS];
697
+ type TauriCommand = (typeof DATABASE_COMMANDS)[keyof typeof DATABASE_COMMANDS] | (typeof PERMISSIONS_COMMANDS)[keyof typeof PERMISSIONS_COMMANDS] | (typeof WEB_COMMANDS)[keyof typeof WEB_COMMANDS] | (typeof WEB_STORAGE_COMMANDS)[keyof typeof WEB_STORAGE_COMMANDS] | (typeof FILESYSTEM_COMMANDS)[keyof typeof FILESYSTEM_COMMANDS] | (typeof EXTERNAL_BRIDGE_COMMANDS)[keyof typeof EXTERNAL_BRIDGE_COMMANDS] | (typeof EXTENSION_COMMANDS)[keyof typeof EXTENSION_COMMANDS] | (typeof REMOTE_STORAGE_COMMANDS)[keyof typeof REMOTE_STORAGE_COMMANDS] | (typeof LOCALSEND_COMMANDS)[keyof typeof LOCALSEND_COMMANDS] | (typeof SPACE_COMMANDS)[keyof typeof SPACE_COMMANDS];
674
698
 
675
699
  interface VerifyResult {
676
700
  valid: boolean;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as HaexVaultSdk } from './client-8dlKVNDZ.js';
2
- export { A as AuthorizedClient, B as BlockedClient, D as DatabaseAPI, a as Device, b as DeviceInfo, c as DeviceType, d as DirEntry, E as ExternalAuthDecision, e as ExternalConnection, f as ExternalConnectionErrorCode, g as ExternalConnectionState, h as ExternalRequest, i as ExternalRequestEvent, j as ExternalRequestHandler, k as ExternalRequestPayload, l as ExternalResponse, F as FileStat, m as FilesystemAPI, L as LOCALSEND_EVENTS, n as LocalSendAPI, o as LocalSendEvent, p as LocalSendFileInfo, q as LocalSendSettings, P as PendingAuthorization, r as PendingTransfer, s as PermissionsAPI, t as RemoteAddBackendRequest, u as RemoteS3Config, v as RemoteS3PublicConfig, R as RemoteStorageAPI, w as RemoteStorageBackendInfo, x as RemoteStorageObjectInfo, U as RemoteUpdateBackendRequest, y as RequestedExtension, z as SelectFileOptions, C as SelectFolderOptions, G as ServerInfo, I as ServerStatus, J as SessionAuthorization, T as TransferDirection, K as TransferProgress, M as TransferState, W as WebAPI, N as canExternalClientSendRequests, O as isExternalClientConnected } from './client-8dlKVNDZ.js';
1
+ import { H as HaexVaultSdk } from './client-BVMJXZiK.js';
2
+ export { A as AuthorizedClient, B as BlockedClient, D as DatabaseAPI, a as Device, b as DeviceInfo, c as DeviceType, d as DirEntry, E as ExternalAuthDecision, e as ExternalConnection, f as ExternalConnectionErrorCode, g as ExternalConnectionState, h as ExternalRequest, i as ExternalRequestEvent, j as ExternalRequestHandler, k as ExternalRequestPayload, l as ExternalResponse, F as FileStat, m as FilesystemAPI, L as LOCALSEND_EVENTS, n as LocalSendAPI, o as LocalSendEvent, p as LocalSendFileInfo, q as LocalSendSettings, P as PendingAuthorization, r as PendingTransfer, s as PermissionsAPI, t as RemoteAddBackendRequest, u as RemoteS3Config, v as RemoteS3PublicConfig, R as RemoteStorageAPI, w as RemoteStorageBackendInfo, x as RemoteStorageObjectInfo, U as RemoteUpdateBackendRequest, y as RequestedExtension, z as SelectFileOptions, C as SelectFolderOptions, G as ServerInfo, I as ServerStatus, J as SessionAuthorization, K as SpaceAssignment, M as SpacesAPI, T as TransferDirection, N as TransferProgress, O as TransferState, W as WebAPI, Q as canExternalClientSendRequests, V as isExternalClientConnected } from './client-BVMJXZiK.js';
3
3
  import { E as ExtensionManifest, H as HaexHubConfig } from './types-gfc9eCL4.js';
4
4
  export { A as ApplicationContext, C as ContextChangedEvent, h as DEFAULT_TIMEOUT, i as DatabaseColumnInfo, j as DatabaseExecuteParams, k as DatabasePermission, f as DatabasePermissionRequest, l as DatabaseQueryParams, D as DatabaseQueryResult, m as DatabaseTableInfo, c as EXTERNAL_EVENTS, n as ErrorCode, g as EventCallback, a as ExtensionInfo, o as ExtensionRuntimeMode, p as ExternalEvent, F as FileChangeEvent, q as FileChangePayload, r as FileChangeType, s as FilteredSyncTablesResult, t as HAEXTENSION_EVENTS, b as HaexHubEvent, u as HaexHubRequest, v as HaexHubResponse, w as HaexVaultSdkError, x as HaextensionEvent, y as PermissionDeniedError, z as PermissionErrorBase, B as PermissionErrorCode, G as PermissionPromptError, P as PermissionResponse, I as PermissionStatus, J as SearchQuery, K as SearchRequestEvent, S as SearchResult, L as SyncTablesUpdatedEvent, T as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, N as getTableName, O as isPermissionDeniedError, Q as isPermissionError, R as isPermissionPromptError } from './types-gfc9eCL4.js';
5
5
  export { H as HaextensionConfig } from './config-D_HXjsEV.js';
@@ -82,53 +82,6 @@ declare function installBaseTag(): void;
82
82
  */
83
83
  declare function installPolyfills(): void;
84
84
 
85
- type SpaceRole = 'admin' | 'member' | 'viewer';
86
- interface SharedSpace {
87
- id: string;
88
- ownerId: string;
89
- encryptedName: string;
90
- nameNonce: string;
91
- currentKeyGeneration: number;
92
- role: SpaceRole;
93
- canInvite: boolean;
94
- createdAt: string;
95
- }
96
- interface SpaceMemberInfo {
97
- publicKey: string;
98
- label: string;
99
- role: SpaceRole;
100
- canInvite: boolean;
101
- invitedBy: string | null;
102
- joinedAt: string;
103
- }
104
- interface SpaceKeyGrantInfo {
105
- spaceId: string;
106
- generation: number;
107
- encryptedSpaceKey: string;
108
- keyNonce: string;
109
- ephemeralPublicKey: string;
110
- }
111
- interface SpaceInvite {
112
- spaceId: string;
113
- serverUrl: string;
114
- spaceName: string;
115
- accessToken: string;
116
- encryptedSpaceKey: string;
117
- keyNonce: string;
118
- ephemeralPublicKey: string;
119
- generation: number;
120
- role: SpaceRole;
121
- }
122
- interface SpaceAccessTokenInfo {
123
- id: string;
124
- publicKey: string;
125
- role: SpaceRole;
126
- label: string | null;
127
- revoked: boolean;
128
- createdAt: string;
129
- lastUsedAt: string | null;
130
- }
131
-
132
85
  /**
133
86
  * Sync Server API Types
134
87
  *
@@ -264,6 +217,53 @@ interface RegisterKeypairRequest {
264
217
  privateKeySalt: string;
265
218
  }
266
219
 
220
+ type SpaceRole = 'admin' | 'member' | 'viewer';
221
+ interface SharedSpace {
222
+ id: string;
223
+ ownerId: string;
224
+ encryptedName: string;
225
+ nameNonce: string;
226
+ currentKeyGeneration: number;
227
+ role: SpaceRole;
228
+ canInvite: boolean;
229
+ createdAt: string;
230
+ }
231
+ interface SpaceMemberInfo {
232
+ publicKey: string;
233
+ label: string;
234
+ role: SpaceRole;
235
+ canInvite: boolean;
236
+ invitedBy: string | null;
237
+ joinedAt: string;
238
+ }
239
+ interface SpaceKeyGrantInfo {
240
+ spaceId: string;
241
+ generation: number;
242
+ encryptedSpaceKey: string;
243
+ keyNonce: string;
244
+ ephemeralPublicKey: string;
245
+ }
246
+ interface SpaceInvite {
247
+ spaceId: string;
248
+ serverUrl: string;
249
+ spaceName: string;
250
+ accessToken: string;
251
+ encryptedSpaceKey: string;
252
+ keyNonce: string;
253
+ ephemeralPublicKey: string;
254
+ generation: number;
255
+ role: SpaceRole;
256
+ }
257
+ interface SpaceAccessTokenInfo {
258
+ id: string;
259
+ publicKey: string;
260
+ role: SpaceRole;
261
+ label: string | null;
262
+ revoked: boolean;
263
+ createdAt: string;
264
+ lastUsedAt: string | null;
265
+ }
266
+
267
267
  /**
268
268
  * Central message type definitions for HaexSpace SDK
269
269
  *
@@ -551,6 +551,25 @@ declare const LOCALSEND_COMMANDS: {
551
551
  readonly cancelSend: "localsend_cancel_send";
552
552
  };
553
553
 
554
+ /**
555
+ * Space Commands
556
+ *
557
+ * Commands for managing row-to-space assignments (shared space sync).
558
+ * These commands are used for both:
559
+ * - Tauri invoke (WebView extensions)
560
+ * - postMessage (iframe extensions)
561
+ *
562
+ * Naming convention: `extension_space_<action>`
563
+ */
564
+ declare const SPACE_COMMANDS: {
565
+ /** Bulk assign rows to spaces */
566
+ readonly assign: "extension_space_assign";
567
+ /** Bulk unassign rows from spaces */
568
+ readonly unassign: "extension_space_unassign";
569
+ /** Get space assignments for a table */
570
+ readonly getAssignments: "extension_space_get_assignments";
571
+ };
572
+
554
573
  /**
555
574
  * Tauri Command Names
556
575
  *
@@ -669,8 +688,13 @@ declare const TAURI_COMMANDS: {
669
688
  readonly sendFiles: "localsend_send_files";
670
689
  readonly cancelSend: "localsend_cancel_send";
671
690
  };
691
+ readonly spaces: {
692
+ readonly assign: "extension_space_assign";
693
+ readonly unassign: "extension_space_unassign";
694
+ readonly getAssignments: "extension_space_get_assignments";
695
+ };
672
696
  };
673
- type TauriCommand = (typeof DATABASE_COMMANDS)[keyof typeof DATABASE_COMMANDS] | (typeof PERMISSIONS_COMMANDS)[keyof typeof PERMISSIONS_COMMANDS] | (typeof WEB_COMMANDS)[keyof typeof WEB_COMMANDS] | (typeof WEB_STORAGE_COMMANDS)[keyof typeof WEB_STORAGE_COMMANDS] | (typeof FILESYSTEM_COMMANDS)[keyof typeof FILESYSTEM_COMMANDS] | (typeof EXTERNAL_BRIDGE_COMMANDS)[keyof typeof EXTERNAL_BRIDGE_COMMANDS] | (typeof EXTENSION_COMMANDS)[keyof typeof EXTENSION_COMMANDS] | (typeof REMOTE_STORAGE_COMMANDS)[keyof typeof REMOTE_STORAGE_COMMANDS] | (typeof LOCALSEND_COMMANDS)[keyof typeof LOCALSEND_COMMANDS];
697
+ type TauriCommand = (typeof DATABASE_COMMANDS)[keyof typeof DATABASE_COMMANDS] | (typeof PERMISSIONS_COMMANDS)[keyof typeof PERMISSIONS_COMMANDS] | (typeof WEB_COMMANDS)[keyof typeof WEB_COMMANDS] | (typeof WEB_STORAGE_COMMANDS)[keyof typeof WEB_STORAGE_COMMANDS] | (typeof FILESYSTEM_COMMANDS)[keyof typeof FILESYSTEM_COMMANDS] | (typeof EXTERNAL_BRIDGE_COMMANDS)[keyof typeof EXTERNAL_BRIDGE_COMMANDS] | (typeof EXTENSION_COMMANDS)[keyof typeof EXTENSION_COMMANDS] | (typeof REMOTE_STORAGE_COMMANDS)[keyof typeof REMOTE_STORAGE_COMMANDS] | (typeof LOCALSEND_COMMANDS)[keyof typeof LOCALSEND_COMMANDS] | (typeof SPACE_COMMANDS)[keyof typeof SPACE_COMMANDS];
674
698
 
675
699
  interface VerifyResult {
676
700
  valid: boolean;