'use strict' ; import { DecryptError , VerifyRes } from './crypto/pgp/msg-util.js' ; import { AttachmentMeta } from './attachment.js' ; import { Buf } from './buf.js' ; export type KeyBlockType = 'publicKey' | 'privateKey' | 'certificate' | 'pkcs12' | 'pkcs8EncryptedPrivateKey' | 'pkcs8PrivateKey' | 'pkcs8RsaPrivateKey' ; export type ReplaceableMsgBlockType = KeyBlockType | 'signedMsg' | 'encryptedMsg' | 'pkcs7' ; export type MsgBlockType = ReplaceableMsgBlockType | 'plainText' | 'signedText' | 'plainHtml' | 'decryptedHtml' | 'plainAttachment' | 'encryptedAttachment' | 'decryptedAttachment' | 'encryptedAttachmentLink' | 'decryptErr' | 'verifiedMsg' | 'signedHtml' ; export class MsgBlock { public static fromContent = ( type , content , missingEnd = false ) : MsgBlock => { return new MsgBlock ( type , content , ! missingEnd ) ; } ; public static fromAttachment = ( type , content , attachmentMeta ) : MsgBlock => { return new MsgBlock ( type , content , true , undefined , attachmentMeta ) ; } ; constructor ( public type , public content , public complete , public signature ? , public attachmentMeta ? , public decryptErr ? , public verifyRes ? ) { } }