hvp-shared 6.6.0 → 6.7.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.
@@ -99,3 +99,96 @@ export interface QvetSalesQueryParams {
99
99
  skip?: number;
100
100
  sort?: string;
101
101
  }
102
+ /**
103
+ * Single purchase record from QVET
104
+ * Represents one line item in a purchase transaction
105
+ */
106
+ export interface QvetPurchaseResponse {
107
+ _id: string;
108
+ qvetCode: number;
109
+ productName: string;
110
+ barcode: string;
111
+ section: string;
112
+ family: string;
113
+ subfamily: string;
114
+ purchaseDate: string;
115
+ invoiceSeries: string;
116
+ invoiceNumber: number;
117
+ supplierInvoice: string;
118
+ quantity: number;
119
+ unitPrice: number;
120
+ subtotal: number;
121
+ taxAmount: number;
122
+ discount: number;
123
+ total: number;
124
+ conversionFactor: number;
125
+ branch: string;
126
+ warehouse: string;
127
+ supplier: string;
128
+ orderDate: string | null;
129
+ orderNumber: number | null;
130
+ invoiceDate: string | null;
131
+ reference: string;
132
+ syncedAt: string;
133
+ }
134
+ /**
135
+ * Paginated list of purchases
136
+ */
137
+ export interface QvetPurchasesListResponse {
138
+ ok: boolean;
139
+ data: QvetPurchaseResponse[];
140
+ pagination: {
141
+ total: number;
142
+ limit: number;
143
+ skip: number;
144
+ hasMore: boolean;
145
+ };
146
+ }
147
+ /**
148
+ * Purchases summary statistics for a period
149
+ */
150
+ export interface QvetPurchasesSummaryResponse {
151
+ ok: boolean;
152
+ data: {
153
+ totalRecords: number;
154
+ totalPurchases: number;
155
+ totalSubtotal: number;
156
+ totalTax: number;
157
+ totalDiscount: number;
158
+ totalQuantity: number;
159
+ avgPurchase: number;
160
+ uniqueSuppliers: number;
161
+ uniqueProducts: number;
162
+ };
163
+ }
164
+ /**
165
+ * Purchases by supplier aggregation
166
+ */
167
+ export interface QvetPurchasesBySupplierItem {
168
+ supplier: string;
169
+ totalPurchases: number;
170
+ totalQuantity: number;
171
+ recordCount: number;
172
+ }
173
+ export interface QvetPurchasesBySupplierResponse {
174
+ ok: boolean;
175
+ data: QvetPurchasesBySupplierItem[];
176
+ }
177
+ /**
178
+ * Query parameters for purchases endpoint
179
+ */
180
+ export interface QvetPurchasesQueryParams {
181
+ startDate?: string;
182
+ endDate?: string;
183
+ year?: number;
184
+ month?: number;
185
+ halfMonth?: 1 | 2;
186
+ warehouse?: string;
187
+ section?: string;
188
+ family?: string;
189
+ supplier?: string;
190
+ qvetCode?: number;
191
+ limit?: number;
192
+ skip?: number;
193
+ sort?: string;
194
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hvp-shared",
3
- "version": "6.6.0",
3
+ "version": "6.7.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",