Skip to content

Latest commit

 

History

History
1291 lines (873 loc) · 66.7 KB

File metadata and controls

1291 lines (873 loc) · 66.7 KB

Classes

AS2Agreement

Class for describing and handling partner agreements.

AS2Composer

Class for composing AS2 messages.

AS2Crypto

Class for cryptography methods supported by AS2.

PemFile

Method for constructing an object from PEM data.

AS2Disposition

Class for describing and constructing a Message Disposition Notification.

AS2DispositionNotification

Class for dealing with disposition notification headers.

AS2MimeNode

Class for describing and constructing a MIME document.

AS2Parser

Class for parsing a MIME document to an AS2MimeNode tree.

Objects

PEM_FILETYPE : object

Constants used in libas2.

AS2Constants : object

Constants used in libas2.

Functions

getReportNode(node)AS2MimeNode

Get the multipart/report disposition-notification, if any.

isMdn(node)boolean

Answers if the AS2MimeNode is a Message Disposition Notification.

parseHeaderString(headers, [keyToLowerCase], [callback])object

Method for converting a string of headers into key:value pairs.

getProtocol(url)string

Method for retrieving the protocol of a URL, dynamically.

isNullOrUndefined(value)boolean

Convenience method for null-checks.

isSMime(value)boolean

Determine if a given string is one of PKCS7 MIME types.

canonicalTransform(node)

Transforms a payload into a canonical text format per RFC 5751 section 3.1.1.

getSigningOptions(sign)SigningOptions

Normalizes certificate signing options.

getEncryptionOptions(encrypt)EncryptionOptions

Normalizes encryption options.

getAgreementOptions(agreement)AS2Agreement

Normalizes agreement options.

request(options)IncomingMessage

Convenience method for making AS2 HTTP/S requests. Makes a POST request by default.

Typedefs

AS2ComposerOptions : object

Options for composing an AS2 message.

AgreementOptions : object

Options for composing an AS2 message.

AS2Signing : 'sha-1' | 'sha-256' | 'sha-384' | 'sha-512'

List of supported signing algorithms.

AS2Encryption : 'des-EDE3-CBC' | 'aes128-CBC' | 'aes192-CBC' | 'aes256-CBC' | 'aes128-GCM' | 'aes192-GCM' | 'aes256-GCM'

List of supported encryption algorithms.

EncryptionOptions : object

Options for encrypting payloads.

DecryptionOptions : object

Options for decrypting payloads.

SigningOptions : object

Options for decrypting payloads.

VerificationOptions : object

Options for decrypting payloads.

AS2DispositionOptions : object

Options for composing a message disposition notification (MDN).

OutgoingDispositionOptions : object

Options for generating an outgoing MDN.

ParseOptions : object

Options for parsing a MIME document; useful if there is no access to the underlying raw response.

AS2Agreement

Class for describing and handling partner agreements.

Kind: global class
Implements: AgreementOptions

new AS2Agreement(agreement)

Param Type Description
agreement AgreementOptions

The partner agreement for sending and receiving over AS2.

AS2Composer

Class for composing AS2 messages.

Kind: global class

new AS2Composer(options)

Param Type Description
options AS2ComposerOptions

The options for composing AS2 messages.

aS2Composer.setAgreement(agreement)

Set the agreement for this composer instance.

Kind: instance method of AS2Composer

Param Type
agreement AgreementOptions

aS2Composer.compile() ⇒ Promise.<AS2MimeNode>

Compile the composed message into an instance of AS2MimeNode.

Kind: instance method of AS2Composer
Returns: Promise.<AS2MimeNode> -

This composer instance as an AS2MimeNode.


aS2Composer.toRequestOptions([url]) ⇒ Promise.<RequestOptions>

Create a Node.js-compatible RequestOptions object from the composed message.

Kind: instance method of AS2Composer
Returns: Promise.<RequestOptions> -

This composer instance as request options for Node.js.

Param Type Description
[url] string

Optional: The URL of the AS2 endpoint receiving this AS2 message; will use agreement partner url if not provided.

AS2Crypto

Class for cryptography methods supported by AS2.

Kind: global class

AS2Crypto.generateUniqueId() ⇒ string

Crux to generate UUID-like random strings

Kind: static method of AS2Crypto
Returns: string -

A UUID-like random string.


AS2Crypto.decrypt(node, options) ⇒ Promise.<AS2MimeNode>

