Documentation / @facturometro/einvoice / ruleDocsUrl
Function: ruleDocsUrl() ​
ruleDocsUrl(
id):string|undefined
Defined in: packages/core/src/constants.ts:136
Builds the documentation URL of a validation rule.
Peppol and national rule ids are documented under rules/ubl-peppol, EN 16931 (BR-*) and UBL (UBL-*) rule ids under rules/ubl-tc434. Ids that have no page on the Peppol documentation site - custom rule ids and this library's own EINV-* diagnostics - yield undefined.
Parameters ​
id ​
string
Rule id, for example PEPPOL-EN16931-R001 or BR-CO-10.
Returns ​
string | undefined
The documentation URL, or undefined when the id is not documented upstream.
Example ​
ts
import { ruleDocsUrl } from '@facturometro/core';
ruleDocsUrl('BR-01'); // 'https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-tc434/BR-01/'
ruleDocsUrl('ACME-R-001'); // undefined