@kreiseck/kasseneck-api 0.16.0 → 0.18.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 +57 -0
- package/README.md +61 -0
- package/dist/cjs/client/aufrufe.d.ts +1 -1
- package/dist/cjs/client/aufrufe.js +2 -0
- package/dist/cjs/rechnung/api.d.ts +10 -3
- package/dist/cjs/rechnung/api.js +3 -1
- package/dist/cjs/rechnung/endpunkte.d.ts +23 -4
- package/dist/cjs/rechnung/endpunkte.js +41 -3
- package/dist/cjs/rechnung/index.d.ts +4 -3
- package/dist/cjs/rechnung/index.js +11 -1
- package/dist/cjs/rechnung/texte.d.ts +202 -0
- package/dist/cjs/rechnung/texte.js +377 -0
- package/dist/cjs/rechnung/typen.d.ts +70 -2
- package/dist/cjs/rechnung/vertrag.d.ts +47 -2
- package/dist/cjs/rechnung/vertrag.js +181 -2
- package/dist/esm/client/aufrufe.d.ts +1 -1
- package/dist/esm/client/aufrufe.js +2 -0
- package/dist/esm/rechnung/api.d.ts +10 -3
- package/dist/esm/rechnung/api.js +4 -2
- package/dist/esm/rechnung/endpunkte.d.ts +23 -4
- package/dist/esm/rechnung/endpunkte.js +39 -3
- package/dist/esm/rechnung/index.d.ts +4 -3
- package/dist/esm/rechnung/index.js +3 -2
- package/dist/esm/rechnung/texte.d.ts +202 -0
- package/dist/esm/rechnung/texte.js +373 -0
- package/dist/esm/rechnung/typen.d.ts +70 -2
- package/dist/esm/rechnung/vertrag.d.ts +47 -2
- package/dist/esm/rechnung/vertrag.js +180 -1
- package/fixtures/hobex-hps-codes.json +1 -1
- package/fixtures/kasse-texte.json +1 -1
- package/fixtures/oberflaeche.json +75 -3
- package/fixtures/rechnung-api-beispiele/brands-ok.json +8 -0
- package/fixtures/rechnung-api-beispiele/issue-bezahlt.json +32 -0
- package/fixtures/rechnung-api-beispiele/issue-englisch.json +30 -0
- package/fixtures/rechnung-api-beispiele/issue-fehler-einheit.json +26 -0
- package/fixtures/rechnung-api-beispiele/issue-fehler-sprache.json +26 -0
- package/fixtures/rechnung-api-beispiele/issue-fehler-zahlungsart.json +26 -0
- package/fixtures/rechnung-api-beispiele/issue-netto-20.json +1 -1
- package/fixtures/rechnung-api-beispiele/zahlung-fehler-ohne-schluessel.json +14 -0
- package/fixtures/rechnung-api-beispiele/zahlung-nachtrag.json +14 -0
- package/fixtures/rechnung-api.schema.json +222 -6
- package/fixtures/rechnung-texte.json +424 -0
- package/package.json +2 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"aufruf": "issueInvoice",
|
|
3
|
+
"beschreibung": "Unbekannte Sprache",
|
|
4
|
+
"anfrage": {
|
|
5
|
+
"idempotencyKey": "bsp-en-2",
|
|
6
|
+
"taxScheme": "normal",
|
|
7
|
+
"priceMode": "net",
|
|
8
|
+
"serviceStart": "2026-09-15",
|
|
9
|
+
"language": "fr",
|
|
10
|
+
"items": [
|
|
11
|
+
{
|
|
12
|
+
"description": "Beratung",
|
|
13
|
+
"quantity": 1,
|
|
14
|
+
"unitPriceCents": 1000,
|
|
15
|
+
"vatRate": 20
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"erwartet": {
|
|
20
|
+
"ok": false,
|
|
21
|
+
"code": "validation",
|
|
22
|
+
"fields": [
|
|
23
|
+
"language"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"aufruf": "issueInvoice",
|
|
3
|
+
"beschreibung": "Unbekannte Zahlungsart",
|
|
4
|
+
"anfrage": {
|
|
5
|
+
"idempotencyKey": "bsp-zahlungsart",
|
|
6
|
+
"taxScheme": "normal",
|
|
7
|
+
"priceMode": "net",
|
|
8
|
+
"serviceStart": "2026-09-16",
|
|
9
|
+
"items": [
|
|
10
|
+
{
|
|
11
|
+
"description": "Beratung",
|
|
12
|
+
"quantity": 1,
|
|
13
|
+
"unitPriceCents": 5000,
|
|
14
|
+
"vatRate": 20
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"payment": {
|
|
18
|
+
"method": "bitcoin"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"erwartet": {
|
|
22
|
+
"ok": false,
|
|
23
|
+
"code": "validation",
|
|
24
|
+
"fields": ["payment.method"]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"aufruf": "recordInvoicePayment",
|
|
3
|
+
"beschreibung": "Ohne Idempotenz-Schluessel — eine Wiederholung wuerde zweimal buchen",
|
|
4
|
+
"anfrage": {
|
|
5
|
+
"invoiceId": "rechnung_beispiel",
|
|
6
|
+
"method": "transfer",
|
|
7
|
+
"amountCents": 12000
|
|
8
|
+
},
|
|
9
|
+
"erwartet": {
|
|
10
|
+
"ok": false,
|
|
11
|
+
"code": "validation",
|
|
12
|
+
"fields": ["idempotencyKey"]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"aufruf": "recordInvoicePayment",
|
|
3
|
+
"beschreibung": "Ueberweisung trifft spaeter ein",
|
|
4
|
+
"anfrage": {
|
|
5
|
+
"idempotencyKey": "bsp-zahlung-1",
|
|
6
|
+
"invoiceId": "rechnung_beispiel",
|
|
7
|
+
"method": "transfer",
|
|
8
|
+
"amountCents": 12000,
|
|
9
|
+
"paidAt": "2026-09-20"
|
|
10
|
+
},
|
|
11
|
+
"erwartet": {
|
|
12
|
+
"ok": true
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"title": "Kasseneck Rechnungs-API",
|
|
4
4
|
"version": 1,
|
|
5
|
-
"paket": "0.
|
|
5
|
+
"paket": "0.18.0",
|
|
6
6
|
"aufrufe": {
|
|
7
7
|
"createCustomer": {
|
|
8
8
|
"anfrage": {
|
|
@@ -79,6 +79,12 @@
|
|
|
79
79
|
"type": "string",
|
|
80
80
|
"minLength": 1,
|
|
81
81
|
"maxLength": 120
|
|
82
|
+
},
|
|
83
|
+
"language": {
|
|
84
|
+
"enum": [
|
|
85
|
+
"de",
|
|
86
|
+
"en"
|
|
87
|
+
]
|
|
82
88
|
}
|
|
83
89
|
},
|
|
84
90
|
"required": [
|
|
@@ -204,6 +210,12 @@
|
|
|
204
210
|
"type": "string",
|
|
205
211
|
"minLength": 1,
|
|
206
212
|
"maxLength": 120
|
|
213
|
+
},
|
|
214
|
+
"language": {
|
|
215
|
+
"enum": [
|
|
216
|
+
"de",
|
|
217
|
+
"en"
|
|
218
|
+
]
|
|
207
219
|
}
|
|
208
220
|
},
|
|
209
221
|
"additionalProperties": false
|
|
@@ -350,8 +362,57 @@
|
|
|
350
362
|
"x-decimals": 3
|
|
351
363
|
},
|
|
352
364
|
"unit": {
|
|
353
|
-
"
|
|
354
|
-
|
|
365
|
+
"enum": [
|
|
366
|
+
"piece",
|
|
367
|
+
"pair",
|
|
368
|
+
"set",
|
|
369
|
+
"dozen",
|
|
370
|
+
"second",
|
|
371
|
+
"minute",
|
|
372
|
+
"hour",
|
|
373
|
+
"day",
|
|
374
|
+
"night",
|
|
375
|
+
"week",
|
|
376
|
+
"month",
|
|
377
|
+
"quarter",
|
|
378
|
+
"half_year",
|
|
379
|
+
"year",
|
|
380
|
+
"milligram",
|
|
381
|
+
"gram",
|
|
382
|
+
"kilogram",
|
|
383
|
+
"tonne",
|
|
384
|
+
"millimetre",
|
|
385
|
+
"centimetre",
|
|
386
|
+
"metre",
|
|
387
|
+
"running_metre",
|
|
388
|
+
"kilometre",
|
|
389
|
+
"square_metre",
|
|
390
|
+
"hectare",
|
|
391
|
+
"millilitre",
|
|
392
|
+
"litre",
|
|
393
|
+
"cubic_metre",
|
|
394
|
+
"kilowatt_hour",
|
|
395
|
+
"megawatt_hour",
|
|
396
|
+
"gigabyte",
|
|
397
|
+
"terabyte",
|
|
398
|
+
"flat_rate",
|
|
399
|
+
"person",
|
|
400
|
+
"licence",
|
|
401
|
+
"user",
|
|
402
|
+
"device",
|
|
403
|
+
"session",
|
|
404
|
+
"trip",
|
|
405
|
+
"page",
|
|
406
|
+
"sheet",
|
|
407
|
+
"package",
|
|
408
|
+
"box",
|
|
409
|
+
"carton",
|
|
410
|
+
"bottle",
|
|
411
|
+
"can",
|
|
412
|
+
"roll",
|
|
413
|
+
"bag",
|
|
414
|
+
"pallet"
|
|
415
|
+
]
|
|
355
416
|
},
|
|
356
417
|
"unitPriceCents": {
|
|
357
418
|
"type": "integer",
|
|
@@ -392,6 +453,49 @@
|
|
|
392
453
|
"type": "string",
|
|
393
454
|
"maxLength": 500
|
|
394
455
|
}
|
|
456
|
+
},
|
|
457
|
+
"language": {
|
|
458
|
+
"enum": [
|
|
459
|
+
"de",
|
|
460
|
+
"en"
|
|
461
|
+
]
|
|
462
|
+
},
|
|
463
|
+
"brandId": {
|
|
464
|
+
"type": "string",
|
|
465
|
+
"minLength": 1,
|
|
466
|
+
"maxLength": 128
|
|
467
|
+
},
|
|
468
|
+
"payment": {
|
|
469
|
+
"type": "object",
|
|
470
|
+
"properties": {
|
|
471
|
+
"method": {
|
|
472
|
+
"enum": [
|
|
473
|
+
"transfer",
|
|
474
|
+
"card",
|
|
475
|
+
"online",
|
|
476
|
+
"cash"
|
|
477
|
+
]
|
|
478
|
+
},
|
|
479
|
+
"amountCents": {
|
|
480
|
+
"type": "integer",
|
|
481
|
+
"minimum": 1,
|
|
482
|
+
"maximum": 100000000
|
|
483
|
+
},
|
|
484
|
+
"paidAt": {
|
|
485
|
+
"type": "string",
|
|
486
|
+
"minLength": 10,
|
|
487
|
+
"maxLength": 10,
|
|
488
|
+
"format": "date"
|
|
489
|
+
},
|
|
490
|
+
"reference": {
|
|
491
|
+
"type": "string",
|
|
492
|
+
"maxLength": 100
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
"required": [
|
|
496
|
+
"method"
|
|
497
|
+
],
|
|
498
|
+
"additionalProperties": false
|
|
395
499
|
}
|
|
396
500
|
},
|
|
397
501
|
"required": [
|
|
@@ -490,8 +594,57 @@
|
|
|
490
594
|
"x-decimals": 3
|
|
491
595
|
},
|
|
492
596
|
"unit": {
|
|
493
|
-
"
|
|
494
|
-
|
|
597
|
+
"enum": [
|
|
598
|
+
"piece",
|
|
599
|
+
"pair",
|
|
600
|
+
"set",
|
|
601
|
+
"dozen",
|
|
602
|
+
"second",
|
|
603
|
+
"minute",
|
|
604
|
+
"hour",
|
|
605
|
+
"day",
|
|
606
|
+
"night",
|
|
607
|
+
"week",
|
|
608
|
+
"month",
|
|
609
|
+
"quarter",
|
|
610
|
+
"half_year",
|
|
611
|
+
"year",
|
|
612
|
+
"milligram",
|
|
613
|
+
"gram",
|
|
614
|
+
"kilogram",
|
|
615
|
+
"tonne",
|
|
616
|
+
"millimetre",
|
|
617
|
+
"centimetre",
|
|
618
|
+
"metre",
|
|
619
|
+
"running_metre",
|
|
620
|
+
"kilometre",
|
|
621
|
+
"square_metre",
|
|
622
|
+
"hectare",
|
|
623
|
+
"millilitre",
|
|
624
|
+
"litre",
|
|
625
|
+
"cubic_metre",
|
|
626
|
+
"kilowatt_hour",
|
|
627
|
+
"megawatt_hour",
|
|
628
|
+
"gigabyte",
|
|
629
|
+
"terabyte",
|
|
630
|
+
"flat_rate",
|
|
631
|
+
"person",
|
|
632
|
+
"licence",
|
|
633
|
+
"user",
|
|
634
|
+
"device",
|
|
635
|
+
"session",
|
|
636
|
+
"trip",
|
|
637
|
+
"page",
|
|
638
|
+
"sheet",
|
|
639
|
+
"package",
|
|
640
|
+
"box",
|
|
641
|
+
"carton",
|
|
642
|
+
"bottle",
|
|
643
|
+
"can",
|
|
644
|
+
"roll",
|
|
645
|
+
"bag",
|
|
646
|
+
"pallet"
|
|
647
|
+
]
|
|
495
648
|
},
|
|
496
649
|
"unitPriceCents": {
|
|
497
650
|
"type": "integer",
|
|
@@ -614,6 +767,12 @@
|
|
|
614
767
|
"type": "string",
|
|
615
768
|
"minLength": 1,
|
|
616
769
|
"maxLength": 128
|
|
770
|
+
},
|
|
771
|
+
"language": {
|
|
772
|
+
"enum": [
|
|
773
|
+
"de",
|
|
774
|
+
"en"
|
|
775
|
+
]
|
|
617
776
|
}
|
|
618
777
|
},
|
|
619
778
|
"required": [
|
|
@@ -650,6 +809,59 @@
|
|
|
650
809
|
"properties": {},
|
|
651
810
|
"additionalProperties": false
|
|
652
811
|
}
|
|
812
|
+
},
|
|
813
|
+
"listBrands": {
|
|
814
|
+
"anfrage": {
|
|
815
|
+
"type": "object",
|
|
816
|
+
"properties": {},
|
|
817
|
+
"additionalProperties": false
|
|
818
|
+
}
|
|
819
|
+
},
|
|
820
|
+
"recordInvoicePayment": {
|
|
821
|
+
"anfrage": {
|
|
822
|
+
"type": "object",
|
|
823
|
+
"properties": {
|
|
824
|
+
"idempotencyKey": {
|
|
825
|
+
"type": "string",
|
|
826
|
+
"minLength": 1,
|
|
827
|
+
"maxLength": 120
|
|
828
|
+
},
|
|
829
|
+
"invoiceId": {
|
|
830
|
+
"type": "string",
|
|
831
|
+
"minLength": 1,
|
|
832
|
+
"maxLength": 128
|
|
833
|
+
},
|
|
834
|
+
"method": {
|
|
835
|
+
"enum": [
|
|
836
|
+
"transfer",
|
|
837
|
+
"card",
|
|
838
|
+
"online",
|
|
839
|
+
"cash"
|
|
840
|
+
]
|
|
841
|
+
},
|
|
842
|
+
"amountCents": {
|
|
843
|
+
"type": "integer",
|
|
844
|
+
"minimum": 1,
|
|
845
|
+
"maximum": 100000000
|
|
846
|
+
},
|
|
847
|
+
"paidAt": {
|
|
848
|
+
"type": "string",
|
|
849
|
+
"minLength": 10,
|
|
850
|
+
"maxLength": 10,
|
|
851
|
+
"format": "date"
|
|
852
|
+
},
|
|
853
|
+
"reference": {
|
|
854
|
+
"type": "string",
|
|
855
|
+
"maxLength": 100
|
|
856
|
+
}
|
|
857
|
+
},
|
|
858
|
+
"required": [
|
|
859
|
+
"idempotencyKey",
|
|
860
|
+
"invoiceId",
|
|
861
|
+
"method"
|
|
862
|
+
],
|
|
863
|
+
"additionalProperties": false
|
|
864
|
+
}
|
|
653
865
|
}
|
|
654
866
|
},
|
|
655
867
|
"codes": [
|
|
@@ -669,7 +881,11 @@
|
|
|
669
881
|
"credit_exceeds_invoice",
|
|
670
882
|
"einvoice_incomplete",
|
|
671
883
|
"invoice_api_not_enabled",
|
|
672
|
-
"invoice_setup_incomplete"
|
|
884
|
+
"invoice_setup_incomplete",
|
|
885
|
+
"language_not_allowed",
|
|
886
|
+
"brand_not_found",
|
|
887
|
+
"not_payable",
|
|
888
|
+
"payment_exceeds_invoice"
|
|
673
889
|
],
|
|
674
890
|
"gruende": [
|
|
675
891
|
"cancellation",
|