hvp-shared 6.14.0 → 6.16.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.
@@ -510,3 +510,80 @@ export interface QvetCollectionsQueryParams {
510
510
  page?: number;
511
511
  skip?: number;
512
512
  }
513
+ /**
514
+ * Single cash closing record from QVET
515
+ * Represents a cash register closing entry - one row per payment method per closing
516
+ *
517
+ * A single closing (closingNumber) has multiple rows, one for each payment method.
518
+ * To get the total for a closing, sum all rows with the same closingNumber.
519
+ */
520
+ export interface QvetCashClosingResponse {
521
+ id: string;
522
+ cashRegister: string;
523
+ closingNumber: number;
524
+ paymentMethod: string;
525
+ saleAmount: number;
526
+ closingTotal: number;
527
+ collectedAmount: number;
528
+ dayCollections: number;
529
+ cashOut: number;
530
+ closingDate: string;
531
+ previousClosingDate: string;
532
+ branch: string;
533
+ staffName: string;
534
+ syncedAt: string;
535
+ }
536
+ /**
537
+ * Cash closings summary statistics data.
538
+ * Backend wraps with: ApiSingleSuccessResponse<QvetCashClosingsSummaryData>
539
+ */
540
+ export interface QvetCashClosingsSummaryData {
541
+ totalRecords: number;
542
+ totalClosings: number;
543
+ totalSales: number;
544
+ totalCollected: number;
545
+ totalCashOut: number;
546
+ byPaymentMethod: {
547
+ method: string;
548
+ totalAmount: number;
549
+ count: number;
550
+ }[];
551
+ }
552
+ /**
553
+ * Cash closings grouped by cash register.
554
+ * Backend returns: ApiSingleSuccessResponse<QvetCashClosingsByCashRegisterItem[]>
555
+ */
556
+ export interface QvetCashClosingsByCashRegisterItem {
557
+ cashRegister: string;
558
+ totalSales: number;
559
+ totalClosings: number;
560
+ totalCashOut: number;
561
+ }
562
+ /**
563
+ * Cash closings grouped by staff member.
564
+ * Backend returns: ApiSingleSuccessResponse<QvetCashClosingsByStaffItem[]>
565
+ */
566
+ export interface QvetCashClosingsByStaffItem {
567
+ staffName: string;
568
+ totalClosings: number;
569
+ totalSales: number;
570
+ branches: string[];
571
+ }
572
+ /**
573
+ * Query parameters for cash closings endpoint
574
+ */
575
+ export interface QvetCashClosingsQueryParams {
576
+ startDate?: string;
577
+ endDate?: string;
578
+ year?: number;
579
+ month?: number;
580
+ halfMonth?: 1 | 2;
581
+ branch?: string;
582
+ cashRegister?: string;
583
+ paymentMethod?: string;
584
+ staffName?: string;
585
+ limit?: number;
586
+ page?: number;
587
+ skip?: number;
588
+ sort?: string;
589
+ }
@@ -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.14.0",
3
+ "version": "6.16.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",