From 5689d1ca6b7c453bffa367585ffaef3dfea28ad8 Mon Sep 17 00:00:00 2001 From: rr-bw <102181210+rr-bw@users.noreply.github.com> Date: Tue, 13 Jan 2026 13:08:35 -0800 Subject: [PATCH] [PM-27086] Changing direction: rename 'Old' methods back to original name --- ...sktop-set-initial-password.service.spec.ts | 12 ++-- .../desktop-set-initial-password.service.ts | 8 +-- .../web-set-initial-password.service.spec.ts | 14 ++--- .../web-set-initial-password.service.ts | 8 +-- ...initial-password.service.implementation.ts | 13 ++--- ...fault-set-initial-password.service.spec.ts | 56 +++++++++---------- .../set-initial-password.component.ts | 10 ++-- ...et-initial-password.service.abstraction.ts | 9 +-- 8 files changed, 62 insertions(+), 68 deletions(-) diff --git a/apps/desktop/src/app/services/set-initial-password/desktop-set-initial-password.service.spec.ts b/apps/desktop/src/app/services/set-initial-password/desktop-set-initial-password.service.spec.ts index 11d50ad1f8b..d001d410357 100644 --- a/apps/desktop/src/app/services/set-initial-password/desktop-set-initial-password.service.spec.ts +++ b/apps/desktop/src/app/services/set-initial-password/desktop-set-initial-password.service.spec.ts @@ -3,7 +3,7 @@ import { BehaviorSubject, of } from "rxjs"; import { OrganizationUserApiService } from "@bitwarden/admin-console/common"; import { - SetInitialPasswordCredentialsOld, + SetInitialPasswordCredentials, SetInitialPasswordService, SetInitialPasswordUserType, } from "@bitwarden/angular/auth/password-management/set-initial-password/set-initial-password.service.abstraction"; @@ -83,9 +83,9 @@ describe("DesktopSetInitialPasswordService", () => { /** * @deprecated To be removed in PM-28143 */ - describe("setInitialPasswordOld(...)", () => { + describe("setInitialPassword(...)", () => { // Mock function parameters - let credentials: SetInitialPasswordCredentialsOld; + let credentials: SetInitialPasswordCredentials; let userType: SetInitialPasswordUserType; let userId: UserId; @@ -157,7 +157,7 @@ describe("DesktopSetInitialPasswordService", () => { setupMocks(); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -169,11 +169,11 @@ describe("DesktopSetInitialPasswordService", () => { describe("given the initial password was NOT successfully set (due to some error in setInitialPassword())", () => { it("should NOT send a 'redrawMenu' message", async () => { // Arrange - credentials.newMasterKey = null; // will trigger an error in setInitialPasswordOld() + credentials.newMasterKey = null; // will trigger an error in setInitialPassword() setupMocks(); // Act - const promise = sut.setInitialPasswordOld(credentials, userType, userId); + const promise = sut.setInitialPassword(credentials, userType, userId); // Assert await expect(promise).rejects.toThrow(); diff --git a/apps/desktop/src/app/services/set-initial-password/desktop-set-initial-password.service.ts b/apps/desktop/src/app/services/set-initial-password/desktop-set-initial-password.service.ts index 60422c50b12..93f1c2ff85b 100644 --- a/apps/desktop/src/app/services/set-initial-password/desktop-set-initial-password.service.ts +++ b/apps/desktop/src/app/services/set-initial-password/desktop-set-initial-password.service.ts @@ -1,7 +1,7 @@ import { OrganizationUserApiService } from "@bitwarden/admin-console/common"; import { DefaultSetInitialPasswordService } from "@bitwarden/angular/auth/password-management/set-initial-password/default-set-initial-password.service.implementation"; import { - SetInitialPasswordCredentialsOld, + SetInitialPasswordCredentials, SetInitialPasswordService, SetInitialPasswordUserType, } from "@bitwarden/angular/auth/password-management/set-initial-password/set-initial-password.service.abstraction"; @@ -53,12 +53,12 @@ export class DesktopSetInitialPasswordService /** * @deprecated To be removed in PM-28143 */ - override async setInitialPasswordOld( - credentials: SetInitialPasswordCredentialsOld, + override async setInitialPassword( + credentials: SetInitialPasswordCredentials, userType: SetInitialPasswordUserType, userId: UserId, ) { - await super.setInitialPasswordOld(credentials, userType, userId); + await super.setInitialPassword(credentials, userType, userId); this.messagingService.send("redrawMenu"); } diff --git a/apps/web/src/app/auth/core/services/password-management/set-initial-password/web-set-initial-password.service.spec.ts b/apps/web/src/app/auth/core/services/password-management/set-initial-password/web-set-initial-password.service.spec.ts index 654539ac1a2..f3c3592bc58 100644 --- a/apps/web/src/app/auth/core/services/password-management/set-initial-password/web-set-initial-password.service.spec.ts +++ b/apps/web/src/app/auth/core/services/password-management/set-initial-password/web-set-initial-password.service.spec.ts @@ -3,7 +3,7 @@ import { BehaviorSubject, of } from "rxjs"; import { OrganizationUserApiService } from "@bitwarden/admin-console/common"; import { - SetInitialPasswordCredentialsOld, + SetInitialPasswordCredentials, SetInitialPasswordService, SetInitialPasswordUserType, } from "@bitwarden/angular/auth/password-management/set-initial-password/set-initial-password.service.abstraction"; @@ -87,9 +87,9 @@ describe("WebSetInitialPasswordService", () => { /** * @deprecated To be removed in PM-28143 */ - describe("setInitialPasswordOld(...)", () => { + describe("setInitialPassword(...)", () => { // Mock function parameters - let credentials: SetInitialPasswordCredentialsOld; + let credentials: SetInitialPasswordCredentials; let userType: SetInitialPasswordUserType; let userId: UserId; @@ -161,7 +161,7 @@ describe("WebSetInitialPasswordService", () => { setupMocks(); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -173,7 +173,7 @@ describe("WebSetInitialPasswordService", () => { setupMocks(); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -188,7 +188,7 @@ describe("WebSetInitialPasswordService", () => { setupMocks(); // Act - const promise = sut.setInitialPasswordOld(credentials, userType, userId); + const promise = sut.setInitialPassword(credentials, userType, userId); // Assert await expect(promise).rejects.toThrow(); @@ -202,7 +202,7 @@ describe("WebSetInitialPasswordService", () => { setupMocks(); // Act - const promise = sut.setInitialPasswordOld(credentials, userType, userId); + const promise = sut.setInitialPassword(credentials, userType, userId); // Assert await expect(promise).rejects.toThrow(); diff --git a/apps/web/src/app/auth/core/services/password-management/set-initial-password/web-set-initial-password.service.ts b/apps/web/src/app/auth/core/services/password-management/set-initial-password/web-set-initial-password.service.ts index 8ae1c0cfaea..4f0971954a0 100644 --- a/apps/web/src/app/auth/core/services/password-management/set-initial-password/web-set-initial-password.service.ts +++ b/apps/web/src/app/auth/core/services/password-management/set-initial-password/web-set-initial-password.service.ts @@ -1,7 +1,7 @@ import { OrganizationUserApiService } from "@bitwarden/admin-console/common"; import { DefaultSetInitialPasswordService } from "@bitwarden/angular/auth/password-management/set-initial-password/default-set-initial-password.service.implementation"; import { - SetInitialPasswordCredentialsOld, + SetInitialPasswordCredentials, SetInitialPasswordService, SetInitialPasswordUserType, } from "@bitwarden/angular/auth/password-management/set-initial-password/set-initial-password.service.abstraction"; @@ -55,12 +55,12 @@ export class WebSetInitialPasswordService /** * @deprecated To be removed in PM-28143 */ - override async setInitialPasswordOld( - credentials: SetInitialPasswordCredentialsOld, + override async setInitialPassword( + credentials: SetInitialPasswordCredentials, userType: SetInitialPasswordUserType, userId: UserId, ) { - await super.setInitialPasswordOld(credentials, userType, userId); + await super.setInitialPassword(credentials, userType, userId); /** * TODO: Investigate refactoring the following logic in https://bitwarden.atlassian.net/browse/PM-22615 diff --git a/libs/angular/src/auth/password-management/set-initial-password/default-set-initial-password.service.implementation.ts b/libs/angular/src/auth/password-management/set-initial-password/default-set-initial-password.service.implementation.ts index 91576e6992f..badf777d01c 100644 --- a/libs/angular/src/auth/password-management/set-initial-password/default-set-initial-password.service.implementation.ts +++ b/libs/angular/src/auth/password-management/set-initial-password/default-set-initial-password.service.implementation.ts @@ -29,7 +29,7 @@ import { KdfConfigService, KeyService, KdfConfig } from "@bitwarden/key-manageme import { SetInitialPasswordService, - SetInitialPasswordCredentialsOld, + SetInitialPasswordCredentials, SetInitialPasswordUserType, SetInitialPasswordTdeOffboardingCredentials, } from "./set-initial-password.service.abstraction"; @@ -52,8 +52,8 @@ export class DefaultSetInitialPasswordService implements SetInitialPasswordServi /** * @deprecated To be removed in PM-28143 */ - async setInitialPasswordOld( - credentials: SetInitialPasswordCredentialsOld, + async setInitialPassword( + credentials: SetInitialPasswordCredentials, userType: SetInitialPasswordUserType, userId: UserId, ): Promise { @@ -154,7 +154,7 @@ export class DefaultSetInitialPasswordService implements SetInitialPasswordServi await this.masterPasswordService.setForceSetPasswordReason(ForceSetPasswordReason.None, userId); // User now has a password so update account decryption options in state - await this.updateAccountDecryptionPropertiesOld( + await this.updateAccountDecryptionProperties( newMasterKey, kdfConfig, masterKeyEncryptedUserKey, @@ -225,10 +225,7 @@ export class DefaultSetInitialPasswordService implements SetInitialPasswordServi return masterKeyEncryptedUserKey; } - /** - * @deprecated To be removed in PM-28143 - */ - private async updateAccountDecryptionPropertiesOld( + private async updateAccountDecryptionProperties( masterKey: MasterKey, kdfConfig: KdfConfig, masterKeyEncryptedUserKey: [UserKey, EncString], diff --git a/libs/angular/src/auth/password-management/set-initial-password/default-set-initial-password.service.spec.ts b/libs/angular/src/auth/password-management/set-initial-password/default-set-initial-password.service.spec.ts index 14f547f5c22..022b85941a4 100644 --- a/libs/angular/src/auth/password-management/set-initial-password/default-set-initial-password.service.spec.ts +++ b/libs/angular/src/auth/password-management/set-initial-password/default-set-initial-password.service.spec.ts @@ -38,7 +38,7 @@ import { DEFAULT_KDF_CONFIG, KdfConfigService, KeyService } from "@bitwarden/key import { DefaultSetInitialPasswordService } from "./default-set-initial-password.service.implementation"; import { - SetInitialPasswordCredentialsOld, + SetInitialPasswordCredentials, SetInitialPasswordService, SetInitialPasswordTdeOffboardingCredentials, SetInitialPasswordUserType, @@ -104,9 +104,9 @@ describe("DefaultSetInitialPasswordService", () => { /** * @deprecated To be removed in PM-28143 */ - describe("setInitialPasswordOld(...)", () => { + describe("setInitialPassword(...)", () => { // Mock function parameters - let credentials: SetInitialPasswordCredentialsOld; + let credentials: SetInitialPasswordCredentials; let userType: SetInitialPasswordUserType; // Mock other function data @@ -236,13 +236,13 @@ describe("DefaultSetInitialPasswordService", () => { ].forEach((key) => { it(`should throw if ${key} is not provided on the SetInitialPasswordCredentials object`, async () => { // Arrange - const invalidCredentials: SetInitialPasswordCredentialsOld = { + const invalidCredentials: SetInitialPasswordCredentials = { ...credentials, [key]: null, }; // Act - const promise = sut.setInitialPasswordOld(invalidCredentials, userType, userId); + const promise = sut.setInitialPassword(invalidCredentials, userType, userId); // Assert await expect(promise).rejects.toThrow(`${key} not found. Could not set password.`); @@ -252,7 +252,7 @@ describe("DefaultSetInitialPasswordService", () => { ["userId", "userType"].forEach((param) => { it(`should throw if ${param} was not passed in`, async () => { // Arrange & Act - const promise = sut.setInitialPasswordOld( + const promise = sut.setInitialPassword( credentials, param === "userType" ? null : userType, param === "userId" ? null : userId, @@ -280,7 +280,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks({ ...defaultMockConfig, userHasLocalKeyPair: true }); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -300,7 +300,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks(); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -313,7 +313,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks({ ...defaultMockConfig, userHasUserKey: false }); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -327,7 +327,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks(); // Act - const promise = sut.setInitialPasswordOld(credentials, userType, userId); + const promise = sut.setInitialPassword(credentials, userType, userId); // Assert await expect(promise).rejects.toThrow("keyPair not found. Could not set password."); @@ -341,7 +341,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks(); // Act - const promise = sut.setInitialPasswordOld(credentials, userType, userId); + const promise = sut.setInitialPassword(credentials, userType, userId); // Assert await expect(promise).rejects.toThrow( @@ -356,7 +356,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks(); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -375,7 +375,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks(); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -396,7 +396,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks(); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -418,7 +418,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks(); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -466,7 +466,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks({ ...defaultMockConfig, resetPasswordAutoEnroll: true }); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -483,7 +483,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks({ ...defaultMockConfig, resetPasswordAutoEnroll: true }); // Act - const promise = sut.setInitialPasswordOld(credentials, userType, userId); + const promise = sut.setInitialPassword(credentials, userType, userId); // Assert await expect(promise).rejects.toThrow( @@ -510,7 +510,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks({ ...defaultMockConfig, resetPasswordAutoEnroll: true }); // Act - const promise = sut.setInitialPasswordOld(credentials, userType, userId); + const promise = sut.setInitialPassword(credentials, userType, userId); // Assert await expect(promise).rejects.toThrow( @@ -535,7 +535,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks(); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -558,7 +558,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks({ ...defaultMockConfig, userType }); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(keyService.userPrivateKey$).not.toHaveBeenCalled(); @@ -573,7 +573,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks({ ...defaultMockConfig, userType }); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -586,7 +586,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks({ ...defaultMockConfig, userType }); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -599,7 +599,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks({ ...defaultMockConfig, userType }); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -614,7 +614,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks({ ...defaultMockConfig, userType }); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -639,7 +639,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks({ ...defaultMockConfig, userType }); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -651,7 +651,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks({ ...defaultMockConfig, userType }); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -699,7 +699,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks({ ...defaultMockConfig, userType, resetPasswordAutoEnroll: true }); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); @@ -715,7 +715,7 @@ describe("DefaultSetInitialPasswordService", () => { setupMocks({ ...defaultMockConfig, userType }); // Act - await sut.setInitialPasswordOld(credentials, userType, userId); + await sut.setInitialPassword(credentials, userType, userId); // Assert expect(masterPasswordApiService.setPassword).toHaveBeenCalledWith(setPasswordRequest); diff --git a/libs/angular/src/auth/password-management/set-initial-password/set-initial-password.component.ts b/libs/angular/src/auth/password-management/set-initial-password/set-initial-password.component.ts index 48934d6c679..f50972138b4 100644 --- a/libs/angular/src/auth/password-management/set-initial-password/set-initial-password.component.ts +++ b/libs/angular/src/auth/password-management/set-initial-password/set-initial-password.component.ts @@ -39,7 +39,7 @@ import { import { I18nPipe } from "@bitwarden/ui-common"; import { - SetInitialPasswordCredentialsOld, + SetInitialPasswordCredentials, SetInitialPasswordService, SetInitialPasswordTdeOffboardingCredentials, SetInitialPasswordUserType, @@ -195,7 +195,7 @@ export class SetInitialPasswordComponent implements OnInit { switch (this.userType) { case SetInitialPasswordUserType.JIT_PROVISIONED_MP_ORG_USER: case SetInitialPasswordUserType.TDE_ORG_USER_RESET_PASSWORD_PERMISSION_REQUIRES_MP: - await this.setInitialPasswordOld(passwordInputResult); // remove in PM-28143 + await this.setInitialPassword(passwordInputResult); break; case SetInitialPasswordUserType.OFFBOARDED_TDE_ORG_USER: await this.setInitialPasswordTdeOffboarding(passwordInputResult); @@ -211,7 +211,7 @@ export class SetInitialPasswordComponent implements OnInit { /** * @deprecated To be removed in PM-28143 */ - private async setInitialPasswordOld(passwordInputResult: PasswordInputResult) { + private async setInitialPassword(passwordInputResult: PasswordInputResult) { const ctx = "Could not set initial password."; assertTruthy(passwordInputResult.newMasterKey, "newMasterKey", ctx); assertTruthy(passwordInputResult.newServerMasterKeyHash, "newServerMasterKeyHash", ctx); @@ -227,7 +227,7 @@ export class SetInitialPasswordComponent implements OnInit { assertNonNullish(this.resetPasswordAutoEnroll, "resetPasswordAutoEnroll", ctx); // can have `false` as a valid value, so check non-nullish try { - const credentials: SetInitialPasswordCredentialsOld = { + const credentials: SetInitialPasswordCredentials = { newMasterKey: passwordInputResult.newMasterKey, newServerMasterKeyHash: passwordInputResult.newServerMasterKeyHash, newLocalMasterKeyHash: passwordInputResult.newLocalMasterKeyHash, @@ -240,7 +240,7 @@ export class SetInitialPasswordComponent implements OnInit { salt: passwordInputResult.salt, }; - await this.setInitialPasswordService.setInitialPasswordOld( + await this.setInitialPasswordService.setInitialPassword( credentials, this.userType, this.userId, diff --git a/libs/angular/src/auth/password-management/set-initial-password/set-initial-password.service.abstraction.ts b/libs/angular/src/auth/password-management/set-initial-password/set-initial-password.service.abstraction.ts index 2d41fc8deb4..560af93a96c 100644 --- a/libs/angular/src/auth/password-management/set-initial-password/set-initial-password.service.abstraction.ts +++ b/libs/angular/src/auth/password-management/set-initial-password/set-initial-password.service.abstraction.ts @@ -42,10 +42,7 @@ export const SetInitialPasswordUserType: Readonly<{ [K in keyof typeof _SetInitialPasswordUserType]: SetInitialPasswordUserType; }> = Object.freeze(_SetInitialPasswordUserType); -/** - * @deprecated To be removed in PM-28143 - */ -export interface SetInitialPasswordCredentialsOld { +export interface SetInitialPasswordCredentials { newMasterKey: MasterKey; newServerMasterKeyHash: string; newLocalMasterKeyHash: string; @@ -82,8 +79,8 @@ export abstract class SetInitialPasswordService { * @throws If any property on the `credentials` object is null or undefined, or if a * masterKeyEncryptedUserKey or newKeyPair could not be created. */ - abstract setInitialPasswordOld: ( - credentials: SetInitialPasswordCredentialsOld, + abstract setInitialPassword: ( + credentials: SetInitialPasswordCredentials, userType: SetInitialPasswordUserType, userId: UserId, ) => Promise;