hvp-shared 6.94.0 → 6.96.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,8 @@ export interface InventorySessionSummaryResponse {
|
|
|
28
28
|
inProgressItems: number;
|
|
29
29
|
/** Number of times an Excel was uploaded */
|
|
30
30
|
uploadCount: number;
|
|
31
|
+
/** Number of review rounds applied */
|
|
32
|
+
reviewCount: number;
|
|
31
33
|
/** Unique col_codes of collaborators who participated (from activityLog) */
|
|
32
34
|
participantCodes: string[];
|
|
33
35
|
createdByName: string;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QVET Client Duplicate Detection Contracts
|
|
3
|
+
*
|
|
4
|
+
* Types for the duplicate client detection and audit system.
|
|
5
|
+
* Detects potential duplicate client records using scoring-based matching
|
|
6
|
+
* on phone, email, and name similarity.
|
|
7
|
+
*
|
|
8
|
+
* @example GET /api/qvet/clients/duplicates?branch=MAT&confidence=HIGH
|
|
9
|
+
*/
|
|
10
|
+
export type DuplicateClientConfidence = 'HIGH' | 'MEDIUM' | 'LOW';
|
|
11
|
+
/**
|
|
12
|
+
* Information about a single client within a duplicate pair.
|
|
13
|
+
* Includes enrichment data (pets, visits, sales) to help decide which to keep.
|
|
14
|
+
*/
|
|
15
|
+
export interface DuplicateClientInfo {
|
|
16
|
+
qvetClientId: number;
|
|
17
|
+
name: string;
|
|
18
|
+
branch: string;
|
|
19
|
+
isActive: boolean;
|
|
20
|
+
phone1: string;
|
|
21
|
+
phone2: string;
|
|
22
|
+
email: string;
|
|
23
|
+
lastActivityAt: string | null;
|
|
24
|
+
petCount: number;
|
|
25
|
+
visitCount: number;
|
|
26
|
+
salesTotalAmount: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A pair of clients detected as potential duplicates.
|
|
30
|
+
*
|
|
31
|
+
* Scoring:
|
|
32
|
+
* - Same phone (last 7 digits): 60 pts
|
|
33
|
+
* - Same email: 60 pts
|
|
34
|
+
* - Exact name match: +30 pts
|
|
35
|
+
* - Name contained: +25 pts
|
|
36
|
+
* - Name similarity >= 50%: +1 to +25 pts
|
|
37
|
+
* - Same branch: +5 pts
|
|
38
|
+
* - Name-only match (no phone/email): 40 pts
|
|
39
|
+
*
|
|
40
|
+
* Confidence: HIGH >= 80, MEDIUM 60-79, LOW < 60
|
|
41
|
+
*/
|
|
42
|
+
export interface DuplicateClientPair {
|
|
43
|
+
score: number;
|
|
44
|
+
confidence: DuplicateClientConfidence;
|
|
45
|
+
reasons: string[];
|
|
46
|
+
clientA: DuplicateClientInfo;
|
|
47
|
+
clientB: DuplicateClientInfo;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Summary statistics for duplicate detection results.
|
|
51
|
+
*/
|
|
52
|
+
export interface DuplicateClientsSummary {
|
|
53
|
+
totalPairs: number;
|
|
54
|
+
highConfidence: number;
|
|
55
|
+
mediumConfidence: number;
|
|
56
|
+
lowConfidence: number;
|
|
57
|
+
uniqueClientsInvolved: number;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Full response for duplicate client detection endpoint.
|
|
61
|
+
*
|
|
62
|
+
* @example GET /api/qvet/clients/duplicates
|
|
63
|
+
*/
|
|
64
|
+
export interface DuplicateClientsResponse {
|
|
65
|
+
summary: DuplicateClientsSummary;
|
|
66
|
+
pairs: DuplicateClientPair[];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Query parameters for filtering duplicate detection results.
|
|
70
|
+
*/
|
|
71
|
+
export interface DuplicateClientsQueryParams {
|
|
72
|
+
branch?: string;
|
|
73
|
+
minScore?: number;
|
|
74
|
+
confidence?: DuplicateClientConfidence;
|
|
75
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* QVET Client Duplicate Detection Contracts
|
|
4
|
+
*
|
|
5
|
+
* Types for the duplicate client detection and audit system.
|
|
6
|
+
* Detects potential duplicate client records using scoring-based matching
|
|
7
|
+
* on phone, email, and name similarity.
|
|
8
|
+
*
|
|
9
|
+
* @example GET /api/qvet/clients/duplicates?branch=MAT&confidence=HIGH
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|