Skip to content

Documentation / @facturometro/einvoice / Issue

Interface: Issue ​

Defined in: packages/core/src/issue.ts:116

One diagnostic: a rule violation or a structural problem found in a document.

Example ​

ts
import type { Issue } from '@facturometro/core';

const report = (issue: Issue) => `${issue.severity}: [${issue.id}] ${issue.pathString}`;

Properties ​

bt? ​

readonly optional bt?: readonly string[]

Defined in: packages/core/src/issue.ts:118

Business terms (BT-*) the rule is about, verbatim from the specification.


contextPath? ​

readonly optional contextPath?: ModelPath

Defined in: packages/core/src/issue.ts:120

Model path of the rule context, when the reported path was refined to a child.


contextXPath? ​

readonly optional contextXPath?: string

Defined in: packages/core/src/issue.ts:122

XPath of the rule context, as written in the Schematron.


data? ​

readonly optional data?: Readonly<Record<string, string>>

Defined in: packages/core/src/issue.ts:124

Values that explain the failure, for example { actual: '99.00', expected: '100.00' }.


definedBy? ​

readonly optional definedBy?: string

Defined in: packages/core/src/issue.ts:126

Id of the ruleset or rule pack that defined the rule.


docsUrl? ​

readonly optional docsUrl?: string

Defined in: packages/core/src/issue.ts:128

Documentation page of the rule, when it has one.


family? ​

readonly optional family?: string

Defined in: packages/core/src/issue.ts:130

Rule family the id belongs to, for example BR-CO or PEPPOL-EN16931.


id ​

readonly id: string

Defined in: packages/core/src/issue.ts:132

Rule id, for example BR-CO-10, PEPPOL-EN16931-R001 or EINV-XML-ORDER.


location? ​

readonly optional location?: IssueLocation

Defined in: packages/core/src/issue.ts:134

Position in the source XML, when the document was parsed.


message ​

readonly message: string

Defined in: packages/core/src/issue.ts:136

Human-readable message, verbatim from the specification for spec rules.


path ​

readonly path: ModelPath

Defined in: packages/core/src/issue.ts:138

Where the issue is, as a model path.


pathString ​

readonly pathString: string

Defined in: packages/core/src/issue.ts:140

path rendered for humans, for example invoiceLine[2].price.priceAmount.


ruleset? ​

readonly optional ruleset?: RulesetInfo

Defined in: packages/core/src/issue.ts:142

The ruleset that produced the issue.


severity ​

readonly severity: Severity

Defined in: packages/core/src/issue.ts:144

Whether the issue makes the document invalid.


source ​

readonly source: IssueSource

Defined in: packages/core/src/issue.ts:146

Whether the issue comes from a rule or from the document structure.


xpath ​

readonly xpath: string

Defined in: packages/core/src/issue.ts:148

Where the issue is, as an XPath into the UBL document.

MIT licensed. Specification artefacts belong to OpenPEPPOL, CEN and OASIS.