Method to decrypt an AS2MimeNode from a PKCS7 encrypted AS2MimeNode.

Kind: static method of AS2Crypto
Returns: Promise.<AS2MimeNode> -

The decrypted MIME as an AS2MimeNode.

Param Type Description
node AS2MimeNode

The AS2MimeNode to decrypt.

options DecryptionOptions

Options to decrypt the MIME message.

AS2Crypto.encrypt(node, options) ⇒ Promise.<AS2MimeNode>

Method to envelope an AS2MimeNode in an encrypted AS2MimeNode.

Kind: static method of AS2Crypto
Returns: Promise.<AS2MimeNode> -

The encrypted MIME as an AS2MimeNode.

Param Type Description
node AS2MimeNode

The AS2MimeNode to encrypt.

options EncryptionOptions

Options to encrypt the MIME message.

AS2Crypto.verify(node, options, [getDigest]) ⇒ Promise.<(boolean|object)>

Method to verify data has not been modified from a signature.

Kind: static method of AS2Crypto
Returns: Promise.<(boolean|object)> -

A boolean or digest object indicating if the message was verified.

Param Type Description
node AS2MimeNode

The AS2MimeNode to verify.

options VerificationOptions

Options to verify the MIME message.

[getDigest] boolean

Optional argument to return a message digest if verified instead of a boolean.

AS2Crypto.sign(node, options) ⇒ Promise.<AS2MimeNode>

Method to sign data against a certificate and key pair.

Kind: static method of AS2Crypto
Returns: Promise.<AS2MimeNode> -

The signed MIME as a multipart AS2MimeNode.

Param Type Description
node AS2MimeNode

The AS2MimeNode to sign.

options EncryptionOptions

Options to sign the MIME message.

AS2Crypto.compress()

Not yet implemented; do not use.

Kind: static method of AS2Crypto
Throws:

  • ERROR.NOT_IMPLEMENTED

AS2Crypto.decompress()

Not yet implemented; do not use.

Kind: static method of AS2Crypto
Throws:

  • ERROR.NOT_IMPLEMENTED

PemFile

Method for constructing an object from PEM data.

Kind: global class

new PemFile(data)

Param Type Description
data string | Buffer | PemFile

Data for constructing a PemFile object.

PemFile.fromDer(data, [type]) ⇒ PemFile

Convenience method for creating a PemFile from a DER/BER Buffer.

Kind: static method of PemFile
Returns: PemFile -

The data as a PemFile object.

Param Type Default Description
data Buffer

DER or BER data in a Buffer.

[type] PemFileType 'UNKNOWN'

The type of PEM file.

AS2Disposition

Class for describing and constructing a Message Disposition Notification.

Kind: global class

aS2Disposition.toMimeNode() ⇒ AS2MimeNode

This instance to an AS2MimeNode.

Kind: instance method of AS2Disposition
Returns: AS2MimeNode -

  • An MDN as an AS2MimeNode.

AS2Disposition.outgoing(options) ⇒ Promise.<object>

Convenience method to decrypt and/or verify a mime node and construct an outgoing message disposition.

Kind: static method of AS2Disposition
Returns: Promise.<object> -

  • The content node, disposition object, and the generated outgoing MDN as an AS2MimeNode.
Param Type Description
options OutgoingDispositionOptions

The options for generating an outgoing MDN.

AS2Disposition.incoming(node, [signed]) ⇒ Promise.<AS2Disposition>

Deconstruct a mime node into an incoming message disposition.

Kind: static method of AS2Disposition
Returns: Promise.<AS2Disposition> -

The incoming message disposition notification.

Param Type Description
node AS2MimeNode

An AS2MimeNode containing an incoming MDN.

[signed] VerificationOptions

Options for verifying the MDN if necessary.

AS2DispositionNotification

Class for dealing with disposition notification headers.

Kind: global class

new AS2DispositionNotification([notification], [notificationType])

Param Type Default Description
[notification] AS2DispositionNotification

A raw instance of AS2DispositionNotification.

[notificationType] 'incoming' | 'outgoing' 'outgoing'

The type of notification; default is 'outgoing'.

aS2DispositionNotification.toNotification() ⇒ object

Converts this instance to a plain key/value-pair object.

Kind: instance method of AS2DispositionNotification
Returns: object -

This instance as key/value pairs.


aS2DispositionNotification.toString() ⇒ string

This instance to a string.

Kind: instance method of AS2DispositionNotification
Returns: string -

