hvp-shared 13.8.1 → 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.
|
@@ -58,6 +58,15 @@ export declare const BRANCH_COLOR_IDS: Readonly<Record<AppointmentBranch, string
|
|
|
58
58
|
export declare const COLOR_ID_TO_BRANCH: Readonly<Record<string, AppointmentBranch>>;
|
|
59
59
|
/** colorId 8 (Graphite) = cancelled. Tracked as a separate metric. */
|
|
60
60
|
export declare const CANCELLED_COLOR_ID = "8";
|
|
61
|
+
/**
|
|
62
|
+
* colorId 7 (Peacock cyan) = cliente no llegó (no-show).
|
|
63
|
+
*
|
|
64
|
+
* Convention: when a client doesn't show up to their appointment, recepción
|
|
65
|
+
* repinta el evento con este color para señalar pendiente-de-seguimiento.
|
|
66
|
+
* Tracked separately from cancellations (which are client-initiated) and
|
|
67
|
+
* excluded from compliance scoring.
|
|
68
|
+
*/
|
|
69
|
+
export declare const NO_SHOW_COLOR_ID = "7";
|
|
61
70
|
/**
|
|
62
71
|
* colorIds reserved for special events (NOT patient appointments).
|
|
63
72
|
*
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* runs remain reproducible.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.HVP_EVENT_PROP_KEYS = exports.KNOWN_BREEDS = exports.PET_AGE_REGEX = exports.SCHEDULER_DATE_FALLBACK_REGEX = exports.SCHEDULER_WITH_DATE_REGEX = exports.SCHEDULER_REGEX = exports.PHONE_REGEX = exports.QVET_ID_REGEX = exports.CANCELLED_TITLE_REGEX = exports.REMINDER_TITLE_REGEX = exports.PREFERRED_VET_REGEX = exports.EXCLUDED_TITLE_PREFIXES = exports.SERVICE_CODE_SYNONYMS = exports.CANONICAL_SERVICE_CODES = exports.EXCLUDED_COLOR_IDS = exports.CANCELLED_COLOR_ID = exports.COLOR_ID_TO_BRANCH = exports.BRANCH_COLOR_IDS = exports.STANDARD_V1 = exports.STANDARD_V3 = exports.STANDARD_V2 = void 0;
|
|
16
|
+
exports.HVP_EVENT_PROP_KEYS = exports.KNOWN_BREEDS = exports.PET_AGE_REGEX = exports.SCHEDULER_DATE_FALLBACK_REGEX = exports.SCHEDULER_WITH_DATE_REGEX = exports.SCHEDULER_REGEX = exports.PHONE_REGEX = exports.QVET_ID_REGEX = exports.CANCELLED_TITLE_REGEX = exports.REMINDER_TITLE_REGEX = exports.PREFERRED_VET_REGEX = exports.EXCLUDED_TITLE_PREFIXES = exports.SERVICE_CODE_SYNONYMS = exports.CANONICAL_SERVICE_CODES = exports.EXCLUDED_COLOR_IDS = exports.NO_SHOW_COLOR_ID = exports.CANCELLED_COLOR_ID = exports.COLOR_ID_TO_BRANCH = exports.BRANCH_COLOR_IDS = exports.STANDARD_V1 = exports.STANDARD_V3 = exports.STANDARD_V2 = void 0;
|
|
17
17
|
// ─── Standard v1 ─────────────────────────────────────────────────────────────
|
|
18
18
|
/**
|
|
19
19
|
* Multi-factor appointment standard v2.
|
|
@@ -213,6 +213,15 @@ exports.COLOR_ID_TO_BRANCH = {
|
|
|
213
213
|
// ─── Excluded colorIds ───────────────────────────────────────────────────────
|
|
214
214
|
/** colorId 8 (Graphite) = cancelled. Tracked as a separate metric. */
|
|
215
215
|
exports.CANCELLED_COLOR_ID = "8";
|
|
216
|
+
/**
|
|
217
|
+
* colorId 7 (Peacock cyan) = cliente no llegó (no-show).
|
|
218
|
+
*
|
|
219
|
+
* Convention: when a client doesn't show up to their appointment, recepción
|
|
220
|
+
* repinta el evento con este color para señalar pendiente-de-seguimiento.
|
|
221
|
+
* Tracked separately from cancellations (which are client-initiated) and
|
|
222
|
+
* excluded from compliance scoring.
|
|
223
|
+
*/
|
|
224
|
+
exports.NO_SHOW_COLOR_ID = "7";
|
|
216
225
|
/**
|
|
217
226
|
* colorIds reserved for special events (NOT patient appointments).
|
|
218
227
|
*
|
|
@@ -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
|
+
}
|
|
@@ -53,7 +53,7 @@ export interface DiagnosticDimensionResult {
|
|
|
53
53
|
/**
|
|
54
54
|
* Reason an event was excluded from scoring.
|
|
55
55
|
*/
|
|
56
|
-
export type DiagnosticExclusionReason = 'cancelled' | 'blocker' | 'special' | 'operational' | 'interview' | 'reminder';
|
|
56
|
+
export type DiagnosticExclusionReason = 'cancelled' | 'blocker' | 'special' | 'operational' | 'interview' | 'reminder' | 'no_show';
|
|
57
57
|
/**
|
|
58
58
|
* Full diagnostic result for one event.
|
|
59
59
|
*/
|
|
@@ -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
|
+
}
|