diff --git a/apps/desktop/src/models/native-messaging/encrypted-message-responses/encrypted-message-response.ts b/apps/desktop/src/models/native-messaging/encrypted-message-responses/message-response-data.ts similarity index 94% rename from apps/desktop/src/models/native-messaging/encrypted-message-responses/encrypted-message-response.ts rename to apps/desktop/src/models/native-messaging/encrypted-message-responses/message-response-data.ts index a0d35a7adb..6b893d0129 100644 --- a/apps/desktop/src/models/native-messaging/encrypted-message-responses/encrypted-message-response.ts +++ b/apps/desktop/src/models/native-messaging/encrypted-message-responses/message-response-data.ts @@ -6,7 +6,7 @@ import { GenerateResponse } from "./generate-response"; import { SuccessStatusResponse } from "./success-status-response"; import { UserStatusErrorResponse } from "./user-status-error-response"; -export type EncyptedMessageResponse = +export type MessageResponseData = | AccountStatusResponse[] | CannotDecryptErrorResponse | CipherResponse[] diff --git a/apps/desktop/src/models/native-messaging/index.ts b/apps/desktop/src/models/native-messaging/index.ts index 7f6701886a..fa8fba5361 100644 --- a/apps/desktop/src/models/native-messaging/index.ts +++ b/apps/desktop/src/models/native-messaging/index.ts @@ -6,7 +6,7 @@ export * from "./encrypted-message-payloads/password-generate-payload"; export * from "./encrypted-message-responses/account-status-response"; export * from "./encrypted-message-responses/cannot-decrypt-error-response"; export * from "./encrypted-message-responses/cipher-response"; -export * from "./encrypted-message-responses/encrypted-message-response"; +export * from "./encrypted-message-responses/message-response-data"; export * from "./encrypted-message-responses/failure-status-response"; export * from "./encrypted-message-responses/generate-response"; export * from "./encrypted-message-responses/success-status-response"; diff --git a/apps/desktop/src/services/encrypted-message-handler.service.ts b/apps/desktop/src/services/encrypted-message-handler.service.ts index 60a463d53f..701604a058 100644 --- a/apps/desktop/src/services/encrypted-message-handler.service.ts +++ b/apps/desktop/src/services/encrypted-message-handler.service.ts @@ -19,9 +19,9 @@ import { CredentialUpdatePayload } from "../models/native-messaging/encrypted-me import { PasswordGeneratePayload } from "../models/native-messaging/encrypted-message-payloads/password-generate-payload"; import { AccountStatusResponse } from "../models/native-messaging/encrypted-message-responses/account-status-response"; import { CipherResponse } from "../models/native-messaging/encrypted-message-responses/cipher-response"; -import { EncyptedMessageResponse } from "../models/native-messaging/encrypted-message-responses/encrypted-message-response"; import { FailureStatusResponse } from "../models/native-messaging/encrypted-message-responses/failure-status-response"; import { GenerateResponse } from "../models/native-messaging/encrypted-message-responses/generate-response"; +import { MessageResponseData } from "../models/native-messaging/encrypted-message-responses/message-response-data"; import { SuccessStatusResponse } from "../models/native-messaging/encrypted-message-responses/success-status-response"; import { UserStatusErrorResponse } from "../models/native-messaging/encrypted-message-responses/user-status-error-response"; @@ -37,9 +37,7 @@ export class EncryptedMessageHandlerService { private passwordGenerationService: PasswordGenerationServiceAbstraction ) {} - async responseDataForCommand( - commandData: DecryptedCommandData - ): Promise { + async responseDataForCommand(commandData: DecryptedCommandData): Promise { const { command, payload } = commandData; switch (command) { case "bw-status": {