a raw string instance.


AS2MimeNode

Class for describing and constructing a MIME document.

Kind: global class

new AS2MimeNode(options)

Param Type Description
options AS2MimeNodeOptions

Options for constructing an AS2 message.

aS2MimeNode.setSigning(options)

Set the signing options for this instance.

Kind: instance method of AS2MimeNode

Param Type Description
options SigningOptions

Options for signing this AS2 message.

aS2MimeNode.setEncryption(options)

Set the encryption options for this instance.

Kind: instance method of AS2MimeNode

Param Type Description
options EncryptionOptions

Options for encrypting this AS2 message.

aS2MimeNode.setHeader(keyOrHeaders, [value]) ⇒ AS2MimeNode

Set one or more headers on this instance.

Kind: instance method of AS2MimeNode
Returns: AS2MimeNode -

This AS2MimeNode instance.

Param Type Description
keyOrHeaders string | any

The key name of the header to set or an array of headers.

[value] string

The value of the header key; required if providing a simple key/value.

aS2MimeNode.messageId([create]) ⇒ string

Sets and/or gets the message ID of the MIME message.

Kind: instance method of AS2MimeNode
Returns: string -

The message ID of the MIME.

Param Type Default Description
[create] boolean false

Set the the message ID if one does not exist.

aS2MimeNode.dispositionOut([options]) ⇒ Promise.<object>

Convenience method for generating an outgoing MDN for this message.

Kind: instance method of AS2MimeNode
Returns: Promise.<object> -

The content node and the outgoing MDN as an AS2MimeNode.

Param Type Description
[options] DispositionOutOptions

Optional options for generating an MDN.

aS2MimeNode.dispositionIn([signed]) ⇒ Promise.<AS2Disposition>

Convenience method for consuming this instance as an incoming MDN.

Kind: instance method of AS2MimeNode
Returns: Promise.<AS2Disposition> -

This instance as an incoming AS2Disposition.

Param Type Description
[signed] VerificationOptions

Pass verification options for a signed MDN.

aS2MimeNode.sign([options]) ⇒ Promise.<AS2MimeNode>

Convenience method for signing this instance.

Kind: instance method of AS2MimeNode
Returns: Promise.<AS2MimeNode> -

This instance as a new signed multipart AS2MimeNode.

Param Type Description
[options] SigningOptions

Options for signing this AS2 message; not required if provided when constructing this instance.

aS2MimeNode.verify(options) ⇒ Promise.<AS2MimeNode>

Convenience method for verifying this instance.

Kind: instance method of AS2MimeNode
Returns: Promise.<AS2MimeNode> -

The content part of this signed message as an AS2MimeNode.

Param Type Description
options VerificationOptions

Options for verifying this signed AS2 message.

aS2MimeNode.decrypt(options) ⇒ Promise.<AS2MimeNode>

Convenience method for decrypting this instance.

Kind: instance method of AS2MimeNode
Returns: Promise.<AS2MimeNode> -

The contents of the encrypted message as an AS2MimeNode.

Param Type Description
options DecryptionOptions

Options for decrypting this encrypted AS2 message.

aS2MimeNode.encrypt([options]) ⇒ Promise.<AS2MimeNode>

Convenience method for encrypting this instance.

Kind: instance method of AS2MimeNode
Returns: Promise.<AS2MimeNode> -

This instance as a new encrypted AS2MimeNode.

Param Type Description
[options] EncryptionOptions

Options for encrypting this AS2 message; not required if provided when constructing this instance.

aS2MimeNode.build() ⇒ Promise.<Buffer>

Constructs a complete S/MIME or MIME buffer from this instance.

Kind: instance method of AS2MimeNode
Returns: Promise.<Buffer> -

This instance as raw, complete S/MIME or MIME buffer.


aS2MimeNode.buildObject() ⇒ Promise.<object>

Method for getting the headers and body of the MIME message as separate properties.

Kind: instance method of AS2MimeNode
Returns: Promise.<object> -

An object with headers and body properties.


AS2MimeNode.generateMessageId([sender], [uniqueId]) ⇒ string

Generates a valid, formatted, random message ID.

Kind: static method of AS2MimeNode
Returns: string -

A valid message ID for use with MIME.

Param Type Default Description
[sender] string "'<HOST_NAME>'"

The sender of this ID.

[uniqueId] string

A unique ID may be provided if a real GUID is required.

AS2Parser

Class for parsing a MIME document to an AS2MimeNode tree.

