@happyvertical/smrt-inventory 0.57.16 → 0.57.18

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.
Files changed (45) hide show
  1. package/AGENTS.md +19 -1
  2. package/README.md +32 -2
  3. package/dist/collections/LotCollection.d.ts +22 -0
  4. package/dist/collections/LotCollection.d.ts.map +1 -0
  5. package/dist/collections/LotCorrectionCollection.d.ts +12 -0
  6. package/dist/collections/LotCorrectionCollection.d.ts.map +1 -0
  7. package/dist/collections/LotDocumentCollection.d.ts +12 -0
  8. package/dist/collections/LotDocumentCollection.d.ts.map +1 -0
  9. package/dist/collections/LotStockLevelCollection.d.ts +21 -0
  10. package/dist/collections/LotStockLevelCollection.d.ts.map +1 -0
  11. package/dist/collections/LotUsageCollection.d.ts +18 -0
  12. package/dist/collections/LotUsageCollection.d.ts.map +1 -0
  13. package/dist/collections/index.d.ts +5 -0
  14. package/dist/collections/index.d.ts.map +1 -1
  15. package/dist/index.d.ts +4 -4
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +1168 -31
  18. package/dist/index.js.map +1 -1
  19. package/dist/manifest.json +2921 -288
  20. package/dist/models/Lot.d.ts +96 -0
  21. package/dist/models/Lot.d.ts.map +1 -0
  22. package/dist/models/LotCorrection.d.ts +55 -0
  23. package/dist/models/LotCorrection.d.ts.map +1 -0
  24. package/dist/models/LotDocument.d.ts +45 -0
  25. package/dist/models/LotDocument.d.ts.map +1 -0
  26. package/dist/models/LotStockLevel.d.ts +43 -0
  27. package/dist/models/LotStockLevel.d.ts.map +1 -0
  28. package/dist/models/LotUsage.d.ts +64 -0
  29. package/dist/models/LotUsage.d.ts.map +1 -0
  30. package/dist/models/StockMovement.d.ts +7 -0
  31. package/dist/models/StockMovement.d.ts.map +1 -1
  32. package/dist/models/index.d.ts +5 -0
  33. package/dist/models/index.d.ts.map +1 -1
  34. package/dist/services/LotService.d.ts +258 -0
  35. package/dist/services/LotService.d.ts.map +1 -0
  36. package/dist/services/StockService.d.ts +25 -2
  37. package/dist/services/StockService.d.ts.map +1 -1
  38. package/dist/services/index.d.ts +2 -0
  39. package/dist/services/index.d.ts.map +1 -1
  40. package/dist/services/lot-errors.d.ts +44 -0
  41. package/dist/services/lot-errors.d.ts.map +1 -0
  42. package/dist/smrt-knowledge.json +1333 -76
  43. package/dist/types.d.ts +6 -0
  44. package/dist/types.d.ts.map +1 -1
  45. package/package.json +6 -6
package/dist/types.d.ts CHANGED
@@ -48,4 +48,10 @@ export type InventoryLocationKind = string;
48
48
  * `'sample'`, `'consignment_out'`) without forking the package.
49
49
  */
50
50
  export type StockMovementReason = 'receipt' | 'reservation' | 'release' | 'fulfillment' | 'transfer_out' | 'transfer_in' | 'adjustment' | 'production_consume' | 'production_produce' | (string & {});
51
+ /** `lot` tracks a quantity of material; `serial` tracks one unit. */
52
+ export type LotKind = 'lot' | 'serial';
53
+ /** Whether a {@link LotUsage} still counts, or was unlinked by a correction. */
54
+ export type LotUsageStatus = 'active' | 'unlinked';
55
+ /** What a {@link LotCorrection} changed. */
56
+ export type LotCorrectionKind = 'lot_number' | 'attribute' | 'status' | 'unlink' | 'document_detach';
51
57
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,UAAU,GAClB,WAAW,GACX,WAAW,GACX,KAAK,GACL,SAAS,GACT,SAAS,CAAC;AAEd;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,aAAa,GACb,SAAS,GACT,aAAa,GACb,cAAc,GACd,aAAa,GACb,YAAY,GACZ,oBAAoB,GACpB,oBAAoB,GACpB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,UAAU,GAClB,WAAW,GACX,WAAW,GACX,KAAK,GACL,SAAS,GACT,SAAS,CAAC;AAEd;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,aAAa,GACb,SAAS,GACT,aAAa,GACb,cAAc,GACd,aAAa,GACb,YAAY,GACZ,oBAAoB,GACpB,oBAAoB,GACpB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,qEAAqE;AACrE,MAAM,MAAM,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEvC,gFAAgF;AAChF,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEnD,4CAA4C;AAC5C,MAAM,MAAM,iBAAiB,GACzB,YAAY,GACZ,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,iBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-inventory",
3
- "version": "0.57.16",
4
- "description": "Multi-location stock tracking for the SMRT framework — Sku, InventoryLocation, StockLevel, StockMovement, and a stock-mutation service",
3
+ "version": "0.57.18",
4
+ "description": "Multi-location stock tracking for the SMRT framework — Sku, InventoryLocation, StockLevel, StockMovement, lot and serial tracking, and stock-mutation and lot services",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -25,13 +25,13 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@happyvertical/logger": "^0.105.5",
28
- "@happyvertical/smrt-core": "0.57.16",
29
- "@happyvertical/smrt-tenancy": "0.57.16",
28
+ "@happyvertical/smrt-core": "0.57.18",
29
+ "@happyvertical/smrt-tenancy": "0.57.18",
30
30
  "@happyvertical/sql": "^0.105.5",
31
- "@happyvertical/smrt-ui": "0.57.16"
31
+ "@happyvertical/smrt-ui": "0.57.18"
32
32
  },
33
33
  "devDependencies": {
34
- "@happyvertical/smrt-vitest": "0.57.16",
34
+ "@happyvertical/smrt-vitest": "0.57.18",
35
35
  "@types/node": "24.13.6",
36
36
  "typescript": "6.0.3",
37
37
  "vite": "8.1.6",