hvp-shared 13.9.0 → 13.10.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.
|
@@ -27,3 +27,55 @@ export interface DiagnoseAppointmentsRequest {
|
|
|
27
27
|
export interface DiagnoseEventRequest {
|
|
28
28
|
eventId: string;
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Create appointment request — recepción creates a new GCal event directly
|
|
32
|
+
* from HVP. The backend formats title + description per `STANDARD_V3`,
|
|
33
|
+
* picks the right colorId from `branch`, and sets `extendedProperties.private`
|
|
34
|
+
* with the metadata the scorer reads — so the resulting event auto-passes
|
|
35
|
+
* the dimensions the user can't get wrong (branch, service, scheduler).
|
|
36
|
+
*
|
|
37
|
+
* `schedulerColCode` is NOT in the body; it's derived from the authenticated
|
|
38
|
+
* user on the backend.
|
|
39
|
+
*
|
|
40
|
+
* @example POST /api/google-calendar/appointments
|
|
41
|
+
*/
|
|
42
|
+
export interface CreateAppointmentRequest {
|
|
43
|
+
/** Branch — drives the GCal colorId. */
|
|
44
|
+
branch: 'urban' | 'harbor' | 'montejo';
|
|
45
|
+
/**
|
|
46
|
+
* Short service code (e.g. `"C"`, `"SC"`, `"V"`, `"CX"`). Goes first in
|
|
47
|
+
* the title. The scorer canonicalizes via `SERVICE_CODE_SYNONYMS`, so any
|
|
48
|
+
* accepted variant works.
|
|
49
|
+
*/
|
|
50
|
+
serviceCode: string;
|
|
51
|
+
/** Optional specialty modifier after the service code (e.g. `"OFT"`, `"NEURO"`). */
|
|
52
|
+
specialty?: string;
|
|
53
|
+
/** Pet name (uppercased into the title). Required. */
|
|
54
|
+
petName: string;
|
|
55
|
+
/** Attending vet col_code (e.g. `"RGL"`). Optional. */
|
|
56
|
+
vetColCode?: string;
|
|
57
|
+
/** True → asterisk after `vetColCode` in title (= preferred vet, comissionable). */
|
|
58
|
+
isPreferredVet?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* QVET client id in `Q{id}` format. When present, the description gets the
|
|
61
|
+
* Google-Contacts paste line `NAME | PETS | Q{id}` so the scorer auto-passes
|
|
62
|
+
* `owner_name` and `owner_phone` dimensions.
|
|
63
|
+
*/
|
|
64
|
+
qvetClientId?: string;
|
|
65
|
+
/** Tutor name. Required if no `qvetClientId`. */
|
|
66
|
+
ownerName?: string;
|
|
67
|
+
/** Tutor phone (any common Mexican format). Required if no `qvetClientId`. */
|
|
68
|
+
ownerPhone?: string;
|
|
69
|
+
/** Free-text motivo / contexto clínico. */
|
|
70
|
+
motivo?: string;
|
|
71
|
+
/** Breed (e.g. `"Yorkie"`). Detected against `KNOWN_BREEDS`. */
|
|
72
|
+
breed?: string;
|
|
73
|
+
/** Age (e.g. `"4 meses"`, `"1 año y 4 meses"`). */
|
|
74
|
+
age?: string;
|
|
75
|
+
/** Discount annotation `<n>% <razón>` (e.g. `"15% recordatorio"`). */
|
|
76
|
+
discount?: string;
|
|
77
|
+
/** ISO datetime with timezone (e.g. `"2026-05-20T10:00:00-06:00"`). */
|
|
78
|
+
startDateTime: string;
|
|
79
|
+
/** Duration in minutes (e.g. 30, 60, 90). */
|
|
80
|
+
durationMinutes: number;
|
|
81
|
+
}
|
|
@@ -180,3 +180,24 @@ export interface DiagnoseAppointmentsResponse {
|
|
|
180
180
|
/** Detailed excluded events (capped at 100). */
|
|
181
181
|
excluded: DiagnosticExcludedEvent[];
|
|
182
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* Result of creating a new GCal appointment from HVP. Returns the created
|
|
185
|
+
* event id + link, the title that was generated, and an immediate diagnostic
|
|
186
|
+
* preview so the UI can show "this appointment scored 100/100" confirmation.
|
|
187
|
+
*
|
|
188
|
+
* @example POST /api/google-calendar/appointments → 201
|
|
189
|
+
*/
|
|
190
|
+
export interface CreateAppointmentResponse {
|
|
191
|
+
/** GCal event id. */
|
|
192
|
+
eventId: string;
|
|
193
|
+
/** Link to the event in Google Calendar. */
|
|
194
|
+
htmlLink: string;
|
|
195
|
+
/** Title that was generated from the request fields. */
|
|
196
|
+
title: string;
|
|
197
|
+
/** ISO datetime echoed back (Mexico_City). */
|
|
198
|
+
startDateTime: string;
|
|
199
|
+
/** Score the event got under the current standard (typically 100 — HVP-created events auto-pass most dims). */
|
|
200
|
+
score: number;
|
|
201
|
+
/** True iff `score >= minimumCompliantScore`. */
|
|
202
|
+
isCompliant: boolean;
|
|
203
|
+
}
|