@haex-space/vault-sdk 2.5.110 → 2.5.111

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/index.d.mts CHANGED
@@ -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
  *
package/dist/index.d.ts CHANGED
@@ -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
  *
package/dist/index.js CHANGED
@@ -387,34 +387,6 @@ var EXTERNAL_EVENTS = {
387
387
  AUTHORIZATION_REQUEST: "external:authorization-request"
388
388
  };
389
389
 
390
- // src/types/external.ts
391
- var ExternalConnectionState = /* @__PURE__ */ ((ExternalConnectionState2) => {
392
- ExternalConnectionState2["DISCONNECTED"] = "disconnected";
393
- ExternalConnectionState2["CONNECTING"] = "connecting";
394
- ExternalConnectionState2["CONNECTED"] = "connected";
395
- ExternalConnectionState2["PENDING_APPROVAL"] = "pending_approval";
396
- ExternalConnectionState2["PAIRED"] = "paired";
397
- return ExternalConnectionState2;
398
- })(ExternalConnectionState || {});
399
- var ExternalConnectionErrorCode = /* @__PURE__ */ ((ExternalConnectionErrorCode2) => {
400
- ExternalConnectionErrorCode2["NONE"] = "none";
401
- ExternalConnectionErrorCode2["CLIENT_NOT_AUTHORIZED"] = "client_not_authorized";
402
- ExternalConnectionErrorCode2["CLIENT_BLOCKED"] = "client_blocked";
403
- ExternalConnectionErrorCode2["CONNECTION_FAILED"] = "connection_failed";
404
- ExternalConnectionErrorCode2["CONNECTION_TIMEOUT"] = "connection_timeout";
405
- ExternalConnectionErrorCode2["CONNECTION_CLOSED"] = "connection_closed";
406
- ExternalConnectionErrorCode2["DECRYPTION_FAILED"] = "decryption_failed";
407
- ExternalConnectionErrorCode2["INVALID_MESSAGE"] = "invalid_message";
408
- ExternalConnectionErrorCode2["UNKNOWN"] = "unknown";
409
- return ExternalConnectionErrorCode2;
410
- })(ExternalConnectionErrorCode || {});
411
- function isExternalClientConnected(state) {
412
- return state === "connected" /* CONNECTED */ || state === "pending_approval" /* PENDING_APPROVAL */ || state === "paired" /* PAIRED */;
413
- }
414
- function canExternalClientSendRequests(state) {
415
- return state === "paired" /* PAIRED */;
416
- }
417
-
418
390
  // src/types.ts
419
391
  var DEFAULT_TIMEOUT = 3e4;
420
392
  var TABLE_SEPARATOR = "__";
@@ -2650,6 +2622,34 @@ var HaexVaultSdk = class {
2650
2622
  }
2651
2623
  };
2652
2624
 
2625
+ // src/types/external.ts
2626
+ var ExternalConnectionState = /* @__PURE__ */ ((ExternalConnectionState2) => {
2627
+ ExternalConnectionState2["DISCONNECTED"] = "disconnected";
2628
+ ExternalConnectionState2["CONNECTING"] = "connecting";
2629
+ ExternalConnectionState2["CONNECTED"] = "connected";
2630
+ ExternalConnectionState2["PENDING_APPROVAL"] = "pending_approval";
2631
+ ExternalConnectionState2["PAIRED"] = "paired";
2632
+ return ExternalConnectionState2;
2633
+ })(ExternalConnectionState || {});
2634
+ var ExternalConnectionErrorCode = /* @__PURE__ */ ((ExternalConnectionErrorCode2) => {
2635
+ ExternalConnectionErrorCode2["NONE"] = "none";
2636
+ ExternalConnectionErrorCode2["CLIENT_NOT_AUTHORIZED"] = "client_not_authorized";
2637
+ ExternalConnectionErrorCode2["CLIENT_BLOCKED"] = "client_blocked";
2638
+ ExternalConnectionErrorCode2["CONNECTION_FAILED"] = "connection_failed";
2639
+ ExternalConnectionErrorCode2["CONNECTION_TIMEOUT"] = "connection_timeout";
2640
+ ExternalConnectionErrorCode2["CONNECTION_CLOSED"] = "connection_closed";
2641
+ ExternalConnectionErrorCode2["DECRYPTION_FAILED"] = "decryption_failed";
2642
+ ExternalConnectionErrorCode2["INVALID_MESSAGE"] = "invalid_message";
2643
+ ExternalConnectionErrorCode2["UNKNOWN"] = "unknown";
2644
+ return ExternalConnectionErrorCode2;
2645
+ })(ExternalConnectionErrorCode || {});
2646
+ function isExternalClientConnected(state) {
2647
+ return state === "connected" /* CONNECTED */ || state === "pending_approval" /* PENDING_APPROVAL */ || state === "paired" /* PAIRED */;
2648
+ }
2649
+ function canExternalClientSendRequests(state) {
2650
+ return state === "paired" /* PAIRED */;
2651
+ }
2652
+
2653
2653
  // src/crypto/verify.ts
2654
2654
  function sortObjectKeysRecursively(obj) {
2655
2655
  if (typeof obj !== "object" || obj === null) {