1 import { PassCrypto } from '@proton/pass/lib/crypto';
2 import type { ItemRevision, ItemRevisionContentsResponse } from '@proton/pass/types';
4 import { parseOpenedItem } from './item-proto.transformer';
6 export const parseItemRevision = async (
8 encryptedItem: ItemRevisionContentsResponse
9 ): Promise<ItemRevision> => {
10 const openedItem = await PassCrypto.openItem({ shareId, encryptedItem });
11 return parseOpenedItem({ openedItem, shareId });