open-nav
    Preparing search index...

    Interface EncodeOptions

    interface EncodeOptions {
        compress?: boolean;
        declaration?: boolean;
        indent?: string | false;
    }

    Hierarchy (View Summary)

    Index
    compress?: boolean

    Gzip the XML before base64 encoding.

    NAV allows this for manageInvoice and it materially reduces payload size, but the whole batch must then set compressedContent — the flag is per request, not per invoice.

    declaration?: boolean

    Emit the XML declaration. Defaults to true.

    indent?: string | false

    Indentation for pretty printing, or false for a single line.

    Defaults to false: these documents go over the wire, and for manageInvoice the invoice payload is hashed and base64 encoded, so there is nothing to be gained from whitespace. Pass '\t' or two spaces when a human has to read the result.