@vitrina/api 14.94.0 → 14.95.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/index.d.cts CHANGED
@@ -77619,6 +77619,7 @@ interface paths {
77619
77619
  tax_treatment?: "afecto" | "exento" | "no_gravado";
77620
77620
  valid_until?: string | null;
77621
77621
  installments?: number | null;
77622
+ installments_first_due?: string | null;
77622
77623
  notes?: string | null;
77623
77624
  items?: {
77624
77625
  /** Format: uuid */
@@ -78613,6 +78614,7 @@ interface paths {
78613
78614
  tax_treatment?: "afecto" | "exento" | "no_gravado";
78614
78615
  valid_until?: string | null;
78615
78616
  installments?: number | null;
78617
+ installments_first_due?: string | null;
78616
78618
  notes?: string | null;
78617
78619
  };
78618
78620
  };
@@ -98150,6 +98152,111 @@ interface paths {
98150
98152
  patch?: never;
98151
98153
  trace?: never;
98152
98154
  };
98155
+ "/clinic/appointments/{id}/attend": {
98156
+ parameters: {
98157
+ query?: never;
98158
+ header?: never;
98159
+ path?: never;
98160
+ cookie?: never;
98161
+ };
98162
+ get?: never;
98163
+ put?: never;
98164
+ /**
98165
+ * «Atender»: open the cita's atención and move it into the box
98166
+ * @description One call from a cita to its clinical record. Resolves the cita's patient (its own ficha, else the contact's), opens the atención LINKED to the cita — IDEMPOTENT: a second call returns the same atención — with the cita's professional, sede and hour, and moves the sala de espera to `in_room` when the patient is still scheduled or waiting and the caller holds `clinic:write`. Answers `{ encounter, clinic_patient_id, contact_id, arrival_state }`. Requires `clinic_record:write` AND the per-patient PHI gate; refuses a bloqueo, a cancelled or no-show cita, and a cita with no ficha. Every call writes a `clinic_record_access_log` row; a call that cannot write its access event fails.
98167
+ *
98168
+ * **Connected apps:** refused with `403 CONNECTED_APP_SENSITIVE_DATA`, whatever scopes they hold — this operation carries a dato sensible (ADR 0106 §4). Only an API key or a personal token of the workspace that holds the scope reaches it.
98169
+ */
98170
+ post: {
98171
+ parameters: {
98172
+ query?: never;
98173
+ header?: {
98174
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
98175
+ "Idempotency-Key"?: string;
98176
+ };
98177
+ path: {
98178
+ id: string;
98179
+ };
98180
+ cookie?: never;
98181
+ };
98182
+ requestBody?: never;
98183
+ responses: {
98184
+ /** @description Attended cita */
98185
+ 200: {
98186
+ headers: {
98187
+ [name: string]: unknown;
98188
+ };
98189
+ content: {
98190
+ "application/json": {
98191
+ data?: unknown;
98192
+ meta?: {
98193
+ [key: string]: unknown;
98194
+ };
98195
+ };
98196
+ };
98197
+ };
98198
+ /** @description Validation error */
98199
+ 400: {
98200
+ headers: {
98201
+ [name: string]: unknown;
98202
+ };
98203
+ content: {
98204
+ "application/json": components["schemas"]["Error"];
98205
+ };
98206
+ };
98207
+ /** @description Unauthorized */
98208
+ 401: {
98209
+ headers: {
98210
+ [name: string]: unknown;
98211
+ };
98212
+ content: {
98213
+ "application/json": components["schemas"]["Error"];
98214
+ };
98215
+ };
98216
+ /** @description Forbidden */
98217
+ 403: {
98218
+ headers: {
98219
+ [name: string]: unknown;
98220
+ };
98221
+ content: {
98222
+ "application/json": components["schemas"]["Error"];
98223
+ };
98224
+ };
98225
+ /** @description Not found */
98226
+ 404: {
98227
+ headers: {
98228
+ [name: string]: unknown;
98229
+ };
98230
+ content: {
98231
+ "application/json": components["schemas"]["Error"];
98232
+ };
98233
+ };
98234
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
98235
+ 409: {
98236
+ headers: {
98237
+ [name: string]: unknown;
98238
+ };
98239
+ content: {
98240
+ "application/json": components["schemas"]["Error"];
98241
+ };
98242
+ };
98243
+ /** @description Rate limited */
98244
+ 429: {
98245
+ headers: {
98246
+ [name: string]: unknown;
98247
+ };
98248
+ content: {
98249
+ "application/json": components["schemas"]["Error"];
98250
+ };
98251
+ };
98252
+ };
98253
+ };
98254
+ delete?: never;
98255
+ options?: never;
98256
+ head?: never;
98257
+ patch?: never;
98258
+ trace?: never;
98259
+ };
98153
98260
  "/clinic/encounters/{id}": {
98154
98261
  parameters: {
98155
98262
  query?: never;
@@ -135088,7 +135195,7 @@ interface paths {
135088
135195
  };
135089
135196
  /**
135090
135197
  * Get the Recontacto cadence configuration
135091
- * @description Situations are code (`never_replied`, `stalled`, `lost`, plus the seen-without-reply nudge); everything inside one is editable. A rung waits `after_hours` since the PREVIOUS rung (rung 1: since the silence) and rides one of `whatsapp | instagram | email | voice`; `unit` is the editor’s display preference and the engine never reads it. There is no per-lead cap — the rails are the cap; `daily_cap` is the volume control. `max_evaluations_per_step` bounds how many times a rung may be reconsidered without contacting anyone.
135198
+ * @description Situations are code (`never_replied`, `stalled`, `lost`, plus the seen-without-reply nudge); everything inside one is editable. A rung waits `after_hours` since the PREVIOUS rung (rung 1: since the silence) and rides one of `whatsapp | instagram | email | voice`; `unit` is the editor’s display preference and the engine never reads it. There is no per-lead cap — the rails are the cap; `daily_cap` is the volume control. `max_evaluations_per_step` bounds how many times a rung may be reconsidered without contacting anyone. `pacing` is «Ritmo» (every pacing rule, off by default except `entry_max_silence_days` 45 and `max_paths_per_lead` 3): `min_gap_hours` (R2), `max_per_day` (R5), `pause_after_unanswered_days` (R1), `approval_after_silence_days` (R9), `approval_fallback_hours` (R11), `entry_max_silence_days` (R10), `hot_leads_faster` (R6), `max_paths_per_lead` (R12). `unanswered_message.template_after_window` is R7 (on). `min_hours_between_touches` is an alias of `pacing.min_gap_hours`.
135092
135199
  */
135093
135200
  get: {
135094
135201
  parameters: {
@@ -135177,7 +135284,18 @@ interface paths {
135177
135284
  * "after_hours": 6
135178
135285
  * }
135179
135286
  * ],
135180
- * "conversation_lifetime_cap": 6
135287
+ * "conversation_lifetime_cap": 6,
135288
+ * "template_after_window": true
135289
+ * },
135290
+ * "pacing": {
135291
+ * "min_gap_hours": null,
135292
+ * "max_per_day": null,
135293
+ * "pause_after_unanswered_days": null,
135294
+ * "approval_after_silence_days": null,
135295
+ * "approval_fallback_hours": null,
135296
+ * "entry_max_silence_days": 45,
135297
+ * "hot_leads_faster": false,
135298
+ * "max_paths_per_lead": 3
135181
135299
  * },
135182
135300
  * "last_run_at": null
135183
135301
  * }
@@ -135249,7 +135367,7 @@ interface paths {
135249
135367
  };
135250
135368
  /**
135251
135369
  * Update the Recontacto cadence configuration
135252
- * @description Partial patch. Enabling the engine — or giving any rung a self-sending autonomy — additionally requires `campaigns:write`, because the next sweep then originates real messages with no per-attempt approval.
135370
+ * @description Partial patch. A patch that LOOSENS outbound additionally requires `campaigns:write`: enabling Recontacto or the chat rail; any step set to `auto` or `assignee`; setting `pacing.approval_fallback_hours`; clearing or raising `pacing.max_per_day`, `pacing.min_gap_hours` (or `min_hours_between_touches`), `pacing.pause_after_unanswered_days` or `pacing.approval_after_silence_days`; raising `pacing.max_paths_per_lead` or `pacing.entry_max_silence_days`; turning `unanswered_message.template_after_window` or `pacing.hot_leads_faster` on. Tightening needs only `followups:write`. `min_hours_between_touches` and `pacing.min_gap_hours` are one setting; `pacing.min_gap_hours` wins when both are sent.
135253
135371
  */
135254
135372
  put: {
135255
135373
  parameters: {
@@ -135263,7 +135381,10 @@ interface paths {
135263
135381
  /**
135264
135382
  * @example {
135265
135383
  * "daily_cap": 100,
135266
- * "min_hours_between_touches": 24
135384
+ * "pacing": {
135385
+ * "min_gap_hours": 24,
135386
+ * "max_per_day": 1
135387
+ * }
135267
135388
  * }
135268
135389
  */
135269
135390
  "application/json": {
@@ -135326,8 +135447,16 @@ interface paths {
135326
135447
  after_hours: number;
135327
135448
  }[];
135328
135449
  conversation_lifetime_cap?: number;
135450
+ template_after_window?: boolean;
135329
135451
  };
135330
135452
  pacing?: {
135453
+ min_gap_hours?: number | null;
135454
+ max_per_day?: number | null;
135455
+ pause_after_unanswered_days?: number | null;
135456
+ approval_after_silence_days?: number | null;
135457
+ approval_fallback_hours?: number | null;
135458
+ entry_max_silence_days?: number;
135459
+ hot_leads_faster?: boolean;
135331
135460
  max_paths_per_lead?: number;
135332
135461
  };
135333
135462
  };
@@ -135412,7 +135541,18 @@ interface paths {
135412
135541
  * "after_hours": 6
135413
135542
  * }
135414
135543
  * ],
135415
- * "conversation_lifetime_cap": 6
135544
+ * "conversation_lifetime_cap": 6,
135545
+ * "template_after_window": true
135546
+ * },
135547
+ * "pacing": {
135548
+ * "min_gap_hours": 24,
135549
+ * "max_per_day": 1,
135550
+ * "pause_after_unanswered_days": null,
135551
+ * "approval_after_silence_days": null,
135552
+ * "approval_fallback_hours": null,
135553
+ * "entry_max_silence_days": 45,
135554
+ * "hot_leads_faster": false,
135555
+ * "max_paths_per_lead": 3
135416
135556
  * },
135417
135557
  * "last_run_at": null
135418
135558
  * }
@@ -135498,7 +135638,7 @@ interface paths {
135498
135638
  };
135499
135639
  /**
135500
135640
  * Preview today’s Recontacto sweep (dry run)
135501
- * @description The sweep’s selection with every side effect removed: same query, same decision function, same ordering under the daily cap. `truncated` says whether `evaluated` is the query ceiling rather than the whole base.
135641
+ * @description The sweep’s selection with every side effect removed: same query, same decision function, same ordering under the daily cap. `truncated` says whether `evaluated` is the query ceiling rather than the whole base. `today.would_need_approval` of `today.due` is the R8 status line: of the steps due now, how many a person handles, i.e. would go to approval under «Automático salvo asignado».
135502
135642
  */
135503
135643
  get: {
135504
135644
  parameters: {
@@ -135548,6 +135688,10 @@ interface paths {
135548
135688
  * "enabled": false,
135549
135689
  * "evaluated": 0,
135550
135690
  * "candidates": []
135691
+ * },
135692
+ * "today": {
135693
+ * "would_need_approval": 0,
135694
+ * "due": 1
135551
135695
  * }
135552
135696
  * }
135553
135697
  * }
@@ -135790,7 +135934,7 @@ interface paths {
135790
135934
  };
135791
135935
  /**
135792
135936
  * What a customer who stops answering receives (simulated)
135793
- * @description The «Si no responde» ladder, computed by the engine itself: a synthetic lead is stepped along the sweeps’ clocks (hourly for the lead rails, every 15 minutes for the chat rows, only inside contact hours) through the real decision function and pacing holds, so every row’s `at` is when the engine would actually send it. `scenarios` holds `conversed` («Conversó y dejó de responder»: chat rows, then the WhatsApp/email/call rows, both counted from t0), `never_replied` («Nunca respondió nuestro primer mensaje»: t0 is our first message; the lost rail is never reached) and `lost` («Ya está perdido», counted from the loss); `?scenario=` returns just one. `start` is t0 (default now); `start_options` are the example clock’s picks. A moved row carries `deferred_code` (`outside_contact_hours`, `previous_late`, `unanswered_hold`, `min_gap`, `automated_gap`) with its sentence; a drawn step the engine never sends has `sends: false` and `not_sent_reason`. Also: `header_sentence`, each scenario’s hero `sentence`, `pacing_summary` and `pacing` (every live pacing rule with its value), `guards` from the registry (G21 `highlight` when a sweep hit its candidate ceiling in the last 24 h), `approval_fallback.available` (false for a clinic whose clinical response times are undeclared), `today` (sent, not sent, went to approval, awaiting approval) and `queue` (each queued backlog step’s estimated release day, 10 per tenant per day; `contact_id` or `lead_id` narrows it). All copy is in `lang` (default the workspace’s).
135937
+ * @description The «Si no responde» ladder, computed by the engine itself: a synthetic lead is stepped along the sweeps’ clocks (hourly for the lead rails, every 15 minutes for the chat rows, only inside contact hours) through the real decision function and pacing holds, so every row’s `at` is when the engine would actually send it. `scenarios` holds `conversed` («Conversó y dejó de responder»: chat rows, then the WhatsApp/email/call rows, both counted from t0), `never_replied` («Nunca respondió nuestro primer mensaje»: t0 is our first message; the lost rail is never reached) and `lost` («Ya está perdido», counted from the loss); `?scenario=` returns just one. `start` is t0 (default now); `start_options` are the example clock’s picks. A moved row carries `deferred_code` (`outside_contact_hours`, `previous_late`, `unanswered_hold`, `min_gap`, `max_per_day`, `automated_gap`) with its sentence, and `hot_at` when R6 moves it for a hot lead; a drawn step the engine never sends has `sends: false` and `not_sent_reason`. Also: `header_sentence`, each scenario’s hero `sentence`, `pacing_summary` (the collapsed «Ritmo» line: the rules that are on) and `pacing` (every «Ritmo» rule R1–R12 with `on` and `value`), `limits_sentence` (every bound on what one person can receive, with the workspace values), row `warnings` for the editor (a first contact under 12 h, approval rows’ real send rate, Instagram past 24 h), `guards` from the registry (G21 `highlight` when a sweep hit its candidate ceiling in the last 24 h), `approval_fallback.available` (false for a clinic whose clinical response times are undeclared; `hours` is R11), `today` (sent, not sent, went to approval, awaiting approval, and the R8 counter `would_need_approval` of `due`) and `queue` (each queued backlog step’s estimated release day, 10 per tenant per day; `contact_id` or `lead_id` narrows it). All copy is in `lang` (default the workspace’s).
135794
135938
  */
135795
135939
  get: {
135796
135940
  parameters: {
@@ -135866,6 +136010,8 @@ interface paths {
135866
136010
  * "autonomy_reason": null,
135867
136011
  * "needs_template": false,
135868
136012
  * "warnings": [],
136013
+ * "hot_at": null,
136014
+ * "hot_at_label": null,
135869
136015
  * "gap_label": "5 horas después del anterior"
135870
136016
  * },
135871
136017
  * {
@@ -135902,9 +136048,29 @@ interface paths {
135902
136048
  * {
135903
136049
  * "rule": "R12",
135904
136050
  * "on": true,
136051
+ * "value": 3,
135905
136052
  * "text": "hasta 3 caminos por persona cada 90 días"
136053
+ * },
136054
+ * {
136055
+ * "rule": "R10",
136056
+ * "on": true,
136057
+ * "value": 45,
136058
+ * "text": "no empezamos con silencios de más de 45 días"
136059
+ * },
136060
+ * {
136061
+ * "rule": "R7",
136062
+ * "on": true,
136063
+ * "value": null,
136064
+ * "text": "después de 24 horas, plantilla aprobada"
136065
+ * },
136066
+ * {
136067
+ * "rule": "R1",
136068
+ * "on": false,
136069
+ * "value": null,
136070
+ * "text": "si no responde a un seguimiento, los otros caminos esperan — días"
135906
136071
  * }
135907
136072
  * ],
136073
+ * "limits_sentence": "Nunca son infinitos: cada camino termina (dejó de responder: 2 mensajes, perdido a los 7 días; nunca respondió: 2 mensajes, perdido a los 7 días; ya perdido: 1 más y fin), como máximo 3 caminos por persona cada 90 días, 4 recordatorios en el chat por conversación, hasta 200 revisiones al día en total y nunca dos mensajes automáticos a la misma persona con menos de 1 hora.",
135908
136074
  * "guards_summary": "Siempre se respeta · horario 09:00–21:00, no contactar, ventana de WhatsApp y 15 reglas más",
135909
136075
  * "guards": [
135910
136076
  * {
@@ -135920,14 +136086,17 @@ interface paths {
135920
136086
  * ],
135921
136087
  * "approval_fallback": {
135922
136088
  * "available": true,
135923
- * "reason": null
136089
+ * "reason": null,
136090
+ * "hours": null
135924
136091
  * },
135925
136092
  * "today": {
135926
136093
  * "since": "2026-10-21T03:00:00.000Z",
135927
136094
  * "sent": 66,
135928
136095
  * "not_sent": 31,
135929
136096
  * "went_to_approval": 0,
135930
- * "awaiting_approval": 0
136097
+ * "awaiting_approval": 0,
136098
+ * "would_need_approval": 9,
136099
+ * "due": 31
135931
136100
  * },
135932
136101
  * "queue": {
135933
136102
  * "per_day": 10,
package/dist/index.d.ts CHANGED
@@ -77619,6 +77619,7 @@ interface paths {
77619
77619
  tax_treatment?: "afecto" | "exento" | "no_gravado";
77620
77620
  valid_until?: string | null;
77621
77621
  installments?: number | null;
77622
+ installments_first_due?: string | null;
77622
77623
  notes?: string | null;
77623
77624
  items?: {
77624
77625
  /** Format: uuid */
@@ -78613,6 +78614,7 @@ interface paths {
78613
78614
  tax_treatment?: "afecto" | "exento" | "no_gravado";
78614
78615
  valid_until?: string | null;
78615
78616
  installments?: number | null;
78617
+ installments_first_due?: string | null;
78616
78618
  notes?: string | null;
78617
78619
  };
78618
78620
  };
@@ -98150,6 +98152,111 @@ interface paths {
98150
98152
  patch?: never;
98151
98153
  trace?: never;
98152
98154
  };
98155
+ "/clinic/appointments/{id}/attend": {
98156
+ parameters: {
98157
+ query?: never;
98158
+ header?: never;
98159
+ path?: never;
98160
+ cookie?: never;
98161
+ };
98162
+ get?: never;
98163
+ put?: never;
98164
+ /**
98165
+ * «Atender»: open the cita's atención and move it into the box
98166
+ * @description One call from a cita to its clinical record. Resolves the cita's patient (its own ficha, else the contact's), opens the atención LINKED to the cita — IDEMPOTENT: a second call returns the same atención — with the cita's professional, sede and hour, and moves the sala de espera to `in_room` when the patient is still scheduled or waiting and the caller holds `clinic:write`. Answers `{ encounter, clinic_patient_id, contact_id, arrival_state }`. Requires `clinic_record:write` AND the per-patient PHI gate; refuses a bloqueo, a cancelled or no-show cita, and a cita with no ficha. Every call writes a `clinic_record_access_log` row; a call that cannot write its access event fails.
98167
+ *
98168
+ * **Connected apps:** refused with `403 CONNECTED_APP_SENSITIVE_DATA`, whatever scopes they hold — this operation carries a dato sensible (ADR 0106 §4). Only an API key or a personal token of the workspace that holds the scope reaches it.
98169
+ */
98170
+ post: {
98171
+ parameters: {
98172
+ query?: never;
98173
+ header?: {
98174
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
98175
+ "Idempotency-Key"?: string;
98176
+ };
98177
+ path: {
98178
+ id: string;
98179
+ };
98180
+ cookie?: never;
98181
+ };
98182
+ requestBody?: never;
98183
+ responses: {
98184
+ /** @description Attended cita */
98185
+ 200: {
98186
+ headers: {
98187
+ [name: string]: unknown;
98188
+ };
98189
+ content: {
98190
+ "application/json": {
98191
+ data?: unknown;
98192
+ meta?: {
98193
+ [key: string]: unknown;
98194
+ };
98195
+ };
98196
+ };
98197
+ };
98198
+ /** @description Validation error */
98199
+ 400: {
98200
+ headers: {
98201
+ [name: string]: unknown;
98202
+ };
98203
+ content: {
98204
+ "application/json": components["schemas"]["Error"];
98205
+ };
98206
+ };
98207
+ /** @description Unauthorized */
98208
+ 401: {
98209
+ headers: {
98210
+ [name: string]: unknown;
98211
+ };
98212
+ content: {
98213
+ "application/json": components["schemas"]["Error"];
98214
+ };
98215
+ };
98216
+ /** @description Forbidden */
98217
+ 403: {
98218
+ headers: {
98219
+ [name: string]: unknown;
98220
+ };
98221
+ content: {
98222
+ "application/json": components["schemas"]["Error"];
98223
+ };
98224
+ };
98225
+ /** @description Not found */
98226
+ 404: {
98227
+ headers: {
98228
+ [name: string]: unknown;
98229
+ };
98230
+ content: {
98231
+ "application/json": components["schemas"]["Error"];
98232
+ };
98233
+ };
98234
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
98235
+ 409: {
98236
+ headers: {
98237
+ [name: string]: unknown;
98238
+ };
98239
+ content: {
98240
+ "application/json": components["schemas"]["Error"];
98241
+ };
98242
+ };
98243
+ /** @description Rate limited */
98244
+ 429: {
98245
+ headers: {
98246
+ [name: string]: unknown;
98247
+ };
98248
+ content: {
98249
+ "application/json": components["schemas"]["Error"];
98250
+ };
98251
+ };
98252
+ };
98253
+ };
98254
+ delete?: never;
98255
+ options?: never;
98256
+ head?: never;
98257
+ patch?: never;
98258
+ trace?: never;
98259
+ };
98153
98260
  "/clinic/encounters/{id}": {
98154
98261
  parameters: {
98155
98262
  query?: never;
@@ -135088,7 +135195,7 @@ interface paths {
135088
135195
  };
135089
135196
  /**
135090
135197
  * Get the Recontacto cadence configuration
135091
- * @description Situations are code (`never_replied`, `stalled`, `lost`, plus the seen-without-reply nudge); everything inside one is editable. A rung waits `after_hours` since the PREVIOUS rung (rung 1: since the silence) and rides one of `whatsapp | instagram | email | voice`; `unit` is the editor’s display preference and the engine never reads it. There is no per-lead cap — the rails are the cap; `daily_cap` is the volume control. `max_evaluations_per_step` bounds how many times a rung may be reconsidered without contacting anyone.
135198
+ * @description Situations are code (`never_replied`, `stalled`, `lost`, plus the seen-without-reply nudge); everything inside one is editable. A rung waits `after_hours` since the PREVIOUS rung (rung 1: since the silence) and rides one of `whatsapp | instagram | email | voice`; `unit` is the editor’s display preference and the engine never reads it. There is no per-lead cap — the rails are the cap; `daily_cap` is the volume control. `max_evaluations_per_step` bounds how many times a rung may be reconsidered without contacting anyone. `pacing` is «Ritmo» (every pacing rule, off by default except `entry_max_silence_days` 45 and `max_paths_per_lead` 3): `min_gap_hours` (R2), `max_per_day` (R5), `pause_after_unanswered_days` (R1), `approval_after_silence_days` (R9), `approval_fallback_hours` (R11), `entry_max_silence_days` (R10), `hot_leads_faster` (R6), `max_paths_per_lead` (R12). `unanswered_message.template_after_window` is R7 (on). `min_hours_between_touches` is an alias of `pacing.min_gap_hours`.
135092
135199
  */
135093
135200
  get: {
135094
135201
  parameters: {
@@ -135177,7 +135284,18 @@ interface paths {
135177
135284
  * "after_hours": 6
135178
135285
  * }
135179
135286
  * ],
135180
- * "conversation_lifetime_cap": 6
135287
+ * "conversation_lifetime_cap": 6,
135288
+ * "template_after_window": true
135289
+ * },
135290
+ * "pacing": {
135291
+ * "min_gap_hours": null,
135292
+ * "max_per_day": null,
135293
+ * "pause_after_unanswered_days": null,
135294
+ * "approval_after_silence_days": null,
135295
+ * "approval_fallback_hours": null,
135296
+ * "entry_max_silence_days": 45,
135297
+ * "hot_leads_faster": false,
135298
+ * "max_paths_per_lead": 3
135181
135299
  * },
135182
135300
  * "last_run_at": null
135183
135301
  * }
@@ -135249,7 +135367,7 @@ interface paths {
135249
135367
  };
135250
135368
  /**
135251
135369
  * Update the Recontacto cadence configuration
135252
- * @description Partial patch. Enabling the engine — or giving any rung a self-sending autonomy — additionally requires `campaigns:write`, because the next sweep then originates real messages with no per-attempt approval.
135370
+ * @description Partial patch. A patch that LOOSENS outbound additionally requires `campaigns:write`: enabling Recontacto or the chat rail; any step set to `auto` or `assignee`; setting `pacing.approval_fallback_hours`; clearing or raising `pacing.max_per_day`, `pacing.min_gap_hours` (or `min_hours_between_touches`), `pacing.pause_after_unanswered_days` or `pacing.approval_after_silence_days`; raising `pacing.max_paths_per_lead` or `pacing.entry_max_silence_days`; turning `unanswered_message.template_after_window` or `pacing.hot_leads_faster` on. Tightening needs only `followups:write`. `min_hours_between_touches` and `pacing.min_gap_hours` are one setting; `pacing.min_gap_hours` wins when both are sent.
135253
135371
  */
135254
135372
  put: {
135255
135373
  parameters: {
@@ -135263,7 +135381,10 @@ interface paths {
135263
135381
  /**
135264
135382
  * @example {
135265
135383
  * "daily_cap": 100,
135266
- * "min_hours_between_touches": 24
135384
+ * "pacing": {
135385
+ * "min_gap_hours": 24,
135386
+ * "max_per_day": 1
135387
+ * }
135267
135388
  * }
135268
135389
  */
135269
135390
  "application/json": {
@@ -135326,8 +135447,16 @@ interface paths {
135326
135447
  after_hours: number;
135327
135448
  }[];
135328
135449
  conversation_lifetime_cap?: number;
135450
+ template_after_window?: boolean;
135329
135451
  };
135330
135452
  pacing?: {
135453
+ min_gap_hours?: number | null;
135454
+ max_per_day?: number | null;
135455
+ pause_after_unanswered_days?: number | null;
135456
+ approval_after_silence_days?: number | null;
135457
+ approval_fallback_hours?: number | null;
135458
+ entry_max_silence_days?: number;
135459
+ hot_leads_faster?: boolean;
135331
135460
  max_paths_per_lead?: number;
135332
135461
  };
135333
135462
  };
@@ -135412,7 +135541,18 @@ interface paths {
135412
135541
  * "after_hours": 6
135413
135542
  * }
135414
135543
  * ],
135415
- * "conversation_lifetime_cap": 6
135544
+ * "conversation_lifetime_cap": 6,
135545
+ * "template_after_window": true
135546
+ * },
135547
+ * "pacing": {
135548
+ * "min_gap_hours": 24,
135549
+ * "max_per_day": 1,
135550
+ * "pause_after_unanswered_days": null,
135551
+ * "approval_after_silence_days": null,
135552
+ * "approval_fallback_hours": null,
135553
+ * "entry_max_silence_days": 45,
135554
+ * "hot_leads_faster": false,
135555
+ * "max_paths_per_lead": 3
135416
135556
  * },
135417
135557
  * "last_run_at": null
135418
135558
  * }
@@ -135498,7 +135638,7 @@ interface paths {
135498
135638
  };
135499
135639
  /**
135500
135640
  * Preview today’s Recontacto sweep (dry run)
135501
- * @description The sweep’s selection with every side effect removed: same query, same decision function, same ordering under the daily cap. `truncated` says whether `evaluated` is the query ceiling rather than the whole base.
135641
+ * @description The sweep’s selection with every side effect removed: same query, same decision function, same ordering under the daily cap. `truncated` says whether `evaluated` is the query ceiling rather than the whole base. `today.would_need_approval` of `today.due` is the R8 status line: of the steps due now, how many a person handles, i.e. would go to approval under «Automático salvo asignado».
135502
135642
  */
135503
135643
  get: {
135504
135644
  parameters: {
@@ -135548,6 +135688,10 @@ interface paths {
135548
135688
  * "enabled": false,
135549
135689
  * "evaluated": 0,
135550
135690
  * "candidates": []
135691
+ * },
135692
+ * "today": {
135693
+ * "would_need_approval": 0,
135694
+ * "due": 1
135551
135695
  * }
135552
135696
  * }
135553
135697
  * }
@@ -135790,7 +135934,7 @@ interface paths {
135790
135934
  };
135791
135935
  /**
135792
135936
  * What a customer who stops answering receives (simulated)
135793
- * @description The «Si no responde» ladder, computed by the engine itself: a synthetic lead is stepped along the sweeps’ clocks (hourly for the lead rails, every 15 minutes for the chat rows, only inside contact hours) through the real decision function and pacing holds, so every row’s `at` is when the engine would actually send it. `scenarios` holds `conversed` («Conversó y dejó de responder»: chat rows, then the WhatsApp/email/call rows, both counted from t0), `never_replied` («Nunca respondió nuestro primer mensaje»: t0 is our first message; the lost rail is never reached) and `lost` («Ya está perdido», counted from the loss); `?scenario=` returns just one. `start` is t0 (default now); `start_options` are the example clock’s picks. A moved row carries `deferred_code` (`outside_contact_hours`, `previous_late`, `unanswered_hold`, `min_gap`, `automated_gap`) with its sentence; a drawn step the engine never sends has `sends: false` and `not_sent_reason`. Also: `header_sentence`, each scenario’s hero `sentence`, `pacing_summary` and `pacing` (every live pacing rule with its value), `guards` from the registry (G21 `highlight` when a sweep hit its candidate ceiling in the last 24 h), `approval_fallback.available` (false for a clinic whose clinical response times are undeclared), `today` (sent, not sent, went to approval, awaiting approval) and `queue` (each queued backlog step’s estimated release day, 10 per tenant per day; `contact_id` or `lead_id` narrows it). All copy is in `lang` (default the workspace’s).
135937
+ * @description The «Si no responde» ladder, computed by the engine itself: a synthetic lead is stepped along the sweeps’ clocks (hourly for the lead rails, every 15 minutes for the chat rows, only inside contact hours) through the real decision function and pacing holds, so every row’s `at` is when the engine would actually send it. `scenarios` holds `conversed` («Conversó y dejó de responder»: chat rows, then the WhatsApp/email/call rows, both counted from t0), `never_replied` («Nunca respondió nuestro primer mensaje»: t0 is our first message; the lost rail is never reached) and `lost` («Ya está perdido», counted from the loss); `?scenario=` returns just one. `start` is t0 (default now); `start_options` are the example clock’s picks. A moved row carries `deferred_code` (`outside_contact_hours`, `previous_late`, `unanswered_hold`, `min_gap`, `max_per_day`, `automated_gap`) with its sentence, and `hot_at` when R6 moves it for a hot lead; a drawn step the engine never sends has `sends: false` and `not_sent_reason`. Also: `header_sentence`, each scenario’s hero `sentence`, `pacing_summary` (the collapsed «Ritmo» line: the rules that are on) and `pacing` (every «Ritmo» rule R1–R12 with `on` and `value`), `limits_sentence` (every bound on what one person can receive, with the workspace values), row `warnings` for the editor (a first contact under 12 h, approval rows’ real send rate, Instagram past 24 h), `guards` from the registry (G21 `highlight` when a sweep hit its candidate ceiling in the last 24 h), `approval_fallback.available` (false for a clinic whose clinical response times are undeclared; `hours` is R11), `today` (sent, not sent, went to approval, awaiting approval, and the R8 counter `would_need_approval` of `due`) and `queue` (each queued backlog step’s estimated release day, 10 per tenant per day; `contact_id` or `lead_id` narrows it). All copy is in `lang` (default the workspace’s).
135794
135938
  */
135795
135939
  get: {
135796
135940
  parameters: {
@@ -135866,6 +136010,8 @@ interface paths {
135866
136010
  * "autonomy_reason": null,
135867
136011
  * "needs_template": false,
135868
136012
  * "warnings": [],
136013
+ * "hot_at": null,
136014
+ * "hot_at_label": null,
135869
136015
  * "gap_label": "5 horas después del anterior"
135870
136016
  * },
135871
136017
  * {
@@ -135902,9 +136048,29 @@ interface paths {
135902
136048
  * {
135903
136049
  * "rule": "R12",
135904
136050
  * "on": true,
136051
+ * "value": 3,
135905
136052
  * "text": "hasta 3 caminos por persona cada 90 días"
136053
+ * },
136054
+ * {
136055
+ * "rule": "R10",
136056
+ * "on": true,
136057
+ * "value": 45,
136058
+ * "text": "no empezamos con silencios de más de 45 días"
136059
+ * },
136060
+ * {
136061
+ * "rule": "R7",
136062
+ * "on": true,
136063
+ * "value": null,
136064
+ * "text": "después de 24 horas, plantilla aprobada"
136065
+ * },
136066
+ * {
136067
+ * "rule": "R1",
136068
+ * "on": false,
136069
+ * "value": null,
136070
+ * "text": "si no responde a un seguimiento, los otros caminos esperan — días"
135906
136071
  * }
135907
136072
  * ],
136073
+ * "limits_sentence": "Nunca son infinitos: cada camino termina (dejó de responder: 2 mensajes, perdido a los 7 días; nunca respondió: 2 mensajes, perdido a los 7 días; ya perdido: 1 más y fin), como máximo 3 caminos por persona cada 90 días, 4 recordatorios en el chat por conversación, hasta 200 revisiones al día en total y nunca dos mensajes automáticos a la misma persona con menos de 1 hora.",
135908
136074
  * "guards_summary": "Siempre se respeta · horario 09:00–21:00, no contactar, ventana de WhatsApp y 15 reglas más",
135909
136075
  * "guards": [
135910
136076
  * {
@@ -135920,14 +136086,17 @@ interface paths {
135920
136086
  * ],
135921
136087
  * "approval_fallback": {
135922
136088
  * "available": true,
135923
- * "reason": null
136089
+ * "reason": null,
136090
+ * "hours": null
135924
136091
  * },
135925
136092
  * "today": {
135926
136093
  * "since": "2026-10-21T03:00:00.000Z",
135927
136094
  * "sent": 66,
135928
136095
  * "not_sent": 31,
135929
136096
  * "went_to_approval": 0,
135930
- * "awaiting_approval": 0
136097
+ * "awaiting_approval": 0,
136098
+ * "would_need_approval": 9,
136099
+ * "due": 31
135931
136100
  * },
135932
136101
  * "queue": {
135933
136102
  * "per_day": 10,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "14.94.0",
3
+ "version": "14.95.0",
4
4
  "description": "Typed TypeScript SDK for the Vitrina API pública — generated from the committed openapi.public.json (ADR 0106).",
5
5
  "type": "module",
6
6
  "license": "MIT",