hvp-shared 7.2.1 → 7.3.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 +2 -1
- package/dist/constants/background-job.constants.js +2 -0
- package/dist/contracts/google-contacts/index.d.ts +2 -0
- package/dist/contracts/google-contacts/index.js +18 -0
- package/dist/contracts/google-contacts/requests.d.ts +15 -0
- package/dist/contracts/google-contacts/requests.js +9 -0
- package/dist/contracts/google-contacts/responses.d.ts +60 -0
- package/dist/contracts/google-contacts/responses.js +11 -0
- package/dist/contracts/index.d.ts +1 -0
- package/dist/contracts/index.js +1 -0
- package/package.json +1 -1
|
@@ -29,7 +29,8 @@ export declare enum JobType {
|
|
|
29
29
|
SYNC_VISITS = "SYNC_VISITS",
|
|
30
30
|
SYNC_BATCH = "SYNC_BATCH",
|
|
31
31
|
SYNC_ALL = "SYNC_ALL",
|
|
32
|
-
SYNC_FACTURAMA_PRODUCTS = "SYNC_FACTURAMA_PRODUCTS"
|
|
32
|
+
SYNC_FACTURAMA_PRODUCTS = "SYNC_FACTURAMA_PRODUCTS",
|
|
33
|
+
SYNC_GOOGLE_CONTACTS = "SYNC_GOOGLE_CONTACTS"
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
35
36
|
* Report types for batch sync operations.
|
|
@@ -34,6 +34,7 @@ var JobType;
|
|
|
34
34
|
JobType["SYNC_BATCH"] = "SYNC_BATCH";
|
|
35
35
|
JobType["SYNC_ALL"] = "SYNC_ALL";
|
|
36
36
|
JobType["SYNC_FACTURAMA_PRODUCTS"] = "SYNC_FACTURAMA_PRODUCTS";
|
|
37
|
+
JobType["SYNC_GOOGLE_CONTACTS"] = "SYNC_GOOGLE_CONTACTS";
|
|
37
38
|
})(JobType || (exports.JobType = JobType = {}));
|
|
38
39
|
/**
|
|
39
40
|
* Report types for batch sync operations.
|
|
@@ -159,6 +160,7 @@ exports.JOB_TYPE_LABELS = {
|
|
|
159
160
|
[JobType.SYNC_BATCH]: 'Sincronización por Lotes',
|
|
160
161
|
[JobType.SYNC_ALL]: 'Sincronizar Todo',
|
|
161
162
|
[JobType.SYNC_FACTURAMA_PRODUCTS]: 'Sincronizar Productos Facturama',
|
|
163
|
+
[JobType.SYNC_GOOGLE_CONTACTS]: 'Sincronizar Contactos Google',
|
|
162
164
|
};
|
|
163
165
|
/**
|
|
164
166
|
* Human-readable labels for report types (Spanish for UI)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|
|
18
|
+
__exportStar(require("./responses"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Contacts Sync - Request Types
|
|
3
|
+
*
|
|
4
|
+
* Request contracts for the Google Contacts sync feature.
|
|
5
|
+
*
|
|
6
|
+
* @example POST /api/google-contacts/sync
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Request to trigger a manual Google Contacts sync.
|
|
10
|
+
*
|
|
11
|
+
* @example POST /api/google-contacts/sync
|
|
12
|
+
*/
|
|
13
|
+
export interface TriggerGoogleContactsSyncRequest {
|
|
14
|
+
isDryRun?: boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Contacts Sync - Response Types
|
|
3
|
+
*
|
|
4
|
+
* Response contracts for the Google Contacts sync feature.
|
|
5
|
+
* Used by frontend to display sync status and results.
|
|
6
|
+
*
|
|
7
|
+
* @example GET /api/google-contacts/status
|
|
8
|
+
* @example GET /api/google-contacts/oauth/status
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Result of a sync operation.
|
|
12
|
+
*
|
|
13
|
+
* @example POST /api/google-contacts/sync (response.data.result)
|
|
14
|
+
*/
|
|
15
|
+
export interface GoogleContactsSyncResult {
|
|
16
|
+
contactsCreated: number;
|
|
17
|
+
contactsUpdated: number;
|
|
18
|
+
contactsDeleted: number;
|
|
19
|
+
duplicatesRemoved: number;
|
|
20
|
+
totalProcessed: number;
|
|
21
|
+
errors: string[];
|
|
22
|
+
durationSeconds: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Current sync status and last result.
|
|
26
|
+
*
|
|
27
|
+
* @example GET /api/google-contacts/status
|
|
28
|
+
*/
|
|
29
|
+
export interface GoogleContactsSyncStatusResponse {
|
|
30
|
+
isRunning: boolean;
|
|
31
|
+
lastSyncAt: string | null;
|
|
32
|
+
lastSyncResult: GoogleContactsSyncResult | null;
|
|
33
|
+
totalQvetClients: number;
|
|
34
|
+
totalGoogleContacts: number | null;
|
|
35
|
+
jobId: string | null;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* OAuth authorization status for Google Contacts API.
|
|
39
|
+
*
|
|
40
|
+
* @example GET /api/google-contacts/oauth/status
|
|
41
|
+
*/
|
|
42
|
+
export interface GoogleContactsOAuthStatusResponse {
|
|
43
|
+
isAuthorized: boolean;
|
|
44
|
+
email: string | null;
|
|
45
|
+
authorizeUrl: string | null;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* A single sync log entry.
|
|
49
|
+
*
|
|
50
|
+
* @example GET /api/google-contacts/logs
|
|
51
|
+
*/
|
|
52
|
+
export interface GoogleContactsSyncLogResponse {
|
|
53
|
+
id: string;
|
|
54
|
+
startedAt: string;
|
|
55
|
+
completedAt: string | null;
|
|
56
|
+
status: 'completed' | 'failed' | 'running';
|
|
57
|
+
result: GoogleContactsSyncResult | null;
|
|
58
|
+
triggeredBy: 'manual' | 'scheduled';
|
|
59
|
+
error: string | null;
|
|
60
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Google Contacts Sync - Response Types
|
|
4
|
+
*
|
|
5
|
+
* Response contracts for the Google Contacts sync feature.
|
|
6
|
+
* Used by frontend to display sync status and results.
|
|
7
|
+
*
|
|
8
|
+
* @example GET /api/google-contacts/status
|
|
9
|
+
* @example GET /api/google-contacts/oauth/status
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/contracts/index.js
CHANGED
|
@@ -31,3 +31,4 @@ __exportStar(require("./inventory-session"), exports);
|
|
|
31
31
|
__exportStar(require("./client-billing"), exports);
|
|
32
32
|
__exportStar(require("./global-invoice"), exports);
|
|
33
33
|
__exportStar(require("./inventory-report"), exports);
|
|
34
|
+
__exportStar(require("./google-contacts"), exports);
|