@kreiseck/kasseneck-api 1.7.1 → 1.8.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 +106 -0
- package/README.md +170 -1
- package/dist/cjs/client/aufrufe.d.ts +9 -7
- package/dist/cjs/client/aufrufe.js +57 -2
- package/dist/cjs/client/errors.js +2 -0
- package/dist/cjs/client/index.d.ts +1 -1
- package/dist/cjs/client/index.js +2 -1
- package/dist/cjs/client/transport.d.ts +27 -3
- package/dist/cjs/client/transport.js +29 -3
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +3 -2
- package/dist/cjs/inventory/api.d.ts +21 -2
- package/dist/cjs/inventory/api.js +22 -3
- package/dist/cjs/inventory/fehler.d.ts +6 -0
- package/dist/cjs/inventory/fehler.js +12 -0
- package/dist/cjs/inventory/index.d.ts +6 -4
- package/dist/cjs/inventory/index.js +33 -3
- package/dist/cjs/inventory/inventur.d.ts +104 -0
- package/dist/cjs/inventory/inventur.js +245 -0
- package/dist/cjs/inventory/lesen.d.ts +20 -1
- package/dist/cjs/inventory/lesen.js +307 -0
- package/dist/cjs/inventory/typen.d.ts +410 -1
- package/dist/cjs/inventory/vertrag.d.ts +94 -8
- package/dist/cjs/inventory/vertrag.js +117 -5
- package/dist/cjs/invoice/vertrag.d.ts +1 -1
- package/dist/cjs/invoice/vertrag.js +2 -0
- package/dist/cjs/models/cancellation.d.ts +1 -1
- package/dist/cjs/models/cancellation.js +2 -0
- package/dist/cjs/models/payment-errors.d.ts +1 -1
- package/dist/cjs/models/payment-errors.js +2 -0
- package/dist/cjs/models/receipt-email.d.ts +1 -1
- package/dist/cjs/models/receipt-email.js +2 -0
- package/dist/cjs/models/receipt-errors.d.ts +1 -1
- package/dist/cjs/models/receipt-errors.js +2 -0
- package/dist/cjs/pos/errors.d.ts +4 -3
- package/dist/cjs/pos/errors.js +23 -2
- package/dist/cjs/pos/index.d.ts +4 -1
- package/dist/cjs/pos/index.js +9 -2
- package/dist/cjs/pos/inventur.d.ts +104 -0
- package/dist/cjs/pos/inventur.js +117 -0
- package/dist/cjs/pos/texte.d.ts +82 -0
- package/dist/cjs/pos/texte.js +35 -0
- package/dist/cjs/register/errors.d.ts +1 -1
- package/dist/cjs/register/errors.js +2 -0
- package/dist/cjs/stored/vokabular.d.ts +1 -1
- package/dist/cjs/stored/vokabular.js +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client/aufrufe.d.ts +9 -7
- package/dist/esm/client/aufrufe.js +57 -2
- package/dist/esm/client/errors.js +2 -0
- package/dist/esm/client/index.d.ts +1 -1
- package/dist/esm/client/index.js +1 -1
- package/dist/esm/client/transport.d.ts +27 -3
- package/dist/esm/client/transport.js +28 -3
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/inventory/api.d.ts +21 -2
- package/dist/esm/inventory/api.js +23 -4
- package/dist/esm/inventory/fehler.d.ts +6 -0
- package/dist/esm/inventory/fehler.js +11 -0
- package/dist/esm/inventory/index.d.ts +6 -4
- package/dist/esm/inventory/index.js +5 -3
- package/dist/esm/inventory/inventur.d.ts +104 -0
- package/dist/esm/inventory/inventur.js +226 -0
- package/dist/esm/inventory/lesen.d.ts +20 -1
- package/dist/esm/inventory/lesen.js +301 -0
- package/dist/esm/inventory/typen.d.ts +410 -1
- package/dist/esm/inventory/vertrag.d.ts +94 -8
- package/dist/esm/inventory/vertrag.js +116 -4
- package/dist/esm/invoice/vertrag.d.ts +1 -1
- package/dist/esm/invoice/vertrag.js +2 -0
- package/dist/esm/models/cancellation.d.ts +1 -1
- package/dist/esm/models/cancellation.js +2 -0
- package/dist/esm/models/payment-errors.d.ts +1 -1
- package/dist/esm/models/payment-errors.js +2 -0
- package/dist/esm/models/receipt-email.d.ts +1 -1
- package/dist/esm/models/receipt-email.js +2 -0
- package/dist/esm/models/receipt-errors.d.ts +1 -1
- package/dist/esm/models/receipt-errors.js +2 -0
- package/dist/esm/pos/errors.d.ts +4 -3
- package/dist/esm/pos/errors.js +23 -2
- package/dist/esm/pos/index.d.ts +4 -1
- package/dist/esm/pos/index.js +2 -1
- package/dist/esm/pos/inventur.d.ts +104 -0
- package/dist/esm/pos/inventur.js +109 -0
- package/dist/esm/pos/texte.d.ts +82 -0
- package/dist/esm/pos/texte.js +35 -0
- package/dist/esm/register/errors.d.ts +1 -1
- package/dist/esm/register/errors.js +2 -0
- package/dist/esm/stored/vokabular.d.ts +1 -1
- package/dist/esm/stored/vokabular.js +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/fixtures/hobex-hps-codes.json +1 -1
- package/fixtures/invoice-api.schema.json +1 -1
- package/fixtures/invoice-texts.json +1 -1
- package/fixtures/pos-texts.json +94 -1
- package/fixtures/stocktake-quantity-cases.json +55 -0
- package/fixtures/surface.json +151 -8
- package/fixtures/v3/antworten/belege.json +1 -1
- package/fixtures/v3/antworten/belegmail.json +1 -1
- package/fixtures/v3/antworten/kasse-belege.json +1 -1
- package/fixtures/v3/antworten/kasse.json +2958 -3
- package/fixtures/v3/antworten/lager.json +1727 -3
- package/fixtures/v3/antworten/rechnungen.json +1 -1
- package/fixtures/v3/antworten/storno.json +1 -1
- package/fixtures/v3/stored/belege.json +1 -1
- package/fixtures/v3/stored/kasse.json +414 -3
- package/fixtures/v3/stored/rechnungen.json +1 -1
- package/fixtures/v3/v3-vokabular.json +475 -8
- package/fixtures/v3/zahlbetrag-faelle.json +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Zeitpunkte sind ISO 8601 in UTC (`2026-10-06T08:15:00.000Z`), Tage (Wiener
|
|
11
11
|
* Tag) `YYYY-MM-DD`.
|
|
12
12
|
*/
|
|
13
|
-
import type { InventoryWarningCode, InventoryWebhookEventType, LandedCostAllocation, LandedCostType, LocationType, ReservationStatus, StockChangeCause, StockCondition, StockKind, StockLossReason, StockMovementSource, StockMovementType, WebhookDeliveryStatus, WithdrawalType } from './vertrag.js';
|
|
13
|
+
import type { InventoryWarningCode, InventoryWebhookEventType, LandedCostAllocation, LandedCostType, LocationType, ReservationStatus, StockChangeCause, StockCondition, StockKind, StockLossReason, StockMovementSource, StockMovementType, StocktakeActorType, StocktakeCheckReason, StocktakeInventoryAsOf, StocktakeNotBookedReason, StocktakeScopeType, StocktakeSource, StocktakeStatus, StocktakeType, WebhookDeliveryStatus, WithdrawalType } from './vertrag.js';
|
|
14
14
|
/**
|
|
15
15
|
* Ein Artikel, wie `getArticle`, `listArticles`, `lookupArticleByCode` und die
|
|
16
16
|
* Ereignisse `article.*` ihn senden.
|
|
@@ -831,3 +831,412 @@ export interface VariantGroupPage {
|
|
|
831
831
|
/** `null` = letzte Seite. */
|
|
832
832
|
nextCursor: string | null;
|
|
833
833
|
}
|
|
834
|
+
/** Wer etwas tat: Inhaber, Kasseneck-Admin, Kassen-Benutzer oder ein API-Schluessel. */
|
|
835
|
+
export interface StocktakeActor {
|
|
836
|
+
/** `null`: ein Wert, den diese Paketversion nicht kennt, steht als Text, sonst keiner. */
|
|
837
|
+
type: StocktakeActorType | (string & {}) | null;
|
|
838
|
+
id: string | null;
|
|
839
|
+
/** Anzeigename (Kassen-Benutzer); `null` beim Inhaber und bei der API. */
|
|
840
|
+
name: string | null;
|
|
841
|
+
}
|
|
842
|
+
/** Umfang einer Inventur, bei der Anlage eingefroren. */
|
|
843
|
+
export interface StocktakeScope {
|
|
844
|
+
type: StocktakeScopeType | (string & {}) | null;
|
|
845
|
+
/** Nur bei `groups`, sonst leer. */
|
|
846
|
+
groupIds: string[];
|
|
847
|
+
/** Nur bei `articles`, sonst leer. */
|
|
848
|
+
articleIds: string[];
|
|
849
|
+
}
|
|
850
|
+
/** Fortschritt: Zahl der Positionen und ob Positionen zum Nachzaehlen offen sind. */
|
|
851
|
+
export interface StocktakeProgress {
|
|
852
|
+
items: number;
|
|
853
|
+
/**
|
|
854
|
+
* Gezaehlte Positionen; nur `getStocktake` zaehlt sie (sonst `null`, nie 0:
|
|
855
|
+
* „unbekannt“ ist nicht „keine“).
|
|
856
|
+
*/
|
|
857
|
+
counted: number | null;
|
|
858
|
+
recountOpen: boolean;
|
|
859
|
+
}
|
|
860
|
+
/** Die Pruefung: wann und von wem angestossen, ob Soll und Differenz schon gerechnet sind. */
|
|
861
|
+
export interface StocktakeReview {
|
|
862
|
+
startedAt: string | null;
|
|
863
|
+
startedBy: StocktakeActor | null;
|
|
864
|
+
/** `false`: der Server rechnet noch; danach erneut `getStocktake`. */
|
|
865
|
+
complete: boolean;
|
|
866
|
+
/** Stand der Soll-Rechnung; `null`, solange sie nicht fertig ist. */
|
|
867
|
+
expectedAsOf: string | null;
|
|
868
|
+
/** Positionen, die zum Nachzaehlen offen und noch ungezaehlt sind; `null`, wenn der Server es nicht nennt. */
|
|
869
|
+
recountUncounted: number | null;
|
|
870
|
+
}
|
|
871
|
+
/** Der Abschluss: er bucht in Teilen, wiederaufnehmbar. */
|
|
872
|
+
export interface StocktakeClosing {
|
|
873
|
+
startedAt: string | null;
|
|
874
|
+
startedBy: StocktakeActor | null;
|
|
875
|
+
/** Ungezaehlte Positionen als 0 gebucht (sonst nicht gebucht, im Protokoll „nicht gezaehlt“). */
|
|
876
|
+
uncountedAsZero: boolean;
|
|
877
|
+
/** Zahl der Teile; `null`, solange der Plan noch nicht steht. */
|
|
878
|
+
parts: number | null;
|
|
879
|
+
/** Gebuchte Teile; `null`, wenn der Server es nicht nennt. */
|
|
880
|
+
bookedParts: number | null;
|
|
881
|
+
completedAt: string | null;
|
|
882
|
+
}
|
|
883
|
+
export interface StocktakeCancellation {
|
|
884
|
+
reason: string | null;
|
|
885
|
+
cancelledAt: string | null;
|
|
886
|
+
cancelledBy: StocktakeActor | null;
|
|
887
|
+
}
|
|
888
|
+
/** Summen des Abschlusses (Anzahlen; Werte nur mit `lagerApi.kosten`). */
|
|
889
|
+
export interface StocktakeTotals {
|
|
890
|
+
items: number;
|
|
891
|
+
counted: number;
|
|
892
|
+
uncounted: number;
|
|
893
|
+
recounted: number;
|
|
894
|
+
withDifference: number;
|
|
895
|
+
needsCheck: number;
|
|
896
|
+
notBooked: number;
|
|
897
|
+
/** Summe der gebuchten Differenzwerte in Cent; nur mit `lagerApi.kosten`. */
|
|
898
|
+
differenceValueCents?: number | null;
|
|
899
|
+
/** Inventarwert in Cent; nur mit `lagerApi.kosten`. */
|
|
900
|
+
inventoryValueCents?: number | null;
|
|
901
|
+
}
|
|
902
|
+
/** Ein Hinweis zur Inventur, mit der Zahl der betroffenen Positionen. */
|
|
903
|
+
export interface StocktakeWarning {
|
|
904
|
+
code: InventoryWarningCode | (string & {});
|
|
905
|
+
items: number;
|
|
906
|
+
/** Menschentext (deutsch); `null` am Kopf, der nur Codes fuehrt. */
|
|
907
|
+
message: string | null;
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* Siegelstand des Lagerprotokolls beim Abschluss: Wiener Tage `YYYY-MM-DD`.
|
|
911
|
+
* `verified: null` heisst „nicht fertig geprueft“, nie Bruch.
|
|
912
|
+
*/
|
|
913
|
+
export interface StocktakeSeal {
|
|
914
|
+
fromDay: string | null;
|
|
915
|
+
toDay: string | null;
|
|
916
|
+
daysChecked: number | null;
|
|
917
|
+
verified: boolean | null;
|
|
918
|
+
/** Erster Tag mit gebrochenem Siegel; `null` = keiner. */
|
|
919
|
+
firstBreak: string | null;
|
|
920
|
+
/** Tage ohne Siegel. */
|
|
921
|
+
gaps: string[];
|
|
922
|
+
gapCount: number | null;
|
|
923
|
+
/** `time_limit` (Frist des Laufs) oder `unavailable`; fehlt, wenn ganz geprueft. */
|
|
924
|
+
notChecked?: string;
|
|
925
|
+
/** Bis wohin geprueft wurde, wenn die Pruefung nicht fertig wurde. */
|
|
926
|
+
checkedUntil?: string | null;
|
|
927
|
+
}
|
|
928
|
+
/** Das Inventurprotokoll: ob es da ist, und die Pruefsummen der Fassungen, die der Aufrufer sehen darf. */
|
|
929
|
+
export interface StocktakePdfInfo {
|
|
930
|
+
available: boolean;
|
|
931
|
+
/** SHA-256 der Fassung mit Werten; nur mit `lagerApi.kosten`. */
|
|
932
|
+
valuesSha256?: string;
|
|
933
|
+
/** SHA-256 der Fassung nur mit Mengen. */
|
|
934
|
+
quantitiesSha256?: string;
|
|
935
|
+
}
|
|
936
|
+
/**
|
|
937
|
+
* Eine Inventur (Kopf), wie jeder Inventur-Aufruf ausser den Listen der
|
|
938
|
+
* Positionen und Zaehlungen sie sendet.
|
|
939
|
+
*
|
|
940
|
+
* Die Felder des Ergebnisses (`totals`, `warnings`, `seal`, `checksum`,
|
|
941
|
+
* `inventoryAsOf`, `pdf`) gibt es erst nach dem Abschluss; vorher fehlen sie.
|
|
942
|
+
*/
|
|
943
|
+
export interface Stocktake {
|
|
944
|
+
id: string;
|
|
945
|
+
/** 1–100 Zeichen, Vorgabe „Inventur <Standort> <Tag>“. */
|
|
946
|
+
name: string | null;
|
|
947
|
+
locationId: string | null;
|
|
948
|
+
scope: StocktakeScope | null;
|
|
949
|
+
type: StocktakeType | (string & {}) | null;
|
|
950
|
+
/** `YYYY-MM-DD` bei `key_date`, sonst `null`. */
|
|
951
|
+
keyDate: string | null;
|
|
952
|
+
/** Blind zaehlen (Vorgabe): niemand sieht vor der Pruefung ein Soll. */
|
|
953
|
+
blind: boolean;
|
|
954
|
+
status: StocktakeStatus | (string & {}) | null;
|
|
955
|
+
progress: StocktakeProgress | null;
|
|
956
|
+
createdAt: string | null;
|
|
957
|
+
createdBy: StocktakeActor | null;
|
|
958
|
+
source: StocktakeSource | (string & {}) | null;
|
|
959
|
+
/** Letzte Aenderung des Kopfs; Grundlage von `listStocktakes({ updatedSince })`. */
|
|
960
|
+
updatedAt: string | null;
|
|
961
|
+
review: StocktakeReview | null;
|
|
962
|
+
closing: StocktakeClosing | null;
|
|
963
|
+
cancellation: StocktakeCancellation | null;
|
|
964
|
+
totals?: StocktakeTotals;
|
|
965
|
+
/** Hinweise des Abschlusses (`uncounted_items`, `not_booked`, `defect_capped`). */
|
|
966
|
+
warnings?: StocktakeWarning[];
|
|
967
|
+
seal?: StocktakeSeal;
|
|
968
|
+
/** SHA-256 ueber Kopf, Positionen und Zaehlungen (kanonisches JSON), steht auch im Protokoll. */
|
|
969
|
+
checksum?: string | null;
|
|
970
|
+
inventoryAsOf?: StocktakeInventoryAsOf | (string & {}) | null;
|
|
971
|
+
pdf?: StocktakePdfInfo;
|
|
972
|
+
}
|
|
973
|
+
/** Ein Nachzaehlen-Auftrag an einer Position. */
|
|
974
|
+
export interface StocktakeRecount {
|
|
975
|
+
reason: string | null;
|
|
976
|
+
requestedAt: string | null;
|
|
977
|
+
requestedBy: StocktakeActor | null;
|
|
978
|
+
/** Die Runde, die das Nachzaehlen begann. */
|
|
979
|
+
round: number | null;
|
|
980
|
+
}
|
|
981
|
+
/** Was von einer Position nicht gebucht wurde, und warum. */
|
|
982
|
+
export interface StocktakeNotBooked {
|
|
983
|
+
code: StocktakeNotBookedReason | (string & {});
|
|
984
|
+
/** Nicht gebuchte Menge in Tausendstel; `null`, wenn der Server keine nennt. */
|
|
985
|
+
quantity: number | null;
|
|
986
|
+
/** Bei mehreren Gruenden je Grund ein Eintrag; fehlt sonst. */
|
|
987
|
+
reasons?: Array<{
|
|
988
|
+
code: StocktakeNotBookedReason | (string & {});
|
|
989
|
+
quantity: number | null;
|
|
990
|
+
}>;
|
|
991
|
+
}
|
|
992
|
+
/** Eine Zeile des Inventars (nach dem Abschluss). */
|
|
993
|
+
export interface StocktakeInventoryLine {
|
|
994
|
+
quantity: number;
|
|
995
|
+
/** Aufnahmetag (Wiener Tag der Referenzzeit), `YYYY-MM-DD`. */
|
|
996
|
+
countedOn: string | null;
|
|
997
|
+
/** Einzelwert je Basiseinheit in Mikro-Euro; nur mit `lagerApi.kosten`. */
|
|
998
|
+
unitValueMicros?: number | null;
|
|
999
|
+
/** Gesamtwert in Cent; nur mit `lagerApi.kosten`. */
|
|
1000
|
+
valueCents?: number | null;
|
|
1001
|
+
}
|
|
1002
|
+
/**
|
|
1003
|
+
* Eine Position: ein Artikel in einem Zustand (`sellable` bzw. `defective`).
|
|
1004
|
+
*
|
|
1005
|
+
* Ab `review` (und nur dann) kommen Soll, Differenz und „pruefen“ dazu
|
|
1006
|
+
* (`expectedQuantity` …), nach dem Abschluss die Buchung und das Inventar.
|
|
1007
|
+
* Vorher fehlen diese Felder ganz.
|
|
1008
|
+
*/
|
|
1009
|
+
export interface StocktakeItem {
|
|
1010
|
+
articleId: string;
|
|
1011
|
+
condition: StockCondition | (string & {});
|
|
1012
|
+
/** Name, Nummer und Einheit, wie sie bei der Anlage galten. */
|
|
1013
|
+
name: string | null;
|
|
1014
|
+
number: string | null;
|
|
1015
|
+
unit: string | null;
|
|
1016
|
+
/** Zaehlrunde ab 1; jedes Nachzaehlen beginnt eine neue. */
|
|
1017
|
+
round: number;
|
|
1018
|
+
/** Gezaehlt (auch „0 gezaehlt“); `false` heisst ungezaehlt, nicht leer. */
|
|
1019
|
+
counted: boolean;
|
|
1020
|
+
/** Summe der aktiven Zaehlungen der Runde in Tausendstel; `null` = nicht gezaehlt. */
|
|
1021
|
+
quantity: number | null;
|
|
1022
|
+
/** Zahl der aktiven Zaehlungen der Runde. */
|
|
1023
|
+
counts: number;
|
|
1024
|
+
firstCountedAt: string | null;
|
|
1025
|
+
/** Referenzzeit: Serverzeit der letzten aktiven Zaehlung der Runde. */
|
|
1026
|
+
referenceTime: string | null;
|
|
1027
|
+
countedBy: StocktakeActor[];
|
|
1028
|
+
/**
|
|
1029
|
+
* Gezaehlte Seriennummern der Runde (Einzelstuecke). Nur in den Listen;
|
|
1030
|
+
* die Antwort von Zaehlen und Stornieren sendet die Position ohne sie, dann
|
|
1031
|
+
* fehlt das Feld (nicht „keine Seriennummern“).
|
|
1032
|
+
*/
|
|
1033
|
+
serialNumbers?: string[];
|
|
1034
|
+
recountRequested: boolean;
|
|
1035
|
+
recount: StocktakeRecount | null;
|
|
1036
|
+
/** Erst beim Zaehlen aufgenommen (Umfang `all`). */
|
|
1037
|
+
addedLater: boolean;
|
|
1038
|
+
/**
|
|
1039
|
+
* Heutiger Buchbestand in Tausendstel, nur bei `blind: false` waehrend der
|
|
1040
|
+
* Zaehlung. Nie das Soll zur Referenzzeit.
|
|
1041
|
+
*/
|
|
1042
|
+
bookStockNow?: number | null;
|
|
1043
|
+
expectedQuantity?: number | null;
|
|
1044
|
+
/** `quantity − expectedQuantity`; `null`, wenn ungezaehlt. */
|
|
1045
|
+
differenceQuantity?: number | null;
|
|
1046
|
+
needsCheck?: boolean;
|
|
1047
|
+
checkReasons?: Array<StocktakeCheckReason | (string & {})>;
|
|
1048
|
+
expectedAsOf?: string | null;
|
|
1049
|
+
/** Voraussichtlicher (in `review`) bzw. gebuchter Differenzwert in Cent; nur mit `lagerApi.kosten`. */
|
|
1050
|
+
differenceValueCents?: number | null;
|
|
1051
|
+
/** Einzelstueck: Soll-Nummern ohne Zaehlung. */
|
|
1052
|
+
missingSerialNumbers?: string[];
|
|
1053
|
+
/** Einzelstueck: gezaehlte Nummern, die nicht im Soll stehen. */
|
|
1054
|
+
extraSerialNumbers?: string[];
|
|
1055
|
+
/** Gebuchte Menge in Tausendstel (nach dem Abschluss). */
|
|
1056
|
+
bookedQuantity?: number | null;
|
|
1057
|
+
notBooked?: StocktakeNotBooked | null;
|
|
1058
|
+
inventory?: StocktakeInventoryLine | null;
|
|
1059
|
+
}
|
|
1060
|
+
/** Eine Zaehlung. */
|
|
1061
|
+
export interface StocktakeCount {
|
|
1062
|
+
id: string;
|
|
1063
|
+
articleId: string;
|
|
1064
|
+
condition: StockCondition | (string & {});
|
|
1065
|
+
/** Tausendstel; `0` heisst „leer gezaehlt“. */
|
|
1066
|
+
quantity: number;
|
|
1067
|
+
serialNumbers: string[];
|
|
1068
|
+
round: number;
|
|
1069
|
+
countedBy: StocktakeActor | null;
|
|
1070
|
+
source: StocktakeSource | (string & {}) | null;
|
|
1071
|
+
/** Kasse, an der gezaehlt wurde; `null` im Panel und ueber die API. */
|
|
1072
|
+
cashregisterId: string | null;
|
|
1073
|
+
/** Serverzeit der Zaehlung (die Geraetezeit zaehlt nie). */
|
|
1074
|
+
countedAt: string | null;
|
|
1075
|
+
note: string | null;
|
|
1076
|
+
/** `null` = aktiv. */
|
|
1077
|
+
voided: {
|
|
1078
|
+
reason: string | null;
|
|
1079
|
+
voidedAt: string | null;
|
|
1080
|
+
voidedBy: StocktakeActor | null;
|
|
1081
|
+
} | null;
|
|
1082
|
+
}
|
|
1083
|
+
/** Antwort von Zaehlen und Stornieren: die Zaehlung und ihre Position danach. */
|
|
1084
|
+
export interface StocktakeCountResult {
|
|
1085
|
+
count: StocktakeCount;
|
|
1086
|
+
item: StocktakeItem;
|
|
1087
|
+
}
|
|
1088
|
+
export interface StocktakeScopeInput {
|
|
1089
|
+
type: StocktakeScopeType;
|
|
1090
|
+
/** Bei `groups`: 1–50 Gruppen. */
|
|
1091
|
+
groupIds?: string[];
|
|
1092
|
+
/** Bei `articles`: 1–5000 bestandsgefuehrte Artikel. */
|
|
1093
|
+
articleIds?: string[];
|
|
1094
|
+
}
|
|
1095
|
+
/**
|
|
1096
|
+
* Legt eine Inventur an. Je Standort hoechstens eine offene
|
|
1097
|
+
* (`stocktake_location_busy` mit `data.stocktakeId`); hoechstens
|
|
1098
|
+
* [STOCKTAKE_ITEMS_MAX] Positionen.
|
|
1099
|
+
*/
|
|
1100
|
+
export interface CreateStocktakeRequest {
|
|
1101
|
+
idempotencyKey: string;
|
|
1102
|
+
locationId: string;
|
|
1103
|
+
scope: StocktakeScopeInput;
|
|
1104
|
+
type: StocktakeType;
|
|
1105
|
+
/** Pflicht bei `key_date` (`YYYY-MM-DD`), sonst weglassen oder `null`. */
|
|
1106
|
+
keyDate?: string | null;
|
|
1107
|
+
/** Vorgabe `true`. */
|
|
1108
|
+
blind?: boolean;
|
|
1109
|
+
/** 1–100 Zeichen; ohne Angabe „Inventur <Standort> <Tag>“. */
|
|
1110
|
+
name?: string | null;
|
|
1111
|
+
}
|
|
1112
|
+
/**
|
|
1113
|
+
* Inventuren des Kontos. Ohne `updatedSince` zuletzt geaenderte zuerst
|
|
1114
|
+
* (`updatedAt` absteigend); offene stehen dabei nicht zwingend oben, dafuer
|
|
1115
|
+
* gibt es den Filter `status`. Mit `updatedSince` aufsteigend und inklusive:
|
|
1116
|
+
* ein Abgleich mit dem groessten gesehenen `updatedAt` als naechstem
|
|
1117
|
+
* `updatedSince` ist lueckenlos (der Eintrag an der Grenze kommt noch einmal).
|
|
1118
|
+
*/
|
|
1119
|
+
export interface StocktakeListQuery {
|
|
1120
|
+
status?: StocktakeStatus;
|
|
1121
|
+
locationId?: string;
|
|
1122
|
+
updatedSince?: string | Date;
|
|
1123
|
+
/** 1–200, Vorgabe des Servers 50. */
|
|
1124
|
+
limit?: number;
|
|
1125
|
+
cursor?: string;
|
|
1126
|
+
}
|
|
1127
|
+
export interface StocktakePage {
|
|
1128
|
+
stocktakes: Stocktake[];
|
|
1129
|
+
nextCursor: string | null;
|
|
1130
|
+
}
|
|
1131
|
+
/** Positionen nach Kennung; `openOnly` = ungezaehlt (in der Pruefung: zum Nachzaehlen offen). */
|
|
1132
|
+
export interface StocktakeItemListQuery {
|
|
1133
|
+
stocktakeId: string;
|
|
1134
|
+
openOnly?: boolean;
|
|
1135
|
+
limit?: number;
|
|
1136
|
+
cursor?: string;
|
|
1137
|
+
}
|
|
1138
|
+
export interface StocktakeItemPage {
|
|
1139
|
+
items: StocktakeItem[];
|
|
1140
|
+
nextCursor: string | null;
|
|
1141
|
+
}
|
|
1142
|
+
/** Zaehlungen, neueste zuerst; mit `articleId` nur die des Artikels. */
|
|
1143
|
+
export interface StocktakeCountListQuery {
|
|
1144
|
+
stocktakeId: string;
|
|
1145
|
+
articleId?: string;
|
|
1146
|
+
limit?: number;
|
|
1147
|
+
cursor?: string;
|
|
1148
|
+
}
|
|
1149
|
+
export interface StocktakeCountPage {
|
|
1150
|
+
counts: StocktakeCount[];
|
|
1151
|
+
nextCursor: string | null;
|
|
1152
|
+
}
|
|
1153
|
+
/**
|
|
1154
|
+
* Eine Zaehlung. Menge in Tausendstel (`0` = leer gezaehlt; Stueckartikel und
|
|
1155
|
+
* Einzelstuecke nur ganze Stueck), Einzelstueck mit je Stueck genau einer
|
|
1156
|
+
* Seriennummer. Mehrere Zaehlungen derselben Position werden addiert.
|
|
1157
|
+
*/
|
|
1158
|
+
export interface RecordStocktakeCountRequest {
|
|
1159
|
+
idempotencyKey: string;
|
|
1160
|
+
stocktakeId: string;
|
|
1161
|
+
articleId: string;
|
|
1162
|
+
/** Vorgabe `sellable`. */
|
|
1163
|
+
condition?: StockCondition;
|
|
1164
|
+
quantity: number;
|
|
1165
|
+
serialNumbers?: string[];
|
|
1166
|
+
/** Hoechstens 200 Zeichen. */
|
|
1167
|
+
note?: string | null;
|
|
1168
|
+
}
|
|
1169
|
+
/** Storniert eine Zaehlung; die Position wird neu summiert. */
|
|
1170
|
+
export interface VoidStocktakeCountRequest {
|
|
1171
|
+
idempotencyKey: string;
|
|
1172
|
+
stocktakeId: string;
|
|
1173
|
+
countId: string;
|
|
1174
|
+
/** 1–500 Zeichen. */
|
|
1175
|
+
reason: string;
|
|
1176
|
+
}
|
|
1177
|
+
/** Pruefen: `counting` → `review` (bzw. in `review` neu rechnen, etwa nach dem Nachzaehlen). */
|
|
1178
|
+
export interface ReviewStocktakeRequest {
|
|
1179
|
+
idempotencyKey: string;
|
|
1180
|
+
stocktakeId: string;
|
|
1181
|
+
}
|
|
1182
|
+
/** Nachzaehlen in `review`: je Position eine neue Runde; danach erneut pruefen. */
|
|
1183
|
+
export interface RecountStocktakeRequest {
|
|
1184
|
+
idempotencyKey: string;
|
|
1185
|
+
stocktakeId: string;
|
|
1186
|
+
/** 1–200 Positionen. */
|
|
1187
|
+
items: Array<{
|
|
1188
|
+
articleId: string;
|
|
1189
|
+
condition?: StockCondition;
|
|
1190
|
+
}>;
|
|
1191
|
+
/** 1–500 Zeichen. */
|
|
1192
|
+
reason: string;
|
|
1193
|
+
}
|
|
1194
|
+
/** Abschliessen (nur aus `review`); `uncountedAsZero` bucht Ungezaehltes als 0. */
|
|
1195
|
+
export interface CloseStocktakeRequest {
|
|
1196
|
+
idempotencyKey: string;
|
|
1197
|
+
stocktakeId: string;
|
|
1198
|
+
/** Vorgabe `false`: Ungezaehltes wird nicht gebucht. */
|
|
1199
|
+
uncountedAsZero?: boolean;
|
|
1200
|
+
}
|
|
1201
|
+
/**
|
|
1202
|
+
* Antwort von `closeStocktake`: der Kopf (meist `closing`, der Server bucht
|
|
1203
|
+
* im Hintergrund weiter) und Hinweise wie `recount_uncounted`.
|
|
1204
|
+
*/
|
|
1205
|
+
export interface CloseStocktakeResult {
|
|
1206
|
+
stocktake: Stocktake;
|
|
1207
|
+
/** Leer, wenn es keinen Hinweis gibt. */
|
|
1208
|
+
warnings: StocktakeWarning[];
|
|
1209
|
+
}
|
|
1210
|
+
/** Abbrechen (aus `counting` oder `review`); der Standort ist danach wieder frei. */
|
|
1211
|
+
export interface CancelStocktakeRequest {
|
|
1212
|
+
idempotencyKey: string;
|
|
1213
|
+
stocktakeId: string;
|
|
1214
|
+
/** 1–500 Zeichen. */
|
|
1215
|
+
reason: string;
|
|
1216
|
+
}
|
|
1217
|
+
/**
|
|
1218
|
+
* Lese-Link auf das Inventurprotokoll, wenn es zu gross fuer die Antwort ist
|
|
1219
|
+
* (ueber 9 MiB). Signiert, 15 Minuten gueltig; die geladene Datei an
|
|
1220
|
+
* `sha256` pruefen.
|
|
1221
|
+
*/
|
|
1222
|
+
export interface StocktakePdfDownload {
|
|
1223
|
+
url: string;
|
|
1224
|
+
expiresAt: string;
|
|
1225
|
+
sizeBytes: number;
|
|
1226
|
+
/** SHA-256 der Datei, hexadezimal (dieselbe wie `pdf.valuesSha256` bzw. `pdf.quantitiesSha256`). */
|
|
1227
|
+
sha256: string;
|
|
1228
|
+
fileName: string | null;
|
|
1229
|
+
contentType: string | null;
|
|
1230
|
+
}
|
|
1231
|
+
/**
|
|
1232
|
+
* Das Inventurprotokoll: als Datei (`kind: 'pdf'`) oder, ueber 9 MiB, als
|
|
1233
|
+
* Lese-Link (`kind: 'download'`). Mit `lagerApi.kosten` die Fassung mit
|
|
1234
|
+
* Werten, sonst die nur mit Mengen.
|
|
1235
|
+
*/
|
|
1236
|
+
export type StocktakePdf = {
|
|
1237
|
+
kind: 'pdf';
|
|
1238
|
+
pdf: Uint8Array;
|
|
1239
|
+
} | {
|
|
1240
|
+
kind: 'download';
|
|
1241
|
+
download: StocktakePdfDownload;
|
|
1242
|
+
};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Der Vertrag der Lager-API (Backend Stufe 5a lesen, 5b schreiben und
|
|
3
|
-
* reservieren, 5c Varianten) als Daten:
|
|
4
|
-
* Hinweiscodes, englisch wie
|
|
3
|
+
* reservieren, 5c Varianten, Lager-Kern Stufe 3 Inventur) als Daten:
|
|
4
|
+
* Endpunkte, Wertkataloge, Ereignisse, Fehler- und Hinweiscodes, englisch wie
|
|
5
|
+
* am Draht `/v3`.
|
|
5
6
|
*
|
|
6
7
|
* Quelle ist der Vertrags-Export des Backends (`fixtures/v3/v3-vokabular.json`):
|
|
7
8
|
* `endpoints.public`, die Kataloge `STANDORT_TYP`, `BEWEGUNG_ART`,
|
|
8
9
|
* `BEWEGUNG_QUELLE`, `LAGER_ZUSTAND`, `LAGER_URSACHE`, `ZUSTELLUNG`,
|
|
9
10
|
* `LAGER_ABGANG_GRUND`, `LAGER_ENTNAHME_ART`, `LAGER_NEBENKOSTEN_ART`,
|
|
10
|
-
* `LAGER_VERTEILUNG`, `RESERVIERUNG_STATUS`,
|
|
11
|
+
* `LAGER_VERTEILUNG`, `RESERVIERUNG_STATUS`, die Inventur-Kataloge `INVENTUR_*`,
|
|
12
|
+
* dazu `events`, `errorCodes.inventory`
|
|
11
13
|
* und `warningCodes.inventory`. `test/inventory.test.ts` haelt jede Liste
|
|
12
14
|
* deckungsgleich mit dieser Datei; nichts hier wird geraten.
|
|
13
15
|
*/
|
|
14
|
-
/** Die
|
|
15
|
-
export declare const INVENTORY_ENDPOINTS: readonly ["getArticle", "listArticles", "lookupArticleByCode", "listLocations", "getStock", "listStock", "listStockMovements", "createWebhook", "updateWebhook", "deleteWebhook", "listWebhooks", "sendWebhookTest", "rotateWebhookSecret", "listWebhookDeliveries", "createArticle", "updateArticle", "deactivateArticle", "receiveGoods", "transferStock", "recordStockLoss", "changeStockCondition", "reverseStockMovement", "createReservation", "extendReservation", "releaseReservation", "getReservation", "listReservations", "createVariantGroup", "updateVariantGroup", "getVariantGroup", "listVariantGroups", "addVariant"];
|
|
16
|
+
/** Die 44 Endpunkte (14 aus 5a, 13 aus 5b, 5 aus 5c, 12 der Inventur), in der Reihenfolge von `endpoints.public`. */
|
|
17
|
+
export declare const INVENTORY_ENDPOINTS: readonly ["getArticle", "listArticles", "lookupArticleByCode", "listLocations", "getStock", "listStock", "listStockMovements", "createWebhook", "updateWebhook", "deleteWebhook", "listWebhooks", "sendWebhookTest", "rotateWebhookSecret", "listWebhookDeliveries", "createArticle", "updateArticle", "deactivateArticle", "receiveGoods", "transferStock", "recordStockLoss", "changeStockCondition", "reverseStockMovement", "createReservation", "extendReservation", "releaseReservation", "getReservation", "listReservations", "createVariantGroup", "updateVariantGroup", "getVariantGroup", "listVariantGroups", "addVariant", "createStocktake", "listStocktakes", "getStocktake", "listStocktakeItems", "recordStocktakeCount", "voidStocktakeCount", "listStocktakeCounts", "reviewStocktake", "recountStocktake", "closeStocktake", "cancelStocktake", "getStocktakePdf"];
|
|
16
18
|
export type InventoryEndpoint = (typeof INVENTORY_ENDPOINTS)[number];
|
|
17
19
|
/** Art eines Standorts (Katalog `STANDORT_TYP`). */
|
|
18
20
|
export declare const LOCATION_TYPES: readonly ["warehouse", "store", "vehicle", "other"];
|
|
@@ -98,8 +100,24 @@ export declare const INVENTORY_LIST_LIMIT_MAX = 200;
|
|
|
98
100
|
* `too_many_positions` traegt bei Varianten `field` (`variants`,
|
|
99
101
|
* `createMatrix` bzw. `externalIds` bei `addVariant`): die Anfrage braeuchte
|
|
100
102
|
* mehr Schreibvorgaenge, als in einen Vorgang passen; geschrieben wurde nichts.
|
|
103
|
+
*
|
|
104
|
+
* Seit 1.8.0 dahinter die Codes der Inventur: `stocktake_not_found`,
|
|
105
|
+
* `stocktake_not_open` (Zaehlen oder Stornieren ausserhalb der Zaehlung bzw.
|
|
106
|
+
* an einer Position, die nicht zum Nachzaehlen frei ist), `stocktake_closed`
|
|
107
|
+
* (abgeschlossen oder abgebrochen: nichts mehr schreibbar),
|
|
108
|
+
* `stocktake_not_in_review` (Nachzaehlen und Abschluss nur in `review`),
|
|
109
|
+
* `stocktake_closing` (der Abschluss bucht gerade), `stocktake_location_busy`
|
|
110
|
+
* (am Standort laeuft schon eine Inventur; `data.stocktakeId` nennt sie),
|
|
111
|
+
* `stocktake_review_running` (die Pruefung rechnet noch), `stocktake_recount_open`
|
|
112
|
+
* (Abschluss, solange Positionen zum Nachzaehlen offen sind: erst nachzaehlen,
|
|
113
|
+
* dann erneut pruefen), `article_not_in_scope`, `article_not_tracked`,
|
|
114
|
+
* `count_not_found`, `count_already_voided`, `serial_already_counted` (dieselbe
|
|
115
|
+
* Seriennummer zweimal in einer Runde), `too_many_counts` (mehr als
|
|
116
|
+
* [STOCKTAKE_COUNTS_PER_ITEM_MAX] Zaehlungen je Position und Runde) und
|
|
117
|
+
* `stocktake_not_closed` (das Protokoll gibt es erst nach dem Abschluss, auch
|
|
118
|
+
* nicht fuer eine abgebrochene Inventur).
|
|
101
119
|
*/
|
|
102
|
-
export declare const INVENTORY_ERROR_CODES: readonly ["validation", "invalid_cursor", "article_not_found", "webhook_not_found", "webhook_limit", "invalid_webhook_url", "event_not_subscribed", "webhook_inactive", "inventory_api_not_enabled", "module_inactive", "rate_limited", "server_error", "idempotency_key_required", "idempotency_conflict", "location_not_found", "location_inactive", "invalid_location", "invalid_locations", "invalid_transfer", "operation_not_found", "already_reversed", "reversal_not_possible", "reversal_not_supported", "exceeds_stock", "no_positions", "too_many_positions", "invalid_step", "invalid_quantity", "invalid_amount", "invalid_price", "negative_value", "invalid_reason", "note_required", "withdrawal_type_required", "invalid_method", "invalid_stock_kind", "invalid_minimum", "invalid_dimensions", "weight_missing", "invalid_landed_cost", "invalid_distribution", "landed_costs_mismatch", "return_totals_mismatch", "lot_not_found", "invalid_serial", "serial_required", "serial_not_allowed", "serial_already_exists", "serial_not_in_stock", "code_taken", "external_id_taken", "group_not_found", "revenue_group_not_found", "stock_kind_locked", "article_inactive", "invalid_position", "invalid_condition", "reason_required", "insufficient_available", "reservation_not_found", "reservation_not_active", "variant_group_not_found", "variant_already_exists", "invalid_variant_attributes", "variant_group_inactive", "variant_limit"];
|
|
120
|
+
export declare const INVENTORY_ERROR_CODES: readonly ["validation", "invalid_cursor", "article_not_found", "webhook_not_found", "webhook_limit", "invalid_webhook_url", "event_not_subscribed", "webhook_inactive", "inventory_api_not_enabled", "module_inactive", "rate_limited", "server_error", "idempotency_key_required", "idempotency_conflict", "location_not_found", "location_inactive", "invalid_location", "invalid_locations", "invalid_transfer", "operation_not_found", "already_reversed", "reversal_not_possible", "reversal_not_supported", "exceeds_stock", "no_positions", "too_many_positions", "invalid_step", "invalid_quantity", "invalid_amount", "invalid_price", "negative_value", "invalid_reason", "note_required", "withdrawal_type_required", "invalid_method", "invalid_stock_kind", "invalid_minimum", "invalid_dimensions", "weight_missing", "invalid_landed_cost", "invalid_distribution", "landed_costs_mismatch", "return_totals_mismatch", "lot_not_found", "invalid_serial", "serial_required", "serial_not_allowed", "serial_already_exists", "serial_not_in_stock", "code_taken", "external_id_taken", "group_not_found", "revenue_group_not_found", "stock_kind_locked", "article_inactive", "invalid_position", "invalid_condition", "reason_required", "insufficient_available", "reservation_not_found", "reservation_not_active", "variant_group_not_found", "variant_already_exists", "invalid_variant_attributes", "variant_group_inactive", "variant_limit", "stocktake_not_found", "stocktake_not_open", "stocktake_closed", "stocktake_not_in_review", "stocktake_closing", "stocktake_location_busy", "stocktake_review_running", "stocktake_recount_open", "article_not_in_scope", "article_not_tracked", "count_not_found", "count_already_voided", "serial_already_counted", "too_many_counts", "stocktake_not_closed"];
|
|
103
121
|
export type InventoryErrorCode = (typeof INVENTORY_ERROR_CODES)[number];
|
|
104
122
|
/**
|
|
105
123
|
* Codes, die Anmeldung und Rand auf jedem Lager-Aufruf erzeugen koennen,
|
|
@@ -108,7 +126,7 @@ export type InventoryErrorCode = (typeof INVENTORY_ERROR_CODES)[number];
|
|
|
108
126
|
* `route_missing` (Code des Pakets). Dieselbe Ableitung wie bei der
|
|
109
127
|
* Rechnungs-API.
|
|
110
128
|
*/
|
|
111
|
-
export declare const INVENTORY_REQUEST_ERROR_CODES: readonly ["account_not_found", "admin_required", "api_not_approved", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "dialect_mismatch", "internal_translation_error", "live_not_enabled", "method_not_allowed", "mfa_required", "not_found", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "route_missing"];
|
|
129
|
+
export declare const INVENTORY_REQUEST_ERROR_CODES: readonly ["account_not_found", "admin_required", "api_not_approved", "app_check_invalid", "app_check_missing", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "dialect_mismatch", "internal_translation_error", "live_not_enabled", "method_not_allowed", "mfa_required", "not_found", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "session_expired", "session_other_cashregister", "unauthorized", "user_disabled", "user_verification_failed", "route_missing"];
|
|
112
130
|
export type InventoryRequestErrorCode = (typeof INVENTORY_REQUEST_ERROR_CODES)[number];
|
|
113
131
|
/**
|
|
114
132
|
* Hinweise einer Buchung (`warnings[].code`, `warningCodes.inventory`). Sie sind
|
|
@@ -117,8 +135,16 @@ export type InventoryRequestErrorCode = (typeof INVENTORY_REQUEST_ERROR_CODES)[n
|
|
|
117
135
|
* `below_minimum` misst am verfuegbaren Bestand (`onHand − reserved`) gegen den
|
|
118
136
|
* Mindestbestand des Standorts, `reservation_exceeded` meldet eine Rechnung, die
|
|
119
137
|
* mehr verkauft als reserviert war.
|
|
138
|
+
*
|
|
139
|
+
* Seit 1.8.0 die Hinweise der Inventur, je mit der Zahl der Positionen
|
|
140
|
+
* (`items`): `defect_capped` (eine Fehlmenge im Zustand `defective` reichte
|
|
141
|
+
* ueber den Defektbestand, der Rest blieb ungebucht), `uncounted_items` (nicht
|
|
142
|
+
* gezaehlt und darum nicht gebucht), `not_booked` (nicht oder nicht ganz
|
|
143
|
+
* gebucht, Grund an der Position, `notBooked`) und `recount_uncounted`
|
|
144
|
+
* (Positionen zum Nachzaehlen blieben ungezaehlt; die Antwort von
|
|
145
|
+
* `closeStocktake` traegt ihn).
|
|
120
146
|
*/
|
|
121
|
-
export declare const INVENTORY_WARNING_CODES: readonly ["insufficient_stock", "below_minimum", "return_exceeds_sale", "reservation_exceeded"];
|
|
147
|
+
export declare const INVENTORY_WARNING_CODES: readonly ["insufficient_stock", "below_minimum", "return_exceeds_sale", "reservation_exceeded", "defect_capped", "uncounted_items", "not_booked", "recount_uncounted"];
|
|
122
148
|
export type InventoryWarningCode = (typeof INVENTORY_WARNING_CODES)[number];
|
|
123
149
|
/**
|
|
124
150
|
* Bestandsart eines Artikels (`stockKind`): `quantity` = Menge, `serial` =
|
|
@@ -169,3 +195,63 @@ export declare const VARIANT_ATTRIBUTES_MAX = 3;
|
|
|
169
195
|
export declare const VARIANT_VALUES_MAX = 30;
|
|
170
196
|
export declare const VARIANT_MATRIX_MAX = 100;
|
|
171
197
|
export declare const VARIANT_GROUP_ACTIVE_MAX = 250;
|
|
198
|
+
/**
|
|
199
|
+
* Stand einer Inventur (Katalog `INVENTUR_STATUS`). Gezaehlt wird in
|
|
200
|
+
* `counting`; `review` rechnet Soll und Differenz (erst ab hier sichtbar,
|
|
201
|
+
* blind); `closing` bucht den Abschluss in Teilen; `closed` und `cancelled`
|
|
202
|
+
* sind endgueltig. `creating` steht nur, solange eine grosse Anlage ihre
|
|
203
|
+
* Positionen schreibt.
|
|
204
|
+
*/
|
|
205
|
+
export declare const STOCKTAKE_STATUSES: readonly ["creating", "counting", "review", "closing", "closed", "cancelled"];
|
|
206
|
+
export type StocktakeStatus = (typeof STOCKTAKE_STATUSES)[number];
|
|
207
|
+
/**
|
|
208
|
+
* Art einer Inventur (Katalog `INVENTUR_ART`): `key_date` zu einem Stichtag
|
|
209
|
+
* (`keyDate`), `perpetual` (permanente Inventur, ohne Stichtag).
|
|
210
|
+
*/
|
|
211
|
+
export declare const STOCKTAKE_TYPES: readonly ["key_date", "perpetual"];
|
|
212
|
+
export type StocktakeType = (typeof STOCKTAKE_TYPES)[number];
|
|
213
|
+
/** Umfang einer Inventur (Katalog `INVENTUR_UMFANG`): alle bestandsgefuehrten Artikel des Standorts, Artikelgruppen oder genannte Artikel. */
|
|
214
|
+
export declare const STOCKTAKE_SCOPE_TYPES: readonly ["all", "groups", "articles"];
|
|
215
|
+
export type StocktakeScopeType = (typeof STOCKTAKE_SCOPE_TYPES)[number];
|
|
216
|
+
/**
|
|
217
|
+
* Warum eine Position in der Pruefung „pruefen“ traegt (Katalog
|
|
218
|
+
* `INVENTUR_PRUEFGRUND`): Bewegung zwischen der ersten und letzten Zaehlung,
|
|
219
|
+
* Zaehlung mehr als 10 Tage vom Stichtag, Seriennummern weichen ab, nicht gezaehlt.
|
|
220
|
+
*/
|
|
221
|
+
export declare const STOCKTAKE_CHECK_REASONS: readonly ["movements_between_counts", "far_from_key_date", "serial_mismatch", "not_counted"];
|
|
222
|
+
export type StocktakeCheckReason = (typeof STOCKTAKE_CHECK_REASONS)[number];
|
|
223
|
+
/**
|
|
224
|
+
* Warum eine Position nicht oder nicht ganz gebucht wurde (`notBooked.code`,
|
|
225
|
+
* Katalog `INVENTUR_NICHT_GEBUCHT`). Dazu kommen Codes, die schon englisch
|
|
226
|
+
* sind (`serial_not_in_stock`, `serial_already_exists`, `article_not_found`);
|
|
227
|
+
* das Modell laesst darum jeden Text stehen.
|
|
228
|
+
*/
|
|
229
|
+
export declare const STOCKTAKE_NOT_BOOKED_REASONS: readonly ["serial_mismatch", "recount_open", "defect_capped"];
|
|
230
|
+
export type StocktakeNotBookedReason = (typeof STOCKTAKE_NOT_BOOKED_REASONS)[number];
|
|
231
|
+
/** Woher eine Zaehlung bzw. Inventur kam (Katalog `INVENTUR_QUELLE`). */
|
|
232
|
+
export declare const STOCKTAKE_SOURCES: readonly ["register", "panel", "api"];
|
|
233
|
+
export type StocktakeSource = (typeof STOCKTAKE_SOURCES)[number];
|
|
234
|
+
/** Wer handelte (Katalog `INVENTUR_AKTEUR`): Inhaber, Kasseneck-Admin, Kassen-Benutzer, API-Schluessel. */
|
|
235
|
+
export declare const STOCKTAKE_ACTOR_TYPES: readonly ["owner", "admin", "register_user", "api"];
|
|
236
|
+
export type StocktakeActorType = (typeof STOCKTAKE_ACTOR_TYPES)[number];
|
|
237
|
+
/**
|
|
238
|
+
* Zu welchem Zeitpunkt das Inventar im Protokoll steht (Katalog
|
|
239
|
+
* `INVENTUR_INVENTAR_ZUM`): `key_date` (auf das Ende des Stichtags
|
|
240
|
+
* fortgeschrieben, Abschluss nach dem Stichtag) oder `count_date` (Menge zur
|
|
241
|
+
* Aufnahme: permanente Inventur oder Abschluss vor dem Stichtag).
|
|
242
|
+
*/
|
|
243
|
+
export declare const STOCKTAKE_INVENTORY_AS_OF: readonly ["key_date", "count_date"];
|
|
244
|
+
export type StocktakeInventoryAsOf = (typeof STOCKTAKE_INVENTORY_AS_OF)[number];
|
|
245
|
+
/**
|
|
246
|
+
* Grenzen einer Inventur, wie das Backend sie prueft. Wie bei den Varianten
|
|
247
|
+
* prueft das Paket sie **nicht** vor dem Senden:
|
|
248
|
+
*
|
|
249
|
+
* - [STOCKTAKE_ITEMS_MAX] Positionen je Inventur (`too_many_positions`;
|
|
250
|
+
* groessere Bestaende in mehreren Inventuren nacheinander),
|
|
251
|
+
* - [STOCKTAKE_RECOUNT_ITEMS_MAX] Positionen je `recountStocktake`,
|
|
252
|
+
* - [STOCKTAKE_COUNTS_PER_ITEM_MAX] Zaehlungen je Position und Runde
|
|
253
|
+
* (`too_many_counts`), hoechstens so viele Seriennummern je Zaehlung.
|
|
254
|
+
*/
|
|
255
|
+
export declare const STOCKTAKE_ITEMS_MAX = 5000;
|
|
256
|
+
export declare const STOCKTAKE_RECOUNT_ITEMS_MAX = 200;
|
|
257
|
+
export declare const STOCKTAKE_COUNTS_PER_ITEM_MAX = 200;
|