node-zugferd
Version:
A Node.js library for creating ZUGFeRD/Factur-X compliant documents. Generating XML and embedding it into PDF/A files, enabling seamless e-invoicing and digital document compliance.
526 lines (525 loc) • 471 kB
TypeScript
import { B as BaseZugferdContext, I as InferSchema, P as Profile } from '../index-CLe7O-Zp.js';
import * as zod from 'zod';
import 'pdf-lib';
import 'fast-xml-parser';
declare const EN16931: {
id: "en16931";
contextParameter: string;
extends: (({
id: "minimum";
contextParameter: string;
schema: {
businessProcessType: {
key: string;
type: "string";
required: false;
description: string;
xpath: string;
};
specificationIdentifier: {
key: string;
type: "string";
required: false;
defaultValue: string;
description: string;
xpath: string;
};
number: {
key: string;
type: "string";
description: string;
xpath: string;
};
typeCode: {
key: string;
type: ("3" | "1" | "2" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "32" | "33" | "34" | "35" | "36" | "37" | "38" | "39" | "40" | "41" | "42" | "43" | "44" | "45" | "46" | "47" | "48" | "49" | "50" | "51" | "52" | "53" | "54" | "55" | "56" | "57" | "58" | "59" | "60" | "61" | "62" | "63" | "64" | "65" | "66" | "67" | "68" | "69" | "70" | "71" | "72" | "73" | "74" | "75" | "76" | "77" | "78" | "79" | "80" | "81" | "82" | "83" | "84" | "85" | "86" | "87" | "88" | "89" | "90" | "91" | "92" | "93" | "94" | "95" | "96" | "97" | "98" | "99" | "100" | "101" | "102" | "103" | "104" | "105" | "106" | "107" | "108" | "109" | "110" | "111" | "112" | "113" | "114" | "115" | "116" | "117" | "118" | "119" | "120" | "121" | "122" | "123" | "124" | "125" | "126" | "127" | "128" | "129" | "130" | "131" | "132" | "133" | "134" | "135" | "136" | "137" | "138" | "139" | "140" | "141" | "142" | "143" | "144" | "145" | "146" | "147" | "148" | "149" | "150" | "151" | "152" | "153" | "154" | "155" | "156" | "157" | "158" | "159" | "160" | "161" | "162" | "163" | "164" | "165" | "166" | "167" | "168" | "169" | "170" | "171" | "172" | "173" | "174" | "175" | "176" | "177" | "178" | "179" | "180" | "181" | "182" | "183" | "184" | "185" | "186" | "187" | "188" | "189" | "190" | "191" | "192" | "193" | "194" | "195" | "196" | "197" | "198" | "199" | "200" | "201" | "202" | "203" | "204" | "205" | "206" | "207" | "208" | "209" | "210" | "211" | "212" | "213" | "214" | "215" | "216" | "217" | "218" | "219" | "220" | "221" | "222" | "223" | "224" | "225" | "226" | "227" | "228" | "229" | "230" | "231" | "232" | "233" | "234" | "235" | "236" | "237" | "238" | "239" | "240" | "241" | "242" | "243" | "244" | "245" | "246" | "247" | "248" | "249" | "250" | "251" | "252" | "253" | "254" | "255" | "256" | "257" | "258" | "259" | "260" | "261" | "262" | "263" | "264" | "265" | "266" | "267" | "268" | "269" | "270" | "271" | "272" | "273" | "274" | "275" | "276" | "277" | "278" | "279" | "280" | "281" | "282" | "283" | "284" | "285" | "286" | "287" | "288" | "289" | "290" | "291" | "292" | "293" | "294" | "295" | "296" | "297" | "298" | "299" | "300" | "301" | "302" | "303" | "304" | "305" | "306" | "307" | "308" | "309" | "310" | "311" | "312" | "313" | "314" | "315" | "316" | "317" | "318" | "319" | "320" | "321" | "322" | "323" | "324" | "325" | "326" | "327" | "328" | "329" | "330" | "331" | "332" | "333" | "334" | "335" | "336" | "337" | "338" | "339" | "340" | "341" | "342" | "343" | "344" | "345" | "346" | "347" | "348" | "349" | "350" | "351" | "352" | "353" | "354" | "355" | "356" | "357" | "358" | "359" | "360" | "361" | "362" | "363" | "364" | "365" | "366" | "367" | "368" | "369" | "370" | "371" | "372" | "373" | "374" | "375" | "376" | "377" | "378" | "379" | "380" | "381" | "382" | "383" | "384" | "385" | "386" | "387" | "388" | "389" | "390" | "391" | "392" | "393" | "394" | "395" | "396" | "397" | "398" | "399" | "400" | "401" | "402" | "403" | "404" | "405" | "406" | "407" | "408" | "409" | "410" | "411" | "412" | "413" | "414" | "415" | "416" | "417" | "418" | "419" | "420" | "421" | "422" | "423" | "424" | "425" | "426" | "427" | "428" | "429" | "430" | "431" | "432" | "433" | "434" | "435" | "436" | "437" | "438" | "439" | "440" | "441" | "442" | "443" | "444" | "445" | "446" | "447" | "448" | "449" | "450" | "451" | "452" | "453" | "454" | "455" | "456" | "457" | "458" | "459" | "460" | "461" | "462" | "463" | "464" | "465" | "466" | "467" | "468" | "469" | "470" | "481" | "482" | "483" | "484" | "485" | "486" | "487" | "488" | "489" | "490" | "491" | "493" | "494" | "495" | "496" | "497" | "498" | "499" | "520" | "521" | "522" | "523" | "524" | "525" | "526" | "527" | "528" | "529" | "530" | "531" | "532" | "533" | "534" | "535" | "536" | "537" | "538" | "539" | "550" | "551" | "552" | "553" | "554" | "575" | "576" | "577" | "578" | "579" | "580" | "581" | "582" | "583" | "584" | "585" | "586" | "587" | "588" | "589" | "610" | "621" | "622" | "623" | "624" | "625" | "626" | "627" | "628" | "629" | "630" | "631" | "632" | "633" | "634" | "635" | "636" | "637" | "638" | "639" | "640" | "641" | "642" | "643" | "644" | "645" | "646" | "647" | "648" | "649" | "650" | "651" | "652" | "653" | "654" | "655" | "656" | "657" | "658" | "659" | "700" | "701" | "702" | "703" | "704" | "705" | "706" | "707" | "708" | "709" | "710" | "711" | "712" | "713" | "714" | "715" | "716" | "717" | "718" | "719" | "720" | "721" | "722" | "723" | "724" | "725" | "726" | "727" | "728" | "729" | "730" | "731" | "732" | "733" | "734" | "735" | "736" | "737" | "738" | "739" | "740" | "741" | "742" | "743" | "744" | "745" | "746" | "747" | "748" | "749" | "750" | "751" | "752" | "753" | "754" | "755" | "756" | "757" | "758" | "759" | "760" | "761" | "762" | "763" | "764" | "765" | "766" | "767" | "768" | "769" | "770" | "771" | "772" | "773" | "774" | "775" | "776" | "777" | "778" | "779" | "780" | "781" | "782" | "783" | "784" | "785" | "786" | "787" | "788" | "789" | "790" | "791" | "792" | "793" | "794" | "795" | "796" | "797" | "798" | "799" | "810" | "811" | "812" | "813" | "814" | "815" | "816" | "817" | "818" | "819" | "820" | "821" | "822" | "823" | "824" | "825" | "826" | "827" | "828" | "829" | "830" | "831" | "832" | "833" | "834" | "835" | "836" | "837" | "838" | "839" | "840" | "841" | "842" | "843" | "844" | "845" | "846" | "847" | "848" | "849" | "850" | "851" | "852" | "853" | "854" | "855" | "856" | "857" | "858" | "859" | "860" | "861" | "862" | "863" | "864" | "865" | "866" | "867" | "868" | "869" | "870" | "871" | "872" | "873" | "874" | "875" | "876" | "877" | "878" | "879" | "890" | "891" | "892" | "893" | "894" | "895" | "896" | "897" | "898" | "899" | "900" | "901" | "902" | "903" | "904" | "910" | "911" | "913" | "914" | "915" | "916" | "917" | "925" | "926" | "927" | "929" | "930" | "931" | "932" | "933" | "934" | "935" | "936" | "937" | "938" | "940" | "941" | "950" | "951" | "952" | "953" | "954" | "955" | "960" | "961" | "962" | "963" | "964" | "965" | "966" | "970" | "971" | "972" | "974" | "975" | "976" | "977" | "978" | "979" | "990" | "991" | "995" | "996" | "998")[];
description: string;
xpath: string;
};
issueDate: {
key: string;
type: "date";
description: string;
xpath: string;
additionalXml: {
"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString/@format": string;
};
transform: {
input: (date: unknown) => string | undefined;
};
};
transaction: {
key: string;
type: "object";
description: string;
required: false;
shape: {
tradeAgreement: {
key: string;
type: "object";
description: string;
required: false;
shape: {
buyerReference: {
key: string;
type: "string";
description: string;
required: false;
xpath: string;
};
seller: {
key: string;
type: "object";
description: string;
shape: {
name: {
key: string;
type: "string";
description: string;
xpath: string;
};
organization: {
key: string;
type: "object";
description: string;
required: false;
shape: {
registrationIdentifier: {
key: string;
type: "object";
description: string;
required: false;
shape: {
value: {
type: "string";
description: string;
required: false;
xpath: string;
};
schemeIdentifier: {
type: ("0002" | "0003" | "0004" | "0005" | "0006" | "0007" | "0008" | "0009" | "0010" | "0011" | "0012" | "0013" | "0014" | "0015" | "0016" | "0017" | "0018" | "0019" | "0020" | "0021" | "0022" | "0023" | "0024" | "0025" | "0026" | "0027" | "0028" | "0029" | "0030" | "0031" | "0032" | "0033" | "0034" | "0035" | "0036" | "0037" | "0038" | "0039" | "0040" | "0041" | "0042" | "0043" | "0044" | "0045" | "0046" | "0047" | "0048" | "0049" | "0050" | "0051" | "0052" | "0053" | "0054" | "0055" | "0056" | "0057" | "0058" | "0059" | "0060" | "0061" | "0062" | "0063" | "0064" | "0065" | "0066" | "0067" | "0068" | "0069" | "0070" | "0071" | "0072" | "0073" | "0074" | "0075" | "0076" | "0077" | "0078" | "0079" | "0080" | "0081" | "0082" | "0083" | "0084" | "0085" | "0086" | "0087" | "0088" | "0089" | "0090" | "0091" | "0093" | "0094" | "0095" | "0096" | "0097" | "0098" | "0099" | "0100" | "0101" | "0102" | "0104" | "0105" | "0106" | "0107" | "0108" | "0109" | "0110" | "0111" | "0112" | "0113" | "0114" | "0115" | "0116" | "0117" | "0118" | "0119" | "0120" | "0121" | "0122" | "0123" | "0124" | "0125" | "0126" | "0127" | "0128" | "0129" | "0130" | "0131" | "0132" | "0133" | "0134" | "0135" | "0136" | "0137" | "0138" | "0139" | "0140" | "0141" | "0142" | "0143" | "0144" | "0145" | "0146" | "0147" | "0148" | "0149" | "0150" | "0151" | "0152" | "0153" | "0154" | "0155" | "0156" | "0157" | "0158" | "0159" | "0160" | "0161" | "0162" | "0163" | "0164" | "0165" | "0166" | "0167" | "0168" | "0169" | "0170" | "0171" | "0172" | "0173" | "0174" | "0175" | "0176" | "0177" | "0178" | "0179" | "0180" | "0183" | "0184" | "0185" | "0186" | "0187" | "0188" | "0189" | "0190" | "0191" | "0192" | "0193" | "0194" | "0195" | "0196" | "0197" | "0198" | "0199" | "0200" | "0201" | "0202" | "0203" | "0204" | "0205" | "0206" | "0207" | "0208" | "0209" | "0210" | "0211" | "0212" | "0213" | "0214" | "0215" | "0216" | "XR01" | "XR02" | "XR03")[];
description: string;
required: false;
xpath: string;
};
};
};
};
};
postalAddress: {
key: string;
type: "object";
description: string;
shape: {
countryCode: {
key: string;
type: ("AD" | "AE" | "AF" | "AL" | "DZ" | "AS" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "AX" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BV" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "CV" | "KH" | "CM" | "CA" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CD" | "CG" | "CK" | "CR" | "HR" | "CU" | "CW" | "CY" | "CZ" | "CI" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "SZ" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "HM" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MK" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RO" | "RU" | "RW" | "RE" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TM" | "TC" | "TV" | "TR" | "UG" | "UA" | "GB" | "UM" | "US" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "EH" | "YE" | "ZM" | "ZW")[];
description: string;
xpath: string;
};
};
};
taxRegistration: {
key: string;
type: "object";
description: string;
required: false;
shape: {
vatIdentifier: {
key: string;
type: "string";
description: string;
required: false;
xpath: string;
additionalXml: {
"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration[0]/ram:ID/@schemeID": string;
};
};
localIdentifier: {
key: string;
type: "string";
required: false;
description: string;
xpath: string;
additionalXml: {
"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration[1]/ram:ID/@schemeID": string;
};
};
};
};
};
};
buyer: {
key: string;
type: "object";
description: string;
shape: {
name: {
key: string;
type: "string";
description: string;
xpath: string;
};
organization: {
type: "object";
description: string;
required: false;
shape: {
registrationIdentifier: {
type: "object";
description: string;
required: false;
shape: {
value: {
type: "string";
description: string;
required: false;
xpath: string;
};
schemeIdentifier: {
type: ("0002" | "0003" | "0004" | "0005" | "0006" | "0007" | "0008" | "0009" | "0010" | "0011" | "0012" | "0013" | "0014" | "0015" | "0016" | "0017" | "0018" | "0019" | "0020" | "0021" | "0022" | "0023" | "0024" | "0025" | "0026" | "0027" | "0028" | "0029" | "0030" | "0031" | "0032" | "0033" | "0034" | "0035" | "0036" | "0037" | "0038" | "0039" | "0040" | "0041" | "0042" | "0043" | "0044" | "0045" | "0046" | "0047" | "0048" | "0049" | "0050" | "0051" | "0052" | "0053" | "0054" | "0055" | "0056" | "0057" | "0058" | "0059" | "0060" | "0061" | "0062" | "0063" | "0064" | "0065" | "0066" | "0067" | "0068" | "0069" | "0070" | "0071" | "0072" | "0073" | "0074" | "0075" | "0076" | "0077" | "0078" | "0079" | "0080" | "0081" | "0082" | "0083" | "0084" | "0085" | "0086" | "0087" | "0088" | "0089" | "0090" | "0091" | "0093" | "0094" | "0095" | "0096" | "0097" | "0098" | "0099" | "0100" | "0101" | "0102" | "0104" | "0105" | "0106" | "0107" | "0108" | "0109" | "0110" | "0111" | "0112" | "0113" | "0114" | "0115" | "0116" | "0117" | "0118" | "0119" | "0120" | "0121" | "0122" | "0123" | "0124" | "0125" | "0126" | "0127" | "0128" | "0129" | "0130" | "0131" | "0132" | "0133" | "0134" | "0135" | "0136" | "0137" | "0138" | "0139" | "0140" | "0141" | "0142" | "0143" | "0144" | "0145" | "0146" | "0147" | "0148" | "0149" | "0150" | "0151" | "0152" | "0153" | "0154" | "0155" | "0156" | "0157" | "0158" | "0159" | "0160" | "0161" | "0162" | "0163" | "0164" | "0165" | "0166" | "0167" | "0168" | "0169" | "0170" | "0171" | "0172" | "0173" | "0174" | "0175" | "0176" | "0177" | "0178" | "0179" | "0180" | "0183" | "0184" | "0185" | "0186" | "0187" | "0188" | "0189" | "0190" | "0191" | "0192" | "0193" | "0194" | "0195" | "0196" | "0197" | "0198" | "0199" | "0200" | "0201" | "0202" | "0203" | "0204" | "0205" | "0206" | "0207" | "0208" | "0209" | "0210" | "0211" | "0212" | "0213" | "0214" | "0215" | "0216" | "XR01" | "XR02" | "XR03")[];
description: string;
required: false;
xpath: string;
};
};
};
};
};
};
};
associatedOrder: {
key: string;
type: "object";
description: string;
required: false;
shape: {
purchaseOrderReference: {
key: string;
type: "string";
description: string;
required: false;
xpath: string;
};
};
};
};
};
tradeDelivery: {
key: string;
type: "object";
description: string;
xpath: string;
defaultValue: never[];
required: false;
shape: {};
};
tradeSettlement: {
key: string;
type: "object";
description: string;
shape: {
currencyCode: {
key: string;
type: ("AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL")[];
description: string;
xpath: string;
};
monetarySummation: {
key: string;
type: "object";
description: string;
shape: {
taxBasisTotalAmount: {
key: string;
type: "string | number";
description: string;
xpath: string;
};
taxTotal: {
key: string;
type: "object";
description: string;
shape: {
amount: {
type: "string | number";
description: string;
required: false;
xpath: string;
};
currencyCode: {
type: ("AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL")[];
description: string;
xpath: string;
};
};
};
grandTotalAmount: {
key: string;
type: "string | number";
description: string;
xpath: string;
};
duePayableAmount: {
key: string;
type: "string | number";
description: string;
xpath: string;
};
};
};
vatBreakdown: {
key: string;
type: "object[]";
group: "vat-breakdown";
description: string;
required: false;
validator: zod.ZodOptional<zod.ZodArray<zod.ZodAny, "many">>;
shape: {
calculatedAmount: {
key: string;
type: "string | number";
description: string;
xpath: string;
};
typeCode: {
key: string;
type: "string";
description: string;
xpath: string;
};
exemptionReasonText: {
key: string;
type: "string";
description: string;
required: false;
xpath: string;
};
basisAmount: {
key: string;
type: "string | number";
description: string;
xpath: string;
};
categoryCode: {
key: string;
type: ("B" | "F" | "S" | "A" | "AA" | "AB" | "AC" | "AD" | "AE" | "C" | "D" | "E" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "O" | "Z")[];
description: string;
xpath: string;
};
exemptionReasonCode: {
key: string;
type: ("vatex-eu-132" | "vatex-eu-132-1a" | "vatex-eu-132-1b" | "vatex-eu-132-1c" | "vatex-eu-132-1d" | "vatex-eu-132-1e" | "vatex-eu-132-1f" | "vatex-eu-132-1g" | "vatex-eu-132-1h" | "vatex-eu-132-1i" | "vatex-eu-132-1j" | "vatex-eu-132-1k" | "vatex-eu-132-1l" | "vatex-eu-132-1m" | "vatex-eu-132-1n" | "vatex-eu-132-1o" | "vatex-eu-132-1p" | "vatex-eu-132-1q" | "vatex-eu-143" | "vatex-eu-143-1a" | "vatex-eu-143-1b" | "vatex-eu-143-1c" | "vatex-eu-143-1d" | "vatex-eu-143-1e" | "vatex-eu-143-1f" | "vatex-eu-143-1fa" | "vatex-eu-143-1g" | "vatex-eu-143-1h" | "vatex-eu-143-1i" | "vatex-eu-143-1j" | "vatex-eu-143-1k" | "vatex-eu-143-1l" | "vatex-eu-148" | "vatex-eu-148-a" | "vatex-eu-148-b" | "vatex-eu-148-c" | "vatex-eu-148-d" | "vatex-eu-148-e" | "vatex-eu-148-f" | "vatex-eu-148-g" | "vatex-eu-151" | "vatex-eu-151-1a" | "vatex-eu-151-1aa" | "vatex-eu-151-1b" | "vatex-eu-151-1c" | "vatex-eu-151-1d" | "vatex-eu-151-1e" | "vatex-eu-309" | "vatex-eu-ae" | "vatex-eu-d" | "vatex-eu-f" | "vatex-eu-g" | "vatex-eu-i" | "vatex-eu-ic" | "vatex-eu-j" | "vatex-eu-o")[];
description: string;
required: false;
xpath: string;
};
dueDateTypeCode: {
key: string;
type: string[];
description: string;
required: false;
xpath: string;
};
rateApplicablePercent: {
key: string;
type: "string | number";
description: string;
required: false;
xpath: string;
};
};
};
invoicingPeriod: {
key: string;
type: "object";
description: string;
required: false;
shape: {
startDate: {
key: string;
type: "date";
description: string;
required: false;
transform: {
input: (date: unknown) => string | undefined;
};
xpath: string;
additionalXml: {
"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod/ram:StartDateTime/udt:DateTimeString/@format": string;
};
};
endDate: {
key: string;
type: "date";
description: string;
required: false;
transform: {
input: (date: unknown) => string | undefined;
};
xpath: string;
additionalXml: {
"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod/ram:EndDateTime/udt:DateTimeString/@format": string;
};
};
};
};
};
};
};
};
};
mask: {
readonly businessProcessType: "BT-23";
readonly specificationIdentifier: "BT-24";
readonly number: "BT-1";
readonly typeCode: "BT-3";
readonly issueDate: "BT-2";
readonly transaction: readonly ["BG-25-00", {
readonly tradeAgreement: readonly ["BT-10-00", {
readonly buyerReference: "BT-10";
readonly seller: readonly ["BG-4", {
readonly name: "BT-27";
readonly organization: readonly ["BT-30-00", {
readonly registrationIdentifier: "BT-30";
}];
readonly postalAddress: readonly ["BG-5", {
readonly countryCode: "BT-40";
}];
readonly taxRegistration: readonly ["seller-tax-registration", {
readonly vatIdentifier: "BT-31";
readonly localIdentifier: "BT-32";
}];
}];
readonly buyer: readonly ["BG-7", {
readonly name: "BT-44";
readonly organization: readonly ["BT-47-00", {
readonly registrationIdentifier: "BT-47";
}];
}];
readonly associatedOrder: readonly ["BT-13-00", {
readonly purchaseOrderReference: "BT-13";
}];
}];
readonly tradeDelivery: "BG-13-00";
readonly tradeSettlement: readonly ["BG-19", {
readonly currencyCode: "BT-5";
readonly monetarySummation: readonly ["BG-22", {
readonly taxBasisTotalAmount: "BT-109";
readonly taxTotal: "BT-110";
readonly grandTotalAmount: "BT-112";
readonly duePayableAmount: "BT-115";
}];
}];
}];
};
xsdPath: () => string;
conformanceLevel: string;
documentFileName: string;
documentType: "INVOICE";
version: string;
} & {
parse: (ctx: {
context: BaseZugferdContext;
data: InferSchema<Profile>;
}) => any;
validate: (data: string | Buffer<ArrayBufferLike> | {
file: string;
}) => Promise<boolean>;
}) | ({
id: "basic-wl";
contextParameter: string;
extends: ({
id: "minimum";
contextParameter: string;
schema: {
businessProcessType: {
key: string;
type: "string";
required: false;
description: string;
xpath: string;
};
specificationIdentifier: {
key: string;
type: "string";
required: false;
defaultValue: string;
description: string;
xpath: string;
};
number: {
key: string;
type: "string";
description: string;
xpath: string;
};
typeCode: {
key: string;
type: ("3" | "1" | "2" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "32" | "33" | "34" | "35" | "36" | "37" | "38" | "39" | "40" | "41" | "42" | "43" | "44" | "45" | "46" | "47" | "48" | "49" | "50" | "51" | "52" | "53" | "54" | "55" | "56" | "57" | "58" | "59" | "60" | "61" | "62" | "63" | "64" | "65" | "66" | "67" | "68" | "69" | "70" | "71" | "72" | "73" | "74" | "75" | "76" | "77" | "78" | "79" | "80" | "81" | "82" | "83" | "84" | "85" | "86" | "87" | "88" | "89" | "90" | "91" | "92" | "93" | "94" | "95" | "96" | "97" | "98" | "99" | "100" | "101" | "102" | "103" | "104" | "105" | "106" | "107" | "108" | "109" | "110" | "111" | "112" | "113" | "114" | "115" | "116" | "117" | "118" | "119" | "120" | "121" | "122" | "123" | "124" | "125" | "126" | "127" | "128" | "129" | "130" | "131" | "132" | "133" | "134" | "135" | "136" | "137" | "138" | "139" | "140" | "141" | "142" | "143" | "144" | "145" | "146" | "147" | "148" | "149" | "150" | "151" | "152" | "153" | "154" | "155" | "156" | "157" | "158" | "159" | "160" | "161" | "162" | "163" | "164" | "165" | "166" | "167" | "168" | "169" | "170" | "171" | "172" | "173" | "174" | "175" | "176" | "177" | "178" | "179" | "180" | "181" | "182" | "183" | "184" | "185" | "186" | "187" | "188" | "189" | "190" | "191" | "192" | "193" | "194" | "195" | "196" | "197" | "198" | "199" | "200" | "201" | "202" | "203" | "204" | "205" | "206" | "207" | "208" | "209" | "210" | "211" | "212" | "213" | "214" | "215" | "216" | "217" | "218" | "219" | "220" | "221" | "222" | "223" | "224" | "225" | "226" | "227" | "228" | "229" | "230" | "231" | "232" | "233" | "234" | "235" | "236" | "237" | "238" | "239" | "240" | "241" | "242" | "243" | "244" | "245" | "246" | "247" | "248" | "249" | "250" | "251" | "252" | "253" | "254" | "255" | "256" | "257" | "258" | "259" | "260" | "261" | "262" | "263" | "264" | "265" | "266" | "267" | "268" | "269" | "270" | "271" | "272" | "273" | "274" | "275" | "276" | "277" | "278" | "279" | "280" | "281" | "282" | "283" | "284" | "285" | "286" | "287" | "288" | "289" | "290" | "291" | "292" | "293" | "294" | "295" | "296" | "297" | "298" | "299" | "300" | "301" | "302" | "303" | "304" | "305" | "306" | "307" | "308" | "309" | "310" | "311" | "312" | "313" | "314" | "315" | "316" | "317" | "318" | "319" | "320" | "321" | "322" | "323" | "324" | "325" | "326" | "327" | "328" | "329" | "330" | "331" | "332" | "333" | "334" | "335" | "336" | "337" | "338" | "339" | "340" | "341" | "342" | "343" | "344" | "345" | "346" | "347" | "348" | "349" | "350" | "351" | "352" | "353" | "354" | "355" | "356" | "357" | "358" | "359" | "360" | "361" | "362" | "363" | "364" | "365" | "366" | "367" | "368" | "369" | "370" | "371" | "372" | "373" | "374" | "375" | "376" | "377" | "378" | "379" | "380" | "381" | "382" | "383" | "384" | "385" | "386" | "387" | "388" | "389" | "390" | "391" | "392" | "393" | "394" | "395" | "396" | "397" | "398" | "399" | "400" | "401" | "402" | "403" | "404" | "405" | "406" | "407" | "408" | "409" | "410" | "411" | "412" | "413" | "414" | "415" | "416" | "417" | "418" | "419" | "420" | "421" | "422" | "423" | "424" | "425" | "426" | "427" | "428" | "429" | "430" | "431" | "432" | "433" | "434" | "435" | "436" | "437" | "438" | "439" | "440" | "441" | "442" | "443" | "444" | "445" | "446" | "447" | "448" | "449" | "450" | "451" | "452" | "453" | "454" | "455" | "456" | "457" | "458" | "459" | "460" | "461" | "462" | "463" | "464" | "465" | "466" | "467" | "468" | "469" | "470" | "481" | "482" | "483" | "484" | "485" | "486" | "487" | "488" | "489" | "490" | "491" | "493" | "494" | "495" | "496" | "497" | "498" | "499" | "520" | "521" | "522" | "523" | "524" | "525" | "526" | "527" | "528" | "529" | "530" | "531" | "532" | "533" | "534" | "535" | "536" | "537" | "538" | "539" | "550" | "551" | "552" | "553" | "554" | "575" | "576" | "577" | "578" | "579" | "580" | "581" | "582" | "583" | "584" | "585" | "586" | "587" | "588" | "589" | "610" | "621" | "622" | "623" | "624" | "625" | "626" | "627" | "628" | "629" | "630" | "631" | "632" | "633" | "634" | "635" | "636" | "637" | "638" | "639" | "640" | "641" | "642" | "643" | "644" | "645" | "646" | "647" | "648" | "649" | "650" | "651" | "652" | "653" | "654" | "655" | "656" | "657" | "658" | "659" | "700" | "701" | "702" | "703" | "704" | "705" | "706" | "707" | "708" | "709" | "710" | "711" | "712" | "713" | "714" | "715" | "716" | "717" | "718" | "719" | "720" | "721" | "722" | "723" | "724" | "725" | "726" | "727" | "728" | "729" | "730" | "731" | "732" | "733" | "734" | "735" | "736" | "737" | "738" | "739" | "740" | "741" | "742" | "743" | "744" | "745" | "746" | "747" | "748" | "749" | "750" | "751" | "752" | "753" | "754" | "755" | "756" | "757" | "758" | "759" | "760" | "761" | "762" | "763" | "764" | "765" | "766" | "767" | "768" | "769" | "770" | "771" | "772" | "773" | "774" | "775" | "776" | "777" | "778" | "779" | "780" | "781" | "782" | "783" | "784" | "785" | "786" | "787" | "788" | "789" | "790" | "791" | "792" | "793" | "794" | "795" | "796" | "797" | "798" | "799" | "810" | "811" | "812" | "813" | "814" | "815" | "816" | "817" | "818" | "819" | "820" | "821" | "822" | "823" | "824" | "825" | "826" | "827" | "828" | "829" | "830" | "831" | "832" | "833" | "834" | "835" | "836" | "837" | "838" | "839" | "840" | "841" | "842" | "843" | "844" | "845" | "846" | "847" | "848" | "849" | "850" | "851" | "852" | "853" | "854" | "855" | "856" | "857" | "858" | "859" | "860" | "861" | "862" | "863" | "864" | "865" | "866" | "867" | "868" | "869" | "870" | "871" | "872" | "873" | "874" | "875" | "876" | "877" | "878" | "879" | "890" | "891" | "892" | "893" | "894" | "895" | "896" | "897" | "898" | "899" | "900" | "901" | "902" | "903" | "904" | "910" | "911" | "913" | "914" | "915" | "916" | "917" | "925" | "926" | "927" | "929" | "930" | "931" | "932" | "933" | "934" | "935" | "936" | "937" | "938" | "940" | "941" | "950" | "951" | "952" | "953" | "954" | "955" | "960" | "961" | "962" | "963" | "964" | "965" | "966" | "970" | "971" | "972" | "974" | "975" | "976" | "977" | "978" | "979" | "990" | "991" | "995" | "996" | "998")[];
description: string;
xpath: string;
};
issueDate: {
key: string;
type: "date";
description: string;
xpath: string;
additionalXml: {
"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString/@format": string;
};
transform: {
input: (date: unknown) => string | undefined;
};
};
transaction: {
key: string;
type: "object";
description: string;
required: false;
shape: {
tradeAgreement: {
key: string;
type: "object";
description: string;
required: false;
shape: {
buyerReference: {
key: string;
type: "string";
description: string;
required: false;
xpath: string;
};
seller: {
key: string;
type: "object";
description: string;
shape: {
name: {
key: string;
type: "string";
description: string;
xpath: string;
};
organization: {
key: string;
type: "object";
description: string;
required: false;
shape: {
registrationIdentifier: {
key: string;
type: "object";
description: string;
required: false;
shape: {
value: {
type: "string";
description: string;
required: false;
xpath: string;
};
schemeIdentifier: {
type: ("0002" | "0003" | "0004" | "0005" | "0006" | "0007" | "0008" | "0009" | "0010" | "0011" | "0012" | "0013" | "0014" | "0015" | "0016" | "0017" | "0018" | "0019" | "0020" | "0021" | "0022" | "0023" | "0024" | "0025" | "0026" | "0027" | "0028" | "0029" | "0030" | "0031" | "0032" | "0033" | "0034" | "0035" | "0036" | "0037" | "0038" | "0039" | "0040" | "0041" | "0042" | "0043" | "0044" | "0045" | "0046" | "0047" | "0048" | "0049" | "0050" | "0051" | "0052" | "0053" | "0054" | "0055" | "0056" | "0057" | "0058" | "0059" | "0060" | "0061" | "0062" | "0063" | "0064" | "0065" | "0066" | "0067" | "0068" | "0069" | "0070" | "0071" | "0072" | "0073" | "0074" | "0075" | "0076" | "0077" | "0078" | "0079" | "0080" | "0081" | "0082" | "0083" | "0084" | "0085" | "0086" | "0087" | "0088" | "0089" | "0090" | "0091" | "0093" | "0094" | "0095" | "0096" | "0097" | "0098" | "0099" | "0100" | "0101" | "0102" | "0104" | "0105" | "0106" | "0107" | "0108" | "0109" | "0110" | "0111" | "0112" | "0113" | "0114" | "0115" | "0116" | "0117" | "0118" | "0119" | "0120" | "0121" | "0122" | "0123" | "0124" | "0125" | "0126" | "0127" | "0128" | "0129" | "0130" | "0131" | "0132" | "0133" | "0134" | "0135" | "0136" | "0137" | "0138" | "0139" | "0140" | "0141" | "0142" | "0143" | "0144" | "0145" | "0146" | "0147" | "0148" | "0149" | "0150" | "0151" | "0152" | "0153" | "0154" | "0155" | "0156" | "0157" | "0158" | "0159" | "0160" | "0161" | "0162" | "0163" | "0164" | "0165" | "0166" | "0167" | "0168" | "0169" | "0170" | "0171" | "0172" | "0173" | "0174" | "0175" | "0176" | "0177" | "0178" | "0179" | "0180" | "0183" | "0184" | "0185" | "0186" | "0187" | "0188" | "0189" | "0190" | "0191" | "0192" | "0193" | "0194" | "0195" | "0196" | "0197" | "0198" | "0199" | "0200" | "0201" | "0202" | "0203" | "0204" | "0205" | "0206" | "0207" | "0208" | "0209" | "0210" | "0211" | "0212" | "0213" | "0214" | "0215" | "0216" | "XR01" | "XR02" | "XR03")[];
description: stri