@kreiseck/kasseneck-api 1.34.0 → 1.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ Was vor 0.7.0 geschah, steht in der Commit-Historie (`git log`); ab hier wird
4
4
  es hier geführt. Ein Eintrag nennt die Änderung **und ihren Grund** —
5
5
  nur der Grund überlebt den nächsten Umbau.
6
6
 
7
+ ## 1.35.0 - unveröffentlicht
8
+
9
+ Printer catalog for setting up a receipt printer through Kasseneck Connect with one click. Additive; every existing call, receipt and golden behaves as before.
10
+
11
+ - **`printerCatalogEntry(model: string | null | undefined)`** (`./pos`) returns the approved catalog entry for a model name as Connect reports it (mDNS, `GS I`), or `null` for an unknown model; `undefined` is allowed because Connect leaves `model` out of a find it cannot name. **`printerCatalogSettings(entry)`** returns what the entry proposes for the first setup: `device` (`paperSize`, `codePage`, `cut`, `qrMode`, `drawerEnabled`), sendable as it is with `setMyRegisterDeviceSettings`, and `paperSizeNeedsCheck`. Reason: the boss should set up a known printer without knowing paper width, code page or QR mode; an unknown model only asks for the paper width.
12
+ - **Paper width:** an entry lists the paper size settings that fit the model (`paperSizes`; another roll needs the paper guide and a printer setting) and its factory setting (`values.paperSize`), plus `nativeCharsPerLine`, the font A columns the printer has at its factory setting (data sheet). No size in `paperSizes` may lay out more characters than that. When there is more than one, `paperSizeNeedsCheck` is `true`: the proposed width is only the factory setting, and the till confirms it with a test print at the first setup. `drawerEnabled` (from `drawerKick`) is only a proposal for the first setup as well; the till never overrides a choice the boss made.
13
+ - **Only approved entries count.** An entry that is not approved behaves like an unknown model. Approval needs a complete device test: date, Connect version, printer firmware, who tested, every value field checked (`checked`, the code page with € and umlauts) and a print at every paper width (`checkedPaperSizes`).
14
+ - **Starting stock**, not approved yet, so `printerCatalogEntry` answers `null` for every model until a device test approves an entry in a later version: Epson TM-m30III, TM-m30II and TM-T20III (80 mm and 48 characters by default, 58 mm with the paper guide according to the Epson data sheet), TM-m10 (58 mm only, 32 characters) and TM-T88VI, TM-T88VII; all with drawer port, QR from the printer, CP1252. The TM-T88 models print at 180 dpi (512 dots on 80 mm, font A 42 columns), so 48 characters do not fit: they get the till's 32-character layout (`paperSize: 'mm58'`, the 384 dots of `GS W` fit into their 512) even with 80 mm paper, never propose `mm80` and need no width confirmation, until there is a 42-character setting.
15
+ - **Model names are normalized** before matching: `a-z` to upper case (ASCII only), any other character outside ASCII that is neither punctuation nor white space (`Ï`, `ı`, `é`, `®`, `ff`) makes the name unknown, every run of other characters than `A-Z`/`0-9` becomes one `-`, none at the edges, and one leading manufacturer of the catalog (`EPSON-`, the longest first) is dropped. `TM-m30III`, `EPSON TM-m30III`, `tm m30iii` and `(EPSON TM-m30III)` find the same entry. Separators stay as one `-` instead of disappearing, because `TM-T20II-i` is a model of its own and would otherwise match `TM-T20III`; written without the hyphen (`TM-T20IIi`) it cannot be told apart. Matching is exact: `TM-m30III-H`, `TM-T88V` or `TM-m30` are unknown.
16
+ - **Values only from the device settings:** `cut` is `partial` or `none` (what the till offers), `qrMode` `escpos` or `raster` (`auto` means "not decided" and says nothing about a model), and `charsPerLine` must match the factory paper size (`CHARS_PER_PAPER_SIZE`: 32 for `mm58`, 48 for `mm80`).
17
+ - **Contract:** new file `fixtures/printer-catalog.json` with the entries, the value sets and the test cases (normalization, lookup with the shipped catalog, with every entry approved, with some approved and with a catalog of its own with overlapping manufacturers, proposals, catalog problems such as a match name in two entries, a paper size wider than the printer or an incomplete device test). The Dart twin computes the same cases. The catalog itself is checked only by the tests; at run time nothing is repaired or dropped silently.
18
+
7
19
  ## 1.34.0 - unveröffentlicht
8
20
 
9
21
  Read the deposit types of a business with the API key: new `listDepositTypes()` on the API client (`/v3` only, right `read`, no effect). Additive; every existing call, receipt and golden behaves as before.
package/README.md CHANGED
@@ -208,7 +208,7 @@ adapter:
208
208
  | `…/printing` | ESC/POS generation (byte sequences for thermal printers), QR sizing, printing over WebUSB. |
209
209
  | `…/payments` | Stripe payment links, Hobex cloud (both HTTP endpoints of the backend), and Hobex **HPS** via **Kasseneck Connect** (local device agent that talks to the terminal). |
210
210
  | `…/register` | Sign-in for the browser register: pair and unpair a device, list its users and sessions, sign in by PIN, renew and end the session. |
211
- | `…/pos` | Tile register: register settings (business-wide and per device), article groups and articles for tiles, discount distribution per VAT rate, scopes of register permissions, network printers and print jobs, tip recipients, the register's message catalogue. |
211
+ | `…/pos` | Tile register: register settings (business-wide and per device), article groups and articles for tiles, discount distribution per VAT rate, scopes of register permissions, network printers and print jobs, the printer catalog for setting up a printer through Kasseneck Connect, tip recipients, the register's message catalogue. |
212
212
  | `…/partner` | Partner API (`/v3`, English): create businesses, FinanzOnline link, signature, cash registers, credentials, webhooks with signature verification. **Belongs on a server.** |
213
213
  | `…/stored` | Stored Firestore documents (inner form, German) as the same English models the `/v3` wire returns: receipts with company and layout, register settings, articles. For clients that read Firestore directly, such as the admin panel. |
214
214
  | `…/invoice` | Invoice API: create and search customers, issue finalised invoices, credit notes and cancellation, PDF and e-invoice XML, the contract as data. **Belongs on a server.** |
@@ -1048,6 +1048,16 @@ the register's text catalogue (`MESSAGES`, `LABELS`, `messageText`,
1048
1048
  `messageText('checkout.locked', { reason })`. The rendered German texts are
1049
1049
  the same as in 0.x.
1050
1050
 
1051
+ **Printer catalog.** `printerCatalogEntry(model)` finds the approved catalog
1052
+ entry for a model name as Kasseneck Connect reports it (case, a leading
1053
+ `EPSON` and the kind of separator do not count; `null` for an unknown model),
1054
+ and `printerCatalogSettings(entry)` returns what it proposes for the first
1055
+ setup: `device` (`paperSize`, `codePage`, `cut`, `qrMode`, `drawerEnabled`)
1056
+ and `paperSizeNeedsCheck`, `true` when the model can be switched to another
1057
+ paper width and the till should confirm it with a test print. Only entries
1058
+ approved after a complete device test count; the entries and their test cases
1059
+ are in `fixtures/printer-catalog.json`.
1060
+
1051
1061
  **Stock at the register.** Three calls on the register path (`/api/v3` only),