Kind: global class

AS2Parser.parse(content) ⇒ Promise.<AS2MimeNode>

Parse a raw MIME document into an AS2MimeNode.

Kind: static method of AS2Parser
Returns: Promise.<AS2MimeNode> -

The MIME document as an AS2MimeNode.

Param Type Description
content Buffer | Stream | string | ParseOptions

A raw MIME message or ParseOptions object.

PEM_FILETYPE : object

Constants used in libas2.

Kind: global namespace

PEM_FILETYPE.CERTIFICATE : PemFileType

Kind: static constant of PEM_FILETYPE
Default: CERTIFICATE

PEM_FILETYPE.PRIVATE_KEY : PemFileType

Kind: static constant of PEM_FILETYPE
Default: PRIVATE_KEY

PEM_FILETYPE.PUBLIC_KEY : PemFileType

Kind: static constant of PEM_FILETYPE
Default: PUBLIC_KEY

AS2Constants : object

Constants used in libas2.

Kind: global namespace

AS2Constants.ENCRYPTION : object

Constants used for signing.

Kind: static namespace of AS2Constants

ENCRYPTION.AES128_CBC : AS2Encryption

Kind: static constant of ENCRYPTION
Default: aes128-CBC

ENCRYPTION.AES192_CBC : AS2Encryption

Kind: static constant of ENCRYPTION
Default: aes192-CBC

ENCRYPTION.AES256_CBC : AS2Encryption

Kind: static constant of ENCRYPTION
Default: aes256-CBC

ENCRYPTION.AES128_GCM : AS2Encryption

Kind: static constant of ENCRYPTION
Default: aes128-GCM

ENCRYPTION.AES192_GCM : AS2Encryption

Kind: static constant of ENCRYPTION
Default: aes192-GCM

ENCRYPTION.AES256_GCM : AS2Encryption

Kind: static constant of ENCRYPTION
Default: aes256-GCM

AS2Constants.ERROR : object

Constants used for signing.

Kind: static namespace of AS2Constants

ERROR.MISSING_PARTNER_CERT : string

Kind: static constant of ERROR
Default: "Certificate is required for this partner agreement."

ERROR.MISSING_PARTNER_KEY : string

Kind: static constant of ERROR
Default: "Private key is required for this partner agreement."

ERROR.WRONG_PEM_FILE : string

Kind: static constant of ERROR
Default: "The type of pem file provided was not correct;"

ERROR.FINAL_RECIPIENT_MISSING : string

Kind: static constant of ERROR
Default: "AS2 message is missing the AS2-To header, so there is no final recipient which is required."

ERROR.CONTENT_VERIFY : string

Kind: static constant of ERROR
Default: "Could not verify signature against contents."

ERROR.CERT_DECRYPT : string

Kind: static constant of ERROR
Default: "Certificate provided was not used to encrypt message."

ERROR.DISPOSITION_NODE : string

Kind: static constant of ERROR
Default: "Mime node must be provided in order to create outgoing disposition."

ERROR.NOT_IMPLEMENTED : string

Kind: static constant of ERROR
Default: "NOT YET IMPLEMENTED!"

AS2Constants.EXPLANATION : object

Constants used for signing.

Kind: static namespace of AS2Constants

EXPLANATION.SUCCESS : string

Kind: static constant of EXPLANATION
Default: "The message was received successfully. This is no guarantee that the message contents have been processed."

EXPLANATION.FAILED_DECRYPTION : string

Kind: static constant of EXPLANATION
Default: "The message was received, but could not be decrypted; the contents cannot be processed."

EXPLANATION.FAILED_VERIFICATION : string

Kind: static constant of EXPLANATION
Default: "The message was received, but could not be verified; the contents cannot be trusted to be the same contents that were sent."

EXPLANATION.FAILED_GENERALLY : string

Kind: static constant of EXPLANATION
Default: "The message could not be received or processed."

AS2Constants.SIGNING : object

Constants used for signing.

Kind: static namespace of AS2Constants

SIGNING.SHA1 : AS2Signing

Kind: static constant of SIGNING
Default: sha-1

SIGNING.SHA256 : AS2Signing

Kind: static constant of SIGNING
Default: sha-256

SIGNING.SHA384 : AS2Signing

Kind: static constant of SIGNING
Default: sha-384

SIGNING.SHA512 : AS2Signing

Kind: static constant of SIGNING
Default: sha-512

