Documentation / @facturometro/core / 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 ​
import type { Issue } from '@facturometro/core';
const report = (issue: Issue) => `${issue.severity}: [${issue.id}] ${issue.pathString}`;Properties ​
bt? ​
readonlyoptionalbt?: readonlystring[]
Defined in: packages/core/src/issue.ts:118
Business terms (BT-*) the rule is about, verbatim from the specification.
contextPath? ​
readonlyoptionalcontextPath?: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? ​
readonlyoptionalcontextXPath?:string
Defined in: packages/core/src/issue.ts:122
XPath of the rule context, as written in the Schematron.
data? ​
readonlyoptionaldata?: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? ​
readonlyoptionaldefinedBy?:string
Defined in: packages/core/src/issue.ts:126
Id of the ruleset or rule pack that defined the rule.
docsUrl? ​
readonlyoptionaldocsUrl?:string
Defined in: packages/core/src/issue.ts:128
Documentation page of the rule, when it has one.
family? ​
readonlyoptionalfamily?:string
Defined in: packages/core/src/issue.ts:130
Rule family the id belongs to, for example BR-CO or PEPPOL-EN16931.
id ​
readonlyid:string
Defined in: packages/core/src/issue.ts:132
Rule id, for example BR-CO-10, PEPPOL-EN16931-R001 or EINV-XML-ORDER.
location? ​
readonlyoptionallocation?:IssueLocation
Defined in: packages/core/src/issue.ts:134
Position in the source XML, when the document was parsed.
message ​
readonlymessage:string
Defined in: packages/core/src/issue.ts:136
Human-readable message, verbatim from the specification for spec rules.
path ​
readonlypath:ModelPath
Defined in: packages/core/src/issue.ts:138
Where the issue is, as a model path.
pathString ​
readonlypathString:string
Defined in: packages/core/src/issue.ts:140
path rendered for humans, for example invoiceLine[2].price.priceAmount.
ruleset? ​
readonlyoptionalruleset?:RulesetInfo
Defined in: packages/core/src/issue.ts:142
The ruleset that produced the issue.
severity ​
readonlyseverity:Severity
Defined in: packages/core/src/issue.ts:144
Whether the issue makes the document invalid.
source ​
readonlysource:IssueSource
Defined in: packages/core/src/issue.ts:146
Whether the issue comes from a rule or from the document structure.
xpath ​
readonlyxpath:string
Defined in: packages/core/src/issue.ts:148
Where the issue is, as an XPath into the UBL document.