hvp-shared 6.13.0 → 6.15.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.
@@ -13,6 +13,7 @@ export declare enum JobType {
13
13
  SYNC_INVENTORY = "SYNC_INVENTORY",
14
14
  SYNC_TRANSFERS = "SYNC_TRANSFERS",
15
15
  SYNC_MOVEMENTS = "SYNC_MOVEMENTS",
16
+ SYNC_COLLECTIONS = "SYNC_COLLECTIONS",
16
17
  SYNC_STOCK_CONFIG = "SYNC_STOCK_CONFIG",
17
18
  SYNC_CATALOG = "SYNC_CATALOG",
18
19
  SYNC_CLIENTS = "SYNC_CLIENTS",
@@ -33,6 +34,8 @@ export declare enum ReportType {
33
34
  MOVEMENTS = "MOVEMENTS",
34
35
  /** Transfers report - uses date range params */
35
36
  TRANSFERS = "TRANSFERS",
37
+ /** Collections (Cobros) report - uses date range params */
38
+ COLLECTIONS = "COLLECTIONS",
36
39
  /** Inventory snapshot - uses snapshot date param */
37
40
  INVENTORY_SNAPSHOT = "INVENTORY_SNAPSHOT",
38
41
  /** Clients list - no date params required */
@@ -17,6 +17,7 @@ var JobType;
17
17
  JobType["SYNC_INVENTORY"] = "SYNC_INVENTORY";
18
18
  JobType["SYNC_TRANSFERS"] = "SYNC_TRANSFERS";
19
19
  JobType["SYNC_MOVEMENTS"] = "SYNC_MOVEMENTS";
20
+ JobType["SYNC_COLLECTIONS"] = "SYNC_COLLECTIONS";
20
21
  JobType["SYNC_STOCK_CONFIG"] = "SYNC_STOCK_CONFIG";
21
22
  JobType["SYNC_CATALOG"] = "SYNC_CATALOG";
22
23
  JobType["SYNC_CLIENTS"] = "SYNC_CLIENTS";
@@ -38,6 +39,8 @@ var ReportType;
38
39
  ReportType["MOVEMENTS"] = "MOVEMENTS";
39
40
  /** Transfers report - uses date range params */
40
41
  ReportType["TRANSFERS"] = "TRANSFERS";
42
+ /** Collections (Cobros) report - uses date range params */
43
+ ReportType["COLLECTIONS"] = "COLLECTIONS";
41
44
  /** Inventory snapshot - uses snapshot date param */
42
45
  ReportType["INVENTORY_SNAPSHOT"] = "INVENTORY_SNAPSHOT";
43
46
  /** Clients list - no date params required */
@@ -66,6 +69,7 @@ exports.REPORT_PARAM_TYPES = {
66
69
  [ReportType.PURCHASES]: 'date_range',
67
70
  [ReportType.MOVEMENTS]: 'date_range',
68
71
  [ReportType.TRANSFERS]: 'date_range',
72
+ [ReportType.COLLECTIONS]: 'date_range',
69
73
  [ReportType.INVENTORY_SNAPSHOT]: 'snapshot',
70
74
  [ReportType.CLIENTS]: 'no_params',
71
75
  [ReportType.CATALOG]: 'no_params',
@@ -101,6 +105,7 @@ exports.JOB_TYPE_LABELS = {
101
105
  [JobType.SYNC_INVENTORY]: 'Sincronizar Inventario',
102
106
  [JobType.SYNC_TRANSFERS]: 'Sincronizar Traspasos',
103
107
  [JobType.SYNC_MOVEMENTS]: 'Sincronizar Movimientos',
108
+ [JobType.SYNC_COLLECTIONS]: 'Sincronizar Cobros',
104
109
  [JobType.SYNC_STOCK_CONFIG]: 'Sincronizar Config. Stock',
105
110
  [JobType.SYNC_CATALOG]: 'Sincronizar Catálogo',
106
111
  [JobType.SYNC_CLIENTS]: 'Sincronizar Clientes',
@@ -116,7 +121,8 @@ exports.REPORT_TYPE_LABELS = {
116
121
  [ReportType.PURCHASES]: 'Compras',
117
122
  [ReportType.MOVEMENTS]: 'Movimientos',
118
123
  [ReportType.TRANSFERS]: 'Traspasos',
119
- [ReportType.INVENTORY_SNAPSHOT]: 'Snapshot Inventario',
124
+ [ReportType.COLLECTIONS]: 'Cobros',
125
+ [ReportType.INVENTORY_SNAPSHOT]: 'Cortes de Inventario',
120
126
  [ReportType.CLIENTS]: 'Clientes',
121
127
  [ReportType.CATALOG]: 'Catálogo',
122
128
  [ReportType.STOCK_CONFIG]: 'Config. Stock',
@@ -179,14 +179,20 @@ export interface CreateBatchSyncJobRequest {
179
179
  * Sync status for a report type
180
180
  */
181
181
  export interface SyncReportStatus {
182
- /** Last sync job ID */
182
+ /** Last sync job ID (from BackgroundJob tracking) */
183
183
  lastJobId?: string;
184
- /** Last sync status */
184
+ /** Last sync status (from BackgroundJob tracking) */
185
185
  lastStatus?: JobStatus;
186
- /** Last sync timestamp */
186
+ /** Last sync timestamp (from BackgroundJob or data's syncedAt field) */
187
187
  lastSyncAt?: string;
188
188
  /** Whether a sync is currently running */
189
189
  isRunning: boolean;
190
+ /** Total records in the collection (from actual data) */
191
+ totalRecords?: number;
192
+ /** Earliest date in the data (from actual data) */
193
+ minDate?: string;
194
+ /** Latest date in the data (from actual data) */
195
+ maxDate?: string;
190
196
  }
191
197
  /**
192
198
  * Overall sync status response
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hvp-shared",
3
- "version": "6.13.0",
3
+ "version": "6.15.0",
4
4
  "description": "Shared types and utilities for HVP backend and frontend",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",