@arbidocs/client 0.4.131 → 0.4.132
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.cjs +42 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +42 -43
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -38507,6 +38507,24 @@ interface ArbiClientOptions {
|
|
|
38507
38507
|
* the client is constructed from cached credentials (no login call).
|
|
38508
38508
|
*/
|
|
38509
38509
|
userEmail?: string;
|
|
38510
|
+
/**
|
|
38511
|
+
* Run on a transport the host app already has instead of building one: its authenticated fetch
|
|
38512
|
+
* client, its session state and its re-login. One session, one re-login loop; `baseUrl`,
|
|
38513
|
+
* `credentials`, `ssoTokenProvider`, `sessionStorage`, `userEmail` and the re-login callbacks
|
|
38514
|
+
* are the host's business then and are not used.
|
|
38515
|
+
*/
|
|
38516
|
+
transport?: ArbiClientTransport;
|
|
38517
|
+
}
|
|
38518
|
+
/** What an `ArbiClient` sends requests over: built by `createArbiClient`, or the host's own. */
|
|
38519
|
+
interface ArbiClientTransport {
|
|
38520
|
+
/** Type-safe openapi-fetch client whose middleware adds the token and re-logs in on a 401. */
|
|
38521
|
+
fetch: ReturnType<typeof createFetchClient<paths>>;
|
|
38522
|
+
/** Session state (token, user, selected workspace), read on every call. */
|
|
38523
|
+
session: SessionManager;
|
|
38524
|
+
/** Silent re-login: the new access token, or `null` when the session cannot be recovered. */
|
|
38525
|
+
relogin(): Promise<string | null>;
|
|
38526
|
+
/** Re-open the selected workspace without a new login; `false` when it could not. */
|
|
38527
|
+
reopenWorkspace(): Promise<boolean>;
|
|
38510
38528
|
}
|
|
38511
38529
|
interface ArbiClient {
|
|
38512
38530
|
/** Type-safe openapi-fetch client with middleware */
|
|
@@ -38675,4 +38693,4 @@ interface ReopenDeps {
|
|
|
38675
38693
|
*/
|
|
38676
38694
|
declare function createWorkspaceReopener(deps: ReopenDeps): () => Promise<boolean>;
|
|
38677
38695
|
|
|
38678
|
-
export { type $defs, API_PREFIX, type ArbiClient, type ArbiClientOptions, type AuthStateProvider, type AutoReloginMiddlewareConfig, type BearerAuthMiddlewareConfig, CALL_KEY_BYTES, CHAT_KEY_BYTES, type ChangePasswordParams, type ChangePasswordRequest, type ChangePasswordResult, type CryptoProvider, ENCRYPTED_RECOVERY_KEY_SIZE, type KeyLoginCredentials, type KeyPair, type LoginCredentials, type LoginParams, type LoginProfile, type LoginProvider, type LoginRequest, type LoginResult, type LoginWithKeyParams, type OfflineSealer, type OfflineSealerOptions, type OnReloginSuccess, type ParsedRecoveryUrl, type PasswordChangeCredentials, RECOVERY_KEY_ERRORS, type RecoveryKeyParams, type RecoveryKeyValidationResult, type RegisterParams, type RegisterRequest, type RegisterResult, type RegistrationCredentials, type ReloginDeps, type ReloginHandler, type ReopenDeps, SECURE_MAIL_KEY_BYTES, type SealedSecureMail, type SecureMailCiphertexts, type SecureMailClaim, type SessionData, type SessionKeys, type SessionManager, type SessionState, type SessionStorageProvider, type SsoTokenProvider, type TokenProvider, UNENCRYPTED_RECOVERY_KEY_SIZE, type UserKeypairs, type WebSocketClientMessage, type WebSocketServerMessage, type WorkspaceKeyRefreshProvider, type WorkspaceOpenProvider, type WsAgentDmStatusMessage, type WsAuthMessage, type WsAuthResultMessage, type WsBatchCompleteMessage, type WsChatMessageMessage, type WsChatReadMessage, type WsChatUpdatedMessage, type WsConnectionClosedMessage, type WsConversationMessagePostedMessage, type WsErrorMessage, type WsNotificationResponse, type WsPresenceUpdateMessage, type WsResponseCompleteMessage, type WsTaskUpdateMessage, base64Decode, base64Encode, base64ToBytes, base64UrlToBytes, buildCallFragment, buildWebSocketUrl, bytesToBase64, bytesToBase64Url, canPersistSession, changePassword, clearAllData, clearSession, type components, computeSharedSecret, createArbiClient, createAuthMessage, createAutoReloginMiddleware, createBearerAuthMiddleware, createContentHash, createOfflineSealer, createRecoveryFile, createRecoveryUrl, createReloginHandler, createSessionManager, createWorkspaceReopener, decodeCallKey, decodeSecureMailKey, decryptCallTitle, decryptFile, decryptMessage, decryptMessageWithSharedSecret, decryptRecoveryKey, decryptWithChatKey, deriveDirectChatKey, deriveEncryptionKeypairFromSigning, derivePublicKey, encodeCallKey, encryptCallTitle, encryptFile, encryptMessage, encryptMessageWithSharedSecret, encryptRecoveryKey, encryptWithChatKey, encryptionKeypairFromSigningKey, generateCallKey, generateChatKey, generateIdentityKeypair, generateKeyPairs, generateLoginCredentials, generateLoginCredentialsFromKey, generatePasswordChangeCredentials, generateRandomSigningKeypair, generateRegistrationCredentials, generateUserKeypairs, getRecoveryKeyFilename, getSession, getUserEncryptionKeypair, hasSession, identityFromLoginResponse, initSodium, initializeDatabase, isEncryptedRecoveryKey, isMessageType, openSealedCallKey, openSealedChatKey, openSecureMail, type operations, parseCallFragment, parseRecoveryUrl, parseServerMessage, passwordChangeErrorMessage, type paths, prewarmKeyPairs, saveSession, sealCallKey, sealChatKey, sealKeyForSession, sealSecureMail, sealedBoxDecrypt, sealedBoxEncrypt, secureMailClaim, signMessage, unlockIdentityWithPassword, unwrapIdentityKey, unwrapWorkspaceKey, updateWrappedIdentityKey, validateRecoveryKeyFile, type webhooks, wrapIdentityKey };
|
|
38696
|
+
export { type $defs, API_PREFIX, type ArbiClient, type ArbiClientOptions, type ArbiClientTransport, type AuthStateProvider, type AutoReloginMiddlewareConfig, type BearerAuthMiddlewareConfig, CALL_KEY_BYTES, CHAT_KEY_BYTES, type ChangePasswordParams, type ChangePasswordRequest, type ChangePasswordResult, type CryptoProvider, ENCRYPTED_RECOVERY_KEY_SIZE, type KeyLoginCredentials, type KeyPair, type LoginCredentials, type LoginParams, type LoginProfile, type LoginProvider, type LoginRequest, type LoginResult, type LoginWithKeyParams, type OfflineSealer, type OfflineSealerOptions, type OnReloginSuccess, type ParsedRecoveryUrl, type PasswordChangeCredentials, RECOVERY_KEY_ERRORS, type RecoveryKeyParams, type RecoveryKeyValidationResult, type RegisterParams, type RegisterRequest, type RegisterResult, type RegistrationCredentials, type ReloginDeps, type ReloginHandler, type ReopenDeps, SECURE_MAIL_KEY_BYTES, type SealedSecureMail, type SecureMailCiphertexts, type SecureMailClaim, type SessionData, type SessionKeys, type SessionManager, type SessionState, type SessionStorageProvider, type SsoTokenProvider, type TokenProvider, UNENCRYPTED_RECOVERY_KEY_SIZE, type UserKeypairs, type WebSocketClientMessage, type WebSocketServerMessage, type WorkspaceKeyRefreshProvider, type WorkspaceOpenProvider, type WsAgentDmStatusMessage, type WsAuthMessage, type WsAuthResultMessage, type WsBatchCompleteMessage, type WsChatMessageMessage, type WsChatReadMessage, type WsChatUpdatedMessage, type WsConnectionClosedMessage, type WsConversationMessagePostedMessage, type WsErrorMessage, type WsNotificationResponse, type WsPresenceUpdateMessage, type WsResponseCompleteMessage, type WsTaskUpdateMessage, base64Decode, base64Encode, base64ToBytes, base64UrlToBytes, buildCallFragment, buildWebSocketUrl, bytesToBase64, bytesToBase64Url, canPersistSession, changePassword, clearAllData, clearSession, type components, computeSharedSecret, createArbiClient, createAuthMessage, createAutoReloginMiddleware, createBearerAuthMiddleware, createContentHash, createOfflineSealer, createRecoveryFile, createRecoveryUrl, createReloginHandler, createSessionManager, createWorkspaceReopener, decodeCallKey, decodeSecureMailKey, decryptCallTitle, decryptFile, decryptMessage, decryptMessageWithSharedSecret, decryptRecoveryKey, decryptWithChatKey, deriveDirectChatKey, deriveEncryptionKeypairFromSigning, derivePublicKey, encodeCallKey, encryptCallTitle, encryptFile, encryptMessage, encryptMessageWithSharedSecret, encryptRecoveryKey, encryptWithChatKey, encryptionKeypairFromSigningKey, generateCallKey, generateChatKey, generateIdentityKeypair, generateKeyPairs, generateLoginCredentials, generateLoginCredentialsFromKey, generatePasswordChangeCredentials, generateRandomSigningKeypair, generateRegistrationCredentials, generateUserKeypairs, getRecoveryKeyFilename, getSession, getUserEncryptionKeypair, hasSession, identityFromLoginResponse, initSodium, initializeDatabase, isEncryptedRecoveryKey, isMessageType, openSealedCallKey, openSealedChatKey, openSecureMail, type operations, parseCallFragment, parseRecoveryUrl, parseServerMessage, passwordChangeErrorMessage, type paths, prewarmKeyPairs, saveSession, sealCallKey, sealChatKey, sealKeyForSession, sealSecureMail, sealedBoxDecrypt, sealedBoxEncrypt, secureMailClaim, signMessage, unlockIdentityWithPassword, unwrapIdentityKey, unwrapWorkspaceKey, updateWrappedIdentityKey, validateRecoveryKeyFile, type webhooks, wrapIdentityKey };
|
package/dist/index.d.ts
CHANGED
|
@@ -38507,6 +38507,24 @@ interface ArbiClientOptions {
|
|
|
38507
38507
|
* the client is constructed from cached credentials (no login call).
|
|
38508
38508
|
*/
|
|
38509
38509
|
userEmail?: string;
|
|
38510
|
+
/**
|
|
38511
|
+
* Run on a transport the host app already has instead of building one: its authenticated fetch
|
|
38512
|
+
* client, its session state and its re-login. One session, one re-login loop; `baseUrl`,
|
|
38513
|
+
* `credentials`, `ssoTokenProvider`, `sessionStorage`, `userEmail` and the re-login callbacks
|
|
38514
|
+
* are the host's business then and are not used.
|
|
38515
|
+
*/
|
|
38516
|
+
transport?: ArbiClientTransport;
|
|
38517
|
+
}
|
|
38518
|
+
/** What an `ArbiClient` sends requests over: built by `createArbiClient`, or the host's own. */
|
|
38519
|
+
interface ArbiClientTransport {
|
|
38520
|
+
/** Type-safe openapi-fetch client whose middleware adds the token and re-logs in on a 401. */
|
|
38521
|
+
fetch: ReturnType<typeof createFetchClient<paths>>;
|
|
38522
|
+
/** Session state (token, user, selected workspace), read on every call. */
|
|
38523
|
+
session: SessionManager;
|
|
38524
|
+
/** Silent re-login: the new access token, or `null` when the session cannot be recovered. */
|
|
38525
|
+
relogin(): Promise<string | null>;
|
|
38526
|
+
/** Re-open the selected workspace without a new login; `false` when it could not. */
|
|
38527
|
+
reopenWorkspace(): Promise<boolean>;
|
|
38510
38528
|
}
|
|
38511
38529
|
interface ArbiClient {
|
|
38512
38530
|
/** Type-safe openapi-fetch client with middleware */
|
|
@@ -38675,4 +38693,4 @@ interface ReopenDeps {
|
|
|
38675
38693
|
*/
|
|
38676
38694
|
declare function createWorkspaceReopener(deps: ReopenDeps): () => Promise<boolean>;
|
|
38677
38695
|
|
|
38678
|
-
export { type $defs, API_PREFIX, type ArbiClient, type ArbiClientOptions, type AuthStateProvider, type AutoReloginMiddlewareConfig, type BearerAuthMiddlewareConfig, CALL_KEY_BYTES, CHAT_KEY_BYTES, type ChangePasswordParams, type ChangePasswordRequest, type ChangePasswordResult, type CryptoProvider, ENCRYPTED_RECOVERY_KEY_SIZE, type KeyLoginCredentials, type KeyPair, type LoginCredentials, type LoginParams, type LoginProfile, type LoginProvider, type LoginRequest, type LoginResult, type LoginWithKeyParams, type OfflineSealer, type OfflineSealerOptions, type OnReloginSuccess, type ParsedRecoveryUrl, type PasswordChangeCredentials, RECOVERY_KEY_ERRORS, type RecoveryKeyParams, type RecoveryKeyValidationResult, type RegisterParams, type RegisterRequest, type RegisterResult, type RegistrationCredentials, type ReloginDeps, type ReloginHandler, type ReopenDeps, SECURE_MAIL_KEY_BYTES, type SealedSecureMail, type SecureMailCiphertexts, type SecureMailClaim, type SessionData, type SessionKeys, type SessionManager, type SessionState, type SessionStorageProvider, type SsoTokenProvider, type TokenProvider, UNENCRYPTED_RECOVERY_KEY_SIZE, type UserKeypairs, type WebSocketClientMessage, type WebSocketServerMessage, type WorkspaceKeyRefreshProvider, type WorkspaceOpenProvider, type WsAgentDmStatusMessage, type WsAuthMessage, type WsAuthResultMessage, type WsBatchCompleteMessage, type WsChatMessageMessage, type WsChatReadMessage, type WsChatUpdatedMessage, type WsConnectionClosedMessage, type WsConversationMessagePostedMessage, type WsErrorMessage, type WsNotificationResponse, type WsPresenceUpdateMessage, type WsResponseCompleteMessage, type WsTaskUpdateMessage, base64Decode, base64Encode, base64ToBytes, base64UrlToBytes, buildCallFragment, buildWebSocketUrl, bytesToBase64, bytesToBase64Url, canPersistSession, changePassword, clearAllData, clearSession, type components, computeSharedSecret, createArbiClient, createAuthMessage, createAutoReloginMiddleware, createBearerAuthMiddleware, createContentHash, createOfflineSealer, createRecoveryFile, createRecoveryUrl, createReloginHandler, createSessionManager, createWorkspaceReopener, decodeCallKey, decodeSecureMailKey, decryptCallTitle, decryptFile, decryptMessage, decryptMessageWithSharedSecret, decryptRecoveryKey, decryptWithChatKey, deriveDirectChatKey, deriveEncryptionKeypairFromSigning, derivePublicKey, encodeCallKey, encryptCallTitle, encryptFile, encryptMessage, encryptMessageWithSharedSecret, encryptRecoveryKey, encryptWithChatKey, encryptionKeypairFromSigningKey, generateCallKey, generateChatKey, generateIdentityKeypair, generateKeyPairs, generateLoginCredentials, generateLoginCredentialsFromKey, generatePasswordChangeCredentials, generateRandomSigningKeypair, generateRegistrationCredentials, generateUserKeypairs, getRecoveryKeyFilename, getSession, getUserEncryptionKeypair, hasSession, identityFromLoginResponse, initSodium, initializeDatabase, isEncryptedRecoveryKey, isMessageType, openSealedCallKey, openSealedChatKey, openSecureMail, type operations, parseCallFragment, parseRecoveryUrl, parseServerMessage, passwordChangeErrorMessage, type paths, prewarmKeyPairs, saveSession, sealCallKey, sealChatKey, sealKeyForSession, sealSecureMail, sealedBoxDecrypt, sealedBoxEncrypt, secureMailClaim, signMessage, unlockIdentityWithPassword, unwrapIdentityKey, unwrapWorkspaceKey, updateWrappedIdentityKey, validateRecoveryKeyFile, type webhooks, wrapIdentityKey };
|
|
38696
|
+
export { type $defs, API_PREFIX, type ArbiClient, type ArbiClientOptions, type ArbiClientTransport, type AuthStateProvider, type AutoReloginMiddlewareConfig, type BearerAuthMiddlewareConfig, CALL_KEY_BYTES, CHAT_KEY_BYTES, type ChangePasswordParams, type ChangePasswordRequest, type ChangePasswordResult, type CryptoProvider, ENCRYPTED_RECOVERY_KEY_SIZE, type KeyLoginCredentials, type KeyPair, type LoginCredentials, type LoginParams, type LoginProfile, type LoginProvider, type LoginRequest, type LoginResult, type LoginWithKeyParams, type OfflineSealer, type OfflineSealerOptions, type OnReloginSuccess, type ParsedRecoveryUrl, type PasswordChangeCredentials, RECOVERY_KEY_ERRORS, type RecoveryKeyParams, type RecoveryKeyValidationResult, type RegisterParams, type RegisterRequest, type RegisterResult, type RegistrationCredentials, type ReloginDeps, type ReloginHandler, type ReopenDeps, SECURE_MAIL_KEY_BYTES, type SealedSecureMail, type SecureMailCiphertexts, type SecureMailClaim, type SessionData, type SessionKeys, type SessionManager, type SessionState, type SessionStorageProvider, type SsoTokenProvider, type TokenProvider, UNENCRYPTED_RECOVERY_KEY_SIZE, type UserKeypairs, type WebSocketClientMessage, type WebSocketServerMessage, type WorkspaceKeyRefreshProvider, type WorkspaceOpenProvider, type WsAgentDmStatusMessage, type WsAuthMessage, type WsAuthResultMessage, type WsBatchCompleteMessage, type WsChatMessageMessage, type WsChatReadMessage, type WsChatUpdatedMessage, type WsConnectionClosedMessage, type WsConversationMessagePostedMessage, type WsErrorMessage, type WsNotificationResponse, type WsPresenceUpdateMessage, type WsResponseCompleteMessage, type WsTaskUpdateMessage, base64Decode, base64Encode, base64ToBytes, base64UrlToBytes, buildCallFragment, buildWebSocketUrl, bytesToBase64, bytesToBase64Url, canPersistSession, changePassword, clearAllData, clearSession, type components, computeSharedSecret, createArbiClient, createAuthMessage, createAutoReloginMiddleware, createBearerAuthMiddleware, createContentHash, createOfflineSealer, createRecoveryFile, createRecoveryUrl, createReloginHandler, createSessionManager, createWorkspaceReopener, decodeCallKey, decodeSecureMailKey, decryptCallTitle, decryptFile, decryptMessage, decryptMessageWithSharedSecret, decryptRecoveryKey, decryptWithChatKey, deriveDirectChatKey, deriveEncryptionKeypairFromSigning, derivePublicKey, encodeCallKey, encryptCallTitle, encryptFile, encryptMessage, encryptMessageWithSharedSecret, encryptRecoveryKey, encryptWithChatKey, encryptionKeypairFromSigningKey, generateCallKey, generateChatKey, generateIdentityKeypair, generateKeyPairs, generateLoginCredentials, generateLoginCredentialsFromKey, generatePasswordChangeCredentials, generateRandomSigningKeypair, generateRegistrationCredentials, generateUserKeypairs, getRecoveryKeyFilename, getSession, getUserEncryptionKeypair, hasSession, identityFromLoginResponse, initSodium, initializeDatabase, isEncryptedRecoveryKey, isMessageType, openSealedCallKey, openSealedChatKey, openSecureMail, type operations, parseCallFragment, parseRecoveryUrl, parseServerMessage, passwordChangeErrorMessage, type paths, prewarmKeyPairs, saveSession, sealCallKey, sealChatKey, sealKeyForSession, sealSecureMail, sealedBoxDecrypt, sealedBoxEncrypt, secureMailClaim, signMessage, unlockIdentityWithPassword, unwrapIdentityKey, unwrapWorkspaceKey, updateWrappedIdentityKey, validateRecoveryKeyFile, type webhooks, wrapIdentityKey };
|
package/dist/index.js
CHANGED
|
@@ -1492,9 +1492,49 @@ function createRetryFetch() {
|
|
|
1492
1492
|
};
|
|
1493
1493
|
}
|
|
1494
1494
|
function createArbiClient(options) {
|
|
1495
|
+
const { fetch: fetch2, session, relogin, reopenWorkspace } = options.transport ?? createTransport(options);
|
|
1496
|
+
const authDeps = { fetchClient: fetch2, session, deploymentDomain: options.deploymentDomain };
|
|
1497
|
+
return {
|
|
1498
|
+
fetch: fetch2,
|
|
1499
|
+
session,
|
|
1500
|
+
auth: {
|
|
1501
|
+
register: (params) => register(params, authDeps),
|
|
1502
|
+
login: (params) => login(params, authDeps),
|
|
1503
|
+
loginWithKey: (params) => loginWithKey(params, authDeps),
|
|
1504
|
+
logout: () => logout(session),
|
|
1505
|
+
changePassword: (params) => changePassword(params, authDeps),
|
|
1506
|
+
relogin,
|
|
1507
|
+
reopenWorkspace
|
|
1508
|
+
},
|
|
1509
|
+
crypto: {
|
|
1510
|
+
initSodium,
|
|
1511
|
+
generateUserKeypairs: (email, password) => generateUserKeypairs(email, password, options.deploymentDomain),
|
|
1512
|
+
signMessage,
|
|
1513
|
+
sealedBoxDecrypt,
|
|
1514
|
+
sealedBoxEncrypt,
|
|
1515
|
+
sealKeyForSession,
|
|
1516
|
+
deriveEncryptionKeypairFromSigning,
|
|
1517
|
+
generateRandomSigningKeypair,
|
|
1518
|
+
derivePublicKey,
|
|
1519
|
+
base64ToBytes,
|
|
1520
|
+
bytesToBase64,
|
|
1521
|
+
base64Encode,
|
|
1522
|
+
base64Decode,
|
|
1523
|
+
computeSharedSecret,
|
|
1524
|
+
encryptMessage,
|
|
1525
|
+
decryptMessage,
|
|
1526
|
+
encryptMessageWithSharedSecret,
|
|
1527
|
+
decryptMessageWithSharedSecret
|
|
1528
|
+
},
|
|
1529
|
+
storage: {
|
|
1530
|
+
getSession,
|
|
1531
|
+
saveSession
|
|
1532
|
+
}
|
|
1533
|
+
};
|
|
1534
|
+
}
|
|
1535
|
+
function createTransport(options) {
|
|
1495
1536
|
const {
|
|
1496
1537
|
baseUrl,
|
|
1497
|
-
deploymentDomain,
|
|
1498
1538
|
reloginExcludePatterns = [`${API_PREFIX}/user/login`],
|
|
1499
1539
|
credentials = "include",
|
|
1500
1540
|
ssoTokenProvider = null,
|
|
@@ -1630,48 +1670,7 @@ function createArbiClient(options) {
|
|
|
1630
1670
|
}
|
|
1631
1671
|
})
|
|
1632
1672
|
);
|
|
1633
|
-
|
|
1634
|
-
fetchClient,
|
|
1635
|
-
session,
|
|
1636
|
-
deploymentDomain
|
|
1637
|
-
};
|
|
1638
|
-
return {
|
|
1639
|
-
fetch: fetchClient,
|
|
1640
|
-
session,
|
|
1641
|
-
auth: {
|
|
1642
|
-
register: (params) => register(params, authDeps),
|
|
1643
|
-
login: (params) => login(params, authDeps),
|
|
1644
|
-
loginWithKey: (params) => loginWithKey(params, authDeps),
|
|
1645
|
-
logout: () => logout(session),
|
|
1646
|
-
changePassword: (params) => changePassword(params, authDeps),
|
|
1647
|
-
relogin: reloginHandler,
|
|
1648
|
-
reopenWorkspace
|
|
1649
|
-
},
|
|
1650
|
-
crypto: {
|
|
1651
|
-
initSodium,
|
|
1652
|
-
generateUserKeypairs: (email, password) => generateUserKeypairs(email, password, deploymentDomain),
|
|
1653
|
-
signMessage,
|
|
1654
|
-
sealedBoxDecrypt,
|
|
1655
|
-
sealedBoxEncrypt,
|
|
1656
|
-
sealKeyForSession,
|
|
1657
|
-
deriveEncryptionKeypairFromSigning,
|
|
1658
|
-
generateRandomSigningKeypair,
|
|
1659
|
-
derivePublicKey,
|
|
1660
|
-
base64ToBytes,
|
|
1661
|
-
bytesToBase64,
|
|
1662
|
-
base64Encode,
|
|
1663
|
-
base64Decode,
|
|
1664
|
-
computeSharedSecret,
|
|
1665
|
-
encryptMessage,
|
|
1666
|
-
decryptMessage,
|
|
1667
|
-
encryptMessageWithSharedSecret,
|
|
1668
|
-
decryptMessageWithSharedSecret
|
|
1669
|
-
},
|
|
1670
|
-
storage: {
|
|
1671
|
-
getSession,
|
|
1672
|
-
saveSession
|
|
1673
|
-
}
|
|
1674
|
-
};
|
|
1673
|
+
return { fetch: fetchClient, session, relogin: reloginHandler, reopenWorkspace };
|
|
1675
1674
|
}
|
|
1676
1675
|
|
|
1677
1676
|
// src/websocket.ts
|