@arbidocs/sdk 0.4.85 → 0.4.86

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.
@@ -1,4 +1,3 @@
1
- import * as _arbidocs_client from '@arbidocs/client';
2
1
  import { SessionStorageProvider, ArbiClient, LoginResult, components, WebSocketServerMessage, WsAuthResultMessage, WsTaskUpdateMessage, KeyPair, LoginProfile } from '@arbidocs/client';
3
2
 
4
3
  /**
@@ -5450,14 +5449,14 @@ declare class Arbi {
5450
5449
  email: string;
5451
5450
  }>;
5452
5451
  /**
5453
- * Change (or, after recovery, set) the master password: re-keys the workspaces and direct
5454
- * messages. Omit `currentPassword` in recovery mode. Resolves with the new signing key, whose
5455
- * recovery file the user should save.
5452
+ * Change (or, after recovery, set) the master password. Omit `currentPassword` in recovery
5453
+ * mode. One request: the account identity is re-wrapped under the new password and nothing is
5454
+ * re-encrypted, so the session, the workspace keys and the recovery key all stay as they are.
5456
5455
  */
5457
5456
  changePassword: (params: {
5458
5457
  newPassword: string;
5459
5458
  currentPassword?: string;
5460
- }) => Promise<_arbidocs_client.RekeyedPasswordChangeResult>;
5459
+ }) => Promise<void>;
5461
5460
  /** Close the account (soft delete) and sign out. Refused while a subscription is active. */
5462
5461
  requestDeletion: () => Promise<{
5463
5462
  detail: string;
@@ -1,4 +1,3 @@
1
- import * as _arbidocs_client from '@arbidocs/client';
2
1
  import { SessionStorageProvider, ArbiClient, LoginResult, components, WebSocketServerMessage, WsAuthResultMessage, WsTaskUpdateMessage, KeyPair, LoginProfile } from '@arbidocs/client';
3
2
 
4
3
  /**
@@ -5450,14 +5449,14 @@ declare class Arbi {
5450
5449
  email: string;
5451
5450
  }>;
5452
5451
  /**
5453
- * Change (or, after recovery, set) the master password: re-keys the workspaces and direct
5454
- * messages. Omit `currentPassword` in recovery mode. Resolves with the new signing key, whose
5455
- * recovery file the user should save.
5452
+ * Change (or, after recovery, set) the master password. Omit `currentPassword` in recovery
5453
+ * mode. One request: the account identity is re-wrapped under the new password and nothing is
5454
+ * re-encrypted, so the session, the workspace keys and the recovery key all stay as they are.
5456
5455
  */
5457
5456
  changePassword: (params: {
5458
5457
  newPassword: string;
5459
5458
  currentPassword?: string;
5460
- }) => Promise<_arbidocs_client.RekeyedPasswordChangeResult>;
5459
+ }) => Promise<void>;
5461
5460
  /** Close the account (soft delete) and sign out. Refused while a subscription is active. */
5462
5461
  requestDeletion: () => Promise<{
5463
5462
  detail: string;
package/dist/browser.cjs CHANGED
@@ -7575,25 +7575,22 @@ var Arbi = class {
7575
7575
  return result;
7576
7576
  },
7577
7577
  /**
7578
- * Change (or, after recovery, set) the master password: re-keys the workspaces and direct
7579
- * messages. Omit `currentPassword` in recovery mode. Resolves with the new signing key, whose
7580
- * recovery file the user should save.
7578
+ * Change (or, after recovery, set) the master password. Omit `currentPassword` in recovery
7579
+ * mode. One request: the account identity is re-wrapped under the new password and nothing is
7580
+ * re-encrypted, so the session, the workspace keys and the recovery key all stay as they are.
7581
7581
  */
7582
7582
  changePassword: async (params) => {
7583
7583
  const client$1 = this.requireClient();
7584
7584
  const lr2 = this.requireLogin();
7585
7585
  const email = client$1.session.getState().userEmail ?? this.userProfile?.email;
7586
7586
  if (!email) throw new ArbiError("The account email is unknown; sign in again.");
7587
- const result = await client.changePasswordWithRekey(
7588
- { ...params, email, userExtId: lr2.userExtId },
7587
+ await client.changePassword(
7588
+ { ...params, email, identitySecretKey: lr2.signingPrivateKey },
7589
7589
  {
7590
7590
  fetchClient: client$1.fetch,
7591
7591
  deploymentDomain: this.getDeploymentDomain()
7592
7592
  }
7593
7593
  );
7594
- this.loginResult = { ...lr2, signingPrivateKey: result.newSigningPrivateKey };
7595
- this.wrappedKeys.clear();
7596
- return result;
7597
7594
  },
7598
7595
  /** Close the account (soft delete) and sign out. Refused while a subscription is active. */
7599
7596
  requestDeletion: async () => {