1052
1062
  permissions checked by the server (`stockView`, `stockCosts`, `stockLocation`
1053
1063
  in `REGISTER_PERMS`):
@@ -0,0 +1,148 @@
1
+ import { type PosCodePage, type PosPaperSize } from './settings.js';
2
+ /**
3
+ * Schnitt eines Eintrags: nur, was die Kasse unter „Papier abschneiden“ anbietet (Teilschnitt oder keiner). Die
4
+ * Einstellung kennt auch `full`, Bondrucker schneiden aber nie ganz durch; ein Katalogwert, den die Kasse nicht
5
+ * anzeigt, waere fuer den Chef nicht pruefbar.
6
+ */
7
+ export declare const PRINTER_CATALOG_CUTS: readonly ["partial", "none"];
8
+ export type PrinterCatalogCut = typeof PRINTER_CATALOG_CUTS[number];
9
+ /** QR-Weg eines Eintrags. `auto` heisst „noch niemand hat entschieden“ und ist darum keine Aussage ueber ein Modell. */
10
+ export declare const PRINTER_CATALOG_QR_MODES: readonly ["escpos", "raster"];
11
+ export type PrinterCatalogQrMode = typeof PRINTER_CATALOG_QR_MODES[number];
12
+ /** Druck-Werte eines Modells mit den Namen und Werten der Geraete-Einstellungen unter /v3. */
13
+ export interface PrinterCatalogValues {
14
+ /** Werkseinstellung der Papierbreite; welche Breiten das Modell sonst kann, steht in `paperSizes`. */
15
+ readonly paperSize: PosPaperSize;
16
+ /**
17
+ * Zeichen je Zeile bei der Werkseinstellung, im Geraetetest bestaetigt. Keine Einstellung: die Kasse leitet sie aus
18
+ * `paperSize` ab (CHARS_PER_PAPER_SIZE). Der Eintrag haelt fest, dass beides an diesem Drucker zusammenpasst; ein
19
+ * Drucker mit anderer Zeichenzahl braeuchte erst eine neue Einstellung.
20
+ */
21
+ readonly charsPerLine: number;
22
+ readonly cut: PrinterCatalogCut;
23
+ /** Ladenanschluss, der auf den Impuls der Kasse (ESC p 0 25 250) oeffnet. */
24
+ readonly drawerKick: boolean;
25
+ readonly qrMode: PrinterCatalogQrMode;
26
+ readonly codePage: PosCodePage;
27
+ }
28
+ /** Ein Wertfeld eines Eintrags; der Geraetetest nennt, welche am Geraet geprueft sind. */
29
+ export type PrinterCatalogValueField = keyof PrinterCatalogValues;
30
+ /** Alle Wertfelder, in der Reihenfolge von [PrinterCatalogValues]; ein Test haelt sie vollstaendig. */
31
+ export declare const PRINTER_CATALOG_VALUE_FIELDS: readonly ["paperSize", "charsPerLine", "cut", "drawerKick", "qrMode", "codePage"];
32
+ /** Protokoll des Geraetetests, der einen Eintrag freigibt. */
33
+ export interface PrinterDeviceTest {
34
+ /** Tag des Tests, `JJJJ-MM-TT` (Wiener Tag). */
35
+ readonly date: string;
36
+ /** Version von Kasseneck Connect, mit der geprueft wurde. */
37
+ readonly connectVersion: string;
38
+ /** Firmware des geprueften Druckers. */
39
+ readonly firmware: string;
40
+ /** Wer geprueft hat: Kuerzel, kein voller Name (die Datei reist im Paket mit). */
41
+ readonly testedBy: string;
42
+ /**
43
+ * Die am Geraet geprueften Wertfelder (`codePage` heisst: € und Umlaute stehen richtig am Bon). Vollstaendig ist der
44
+ * Test erst mit jedem Feld aus `values`: eine Freigabe soll nichts behaupten, was niemand gesehen hat.
45
+ */
46
+ readonly checked: readonly PrinterCatalogValueField[];
47
+ /** Die Papierbreiten, mit denen am Geraet gedruckt wurde; jede aus `paperSizes` muss dabei sein. */
48
+ readonly checkedPaperSizes: readonly PosPaperSize[];
49
+ }
50
+ /** Freigabe eines Eintrags. Nur `approved: true` wirkt; ohne vollstaendigen Geraetetest gibt es keine Freigabe. */
51
+ export interface PrinterCatalogApproval {
52
+ readonly approved: boolean;
53
+ readonly deviceTest: PrinterDeviceTest | null;
54
+ }
55
+ export interface PrinterCatalogEntry {
56
+ /** Feste Kennung `<hersteller>-<modell>`, klein. */
57
+ readonly id: string;
58
+ readonly manufacturer: string;
59
+ /** Modellname zum Anzeigen, so geschrieben wie vom Hersteller. */
60
+ readonly model: string;
61
+ /** Normierte Modellnamen (aus mDNS und `GS I`), an denen der Eintrag erkannt wird. */
62
+ readonly matchNames: readonly string[];
63
+ /**
64
+ * Die Einstellungen der Papierbreite, die an diesem Modell passen (fuer eine andere Rolle mit Papierfuehrung und
65
+ * Einstellung am Drucker), in der Reihenfolge von PAPER_SIZE. Mehr als eine heisst: die Werkseinstellung in `values`
66
+ * kann am Geraet anders stehen.
67
+ */
68
+ readonly paperSizes: readonly PosPaperSize[];
69
+ /**
70
+ * Zeichen je Zeile, die der Drucker in seiner Werkseinstellung mit Schrift A selbst druckt (Datenblatt). Keine
71
+ * Breite aus `paperSizes` darf mehr Zeichen setzen; ist es mehr als `values.charsPerLine`, nutzt die Kasse bewusst
72
+ * ihr schmaleres Layout, bis es eine Einstellung mit dieser Zeichenzahl gibt.
73
+ */
74
+ readonly nativeCharsPerLine: number;
75
+ readonly values: PrinterCatalogValues;
76
+ readonly approval: PrinterCatalogApproval;
77
+ }
78
+ /** Der Teil der Geraete-Einstellungen, den ein bekanntes Modell beim ersten Einrichten vorschlaegt. */
79
+ export interface PrinterCatalogDeviceSettings {
80
+ readonly paperSize: PosPaperSize;
81
+ readonly codePage: PosCodePage;
82
+ readonly cut: PrinterCatalogCut;
83
+ readonly qrMode: PrinterCatalogQrMode;
84
+ /**
85
+ * Aus `drawerKick`: nur ein Vorschlag fuer das erste Einrichten. Hat der Chef die Lade bewusst ausgeschaltet, bleibt
86
+ * sie aus; die Kasse ueberschreibt eine getroffene Wahl nie.
87
+ */
88
+ readonly drawerEnabled: boolean;
89
+ }
90
+ /** Was ein Eintrag beim Einrichten vorschlaegt. */
91
+ export interface PrinterCatalogSettings {
92
+ /** Unveraendert als Teil der Geraete-Einstellungen sendbar (setMyRegisterDeviceSettings). */
93
+ readonly device: PrinterCatalogDeviceSettings;
94
+ /**
95
+ * Das Modell kann mehr als eine Papierbreite: `device.paperSize` ist dann nur die Werkseinstellung, und die Kasse
96
+ * bestaetigt die Breite beim ersten Einrichten mit einem Testdruck.
97
+ */
98
+ readonly paperSizeNeedsCheck: boolean;
99
+ }
100
+ /**
101
+ * Startbestand laut Spec connect-betrieb (Stufe 1), noch ohne Geraetetest und darum nicht freigegeben. Je Eintrag
102
+ * stehen die Werte ausgeschrieben, auch wo sie gleich sind: jeder ist eine eigene Aussage ueber ein Modell und wird
103
+ * einzeln freigegeben.
104
+ *
105
+ * Papierbreiten laut Epson-Datenblatt: TM-m30III, TM-m30II und TM-T20III lassen sich mit der beiliegenden
106
+ * Papierfuehrung auf 58 mm umstellen (dann 420 Punkte, Schrift A 35 Spalten; die Kasse setzt 32 Zeichen), der TM-m10
107
+ * kann nur 58 mm. Bestaetigt ist das erst mit dem Geraetetest.
108
+ *
109
+ * TM-T88VI und TM-T88VII drucken mit 180 dpi (512 Punkte auf 80 mm, Schrift A 42 Spalten); 48 Zeichen passen nicht.
110
+ * Sie bekommen darum das 58-mm-Layout der Kasse (32 Zeichen, die 384 Punkte von `GS W` passen in ihre 512), auch mit
111
+ * 80-mm-Papier, bis es eine Einstellung mit 42 Zeichen gibt.
112
+ */
113
+ export declare const PRINTER_CATALOG: readonly PrinterCatalogEntry[];
114
+ /**
115
+ * Normierter Modellname, die Hersteller aus `catalog`. `EPSON TM-m30III`, `TM-M30III` und `tm m30iii` ergeben
116
+ * `TM-M30III`; der Hersteller allein (`EPSON`) bleibt stehen.
117
+ */
118
+ export declare function normalizePrinterModel(model: string | null | undefined, catalog?: readonly PrinterCatalogEntry[]): string | null;
119
+ /**
120
+ * Der freigegebene Eintrag aus `catalog`, an dem `model` erkannt wird, sonst `null`. Ein nicht freigegebener Eintrag
121
+ * verhaelt sich wie ein unbekanntes Modell. Das Ergebnis ist eindeutig, weil kein Name in zwei Eintraegen steht
122
+ * (Prueffall `match_name_ambiguous`).
123
+ */
124
+ export declare function findPrinterCatalogEntry(catalog: readonly PrinterCatalogEntry[], model: string | null | undefined): PrinterCatalogEntry | null;
125
+ /**
126
+ * Der freigegebene Katalogeintrag zu einem Modellnamen, wie Connect ihn meldet (mDNS, `GS I`), oder `null` fuer ein
127
+ * unbekanntes Modell. Gross- und Kleinschreibung, ein vorangestelltes `EPSON` und die Art der Trenner zaehlen nicht.
128
+ * `undefined` ist erlaubt, weil Connect `model` im Fund weglaesst, wenn es keines kennt.
129
+ */
130
+ export declare function printerCatalogEntry(model: string | null | undefined): PrinterCatalogEntry | null;
131
+ /** Was ein Eintrag beim Einrichten vorschlaegt; `drawerKick` wird zu `drawerEnabled`. */
132
+ export declare function printerCatalogSettings(entry: PrinterCatalogEntry): PrinterCatalogSettings;
133
+ /**
134
+ * Was an einem Katalog nicht stimmt. Jeder Grund gehoert zu genau einem Feld des Eintrags, darum traegt ein Fund kein
135
+ * eigenes Feld. Reihenfolge = Reihenfolge der Pruefung je Eintrag.
136
+ */
137
+ export declare const PRINTER_CATALOG_PROBLEM_REASONS: readonly ["duplicate_id", "match_names_missing", "match_name_not_normalized", "match_name_ambiguous", "model_not_matched", "paper_sizes_invalid", "paper_size_not_listed", "paper_size_too_wide", "cut_not_allowed", "qr_mode_not_allowed", "chars_per_line_mismatch", "device_test_missing", "device_test_incomplete"];
138
+ export type PrinterCatalogProblemReason = typeof PRINTER_CATALOG_PROBLEM_REASONS[number];
139
+ /** Ein Fund der Pruefung: welcher Eintrag, welcher Grund. */
140
+ export interface PrinterCatalogProblem {
141
+ readonly id: string;
142
+ readonly reason: PrinterCatalogProblemReason;
143
+ }
144
+ /**
145
+ * Alle Funde in einem Katalog; leer = gueltig. Die einzige Stelle, an der die Regeln stehen. Der Test ruft sie fuer den
146
+ * ausgelieferten Katalog und die Prueffaelle; ein Fund macht ihn rot, statt zur Laufzeit still zu wirken.
147
+ */
148
+ export declare function printerCatalogProblems(catalog: readonly PrinterCatalogEntry[]): PrinterCatalogProblem[];
@@ -0,0 +1,260 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRINTER_CATALOG_PROBLEM_REASONS = exports.PRINTER_CATALOG = exports.PRINTER_CATALOG_VALUE_FIELDS = exports.PRINTER_CATALOG_QR_MODES = exports.PRINTER_CATALOG_CUTS = void 0;
4
+ exports.normalizePrinterModel = normalizePrinterModel;
5
+ exports.findPrinterCatalogEntry = findPrinterCatalogEntry;
6
+ exports.printerCatalogEntry = printerCatalogEntry;
7
+ exports.printerCatalogSettings = printerCatalogSettings;
8
+ exports.printerCatalogProblems = printerCatalogProblems;
9
+ const grid_js_1 = require("../receipt/grid.js");
10
+ const settings_js_1 = require("./settings.js");
11
+ /*
12
+ * Druckerkatalog der Kasse: bekannte Bondrucker mit den Druck-Einstellungen, die an ihnen im Geraetetest stimmen.
13
+ * Findet Kasseneck Connect ein bekanntes Modell, uebernimmt die Kasse diese Werte mit einem Klick; bei einem unbekannten
14
+ * Modell fragt sie nur die Papierbreite. Der Katalog liegt im Paket (nicht im Admin, nicht in Connect), damit Web-Kasse
15
+ * und Kassen-App offline dieselben Werte haben und jede Aenderung versioniert und getestet ausgeliefert wird.
16
+ *
17
+ * Vertrag ist fixtures/printer-catalog.json: dieselben Eintraege wie hier und die Prueffaelle, die der Dart-Zwilling
18
+ * (lib/src/kasse/drucker_katalog.dart) gegen dieselbe Datei rechnet. Die Daten unten prueft nur der Test
19
+ * (printerCatalogProblems); zur Laufzeit wird nichts still repariert oder verworfen.
20
+ */
21
+ // ------------------------------------------------------------------ Wertemengen
22
+ /**
23
+ * Schnitt eines Eintrags: nur, was die Kasse unter „Papier abschneiden“ anbietet (Teilschnitt oder keiner). Die
24
+ * Einstellung kennt auch `full`, Bondrucker schneiden aber nie ganz durch; ein Katalogwert, den die Kasse nicht
25
+ * anzeigt, waere fuer den Chef nicht pruefbar.
26
+ */
27
+ exports.PRINTER_CATALOG_CUTS = ['partial', 'none'];
28
+ /** QR-Weg eines Eintrags. `auto` heisst „noch niemand hat entschieden“ und ist darum keine Aussage ueber ein Modell. */
29
+ exports.PRINTER_CATALOG_QR_MODES = ['escpos', 'raster'];
30
+ /** Alle Wertfelder, in der Reihenfolge von [PrinterCatalogValues]; ein Test haelt sie vollstaendig. */
31
+ exports.PRINTER_CATALOG_VALUE_FIELDS = [
32
+ 'paperSize', 'charsPerLine', 'cut', 'drawerKick', 'qrMode', 'codePage',
33
+ ];
34
+ // ------------------------------------------------------------------ Daten
35
+ const eingefroren = (e) => {
36
+ const test = e.approval.deviceTest;
37
+ return Object.freeze({
38
+ ...e,
39
+ matchNames: Object.freeze([...e.matchNames]),
40
+ paperSizes: Object.freeze([...e.paperSizes]),
41
+ values: Object.freeze({ ...e.values }),
42
+ approval: Object.freeze({
43
+ ...e.approval,
44
+ deviceTest: test && Object.freeze({ ...test, checked: Object.freeze([...test.checked]), checkedPaperSizes: Object.freeze([...test.checkedPaperSizes]) }),
45
+ }),
46
+ });
47
+ };
48
+ /**
49
+ * Startbestand laut Spec connect-betrieb (Stufe 1), noch ohne Geraetetest und darum nicht freigegeben. Je Eintrag
50
+ * stehen die Werte ausgeschrieben, auch wo sie gleich sind: jeder ist eine eigene Aussage ueber ein Modell und wird
51
+ * einzeln freigegeben.
52
+ *
53
+ * Papierbreiten laut Epson-Datenblatt: TM-m30III, TM-m30II und TM-T20III lassen sich mit der beiliegenden
54
+ * Papierfuehrung auf 58 mm umstellen (dann 420 Punkte, Schrift A 35 Spalten; die Kasse setzt 32 Zeichen), der TM-m10
55
+ * kann nur 58 mm. Bestaetigt ist das erst mit dem Geraetetest.
56
+ *
57
+ * TM-T88VI und TM-T88VII drucken mit 180 dpi (512 Punkte auf 80 mm, Schrift A 42 Spalten); 48 Zeichen passen nicht.
58
+ * Sie bekommen darum das 58-mm-Layout der Kasse (32 Zeichen, die 384 Punkte von `GS W` passen in ihre 512), auch mit
59
+ * 80-mm-Papier, bis es eine Einstellung mit 42 Zeichen gibt.
60
+ */
61
+ exports.PRINTER_CATALOG = Object.freeze([
62
+ {
63
+ id: 'epson-tm-m30iii', manufacturer: 'Epson', model: 'TM-m30III', matchNames: ['TM-M30III'],
64
+ paperSizes: ['mm58', 'mm80'], nativeCharsPerLine: 48,
65
+ values: { paperSize: 'mm80', charsPerLine: 48, cut: 'partial', drawerKick: true, qrMode: 'escpos', codePage: 'CP1252' },
66
+ approval: { approved: false, deviceTest: null },
67
+ },
68
+ {
69
+ id: 'epson-tm-m30ii', manufacturer: 'Epson', model: 'TM-m30II', matchNames: ['TM-M30II'],
70
+ paperSizes: ['mm58', 'mm80'], nativeCharsPerLine: 48,
71
+ values: { paperSize: 'mm80', charsPerLine: 48, cut: 'partial', drawerKick: true, qrMode: 'escpos', codePage: 'CP1252' },
72
+ approval: { approved: false, deviceTest: null },
73
+ },
74
+ {
75
+ id: 'epson-tm-t20iii', manufacturer: 'Epson', model: 'TM-T20III', matchNames: ['TM-T20III'],
76
+ paperSizes: ['mm58', 'mm80'], nativeCharsPerLine: 48,
77
+ values: { paperSize: 'mm80', charsPerLine: 48, cut: 'partial', drawerKick: true, qrMode: 'escpos', codePage: 'CP1252' },
78
+ approval: { approved: false, deviceTest: null },
79
+ },
80
+ {
81
+ id: 'epson-tm-t88vi', manufacturer: 'Epson', model: 'TM-T88VI', matchNames: ['TM-T88VI'],
82
+ paperSizes: ['mm58'], nativeCharsPerLine: 42,
83
+ values: { paperSize: 'mm58', charsPerLine: 32, cut: 'partial', drawerKick: true, qrMode: 'escpos', codePage: 'CP1252' },
84
+ approval: { approved: false, deviceTest: null },
85
+ },
86
+ {
87
+ id: 'epson-tm-t88vii', manufacturer: 'Epson', model: 'TM-T88VII', matchNames: ['TM-T88VII'],
88
+ paperSizes: ['mm58'], nativeCharsPerLine: 42,
89
+ values: { paperSize: 'mm58', charsPerLine: 32, cut: 'partial', drawerKick: true, qrMode: 'escpos', codePage: 'CP1252' },
90
+ approval: { approved: false, deviceTest: null },
91
+ },
92
+ {
93
+ id: 'epson-tm-m10', manufacturer: 'Epson', model: 'TM-m10', matchNames: ['TM-M10'],
94
+ paperSizes: ['mm58'], nativeCharsPerLine: 35,
95
+ values: { paperSize: 'mm58', charsPerLine: 32, cut: 'partial', drawerKick: true, qrMode: 'escpos', codePage: 'CP1252' },
96
+ approval: { approved: false, deviceTest: null },
97
+ },
98
+ ].map(eingefroren));
99
+ // ------------------------------------------------------------------ Normierung
100
+ /** Trenner im normierten Namen. */
101
+ const TRENNER = '-';
102
+ /** Ein Zeichen ausserhalb von ASCII, das weder Satzzeichen noch Leerraum ist. */
103
+ const FREMDES_ZEICHEN = /[^\x00-\x7F\p{P}\p{Z}]/u;
104
+ /**
105
+ * Grossbuchstaben und Teile, oder `null` fuer einen Namen mit fremdem Zeichen.
106
+ *
107
+ * Gefaltet wird nur `a-z` zu `A-Z`: `toUpperCase` machte aus „ı“ ein I und aus „ff“ ein FF und damit aus einem fremden
108
+ * Namen womoeglich einen bekannten. Steht danach ein Zeichen ausserhalb von ASCII, das weder Satzzeichen noch
109
+ * Leerraum ist (Ï, é, ®), gilt der Name als unbekannt. Jede Folge anderer Zeichen als `A-Z`/`0-9` wird ein Trenner,
110
+ * am Rand keiner; Leerzeichen, Bindestrich, Unterstrich, Klammer und geschuetzter Bindestrich gelten dabei gleich,
111
+ * damit „tm m30iii“, „TM-m30III“ und „(EPSON TM-m30III)“ (IPP `product`) denselben Namen ergeben.
112
+ *
113
+ * Der Trenner bleibt als ein Zeichen stehen, statt zu verschwinden: TM-T20II-i ist ein eigenes Modell und darf nicht
114
+ * TM-T20III werden. Das traegt nur, wo der Name einen Trenner hat; „TM-T20IIi“ ohne Bindestrich ist von TM-T20III
115
+ * nicht zu unterscheiden (Prueffall).
116
+ */
117
+ function inTeilen(text) {
118
+ const gross = text.replace(/[a-z]/g, (c) => c.toUpperCase());
119
+ if (FREMDES_ZEICHEN.test(gross))
120
+ return null;
121
+ return gross.split(/[^A-Z0-9]+/).filter((t) => t !== '').join(TRENNER);
122
+ }
123
+ /**
124
+ * Die Hersteller eines Katalogs als Vorsilben (`EPSON-`), laengste zuerst: „Star Micronics“ muss vor „Star“ greifen.
125
+ * Aus den Eintraegen selbst, damit ein neuer Hersteller keine zweite Liste braucht. Gleich lange Vorsilben koennen
126
+ * nicht beide vor demselben Namen stehen, ihre Reihenfolge ist darum gleichgueltig.
127
+ */
128
+ function herstellerVorsilben(catalog) {
129
+ const vorsilben = new Set();
130
+ for (const e of catalog) {
131
+ const hersteller = inTeilen(e.manufacturer);
132
+ if (hersteller)
133
+ vorsilben.add(hersteller + TRENNER);
134
+ }
135
+ return [...vorsilben].sort((a, b) => b.length - a.length);
136
+ }
137
+ /** [inTeilen], dann ohne die erste passende Vorsilbe; `null` ohne Namen oder mit fremdem Zeichen. */
138
+ function normiert(model, vorsilben) {
139
+ if (typeof model !== 'string')
140
+ return null;
141
+ const name = inTeilen(model);
142
+ if (!name)
143
+ return null;
144
+ const vorsilbe = vorsilben.find((v) => name.startsWith(v));
145
+ return vorsilbe === undefined ? name : name.slice(vorsilbe.length);
146
+ }
147
+ /**
148
+ * Normierter Modellname, die Hersteller aus `catalog`. `EPSON TM-m30III`, `TM-M30III` und `tm m30iii` ergeben
149
+ * `TM-M30III`; der Hersteller allein (`EPSON`) bleibt stehen.
150
+ */
151
+ function normalizePrinterModel(model, catalog = exports.PRINTER_CATALOG) {
152
+ return normiert(model, herstellerVorsilben(catalog));
153
+ }
154
+ // ------------------------------------------------------------------ Erkennen
155
+ /**
156
+ * Der freigegebene Eintrag aus `catalog`, an dem `model` erkannt wird, sonst `null`. Ein nicht freigegebener Eintrag
157
+ * verhaelt sich wie ein unbekanntes Modell. Das Ergebnis ist eindeutig, weil kein Name in zwei Eintraegen steht
158
+ * (Prueffall `match_name_ambiguous`).
159
+ */
160
+ function findPrinterCatalogEntry(catalog, model) {
161
+ const name = normalizePrinterModel(model, catalog);
162
+ if (name === null)
163
+ return null;
164
+ return catalog.find((e) => e.approval.approved && e.matchNames.includes(name)) ?? null;
165
+ }
166
+ /**
167
+ * Der freigegebene Katalogeintrag zu einem Modellnamen, wie Connect ihn meldet (mDNS, `GS I`), oder `null` fuer ein
168
+ * unbekanntes Modell. Gross- und Kleinschreibung, ein vorangestelltes `EPSON` und die Art der Trenner zaehlen nicht.
169
+ * `undefined` ist erlaubt, weil Connect `model` im Fund weglaesst, wenn es keines kennt.
170
+ */
171
+ function printerCatalogEntry(model) {
172
+ return findPrinterCatalogEntry(exports.PRINTER_CATALOG, model);
173
+ }
174
+ /** Was ein Eintrag beim Einrichten vorschlaegt; `drawerKick` wird zu `drawerEnabled`. */
175
+ function printerCatalogSettings(entry) {
176
+ const { paperSize, codePage, cut, qrMode, drawerKick } = entry.values;
177
+ return {
178
+ device: { paperSize, codePage, cut, qrMode, drawerEnabled: drawerKick },
179
+ paperSizeNeedsCheck: entry.paperSizes.some((p) => p !== paperSize),
180
+ };
181
+ }
182
+ // ------------------------------------------------------------------ Pruefung
183
+ /**
184
+ * Was an einem Katalog nicht stimmt. Jeder Grund gehoert zu genau einem Feld des Eintrags, darum traegt ein Fund kein
185
+ * eigenes Feld. Reihenfolge = Reihenfolge der Pruefung je Eintrag.
186
+ */
187
+ exports.PRINTER_CATALOG_PROBLEM_REASONS = [
188
+ 'duplicate_id',
189
+ 'match_names_missing',
190
+ 'match_name_not_normalized',
191
+ 'match_name_ambiguous',
192
+ 'model_not_matched',
193
+ 'paper_sizes_invalid',
194
+ 'paper_size_not_listed',
195
+ 'paper_size_too_wide',
196
+ 'cut_not_allowed',
197
+ 'qr_mode_not_allowed',
198
+ 'chars_per_line_mismatch',
199
+ 'device_test_missing',
200
+ 'device_test_incomplete',
201
+ ];
202
+ /** Tag im Format `JJJJ-MM-TT`. */
203
+ const TAG = /^\d{4}-\d{2}-\d{2}$/;
204
+ /** Ein Geraetetest belegt den Eintrag ganz: Kopf ausgefuellt, jedes Wertfeld und jede Breite geprueft. */
205
+ const vollstaendig = (t, e) => TAG.test(t.date) && t.connectVersion !== '' && t.firmware !== '' && t.testedBy !== ''
206
+ && exports.PRINTER_CATALOG_VALUE_FIELDS.every((f) => t.checked.includes(f))
207
+ && e.paperSizes.every((p) => t.checkedPaperSizes.includes(p));
208
+ /**
209
+ * Alle Funde in einem Katalog; leer = gueltig. Die einzige Stelle, an der die Regeln stehen. Der Test ruft sie fuer den
210
+ * ausgelieferten Katalog und die Prueffaelle; ein Fund macht ihn rot, statt zur Laufzeit still zu wirken.
211
+ */
212
+ function printerCatalogProblems(catalog) {
213
+ const probleme = [];
214
+ const vorsilben = herstellerVorsilben(catalog);
215
+ const ids = new Set();
216
+ /** Name -> Index des Eintrags, der ihn zuerst fuehrt. */
217
+ const namen = new Map();
218
+ catalog.forEach((e, index) => {
219
+ const melde = (reason) => { probleme.push({ id: e.id, reason }); };
220
+ if (ids.has(e.id))
221
+ melde('duplicate_id');
222
+ ids.add(e.id);
223
+ if (e.matchNames.length === 0)
224
+ melde('match_names_missing');
225
+ for (const name of e.matchNames) {
226
+ if (normiert(name, vorsilben) !== name)
227
+ melde('match_name_not_normalized');
228
+ const erster = namen.get(name);
229
+ if (erster === undefined)
230
+ namen.set(name, index);
231
+ else if (erster !== index)
232
+ melde('match_name_ambiguous');
233
+ }
234
+ // Der eigene Modellname muss den Eintrag finden; sonst passen Anzeige und Erkennung nicht zusammen (Tippfehler).
235
+ const eigenerName = normiert(e.model, vorsilben);
236
+ if (eigenerName === null || !e.matchNames.includes(eigenerName))
237
+ melde('model_not_matched');
238
+ // Eine feste Reihenfolge ohne Doppel haelt Vertrag und Vergleich eindeutig.
239
+ if (e.paperSizes.join() !== settings_js_1.PAPER_SIZE.filter((p) => e.paperSizes.includes(p)).join())
240
+ melde('paper_sizes_invalid');
241
+ if (!e.paperSizes.includes(e.values.paperSize))
242
+ melde('paper_size_not_listed');
243
+ // Eine Breite, deren Layout mehr Zeichen setzt, als der Drucker hat, bricht jede Zeile um (TM-T88: 48 auf 42).
244
+ if (e.paperSizes.some((p) => grid_js_1.CHARS_PER_PAPER_SIZE[p] > e.nativeCharsPerLine))
245
+ melde('paper_size_too_wide');
246
+ // Die Typen schliessen beides schon aus; die Pruefung gilt Daten, die als JSON kommen (Prueffaelle des Vertrags).
247
+ if (!exports.PRINTER_CATALOG_CUTS.includes(e.values.cut))
248
+ melde('cut_not_allowed');
249
+ if (!exports.PRINTER_CATALOG_QR_MODES.includes(e.values.qrMode))
250
+ melde('qr_mode_not_allowed');
251
+ if (grid_js_1.CHARS_PER_PAPER_SIZE[e.values.paperSize] !== e.values.charsPerLine)
252
+ melde('chars_per_line_mismatch');
253
+ const test = e.approval.deviceTest;
254
+ if (e.approval.approved && test === null)
255
+ melde('device_test_missing');
256
+ if (test !== null && !vollstaendig(test, e))
257
+ melde('device_test_incomplete');
258
+ });
259
+ return probleme;
260
+ }
@@ -18,6 +18,7 @@ export { POS_ERROR_CODES, type PosErrorCode, isPosErrorCode, posErrorCode, isPos
18
18
  export { distributeDiscount } from '../receipt/discount.js';
19
19
  export { cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, depositReturnOf, type VoucherPerms, type RegisterScope, type RegisterUserPerms } from '../register/pairing.js';
20
20
  export { type NetworkPrinter, type PrintJob, type PrintJobStatus, PRINT_JOB_STATUSES, type PrintJobSource, PRINT_JOB_SOURCES, isPrintJobFinished, type CreatePrintJobOptions, listMyPrinters, createPrintJob, getPrintJob, } from './drucker.js';
21
+ export { type PrinterCatalogEntry, type PrinterCatalogValues, type PrinterCatalogValueField, type PrinterCatalogApproval, type PrinterDeviceTest, type PrinterCatalogSettings, type PrinterCatalogDeviceSettings, type PrinterCatalogCut, type PrinterCatalogQrMode, printerCatalogEntry, printerCatalogSettings, } from './drucker-katalog.js';
21
22
  export { listMyTipRecipients } from './trinkgeld.js';
22
23
  export { posDiscountPresets, discountPresetChipText, discountChipsFromPresets, checkDiscountPresets, discountBlockLines, INVALID_DISCOUNT_PRESET, DISCOUNT_PRESETS_MAX, DISCOUNT_PRESET_NAME_MAX, DISCOUNT_PRESET_PERCENT_BP, DISCOUNT_PRESET_AMOUNT_CENTS, DISCOUNT_PRESET_MESSAGES, type DiscountPresetReason, type DiscountPresetError, type DiscountPresetsCheck, type DiscountBlockLine, type DiscountTotal, } from './rabatt-vorlagen.js';
23
24
  export { depFolderName } from './dep.js';
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SETTINGS_FONT_SIZE = exports.LOGO_SIZE = exports.QR_MODE = exports.DRAWER_AUTO_OPEN = exports.CUT = exports.CODE_PAGE = exports.PAPER_SIZE = exports.TERMINAL_TYPE = exports.TERMINAL_VIA = exports.PRINTER_TYPE = exports.TILE_HEIGHT = exports.CATEGORY_POSITION = exports.LAYOUT = exports.RECEIPT_OUTPUT = exports.CARD_PROVIDER = exports.CHECKOUT_MODE = exports.CART_WIDTH = exports.TIP_KEPT_MODE = exports.TIP_START = exports.TIP_KINDS = exports.TIP_MODE = exports.QUANTITY = exports.WATERMARK = exports.FONT_SIZE = exports.THEME = exports.posShortcutConflict = exports.POS_SHORTCUT_SHARED_PAIRS = exports.posSettingsChanges = exports.unknownPosSettingValues = exports.sanitizePosSettings = exports.mergePosSettings = exports.POS_DEVICE_VALUES = exports.POS_BUSINESS_VALUES = exports.posCartWidth = exports.posTipStart = exports.posTipKinds = exports.POS_BUSINESS_OPTIONAL_LISTS = exports.DISCOUNT_PRESET_KIND = exports.tipKeptFor = exports.posTipKeptMode = exports.posCustomDiscountAllowed = exports.posTipKeptByDefault = exports.POS_DEVICE_OPTIONAL_CHOICES = exports.POS_BUSINESS_OPTIONAL_CHOICES = exports.POS_BUSINESS_OPTIONAL_FIELDS = exports.POS_DEVICE_OPTIONAL_FIELDS = exports.POS_DEVICE_DEFAULTS = exports.POS_BUSINESS_DEFAULTS = exports.POS_SHORTCUT_DEFAULTS = exports.POS_SHORTCUT_ACTIONS = void 0;
4
4
  exports.withDepositLines = exports.viennaDay = exports.depositAmountOn = exports.depositsFor = exports.cashRegisterDepositFromWire = exports.depositEntriesFromWire = exports.posDepositSettingsFromWire = exports.DEPOSIT_ON_PREMISES_DEFAULTS = exports.DEPOSIT_RETURN_MODES = exports.DEPOSIT_TYPES = exports.DEPOSIT_KINDS = exports.orderAddOnLines = exports.addOnDisplayOrder = exports.addOnRemap = exports.addOnsOfItem = exports.addOnReferencesValid = exports.addOnsFor = exports.isSelectableAddOn = exports.ADD_ON_BLOCK_REASONS = exports.ADD_ONS_MAX = exports.fromReferencePayload = exports.referenceLineName = exports.checkReference = exports.isDigitsOnlyPattern = exports.isValidReferencePattern = exports.cleanReferenceText = exports.REFERENCE_PATTERN_TEMPLATES = exports.REFERENCE_PATTERN_MAX = exports.REFERENCE_HINT_MAX = exports.REFERENCE_LABEL_MAX = exports.REFERENCE_INPUT_MAX = exports.REFERENCE_MODES = exports.tilePrompts = exports.isBookableArticle = exports.allowedQuantity = exports.quantityDefaults = exports.quantityRuleForUnit = exports.QUANTITY_RULES = exports.listMyArticles = exports.listMyArticleGroups = exports.fromPosArticlePayload = exports.fromArticleGroupPayload = exports.DONE_SCREEN_SECONDS = exports.WATERMARK_SCALE = exports.LOGO_SCALE = exports.WATERMARK_STRENGTH = exports.WATERMARK_SIDE = exports.DISCOUNT = exports.AUTO_LOGOUT_MINUTES = exports.TILE_STYLE = void 0;
5
- exports.reportConnectState = exports.inspectionInfoLines = exports.inspectionInfoRows = exports.getRegisterInspectionInfo = exports.depFolderName = exports.DISCOUNT_PRESET_MESSAGES = exports.DISCOUNT_PRESET_AMOUNT_CENTS = exports.DISCOUNT_PRESET_PERCENT_BP = exports.DISCOUNT_PRESET_NAME_MAX = exports.DISCOUNT_PRESETS_MAX = exports.INVALID_DISCOUNT_PRESET = exports.discountBlockLines = exports.checkDiscountPresets = exports.discountChipsFromPresets = exports.discountPresetChipText = exports.posDiscountPresets = exports.listMyTipRecipients = exports.getPrintJob = exports.createPrintJob = exports.listMyPrinters = exports.isPrintJobFinished = exports.PRINT_JOB_SOURCES = exports.PRINT_JOB_STATUSES = exports.depositReturnOf = exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.posFieldErrors = exports.isPosError = exports.posErrorCode = exports.isPosErrorCode = exports.POS_ERROR_CODES = exports.posSettingsFromWire = exports.setMyPosLogo = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = exports.getPosSettings = exports.OWN_VOUCHER_CODE_SHAPES = exports.ownVoucherCodeShape = exports.externalVoucherTileBlock = exports.checkExternalVoucherArticle = exports.checkExternalVoucherValue = exports.isArticleExternalVoucher = exports.EXTERNAL_VOUCHER_ARTICLE_REASONS = exports.ARTICLE_EXTERNAL_VOUCHER_VAT_RATES = exports.ARTICLE_EXTERNAL_VOUCHER_INVALID = exports.ARTICLE_EXTERNAL_VOUCHER_TYPES = exports.depositReturnLine = void 0;
6
- exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_KINDS = exports.cashMovementLayout = exports.shiftReceiptLayout = exports.DIFFERENCE_PART_TYPES = exports.EXPECTED_PART_KEYS = exports.AFTER_COUNT_TYPES = exports.SHIFT_RECEIPT_KINDS = exports.MANUAL_OPENING_REASONS = exports.OPENING_REASONS = exports.CASH_LOCATIONS = exports.MANUAL_MOVEMENT_TYPES = exports.MOVEMENT_TYPES = exports.EUR_DENOMINATIONS = exports.durationText = exports.shiftTipLines = exports.newIdempotencyKey = exports.parseCentsAllowZero = exports.sumDenominations = exports.recordMyShiftCount = exports.closeMyShift = exports.getMyShiftReport = exports.logMyDrawerOpenings = exports.recordMyCashMovement = exports.openMyShift = exports.getMyDrawerState = exports.EXTERNAL_VOUCHERS = exports.VOUCHER_TYPE_VALIDITY_PATTERNS = exports.VOUCHER_AMOUNT_MODES = exports.VOUCHER_TYPE_KINDS = exports.VOUCHER_PAYOUTS = exports.posVoucherSettingsFromWire = exports.VOUCHER_SETTINGS_DEFAULTS = exports.reprintVoucherLabel = exports.checkVoucher = exports.VOUCHER_STATUSES = exports.VOUCHER_KINDS = exports.parseQuantityMilli = exports.voidMyStocktakeCount = exports.recordMyStocktakeCount = exports.listMyStocktakeCounts = exports.listMyStocktakeItems = exports.listMyStocktakes = exports.setMyCashregisterStockLocation = exports.listMyStock = exports.listMyStockLocations = exports.STOCK_LOCATION_TYPES = exports.matchReturnCode = exports.listReturnCodes = exports.learnReturnCode = void 0;
7
- exports.roundUpSuggestions = exports.receiptOutputLabel = exports.RETURN_DISPOSITION_LABELS = exports.labelText = exports.LABELS = exports.TIP_KEPT_MODE_LABELS = exports.EXTERNAL_VOUCHER_KIND_LABELS = exports.EXTERNAL_VOUCHERS_LABELS = exports.externalVoucherArticleErrorMessage = exports.EXTERNAL_VOUCHER_ARTICLE_MESSAGES = exports.EXTERNAL_VOUCHER_TILE_MESSAGES = exports.depositErrorMessage = exports.DEPOSIT_ERROR_MESSAGES = exports.voucherErrorMessage = exports.VOUCHER_ERROR_MESSAGES = exports.cancellationErrorMessage = exports.CANCELLATION_VOUCHER_ERROR_MESSAGES = exports.cancellationPaymentErrorMessage = exports.CANCELLATION_PAYMENT_ERROR_MESSAGES = exports.receiptEmailErrorMessage = exports.RECEIPT_EMAIL_ERROR_MESSAGES = exports.messageAppliesTo = exports.messageText = exports.messageOutcome = exports.findErrorRule = exports.CALLS_WITH_EFFECT = exports.ERROR_OUTCOME_RULES = exports.ERROR_CODE_RULES = exports.ERROR_RULES = exports.MESSAGES = exports.isReturnDisposition = exports.RETURN_DISPOSITIONS = void 0;
5
+ exports.inspectionInfoRows = exports.getRegisterInspectionInfo = exports.depFolderName = exports.DISCOUNT_PRESET_MESSAGES = exports.DISCOUNT_PRESET_AMOUNT_CENTS = exports.DISCOUNT_PRESET_PERCENT_BP = exports.DISCOUNT_PRESET_NAME_MAX = exports.DISCOUNT_PRESETS_MAX = exports.INVALID_DISCOUNT_PRESET = exports.discountBlockLines = exports.checkDiscountPresets = exports.discountChipsFromPresets = exports.discountPresetChipText = exports.posDiscountPresets = exports.listMyTipRecipients = exports.printerCatalogSettings = exports.printerCatalogEntry = exports.getPrintJob = exports.createPrintJob = exports.listMyPrinters = exports.isPrintJobFinished = exports.PRINT_JOB_SOURCES = exports.PRINT_JOB_STATUSES = exports.depositReturnOf = exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.posFieldErrors = exports.isPosError = exports.posErrorCode = exports.isPosErrorCode = exports.POS_ERROR_CODES = exports.posSettingsFromWire = exports.setMyPosLogo = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = exports.getPosSettings = exports.OWN_VOUCHER_CODE_SHAPES = exports.ownVoucherCodeShape = exports.externalVoucherTileBlock = exports.checkExternalVoucherArticle = exports.checkExternalVoucherValue = exports.isArticleExternalVoucher = exports.EXTERNAL_VOUCHER_ARTICLE_REASONS = exports.ARTICLE_EXTERNAL_VOUCHER_VAT_RATES = exports.ARTICLE_EXTERNAL_VOUCHER_INVALID = exports.ARTICLE_EXTERNAL_VOUCHER_TYPES = exports.depositReturnLine = void 0;
6
+ exports.cashMovementLayout = exports.shiftReceiptLayout = exports.DIFFERENCE_PART_TYPES = exports.EXPECTED_PART_KEYS = exports.AFTER_COUNT_TYPES = exports.SHIFT_RECEIPT_KINDS = exports.MANUAL_OPENING_REASONS = exports.OPENING_REASONS = exports.CASH_LOCATIONS = exports.MANUAL_MOVEMENT_TYPES = exports.MOVEMENT_TYPES = exports.EUR_DENOMINATIONS = exports.durationText = exports.shiftTipLines = exports.newIdempotencyKey = exports.parseCentsAllowZero = exports.sumDenominations = exports.recordMyShiftCount = exports.closeMyShift = exports.getMyShiftReport = exports.logMyDrawerOpenings = exports.recordMyCashMovement = exports.openMyShift = exports.getMyDrawerState = exports.EXTERNAL_VOUCHERS = exports.VOUCHER_TYPE_VALIDITY_PATTERNS = exports.VOUCHER_AMOUNT_MODES = exports.VOUCHER_TYPE_KINDS = exports.VOUCHER_PAYOUTS = exports.posVoucherSettingsFromWire = exports.VOUCHER_SETTINGS_DEFAULTS = exports.reprintVoucherLabel = exports.checkVoucher = exports.VOUCHER_STATUSES = exports.VOUCHER_KINDS = exports.parseQuantityMilli = exports.voidMyStocktakeCount = exports.recordMyStocktakeCount = exports.listMyStocktakeCounts = exports.listMyStocktakeItems = exports.listMyStocktakes = exports.setMyCashregisterStockLocation = exports.listMyStock = exports.listMyStockLocations = exports.STOCK_LOCATION_TYPES = exports.matchReturnCode = exports.listReturnCodes = exports.learnReturnCode = exports.reportConnectState = exports.inspectionInfoLines = void 0;
7
+ exports.roundUpSuggestions = exports.receiptOutputLabel = exports.RETURN_DISPOSITION_LABELS = exports.labelText = exports.LABELS = exports.TIP_KEPT_MODE_LABELS = exports.EXTERNAL_VOUCHER_KIND_LABELS = exports.EXTERNAL_VOUCHERS_LABELS = exports.externalVoucherArticleErrorMessage = exports.EXTERNAL_VOUCHER_ARTICLE_MESSAGES = exports.EXTERNAL_VOUCHER_TILE_MESSAGES = exports.depositErrorMessage = exports.DEPOSIT_ERROR_MESSAGES = exports.voucherErrorMessage = exports.VOUCHER_ERROR_MESSAGES = exports.cancellationErrorMessage = exports.CANCELLATION_VOUCHER_ERROR_MESSAGES = exports.cancellationPaymentErrorMessage = exports.CANCELLATION_PAYMENT_ERROR_MESSAGES = exports.receiptEmailErrorMessage = exports.RECEIPT_EMAIL_ERROR_MESSAGES = exports.messageAppliesTo = exports.messageText = exports.messageOutcome = exports.findErrorRule = exports.CALLS_WITH_EFFECT = exports.ERROR_OUTCOME_RULES = exports.ERROR_CODE_RULES = exports.ERROR_RULES = exports.MESSAGES = exports.isReturnDisposition = exports.RETURN_DISPOSITIONS = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_KINDS = void 0;
8
8
  /**
9
9
  * Kachel-Kasse: Einstellungen, Artikelgruppen/Artikel fuer Kacheln,
10
10
  * Rabattverteilung, Drucker, Trinkgeld-Empfaenger, Lager (Standorte, Bestand,
@@ -162,6 +162,11 @@ Object.defineProperty(exports, "isPrintJobFinished", { enumerable: true, get: fu
162
162
  Object.defineProperty(exports, "listMyPrinters", { enumerable: true, get: function () { return drucker_js_1.listMyPrinters; } });
163
163
  Object.defineProperty(exports, "createPrintJob", { enumerable: true, get: function () { return drucker_js_1.createPrintJob; } });
164
164
  Object.defineProperty(exports, "getPrintJob", { enumerable: true, get: function () { return drucker_js_1.getPrintJob; } });
165
+ // Druckerkatalog (Connect-Einrichtung mit einem Klick): Normierung, Pruefung und der Katalog selbst bleiben im Modul,
166
+ // nach aussen gehen nur das Erkennen und die vorgeschlagenen Einstellungen.
167
+ var drucker_katalog_js_1 = require("./drucker-katalog.js");
168
+ Object.defineProperty(exports, "printerCatalogEntry", { enumerable: true, get: function () { return drucker_katalog_js_1.printerCatalogEntry; } });
169
+ Object.defineProperty(exports, "printerCatalogSettings", { enumerable: true, get: function () { return drucker_katalog_js_1.printerCatalogSettings; } });
165
170
  var trinkgeld_js_1 = require("./trinkgeld.js");
166
171
  Object.defineProperty(exports, "listMyTipRecipients", { enumerable: true, get: function () { return trinkgeld_js_1.listMyTipRecipients; } });
167
172
  var rabatt_vorlagen_js_1 = require("./rabatt-vorlagen.js");
@@ -4,4 +4,4 @@
4
4
  * Client-Version, Nachtrag §6). Ein Test haelt sie gleich mit `package.json`;
5
5
  * beim Anheben der Version beide Stellen aendern.
6
6
  */
7
- export declare const PACKAGE_VERSION = "1.34.0";
7
+ export declare const PACKAGE_VERSION = "1.35.0";
@@ -7,4 +7,4 @@ exports.PACKAGE_VERSION = void 0;
7
7
  * Client-Version, Nachtrag §6). Ein Test haelt sie gleich mit `package.json`;
8
8
  * beim Anheben der Version beide Stellen aendern.
9
9
  */
10
- exports.PACKAGE_VERSION = '1.34.0';
10
+ exports.PACKAGE_VERSION = '1.35.0';