hvp-shared 6.18.0 → 6.20.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.
@@ -16,6 +16,8 @@ export declare enum JobType {
16
16
  SYNC_COLLECTIONS = "SYNC_COLLECTIONS",
17
17
  SYNC_CASH_CLOSINGS = "SYNC_CASH_CLOSINGS",
18
18
  SYNC_CASH_FLOWS = "SYNC_CASH_FLOWS",
19
+ SYNC_PURCHASE_INVOICES = "SYNC_PURCHASE_INVOICES",
20
+ SYNC_PURCHASE_ORDERS = "SYNC_PURCHASE_ORDERS",
19
21
  SYNC_STOCK_CONFIG = "SYNC_STOCK_CONFIG",
20
22
  SYNC_CATALOG = "SYNC_CATALOG",
21
23
  SYNC_CLIENTS = "SYNC_CLIENTS",
@@ -42,6 +44,10 @@ export declare enum ReportType {
42
44
  CASH_CLOSINGS = "CASH_CLOSINGS",
43
45
  /** Cash flows (Entradas/Salidas de Caja) report - uses date range params */
44
46
  CASH_FLOWS = "CASH_FLOWS",
47
+ /** Purchase invoices (Facturas Compra) report - uses date range params */
48
+ PURCHASE_INVOICES = "PURCHASE_INVOICES",
49
+ /** Purchase orders (Pedidos) report - uses date range params */
50
+ PURCHASE_ORDERS = "PURCHASE_ORDERS",
45
51
  /** Inventory snapshot - uses snapshot date param */
46
52
  INVENTORY_SNAPSHOT = "INVENTORY_SNAPSHOT",
47
53
  /** Clients list - no date params required */
@@ -20,6 +20,8 @@ var JobType;
20
20
  JobType["SYNC_COLLECTIONS"] = "SYNC_COLLECTIONS";
21
21
  JobType["SYNC_CASH_CLOSINGS"] = "SYNC_CASH_CLOSINGS";
22
22
  JobType["SYNC_CASH_FLOWS"] = "SYNC_CASH_FLOWS";
23
+ JobType["SYNC_PURCHASE_INVOICES"] = "SYNC_PURCHASE_INVOICES";
24
+ JobType["SYNC_PURCHASE_ORDERS"] = "SYNC_PURCHASE_ORDERS";
23
25
  JobType["SYNC_STOCK_CONFIG"] = "SYNC_STOCK_CONFIG";
24
26
  JobType["SYNC_CATALOG"] = "SYNC_CATALOG";
25
27
  JobType["SYNC_CLIENTS"] = "SYNC_CLIENTS";
@@ -47,6 +49,10 @@ var ReportType;
47
49
  ReportType["CASH_CLOSINGS"] = "CASH_CLOSINGS";
48
50
  /** Cash flows (Entradas/Salidas de Caja) report - uses date range params */
49
51
  ReportType["CASH_FLOWS"] = "CASH_FLOWS";
52
+ /** Purchase invoices (Facturas Compra) report - uses date range params */
53
+ ReportType["PURCHASE_INVOICES"] = "PURCHASE_INVOICES";
54
+ /** Purchase orders (Pedidos) report - uses date range params */
55
+ ReportType["PURCHASE_ORDERS"] = "PURCHASE_ORDERS";
50
56
  /** Inventory snapshot - uses snapshot date param */
51
57
  ReportType["INVENTORY_SNAPSHOT"] = "INVENTORY_SNAPSHOT";
52
58
  /** Clients list - no date params required */
@@ -78,6 +84,8 @@ exports.REPORT_PARAM_TYPES = {
78
84
  [ReportType.COLLECTIONS]: 'date_range',
79
85
  [ReportType.CASH_CLOSINGS]: 'date_range',
80
86
  [ReportType.CASH_FLOWS]: 'date_range',
87
+ [ReportType.PURCHASE_INVOICES]: 'date_range',
88
+ [ReportType.PURCHASE_ORDERS]: 'date_range',
81
89
  [ReportType.INVENTORY_SNAPSHOT]: 'snapshot',
82
90
  [ReportType.CLIENTS]: 'no_params',
83
91
  [ReportType.CATALOG]: 'no_params',
@@ -116,6 +124,8 @@ exports.JOB_TYPE_LABELS = {
116
124
  [JobType.SYNC_COLLECTIONS]: 'Sincronizar Cobros',
117
125
  [JobType.SYNC_CASH_CLOSINGS]: 'Sincronizar Cierres de Caja',
118
126
  [JobType.SYNC_CASH_FLOWS]: 'Sincronizar Entradas/Salidas',
127
+ [JobType.SYNC_PURCHASE_INVOICES]: 'Sincronizar Facturas Compra',
128
+ [JobType.SYNC_PURCHASE_ORDERS]: 'Sincronizar Pedidos',
119
129
  [JobType.SYNC_STOCK_CONFIG]: 'Sincronizar Config. Stock',
120
130
  [JobType.SYNC_CATALOG]: 'Sincronizar Catálogo',
121
131
  [JobType.SYNC_CLIENTS]: 'Sincronizar Clientes',
@@ -134,6 +144,8 @@ exports.REPORT_TYPE_LABELS = {
134
144
  [ReportType.COLLECTIONS]: 'Cobros',
135
145
  [ReportType.CASH_CLOSINGS]: 'Cierres de Caja',
136
146
  [ReportType.CASH_FLOWS]: 'Entradas/Salidas',
147
+ [ReportType.PURCHASE_INVOICES]: 'Facturas Compra',
148
+ [ReportType.PURCHASE_ORDERS]: 'Pedidos',
137
149
  [ReportType.INVENTORY_SNAPSHOT]: 'Cortes de Inventario',
138
150
  [ReportType.CLIENTS]: 'Clientes',
139
151
  [ReportType.CATALOG]: 'Catálogo',
@@ -2,3 +2,8 @@
2
2
  * QVET API Contracts
3
3
  */
4
4
  export * from './responses';
5
+ export * from './purchase-invoices';
6
+ export * from './purchase-orders';
7
+ export * from './suppliers';
8
+ export * from './payables';
9
+ export * from './staff';
@@ -18,3 +18,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  * QVET API Contracts
19
19
  */
20
20
  __exportStar(require("./responses"), exports);
21
+ __exportStar(require("./purchase-invoices"), exports);
22
+ __exportStar(require("./purchase-orders"), exports);
23
+ __exportStar(require("./suppliers"), exports);
24
+ __exportStar(require("./payables"), exports);
25
+ __exportStar(require("./staff"), exports);
@@ -0,0 +1,49 @@
1
+ /**
2
+ * QVET Payables (Vencimientos) Contracts
3
+ * Report ID: 718
4
+ * Payment due dates for supplier invoices (cuentas por pagar)
5
+ */
6
+ /**
7
+ * Single payable record from QVET
8
+ * Represents a payment due date for a supplier invoice
9
+ */
10
+ export interface QvetPayableResponse {
11
+ id: string;
12
+ invoiceNumber: string;
13
+ ownNumber: string;
14
+ supplier: string;
15
+ invoiceDate: string;
16
+ paymentDate: string;
17
+ dueDate: string;
18
+ paymentMethod: string;
19
+ dueAmount: number;
20
+ invoiceTotal: number;
21
+ syncRunId?: string;
22
+ syncedAt?: string;
23
+ }
24
+ /**
25
+ * Query parameters for payables
26
+ */
27
+ export interface QvetPayablesQueryParams {
28
+ year?: number;
29
+ month?: number;
30
+ supplier?: string;
31
+ overdue?: boolean;
32
+ page?: number;
33
+ limit?: number;
34
+ }
35
+ /**
36
+ * Summary data for payables
37
+ */
38
+ export interface QvetPayablesSummaryData {
39
+ totalRecords: number;
40
+ totalDueAmount: number;
41
+ totalInvoiceAmount: number;
42
+ overdueCount: number;
43
+ overdueAmount: number;
44
+ bySupplier: Array<{
45
+ supplier: string;
46
+ count: number;
47
+ totalDue: number;
48
+ }>;
49
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * QVET Payables (Vencimientos) Contracts
4
+ * Report ID: 718
5
+ * Payment due dates for supplier invoices (cuentas por pagar)
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,58 @@
1
+ /**
2
+ * QVET Purchase Invoices (Facturas Compra) Contracts
3
+ * Report ID: 1353
4
+ */
5
+ /**
6
+ * Single purchase invoice record from QVET
7
+ */
8
+ export interface QvetPurchaseInvoiceResponse {
9
+ id: string;
10
+ invoiceNumber: number;
11
+ series: string;
12
+ ownNumber: string;
13
+ qvetInvoiceId: number;
14
+ supplier: string;
15
+ supplierTaxId: string;
16
+ warehouse: string;
17
+ company: string;
18
+ invoiceDate: string;
19
+ subtotal: number;
20
+ taxAmount: number;
21
+ total: number;
22
+ discount: number;
23
+ earlyPaymentDiscount: number;
24
+ paymentMethod: string;
25
+ createdBy: string;
26
+ syncRunId?: string;
27
+ syncedAt?: string;
28
+ }
29
+ /**
30
+ * Query parameters for purchase invoices
31
+ */
32
+ export interface QvetPurchaseInvoicesQueryParams {
33
+ year?: number;
34
+ month?: number;
35
+ warehouse?: string;
36
+ supplier?: string;
37
+ page?: number;
38
+ limit?: number;
39
+ }
40
+ /**
41
+ * Summary data for purchase invoices
42
+ */
43
+ export interface QvetPurchaseInvoicesSummaryData {
44
+ totalRecords: number;
45
+ totalSubtotal: number;
46
+ totalTax: number;
47
+ totalAmount: number;
48
+ bySupplier: Array<{
49
+ supplier: string;
50
+ count: number;
51
+ total: number;
52
+ }>;
53
+ byWarehouse: Array<{
54
+ warehouse: string;
55
+ count: number;
56
+ total: number;
57
+ }>;
58
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * QVET Purchase Invoices (Facturas Compra) Contracts
4
+ * Report ID: 1353
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,70 @@
1
+ /**
2
+ * QVET Purchase Orders (Pedidos) Contracts
3
+ * Report ID: 13
4
+ */
5
+ /**
6
+ * Single purchase order line item from QVET
7
+ */
8
+ export interface QvetPurchaseOrderResponse {
9
+ id: string;
10
+ orderNumber: number;
11
+ qvetOrderId: number;
12
+ orderType: string;
13
+ supplier: string;
14
+ branch: string;
15
+ productName: string;
16
+ section: string;
17
+ subfamily: string;
18
+ quantity: number;
19
+ orderDate: string;
20
+ deliveryDate?: string;
21
+ subtotal: number;
22
+ taxAmount: number;
23
+ total: number;
24
+ taxRate: number;
25
+ discount: number;
26
+ lineDiscount: number;
27
+ discountAmount: number;
28
+ lineDiscountAmount: number;
29
+ irpfAmount: number;
30
+ reAmount: number;
31
+ reRate: number;
32
+ syncRunId?: string;
33
+ syncedAt?: string;
34
+ }
35
+ /**
36
+ * Query parameters for purchase orders
37
+ */
38
+ export interface QvetPurchaseOrdersQueryParams {
39
+ year?: number;
40
+ month?: number;
41
+ branch?: string;
42
+ supplier?: string;
43
+ orderType?: string;
44
+ page?: number;
45
+ limit?: number;
46
+ }
47
+ /**
48
+ * Summary data for purchase orders
49
+ */
50
+ export interface QvetPurchaseOrdersSummaryData {
51
+ totalRecords: number;
52
+ totalQuantity: number;
53
+ totalSubtotal: number;
54
+ totalAmount: number;
55
+ bySupplier: Array<{
56
+ supplier: string;
57
+ count: number;
58
+ total: number;
59
+ }>;
60
+ byBranch: Array<{
61
+ branch: string;
62
+ count: number;
63
+ total: number;
64
+ }>;
65
+ bySection: Array<{
66
+ section: string;
67
+ count: number;
68
+ total: number;
69
+ }>;
70
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * QVET Purchase Orders (Pedidos) Contracts
4
+ * Report ID: 13
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,50 @@
1
+ /**
2
+ * QVET Staff (Personal) Contracts
3
+ * Report ID: 102
4
+ */
5
+ /**
6
+ * Single staff member record from QVET
7
+ */
8
+ export interface QvetStaffResponse {
9
+ id: string;
10
+ qvetId: string;
11
+ alternativeCode: string;
12
+ name: string;
13
+ abbreviation: string;
14
+ taxId: string;
15
+ phone1: string;
16
+ phone2: string;
17
+ email: string;
18
+ address: string;
19
+ postalCode: string;
20
+ city: string;
21
+ province: string;
22
+ collegiateNumber: string;
23
+ staffGroup: string;
24
+ availableCenters: string;
25
+ isActive: boolean;
26
+ syncRunId?: string;
27
+ syncedAt?: string;
28
+ }
29
+ /**
30
+ * Query parameters for staff
31
+ */
32
+ export interface QvetStaffQueryParams {
33
+ isActive?: boolean;
34
+ staffGroup?: string;
35
+ search?: string;
36
+ page?: number;
37
+ limit?: number;
38
+ }
39
+ /**
40
+ * Summary data for staff
41
+ */
42
+ export interface QvetStaffSummaryData {
43
+ totalRecords: number;
44
+ activeCount: number;
45
+ inactiveCount: number;
46
+ byGroup: Array<{
47
+ group: string;
48
+ count: number;
49
+ }>;
50
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * QVET Staff (Personal) Contracts
4
+ * Report ID: 102
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,47 @@
1
+ /**
2
+ * QVET Suppliers (Proveedores) Contracts
3
+ * Report ID: 508
4
+ */
5
+ /**
6
+ * Single supplier record from QVET
7
+ */
8
+ export interface QvetSupplierResponse {
9
+ id: string;
10
+ qvetId: number;
11
+ name: string;
12
+ taxId: string;
13
+ phone1: string;
14
+ phone2: string;
15
+ fax: string;
16
+ email: string;
17
+ website: string;
18
+ contactPerson: string;
19
+ address: string;
20
+ city: string;
21
+ postalCode: string;
22
+ bankName: string;
23
+ accountNumber: string;
24
+ iban: string;
25
+ isActive: boolean;
26
+ registrationDate: string;
27
+ notes: string;
28
+ syncRunId?: string;
29
+ syncedAt?: string;
30
+ }
31
+ /**
32
+ * Query parameters for suppliers
33
+ */
34
+ export interface QvetSuppliersQueryParams {
35
+ isActive?: boolean;
36
+ search?: string;
37
+ page?: number;
38
+ limit?: number;
39
+ }
40
+ /**
41
+ * Summary data for suppliers
42
+ */
43
+ export interface QvetSuppliersSummaryData {
44
+ totalRecords: number;
45
+ activeCount: number;
46
+ inactiveCount: number;
47
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * QVET Suppliers (Proveedores) Contracts
4
+ * Report ID: 508
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hvp-shared",
3
- "version": "6.18.0",
3
+ "version": "6.20.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",