kcommons 18.17.6 → 18.17.8

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.
@@ -8,11 +8,11 @@
8
8
  * 4. Items in low stock
9
9
  *
10
10
  * Group 2 - Charts (GET /c/kpis/store/charts)
11
- * 1. Active PRs by department / entity
11
+ * 1. Active Indents by entity
12
12
  * 2. Stock composition by category (+ item drill-down)
13
13
  * 3. Inventory movement trend (issuance vs store transfers)
14
14
  * 4. Store transfer distribution (routes)
15
- * 5. Material issuance by department / entity
15
+ * 5. Material issuance by entity
16
16
  */
17
17
  /** Scope filter for the KPI-cards endpoint. `store_location_id` is admin-only. */
18
18
  export interface IStoreKPICommonFilters {
@@ -58,11 +58,16 @@ export interface IStoreKpiCardsResponse {
58
58
  low_stock_data_available: boolean;
59
59
  low_stock_item_count: number | null;
60
60
  }
61
- /** One bar in "Active PRs by Department / Entity". */
62
- export interface IStoreActivePRsByDepartmentUnit {
63
- department_id: string | null;
64
- department_name: string;
65
- pr_count: number;
61
+ /**
62
+ * One bar in "Active Indents by Entity". `entity_*` is resolved from the
63
+ * indent's department: the specific master record (store location, purchase
64
+ * location, office, etc.) that department is tied to, per its `type`.
65
+ */
66
+ export interface IStoreActiveIndentsByEntityUnit {
67
+ entity_type: string | null;
68
+ entity_id: string | null;
69
+ entity_name: string;
70
+ indent_count: number;
66
71
  }
67
72
  /** One tile in the "Stock Composition" treemap. Uncategorized items -> `null`. */
68
73
  export interface IStoreStockCompositionUnit {
@@ -86,22 +91,28 @@ export interface IStoreTransferRouteUnit {
86
91
  source_store_location_name: string;
87
92
  dest_store_location_id: string;
88
93
  dest_store_location_name: string;
94
+ transfer_count: number;
89
95
  quantity: number;
90
96
  value: number | null;
91
97
  }
92
- /** One bar in "Material Issuance by Department / Entity". */
93
- export interface IStoreMaterialIssuanceByDepartmentUnit {
94
- department_id: string | null;
95
- department_name: string;
96
- quantity: number;
97
- value: number | null;
98
+ /**
99
+ * One bar in "Material Issuance by Entity". The entity is resolved from the
100
+ * MI's department: the specific master record (store location, purchase
101
+ * location, office, etc.) that department is tied to, per its `type` - same
102
+ * resolution as {@link IStoreActiveIndentsByEntityUnit}.
103
+ */
104
+ export interface IStoreMaterialIssuanceByEntityUnit {
105
+ entity_type: string | null;
106
+ entity_id: string | null;
107
+ entity_name: string;
108
+ issuance_count: number;
98
109
  }
99
110
  export interface IStoreChartsResponse {
100
- active_prs_by_department: IStoreActivePRsByDepartmentUnit[];
111
+ active_indents_by_entity: IStoreActiveIndentsByEntityUnit[];
101
112
  stock_composition: IStoreStockCompositionUnit[];
102
113
  inventory_movement_trend: IStoreInventoryMovementTrendPoint[];
103
114
  store_transfer_distribution: IStoreTransferRouteUnit[];
104
- material_issuance_by_department: IStoreMaterialIssuanceByDepartmentUnit[];
115
+ material_issuance_by_entity: IStoreMaterialIssuanceByEntityUnit[];
105
116
  }
106
117
  /** Filters for the stock-composition item drill-down. */
107
118
  export interface IStoreStockCompositionItemsFilters {
@@ -9,11 +9,11 @@
9
9
  * 4. Items in low stock
10
10
  *
11
11
  * Group 2 - Charts (GET /c/kpis/store/charts)
12
- * 1. Active PRs by department / entity
12
+ * 1. Active Indents by entity
13
13
  * 2. Stock composition by category (+ item drill-down)
14
14
  * 3. Inventory movement trend (issuance vs store transfers)
15
15
  * 4. Store transfer distribution (routes)
16
- * 5. Material issuance by department / entity
16
+ * 5. Material issuance by entity
17
17
  */
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.STORE_PROCUREMENT_PIPELINE_STAGE = void 0;
@@ -126,6 +126,7 @@ export interface ISupplierInvoiceItem {
126
126
  id: string;
127
127
  invoice_id: string;
128
128
  parent_po_item_id: string | null;
129
+ item_name: string | null;
129
130
  item_code: string | null;
130
131
  description: string;
131
132
  hsn_sac_code: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kcommons",
3
- "version": "18.17.6",
3
+ "version": "18.17.8",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",