hvp-shared 6.90.0 → 6.92.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.
- package/dist/constants/background-job.constants.d.ts +13 -1
- package/dist/constants/background-job.constants.js +24 -0
- package/dist/contracts/qvet/index.d.ts +2 -0
- package/dist/contracts/qvet/index.js +2 -0
- package/dist/contracts/qvet/pets.d.ts +83 -0
- package/dist/contracts/qvet/pets.js +6 -0
- package/dist/contracts/qvet/visits.d.ts +83 -0
- package/dist/contracts/qvet/visits.js +6 -0
- package/package.json +1 -1
|
@@ -25,6 +25,10 @@ export declare enum JobType {
|
|
|
25
25
|
SYNC_INVENTORY_SNAPSHOT = "SYNC_INVENTORY_SNAPSHOT",
|
|
26
26
|
SYNC_COLLECTION_DETAILS = "SYNC_COLLECTION_DETAILS",
|
|
27
27
|
SYNC_SALE_DETAILS = "SYNC_SALE_DETAILS",
|
|
28
|
+
SYNC_PAYABLES = "SYNC_PAYABLES",
|
|
29
|
+
SYNC_STAFF = "SYNC_STAFF",
|
|
30
|
+
SYNC_PETS = "SYNC_PETS",
|
|
31
|
+
SYNC_VISITS = "SYNC_VISITS",
|
|
28
32
|
SYNC_BATCH = "SYNC_BATCH",
|
|
29
33
|
SYNC_ALL = "SYNC_ALL",
|
|
30
34
|
SYNC_FACTURAMA_PRODUCTS = "SYNC_FACTURAMA_PRODUCTS"
|
|
@@ -65,7 +69,15 @@ export declare enum ReportType {
|
|
|
65
69
|
/** Collection details (Cobros detalle) - uses date range params */
|
|
66
70
|
COLLECTION_DETAILS = "COLLECTION_DETAILS",
|
|
67
71
|
/** Sale details (Detalle ventas, Report 89) - uses date range params */
|
|
68
|
-
SALE_DETAILS = "SALE_DETAILS"
|
|
72
|
+
SALE_DETAILS = "SALE_DETAILS",
|
|
73
|
+
/** Payables / Accounts payable (Vencimientos, Report 718) - uses date range params */
|
|
74
|
+
PAYABLES = "PAYABLES",
|
|
75
|
+
/** Staff / Personnel catalog (Report 102) - no date params required */
|
|
76
|
+
STAFF = "STAFF",
|
|
77
|
+
/** Pets / Animals catalog (listadoMascotas) - no date params required */
|
|
78
|
+
PETS = "PETS",
|
|
79
|
+
/** Visits / Consultations (listadoVisitas) - uses date range params */
|
|
80
|
+
VISITS = "VISITS"
|
|
69
81
|
}
|
|
70
82
|
/**
|
|
71
83
|
* Sub-task status within a batch job
|
|
@@ -29,6 +29,10 @@ var JobType;
|
|
|
29
29
|
JobType["SYNC_INVENTORY_SNAPSHOT"] = "SYNC_INVENTORY_SNAPSHOT";
|
|
30
30
|
JobType["SYNC_COLLECTION_DETAILS"] = "SYNC_COLLECTION_DETAILS";
|
|
31
31
|
JobType["SYNC_SALE_DETAILS"] = "SYNC_SALE_DETAILS";
|
|
32
|
+
JobType["SYNC_PAYABLES"] = "SYNC_PAYABLES";
|
|
33
|
+
JobType["SYNC_STAFF"] = "SYNC_STAFF";
|
|
34
|
+
JobType["SYNC_PETS"] = "SYNC_PETS";
|
|
35
|
+
JobType["SYNC_VISITS"] = "SYNC_VISITS";
|
|
32
36
|
JobType["SYNC_BATCH"] = "SYNC_BATCH";
|
|
33
37
|
JobType["SYNC_ALL"] = "SYNC_ALL";
|
|
34
38
|
JobType["SYNC_FACTURAMA_PRODUCTS"] = "SYNC_FACTURAMA_PRODUCTS";
|
|
@@ -71,6 +75,14 @@ var ReportType;
|
|
|
71
75
|
ReportType["COLLECTION_DETAILS"] = "COLLECTION_DETAILS";
|
|
72
76
|
/** Sale details (Detalle ventas, Report 89) - uses date range params */
|
|
73
77
|
ReportType["SALE_DETAILS"] = "SALE_DETAILS";
|
|
78
|
+
/** Payables / Accounts payable (Vencimientos, Report 718) - uses date range params */
|
|
79
|
+
ReportType["PAYABLES"] = "PAYABLES";
|
|
80
|
+
/** Staff / Personnel catalog (Report 102) - no date params required */
|
|
81
|
+
ReportType["STAFF"] = "STAFF";
|
|
82
|
+
/** Pets / Animals catalog (listadoMascotas) - no date params required */
|
|
83
|
+
ReportType["PETS"] = "PETS";
|
|
84
|
+
/** Visits / Consultations (listadoVisitas) - uses date range params */
|
|
85
|
+
ReportType["VISITS"] = "VISITS";
|
|
74
86
|
})(ReportType || (exports.ReportType = ReportType = {}));
|
|
75
87
|
/**
|
|
76
88
|
* Sub-task status within a batch job
|
|
@@ -103,6 +115,10 @@ exports.REPORT_PARAM_TYPES = {
|
|
|
103
115
|
[ReportType.SUPPLIERS]: 'no_params',
|
|
104
116
|
[ReportType.COLLECTION_DETAILS]: 'date_range',
|
|
105
117
|
[ReportType.SALE_DETAILS]: 'date_range',
|
|
118
|
+
[ReportType.PAYABLES]: 'date_range',
|
|
119
|
+
[ReportType.STAFF]: 'no_params',
|
|
120
|
+
[ReportType.PETS]: 'no_params',
|
|
121
|
+
[ReportType.VISITS]: 'date_range',
|
|
106
122
|
};
|
|
107
123
|
/**
|
|
108
124
|
* Job execution status
|
|
@@ -146,6 +162,10 @@ exports.JOB_TYPE_LABELS = {
|
|
|
146
162
|
[JobType.SYNC_INVENTORY_SNAPSHOT]: 'Sincronizar Snapshot Inventario',
|
|
147
163
|
[JobType.SYNC_COLLECTION_DETAILS]: 'Sincronizar Cobros Detalle',
|
|
148
164
|
[JobType.SYNC_SALE_DETAILS]: 'Sincronizar Detalle Ventas',
|
|
165
|
+
[JobType.SYNC_PAYABLES]: 'Sincronizar Cuentas por Pagar',
|
|
166
|
+
[JobType.SYNC_STAFF]: 'Sincronizar Personal',
|
|
167
|
+
[JobType.SYNC_PETS]: 'Sincronizar Mascotas',
|
|
168
|
+
[JobType.SYNC_VISITS]: 'Sincronizar Visitas',
|
|
149
169
|
[JobType.SYNC_BATCH]: 'Sincronización por Lotes',
|
|
150
170
|
[JobType.SYNC_ALL]: 'Sincronizar Todo',
|
|
151
171
|
[JobType.SYNC_FACTURAMA_PRODUCTS]: 'Sincronizar Productos Facturama',
|
|
@@ -170,6 +190,10 @@ exports.REPORT_TYPE_LABELS = {
|
|
|
170
190
|
[ReportType.SUPPLIERS]: 'Proveedores',
|
|
171
191
|
[ReportType.COLLECTION_DETAILS]: 'Cobros Detalle',
|
|
172
192
|
[ReportType.SALE_DETAILS]: 'Detalle Ventas',
|
|
193
|
+
[ReportType.PAYABLES]: 'Cuentas por Pagar',
|
|
194
|
+
[ReportType.STAFF]: 'Personal',
|
|
195
|
+
[ReportType.PETS]: 'Mascotas',
|
|
196
|
+
[ReportType.VISITS]: 'Visitas',
|
|
173
197
|
};
|
|
174
198
|
/**
|
|
175
199
|
* Human-readable labels for sub-task status (Spanish for UI)
|
|
@@ -23,3 +23,5 @@ __exportStar(require("./purchase-orders"), exports);
|
|
|
23
23
|
__exportStar(require("./suppliers"), exports);
|
|
24
24
|
__exportStar(require("./payables"), exports);
|
|
25
25
|
__exportStar(require("./staff"), exports);
|
|
26
|
+
__exportStar(require("./pets"), exports);
|
|
27
|
+
__exportStar(require("./visits"), exports);
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QVET Pets (Mascotas) Contracts
|
|
3
|
+
* Report: listadoMascotas
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Single pet/animal record from QVET
|
|
7
|
+
*/
|
|
8
|
+
export interface QvetPetResponse {
|
|
9
|
+
id: string;
|
|
10
|
+
qvetPetId: number;
|
|
11
|
+
qvetClientId: number;
|
|
12
|
+
name: string;
|
|
13
|
+
nhc: string;
|
|
14
|
+
chip?: string;
|
|
15
|
+
census?: string;
|
|
16
|
+
alternativeCode?: string;
|
|
17
|
+
clientName?: string;
|
|
18
|
+
clientTaxId?: string;
|
|
19
|
+
clientPhone1?: string;
|
|
20
|
+
clientPhone2?: string;
|
|
21
|
+
clientEmail?: string;
|
|
22
|
+
clientAddress?: string;
|
|
23
|
+
clientCity?: string;
|
|
24
|
+
clientPostalCode?: string;
|
|
25
|
+
clientProvince?: string;
|
|
26
|
+
species?: string;
|
|
27
|
+
breed?: string;
|
|
28
|
+
sex?: string;
|
|
29
|
+
isSterilized?: string;
|
|
30
|
+
age?: number;
|
|
31
|
+
birthDate?: string;
|
|
32
|
+
deathDate?: string;
|
|
33
|
+
weight?: string;
|
|
34
|
+
coat?: string;
|
|
35
|
+
temperament?: string;
|
|
36
|
+
furType?: string;
|
|
37
|
+
height?: string;
|
|
38
|
+
habitat?: string;
|
|
39
|
+
passport?: string;
|
|
40
|
+
bloodType?: string;
|
|
41
|
+
isDonor?: boolean;
|
|
42
|
+
branch?: string;
|
|
43
|
+
centerName?: string;
|
|
44
|
+
centerPhone?: string;
|
|
45
|
+
regularVet?: string;
|
|
46
|
+
source?: string;
|
|
47
|
+
clientType?: string;
|
|
48
|
+
hasPlan?: string;
|
|
49
|
+
sendType?: string;
|
|
50
|
+
smsPhone?: string;
|
|
51
|
+
registeredAt?: string;
|
|
52
|
+
clientRegisteredAt?: string;
|
|
53
|
+
lastVisitAt?: string;
|
|
54
|
+
observations?: string;
|
|
55
|
+
alert?: string;
|
|
56
|
+
syncedAt?: string;
|
|
57
|
+
sourceFile?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Query parameters for pets
|
|
61
|
+
*/
|
|
62
|
+
export interface QvetPetQueryParams {
|
|
63
|
+
species?: string;
|
|
64
|
+
breed?: string;
|
|
65
|
+
branch?: string;
|
|
66
|
+
search?: string;
|
|
67
|
+
page?: number;
|
|
68
|
+
limit?: number;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Summary data for pets
|
|
72
|
+
*/
|
|
73
|
+
export interface QvetPetSummaryData {
|
|
74
|
+
totalRecords: number;
|
|
75
|
+
bySpecies: Array<{
|
|
76
|
+
species: string;
|
|
77
|
+
count: number;
|
|
78
|
+
}>;
|
|
79
|
+
byBranch: Array<{
|
|
80
|
+
branch: string;
|
|
81
|
+
count: number;
|
|
82
|
+
}>;
|
|
83
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QVET Visits (Visitas) Contracts
|
|
3
|
+
* Report: listadoVisitas
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Single visit/consultation record from QVET
|
|
7
|
+
*/
|
|
8
|
+
export interface QvetVisitResponse {
|
|
9
|
+
id: string;
|
|
10
|
+
qvetVisitId: number;
|
|
11
|
+
qvetClientId: number;
|
|
12
|
+
qvetPetId: number;
|
|
13
|
+
visitDate?: string;
|
|
14
|
+
visitType?: string;
|
|
15
|
+
createdAt?: string;
|
|
16
|
+
petName?: string;
|
|
17
|
+
species?: string;
|
|
18
|
+
breed?: string;
|
|
19
|
+
nhc?: string;
|
|
20
|
+
sex?: string;
|
|
21
|
+
birthDate?: string;
|
|
22
|
+
age?: number;
|
|
23
|
+
isDeceased?: string;
|
|
24
|
+
weight?: string;
|
|
25
|
+
bloodType?: string;
|
|
26
|
+
clientName?: string;
|
|
27
|
+
clientTaxId?: string;
|
|
28
|
+
clientEmail?: string;
|
|
29
|
+
clientPhone1?: string;
|
|
30
|
+
clientPhone2?: string;
|
|
31
|
+
clientSmsPhone?: string;
|
|
32
|
+
clientAddress?: string;
|
|
33
|
+
clientPostalCode?: string;
|
|
34
|
+
clientProvince?: string;
|
|
35
|
+
clientCity?: string;
|
|
36
|
+
anamnesis?: string;
|
|
37
|
+
treatment?: string;
|
|
38
|
+
responsibleVet?: string;
|
|
39
|
+
regularVet?: string;
|
|
40
|
+
regularVetCase?: string;
|
|
41
|
+
createdBy?: string;
|
|
42
|
+
referrer?: string;
|
|
43
|
+
branch?: string;
|
|
44
|
+
source?: string;
|
|
45
|
+
hasPlan?: string;
|
|
46
|
+
syncedAt?: string;
|
|
47
|
+
sourceFile?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Query parameters for visits
|
|
51
|
+
*/
|
|
52
|
+
export interface QvetVisitQueryParams {
|
|
53
|
+
year?: number;
|
|
54
|
+
month?: number;
|
|
55
|
+
branch?: string;
|
|
56
|
+
visitType?: string;
|
|
57
|
+
species?: string;
|
|
58
|
+
search?: string;
|
|
59
|
+
page?: number;
|
|
60
|
+
limit?: number;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Summary data for visits
|
|
64
|
+
*/
|
|
65
|
+
export interface QvetVisitSummaryData {
|
|
66
|
+
totalRecords: number;
|
|
67
|
+
byVisitType: Array<{
|
|
68
|
+
visitType: string;
|
|
69
|
+
count: number;
|
|
70
|
+
}>;
|
|
71
|
+
byBranch: Array<{
|
|
72
|
+
branch: string;
|
|
73
|
+
count: number;
|
|
74
|
+
}>;
|
|
75
|
+
bySpecies: Array<{
|
|
76
|
+
species: string;
|
|
77
|
+
count: number;
|
|
78
|
+
}>;
|
|
79
|
+
byVet: Array<{
|
|
80
|
+
vet: string;
|
|
81
|
+
count: number;
|
|
82
|
+
}>;
|
|
83
|
+
}
|