hvp-shared 13.6.0 → 13.7.1
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.
|
@@ -398,7 +398,7 @@ exports.PHONE_REGEX = /(?:\+?52\s?1?\s?)?(?:\d{3}[\s-]?\d{3}[\s-]?\d{4}|\d{10})/
|
|
|
398
398
|
* "AGENDADA POR SLR 02/12/25"
|
|
399
399
|
* "AGENDADO POR SLR 02/12/25"
|
|
400
400
|
*/
|
|
401
|
-
exports.SCHEDULER_REGEX = /\b(?:AG|
|
|
401
|
+
exports.SCHEDULER_REGEX = /\b(?:AG|AGEND[OÓ]|AGENDAD[OA]\s+POR)\s+([A-Z]{2,4})\b/i;
|
|
402
402
|
/**
|
|
403
403
|
* Captures the "agendado por" col_code AND the date annotation that often follows it.
|
|
404
404
|
*
|
|
@@ -407,7 +407,7 @@ exports.SCHEDULER_REGEX = /\b(?:AG|AGENDO|AGENDAD[OA]\s+POR)\s+([A-Z]{2,4})\b/i;
|
|
|
407
407
|
* "AGENDADA POR SLR 02/12/25" → groups: SLR, "02/12/25"
|
|
408
408
|
* "AGENDADO POR SLR" → groups: SLR, undefined
|
|
409
409
|
*/
|
|
410
|
-
exports.SCHEDULER_WITH_DATE_REGEX = /\b(?:AG|
|
|
410
|
+
exports.SCHEDULER_WITH_DATE_REGEX = /\b(?:AG|AGEND[OÓ]|AGENDAD[OA]\s+POR)\s+([A-Z]{2,4})(?:\s+(\d{1,2}[./\-]\d{1,2}(?:[./\-]\d{2,4})?|\d{1,2}\s+(?:ENE|FEB|MAR|ABR|MAY|JUN|JUL|AGO|SEP|OCT|NOV|DIC|ENERO|FEBRERO|MARZO|ABRIL|MAYO|JUNIO|JULIO|AGOSTO|SEPTIEMBRE|OCTUBRE|NOVIEMBRE|DICIEMBRE)))?\b/i;
|
|
411
411
|
// ─── Pet age detection ───────────────────────────────────────────────────────
|
|
412
412
|
/**
|
|
413
413
|
* Captures pet age expressions in Spanish from descriptions.
|
|
@@ -123,6 +123,10 @@ describe("Description regexes", () => {
|
|
|
123
123
|
["AG YMP 14.05.26", "YMP"],
|
|
124
124
|
["AGENDADA POR SLR 02/12/25", "SLR"],
|
|
125
125
|
["AGENDADO POR SCP", "SCP"],
|
|
126
|
+
// Accented variants — Spanish past tense "agendó" with tilde
|
|
127
|
+
["AGENDÓ YMP", "YMP"],
|
|
128
|
+
["agendó ymp", "YMP"],
|
|
129
|
+
["Agendó SLR 16 mayo", "SLR"],
|
|
126
130
|
];
|
|
127
131
|
for (const [text, expected] of cases) {
|
|
128
132
|
const match = text.match(google_calendar_constants_1.SCHEDULER_REGEX);
|
|
@@ -105,6 +105,18 @@ export interface DiagnosticResult {
|
|
|
105
105
|
* like "AGENDO XYZ 16 MAYO" in the description. Null if missing from API.
|
|
106
106
|
*/
|
|
107
107
|
eventCreatedAt: string | null;
|
|
108
|
+
/**
|
|
109
|
+
* Raw event description as it appears in Google Calendar — unprocessed,
|
|
110
|
+
* line-break-preserved. Used by the dashboard's detail view to show what
|
|
111
|
+
* recepción actually typed (vs. the inferred fields). Null if empty.
|
|
112
|
+
*/
|
|
113
|
+
rawDescription: string | null;
|
|
114
|
+
/**
|
|
115
|
+
* Raw GCal colorId — numeric string like "11" (Tomato) or "9" (Blueberry).
|
|
116
|
+
* Used by the dashboard's detail view to disambiguate visually similar
|
|
117
|
+
* tones. Null if event uses the default color.
|
|
118
|
+
*/
|
|
119
|
+
colorId: string | null;
|
|
108
120
|
}
|
|
109
121
|
/**
|
|
110
122
|
* Excluded event — does not have a score.
|