AS2Constants.STANDARD_HEADER : object

Constants used for signing.

Kind: static namespace of AS2Constants

STANDARD_HEADER.VERSION : string

Kind: static constant of STANDARD_HEADER
Default: "AS2-Version"

STANDARD_HEADER.TO : string

Kind: static constant of STANDARD_HEADER
Default: "AS2-To"

STANDARD_HEADER.FROM : string

Kind: static constant of STANDARD_HEADER
Default: "AS2-From"

STANDARD_HEADER.MDN_TO : string

Kind: static constant of STANDARD_HEADER
Default: "Disposition-Notification-To"

STANDARD_HEADER.MDN_OPTIONS : string

Kind: static constant of STANDARD_HEADER
Default: "Disposition-Notification-Options"

STANDARD_HEADER.MDN_URL : string

Kind: static constant of STANDARD_HEADER
Default: "Receipt-Delivery-Option"

AS2Constants.CRLF : string

Kind: static constant of AS2Constants
Default: "\r\n"

AS2Constants.MIME_VERSION : string

Kind: static constant of AS2Constants
Default: "1.0"

AS2Constants.AS2_VERSION : string

Kind: static constant of AS2Constants
Default: "1.0"

AS2Constants.SMIME_DESC : string

Kind: static constant of AS2Constants
Default: "This is an S/MIME signed message"

AS2Constants.SIGNATURE_FILENAME : string

Kind: static constant of AS2Constants
Default: "smime.p7s"

AS2Constants.ENCRYPTION_FILENAME : string

Kind: static constant of AS2Constants
Default: "smime.p7m"

AS2Constants.LIBRARY_NAME : string

Kind: static constant of AS2Constants

AS2Constants.LIBRARY_VERSION : string

Kind: static constant of AS2Constants

AS2Constants.LIBRAY_NAME_VERSION : string

Kind: static constant of AS2Constants

getReportNode(node) ⇒ AS2MimeNode

Get the multipart/report disposition-notification, if any.

Kind: global function
Returns: AS2MimeNode -

The multipart/report disposition-notification.

Param Type Description
node AS2MimeNode

The multipart MIME containing the report.

isMdn(node) ⇒ boolean

Answers if the AS2MimeNode is a Message Disposition Notification.

Kind: global function
Returns: boolean -

True for a Message Disposition Notification.

Param Type Description
node AS2MimeNode

The multipart MIME which may contain a report.

parseHeaderString(headers, [keyToLowerCase], [callback]) ⇒ object

Method for converting a string of headers into key:value pairs.

Kind: global function
Returns: object -

The headers as an object of key/value pairs.

Param Type Default Description
headers string

A string of headers.

[keyToLowerCase] boolean | function false

Set all header keys to lower-case; or provide a function to manipulate values.

[callback] function

A callback to manipulate values as they are parsed; only use if second argument is a boolean.

getProtocol(url) ⇒ string

Method for retrieving the protocol of a URL, dynamically.

Kind: global function
Returns: string -

The protocol of the URL.


Throws:

  • URL is not one of either "string" or instance of "URL".

Param Type Description
url string | URL

The url to get the protocol.

isNullOrUndefined(value) ⇒ boolean

Convenience method for null-checks.

Kind: global function
Returns: boolean -

True if null or undefined.

Param Type Description
value any

Any value to duck-check.

isSMime(value) ⇒ boolean

Determine if a given string is one of PKCS7 MIME types.

Kind: global function
Returns: boolean -

True if a valid pkcs7 value.

Param Type Description
value string

Checks if either pkcs7 or x-pkcs7.

canonicalTransform(node)

Transforms a payload into a canonical text format per RFC 5751 section 3.1.1.

Kind: global function

Param Type Description
node AS2MimeNode

The AS2MimeNode to canonicalize.

getSigningOptions(sign) ⇒ SigningOptions

Normalizes certificate signing options.

Kind: global function
Returns: SigningOptions -

A normalized option object.

Param Type Description
sign SigningOptions

Options for signing.

getEncryptionOptions(encrypt) ⇒ EncryptionOptions

Normalizes encryption options.

Kind: global function
Returns: EncryptionOptions -

A normalized option object.

Param Type Description
encrypt EncryptionOptions

Options for encryption.

getAgreementOptions(agreement) ⇒ AS2Agreement

Normalizes agreement options.

Kind: global function
Returns: AS2Agreement -

A normalized option object.

Param Type Description
agreement AgreementOptions

