@vitrina/api 14.100.5 → 14.101.2

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
@@ -22265,7 +22265,7 @@ interface paths {
22265
22265
  };
22266
22266
  /**
22267
22267
  * Buy table for the business’s own quoter (trade-in / buyback)
22268
- * @description What the business pays at most for each used model, so its own website quoter reads the same table the agent quotes from instead of a hardcoded copy. Per model: `top` (flawless, «Impecable»), `used` (normal wear, «Con uso»), `direct_purchase` (`false` = taken only as part of the payment for another item, never bought outright) and `min_battery_pct` (a known battery under it is not bought; `null` = no minimum). Plus `not_bought` (models never bought), `currency` and `perfect_battery_pct` (from this battery health a unit with nothing else wrong counts as flawless). Readable with the storefront’s `stock:read`; the browser twin is `GET /widget/trade-in` with the site’s `pk_` key. `Cache-Control: private, max-age=300` + a strong `ETag` (send `If-None-Match` for a 304). 404 when the workspace keeps no buy table (`PUT /tenant/settings` `trade_in`).
22268
+ * @description What the business pays at most for each used model, so its own website quoter reads the same table the agent quotes from instead of a hardcoded copy. Per model: `top` (flawless, «Impecable»), `used` (normal wear, «Con uso»), `direct_purchase` (`false` = taken only as part of the payment for another item, never bought outright) and `min_battery_pct` (a known battery under it is not bought; `null` = no minimum) and `low_battery_factor` (a known battery under `perfect_battery_pct` caps the price at `used × low_battery_factor`; `null` = `used`). Plus `not_bought` (models never bought), `currency` and `perfect_battery_pct` (from this battery health a unit with nothing else wrong counts as flawless). Readable with the storefront’s `stock:read`; the browser twin is `GET /widget/trade-in` with the site’s `pk_` key. `Cache-Control: private, max-age=300` + a strong `ETag` (send `If-None-Match` for a 304). 404 when the workspace keeps no buy table (`PUT /tenant/settings` `trade_in`).
22269
22269
  */
22270
22270
  get: {
22271
22271
  parameters: {
@@ -22292,14 +22292,16 @@ interface paths {
22292
22292
  * "top": 350000,
22293
22293
  * "used": 320000,
22294
22294
  * "direct_purchase": false,
22295
- * "min_battery_pct": null
22295
+ * "min_battery_pct": null,
22296
+ * "low_battery_factor": null
22296
22297
  * },
22297
22298
  * {
22298
22299
  * "model": "iPhone 16 Pro",
22299
22300
  * "top": 600000,
22300
22301
  * "used": 570000,
22301
22302
  * "direct_purchase": true,
22302
- * "min_battery_pct": 90
22303
+ * "min_battery_pct": null,
22304
+ * "low_battery_factor": 0.85
22303
22305
  * }
22304
22306
  * ],
22305
22307
  * "not_bought": [
@@ -135234,7 +135236,7 @@ interface paths {
135234
135236
  };
135235
135237
  /**
135236
135238
  * Get the Recontacto cadence configuration
135237
- * @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, `max_paths_per_lead` 3 and `max_messages_per_person_90d` 12): `min_gap_hours` (R2), `max_per_day` (R5; a healthcare workspace reads 1 when none is stored, and null keeps 1), `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, per person across all their leads and chat rows), `max_messages_per_person_90d` (R13: unanswered Recontacto messages one person may get in any 90 days, every rail together). `unanswered_message.template_after_window` is R7 (on). `min_hours_between_touches` is an alias of `pacing.min_gap_hours`.
135239
+ * @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, `max_paths_per_lead` 3 and `max_messages_per_person_90d` 12): `min_gap_hours` (R2), `max_per_day` (R5; a healthcare workspace reads 1 when none is stored, and null keeps 1), `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, per person across all their leads and chat rows), `max_messages_per_person_90d` (R13: unanswered Recontacto messages one person may get in any 90 days, every rail together). `unanswered_message.template_after_window` is R7 (on). `min_hours_between_touches` is an alias of `pacing.min_gap_hours`. `after_handoff` is «Después de pasarlo a una persona», for a conversation the AI handed to a person until it is returned to the AI: `followups` `draft_for_owner` (default: each step a draft for whoever handles it), `automatic` or `off`; `auto_send_after_hours` (default 24, null = never) sends an unreviewed draft by itself inside contact hours (a teammate’s promised time wins); `ai_answers_waiting_after_hours` (default 2, null = only the 30-minute reminder) lets the AI answer a customer nobody answered. Only a handoff the AI could have followed up (a missing fact, an unfinished turn) gets drafts or an AI answer; after a complaint, a request for a person or a step only a person can do (pay, receive the device, confirm stock or a price) the AI writes nothing on its own (G50). A person whose lead is in a bottom-funnel stage gets no follow-ups at all (G52).
135238
135240
  */
135239
135241
  get: {
135240
135242
  parameters: {
@@ -135337,6 +135339,11 @@ interface paths {
135337
135339
  * "max_paths_per_lead": 3,
135338
135340
  * "max_messages_per_person_90d": 12
135339
135341
  * },
135342
+ * "after_handoff": {
135343
+ * "followups": "draft_for_owner",
135344
+ * "auto_send_after_hours": 24,
135345
+ * "ai_answers_waiting_after_hours": 2
135346
+ * },
135340
135347
  * "last_run_at": null
135341
135348
  * }
135342
135349
  * }
@@ -135407,7 +135414,7 @@ interface paths {
135407
135414
  };
135408
135415
  /**
135409
135416
  * Update the Recontacto cadence configuration
135410
- * @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`, `pacing.max_messages_per_person_90d` 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.
135417
+ * @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`, `pacing.max_messages_per_person_90d` or `pacing.entry_max_silence_days`; turning `unanswered_message.template_after_window` or `pacing.hot_leads_faster` on; `after_handoff.followups` set to `automatic` (or back to drafts from `off` while they send themselves), or `after_handoff.auto_send_after_hours` / `ai_answers_waiting_after_hours` set where they were off or made shorter. 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.
135411
135418
  */
135412
135419
  put: {
135413
135420
  parameters: {
@@ -135501,6 +135508,12 @@ interface paths {
135501
135508
  max_paths_per_lead?: number;
135502
135509
  max_messages_per_person_90d?: number;
135503
135510
  };
135511
+ after_handoff?: {
135512
+ /** @enum {string} */
135513
+ followups?: "draft_for_owner" | "automatic" | "off";
135514
+ auto_send_after_hours?: number | null;
135515
+ ai_answers_waiting_after_hours?: number | null;
135516
+ };
135504
135517
  };
135505
135518
  };
135506
135519
  };
@@ -135597,6 +135610,11 @@ interface paths {
135597
135610
  * "max_paths_per_lead": 3,
135598
135611
  * "max_messages_per_person_90d": 12
135599
135612
  * },
135613
+ * "after_handoff": {
135614
+ * "followups": "draft_for_owner",
135615
+ * "auto_send_after_hours": 24,
135616
+ * "ai_answers_waiting_after_hours": 2
135617
+ * },
135600
135618
  * "last_run_at": null
135601
135619
  * }
