mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 18:23:31 +00:00
* [PM-7162] Fix weird angular error regarding disabled component bit-select * [PM-7162] Introduce CipherFormConfigService and related types * [PM-7162] Introduce CipherFormService * [PM-7162] Introduce the Item Details section component and the CipherFormContainer interface * [PM-7162] Introduce the CipherForm component * [PM-7162] Add strongly typed QueryParams to the add-edit-v2.component * [PM-7162] Export CipherForm from Vault Lib * [PM-7162] Use the CipherForm in Browser AddEditV2 * [PM-7162] Introduce CipherForm storybook * [PM-7162] Remove VaultPopupListFilterService dependency from NewItemDropDownV2 component * [PM-7162] Add support for content projection of attachment button * [PM-7162] Fix typo * [PM-7162] Cipher form service cleanup * [PM-7162] Move readonly collection notice to bit-hint * [PM-7162] Refactor CipherFormConfig type to enforce required properties with Typescript * [PM-7162] Fix storybook after config changes * [PM-7162] Use new add-edit component for clone route
23 lines
825 B
TypeScript
23 lines
825 B
TypeScript
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
|
|
|
import { CipherFormConfig } from "./cipher-form-config.service";
|
|
|
|
/**
|
|
* Service to save the cipher using the correct endpoint(s) and encapsulating the logic for decrypting the cipher.
|
|
*
|
|
* This service should only be used internally by the CipherFormComponent.
|
|
*/
|
|
export abstract class CipherFormService {
|
|
/**
|
|
* Helper to decrypt a cipher and avoid the need to call the cipher service directly.
|
|
* (useful for mocking tests/storybook).
|
|
*/
|
|
abstract decryptCipher(cipher: Cipher): Promise<CipherView>;
|
|
|
|
/**
|
|
* Saves the new or modified cipher with the server.
|
|
*/
|
|
abstract saveCipher(cipher: CipherView, config: CipherFormConfig): Promise<CipherView>;
|
|
}
|