Options for partner agreement.

request(options) ⇒ IncomingMessage

Convenience method for making AS2 HTTP/S requests. Makes a POST request by default.

Kind: global function
Returns: IncomingMessage -

The incoming message, including Buffer properties rawBody and rawResponse, and convenience methods for mime() and json().

Param Type Description
options RequestOptions

Options for making a request; extends Node's RequestOptions interface.

options.body Buffer | string | object | Array

Buffer, string, or JavaScript object.

options.params object

JavaScript object of parameters to append to the url.

AS2ComposerOptions : object

Options for composing an AS2 message.

Kind: global typedef
Properties

Name Type
message AS2MimeNodeOptions
agreement AgreementOptions

AgreementOptions : object

Options for composing an AS2 message.

Kind: global typedef
Properties

Name Type Description
host object

Options for the AS2 host.

host.name string

The name of the host.

host.id string

The id of the host; usually a company's DUNS id.

host.url string | URL

The URL of the host's AS2 endpoint.

[host.certificate] string | Buffer | PemFile

The certificate of the host in PEM format. Required for signing or decrypting.

[host.privateKey] string | Buffer | PemFile

The private key of the host in PEM format. Required for signing or decrypting.

host.decrypt boolean

Host requires partner to encrypt messages sent to the host.

host.sign AS2Signing | boolean

Host requires partner to verify messages sent from the host.

[host.mdn] object

Host requests a message disposition notification (MDN).

host.mdn.async boolean

Host requires MDN to be sent to a separate URL.

host.mdn.signing AS2Signing | false

Host requires MDN to be signed with algorithm if possible.

partner object

Options for the AS2 partner.

partner.name string

The name of the partner.

partner.id string

The id of the partner; usually a company's DUNS id.

partner.url string | URL

The URL of the partner's AS2 endpoint.

partner.file 'EDIX12' | 'EDIFACT' | 'XML' | string

The file protocol for trading with the partner.

[partner.certificate] string | Buffer | PemFile

The certificate of the partner in PEM format. Required for signing or decrypting.

partner.encrypt AS2Encryption | boolean

Partner requires host to encrypt messages sent to the partner.

partner.verify boolean

Partner requires host to verify messages sent from the partner.

[partner.mdn] object

Partner may request a message disposition notification (MDN).

partner.mdn.async boolean

Partner requires MDN to be sent to a separate URL.

partner.mdn.signing AS2Signing | false

Partner requires MDN to be signed with algorithm if possible.

AS2Signing : 'sha-1' | 'sha-256' | 'sha-384' | 'sha-512'

List of supported signing algorithms.

Kind: global typedef

AS2Encryption : 'des-EDE3-CBC' | 'aes128-CBC' | 'aes192-CBC' | 'aes256-CBC' | 'aes128-GCM' | 'aes192-GCM' | 'aes256-GCM'

List of supported encryption algorithms.

Kind: global typedef

EncryptionOptions : object

Options for encrypting payloads.

Kind: global typedef
Properties

Name Type
cert string | Buffer
encryption AS2Encryption

DecryptionOptions : object

Options for decrypting payloads.

Kind: global typedef
Properties

Name Type
cert string | Buffer
key string | Buffer

SigningOptions : object

Options for decrypting payloads.

Kind: global typedef
Properties

Name Type
cert string | Buffer
key string | Buffer
algorithm AS2Signing

VerificationOptions : object

Options for decrypting payloads.

Kind: global typedef
Properties

Name Type
cert string | Buffer

AS2DispositionOptions : object

Options for composing a message disposition notification (MDN).

Kind: global typedef
Properties

Name Type
explanation string
notification AS2DispositionNotification
[returned] AS2MimeNode | boolean

OutgoingDispositionOptions : object

Options for generating an outgoing MDN.

Kind: global typedef
Properties

Name Type Description
node AS2MimeNode

The mime node to verify and/or decrypt; used construct the outgoing disposition.

agreement AgreementOptions

The partner agreement to use when sending the outgoing disposition.

[returnNode] boolean

Whether to attach the mime node to the disposition as the returned payload.

ParseOptions : object

Options for parsing a MIME document; useful if there is no access to the underlying raw response.

Kind: global typedef
Properties

Name Type Description
headers Array.<string> | object

Either an object like Node.js IncomingMessage.headers or like IncomingMessage.rawHeaders.

content Buffer | Stream | string

The raw body of the MIME document.