135602
135620
  * }
@@ -135970,6 +135988,126 @@ interface paths {
135970
135988
  patch?: never;
135971
135989
  trace?: never;
135972
135990
  };
135991
+ "/followups/recontacto/held": {
135992
+ parameters: {
135993
+ query?: never;
135994
+ header?: never;
135995
+ path?: never;
135996
+ cookie?: never;
135997
+ };
135998
+ /**
135999
+ * The people behind one «esperando (por qué)» line
136000
+ * @description Today’s held subjects for the given guard codes (comma-separated, the `codes` of one `/guards` `held` line): each lead or thread a sweep held without a ledger row and that has not been sent since, with its contact, step and when the hold lifts when known (`held_until`). Same day and same predicate as the `held` counts, newest first, at most 100.
136001
+ */
136002
+ get: {
136003
+ parameters: {
136004
+ query: {
136005
+ codes: string;
136006
+ };
136007
+ header?: never;
136008
+ path?: never;
136009
+ cookie?: never;
136010
+ };
136011
+ requestBody?: never;
136012
+ responses: {
136013
+ /** @description Held subjects */
136014
+ 200: {
136015
+ headers: {
136016
+ [name: string]: unknown;
136017
+ };
136018
+ content: {
136019
+ /**
136020
+ * @example {
136021
+ * "data": [
136022
+ * {
136023
+ * "code": "no_reachable_address",
136024
+ * "lead_id": "7b0f3c5e-2a51-4d7e-9a61-3f2c8e1d4b90",
136025
+ * "conversation_id": null,
136026
+ * "contact_id": "01a1095d-6c2e-4f3b-8a7d-5e9b0c1d2f34",
136027
+ * "contact_name": "Rocío",
136028
+ * "contact_phone": null,
136029
+ * "contact_email": null,
136030
+ * "lead_title": "iPhone 15 Pro 256 GB",
136031
+ * "situation": "never_replied",
136032
+ * "step": 1,
136033
+ * "last_at": "2026-10-24T14:00:12.000Z",
136034
+ * "held_until": null
136035
+ * }
136036
+ * ]
136037
+ * }
136038
+ */
136039
+ "application/json": {
136040
+ data?: unknown;
136041
+ meta?: {
136042
+ [key: string]: unknown;
136043
+ };
136044
+ };
136045
+ };
136046
+ };
136047
+ /** @description Validation error */
136048
+ 400: {
136049
+ headers: {
136050
+ [name: string]: unknown;
136051
+ };
136052
+ content: {
136053
+ "application/json": components["schemas"]["Error"];
136054
+ };
136055
+ };
136056
+ /** @description Unauthorized */
136057
+ 401: {
136058
+ headers: {
136059
+ [name: string]: unknown;
136060
+ };
136061
+ content: {
136062
+ "application/json": components["schemas"]["Error"];
136063
+ };
136064
+ };
136065
+ /** @description Forbidden */
136066
+ 403: {
136067
+ headers: {
136068
+ [name: string]: unknown;
136069
+ };
136070
+ content: {
136071
+ "application/json": components["schemas"]["Error"];
136072
+ };
136073
+ };
136074
+ /** @description Not found */
136075
+ 404: {
136076
+ headers: {
136077
+ [name: string]: unknown;
136078
+ };
136079
+ content: {
136080
+ "application/json": components["schemas"]["Error"];
136081
+ };
136082
+ };
136083
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
136084
+ 409: {
136085
+ headers: {
136086
+ [name: string]: unknown;
136087
+ };
136088
+ content: {
136089
+ "application/json": components["schemas"]["Error"];
136090
+ };
136091
+ };
136092
+ /** @description Rate limited */
136093
+ 429: {
136094
+ headers: {
136095
+ [name: string]: unknown;
136096
+ };
136097
+ content: {
136098
+ "application/json": components["schemas"]["Error"];
136099
+ };
136100
+ };
136101
+ };
136102
+ };
136103
+ put?: never;
136104
+ post?: never;
136105
+ delete?: never;
136106
+ options?: never;
136107
+ head?: never;
136108
+ patch?: never;
136109
+ trace?: never;
136110
+ };
135973
136111
  "/followups/recontacto/plan": {
135974
136112
  parameters: {
135975
136113
  query?: never;
@@ -135979,7 +136117,7 @@ interface paths {
135979
136117
  };
135980
136118
  /**
135981
136119
  * What a customer who stops answering receives (simulated)
135982
- * @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`, `person_ceiling`, `daily_cap`) with its sentence, and `deferred_codes` lists every reason that moved it, 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–R13 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`, `failed` (follow-ups sent today that did not arrive) and `failed_actionable` (of those, the ones a person can retry or fix; never a number WhatsApp cannot deliver to), and `cap`: what the day used of the daily cap and the AI review budget, the spent one in `reached` with its `sentence` and `resumes_at`; while one is spent, rows at «now» that fall today move to tomorrow with `deferred_code: daily_cap`; and `backlog`, the whole queue’s drain: `queued`, `per_day`, `days` (first to last estimated release, inclusive), `last_release_on` and `sentence` «En cola: N, se reparte en ~D días (hasta el …)», null when nothing is queued) 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).
136120
+ * @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`, `person_ceiling`, `daily_cap`) with its sentence, and `deferred_codes` lists every reason that moved it, 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–R13 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`, `failed` (follow-ups sent today that did not arrive) and `failed_actionable` (of those, the ones a person can retry or fix; never a number WhatsApp cannot deliver to), and `cap`: what the day used of the daily cap and the AI review budget, the spent one in `reached` with its `sentence` and `resumes_at`; while one is spent, rows at «now» that fall today move to tomorrow with `deferred_code: daily_cap`; and `backlog`, the whole queue’s drain: `queued`, `per_day`, `days` (first to last estimated release, inclusive), `last_release_on` and `sentence` «En cola: N, se reparte en ~D días (hasta el …)», null when nothing is queued) and `queue` (each queued backlog step’s estimated release day, 10 per tenant per day; `contact_id` or `lead_id` narrows it), and `after_handoff` («Después de pasarlo a una persona»: `followups`, `auto_send_after_hours`, `ai_answers_waiting_after_hours`, `reminder_minutes` and the block’s collapsed line `summary`). All copy is in `lang` (default the workspace’s).
135983
136121
  */
135984
136122
  get: {
135985
136123
  parameters: {
@@ -136126,7 +136264,7 @@ interface paths {
136126
136264
  * "S"
136127
136265
  * ],
136128
136266
  * "emphasis": "highlight",
136129
- * "note": "La última vuelta llegó al tope: revisamos **2000** de **2340** oportunidades; el resto espera las siguientes."
136267
+ * "note": "La última revisión llegó al tope: revisamos **2.000** de **2.340** clientes; el resto entra en las próximas revisiones."
136130
136268
  * }
136131
136269
  * ],
136132
136270
  * "approval_fallback": {
@@ -136134,6 +136272,13 @@ interface paths {
136134
136272
  * "reason": null,
136135
136273
  * "hours": null
136136
136274
  * },
136275
+ * "after_handoff": {
136276
+ * "followups": "draft_for_owner",
136277
+ * "auto_send_after_hours": 24,
136278
+ * "ai_answers_waiting_after_hours": 2,
136279
+ * "reminder_minutes": 30,
136280
+ * "summary": "Después de pasarlo a una persona · borrador para quien lo atiende, se envía solo a las 24 horas si nadie lo revisa; si el cliente espera, responde la IA a las 2 horas. Si fue por un reclamo o por algo que solo puede hacer una persona, la IA no escribe sola."
136281
+ * },
136137
136282
  * "today": {
136138
136283
  * "since": "2026-10-21T03:00:00.000Z",
136139
136284
  * "sent": 66,
@@ -136255,7 +136400,7 @@ interface paths {
136255
136400
  };
136256
136401
  /**
136257
136402
  * What happens next for each of a contact’s leads
136258
- * @description The contact page’s «Próximo seguimiento»: for each open or lost lead of `contact_id` (or the one `lead_id`), newest first, the next thing the Recontacto engine does, computed by the same ladder walk and decision the sweep runs (contact hours, the night deferral, R12, the answer-debt gate). `state` is `message` (a follow-up is planned: `step` of `steps_total`, `at`, `channel`, `what`, `autonomy`, `deferred_from_label` when contact hours moved it, `due_now` when the next sweep takes it; with today’s daily cap (G2) or review budget (G41) spent, a step due today moves to tomorrow’s opening and `deferred_reason` says which). `at` is never outside contact hours: a step due at night (or a G8 re-look that opens at midnight) moves to the next opening. `deferred_codes` lists every reason `at` moved (`outside_contact_hours`, `re_evaluation`, `daily_cap_reached`, `review_budget_reached`), `lose` (no more messages; marked lost at `at`), `answer_debt` (the customer wrote last), `path_cap` (R12), `person_ladder` (G13: the person’s ladder runs on a newer lead), `undeliverable` (G35: WhatsApp refused our messages; nothing goes out until they write), `paused` (the master switch is off) or `none`. `sentence` is the whole answer in one line, in `lang` (default the workspace’s). `held` is today’s latest hold of a due step (`guard`, `code`, `since`, `last_seen`, `until`, `sweeps`), or null. Drafts already waiting for approval or in the backlog queue are the ledger’s (`GET /followups/recontacto/attempts?contact_id=`).
136403
+ * @description The contact page’s «Próximo seguimiento»: for each open or lost lead of `contact_id` (or the one `lead_id`), newest first, the next thing the Recontacto engine does, computed by the same ladder walk and decision the sweep runs (contact hours, the night deferral, R12, the answer-debt gate). `state` is `message` (a follow-up is planned: `step` of `steps_total`, `at`, `channel`, `what`, `autonomy`, `deferred_from_label` when contact hours moved it, `due_now` when the next sweep takes it; with today’s daily cap (G2) or review budget (G41) spent, a step due today moves to tomorrow’s opening and `deferred_reason` says which). `at` is never outside contact hours: a step due at night (or a G8 re-look that opens at midnight) moves to the next opening. `deferred_codes` lists every reason `at` moved (`outside_contact_hours`, `re_evaluation`, `daily_cap_reached`, `review_budget_reached`), `lose` (no more messages; marked lost at `at`), `answer_debt` (the customer wrote last), `path_cap` (R12), `person_ladder` (G13: the person’s ladder runs on a newer lead), `undeliverable` (G35: WhatsApp refused our messages; nothing goes out until they write), `paused` (the master switch is off) or `none`. `sentence` is the whole answer in one line, in `lang` (default the workspace’s). `held` is today’s latest hold of a due step (`guard`, `code`, `since`, `last_seen`, `until`, `sweeps`), or null. Drafts already waiting for approval or in the backlog queue are the ledger’s (`GET /followups/recontacto/attempts?contact_id=`). `handoff` is the person’s open conversation the AI handed to a person, or null: `conversation_id`, `owner_user_id`, `owner_name`, `mode` (`after_handoff.followups`), `class` (`informational` | `operational` | `sensitive`: only `informational` gets drafts or an AI answer), `draft` (the pending draft: `attempt_id`, `auto_send_at`, `auto_send_at_label`, `promise` when a teammate’s promised time set it), `waiting` (the customer wrote last: `since`, `ai_answers_at`, `ai_answers_at_label`) and `sentence`, the state line («Lo atiende Diego · borrador listo · se envía solo mañana 16:30 si nadie lo revisa»).
136259
136404
  */
136260
136405
  get: {
136261
136406
  parameters: {
@@ -136299,7 +136444,23 @@ interface paths {
136299
136444
  * "autonomy_label": "Automático",
136300
136445
  * "sentence": "Próximo seguimiento: paso 2 de 4 · WhatsApp · vie 23 oct · 20:12"
136301
136446
  * }
136302
- * ]
136447
+ * ],
136448
+ * "handoff": {
136449
+ * "conversation_id": "01a1639b-75bf-79d7-8e5a-93c5000d6319",
136450
+ * "owner_user_id": "829e61ea-2cb9-43dc-80fd-18baf78eaaed",
136451
+ * "owner_name": "Diego Navarrete",
136452
+ * "mode": "draft_for_owner",
136453
+ * "class": "informational",
136454
+ * "sensitive": false,
136455
+ * "draft": {
136456
+ * "attempt_id": "7c2f1e0a-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
136457
+ * "auto_send_at": "2026-10-25T16:30:00-03:00",
136458
+ * "auto_send_at_label": "mañana 16:30",
136459
+ * "promise": false
136460
+ * },
136461
+ * "waiting": null,
136462
+ * "sentence": "Lo atiende Diego · borrador listo · se envía solo mañana 16:30 si nadie lo revisa"
136463
+ * }
136303
136464
  * }
136304
136465
  * }
136305
136466
  */
@@ -220617,13 +220778,14 @@ interface components {
220617
220778
  push_enabled?: boolean;
220618
220779
  };
220619
220780
  TenantSettingsPublic: {
220620
- /** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?, direct_purchase?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value; `direct_purchase: false` = the model is taken only as part of the payment for another item, never bought outright — absent = true), `not_bought` (models never bought), `floor_factor` (0–1, default 0.7: the low end for a unit with issues or unknown condition is `used × floor_factor`), `perfect_floor_factor` (0–1, default 0.85: the low end for a flawless unit is `used × perfect_floor_factor`, its high end is `top`), `rounding` (default 10000), `perfect_battery_pct` (default 90), `currency` (default CLP). On an ecommerce workspace its presence offers the agents the `estimate_trade_in` tool (a wide range of what the customer would still pay) and the `quote_buyback` tool (the most paid for one device sold outright, or the discount for a `direct_purchase: false` model); the business’s own site reads it at `GET /storefront/trade-in`. Replaced whole on write; `null` clears it. */
220781
+ /** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?, low_battery_factor?, direct_purchase?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value; `min_battery_pct` = a known battery under it is not bought; `low_battery_factor` (0–1) = a known battery under `perfect_battery_pct` caps the price at `used × low_battery_factor` instead of `used`; `direct_purchase: false` = the model is taken only as part of the payment for another item, never bought outright — absent = true), `not_bought` (models never bought), `floor_factor` (0–1, default 0.7: the low end for a unit with issues or unknown condition is `used × floor_factor`), `perfect_floor_factor` (0–1, default 0.85: the low end for a flawless unit is `used × perfect_floor_factor`, its high end is `top`), `rounding` (default 10000), `perfect_battery_pct` (default 90), `currency` (default CLP). On an ecommerce workspace its presence offers the agents the `estimate_trade_in` tool (a wide range of what the customer would still pay) and the `quote_buyback` tool (the most paid for one device sold outright, or the discount for a `direct_purchase: false` model); the business’s own site reads it at `GET /storefront/trade-in`. Replaced whole on write; `null` clears it. */
220621
220782
  trade_in?: {
220622
220783
  price_table: {
220623
220784
  model: string;
220624
220785
  top: number;
220625
220786
  used: number;
220626
220787
  min_battery_pct?: number;
220788
+ low_battery_factor?: number;
220627
220789
  direct_purchase?: boolean;
220628
220790
  }[];
220629
220791
  not_bought?: string[];
@@ -220832,13 +220994,14 @@ interface components {
220832
220994
  };
220833
220995
  };
220834
220996
  TenantSettingsPublicWrite: {
220835
- /** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?, direct_purchase?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value; `direct_purchase: false` = the model is taken only as part of the payment for another item, never bought outright — absent = true), `not_bought` (models never bought), `floor_factor` (0–1, default 0.7: the low end for a unit with issues or unknown condition is `used × floor_factor`), `perfect_floor_factor` (0–1, default 0.85: the low end for a flawless unit is `used × perfect_floor_factor`, its high end is `top`), `rounding` (default 10000), `perfect_battery_pct` (default 90), `currency` (default CLP). On an ecommerce workspace its presence offers the agents the `estimate_trade_in` tool (a wide range of what the customer would still pay) and the `quote_buyback` tool (the most paid for one device sold outright, or the discount for a `direct_purchase: false` model); the business’s own site reads it at `GET /storefront/trade-in`. Replaced whole on write; `null` clears it. */
220997
+ /** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?, low_battery_factor?, direct_purchase?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value; `min_battery_pct` = a known battery under it is not bought; `low_battery_factor` (0–1) = a known battery under `perfect_battery_pct` caps the price at `used × low_battery_factor` instead of `used`; `direct_purchase: false` = the model is taken only as part of the payment for another item, never bought outright — absent = true), `not_bought` (models never bought), `floor_factor` (0–1, default 0.7: the low end for a unit with issues or unknown condition is `used × floor_factor`), `perfect_floor_factor` (0–1, default 0.85: the low end for a flawless unit is `used × perfect_floor_factor`, its high end is `top`), `rounding` (default 10000), `perfect_battery_pct` (default 90), `currency` (default CLP). On an ecommerce workspace its presence offers the agents the `estimate_trade_in` tool (a wide range of what the customer would still pay) and the `quote_buyback` tool (the most paid for one device sold outright, or the discount for a `direct_purchase: false` model); the business’s own site reads it at `GET /storefront/trade-in`. Replaced whole on write; `null` clears it. */
220836
220998
  trade_in?: {
220837
220999
  price_table: {
220838
221000
  model: string;
220839
221001
  top: number;
220840
221002
  used: number;
220841
221003
  min_battery_pct?: number;
221004
+ low_battery_factor?: number;
220842
221005
  direct_purchase?: boolean;
220843
221006
  }[];
220844
221007
  not_bought?: string[];
package/dist/index.d.ts CHANGED
@@ -22265,7 +22265,7 @@ interface paths {
22265
22265
  };
22266
22266
  /**
22267
22267
  * Buy table for the business’s own quoter (trade-in / buyback)
22268
- * @description What the business pays at most for each used model, so its own website quoter reads the same table the agent quotes from instead of a hardcoded copy. Per model: `top` (flawless, «Impecable»), `used` (normal wear, «Con uso»), `direct_purchase` (`false` = taken only as part of the payment for another item, never bought outright) and `min_battery_pct` (a known battery under it is not bought; `null` = no minimum). Plus `not_bought` (models never bought), `currency` and `perfect_battery_pct` (from this battery health a unit with nothing else wrong counts as flawless). Readable with the storefront’s `stock:read`; the browser twin is `GET /widget/trade-in` with the site’s `pk_` key. `Cache-Control: private, max-age=300` + a strong `ETag` (send `If-None-Match` for a 304). 404 when the workspace keeps no buy table (`PUT /tenant/settings` `trade_in`).
22268
+ * @description What the business pays at most for each used model, so its own website quoter reads the same table the agent quotes from instead of a hardcoded copy. Per model: `top` (flawless, «Impecable»), `used` (normal wear, «Con uso»), `direct_purchase` (`false` = taken only as part of the payment for another item, never bought outright) and `min_battery_pct` (a known battery under it is not bought; `null` = no minimum) and `low_battery_factor` (a known battery under `perfect_battery_pct` caps the price at `used × low_battery_factor`; `null` = `used`). Plus `not_bought` (models never bought), `currency` and `perfect_battery_pct` (from this battery health a unit with nothing else wrong counts as flawless). Readable with the storefront’s `stock:read`; the browser twin is `GET /widget/trade-in` with the site’s `pk_` key. `Cache-Control: private, max-age=300` + a strong `ETag` (send `If-None-Match` for a 304). 404 when the workspace keeps no buy table (`PUT /tenant/settings` `trade_in`).
22269
22269
  */
22270
22270
  get: {
22271
22271
  parameters: {
@@ -22292,14 +22292,16 @@ interface paths {
22292
22292
  * "top": 350000,
22293
22293
  * "used": 320000,
22294
22294
  * "direct_purchase": false,
22295
- * "min_battery_pct": null
22295
+ * "min_battery_pct": null,
22296
+ * "low_battery_factor": null
22296
22297
  * },
22297
22298
  * {
22298
22299
  * "model": "iPhone 16 Pro",
22299
22300
  * "top": 600000,
22300
22301
  * "used": 570000,
22301
22302
  * "direct_purchase": true,
22302
- * "min_battery_pct": 90
22303
+ * "min_battery_pct": null,
22304
+ * "low_battery_factor": 0.85
22303
22305
  * }
22304
22306
  * ],
22305
22307
  * "not_bought": [
@@ -135234,7 +135236,7 @@ interface paths {
135234
135236
  };
135235
135237
  /**
135236
135238
  * Get the Recontacto cadence configuration
135237
- * @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, `max_paths_per_lead` 3 and `max_messages_per_person_90d` 12): `min_gap_hours` (R2), `max_per_day` (R5; a healthcare workspace reads 1 when none is stored, and null keeps 1), `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, per person across all their leads and chat rows), `max_messages_per_person_90d` (R13: unanswered Recontacto messages one person may get in any 90 days, every rail together). `unanswered_message.template_after_window` is R7 (on). `min_hours_between_touches` is an alias of `pacing.min_gap_hours`.
135239
+ * @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, `max_paths_per_lead` 3 and `max_messages_per_person_90d` 12): `min_gap_hours` (R2), `max_per_day` (R5; a healthcare workspace reads 1 when none is stored, and null keeps 1), `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, per person across all their leads and chat rows), `max_messages_per_person_90d` (R13: unanswered Recontacto messages one person may get in any 90 days, every rail together). `unanswered_message.template_after_window` is R7 (on). `min_hours_between_touches` is an alias of `pacing.min_gap_hours`. `after_handoff` is «Después de pasarlo a una persona», for a conversation the AI handed to a person until it is returned to the AI: `followups` `draft_for_owner` (default: each step a draft for whoever handles it), `automatic` or `off`; `auto_send_after_hours` (default 24, null = never) sends an unreviewed draft by itself inside contact hours (a teammate’s promised time wins); `ai_answers_waiting_after_hours` (default 2, null = only the 30-minute reminder) lets the AI answer a customer nobody answered. Only a handoff the AI could have followed up (a missing fact, an unfinished turn) gets drafts or an AI answer; after a complaint, a request for a person or a step only a person can do (pay, receive the device, confirm stock or a price) the AI writes nothing on its own (G50). A person whose lead is in a bottom-funnel stage gets no follow-ups at all (G52).
135238
135240
  */
135239
135241
  get: {
135240
135242
  parameters: {
@@ -135337,6 +135339,11 @@ interface paths {
135337
135339
  * "max_paths_per_lead": 3,
135338
135340
  * "max_messages_per_person_90d": 12
135339
135341
  * },
135342
+ * "after_handoff": {
135343
+ * "followups": "draft_for_owner",
135344
+ * "auto_send_after_hours": 24,
135345
+ * "ai_answers_waiting_after_hours": 2
135346
+ * },
135340
135347
  * "last_run_at": null
135341
135348
  * }
135342
135349
  * }
@@ -135407,7 +135414,7 @@ interface paths {
135407
135414
  };
135408
135415
  /**
135409
135416
  * Update the Recontacto cadence configuration
135410
- * @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`, `pacing.max_messages_per_person_90d` 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.
135417
+ * @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`, `pacing.max_messages_per_person_90d` or `pacing.entry_max_silence_days`; turning `unanswered_message.template_after_window` or `pacing.hot_leads_faster` on; `after_handoff.followups` set to `automatic` (or back to drafts from `off` while they send themselves), or `after_handoff.auto_send_after_hours` / `ai_answers_waiting_after_hours` set where they were off or made shorter. 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.
135411
135418
  */
135412
135419
  put: {
135413
135420
  parameters: {
@@ -135501,6 +135508,12 @@ interface paths {
135501
135508
  max_paths_per_lead?: number;
135502
135509
  max_messages_per_person_90d?: number;
135503
135510
  };
135511
+ after_handoff?: {
135512
+ /** @enum {string} */
135513
+ followups?: "draft_for_owner" | "automatic" | "off";
135514
+ auto_send_after_hours?: number | null;
135515
+ ai_answers_waiting_after_hours?: number | null;
135516
+ };
135504
135517
  };
135505
135518
  };
135506
135519
  };
@@ -135597,6 +135610,11 @@ interface paths {
135597
135610
  * "max_paths_per_lead": 3,
135598
135611
  * "max_messages_per_person_90d": 12
135599
135612
  * },
135613
+ * "after_handoff": {
135614
+ * "followups": "draft_for_owner",
135615
+ * "auto_send_after_hours": 24,
135616
+ * "ai_answers_waiting_after_hours": 2
135617
+ * },
135600
135618
  * "last_run_at": null
135601
135619
  * }
135602
135620
  * }
@@ -135970,6 +135988,126 @@ interface paths {
135970
135988
  patch?: never;
135971
135989
  trace?: never;
135972
135990
  };
135991
+ "/followups/recontacto/held": {
135992
+ parameters: {
135993
+ query?: never;
135994
+ header?: never;
135995
+ path?: never;
135996
+ cookie?: never;
135997
+ };
135998
+ /**
135999
+ * The people behind one «esperando (por qué)» line
136000
+ * @description Today’s held subjects for the given guard codes (comma-separated, the `codes` of one `/guards` `held` line): each lead or thread a sweep held without a ledger row and that has not been sent since, with its contact, step and when the hold lifts when known (`held_until`). Same day and same predicate as the `held` counts, newest first, at most 100.
136001
+ */
136002
+ get: {
136003
+ parameters: {
136004
+ query: {
136005
+ codes: string;
136006
+ };
136007
+ header?: never;
136008
+ path?: never;
136009
+ cookie?: never;
136010
+ };
136011
+ requestBody?: never;
136012
+ responses: {
136013
+ /** @description Held subjects */
136014
+ 200: {
136015
+ headers: {
136016
+ [name: string]: unknown;
136017
+ };
136018
+ content: {
136019
+ /**
136020
+ * @example {
136021
+ * "data": [
136022
+ * {
136023
+ * "code": "no_reachable_address",
136024
+ * "lead_id": "7b0f3c5e-2a51-4d7e-9a61-3f2c8e1d4b90",
136025
+ * "conversation_id": null,
136026
+ * "contact_id": "01a1095d-6c2e-4f3b-8a7d-5e9b0c1d2f34",
136027
+ * "contact_name": "Rocío",
136028
+ * "contact_phone": null,
136029
+ * "contact_email": null,
136030
+ * "lead_title": "iPhone 15 Pro 256 GB",
136031
+ * "situation": "never_replied",
136032
+ * "step": 1,
136033
+ * "last_at": "2026-10-24T14:00:12.000Z",
136034
+ * "held_until": null
136035
+ * }
136036
+ * ]
136037
+ * }
136038
+ */
136039
+ "application/json": {
136040
+ data?: unknown;
136041
+ meta?: {
136042
+ [key: string]: unknown;
136043
+ };
136044
+ };
136045
+ };
136046
+ };
136047
+ /** @description Validation error */
136048
+ 400: {
136049
+ headers: {
136050
+ [name: string]: unknown;
136051
+ };
136052
+ content: {
136053
+ "application/json": components["schemas"]["Error"];
136054
+ };
136055
+ };
136056
+ /** @description Unauthorized */
136057
+ 401: {
136058
+ headers: {
136059
+ [name: string]: unknown;
136060
+ };
136061
+ content: {
136062
+ "application/json": components["schemas"]["Error"];
136063
+ };
136064
+ };
136065
+ /** @description Forbidden */
136066
+ 403: {
136067
+ headers: {
136068
+ [name: string]: unknown;
136069
+ };
136070
+ content: {
136071
+ "application/json": components["schemas"]["Error"];
136072
+ };
136073
+ };
136074
+ /** @description Not found */
136075
+ 404: {
136076
+ headers: {
136077
+ [name: string]: unknown;
136078
+ };
136079
+ content: {
136080
+ "application/json": components["schemas"]["Error"];
136081
+ };
136082
+ };
136083
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
136084
+ 409: {
136085
+ headers: {
136086
+ [name: string]: unknown;
136087
+ };
136088
+ content: {
136089
+ "application/json": components["schemas"]["Error"];
136090
+ };
136091
+ };
136092
+ /** @description Rate limited */
136093
+ 429: {
136094
+ headers: {
136095
+ [name: string]: unknown;
136096
+ };
136097
+ content: {
136098
+ "application/json": components["schemas"]["Error"];
136099
+ };
136100
+ };
136101
+ };
136102
+ };
136103
+ put?: never;
136104
+ post?: never;
136105
+ delete?: never;
136106
+ options?: never;
136107
+ head?: never;
136108
+ patch?: never;
136109
+ trace?: never;
136110
+ };
135973
136111
  "/followups/recontacto/plan": {
135974
136112
  parameters: {
135975
136113
  query?: never;
@@ -135979,7 +136117,7 @@ interface paths {
135979
136117
  };
135980
136118
  /**
135981
136119
  * What a customer who stops answering receives (simulated)
135982
- * @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`, `person_ceiling`, `daily_cap`) with its sentence, and `deferred_codes` lists every reason that moved it, 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–R13 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`, `failed` (follow-ups sent today that did not arrive) and `failed_actionable` (of those, the ones a person can retry or fix; never a number WhatsApp cannot deliver to), and `cap`: what the day used of the daily cap and the AI review budget, the spent one in `reached` with its `sentence` and `resumes_at`; while one is spent, rows at «now» that fall today move to tomorrow with `deferred_code: daily_cap`; and `backlog`, the whole queue’s drain: `queued`, `per_day`, `days` (first to last estimated release, inclusive), `last_release_on` and `sentence` «En cola: N, se reparte en ~D días (hasta el …)», null when nothing is queued) 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).
136120
+ * @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`, `person_ceiling`, `daily_cap`) with its sentence, and `deferred_codes` lists every reason that moved it, 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–R13 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`, `failed` (follow-ups sent today that did not arrive) and `failed_actionable` (of those, the ones a person can retry or fix; never a number WhatsApp cannot deliver to), and `cap`: what the day used of the daily cap and the AI review budget, the spent one in `reached` with its `sentence` and `resumes_at`; while one is spent, rows at «now» that fall today move to tomorrow with `deferred_code: daily_cap`; and `backlog`, the whole queue’s drain: `queued`, `per_day`, `days` (first to last estimated release, inclusive), `last_release_on` and `sentence` «En cola: N, se reparte en ~D días (hasta el …)», null when nothing is queued) and `queue` (each queued backlog step’s estimated release day, 10 per tenant per day; `contact_id` or `lead_id` narrows it), and `after_handoff` («Después de pasarlo a una persona»: `followups`, `auto_send_after_hours`, `ai_answers_waiting_after_hours`, `reminder_minutes` and the block’s collapsed line `summary`). All copy is in `lang` (default the workspace’s).
135983
136121
  */
135984
136122
  get: {
135985
136123
  parameters: {
@@ -136126,7 +136264,7 @@ interface paths {
136126
136264
  * "S"
136127
136265
  * ],
136128
136266
  * "emphasis": "highlight",
136129
- * "note": "La última vuelta llegó al tope: revisamos **2000** de **2340** oportunidades; el resto espera las siguientes."
136267
+ * "note": "La última revisión llegó al tope: revisamos **2.000** de **2.340** clientes; el resto entra en las próximas revisiones."
136130
136268
  * }
136131
136269
  * ],
136132
136270
  * "approval_fallback": {
@@ -136134,6 +136272,13 @@ interface paths {
136134
136272
  * "reason": null,
136135
136273
  * "hours": null
136136
136274
  * },
136275
+ * "after_handoff": {
136276
+ * "followups": "draft_for_owner",
136277
+ * "auto_send_after_hours": 24,
136278
+ * "ai_answers_waiting_after_hours": 2,
136279
+ * "reminder_minutes": 30,
136280
+ * "summary": "Después de pasarlo a una persona · borrador para quien lo atiende, se envía solo a las 24 horas si nadie lo revisa; si el cliente espera, responde la IA a las 2 horas. Si fue por un reclamo o por algo que solo puede hacer una persona, la IA no escribe sola."
136281
+ * },
136137
136282
  * "today": {
136138
136283
  * "since": "2026-10-21T03:00:00.000Z",
136139
136284
  * "sent": 66,
@@ -136255,7 +136400,7 @@ interface paths {
136255
136400
  };
136256
136401
  /**
136257
136402
  * What happens next for each of a contact’s leads
136258
- * @description The contact page’s «Próximo seguimiento»: for each open or lost lead of `contact_id` (or the one `lead_id`), newest first, the next thing the Recontacto engine does, computed by the same ladder walk and decision the sweep runs (contact hours, the night deferral, R12, the answer-debt gate). `state` is `message` (a follow-up is planned: `step` of `steps_total`, `at`, `channel`, `what`, `autonomy`, `deferred_from_label` when contact hours moved it, `due_now` when the next sweep takes it; with today’s daily cap (G2) or review budget (G41) spent, a step due today moves to tomorrow’s opening and `deferred_reason` says which). `at` is never outside contact hours: a step due at night (or a G8 re-look that opens at midnight) moves to the next opening. `deferred_codes` lists every reason `at` moved (`outside_contact_hours`, `re_evaluation`, `daily_cap_reached`, `review_budget_reached`), `lose` (no more messages; marked lost at `at`), `answer_debt` (the customer wrote last), `path_cap` (R12), `person_ladder` (G13: the person’s ladder runs on a newer lead), `undeliverable` (G35: WhatsApp refused our messages; nothing goes out until they write), `paused` (the master switch is off) or `none`. `sentence` is the whole answer in one line, in `lang` (default the workspace’s). `held` is today’s latest hold of a due step (`guard`, `code`, `since`, `last_seen`, `until`, `sweeps`), or null. Drafts already waiting for approval or in the backlog queue are the ledger’s (`GET /followups/recontacto/attempts?contact_id=`).
136403
+ * @description The contact page’s «Próximo seguimiento»: for each open or lost lead of `contact_id` (or the one `lead_id`), newest first, the next thing the Recontacto engine does, computed by the same ladder walk and decision the sweep runs (contact hours, the night deferral, R12, the answer-debt gate). `state` is `message` (a follow-up is planned: `step` of `steps_total`, `at`, `channel`, `what`, `autonomy`, `deferred_from_label` when contact hours moved it, `due_now` when the next sweep takes it; with today’s daily cap (G2) or review budget (G41) spent, a step due today moves to tomorrow’s opening and `deferred_reason` says which). `at` is never outside contact hours: a step due at night (or a G8 re-look that opens at midnight) moves to the next opening. `deferred_codes` lists every reason `at` moved (`outside_contact_hours`, `re_evaluation`, `daily_cap_reached`, `review_budget_reached`), `lose` (no more messages; marked lost at `at`), `answer_debt` (the customer wrote last), `path_cap` (R12), `person_ladder` (G13: the person’s ladder runs on a newer lead), `undeliverable` (G35: WhatsApp refused our messages; nothing goes out until they write), `paused` (the master switch is off) or `none`. `sentence` is the whole answer in one line, in `lang` (default the workspace’s). `held` is today’s latest hold of a due step (`guard`, `code`, `since`, `last_seen`, `until`, `sweeps`), or null. Drafts already waiting for approval or in the backlog queue are the ledger’s (`GET /followups/recontacto/attempts?contact_id=`). `handoff` is the person’s open conversation the AI handed to a person, or null: `conversation_id`, `owner_user_id`, `owner_name`, `mode` (`after_handoff.followups`), `class` (`informational` | `operational` | `sensitive`: only `informational` gets drafts or an AI answer), `draft` (the pending draft: `attempt_id`, `auto_send_at`, `auto_send_at_label`, `promise` when a teammate’s promised time set it), `waiting` (the customer wrote last: `since`, `ai_answers_at`, `ai_answers_at_label`) and `sentence`, the state line («Lo atiende Diego · borrador listo · se envía solo mañana 16:30 si nadie lo revisa»).
136259
136404
  */
136260
136405
  get: {
136261
136406
  parameters: {
@@ -136299,7 +136444,23 @@ interface paths {
136299
136444
  * "autonomy_label": "Automático",
136300
136445
  * "sentence": "Próximo seguimiento: paso 2 de 4 · WhatsApp · vie 23 oct · 20:12"
136301
136446
  * }
136302
- * ]
136447
+ * ],
136448
+ * "handoff": {
136449
+ * "conversation_id": "01a1639b-75bf-79d7-8e5a-93c5000d6319",
136450
+ * "owner_user_id": "829e61ea-2cb9-43dc-80fd-18baf78eaaed",
136451
+ * "owner_name": "Diego Navarrete",
136452
+ * "mode": "draft_for_owner",
136453
+ * "class": "informational",
136454
+ * "sensitive": false,
136455
+ * "draft": {
136456
+ * "attempt_id": "7c2f1e0a-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
136457
+ * "auto_send_at": "2026-10-25T16:30:00-03:00",
136458
+ * "auto_send_at_label": "mañana 16:30",
136459
+ * "promise": false
136460
+ * },
136461
+ * "waiting": null,
136462
+ * "sentence": "Lo atiende Diego · borrador listo · se envía solo mañana 16:30 si nadie lo revisa"
136463
+ * }
136303
136464
  * }
136304
136465
  * }
136305
136466
  */
@@ -220617,13 +220778,14 @@ interface components {
220617
220778
  push_enabled?: boolean;
220618
220779
  };
220619
220780
  TenantSettingsPublic: {
220620
- /** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?, direct_purchase?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value; `direct_purchase: false` = the model is taken only as part of the payment for another item, never bought outright — absent = true), `not_bought` (models never bought), `floor_factor` (0–1, default 0.7: the low end for a unit with issues or unknown condition is `used × floor_factor`), `perfect_floor_factor` (0–1, default 0.85: the low end for a flawless unit is `used × perfect_floor_factor`, its high end is `top`), `rounding` (default 10000), `perfect_battery_pct` (default 90), `currency` (default CLP). On an ecommerce workspace its presence offers the agents the `estimate_trade_in` tool (a wide range of what the customer would still pay) and the `quote_buyback` tool (the most paid for one device sold outright, or the discount for a `direct_purchase: false` model); the business’s own site reads it at `GET /storefront/trade-in`. Replaced whole on write; `null` clears it. */
220781
+ /** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?, low_battery_factor?, direct_purchase?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value; `min_battery_pct` = a known battery under it is not bought; `low_battery_factor` (0–1) = a known battery under `perfect_battery_pct` caps the price at `used × low_battery_factor` instead of `used`; `direct_purchase: false` = the model is taken only as part of the payment for another item, never bought outright — absent = true), `not_bought` (models never bought), `floor_factor` (0–1, default 0.7: the low end for a unit with issues or unknown condition is `used × floor_factor`), `perfect_floor_factor` (0–1, default 0.85: the low end for a flawless unit is `used × perfect_floor_factor`, its high end is `top`), `rounding` (default 10000), `perfect_battery_pct` (default 90), `currency` (default CLP). On an ecommerce workspace its presence offers the agents the `estimate_trade_in` tool (a wide range of what the customer would still pay) and the `quote_buyback` tool (the most paid for one device sold outright, or the discount for a `direct_purchase: false` model); the business’s own site reads it at `GET /storefront/trade-in`. Replaced whole on write; `null` clears it. */
220621
220782
  trade_in?: {
220622
220783
  price_table: {
220623
220784
  model: string;
220624
220785
  top: number;
220625
220786
  used: number;
220626
220787
  min_battery_pct?: number;
220788
+ low_battery_factor?: number;
220627
220789
  direct_purchase?: boolean;
220628
220790
  }[];
220629
220791
  not_bought?: string[];
@@ -220832,13 +220994,14 @@ interface components {
220832
220994
  };
220833
220995
  };
220834
220996
  TenantSettingsPublicWrite: {
220835
- /** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?, direct_purchase?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value; `direct_purchase: false` = the model is taken only as part of the payment for another item, never bought outright — absent = true), `not_bought` (models never bought), `floor_factor` (0–1, default 0.7: the low end for a unit with issues or unknown condition is `used × floor_factor`), `perfect_floor_factor` (0–1, default 0.85: the low end for a flawless unit is `used × perfect_floor_factor`, its high end is `top`), `rounding` (default 10000), `perfect_battery_pct` (default 90), `currency` (default CLP). On an ecommerce workspace its presence offers the agents the `estimate_trade_in` tool (a wide range of what the customer would still pay) and the `quote_buyback` tool (the most paid for one device sold outright, or the discount for a `direct_purchase: false` model); the business’s own site reads it at `GET /storefront/trade-in`. Replaced whole on write; `null` clears it. */
220997
+ /** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?, low_battery_factor?, direct_purchase?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value; `min_battery_pct` = a known battery under it is not bought; `low_battery_factor` (0–1) = a known battery under `perfect_battery_pct` caps the price at `used × low_battery_factor` instead of `used`; `direct_purchase: false` = the model is taken only as part of the payment for another item, never bought outright — absent = true), `not_bought` (models never bought), `floor_factor` (0–1, default 0.7: the low end for a unit with issues or unknown condition is `used × floor_factor`), `perfect_floor_factor` (0–1, default 0.85: the low end for a flawless unit is `used × perfect_floor_factor`, its high end is `top`), `rounding` (default 10000), `perfect_battery_pct` (default 90), `currency` (default CLP). On an ecommerce workspace its presence offers the agents the `estimate_trade_in` tool (a wide range of what the customer would still pay) and the `quote_buyback` tool (the most paid for one device sold outright, or the discount for a `direct_purchase: false` model); the business’s own site reads it at `GET /storefront/trade-in`. Replaced whole on write; `null` clears it. */
220836
220998
  trade_in?: {
220837
220999
  price_table: {
220838
221000
  model: string;
220839
221001
  top: number;
220840
221002
  used: number;
220841
221003
  min_battery_pct?: number;
221004
+ low_battery_factor?: number;
220842
221005
  direct_purchase?: boolean;
220843
221006
  }[];
220844
221007
  not_bought?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "14.100.5",
3
+ "version": "14.101.2",
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",