// SPDX-License-Identifier: EUPL-1.2 // Element order and cardinality of the UBL 2.1 complex types that EN 16931 uses, extracted // from the OASIS UBL 2.1 schemas (UBL-Invoice-2.1.xsd, UBL-CreditNote-2.1.xsd, // UBL-CommonAggregateComponents-2.1.xsd). tests/engine/fingerprints.test.ts pins the SHA-256 // of both tables to the values computed from those files. // // Format per line: `TypeName=child,child,...` in schema sequence order. // Child prefixes: `a:` = cac:, `b:` = cbc:, `e:` = ext:. Suffix `!` = minOccurs 1, // `*` = maxOccurs unbounded. No suffix = optional, at most once. export const UBL_XSD_TYPES_SHA256 = "497d48051c133cf685023f380b73a2b701ede0d8835d0cf76d6d3601e97ce055"; export const UBL_XSD_ELEMENT_TYPES_SHA256 = "a711abb79b30bf9cd2b1ca72f4086e9e54fbbd40f8ab9660b1605cefa1df2558"; export const UBL_XSD_TYPES: readonly string[] = [ "InvoiceType=e:UBLExtensions,b:UBLVersionID,b:CustomizationID,b:ProfileID,b:ProfileExecutionID,b:ID!,b:CopyIndicator,b:UUID,b:IssueDate!,b:IssueTime,b:DueDate,b:InvoiceTypeCode,b:Note*,b:TaxPointDate,b:DocumentCurrencyCode,b:TaxCurrencyCode,b:PricingCurrencyCode,b:PaymentCurrencyCode,b:PaymentAlternativeCurrencyCode,b:AccountingCostCode,b:AccountingCost,b:LineCountNumeric,b:BuyerReference,a:InvoicePeriod*,a:OrderReference,a:BillingReference*,a:DespatchDocumentReference*,a:ReceiptDocumentReference*,a:StatementDocumentReference*,a:OriginatorDocumentReference*,a:ContractDocumentReference*,a:AdditionalDocumentReference*,a:ProjectReference*,a:Signature*,a:AccountingSupplierParty!,a:AccountingCustomerParty!,a:PayeeParty,a:BuyerCustomerParty,a:SellerSupplierParty,a:TaxRepresentativeParty,a:Delivery*,a:DeliveryTerms,a:PaymentMeans*,a:PaymentTerms*,a:PrepaidPayment*,a:AllowanceCharge*,a:TaxExchangeRate,a:PricingExchangeRate,a:PaymentExchangeRate,a:PaymentAlternativeExchangeRate,a:TaxTotal*,a:WithholdingTaxTotal*,a:LegalMonetaryTotal!,a:InvoiceLine!*", "CreditNoteType=e:UBLExtensions,b:UBLVersionID,b:CustomizationID,b:ProfileID,b:ProfileExecutionID,b:ID!,b:CopyIndicator,b:UUID,b:IssueDate!,b:IssueTime,b:TaxPointDate,b:CreditNoteTypeCode,b:Note*,b:DocumentCurrencyCode,b:TaxCurrencyCode,b:PricingCurrencyCode,b:PaymentCurrencyCode,b:PaymentAlternativeCurrencyCode,b:AccountingCostCode,b:AccountingCost,b:LineCountNumeric,b:BuyerReference,a:InvoicePeriod*,a:DiscrepancyResponse*,a:OrderReference,a:BillingReference*,a:DespatchDocumentReference*,a:ReceiptDocumentReference*,a:ContractDocumentReference*,a:AdditionalDocumentReference*,a:StatementDocumentReference*,a:OriginatorDocumentReference*,a:Signature*,a:AccountingSupplierParty!,a:AccountingCustomerParty!,a:PayeeParty,a:BuyerCustomerParty,a:SellerSupplierParty,a:TaxRepresentativeParty,a:Delivery*,a:DeliveryTerms*,a:PaymentMeans*,a:PaymentTerms*,a:TaxExchangeRate,a:PricingExchangeRate,a:PaymentExchangeRate,a:PaymentAlternativeExchangeRate,a:AllowanceCharge*,a:TaxTotal*,a:LegalMonetaryTotal!,a:CreditNoteLine!*", "PeriodType=b:StartDate,b:StartTime,b:EndDate,b:EndTime,b:DurationMeasure,b:DescriptionCode*,b:Description*", "OrderReferenceType=b:ID!,b:SalesOrderID,b:CopyIndicator,b:UUID,b:IssueDate,b:IssueTime,b:CustomerReference,b:OrderTypeCode,a:DocumentReference", "BillingReferenceType=a:InvoiceDocumentReference,a:SelfBilledInvoiceDocumentReference,a:CreditNoteDocumentReference,a:SelfBilledCreditNoteDocumentReference,a:DebitNoteDocumentReference,a:ReminderDocumentReference,a:AdditionalDocumentReference,a:BillingReferenceLine*", "DocumentReferenceType=b:ID!,b:CopyIndicator,b:UUID,b:IssueDate,b:IssueTime,b:DocumentTypeCode,b:DocumentType,b:XPath*,b:LanguageID,b:LocaleCode,b:VersionID,b:DocumentStatusCode,b:DocumentDescription*,a:Attachment,a:ValidityPeriod,a:IssuerParty,a:ResultOfVerification", "AttachmentType=b:EmbeddedDocumentBinaryObject,a:ExternalReference", "ExternalReferenceType=b:URI,b:DocumentHash,b:HashAlgorithmMethod,b:ExpiryDate,b:ExpiryTime,b:MimeCode,b:FormatCode,b:EncodingCode,b:CharacterSetCode,b:FileName,b:Description*", "ProjectReferenceType=b:ID!,b:UUID,b:IssueDate,a:WorkPhaseReference*", "SupplierPartyType=b:CustomerAssignedAccountID,b:AdditionalAccountID*,b:DataSendingCapability,a:Party,a:DespatchContact,a:AccountingContact,a:SellerContact", "CustomerPartyType=b:CustomerAssignedAccountID,b:SupplierAssignedAccountID,b:AdditionalAccountID*,a:Party,a:DeliveryContact,a:AccountingContact,a:BuyerContact", "PartyType=b:MarkCareIndicator,b:MarkAttentionIndicator,b:WebsiteURI,b:LogoReferenceID,b:EndpointID,b:IndustryClassificationCode,a:PartyIdentification*,a:PartyName*,a:Language,a:PostalAddress,a:PhysicalLocation,a:PartyTaxScheme*,a:PartyLegalEntity*,a:Contact,a:Person*,a:AgentParty,a:ServiceProviderParty*,a:PowerOfAttorney*,a:FinancialAccount", "PartyIdentificationType=b:ID!", "PartyNameType=b:Name!", "AddressType=b:ID,b:AddressTypeCode,b:AddressFormatCode,b:Postbox,b:Floor,b:Room,b:StreetName,b:AdditionalStreetName,b:BlockName,b:BuildingName,b:BuildingNumber,b:InhouseMail,b:Department,b:MarkAttention,b:MarkCare,b:PlotIdentification,b:CitySubdivisionName,b:CityName,b:PostalZone,b:CountrySubentity,b:CountrySubentityCode,b:Region,b:District,b:TimezoneOffset,a:AddressLine*,a:Country,a:LocationCoordinate*", "AddressLineType=b:Line!", "CountryType=b:IdentificationCode,b:Name", "PartyTaxSchemeType=b:RegistrationName,b:CompanyID,b:TaxLevelCode,b:ExemptionReasonCode,b:ExemptionReason*,a:RegistrationAddress,a:TaxScheme!", "TaxSchemeType=b:ID,b:Name,b:TaxTypeCode,b:CurrencyCode,a:JurisdictionRegionAddress*", "PartyLegalEntityType=b:RegistrationName,b:CompanyID,b:RegistrationDate,b:RegistrationExpirationDate,b:CompanyLegalFormCode,b:CompanyLegalForm,b:SoleProprietorshipIndicator,b:CompanyLiquidationStatusCode,b:CorporateStockAmount,b:FullyPaidSharesIndicator,a:RegistrationAddress,a:CorporateRegistrationScheme,a:HeadOfficeParty,a:ShareholderParty*", "ContactType=b:ID,b:Name,b:Telephone,b:Telefax,b:ElectronicMail,b:Note*,a:OtherCommunication*", "DeliveryType=b:ID,b:Quantity,b:MinimumQuantity,b:MaximumQuantity,b:ActualDeliveryDate,b:ActualDeliveryTime,b:LatestDeliveryDate,b:LatestDeliveryTime,b:ReleaseID,b:TrackingID,a:DeliveryAddress,a:DeliveryLocation,a:AlternativeDeliveryLocation,a:RequestedDeliveryPeriod,a:PromisedDeliveryPeriod,a:EstimatedDeliveryPeriod,a:CarrierParty,a:DeliveryParty,a:NotifyParty*,a:Despatch,a:DeliveryTerms*,a:MinimumDeliveryUnit,a:MaximumDeliveryUnit,a:Shipment", "LocationType=b:ID,b:Description*,b:Conditions*,b:CountrySubentity,b:CountrySubentityCode,b:LocationTypeCode,b:InformationURI,b:Name,a:ValidityPeriod*,a:Address,a:SubsidiaryLocation*,a:LocationCoordinate*", "PaymentMeansType=b:ID,b:PaymentMeansCode!,b:PaymentDueDate,b:PaymentChannelCode,b:InstructionID,b:InstructionNote*,b:PaymentID*,a:CardAccount,a:PayerFinancialAccount,a:PayeeFinancialAccount,a:CreditAccount,a:PaymentMandate,a:TradeFinancing", "CardAccountType=b:PrimaryAccountNumberID!,b:NetworkID!,b:CardTypeCode,b:ValidityStartDate,b:ExpiryDate,b:IssuerID,b:IssueNumberID,b:CV2ID,b:CardChipCode,b:ChipApplicationID,b:HolderName", "FinancialAccountType=b:ID,b:Name,b:AliasName,b:AccountTypeCode,b:AccountFormatCode,b:CurrencyCode,b:PaymentNote*,a:FinancialInstitutionBranch,a:Country", "BranchType=b:ID,b:Name,a:FinancialInstitution,a:Address", "PaymentMandateType=b:ID,b:MandateTypeCode,b:MaximumPaymentInstructionsNumeric,b:MaximumPaidAmount,b:SignatureID,a:PayerParty,a:PayerFinancialAccount,a:ValidityPeriod,a:PaymentReversalPeriod,a:Clause*", "PaymentTermsType=b:ID,b:PaymentMeansID*,b:PrepaidPaymentReferenceID,b:Note*,b:ReferenceEventCode,b:SettlementDiscountPercent,b:PenaltySurchargePercent,b:PaymentPercent,b:Amount,b:SettlementDiscountAmount,b:PenaltyAmount,b:PaymentTermsDetailsURI,b:PaymentDueDate,b:InstallmentDueDate,b:InvoicingPartyReference,a:SettlementPeriod,a:PenaltyPeriod,a:ExchangeRate,a:ValidityPeriod", "AllowanceChargeType=b:ID,b:ChargeIndicator!,b:AllowanceChargeReasonCode,b:AllowanceChargeReason*,b:MultiplierFactorNumeric,b:PrepaidIndicator,b:SequenceNumeric,b:Amount!,b:BaseAmount,b:AccountingCostCode,b:AccountingCost,b:PerUnitAmount,a:TaxCategory*,a:TaxTotal,a:PaymentMeans*", "TaxCategoryType=b:ID,b:Name,b:Percent,b:BaseUnitMeasure,b:PerUnitAmount,b:TaxExemptionReasonCode,b:TaxExemptionReason*,b:TierRange,b:TierRatePercent,a:TaxScheme!", "TaxTotalType=b:TaxAmount!,b:RoundingAmount,b:TaxEvidenceIndicator,b:TaxIncludedIndicator,a:TaxSubtotal*", "TaxSubtotalType=b:TaxableAmount,b:TaxAmount!,b:CalculationSequenceNumeric,b:TransactionCurrencyTaxAmount,b:Percent,b:BaseUnitMeasure,b:PerUnitAmount,b:TierRange,b:TierRatePercent,a:TaxCategory!", "MonetaryTotalType=b:LineExtensionAmount,b:TaxExclusiveAmount,b:TaxInclusiveAmount,b:AllowanceTotalAmount,b:ChargeTotalAmount,b:PrepaidAmount,b:PayableRoundingAmount,b:PayableAmount!,b:PayableAlternativeAmount", "InvoiceLineType=b:ID!,b:UUID,b:Note*,b:InvoicedQuantity,b:LineExtensionAmount!,b:TaxPointDate,b:AccountingCostCode,b:AccountingCost,b:PaymentPurposeCode,b:FreeOfChargeIndicator,a:InvoicePeriod*,a:OrderLineReference*,a:DespatchLineReference*,a:ReceiptLineReference*,a:BillingReference*,a:DocumentReference*,a:PricingReference,a:OriginatorParty,a:Delivery*,a:PaymentTerms*,a:AllowanceCharge*,a:TaxTotal*,a:WithholdingTaxTotal*,a:Item!,a:Price,a:DeliveryTerms,a:SubInvoiceLine*,a:ItemPriceExtension", "CreditNoteLineType=b:ID!,b:UUID,b:Note*,b:CreditedQuantity,b:LineExtensionAmount,b:TaxPointDate,b:AccountingCostCode,b:AccountingCost,b:PaymentPurposeCode,b:FreeOfChargeIndicator,a:InvoicePeriod*,a:OrderLineReference*,a:DiscrepancyResponse*,a:DespatchLineReference*,a:ReceiptLineReference*,a:BillingReference*,a:DocumentReference*,a:PricingReference,a:OriginatorParty,a:Delivery*,a:PaymentTerms*,a:TaxTotal*,a:AllowanceCharge*,a:Item,a:Price,a:DeliveryTerms*,a:SubCreditNoteLine*,a:ItemPriceExtension", "OrderLineReferenceType=b:LineID!,b:SalesOrderLineID,b:UUID,b:LineStatusCode,a:OrderReference", "ItemType=b:Description*,b:PackQuantity,b:PackSizeNumeric,b:CatalogueIndicator,b:Name,b:HazardousRiskIndicator,b:AdditionalInformation*,b:Keyword*,b:BrandName*,b:ModelName*,a:BuyersItemIdentification,a:SellersItemIdentification,a:ManufacturersItemIdentification*,a:StandardItemIdentification,a:CatalogueItemIdentification,a:AdditionalItemIdentification*,a:CatalogueDocumentReference,a:ItemSpecificationDocumentReference*,a:OriginCountry,a:CommodityClassification*,a:TransactionConditions*,a:HazardousItem*,a:ClassifiedTaxCategory*,a:AdditionalItemProperty*,a:ManufacturerParty*,a:InformationContentProviderParty,a:OriginAddress*,a:ItemInstance*,a:Certificate*,a:Dimension*", "ItemIdentificationType=b:ID!,b:ExtendedID,b:BarcodeSymbologyID,a:PhysicalAttribute*,a:MeasurementDimension*,a:IssuerParty", "CommodityClassificationType=b:NatureCode,b:CargoTypeCode,b:CommodityCode,b:ItemClassificationCode", "ItemPropertyType=b:ID,b:Name!,b:NameCode,b:TestMethod,b:Value,b:ValueQuantity,b:ValueQualifier*,b:ImportanceCode,b:ListValue*,a:UsabilityPeriod,a:ItemPropertyGroup*,a:RangeDimension,a:ItemPropertyRange", "PriceType=b:PriceAmount!,b:BaseQuantity,b:PriceChangeReason*,b:PriceTypeCode,b:PriceType,b:OrderableUnitFactorRate,a:ValidityPeriod*,a:PriceList,a:AllowanceCharge*,a:PricingExchangeRate" ]; /** `ElementName>TypeName` for every cac element whose type is in UBL_XSD_TYPES. */ export const UBL_XSD_ELEMENT_TYPES = "AccountingContact>ContactType AccountingCustomerParty>CustomerPartyType AccountingSupplierParty>SupplierPartyType AdditionalDocumentReference>DocumentReferenceType AdditionalItemIdentification>ItemIdentificationType AdditionalItemProperty>ItemPropertyType Address>AddressType AddressLine>AddressLineType AgentParty>PartyType AllowanceCharge>AllowanceChargeType AlternativeDeliveryLocation>LocationType Attachment>AttachmentType BillingReference>BillingReferenceType BuyerContact>ContactType BuyerCustomerParty>CustomerPartyType BuyersItemIdentification>ItemIdentificationType CardAccount>CardAccountType CarrierParty>PartyType CatalogueDocumentReference>DocumentReferenceType CatalogueItemIdentification>ItemIdentificationType ClassifiedTaxCategory>TaxCategoryType CommodityClassification>CommodityClassificationType Contact>ContactType ContractDocumentReference>DocumentReferenceType Country>CountryType CreditNoteDocumentReference>DocumentReferenceType CreditNoteLine>CreditNoteLineType DebitNoteDocumentReference>DocumentReferenceType Delivery>DeliveryType DeliveryAddress>AddressType DeliveryContact>ContactType DeliveryLocation>LocationType DeliveryParty>PartyType DespatchContact>ContactType DespatchDocumentReference>DocumentReferenceType DocumentReference>DocumentReferenceType EstimatedDeliveryPeriod>PeriodType ExternalReference>ExternalReferenceType FinancialAccount>FinancialAccountType FinancialInstitutionBranch>BranchType HeadOfficeParty>PartyType InformationContentProviderParty>PartyType InvoiceDocumentReference>DocumentReferenceType InvoiceLine>InvoiceLineType InvoicePeriod>PeriodType IssuerParty>PartyType Item>ItemType ItemSpecificationDocumentReference>DocumentReferenceType JurisdictionRegionAddress>AddressType LegalMonetaryTotal>MonetaryTotalType ManufacturerParty>PartyType ManufacturersItemIdentification>ItemIdentificationType NotifyParty>PartyType OrderLineReference>OrderLineReferenceType OrderReference>OrderReferenceType OriginAddress>AddressType OriginCountry>CountryType OriginatorDocumentReference>DocumentReferenceType OriginatorParty>PartyType Party>PartyType PartyIdentification>PartyIdentificationType PartyLegalEntity>PartyLegalEntityType PartyName>PartyNameType PartyTaxScheme>PartyTaxSchemeType PayeeFinancialAccount>FinancialAccountType PayeeParty>PartyType PayerFinancialAccount>FinancialAccountType PayerParty>PartyType PaymentMandate>PaymentMandateType PaymentMeans>PaymentMeansType PaymentReversalPeriod>PeriodType PaymentTerms>PaymentTermsType PenaltyPeriod>PeriodType PhysicalLocation>LocationType PostalAddress>AddressType Price>PriceType ProjectReference>ProjectReferenceType PromisedDeliveryPeriod>PeriodType ReceiptDocumentReference>DocumentReferenceType RegistrationAddress>AddressType ReminderDocumentReference>DocumentReferenceType RequestedDeliveryPeriod>PeriodType SelfBilledCreditNoteDocumentReference>DocumentReferenceType SelfBilledInvoiceDocumentReference>DocumentReferenceType SellerContact>ContactType SellerSupplierParty>SupplierPartyType SellersItemIdentification>ItemIdentificationType SettlementPeriod>PeriodType StandardItemIdentification>ItemIdentificationType StatementDocumentReference>DocumentReferenceType SubCreditNoteLine>CreditNoteLineType SubInvoiceLine>InvoiceLineType SubsidiaryLocation>LocationType TaxCategory>TaxCategoryType TaxRepresentativeParty>PartyType TaxScheme>TaxSchemeType TaxSubtotal>TaxSubtotalType TaxTotal>TaxTotalType UsabilityPeriod>PeriodType ValidityPeriod>PeriodType WithholdingTaxTotal>TaxTotalType";