@vitrina/api 14.103.3 → 14.103.4
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 +42 -6
- package/dist/index.d.ts +42 -6
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -136477,12 +136477,13 @@ interface paths {
|
|
|
136477
136477
|
};
|
|
136478
136478
|
/**
|
|
136479
136479
|
* The people behind one «esperando (por qué)» line
|
|
136480
|
-
* @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`), and `step_label`, the step as the «Si no responde» hero names it («Conversó y dejó de responder · paso 3 de 5»; null when the plan does not draw it). One row per person: their latest hold. Same day and same predicate as the `held` counts, newest first, at most 100.
|
|
136480
|
+
* @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`), and `step_label`, the step as the «Si no responde» hero names it («Conversó y dejó de responder · paso 3 de 5»; null when the plan does not draw it). Each row also says what holds it, as `/next-steps` does: `guard`, `label` (the owner’s words; for G52 the predicate that matches now, «tiene una visita agendada»), `reason` (G52 only: `visit_scheduled` | `appointment` | `visit_note` | `visited` | `sale_in_progress`, else null), `until` and `until_label` («jue 5 nov») when it lifts on a date, else null, and `until_text` when it lifts on an event instead (G50 «hasta que la devuelvan a la IA, se cierre o el cliente vuelva a escribir tras 7 días», a G52 stage «hasta que la oportunidad cambie de etapa o se cierre»), else null. `lang` picks es or en. One row per person: their latest hold. Same day and same predicate as the `held` counts, newest first, at most 100.
|
|
136481
136481
|
*/
|
|
136482
136482
|
get: {
|
|
136483
136483
|
parameters: {
|
|
136484
136484
|
query: {
|
|
136485
136485
|
codes: string;
|
|
136486
|
+
lang?: "es" | "en";
|
|
136486
136487
|
};
|
|
136487
136488
|
header?: never;
|
|
136488
136489
|
path?: never;
|
|
@@ -136511,7 +136512,14 @@ interface paths {
|
|
|
136511
136512
|
* "situation": "never_replied",
|
|
136512
136513
|
* "step": 1,
|
|
136513
136514
|
* "last_at": "2026-10-24T14:00:12.000Z",
|
|
136514
|
-
* "held_until": null
|
|
136515
|
+
* "held_until": null,
|
|
136516
|
+
* "step_label": "Nunca respondió nuestro primer mensaje · paso 1 de 4",
|
|
136517
|
+
* "guard": "G25",
|
|
136518
|
+
* "label": "sin un canal por el que escribirle: sale cuando su ficha tenga teléfono o correo",
|
|
136519
|
+
* "reason": null,
|
|
136520
|
+
* "until": null,
|
|
136521
|
+
* "until_label": null,
|
|
136522
|
+
* "until_text": null
|
|
136515
136523
|
* }
|
|
136516
136524
|
* ]
|
|
136517
136525
|
* }
|
|
@@ -136597,7 +136605,7 @@ interface paths {
|
|
|
136597
136605
|
};
|
|
136598
136606
|
/**
|
|
136599
136607
|
* What a customer who stops answering receives (simulated)
|
|
136600
|
-
* @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`, and `now`, the live state: `conversations` with the team after an AI handoff, `by_class` (`informational`, `operational`, `sensitive`), `drafts_self_sending`, `customers_waiting`, the fact line `sentence` and `people` (one per conversation: `contact_id`, `contact_name`, `conversation_id`, `conversation_display_id`, `owner_user_id`, `owner_name`, `class`, `draft_auto_send_at`, `draft_auto_send_at_label`, `waiting_since`, `sentence`), `truncated`; null when the read failed). All copy is in `lang` (default the workspace’s).
|
|
136608
|
+
* @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`, `controls` (which of `followups`, `auto_send_after_hours`, `ai_answers_waiting_after_hours` do anything here: the AI-answer control is false at a clinic, where D73 and the teammate-reply resume run instead), and `now`, the live state: `conversations` with the team after an AI handoff, `by_class` (`informational`, `operational`, `sensitive`), `drafts_self_sending`, `customers_waiting`, the fact line `sentence` and `people` (one per conversation: `contact_id`, `contact_name`, `conversation_id`, `conversation_display_id`, `owner_user_id`, `owner_name`, `class`, `draft_auto_send_at`, `draft_auto_send_at_label`, `waiting_since`, `waited_hours`, `waited_label`, `promise_overdue`, `promise_label`, `next` (`kind` `draft` | `step` | `held` | `none`, `at_label`, `label`: the next step as one short fact, from the same facts as `sentence`), `sentence`; a broken promise sorts first), `truncated`; null when the read failed). `today.not_sent` counts people with a step that ended without a send today and no send at all today. All copy is in `lang` (default the workspace’s).
|
|
136601
136609
|
*/
|
|
136602
136610
|
get: {
|
|
136603
136611
|
parameters: {
|
|
@@ -136757,7 +136765,12 @@ interface paths {
|
|
|
136757
136765
|
* "auto_send_after_hours": 24,
|
|
136758
136766
|
* "ai_answers_waiting_after_hours": 2,
|
|
136759
136767
|
* "reminder_minutes": 30,
|
|
136760
|
-
* "
|
|
136768
|
+
* "controls": {
|
|
136769
|
+
* "followups": true,
|
|
136770
|
+
* "auto_send_after_hours": true,
|
|
136771
|
+
* "ai_answers_waiting_after_hours": true
|
|
136772
|
+
* },
|
|
136773
|
+
* "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, porque pidió una persona o por algo que solo puede hacer el equipo, la IA no escribe sola.",
|
|
136761
136774
|
* "now": {
|
|
136762
136775
|
* "conversations": 2,
|
|
136763
136776
|
* "by_class": {
|
|
@@ -136780,6 +136793,15 @@ interface paths {
|
|
|
136780
136793
|
* "draft_auto_send_at": "2026-10-25T16:30:00-03:00",
|
|
136781
136794
|
* "draft_auto_send_at_label": "mañana 16:30",
|
|
136782
136795
|
* "waiting_since": null,
|
|
136796
|
+
* "waited_hours": null,
|
|
136797
|
+
* "waited_label": null,
|
|
136798
|
+
* "promise_overdue": false,
|
|
136799
|
+
* "promise_label": null,
|
|
136800
|
+
* "next": {
|
|
136801
|
+
* "kind": "draft",
|
|
136802
|
+
* "at_label": "mañana 16:30",
|
|
136803
|
+
* "label": "borrador · mañana 16:30"
|
|
136804
|
+
* },
|
|
136783
136805
|
* "sentence": "Lo atiende Diego Navarrete · borrador listo · se envía solo mañana 16:30 si nadie lo revisa"
|
|
136784
136806
|
* },
|
|
136785
136807
|
* {
|
|
@@ -136793,7 +136815,16 @@ interface paths {
|
|
|
136793
136815
|
* "draft_auto_send_at": null,
|
|
136794
136816
|
* "draft_auto_send_at_label": null,
|
|
136795
136817
|
* "waiting_since": null,
|
|
136796
|
-
* "
|
|
136818
|
+
* "waited_hours": null,
|
|
136819
|
+
* "waited_label": null,
|
|
136820
|
+
* "promise_overdue": true,
|
|
136821
|
+
* "promise_label": "el vie 23 desde las 10:00 (no se cumplió)",
|
|
136822
|
+
* "next": {
|
|
136823
|
+
* "kind": "none",
|
|
136824
|
+
* "at_label": null,
|
|
136825
|
+
* "label": "le toca a Diego"
|
|
136826
|
+
* },
|
|
136827
|
+
* "sentence": "Lo atiende Diego · algo que solo puede hacer el equipo: la IA no escribe sola · La IA prometió que le escribirían el vie 23 desde las 10:00 (no se cumplió)"
|
|
136797
136828
|
* }
|
|
136798
136829
|
* ],
|
|
136799
136830
|
* "truncated": false
|
|
@@ -136920,7 +136951,7 @@ interface paths {
|
|
|
136920
136951
|
};
|
|
136921
136952
|
/**
|
|
136922
136953
|
* What happens next for each of a contact’s leads
|
|
136923
|
-
* @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), `held` (the sweep holds the step when it comes due, asked at that moment through the sweep’s own functions: G25 `no_reachable_address` (no phone or email for the step’s channel), G52 a visit fixed, the store visited or a sale under way; G50 handed to a person for a complaint or a step only a person can do; G49 «Nada»; G34, G36, R13 / G38, R5, G43; and the composer’s channel resolution: `no_deliverable_channel` (e.g. Instagram past its window), `template_missing`, `policy_blocked`, `account_restricted`. `held` carries the guard, `code` and `until` when known; never a send time), `draft` (a draft of the step is written and waits on a person: `draft` = `attempt_id`, `auto_send_at` and `auto_send_at_label` when G49 sends it itself, null when only a person sends it), `queued` (G24 backlog queue: `queue` = `position` (1-based), `waiting`, `per_day`, `label`; `at` is the estimated release), `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. `step_label` names the step as the hero does («Conversó y dejó de responder · paso 3 de 5»), and `sentence` uses it. `at` is the lead sweep’s hourly tick (the grid `/plan` draws). `handoff_draft` is set when the step becomes a draft for the person handling a handed-off conversation (G49: `approver_user_id`, `auto_send_at`, `auto_send_at_label`), else null. When the step resolves to another channel than configured (an Instagram step past its window goes as a WhatsApp template), `channel` and `what` name the resolved one. `conversations` is the chat rail’s next reminder on the person’s open WhatsApp / Instagram threads, from the chat sweep’s own candidate query and hold spacing: the same fields as a lead plus `conversation_id`, `thread_channel` and `situation: unanswered_message`. `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»).
|
|
136954
|
+
* @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), `held` (the sweep holds the step when it comes due, asked at that moment through the sweep’s own functions: G25 `no_reachable_address` (no phone or email for the step’s channel), G52 a visit fixed, the store visited or a sale under way; G50 handed to a person for a complaint or a step only a person can do; G49 «Nada»; G34, G36, R13 / G38, R5, G43; and the composer’s channel resolution: `no_deliverable_channel` (e.g. Instagram past its window), `template_missing`, `policy_blocked`, `account_restricted`. `held` carries the guard, `code` and `until` when known; never a send time), `draft` (a draft of the step is written and waits on a person: `draft` = `attempt_id`, `auto_send_at` and `auto_send_at_label` when G49 sends it itself, null when only a person sends it), `queued` (G24 backlog queue: `queue` = `position` (1-based), `waiting`, `per_day`, `label`; `at` is the estimated release), `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. `step_label` names the step as the hero does («Conversó y dejó de responder · paso 3 de 5»), and `sentence` uses it. `at` is the lead sweep’s hourly tick (the grid `/plan` draws). `handoff_draft` is set when the step becomes a draft for the person handling a handed-off conversation (G49: `approver_user_id`, `auto_send_at`, `auto_send_at_label`, `window_note`; `auto_send_at` is capped inside the channel’s 24 h window exactly as the engine stores it, null when only a person can send it), else null. When the step resolves to another channel than configured (an Instagram step past its window goes as a WhatsApp template), `channel` and `what` name the resolved one. `conversations` is the chat rail’s next reminder on the person’s open WhatsApp / Instagram threads, from the chat sweep’s own candidate query and hold spacing: the same fields as a lead plus `conversation_id`, `thread_channel` and `situation: unanswered_message`. `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`), `next` (`kind` `draft` | `step` | `held` | `none`, `at_label`, `label`: the next step as one short fact) and `sentence`, the state line («Lo atiende Diego · borrador listo · se envía solo mañana 16:30 si nadie lo revisa»). With no draft and nobody waiting, the line names the person’s actual next step: «borrador para quien lo atiende · {fecha}», the hold’s own words, or «sin seguimiento automático: le toca a {owner}».
|
|
136924
136955
|
*/
|
|
136925
136956
|
get: {
|
|
136926
136957
|
parameters: {
|
|
@@ -137008,6 +137039,11 @@ interface paths {
|
|
|
137008
137039
|
* "promise": false
|
|
137009
137040
|
* },
|
|
137010
137041
|
* "waiting": null,
|
|
137042
|
+
* "next": {
|
|
137043
|
+
* "kind": "draft",
|
|
137044
|
+
* "at_label": "mañana 16:30",
|
|
137045
|
+
* "label": "borrador · mañana 16:30"
|
|
137046
|
+
* },
|
|
137011
137047
|
* "sentence": "Lo atiende Diego · borrador listo · se envía solo mañana 16:30 si nadie lo revisa"
|
|
137012
137048
|
* }
|
|
137013
137049
|
* }
|
package/dist/index.d.ts
CHANGED
|
@@ -136477,12 +136477,13 @@ interface paths {
|
|
|
136477
136477
|
};
|
|
136478
136478
|
/**
|
|
136479
136479
|
* The people behind one «esperando (por qué)» line
|
|
136480
|
-
* @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`), and `step_label`, the step as the «Si no responde» hero names it («Conversó y dejó de responder · paso 3 de 5»; null when the plan does not draw it). One row per person: their latest hold. Same day and same predicate as the `held` counts, newest first, at most 100.
|
|
136480
|
+
* @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`), and `step_label`, the step as the «Si no responde» hero names it («Conversó y dejó de responder · paso 3 de 5»; null when the plan does not draw it). Each row also says what holds it, as `/next-steps` does: `guard`, `label` (the owner’s words; for G52 the predicate that matches now, «tiene una visita agendada»), `reason` (G52 only: `visit_scheduled` | `appointment` | `visit_note` | `visited` | `sale_in_progress`, else null), `until` and `until_label` («jue 5 nov») when it lifts on a date, else null, and `until_text` when it lifts on an event instead (G50 «hasta que la devuelvan a la IA, se cierre o el cliente vuelva a escribir tras 7 días», a G52 stage «hasta que la oportunidad cambie de etapa o se cierre»), else null. `lang` picks es or en. One row per person: their latest hold. Same day and same predicate as the `held` counts, newest first, at most 100.
|
|
136481
136481
|
*/
|
|
136482
136482
|
get: {
|
|
136483
136483
|
parameters: {
|
|
136484
136484
|
query: {
|
|
136485
136485
|
codes: string;
|
|
136486
|
+
lang?: "es" | "en";
|
|
136486
136487
|
};
|
|
136487
136488
|
header?: never;
|
|
136488
136489
|
path?: never;
|
|
@@ -136511,7 +136512,14 @@ interface paths {
|
|
|
136511
136512
|
* "situation": "never_replied",
|
|
136512
136513
|
* "step": 1,
|
|
136513
136514
|
* "last_at": "2026-10-24T14:00:12.000Z",
|
|
136514
|
-
* "held_until": null
|
|
136515
|
+
* "held_until": null,
|
|
136516
|
+
* "step_label": "Nunca respondió nuestro primer mensaje · paso 1 de 4",
|
|
136517
|
+
* "guard": "G25",
|
|
136518
|
+
* "label": "sin un canal por el que escribirle: sale cuando su ficha tenga teléfono o correo",
|
|
136519
|
+
* "reason": null,
|
|
136520
|
+
* "until": null,
|
|
136521
|
+
* "until_label": null,
|
|
136522
|
+
* "until_text": null
|
|
136515
136523
|
* }
|
|
136516
136524
|
* ]
|
|
136517
136525
|
* }
|
|
@@ -136597,7 +136605,7 @@ interface paths {
|
|
|
136597
136605
|
};
|
|
136598
136606
|
/**
|
|
136599
136607
|
* What a customer who stops answering receives (simulated)
|
|
136600
|
-
* @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`, and `now`, the live state: `conversations` with the team after an AI handoff, `by_class` (`informational`, `operational`, `sensitive`), `drafts_self_sending`, `customers_waiting`, the fact line `sentence` and `people` (one per conversation: `contact_id`, `contact_name`, `conversation_id`, `conversation_display_id`, `owner_user_id`, `owner_name`, `class`, `draft_auto_send_at`, `draft_auto_send_at_label`, `waiting_since`, `sentence`), `truncated`; null when the read failed). All copy is in `lang` (default the workspace’s).
|
|
136608
|
+
* @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`, `controls` (which of `followups`, `auto_send_after_hours`, `ai_answers_waiting_after_hours` do anything here: the AI-answer control is false at a clinic, where D73 and the teammate-reply resume run instead), and `now`, the live state: `conversations` with the team after an AI handoff, `by_class` (`informational`, `operational`, `sensitive`), `drafts_self_sending`, `customers_waiting`, the fact line `sentence` and `people` (one per conversation: `contact_id`, `contact_name`, `conversation_id`, `conversation_display_id`, `owner_user_id`, `owner_name`, `class`, `draft_auto_send_at`, `draft_auto_send_at_label`, `waiting_since`, `waited_hours`, `waited_label`, `promise_overdue`, `promise_label`, `next` (`kind` `draft` | `step` | `held` | `none`, `at_label`, `label`: the next step as one short fact, from the same facts as `sentence`), `sentence`; a broken promise sorts first), `truncated`; null when the read failed). `today.not_sent` counts people with a step that ended without a send today and no send at all today. All copy is in `lang` (default the workspace’s).
|
|
136601
136609
|
*/
|
|
136602
136610
|
get: {
|
|
136603
136611
|
parameters: {
|
|
@@ -136757,7 +136765,12 @@ interface paths {
|
|
|
136757
136765
|
* "auto_send_after_hours": 24,
|
|
136758
136766
|
* "ai_answers_waiting_after_hours": 2,
|
|
136759
136767
|
* "reminder_minutes": 30,
|
|
136760
|
-
* "
|
|
136768
|
+
* "controls": {
|
|
136769
|
+
* "followups": true,
|
|
136770
|
+
* "auto_send_after_hours": true,
|
|
136771
|
+
* "ai_answers_waiting_after_hours": true
|
|
136772
|
+
* },
|
|
136773
|
+
* "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, porque pidió una persona o por algo que solo puede hacer el equipo, la IA no escribe sola.",
|
|
136761
136774
|
* "now": {
|
|
136762
136775
|
* "conversations": 2,
|
|
136763
136776
|
* "by_class": {
|
|
@@ -136780,6 +136793,15 @@ interface paths {
|
|
|
136780
136793
|
* "draft_auto_send_at": "2026-10-25T16:30:00-03:00",
|
|
136781
136794
|
* "draft_auto_send_at_label": "mañana 16:30",
|
|
136782
136795
|
* "waiting_since": null,
|
|
136796
|
+
* "waited_hours": null,
|
|
136797
|
+
* "waited_label": null,
|
|
136798
|
+
* "promise_overdue": false,
|
|
136799
|
+
* "promise_label": null,
|
|
136800
|
+
* "next": {
|
|
136801
|
+
* "kind": "draft",
|
|
136802
|
+
* "at_label": "mañana 16:30",
|
|
136803
|
+
* "label": "borrador · mañana 16:30"
|
|
136804
|
+
* },
|
|
136783
136805
|
* "sentence": "Lo atiende Diego Navarrete · borrador listo · se envía solo mañana 16:30 si nadie lo revisa"
|
|
136784
136806
|
* },
|
|
136785
136807
|
* {
|
|
@@ -136793,7 +136815,16 @@ interface paths {
|
|
|
136793
136815
|
* "draft_auto_send_at": null,
|
|
136794
136816
|
* "draft_auto_send_at_label": null,
|
|
136795
136817
|
* "waiting_since": null,
|
|
136796
|
-
* "
|
|
136818
|
+
* "waited_hours": null,
|
|
136819
|
+
* "waited_label": null,
|
|
136820
|
+
* "promise_overdue": true,
|
|
136821
|
+
* "promise_label": "el vie 23 desde las 10:00 (no se cumplió)",
|
|
136822
|
+
* "next": {
|
|
136823
|
+
* "kind": "none",
|
|
136824
|
+
* "at_label": null,
|
|
136825
|
+
* "label": "le toca a Diego"
|
|
136826
|
+
* },
|
|
136827
|
+
* "sentence": "Lo atiende Diego · algo que solo puede hacer el equipo: la IA no escribe sola · La IA prometió que le escribirían el vie 23 desde las 10:00 (no se cumplió)"
|
|
136797
136828
|
* }
|
|
136798
136829
|
* ],
|
|
136799
136830
|
* "truncated": false
|
|
@@ -136920,7 +136951,7 @@ interface paths {
|
|
|
136920
136951
|
};
|
|
136921
136952
|
/**
|
|
136922
136953
|
* What happens next for each of a contact’s leads
|
|
136923
|
-
* @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), `held` (the sweep holds the step when it comes due, asked at that moment through the sweep’s own functions: G25 `no_reachable_address` (no phone or email for the step’s channel), G52 a visit fixed, the store visited or a sale under way; G50 handed to a person for a complaint or a step only a person can do; G49 «Nada»; G34, G36, R13 / G38, R5, G43; and the composer’s channel resolution: `no_deliverable_channel` (e.g. Instagram past its window), `template_missing`, `policy_blocked`, `account_restricted`. `held` carries the guard, `code` and `until` when known; never a send time), `draft` (a draft of the step is written and waits on a person: `draft` = `attempt_id`, `auto_send_at` and `auto_send_at_label` when G49 sends it itself, null when only a person sends it), `queued` (G24 backlog queue: `queue` = `position` (1-based), `waiting`, `per_day`, `label`; `at` is the estimated release), `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. `step_label` names the step as the hero does («Conversó y dejó de responder · paso 3 de 5»), and `sentence` uses it. `at` is the lead sweep’s hourly tick (the grid `/plan` draws). `handoff_draft` is set when the step becomes a draft for the person handling a handed-off conversation (G49: `approver_user_id`, `auto_send_at`, `auto_send_at_label`), else null. When the step resolves to another channel than configured (an Instagram step past its window goes as a WhatsApp template), `channel` and `what` name the resolved one. `conversations` is the chat rail’s next reminder on the person’s open WhatsApp / Instagram threads, from the chat sweep’s own candidate query and hold spacing: the same fields as a lead plus `conversation_id`, `thread_channel` and `situation: unanswered_message`. `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»).
|
|
136954
|
+
* @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), `held` (the sweep holds the step when it comes due, asked at that moment through the sweep’s own functions: G25 `no_reachable_address` (no phone or email for the step’s channel), G52 a visit fixed, the store visited or a sale under way; G50 handed to a person for a complaint or a step only a person can do; G49 «Nada»; G34, G36, R13 / G38, R5, G43; and the composer’s channel resolution: `no_deliverable_channel` (e.g. Instagram past its window), `template_missing`, `policy_blocked`, `account_restricted`. `held` carries the guard, `code` and `until` when known; never a send time), `draft` (a draft of the step is written and waits on a person: `draft` = `attempt_id`, `auto_send_at` and `auto_send_at_label` when G49 sends it itself, null when only a person sends it), `queued` (G24 backlog queue: `queue` = `position` (1-based), `waiting`, `per_day`, `label`; `at` is the estimated release), `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. `step_label` names the step as the hero does («Conversó y dejó de responder · paso 3 de 5»), and `sentence` uses it. `at` is the lead sweep’s hourly tick (the grid `/plan` draws). `handoff_draft` is set when the step becomes a draft for the person handling a handed-off conversation (G49: `approver_user_id`, `auto_send_at`, `auto_send_at_label`, `window_note`; `auto_send_at` is capped inside the channel’s 24 h window exactly as the engine stores it, null when only a person can send it), else null. When the step resolves to another channel than configured (an Instagram step past its window goes as a WhatsApp template), `channel` and `what` name the resolved one. `conversations` is the chat rail’s next reminder on the person’s open WhatsApp / Instagram threads, from the chat sweep’s own candidate query and hold spacing: the same fields as a lead plus `conversation_id`, `thread_channel` and `situation: unanswered_message`. `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`), `next` (`kind` `draft` | `step` | `held` | `none`, `at_label`, `label`: the next step as one short fact) and `sentence`, the state line («Lo atiende Diego · borrador listo · se envía solo mañana 16:30 si nadie lo revisa»). With no draft and nobody waiting, the line names the person’s actual next step: «borrador para quien lo atiende · {fecha}», the hold’s own words, or «sin seguimiento automático: le toca a {owner}».
|
|
136924
136955
|
*/
|
|
136925
136956
|
get: {
|
|
136926
136957
|
parameters: {
|
|
@@ -137008,6 +137039,11 @@ interface paths {
|
|
|
137008
137039
|
* "promise": false
|
|
137009
137040
|
* },
|
|
137010
137041
|
* "waiting": null,
|
|
137042
|
+
* "next": {
|
|
137043
|
+
* "kind": "draft",
|
|
137044
|
+
* "at_label": "mañana 16:30",
|
|
137045
|
+
* "label": "borrador · mañana 16:30"
|
|
137046
|
+
* },
|
|
137011
137047
|
* "sentence": "Lo atiende Diego · borrador listo · se envía solo mañana 16:30 si nadie lo revisa"
|
|
137012
137048
|
* }
|
|
137013
137049
|
* }
|
package/package.json
CHANGED