/** * The longest Belegfeld 1 and 2 (Buchungsstapel fields 11 and 12). On the * length of Belegfeld 2 the German page gives 36 and the English page 12 * (read 2026-09-25); 36 is kept. */ export declare const DATEV_MAX_BELEGFELD = 36; /** The longest Beleginfo-Art (fields 21, 23 … 35). */ export declare const DATEV_MAX_BELEGINFO_ART = 20; /** The longest Beleginfo-Inhalt (fields 22, 24 … 36). */ export declare const DATEV_MAX_BELEGINFO_INHALT = 210; /** How many Beleginfo pairs a row has (fields 21 to 36). */ export declare const DATEV_MAX_BELEGINFO_PAIRS = 8; /** One Beleginfo pair of a Buchungsstapel row (fields 21 to 36): what the information is, and the information. */ export interface IDatevBelegInfo { art: string; inhalt: string; } /** Whether a value is a Belegfeld 1 or 2 DATEV takes: 1 to 36 of ASCII letters, digits and `$ & % * + - /`. */ export declare function isDatevBelegfeld(value: unknown): boolean; /** Why a Beleginfo is not one DATEV takes, or `undefined` where it is: 1 to 8 pairs, each of both parts within their lengths. */ export declare function datevBelegInfoFault(belegInfo: unknown): string | undefined; /** * The Belegfeld 1 or 2 DATEV takes for a text, one deterministic mapping for * an invoice, its payments, its corrections, a set-off, the carry-forward and * the opening alike, so they share the open item's key. A value DATEV takes is * its own Belegfeld, unchanged. Any other text: the umlauts and ß * transliterated (ä → ae, ß → ss), every other character DATEV does not take * a `-`, runs of `-` one, none at either end; then, since that lost what the * text was (a space, a dot, a cut at 36), `-` and six base-36 characters of * the SHA-256 of the original text, the whole within 36 characters: `RE 1` * gives `RE-1-` and its hash, never `RE-1`, so two texts that map alike stay * apart. `undefined` for a text of nothing but white space. */ export declare function datevBelegfeldOf(text: string): string | undefined; /** * A text's Belegfeld (`datevBelegfeldOf`) with, where the mapping changed it, * the original text as a Beleginfo pair (`art`, by default * "Rechnungsnummer"), its Inhalt cut at 210 characters: what DATEV shows of * the Beleg beside the key. `undefined` for a text of nothing but white space. */ export declare function datevBelegfeldWithInfoOf(text: string, art?: string): { belegfeld: string; belegInfo?: IDatevBelegInfo[]; } | undefined; /** What a caller states of a Buchungsstapel row's Belegfelder: Belegfeld 1 and 2, and its own Beleginfo, if any. */ export interface IDatevBelegfelder { belegfeld1?: string; belegfeld2?: string; belegInfo?: IDatevBelegInfo[]; } /** * The Belegfelder a Buchungsstapel row is written with (SKR-BF1): Belegfeld * 1 and 2 as DATEV takes them (`datevBelegfeldOf`; a text of nothing but white * space is none), and, where that changed a text, the original as a Beleginfo * pair ("Rechnungsnummer" for Belegfeld 1, "Belegfeld 2" for Belegfeld 2, * the Inhalt cut at 210 characters), unless the caller gave a Beleginfo of its * own. `mapped` names the fields the mapping changed. Deterministic: an * invoice and its payment that state one text get one Belegfeld 1. */ export declare function datevBelegfelderOf(fields: IDatevBelegfelder): IDatevBelegfelder & { mapped: Array<'belegfeld1' | 'belegfeld2'>; };