@kreiseck/kasseneck-api 0.14.0 → 0.15.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 +28 -0
- package/README.md +65 -0
- package/dist/cjs/client/aufrufe.d.ts +1 -1
- package/dist/cjs/client/aufrufe.js +11 -0
- package/dist/cjs/rechnung/api.d.ts +43 -0
- package/dist/cjs/rechnung/api.js +35 -0
- package/dist/cjs/rechnung/auth.d.ts +21 -0
- package/dist/cjs/rechnung/auth.js +36 -0
- package/dist/cjs/rechnung/endpunkte.d.ts +48 -0
- package/dist/cjs/rechnung/endpunkte.js +129 -0
- package/dist/cjs/rechnung/fehler.d.ts +21 -0
- package/dist/cjs/rechnung/fehler.js +44 -0
- package/dist/cjs/rechnung/index.d.ts +18 -0
- package/dist/cjs/rechnung/index.js +52 -0
- package/dist/cjs/rechnung/typen.d.ts +224 -0
- package/dist/cjs/rechnung/typen.js +9 -0
- package/dist/cjs/rechnung/vertrag.d.ts +98 -0
- package/dist/cjs/rechnung/vertrag.js +191 -0
- package/dist/esm/client/aufrufe.d.ts +1 -1
- package/dist/esm/client/aufrufe.js +11 -0
- package/dist/esm/rechnung/api.d.ts +43 -0
- package/dist/esm/rechnung/api.js +32 -0
- package/dist/esm/rechnung/auth.d.ts +21 -0
- package/dist/esm/rechnung/auth.js +33 -0
- package/dist/esm/rechnung/endpunkte.d.ts +48 -0
- package/dist/esm/rechnung/endpunkte.js +116 -0
- package/dist/esm/rechnung/fehler.d.ts +21 -0
- package/dist/esm/rechnung/fehler.js +39 -0
- package/dist/esm/rechnung/index.d.ts +18 -0
- package/dist/esm/rechnung/index.js +17 -0
- package/dist/esm/rechnung/typen.d.ts +224 -0
- package/dist/esm/rechnung/typen.js +8 -0
- package/dist/esm/rechnung/vertrag.d.ts +98 -0
- package/dist/esm/rechnung/vertrag.js +188 -0
- package/fixtures/hobex-hps-codes.json +1 -1
- package/fixtures/kasse-texte.json +1 -1
- package/fixtures/oberflaeche.json +87 -1
- package/fixtures/rechnung-api-beispiele/credit-fehler-grund.json +24 -0
- package/fixtures/rechnung-api-beispiele/credit-ok.json +20 -0
- package/fixtures/rechnung-api-beispiele/customer-fehler-uid.json +25 -0
- package/fixtures/rechnung-api-beispiele/customer-get-fehler-beide.json +15 -0
- package/fixtures/rechnung-api-beispiele/customer-ok.json +20 -0
- package/fixtures/rechnung-api-beispiele/customer-search-fehler-leer.json +14 -0
- package/fixtures/rechnung-api-beispiele/issue-brutto-20.json +27 -0
- package/fixtures/rechnung-api-beispiele/issue-fehler-cent.json +26 -0
- package/fixtures/rechnung-api-beispiele/issue-fehler-menge.json +26 -0
- package/fixtures/rechnung-api-beispiele/issue-fehler-negativ.json +26 -0
- package/fixtures/rechnung-api-beispiele/issue-fehler-satz.json +26 -0
- package/fixtures/rechnung-api-beispiele/issue-fehler-unbekannt.json +27 -0
- package/fixtures/rechnung-api-beispiele/issue-gemischt.json +33 -0
- package/fixtures/rechnung-api-beispiele/issue-kleinunternehmer.json +27 -0
- package/fixtures/rechnung-api-beispiele/issue-netto-20.json +28 -0
- package/fixtures/rechnung-api-beispiele/issue-rabatt.json +28 -0
- package/fixtures/rechnung-api.schema.json +672 -0
- package/package.json +12 -1
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typen der Rechnungs-API. Die Anfragen folgen `vertrag.ts` Feld fuer Feld;
|
|
3
|
+
* `test/rechnung-client.test.ts` schickt die Beispiele des Vertrags durch.
|
|
4
|
+
*
|
|
5
|
+
* Betraege sind ueberall ganze Cent. Datumsangaben sind `YYYY-MM-DD` nach
|
|
6
|
+
* Wiener Kalender.
|
|
7
|
+
*/
|
|
8
|
+
import type { CreditNoteReason, CustomerType, DocType, InvoiceListStatus, PriceMode, TaxScheme, VatRatePercent } from './vertrag.js';
|
|
9
|
+
export interface CustomerInput {
|
|
10
|
+
type: CustomerType;
|
|
11
|
+
name: string;
|
|
12
|
+
legalForm?: string;
|
|
13
|
+
email?: string;
|
|
14
|
+
phone?: string;
|
|
15
|
+
street?: string;
|
|
16
|
+
houseNumber?: string;
|
|
17
|
+
zip?: string;
|
|
18
|
+
city?: string;
|
|
19
|
+
/** ISO-3166-Alpha-2, z. B. `AT`. */
|
|
20
|
+
country: string;
|
|
21
|
+
/** UID-Nummer, z. B. `ATU12345678`. */
|
|
22
|
+
vatId?: string;
|
|
23
|
+
/** Kuerzel fuer die Rechnungsnummer; einmal gesetzt unveraenderlich. */
|
|
24
|
+
shortCode?: string;
|
|
25
|
+
/** Behoerde (B2G) — die E-Rechnung verlangt dann Adresse und `orderReference`. */
|
|
26
|
+
isAuthority?: boolean;
|
|
27
|
+
note?: string;
|
|
28
|
+
/** Kennung im eigenen System; je Konto eindeutig. */
|
|
29
|
+
externalId?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface Customer {
|
|
32
|
+
id: string;
|
|
33
|
+
type: CustomerType;
|
|
34
|
+
name: string;
|
|
35
|
+
legalForm: string | null;
|
|
36
|
+
email: string | null;
|
|
37
|
+
phone: string | null;
|
|
38
|
+
street: string | null;
|
|
39
|
+
houseNumber: string | null;
|
|
40
|
+
zip: string | null;
|
|
41
|
+
city: string | null;
|
|
42
|
+
country: string;
|
|
43
|
+
vatId: string | null;
|
|
44
|
+
shortCode: string | null;
|
|
45
|
+
isAuthority: boolean;
|
|
46
|
+
note: string | null;
|
|
47
|
+
externalId: string | null;
|
|
48
|
+
createdAt: string | null;
|
|
49
|
+
updatedAt: string | null;
|
|
50
|
+
}
|
|
51
|
+
export interface CustomerSearch {
|
|
52
|
+
externalId?: string;
|
|
53
|
+
vatId?: string;
|
|
54
|
+
email?: string;
|
|
55
|
+
/** Namensanfang, Gross-/Kleinschreibung und Akzente egal. */
|
|
56
|
+
name?: string;
|
|
57
|
+
limit?: number;
|
|
58
|
+
cursor?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface CustomerPage {
|
|
61
|
+
customers: Customer[];
|
|
62
|
+
nextCursor: string | null;
|
|
63
|
+
}
|
|
64
|
+
export interface InvoiceItemInput {
|
|
65
|
+
description: string;
|
|
66
|
+
subtitle?: string;
|
|
67
|
+
/** Hoechstens drei Nachkommastellen. */
|
|
68
|
+
quantity: number;
|
|
69
|
+
unit?: string;
|
|
70
|
+
/** Einzelpreis in ganzen Cent, im `priceMode` der Rechnung (netto oder brutto). */
|
|
71
|
+
unitPriceCents: number;
|
|
72
|
+
vatRate: VatRatePercent;
|
|
73
|
+
/** Zeilenrabatt in Prozent, hoechstens zwei Nachkommastellen. */
|
|
74
|
+
discountPct?: number;
|
|
75
|
+
}
|
|
76
|
+
export interface IssueInvoiceRequest {
|
|
77
|
+
/** Pflicht: dieselbe Anfrage mit demselben Schluessel erzeugt nie eine zweite Rechnung. */
|
|
78
|
+
idempotencyKey: string;
|
|
79
|
+
/** Pflicht ueber 400 € brutto sowie bei Reverse Charge und ig. Lieferung. */
|
|
80
|
+
customerId?: string;
|
|
81
|
+
taxScheme: TaxScheme;
|
|
82
|
+
priceMode: PriceMode;
|
|
83
|
+
/** Leistungsdatum bzw. Beginn des Leistungszeitraums. */
|
|
84
|
+
serviceStart: string;
|
|
85
|
+
serviceEnd?: string;
|
|
86
|
+
paymentTermDays?: number;
|
|
87
|
+
orderReference?: string;
|
|
88
|
+
intro?: string;
|
|
89
|
+
note?: string;
|
|
90
|
+
/** Verwendungszweck fuer die Ueberweisung; leer = Rechnungsnummer. */
|
|
91
|
+
paymentReference?: string;
|
|
92
|
+
girocode?: boolean;
|
|
93
|
+
tracking?: boolean;
|
|
94
|
+
items: InvoiceItemInput[];
|
|
95
|
+
/** Eigene Merkmale (hoechstens 20), nie gedruckt. */
|
|
96
|
+
metadata?: Record<string, string>;
|
|
97
|
+
}
|
|
98
|
+
export interface CancelInvoiceRequest {
|
|
99
|
+
idempotencyKey: string;
|
|
100
|
+
invoiceId: string;
|
|
101
|
+
reason: CreditNoteReason;
|
|
102
|
+
note?: string;
|
|
103
|
+
}
|
|
104
|
+
export interface CreditNoteRequest extends CancelInvoiceRequest {
|
|
105
|
+
items: InvoiceItemInput[];
|
|
106
|
+
}
|
|
107
|
+
export interface InvoiceTotals {
|
|
108
|
+
netCents: number;
|
|
109
|
+
vatCents: number;
|
|
110
|
+
grossCents: number;
|
|
111
|
+
byRate: {
|
|
112
|
+
rate: number;
|
|
113
|
+
netCents: number;
|
|
114
|
+
vatCents: number;
|
|
115
|
+
}[];
|
|
116
|
+
}
|
|
117
|
+
export interface EInvoiceStatus {
|
|
118
|
+
level: string;
|
|
119
|
+
formats: string[];
|
|
120
|
+
missing: string[];
|
|
121
|
+
}
|
|
122
|
+
export interface Invoice {
|
|
123
|
+
id: string;
|
|
124
|
+
number: string;
|
|
125
|
+
docType: DocType;
|
|
126
|
+
status: string;
|
|
127
|
+
invoiceDate: string;
|
|
128
|
+
dueDate: string | null;
|
|
129
|
+
customerId: string | null;
|
|
130
|
+
totals: InvoiceTotals;
|
|
131
|
+
einvoice: EInvoiceStatus | null;
|
|
132
|
+
statusUrl: string | null;
|
|
133
|
+
statusPassword: string | null;
|
|
134
|
+
metadata: Record<string, string>;
|
|
135
|
+
}
|
|
136
|
+
export interface InvoiceRecipient {
|
|
137
|
+
name: string;
|
|
138
|
+
type: CustomerType;
|
|
139
|
+
street: string | null;
|
|
140
|
+
houseNumber: string | null;
|
|
141
|
+
zip: string | null;
|
|
142
|
+
city: string | null;
|
|
143
|
+
country: string;
|
|
144
|
+
vatId: string | null;
|
|
145
|
+
shortCode: string | null;
|
|
146
|
+
email: string | null;
|
|
147
|
+
isAuthority: boolean;
|
|
148
|
+
}
|
|
149
|
+
/** Eine gespeicherte Position — wie gesendet, fehlende Angaben mit ihrem Standardwert. */
|
|
150
|
+
export interface InvoiceItem {
|
|
151
|
+
description: string;
|
|
152
|
+
subtitle: string;
|
|
153
|
+
quantity: number;
|
|
154
|
+
unit: string;
|
|
155
|
+
unitPriceCents: number;
|
|
156
|
+
vatRate: number;
|
|
157
|
+
discountPct: number;
|
|
158
|
+
}
|
|
159
|
+
export interface InvoiceDetail extends Invoice {
|
|
160
|
+
items: InvoiceItem[];
|
|
161
|
+
customer: InvoiceRecipient | null;
|
|
162
|
+
taxScheme: TaxScheme;
|
|
163
|
+
priceMode: PriceMode;
|
|
164
|
+
serviceStart: string | null;
|
|
165
|
+
serviceEnd: string | null;
|
|
166
|
+
paymentTermDays: number | null;
|
|
167
|
+
orderReference: string | null;
|
|
168
|
+
payments: {
|
|
169
|
+
amountCents: number;
|
|
170
|
+
date: string;
|
|
171
|
+
method: string;
|
|
172
|
+
}[];
|
|
173
|
+
paidCents: number;
|
|
174
|
+
openCents: number;
|
|
175
|
+
overdue: boolean;
|
|
176
|
+
writtenOff: boolean;
|
|
177
|
+
writeOffReasonCode: string | null;
|
|
178
|
+
related: {
|
|
179
|
+
invoiceId: string;
|
|
180
|
+
number: string | null;
|
|
181
|
+
} | null;
|
|
182
|
+
creditNotes: {
|
|
183
|
+
id: string;
|
|
184
|
+
number: string;
|
|
185
|
+
grossCents: number;
|
|
186
|
+
}[];
|
|
187
|
+
source: string | null;
|
|
188
|
+
createdAt: string | null;
|
|
189
|
+
finalizedAt: string | null;
|
|
190
|
+
}
|
|
191
|
+
export interface InvoiceListQuery {
|
|
192
|
+
from?: string;
|
|
193
|
+
to?: string;
|
|
194
|
+
status?: InvoiceListStatus;
|
|
195
|
+
docType?: DocType;
|
|
196
|
+
customerId?: string;
|
|
197
|
+
limit?: number;
|
|
198
|
+
cursor?: string;
|
|
199
|
+
}
|
|
200
|
+
export interface InvoicePage {
|
|
201
|
+
invoices: Invoice[];
|
|
202
|
+
nextCursor: string | null;
|
|
203
|
+
}
|
|
204
|
+
export interface IssueResult {
|
|
205
|
+
invoice: Invoice;
|
|
206
|
+
/** `true`, wenn die Anfrage schon einmal ausgefuehrt wurde und die bestehende Rechnung zurueckkommt. */
|
|
207
|
+
replayed: boolean;
|
|
208
|
+
}
|
|
209
|
+
export interface CancelResult {
|
|
210
|
+
creditNote: Invoice;
|
|
211
|
+
original: {
|
|
212
|
+
id: string;
|
|
213
|
+
status: string;
|
|
214
|
+
};
|
|
215
|
+
/** Bereits auf das Original bezahlt — die Rueckerstattung ist Sache des Betriebs. */
|
|
216
|
+
originalPaidCents: number;
|
|
217
|
+
replayed: boolean;
|
|
218
|
+
}
|
|
219
|
+
export interface CreditNoteResult {
|
|
220
|
+
creditNote: Invoice;
|
|
221
|
+
/** Brutto, das nach dieser Gutschrift noch gutgeschrieben werden kann. */
|
|
222
|
+
remainingCents: number;
|
|
223
|
+
replayed: boolean;
|
|
224
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Typen der Rechnungs-API. Die Anfragen folgen `vertrag.ts` Feld fuer Feld;
|
|
4
|
+
* `test/rechnung-client.test.ts` schickt die Beispiele des Vertrags durch.
|
|
5
|
+
*
|
|
6
|
+
* Betraege sind ueberall ganze Cent. Datumsangaben sind `YYYY-MM-DD` nach
|
|
7
|
+
* Wiener Kalender.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Der Vertrag der Rechnungs-API — als Daten, nicht als Prosa.
|
|
3
|
+
*
|
|
4
|
+
* Aus dieser Datei entstehen drei Dinge, damit sie nicht auseinanderlaufen
|
|
5
|
+
* koennen:
|
|
6
|
+
*
|
|
7
|
+
* 1. `fixtures/rechnung-api.schema.json` (`npm run fixtures:rechnung`) — das
|
|
8
|
+
* Backend liest es aus dem vendorierten Paket und vergleicht es in beide
|
|
9
|
+
* Richtungen mit seiner eigenen Pruefung; der Dart-Zwilling zieht es byteweise.
|
|
10
|
+
* 2. Die Listen unter `rechnung` in `fixtures/oberflaeche.json` (Codes, Gruende,
|
|
11
|
+
* Enums) — ueber denselben Namensraum-Scan wie der Partner-Teil.
|
|
12
|
+
* 3. Die TypeScript-Typen in `typen.ts`.
|
|
13
|
+
*
|
|
14
|
+
* Nach aussen spricht die Schnittstelle Englisch: Feldnamen, Codes, Gruende.
|
|
15
|
+
* Deutsch bleibt, was ein Mensch liest (`message`, der Aufdruck eines Grundes).
|
|
16
|
+
*
|
|
17
|
+
* Beschrieben wird die Anfrage. Was der Server daraus macht — Rechnungsdatum,
|
|
18
|
+
* Nummer, Summen — ist bewusst **nicht** setzbar.
|
|
19
|
+
*/
|
|
20
|
+
export declare const RECHNUNG_VERTRAG_VERSION = 1;
|
|
21
|
+
export declare const RECHNUNG_AUFRUFE: readonly ["createCustomer", "getCustomer", "updateCustomer", "searchCustomers", "issueInvoice", "cancelInvoice", "createCreditNote", "getInvoice", "listInvoices", "getInvoicePdf", "getInvoiceXml"];
|
|
22
|
+
export type RechnungAufruf = (typeof RECHNUNG_AUFRUFE)[number];
|
|
23
|
+
/**
|
|
24
|
+
* Stabile Fehlercodes. Das Fremdsystem verzweigt am Code, der Text darf sich
|
|
25
|
+
* aendern. `validation` traegt zusaetzlich `errors: [{ field, message }]`.
|
|
26
|
+
*/
|
|
27
|
+
export declare const INVOICE_ERROR_CODES: readonly ["validation", "idempotency_conflict", "module_inactive", "customer_not_found", "customer_exists", "short_code_taken", "short_code_immutable", "recipient_required", "invoice_requirements_missing", "invoice_not_found", "invoice_ambiguous", "not_cancellable", "partial_credit_exists", "credit_exceeds_invoice", "einvoice_incomplete"];
|
|
28
|
+
export type InvoiceErrorCode = (typeof INVOICE_ERROR_CODES)[number];
|
|
29
|
+
/** Gruende einer Gutschrift. Der Server druckt den deutschen Anzeigetext. */
|
|
30
|
+
export declare const CREDIT_NOTE_REASONS: readonly ["cancellation", "price_reduction", "return", "incorrect_invoice", "other"];
|
|
31
|
+
export type CreditNoteReason = (typeof CREDIT_NOTE_REASONS)[number];
|
|
32
|
+
export declare const TAX_SCHEMES: readonly ["normal", "smallBusiness", "reverseCharge", "igLieferung", "exportThirdCountry"];
|
|
33
|
+
export type TaxScheme = (typeof TAX_SCHEMES)[number];
|
|
34
|
+
export declare const PRICE_MODES: readonly ["net", "gross"];
|
|
35
|
+
export type PriceMode = (typeof PRICE_MODES)[number];
|
|
36
|
+
export declare const VAT_RATES: readonly [0, 10, 13, 20];
|
|
37
|
+
export type VatRatePercent = (typeof VAT_RATES)[number];
|
|
38
|
+
export declare const CUSTOMER_TYPES: readonly ["private", "company"];
|
|
39
|
+
export type CustomerType = (typeof CUSTOMER_TYPES)[number];
|
|
40
|
+
export declare const INVOICE_LIST_STATUS: readonly ["final", "paid", "cancelled", "open", "overdue"];
|
|
41
|
+
export type InvoiceListStatus = (typeof INVOICE_LIST_STATUS)[number];
|
|
42
|
+
export declare const DOC_TYPES: readonly ["RE", "GU"];
|
|
43
|
+
export type DocType = (typeof DOC_TYPES)[number];
|
|
44
|
+
export declare const EINVOICE_FORMATS: readonly ["ubl", "cii"];
|
|
45
|
+
export type EInvoiceFormat = (typeof EINVOICE_FORMATS)[number];
|
|
46
|
+
/** Formate, die der Server mit `@kreiseck/validator` bzw. einem Muster prueft. */
|
|
47
|
+
export type Format = 'email' | 'phone' | 'vatId' | 'country' | 'date' | 'shortCode';
|
|
48
|
+
export type Feld = {
|
|
49
|
+
typ: 'string';
|
|
50
|
+
pflicht: boolean;
|
|
51
|
+
min?: number;
|
|
52
|
+
max: number;
|
|
53
|
+
format?: Format;
|
|
54
|
+
} | {
|
|
55
|
+
typ: 'integer';
|
|
56
|
+
pflicht: boolean;
|
|
57
|
+
min: number;
|
|
58
|
+
max: number;
|
|
59
|
+
} | {
|
|
60
|
+
typ: 'number';
|
|
61
|
+
pflicht: boolean;
|
|
62
|
+
min: number;
|
|
63
|
+
max: number;
|
|
64
|
+
nachkomma: number;
|
|
65
|
+
exklusivMin?: boolean;
|
|
66
|
+
} | {
|
|
67
|
+
typ: 'boolean';
|
|
68
|
+
pflicht: boolean;
|
|
69
|
+
} | {
|
|
70
|
+
typ: 'enum';
|
|
71
|
+
pflicht: boolean;
|
|
72
|
+
werte: readonly (string | number)[];
|
|
73
|
+
} | {
|
|
74
|
+
typ: 'object';
|
|
75
|
+
pflicht: boolean;
|
|
76
|
+
felder: Readonly<Record<string, Feld>>;
|
|
77
|
+
} | {
|
|
78
|
+
typ: 'list';
|
|
79
|
+
pflicht: boolean;
|
|
80
|
+
min: number;
|
|
81
|
+
max: number;
|
|
82
|
+
eintrag: Feld;
|
|
83
|
+
} | {
|
|
84
|
+
typ: 'map';
|
|
85
|
+
pflicht: boolean;
|
|
86
|
+
maxSchluessel: number;
|
|
87
|
+
schluesselMuster: string;
|
|
88
|
+
wertMax: number;
|
|
89
|
+
};
|
|
90
|
+
/** Kunde, wie das Fremdsystem ihn schickt. `vatId` ist die UID-Nummer. */
|
|
91
|
+
export declare const KUNDE_FELDER: Readonly<Record<string, Feld>>;
|
|
92
|
+
/** Eine Rechnungs- oder Gutschriftsposition. Preise in ganzen Cent. */
|
|
93
|
+
export declare const POSITION_FELDER: Readonly<Record<string, Feld>>;
|
|
94
|
+
export declare const RECHNUNG_ANFRAGEN: Readonly<Record<RechnungAufruf, Readonly<Record<string, Feld>>>>;
|
|
95
|
+
/** Genau eines dieser Felder muss gesetzt sein (je Aufruf, je Gruppe). */
|
|
96
|
+
export declare const RECHNUNG_GENAU_EINS: Readonly<Partial<Record<RechnungAufruf, readonly (readonly string[])[]>>>;
|
|
97
|
+
/** Mindestens eines dieser Felder muss gesetzt sein (je Aufruf, je Gruppe). */
|
|
98
|
+
export declare const RECHNUNG_MINDESTENS_EINS: Readonly<Partial<Record<RechnungAufruf, readonly (readonly string[])[]>>>;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Der Vertrag der Rechnungs-API — als Daten, nicht als Prosa.
|
|
4
|
+
*
|
|
5
|
+
* Aus dieser Datei entstehen drei Dinge, damit sie nicht auseinanderlaufen
|
|
6
|
+
* koennen:
|
|
7
|
+
*
|
|
8
|
+
* 1. `fixtures/rechnung-api.schema.json` (`npm run fixtures:rechnung`) — das
|
|
9
|
+
* Backend liest es aus dem vendorierten Paket und vergleicht es in beide
|
|
10
|
+
* Richtungen mit seiner eigenen Pruefung; der Dart-Zwilling zieht es byteweise.
|
|
11
|
+
* 2. Die Listen unter `rechnung` in `fixtures/oberflaeche.json` (Codes, Gruende,
|
|
12
|
+
* Enums) — ueber denselben Namensraum-Scan wie der Partner-Teil.
|
|
13
|
+
* 3. Die TypeScript-Typen in `typen.ts`.
|
|
14
|
+
*
|
|
15
|
+
* Nach aussen spricht die Schnittstelle Englisch: Feldnamen, Codes, Gruende.
|
|
16
|
+
* Deutsch bleibt, was ein Mensch liest (`message`, der Aufdruck eines Grundes).
|
|
17
|
+
*
|
|
18
|
+
* Beschrieben wird die Anfrage. Was der Server daraus macht — Rechnungsdatum,
|
|
19
|
+
* Nummer, Summen — ist bewusst **nicht** setzbar.
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.RECHNUNG_MINDESTENS_EINS = exports.RECHNUNG_GENAU_EINS = exports.RECHNUNG_ANFRAGEN = exports.POSITION_FELDER = exports.KUNDE_FELDER = exports.EINVOICE_FORMATS = exports.DOC_TYPES = exports.INVOICE_LIST_STATUS = exports.CUSTOMER_TYPES = exports.VAT_RATES = exports.PRICE_MODES = exports.TAX_SCHEMES = exports.CREDIT_NOTE_REASONS = exports.INVOICE_ERROR_CODES = exports.RECHNUNG_AUFRUFE = exports.RECHNUNG_VERTRAG_VERSION = void 0;
|
|
23
|
+
exports.RECHNUNG_VERTRAG_VERSION = 1;
|
|
24
|
+
exports.RECHNUNG_AUFRUFE = [
|
|
25
|
+
'createCustomer',
|
|
26
|
+
'getCustomer',
|
|
27
|
+
'updateCustomer',
|
|
28
|
+
'searchCustomers',
|
|
29
|
+
'issueInvoice',
|
|
30
|
+
'cancelInvoice',
|
|
31
|
+
'createCreditNote',
|
|
32
|
+
'getInvoice',
|
|
33
|
+
'listInvoices',
|
|
34
|
+
'getInvoicePdf',
|
|
35
|
+
'getInvoiceXml',
|
|
36
|
+
];
|
|
37
|
+
/**
|
|
38
|
+
* Stabile Fehlercodes. Das Fremdsystem verzweigt am Code, der Text darf sich
|
|
39
|
+
* aendern. `validation` traegt zusaetzlich `errors: [{ field, message }]`.
|
|
40
|
+
*/
|
|
41
|
+
exports.INVOICE_ERROR_CODES = [
|
|
42
|
+
'validation',
|
|
43
|
+
'idempotency_conflict',
|
|
44
|
+
'module_inactive',
|
|
45
|
+
'customer_not_found',
|
|
46
|
+
'customer_exists',
|
|
47
|
+
'short_code_taken',
|
|
48
|
+
'short_code_immutable',
|
|
49
|
+
'recipient_required',
|
|
50
|
+
'invoice_requirements_missing',
|
|
51
|
+
'invoice_not_found',
|
|
52
|
+
'invoice_ambiguous',
|
|
53
|
+
'not_cancellable',
|
|
54
|
+
'partial_credit_exists',
|
|
55
|
+
'credit_exceeds_invoice',
|
|
56
|
+
'einvoice_incomplete',
|
|
57
|
+
];
|
|
58
|
+
/** Gruende einer Gutschrift. Der Server druckt den deutschen Anzeigetext. */
|
|
59
|
+
exports.CREDIT_NOTE_REASONS = [
|
|
60
|
+
'cancellation',
|
|
61
|
+
'price_reduction',
|
|
62
|
+
'return',
|
|
63
|
+
'incorrect_invoice',
|
|
64
|
+
'other',
|
|
65
|
+
];
|
|
66
|
+
exports.TAX_SCHEMES = ['normal', 'smallBusiness', 'reverseCharge', 'igLieferung', 'exportThirdCountry'];
|
|
67
|
+
exports.PRICE_MODES = ['net', 'gross'];
|
|
68
|
+
exports.VAT_RATES = [0, 10, 13, 20];
|
|
69
|
+
exports.CUSTOMER_TYPES = ['private', 'company'];
|
|
70
|
+
exports.INVOICE_LIST_STATUS = ['final', 'paid', 'cancelled', 'open', 'overdue'];
|
|
71
|
+
exports.DOC_TYPES = ['RE', 'GU'];
|
|
72
|
+
exports.EINVOICE_FORMATS = ['ubl', 'cii'];
|
|
73
|
+
const text = (max, pflicht = false, extra = {}) => ({ typ: 'string', pflicht, max, ...(pflicht && extra.min === undefined ? { min: 1 } : {}), ...extra });
|
|
74
|
+
const idempotencyKey = (pflicht) => ({ typ: 'string', pflicht, min: 1, max: 120 });
|
|
75
|
+
const id = { typ: 'string', pflicht: false, min: 1, max: 128 };
|
|
76
|
+
const idPflicht = { typ: 'string', pflicht: true, min: 1, max: 128 };
|
|
77
|
+
const datum = (pflicht = false) => ({ typ: 'string', pflicht, min: 10, max: 10, format: 'date' });
|
|
78
|
+
const limit = { typ: 'integer', pflicht: false, min: 1, max: 100 };
|
|
79
|
+
const cursor = { typ: 'string', pflicht: false, min: 1, max: 500 };
|
|
80
|
+
/** Kunde, wie das Fremdsystem ihn schickt. `vatId` ist die UID-Nummer. */
|
|
81
|
+
exports.KUNDE_FELDER = Object.freeze({
|
|
82
|
+
type: { typ: 'enum', pflicht: true, werte: exports.CUSTOMER_TYPES },
|
|
83
|
+
name: text(200, true),
|
|
84
|
+
legalForm: text(40),
|
|
85
|
+
email: text(254, false, { format: 'email' }),
|
|
86
|
+
phone: text(40, false, { format: 'phone' }),
|
|
87
|
+
street: text(200),
|
|
88
|
+
houseNumber: text(20),
|
|
89
|
+
zip: text(10),
|
|
90
|
+
city: text(100),
|
|
91
|
+
country: text(2, true, { min: 2, format: 'country' }),
|
|
92
|
+
vatId: text(20, false, { format: 'vatId' }),
|
|
93
|
+
shortCode: text(8, false, { format: 'shortCode' }),
|
|
94
|
+
isAuthority: { typ: 'boolean', pflicht: false },
|
|
95
|
+
note: text(1000),
|
|
96
|
+
externalId: { typ: 'string', pflicht: false, min: 1, max: 120 },
|
|
97
|
+
});
|
|
98
|
+
/** Beim Aendern ist jedes Kundenfeld optional. */
|
|
99
|
+
const KUNDE_PATCH = Object.freeze(Object.fromEntries(Object.entries(exports.KUNDE_FELDER).map(([name, feld]) => [name, { ...feld, pflicht: false }])));
|
|
100
|
+
/** Eine Rechnungs- oder Gutschriftsposition. Preise in ganzen Cent. */
|
|
101
|
+
exports.POSITION_FELDER = Object.freeze({
|
|
102
|
+
description: text(300, true),
|
|
103
|
+
subtitle: text(1000),
|
|
104
|
+
quantity: { typ: 'number', pflicht: true, min: 0, exklusivMin: true, max: 1_000_000, nachkomma: 3 },
|
|
105
|
+
unit: text(20),
|
|
106
|
+
unitPriceCents: { typ: 'integer', pflicht: true, min: 0, max: 100_000_000 },
|
|
107
|
+
vatRate: { typ: 'enum', pflicht: true, werte: exports.VAT_RATES },
|
|
108
|
+
discountPct: { typ: 'number', pflicht: false, min: 0, max: 100, nachkomma: 2 },
|
|
109
|
+
});
|
|
110
|
+
const positionen = { typ: 'list', pflicht: true, min: 1, max: 500, eintrag: { typ: 'object', pflicht: true, felder: exports.POSITION_FELDER } };
|
|
111
|
+
exports.RECHNUNG_ANFRAGEN = Object.freeze({
|
|
112
|
+
createCustomer: {
|
|
113
|
+
customer: { typ: 'object', pflicht: true, felder: exports.KUNDE_FELDER },
|
|
114
|
+
idempotencyKey: idempotencyKey(false),
|
|
115
|
+
},
|
|
116
|
+
getCustomer: {
|
|
117
|
+
customerId: id,
|
|
118
|
+
externalId: { typ: 'string', pflicht: false, min: 1, max: 120 },
|
|
119
|
+
},
|
|
120
|
+
updateCustomer: {
|
|
121
|
+
customerId: idPflicht,
|
|
122
|
+
customer: { typ: 'object', pflicht: true, felder: KUNDE_PATCH },
|
|
123
|
+
},
|
|
124
|
+
searchCustomers: {
|
|
125
|
+
externalId: { typ: 'string', pflicht: false, min: 1, max: 120 },
|
|
126
|
+
vatId: text(20),
|
|
127
|
+
email: text(254),
|
|
128
|
+
name: text(200),
|
|
129
|
+
limit,
|
|
130
|
+
cursor,
|
|
131
|
+
},
|
|
132
|
+
issueInvoice: {
|
|
133
|
+
idempotencyKey: idempotencyKey(true),
|
|
134
|
+
customerId: id,
|
|
135
|
+
taxScheme: { typ: 'enum', pflicht: true, werte: exports.TAX_SCHEMES },
|
|
136
|
+
priceMode: { typ: 'enum', pflicht: true, werte: exports.PRICE_MODES },
|
|
137
|
+
serviceStart: datum(true),
|
|
138
|
+
serviceEnd: datum(),
|
|
139
|
+
paymentTermDays: { typ: 'integer', pflicht: false, min: 0, max: 365 },
|
|
140
|
+
orderReference: text(200),
|
|
141
|
+
intro: text(2000),
|
|
142
|
+
note: text(2000),
|
|
143
|
+
paymentReference: text(140),
|
|
144
|
+
girocode: { typ: 'boolean', pflicht: false },
|
|
145
|
+
tracking: { typ: 'boolean', pflicht: false },
|
|
146
|
+
items: positionen,
|
|
147
|
+
metadata: { typ: 'map', pflicht: false, maxSchluessel: 20, schluesselMuster: '^[a-zA-Z0-9_]{1,40}$', wertMax: 500 },
|
|
148
|
+
},
|
|
149
|
+
cancelInvoice: {
|
|
150
|
+
idempotencyKey: idempotencyKey(true),
|
|
151
|
+
invoiceId: idPflicht,
|
|
152
|
+
reason: { typ: 'enum', pflicht: true, werte: exports.CREDIT_NOTE_REASONS },
|
|
153
|
+
note: text(2000),
|
|
154
|
+
},
|
|
155
|
+
createCreditNote: {
|
|
156
|
+
idempotencyKey: idempotencyKey(true),
|
|
157
|
+
invoiceId: idPflicht,
|
|
158
|
+
reason: { typ: 'enum', pflicht: true, werte: exports.CREDIT_NOTE_REASONS },
|
|
159
|
+
note: text(2000),
|
|
160
|
+
items: positionen,
|
|
161
|
+
},
|
|
162
|
+
getInvoice: {
|
|
163
|
+
invoiceId: id,
|
|
164
|
+
number: { typ: 'string', pflicht: false, min: 1, max: 100 },
|
|
165
|
+
},
|
|
166
|
+
listInvoices: {
|
|
167
|
+
from: datum(),
|
|
168
|
+
to: datum(),
|
|
169
|
+
status: { typ: 'enum', pflicht: false, werte: exports.INVOICE_LIST_STATUS },
|
|
170
|
+
docType: { typ: 'enum', pflicht: false, werte: exports.DOC_TYPES },
|
|
171
|
+
customerId: id,
|
|
172
|
+
limit,
|
|
173
|
+
cursor,
|
|
174
|
+
},
|
|
175
|
+
getInvoicePdf: {
|
|
176
|
+
invoiceId: idPflicht,
|
|
177
|
+
},
|
|
178
|
+
getInvoiceXml: {
|
|
179
|
+
invoiceId: idPflicht,
|
|
180
|
+
format: { typ: 'enum', pflicht: false, werte: exports.EINVOICE_FORMATS },
|
|
181
|
+
},
|
|
182
|
+
});
|
|
183
|
+
/** Genau eines dieser Felder muss gesetzt sein (je Aufruf, je Gruppe). */
|
|
184
|
+
exports.RECHNUNG_GENAU_EINS = Object.freeze({
|
|
185
|
+
getCustomer: [['customerId', 'externalId']],
|
|
186
|
+
getInvoice: [['invoiceId', 'number']],
|
|
187
|
+
});
|
|
188
|
+
/** Mindestens eines dieser Felder muss gesetzt sein (je Aufruf, je Gruppe). */
|
|
189
|
+
exports.RECHNUNG_MINDESTENS_EINS = Object.freeze({
|
|
190
|
+
searchCustomers: [['externalId', 'vatId', 'email', 'name']],
|
|
191
|
+
});
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* umhuellt, muss ihn weiterhin absetzen koennen.
|
|
14
14
|
*/
|
|
15
15
|
import type { TransportBodyFields } from './transport.js';
|
|
16
|
-
export declare const AUFRUFE: readonly ["activateCashregister", "cancelReceipt", "createCustomerCashregister", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCustomerCredentials", "getCustomerSignatureStatus", "getFirstReceiptDate", "getKasseSettings", "getPartnerCustomer", "getPartnerInfo", "getPrintJob", "getReceipt", "hobexPayApi", "hobexRefundApi", "listCustomerCashregisters", "listMyArticleGroups", "listMyArticles", "listMyCashregisters", "listMyPrinters", "listMyReceipts", "listMyTipRecipients", "listPartnerCustomers", "listPartnerWebhookDeliveries", "listPartnerWebhooks", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "pairRegisterDevice", "registerPinLogin", "registerUserLogin", "renewRegisterSession", "requestCustomerSignature", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "unpairRegisterDevice", "rotatePartnerWebhookSecret", "updatePartnerWebhook"];
|
|
16
|
+
export declare const AUFRUFE: readonly ["activateCashregister", "cancelInvoice", "cancelReceipt", "createCreditNote", "createCustomer", "createCustomerCashregister", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCustomer", "getCustomerCredentials", "getCustomerSignatureStatus", "getFirstReceiptDate", "getInvoice", "getInvoicePdf", "getInvoiceXml", "getKasseSettings", "getPartnerCustomer", "getPartnerInfo", "getPrintJob", "getReceipt", "hobexPayApi", "hobexRefundApi", "issueInvoice", "listCustomerCashregisters", "listInvoices", "listMyArticleGroups", "listMyArticles", "listMyCashregisters", "listMyPrinters", "listMyReceipts", "listMyTipRecipients", "listPartnerCustomers", "listPartnerWebhookDeliveries", "listPartnerWebhooks", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "pairRegisterDevice", "registerPinLogin", "registerUserLogin", "renewRegisterSession", "requestCustomerSignature", "searchCustomers", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "unpairRegisterDevice", "rotatePartnerWebhookSecret", "updateCustomer", "updatePartnerWebhook"];
|
|
17
17
|
export type Aufruf = typeof AUFRUFE[number];
|
|
18
18
|
/** Wie [KasseneckTransport], nur mit bekanntem Aufrufnamen. Nicht exportiert nach aussen. */
|
|
19
19
|
export type InternerTransport = <T = unknown>(functionName: Aufruf, params?: Record<string, unknown>, extraBodyFields?: TransportBodyFields, secretParams?: readonly string[]) => Promise<T>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export const AUFRUFE = [
|
|
2
2
|
'activateCashregister',
|
|
3
|
+
'cancelInvoice',
|
|
3
4
|
'cancelReceipt',
|
|
5
|
+
'createCreditNote',
|
|
6
|
+
'createCustomer',
|
|
4
7
|
'createCustomerCashregister',
|
|
5
8
|
'createPartnerCustomer',
|
|
6
9
|
'checkPartnerCustomerEmail',
|
|
@@ -14,9 +17,13 @@ export const AUFRUFE = [
|
|
|
14
17
|
'endRegisterSession',
|
|
15
18
|
'financeWebService',
|
|
16
19
|
'generateFullReceiptId',
|
|
20
|
+
'getCustomer',
|
|
17
21
|
'getCustomerCredentials',
|
|
18
22
|
'getCustomerSignatureStatus',
|
|
19
23
|
'getFirstReceiptDate',
|
|
24
|
+
'getInvoice',
|
|
25
|
+
'getInvoicePdf',
|
|
26
|
+
'getInvoiceXml',
|
|
20
27
|
'getKasseSettings',
|
|
21
28
|
'getPartnerCustomer',
|
|
22
29
|
'getPartnerInfo',
|
|
@@ -24,7 +31,9 @@ export const AUFRUFE = [
|
|
|
24
31
|
'getReceipt',
|
|
25
32
|
'hobexPayApi',
|
|
26
33
|
'hobexRefundApi',
|
|
34
|
+
'issueInvoice',
|
|
27
35
|
'listCustomerCashregisters',
|
|
36
|
+
'listInvoices',
|
|
28
37
|
'listMyArticleGroups',
|
|
29
38
|
'listMyArticles',
|
|
30
39
|
'listMyCashregisters',
|
|
@@ -41,6 +50,7 @@ export const AUFRUFE = [
|
|
|
41
50
|
'registerUserLogin',
|
|
42
51
|
'renewRegisterSession',
|
|
43
52
|
'requestCustomerSignature',
|
|
53
|
+
'searchCustomers',
|
|
44
54
|
'sendPartnerCustomerFonLink',
|
|
45
55
|
'sendPartnerWebhookTest',
|
|
46
56
|
'sendReceiptEmail',
|
|
@@ -49,5 +59,6 @@ export const AUFRUFE = [
|
|
|
49
59
|
'stripeCaptureIntent',
|
|
50
60
|
'unpairRegisterDevice',
|
|
51
61
|
'rotatePartnerWebhookSecret',
|
|
62
|
+
'updateCustomer',
|
|
52
63
|
'updatePartnerWebhook',
|
|
53
64
|
];
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fassade ueber den Aufrufen der Rechnungs-API: Schluessel einmal binden, dann rufen.
|
|
3
|
+
*
|
|
4
|
+
* Wie [createPartnerApi] bewusst **keine** Klasse — die Aufrufe sind freie
|
|
5
|
+
* Funktionen (endpunkte.ts) und bleiben einzeln importierbar.
|
|
6
|
+
*/
|
|
7
|
+
import { type FetchLike } from '../client/transport.js';
|
|
8
|
+
import type { EInvoiceFormat } from './vertrag.js';
|
|
9
|
+
import type { CancelInvoiceRequest, CancelResult, CreditNoteRequest, CreditNoteResult, Customer, CustomerInput, CustomerPage, CustomerSearch, InvoiceDetail, InvoiceListQuery, InvoicePage, IssueInvoiceRequest, IssueResult } from './typen.js';
|
|
10
|
+
export interface RechnungApiOptions {
|
|
11
|
+
/** `api_key` des Kontos (`kr_live_…` / `kr_test_…`). Gehoert auf einen Server. */
|
|
12
|
+
apiKey: string;
|
|
13
|
+
/** Abweichende Basis-URL; Vorgabe `https://api.kasseneck.at/v1`. */
|
|
14
|
+
baseUrl?: string;
|
|
15
|
+
/** Zeitlimit je Aufruf in Millisekunden. */
|
|
16
|
+
timeoutMs?: number;
|
|
17
|
+
/** Eigene `fetch`-Umsetzung (Tests, Proxys). */
|
|
18
|
+
fetch?: FetchLike;
|
|
19
|
+
}
|
|
20
|
+
export interface RechnungApi {
|
|
21
|
+
createCustomer(customer: CustomerInput, optionen?: {
|
|
22
|
+
idempotencyKey?: string;
|
|
23
|
+
}): Promise<Customer>;
|
|
24
|
+
getCustomer(kennung: {
|
|
25
|
+
customerId: string;
|
|
26
|
+
} | {
|
|
27
|
+
externalId: string;
|
|
28
|
+
}): Promise<Customer>;
|
|
29
|
+
updateCustomer(customerId: string, patch: Partial<CustomerInput>): Promise<Customer>;
|
|
30
|
+
searchCustomers(suche: CustomerSearch): Promise<CustomerPage>;
|
|
31
|
+
issueInvoice(anfrage: IssueInvoiceRequest): Promise<IssueResult>;
|
|
32
|
+
cancelInvoice(anfrage: CancelInvoiceRequest): Promise<CancelResult>;
|
|
33
|
+
createCreditNote(anfrage: CreditNoteRequest): Promise<CreditNoteResult>;
|
|
34
|
+
getInvoice(kennung: {
|
|
35
|
+
invoiceId: string;
|
|
36
|
+
} | {
|
|
37
|
+
number: string;
|
|
38
|
+
}): Promise<InvoiceDetail>;
|
|
39
|
+
listInvoices(abfrage?: InvoiceListQuery): Promise<InvoicePage>;
|
|
40
|
+
getInvoicePdf(invoiceId: string): Promise<Uint8Array>;
|
|
41
|
+
getInvoiceXml(invoiceId: string, format?: EInvoiceFormat): Promise<string>;
|
|
42
|
+
}
|
|
43
|
+
export declare function createRechnungApi(optionen: RechnungApiOptions): RechnungApi;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fassade ueber den Aufrufen der Rechnungs-API: Schluessel einmal binden, dann rufen.
|
|
3
|
+
*
|
|
4
|
+
* Wie [createPartnerApi] bewusst **keine** Klasse — die Aufrufe sind freie
|
|
5
|
+
* Funktionen (endpunkte.ts) und bleiben einzeln importierbar.
|
|
6
|
+
*/
|
|
7
|
+
import { createBinaryTransport, createTransport } from '../client/transport.js';
|
|
8
|
+
import { rechnungKeyAuth } from './auth.js';
|
|
9
|
+
import { cancelInvoice, createCreditNote, createCustomer, getCustomer, getInvoice, getInvoicePdf, getInvoiceXml, issueInvoice, listInvoices, searchCustomers, updateCustomer, } from './endpunkte.js';
|
|
10
|
+
export function createRechnungApi(optionen) {
|
|
11
|
+
const transportOptionen = {
|
|
12
|
+
auth: rechnungKeyAuth({ apiKey: optionen.apiKey }),
|
|
13
|
+
baseUrl: optionen.baseUrl,
|
|
14
|
+
timeoutMs: optionen.timeoutMs,
|
|
15
|
+
fetch: optionen.fetch,
|
|
16
|
+
};
|
|
17
|
+
const rufen = createTransport(transportOptionen);
|
|
18
|
+
const rufenBinaer = createBinaryTransport(transportOptionen);
|
|
19
|
+
return {
|
|
20
|
+
createCustomer: (customer, o) => createCustomer(rufen, customer, o),
|
|
21
|
+
getCustomer: (kennung) => getCustomer(rufen, kennung),
|
|
22
|
+
updateCustomer: (id, patch) => updateCustomer(rufen, id, patch),
|
|
23
|
+
searchCustomers: (suche) => searchCustomers(rufen, suche),
|
|
24
|
+
issueInvoice: (anfrage) => issueInvoice(rufen, anfrage),
|
|
25
|
+
cancelInvoice: (anfrage) => cancelInvoice(rufen, anfrage),
|
|
26
|
+
createCreditNote: (anfrage) => createCreditNote(rufen, anfrage),
|
|
27
|
+
getInvoice: (kennung) => getInvoice(rufen, kennung),
|
|
28
|
+
listInvoices: (abfrage) => listInvoices(rufen, abfrage),
|
|
29
|
+
getInvoicePdf: (id) => getInvoicePdf(rufenBinaer, id),
|
|
30
|
+
getInvoiceXml: (id, format) => getInvoiceXml(rufen, id, format),
|
|
31
|
+
};
|
|
32
|
+
}
|