hvp-shared 6.32.0 → 6.34.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.
|
@@ -28,6 +28,47 @@ export interface RunOrderPlanningRequest {
|
|
|
28
28
|
/** Include items with status OK in the response. Default: false */
|
|
29
29
|
includeOkItems?: boolean;
|
|
30
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Request to create a new session from analysis results
|
|
33
|
+
*
|
|
34
|
+
* @example POST /api/inventory/order-planning/sessions
|
|
35
|
+
*/
|
|
36
|
+
export interface CreateOrderPlanningSessionRequest {
|
|
37
|
+
/** ISO timestamp of the analysis run */
|
|
38
|
+
analyzedAt: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Request to update decisions for a session
|
|
42
|
+
*
|
|
43
|
+
* @example PATCH /api/inventory/order-planning/sessions/:id/decisions
|
|
44
|
+
*/
|
|
45
|
+
export interface UpdateSessionDecisionsRequest {
|
|
46
|
+
/** Updated decisions (replaces all decisions for the given qvetCodes) */
|
|
47
|
+
decisions: {
|
|
48
|
+
qvetCode: number;
|
|
49
|
+
resolved: boolean;
|
|
50
|
+
transfers: {
|
|
51
|
+
fromWarehouse: string;
|
|
52
|
+
toWarehouse: string;
|
|
53
|
+
quantity: number;
|
|
54
|
+
enabled: boolean;
|
|
55
|
+
}[];
|
|
56
|
+
purchases: {
|
|
57
|
+
warehouse: string;
|
|
58
|
+
quantityPurchaseUnits: number;
|
|
59
|
+
quantitySaleUnits: number;
|
|
60
|
+
enabled: boolean;
|
|
61
|
+
}[];
|
|
62
|
+
}[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Request to update session status
|
|
66
|
+
*
|
|
67
|
+
* @example PATCH /api/inventory/order-planning/sessions/:id/status
|
|
68
|
+
*/
|
|
69
|
+
export interface UpdateSessionStatusRequest {
|
|
70
|
+
status: 'in_progress' | 'completed';
|
|
71
|
+
}
|
|
31
72
|
/**
|
|
32
73
|
* @deprecated Use RefreshOrderPlanningDataRequest instead
|
|
33
74
|
*/
|
|
@@ -86,6 +86,12 @@ export interface AnalyzedInventoryItem {
|
|
|
86
86
|
family: string;
|
|
87
87
|
/** Is this item a vaccine? (based on section/family containing "Vacuna") */
|
|
88
88
|
isVaccine: boolean;
|
|
89
|
+
/** Sale unit (e.g., "tableta", "ml") - unit used for stock tracking */
|
|
90
|
+
saleUnit: string;
|
|
91
|
+
/** Purchase unit (e.g., "caja", "frasco") - unit used when ordering from supplier */
|
|
92
|
+
purchaseUnit: string;
|
|
93
|
+
/** Conversion factor: 1 purchase unit = N sale units (e.g., 1 caja = 30 tabletas) */
|
|
94
|
+
conversionFactor: number;
|
|
89
95
|
/** Stock data per warehouse */
|
|
90
96
|
byWarehouse: WarehouseItemStock[];
|
|
91
97
|
/**
|
|
@@ -218,6 +224,68 @@ export interface PendingPurchaseOrdersResponse {
|
|
|
218
224
|
staleOrders: number;
|
|
219
225
|
};
|
|
220
226
|
}
|
|
227
|
+
/**
|
|
228
|
+
* Session status
|
|
229
|
+
*/
|
|
230
|
+
export type OrderPlanningSessionStatus = 'in_progress' | 'completed';
|
|
231
|
+
/**
|
|
232
|
+
* A user-configured transfer action within a decision
|
|
233
|
+
*/
|
|
234
|
+
export interface SessionTransferAction {
|
|
235
|
+
/** Source warehouse */
|
|
236
|
+
fromWarehouse: string;
|
|
237
|
+
/** Destination warehouse */
|
|
238
|
+
toWarehouse: string;
|
|
239
|
+
/** Quantity in sale units */
|
|
240
|
+
quantity: number;
|
|
241
|
+
/** Whether this action is enabled by the user */
|
|
242
|
+
enabled: boolean;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* A user-configured purchase action within a decision
|
|
246
|
+
*/
|
|
247
|
+
export interface SessionPurchaseAction {
|
|
248
|
+
/** Target warehouse */
|
|
249
|
+
warehouse: string;
|
|
250
|
+
/** Quantity in purchase units */
|
|
251
|
+
quantityPurchaseUnits: number;
|
|
252
|
+
/** Equivalent quantity in sale units */
|
|
253
|
+
quantitySaleUnits: number;
|
|
254
|
+
/** Whether this action is enabled by the user */
|
|
255
|
+
enabled: boolean;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* A single product decision within a session
|
|
259
|
+
*/
|
|
260
|
+
export interface SessionProductDecision {
|
|
261
|
+
/** QVET product code */
|
|
262
|
+
qvetCode: number;
|
|
263
|
+
/** Whether the user has marked this item as resolved */
|
|
264
|
+
resolved: boolean;
|
|
265
|
+
/** Transfer actions configured by the user */
|
|
266
|
+
transfers: SessionTransferAction[];
|
|
267
|
+
/** Purchase actions configured by the user */
|
|
268
|
+
purchases: SessionPurchaseAction[];
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Complete order planning session with user decisions
|
|
272
|
+
*
|
|
273
|
+
* @example GET /api/inventory/order-planning/sessions/latest
|
|
274
|
+
*/
|
|
275
|
+
export interface OrderPlanningSessionResponse {
|
|
276
|
+
/** Session ID */
|
|
277
|
+
id: string;
|
|
278
|
+
/** ISO timestamp of the analysis that created this session */
|
|
279
|
+
analyzedAt: string;
|
|
280
|
+
/** Session status */
|
|
281
|
+
status: OrderPlanningSessionStatus;
|
|
282
|
+
/** User decisions per product */
|
|
283
|
+
decisions: SessionProductDecision[];
|
|
284
|
+
/** When session was created */
|
|
285
|
+
createdAt: string;
|
|
286
|
+
/** When session was last updated */
|
|
287
|
+
updatedAt: string;
|
|
288
|
+
}
|
|
221
289
|
/**
|
|
222
290
|
* @deprecated Use RefreshOrderPlanningDataResponse instead
|
|
223
291
|
*/
|
|
@@ -22,6 +22,7 @@ export interface CompanySettingsResponse {
|
|
|
22
22
|
facturamaApiKey?: string;
|
|
23
23
|
facturamaApiSecret?: string;
|
|
24
24
|
facturamaUseSandbox: boolean;
|
|
25
|
+
employerRegistration?: string;
|
|
25
26
|
createdAt: string;
|
|
26
27
|
updatedAt: string;
|
|
27
28
|
}
|
|
@@ -48,4 +49,5 @@ export interface UpdateCompanySettingsRequest {
|
|
|
48
49
|
facturamaApiKey?: string;
|
|
49
50
|
facturamaApiSecret?: string;
|
|
50
51
|
facturamaUseSandbox: boolean;
|
|
52
|
+
employerRegistration?: string;
|
|
51
53
|
}
|