@vitrina/api 14.106.10 → 14.107.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -17863,6 +17863,8 @@ interface paths {
17863
17863
  *
17864
17864
  * Every row carries `tenencia` and `not_on_lot` — the latter true iff an ACTIVE contract with `modalidad=virtual` exists, resolved in ONE batched query for the page (never per row). `not_on_lot` is the flag a test-drive or walking-sheet surface acts on; `tenencia` alone cannot answer it, because the modalidad lives on the contract.
17865
17865
  *
17866
+ * POSIBLE DUPLICADO. Every row carries `possible_duplicate`: true when an open duplicate candidate names the car (same photos and specs as another car, plates one character apart or an implausible VIN). The pairs are at `GET /vehicles/{id}/duplicate-candidates`.
17867
+ *
17866
17868
  * ⚠ `tenencia=propio` IS THE COLUMN DEFAULT, not a recorded decision: that cohort includes every unit nobody has classified yet. Do not word it as "comprado".
17867
17869
  *
17868
17870
  * Phase 2 (tenencia_source): `tenencia_source` COMPOSES with `tenencia` rather than narrowing it — `?tenencia=propio&tenencia_source=decided` is "propio, and a person or a document actually settled that" (`decided` ⇒ `tenencia_source <> 'default'`); `document` / `declared` / `default` match the column exactly. See `POST /vehicles/tenencia` for how a `declared` row is produced.
@@ -129342,7 +129344,6 @@ interface paths {
129342
129344
  * "glossary": [],
129343
129345
  * "timezone": "America/Santiago",
129344
129346
  * "withinBusinessHours": true,
129345
- * "nextOpening": null,
129346
129347
  * "businessHoursReason": null,
129347
129348
  * "currency": "CLP",
129348
129349
  * "dateFormat": "latam"
@@ -135746,7 +135747,7 @@ interface paths {
135746
135747
  };
135747
135748
  /**
135748
135749
  * Get the Recontacto cadence configuration
135749
- * @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» (A9.2): a conversation is silent from an AI handoff of any kind or a teammate takeover until «Devolver a la IA» or the close. `while_silent` (stored as `followups` + `auto_send_after_hours`): `draft_and_remind` (default: each due step a draft for whoever handles it, sent by hand), `draft_auto_send` (the draft sends itself after `auto_send_after_hours`, 1 to 144, inside contact hours; a teammate’s promised time wins), `remind_only` (no draft; whoever handles it is reminded) or `nothing`. `ai_answers_waiting`: `never` (default: whoever handles it is reminded at 30 minutes, then an admin), `after_minutes` (the AI answers after `ai_answers_waiting_after_minutes`, 5 to 720) or `after_quiet_days` (only a customer back after 7 quiet days). `ai_answers_waiting_after_hours` is the older spelling (N = `after_minutes` with N × 60, null = `never`). A person whose lead is in a late stage (visit scheduled or done, a sale under way) gets no follow-ups for 14 days after entering it or their last message (G52); then the ladder resumes through the backlog queue.
135750
+ * @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` 6): `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» (A9.2): a conversation is silent from an AI handoff of any kind or a teammate takeover until «Devolver a la IA» or the close. `while_silent` (stored as `followups` + `auto_send_after_hours`): `draft_and_remind` (default: each due step a draft for whoever handles it, sent by hand), `draft_auto_send` (the draft sends itself after `auto_send_after_hours`, 1 to 144, inside contact hours; a teammate’s promised time wins), `remind_only` (no draft; whoever handles it is reminded) or `nothing`. `ai_answers_waiting`: `never` (default: whoever handles it is reminded at 30 minutes, then an admin), `after_minutes` (the AI answers after `ai_answers_waiting_after_minutes`, 5 to 720) or `after_quiet_days` (only a customer back after 7 quiet days). `ai_answers_waiting_after_hours` is the older spelling (N = `after_minutes` with N × 60, null = `never`). A person whose lead is in a late stage (visit scheduled or done, a sale under way) gets no follow-ups for 14 days after entering it or their last message (G52); then the ladder resumes through the backlog queue.
135750
135751
  */
135751
135752
  get: {
135752
135753
  parameters: {
@@ -135847,7 +135848,7 @@ interface paths {
135847
135848
  * "entry_max_silence_days": 45,
135848
135849
  * "hot_leads_faster": false,
135849
135850
  * "max_paths_per_lead": 3,
135850
- * "max_messages_per_person_90d": 12
135851
+ * "max_messages_per_person_90d": 6
135851
135852
  * },
135852
135853
  * "after_handoff": {
135853
135854
  * "followups": "draft_for_owner",
@@ -136126,7 +136127,7 @@ interface paths {
136126
136127
  * "entry_max_silence_days": 45,
136127
136128
  * "hot_leads_faster": false,
136128
136129
  * "max_paths_per_lead": 3,
136129
- * "max_messages_per_person_90d": 12
136130
+ * "max_messages_per_person_90d": 6
136130
136131
  * },
136131
136132
  * "after_handoff": {
136132
136133
  * "followups": "draft_for_owner",
@@ -137174,7 +137175,7 @@ interface paths {
137174
137175
  };
137175
137176
  /**
137176
137177
  * What happens next for each of a contact’s leads
137177
- * @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}».
137178
+ * @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`: why it was handed over; since 2026-10-25 it no longer decides anything: every handed-off or taken conversation is silent until «Devolver a la IA», its steps follow `mode`, and the AI answers a waiting customer only when `after_handoff.ai_answers_waiting` allows it), `draft` (the pending draft: `attempt_id`, `auto_send_at`, `auto_send_at_label`, `promise` when a teammate’s promised time set it, `window_note`: when it must be sent by on a free-text WhatsApp or Instagram draft), `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}».
137178
137179
  */
137179
137180
  get: {
137180
137181
  parameters: {
@@ -204689,6 +204690,369 @@ interface paths {
204689
204690
  patch?: never;
204690
204691
  trace?: never;
204691
204692
  };
204693
+ "/vehicles/{id}/duplicate-candidates": {
204694
+ parameters: {
204695
+ query?: never;
204696
+ header?: never;
204697
+ path?: never;
204698
+ cookie?: never;
204699
+ };
204700
+ /**
204701
+ * Possible duplicates of this car
204702
+ * @description Posible duplicado: other cars of the workspace that share this car’s photos and specs but whose identifiers conflict in a way a person could have typed. `reason` is `plate_typo` (both plates present, one character apart) or `invalid_vin` (at least one VIN is implausible: not 17 characters, a non-alphanumeric character, an I/O/Q, or all digits). The nightly photo reconciliation records them; it never merges such a pair on its own.
204703
+ *
204704
+ * Only OPEN candidates are listed: not dismissed, not resolved by a merge, and with both cars live (not merged, not deleted). The car may sit on either side of a pair; `other_vehicle` is always the OTHER car, with `lead_count` = the lead interests pointing at it. Act on a candidate with `POST /vehicles/{id}/merge` or `POST /vehicles/duplicate-candidates/{candidateId}/dismiss`. Automotive-vertical only: a workspace on another vertical gets 403 here however its scopes are set.
204705
+ */
204706
+ get: {
204707
+ parameters: {
204708
+ query?: never;
204709
+ header?: never;
204710
+ path: {
204711
+ id: string;
204712
+ };
204713
+ cookie?: never;
204714
+ };
204715
+ requestBody?: never;
204716
+ responses: {
204717
+ /** @description Open duplicate candidates of the car */
204718
+ 200: {
204719
+ headers: {
204720
+ [name: string]: unknown;
204721
+ };
204722
+ content: {
204723
+ /**
204724
+ * @example {
204725
+ * "data": [
204726
+ * {
204727
+ * "id": "0b7c4e2a-5d1f-4a8e-9c3b-2f6d8e1a4b70",
204728
+ * "reason": "plate_typo",
204729
+ * "detected_at": "2026-10-26T06:12:40.000Z",
204730
+ * "other_vehicle": {
204731
+ * "id": "88f2fa25-3c71-4e0b-9a4d-6b1e2c7d5f90",
204732
+ * "title": "MINI Cooper S 2017",
204733
+ * "plate_normalized": "JLGJ42",
204734
+ * "vin": "25423423423131313",
204735
+ * "status": "disponible",
204736
+ * "active": true,
204737
+ * "price_clp": 15990000,
204738
+ * "photo_url": "https://cdn.example.com/vehicles/88f2fa25/1.jpg",
204739
+ * "lead_count": 5,
204740
+ * "created_at": "2026-09-02T14:05:11.000Z"
204741
+ * }
204742
+ * }
204743
+ * ]
204744
+ * }
204745
+ */
204746
+ "application/json": {
204747
+ data?: unknown;
204748
+ meta?: {
204749
+ [key: string]: unknown;
204750
+ };
204751
+ };
204752
+ };
204753
+ };
204754
+ /** @description Validation error */
204755
+ 400: {
204756
+ headers: {
204757
+ [name: string]: unknown;
204758
+ };
204759
+ content: {
204760
+ "application/json": components["schemas"]["Error"];
204761
+ };
204762
+ };
204763
+ /** @description Unauthorized */
204764
+ 401: {
204765
+ headers: {
204766
+ [name: string]: unknown;
204767
+ };
204768
+ content: {
204769
+ "application/json": components["schemas"]["Error"];
204770
+ };
204771
+ };
204772
+ /** @description Forbidden */
204773
+ 403: {
204774
+ headers: {
204775
+ [name: string]: unknown;
204776
+ };
204777
+ content: {
204778
+ "application/json": components["schemas"]["Error"];
204779
+ };
204780
+ };
204781
+ /** @description Not found */
204782
+ 404: {
204783
+ headers: {
204784
+ [name: string]: unknown;
204785
+ };
204786
+ content: {
204787
+ "application/json": components["schemas"]["Error"];
204788
+ };
204789
+ };
204790
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
204791
+ 409: {
204792
+ headers: {
204793
+ [name: string]: unknown;
204794
+ };
204795
+ content: {
204796
+ "application/json": components["schemas"]["Error"];
204797
+ };
204798
+ };
204799
+ /** @description Rate limited */
204800
+ 429: {
204801
+ headers: {
204802
+ [name: string]: unknown;
204803
+ };
204804
+ content: {
204805
+ "application/json": components["schemas"]["Error"];
204806
+ };
204807
+ };
204808
+ };
204809
+ };
204810
+ put?: never;
204811
+ post?: never;
204812
+ delete?: never;
204813
+ options?: never;
204814
+ head?: never;
204815
+ patch?: never;
204816
+ trace?: never;
204817
+ };
204818
+ "/vehicles/{id}/merge": {
204819
+ parameters: {
204820
+ query?: never;
204821
+ header?: never;
204822
+ path?: never;
204823
+ cookie?: never;
204824
+ };
204825
+ get?: never;
204826
+ put?: never;
204827
+ /**
204828
+ * Merge two cars into one
204829
+ * @description Fusionar: collapse this car and `other_vehicle_id` into ONE car. The survivor is chosen by the platform, never by the caller: an active car beats an inactive one, then the ERP stock-of-record row beats a portal row, then the car with more activity (leads, alerts, publications), then the older one. Every lead, reserva, documento, publicación, cita and cost line of the loser moves onto the survivor; the loser stops appearing in Stock. It cannot be undone through the API.
204830
+ *
204831
+ * Any two live cars of the workspace may be merged; a duplicate candidate is not required. Merging resolves every candidate naming the loser. 404 when either car is unknown, merged or deleted; 409 when both ids are the same car. Answers `{ survivor_id, loser_id }`. Automotive-vertical only: a workspace on another vertical gets 403 here however its scopes are set.
204832
+ */
204833
+ post: {
204834
+ parameters: {
204835
+ query?: never;
204836
+ header?: {
204837
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
204838
+ "Idempotency-Key"?: string;
204839
+ };
204840
+ path: {
204841
+ id: string;
204842
+ };
204843
+ cookie?: never;
204844
+ };
204845
+ requestBody?: {
204846
+ content: {
204847
+ /**
204848
+ * @example {
204849
+ * "other_vehicle_id": "88f2fa25-3c71-4e0b-9a4d-6b1e2c7d5f90"
204850
+ * }
204851
+ */
204852
+ "application/json": {
204853
+ /**
204854
+ * Format: uuid
204855
+ * @description The other car of the workspace to merge with this one.
204856
+ */
204857
+ other_vehicle_id: string;
204858
+ };
204859
+ };
204860
+ };
204861
+ responses: {
204862
+ /** @description `{ survivor_id, loser_id }` */
204863
+ 200: {
204864
+ headers: {
204865
+ [name: string]: unknown;
204866
+ };
204867
+ content: {
204868
+ /**
204869
+ * @example {
204870
+ * "data": {
204871
+ * "survivor_id": "3b1f8a52-9d34-4a7e-8f2c-1a2b3c4d5e6f",
204872
+ * "loser_id": "88f2fa25-3c71-4e0b-9a4d-6b1e2c7d5f90"
204873
+ * }
204874
+ * }
204875
+ */
204876
+ "application/json": {
204877
+ data?: unknown;
204878
+ meta?: {
204879
+ [key: string]: unknown;
204880
+ };
204881
+ };
204882
+ };
204883
+ };
204884
+ /** @description Validation error */
204885
+ 400: {
204886
+ headers: {
204887
+ [name: string]: unknown;
204888
+ };
204889
+ content: {
204890
+ "application/json": components["schemas"]["Error"];
204891
+ };
204892
+ };
204893
+ /** @description Unauthorized */
204894
+ 401: {
204895
+ headers: {
204896
+ [name: string]: unknown;
204897
+ };
204898
+ content: {
204899
+ "application/json": components["schemas"]["Error"];
204900
+ };
204901
+ };
204902
+ /** @description Forbidden */
204903
+ 403: {
204904
+ headers: {
204905
+ [name: string]: unknown;
204906
+ };
204907
+ content: {
204908
+ "application/json": components["schemas"]["Error"];
204909
+ };
204910
+ };
204911
+ /** @description Not found */
204912
+ 404: {
204913
+ headers: {
204914
+ [name: string]: unknown;
204915
+ };
204916
+ content: {
204917
+ "application/json": components["schemas"]["Error"];
204918
+ };
204919
+ };
204920
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
204921
+ 409: {
204922
+ headers: {
204923
+ [name: string]: unknown;
204924
+ };
204925
+ content: {
204926
+ "application/json": components["schemas"]["Error"];
204927
+ };
204928
+ };
204929
+ /** @description Rate limited */
204930
+ 429: {
204931
+ headers: {
204932
+ [name: string]: unknown;
204933
+ };
204934
+ content: {
204935
+ "application/json": components["schemas"]["Error"];
204936
+ };
204937
+ };
204938
+ };
204939
+ };
204940
+ delete?: never;
204941
+ options?: never;
204942
+ head?: never;
204943
+ patch?: never;
204944
+ trace?: never;
204945
+ };
204946
+ "/vehicles/duplicate-candidates/{candidateId}/dismiss": {
204947
+ parameters: {
204948
+ query?: never;
204949
+ header?: never;
204950
+ path?: never;
204951
+ cookie?: never;
204952
+ };
204953
+ get?: never;
204954
+ put?: never;
204955
+ /**
204956
+ * Dismiss a possible duplicate
204957
+ * @description «No es el mismo auto»: the two cars of the candidate are different cars. The pair leaves `GET /vehicles/{id}/duplicate-candidates` and the Stock list’s `possible_duplicate` flag, and the reconciliation never flags it again. Idempotent. 404 when the candidate is not in this workspace. Answers `{ id }`. Automotive-vertical only: a workspace on another vertical gets 403 here however its scopes are set.
204958
+ */
204959
+ post: {
204960
+ parameters: {
204961
+ query?: never;
204962
+ header?: {
204963
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
204964
+ "Idempotency-Key"?: string;
204965
+ };
204966
+ path: {
204967
+ candidateId: string;
204968
+ };
204969
+ cookie?: never;
204970
+ };
204971
+ requestBody?: never;
204972
+ responses: {
204973
+ /** @description `{ id }` of the dismissed candidate */
204974
+ 200: {
204975
+ headers: {
204976
+ [name: string]: unknown;
204977
+ };
204978
+ content: {
204979
+ /**
204980
+ * @example {
204981
+ * "data": {
204982
+ * "id": "0b7c4e2a-5d1f-4a8e-9c3b-2f6d8e1a4b70"
204983
+ * }
204984
+ * }
204985
+ */
204986
+ "application/json": {
204987
+ data?: unknown;
204988
+ meta?: {
204989
+ [key: string]: unknown;
204990
+ };
204991
+ };
204992
+ };
204993
+ };
204994
+ /** @description Validation error */
204995
+ 400: {
204996
+ headers: {
204997
+ [name: string]: unknown;
204998
+ };
204999
+ content: {
205000
+ "application/json": components["schemas"]["Error"];
205001
+ };
205002
+ };
205003
+ /** @description Unauthorized */
205004
+ 401: {
205005
+ headers: {
205006
+ [name: string]: unknown;
205007
+ };
205008
+ content: {
205009
+ "application/json": components["schemas"]["Error"];
205010
+ };
205011
+ };
205012
+ /** @description Forbidden */
205013
+ 403: {
205014
+ headers: {
205015
+ [name: string]: unknown;
205016
+ };
205017
+ content: {
205018
+ "application/json": components["schemas"]["Error"];
205019
+ };
205020
+ };
205021
+ /** @description Not found */
205022
+ 404: {
205023
+ headers: {
205024
+ [name: string]: unknown;
205025
+ };
205026
+ content: {
205027
+ "application/json": components["schemas"]["Error"];
205028
+ };
205029
+ };
205030
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
205031
+ 409: {
205032
+ headers: {
205033
+ [name: string]: unknown;
205034
+ };
205035
+ content: {
205036
+ "application/json": components["schemas"]["Error"];
205037
+ };
205038
+ };
205039
+ /** @description Rate limited */
205040
+ 429: {
205041
+ headers: {
205042
+ [name: string]: unknown;
205043
+ };
205044
+ content: {
205045
+ "application/json": components["schemas"]["Error"];
205046
+ };
205047
+ };
205048
+ };
205049
+ };
205050
+ delete?: never;
205051
+ options?: never;
205052
+ head?: never;
205053
+ patch?: never;
205054
+ trace?: never;
205055
+ };
204692
205056
  "/vehicles/{id}/interest": {
204693
205057
  parameters: {
204694
205058
  query?: never;
package/dist/index.d.ts CHANGED
@@ -17863,6 +17863,8 @@ interface paths {
17863
17863
  *
17864
17864
  * Every row carries `tenencia` and `not_on_lot` — the latter true iff an ACTIVE contract with `modalidad=virtual` exists, resolved in ONE batched query for the page (never per row). `not_on_lot` is the flag a test-drive or walking-sheet surface acts on; `tenencia` alone cannot answer it, because the modalidad lives on the contract.
17865
17865
  *
17866
+ * POSIBLE DUPLICADO. Every row carries `possible_duplicate`: true when an open duplicate candidate names the car (same photos and specs as another car, plates one character apart or an implausible VIN). The pairs are at `GET /vehicles/{id}/duplicate-candidates`.
17867
+ *
17866
17868
  * ⚠ `tenencia=propio` IS THE COLUMN DEFAULT, not a recorded decision: that cohort includes every unit nobody has classified yet. Do not word it as "comprado".
17867
17869
  *
17868
17870
  * Phase 2 (tenencia_source): `tenencia_source` COMPOSES with `tenencia` rather than narrowing it — `?tenencia=propio&tenencia_source=decided` is "propio, and a person or a document actually settled that" (`decided` ⇒ `tenencia_source <> 'default'`); `document` / `declared` / `default` match the column exactly. See `POST /vehicles/tenencia` for how a `declared` row is produced.
@@ -129342,7 +129344,6 @@ interface paths {
129342
129344
  * "glossary": [],
129343
129345
  * "timezone": "America/Santiago",
129344
129346
  * "withinBusinessHours": true,
129345
- * "nextOpening": null,
129346
129347
  * "businessHoursReason": null,
129347
129348
  * "currency": "CLP",
129348
129349
  * "dateFormat": "latam"
@@ -135746,7 +135747,7 @@ interface paths {
135746
135747
  };
135747
135748
  /**
135748
135749
  * Get the Recontacto cadence configuration
135749
- * @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» (A9.2): a conversation is silent from an AI handoff of any kind or a teammate takeover until «Devolver a la IA» or the close. `while_silent` (stored as `followups` + `auto_send_after_hours`): `draft_and_remind` (default: each due step a draft for whoever handles it, sent by hand), `draft_auto_send` (the draft sends itself after `auto_send_after_hours`, 1 to 144, inside contact hours; a teammate’s promised time wins), `remind_only` (no draft; whoever handles it is reminded) or `nothing`. `ai_answers_waiting`: `never` (default: whoever handles it is reminded at 30 minutes, then an admin), `after_minutes` (the AI answers after `ai_answers_waiting_after_minutes`, 5 to 720) or `after_quiet_days` (only a customer back after 7 quiet days). `ai_answers_waiting_after_hours` is the older spelling (N = `after_minutes` with N × 60, null = `never`). A person whose lead is in a late stage (visit scheduled or done, a sale under way) gets no follow-ups for 14 days after entering it or their last message (G52); then the ladder resumes through the backlog queue.
135750
+ * @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` 6): `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» (A9.2): a conversation is silent from an AI handoff of any kind or a teammate takeover until «Devolver a la IA» or the close. `while_silent` (stored as `followups` + `auto_send_after_hours`): `draft_and_remind` (default: each due step a draft for whoever handles it, sent by hand), `draft_auto_send` (the draft sends itself after `auto_send_after_hours`, 1 to 144, inside contact hours; a teammate’s promised time wins), `remind_only` (no draft; whoever handles it is reminded) or `nothing`. `ai_answers_waiting`: `never` (default: whoever handles it is reminded at 30 minutes, then an admin), `after_minutes` (the AI answers after `ai_answers_waiting_after_minutes`, 5 to 720) or `after_quiet_days` (only a customer back after 7 quiet days). `ai_answers_waiting_after_hours` is the older spelling (N = `after_minutes` with N × 60, null = `never`). A person whose lead is in a late stage (visit scheduled or done, a sale under way) gets no follow-ups for 14 days after entering it or their last message (G52); then the ladder resumes through the backlog queue.
135750
135751
  */
135751
135752
  get: {
135752
135753
  parameters: {
@@ -135847,7 +135848,7 @@ interface paths {
135847
135848
  * "entry_max_silence_days": 45,
135848
135849
  * "hot_leads_faster": false,
135849
135850
  * "max_paths_per_lead": 3,
135850
- * "max_messages_per_person_90d": 12
135851
+ * "max_messages_per_person_90d": 6
135851
135852
  * },
135852
135853
  * "after_handoff": {
135853
135854
  * "followups": "draft_for_owner",
@@ -136126,7 +136127,7 @@ interface paths {
136126
136127
  * "entry_max_silence_days": 45,
136127
136128
  * "hot_leads_faster": false,
136128
136129
  * "max_paths_per_lead": 3,
136129
- * "max_messages_per_person_90d": 12
136130
+ * "max_messages_per_person_90d": 6
136130
136131
  * },
136131
136132
  * "after_handoff": {
136132
136133
  * "followups": "draft_for_owner",
@@ -137174,7 +137175,7 @@ interface paths {
137174
137175
  };
137175
137176
  /**
137176
137177
  * What happens next for each of a contact’s leads
137177
- * @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}».
137178
+ * @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`: why it was handed over; since 2026-10-25 it no longer decides anything: every handed-off or taken conversation is silent until «Devolver a la IA», its steps follow `mode`, and the AI answers a waiting customer only when `after_handoff.ai_answers_waiting` allows it), `draft` (the pending draft: `attempt_id`, `auto_send_at`, `auto_send_at_label`, `promise` when a teammate’s promised time set it, `window_note`: when it must be sent by on a free-text WhatsApp or Instagram draft), `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}».
137178
137179
  */
137179
137180
  get: {
137180
137181
  parameters: {
@@ -204689,6 +204690,369 @@ interface paths {
204689
204690
  patch?: never;
204690
204691
  trace?: never;
204691
204692
  };
204693
+ "/vehicles/{id}/duplicate-candidates": {
204694
+ parameters: {
204695
+ query?: never;
204696
+ header?: never;
204697
+ path?: never;
204698
+ cookie?: never;
204699
+ };
204700
+ /**
204701
+ * Possible duplicates of this car
204702
+ * @description Posible duplicado: other cars of the workspace that share this car’s photos and specs but whose identifiers conflict in a way a person could have typed. `reason` is `plate_typo` (both plates present, one character apart) or `invalid_vin` (at least one VIN is implausible: not 17 characters, a non-alphanumeric character, an I/O/Q, or all digits). The nightly photo reconciliation records them; it never merges such a pair on its own.
204703
+ *
204704
+ * Only OPEN candidates are listed: not dismissed, not resolved by a merge, and with both cars live (not merged, not deleted). The car may sit on either side of a pair; `other_vehicle` is always the OTHER car, with `lead_count` = the lead interests pointing at it. Act on a candidate with `POST /vehicles/{id}/merge` or `POST /vehicles/duplicate-candidates/{candidateId}/dismiss`. Automotive-vertical only: a workspace on another vertical gets 403 here however its scopes are set.
204705
+ */
204706
+ get: {
204707
+ parameters: {
204708
+ query?: never;
204709
+ header?: never;
204710
+ path: {
204711
+ id: string;
204712
+ };
204713
+ cookie?: never;
204714
+ };
204715
+ requestBody?: never;
204716
+ responses: {
204717
+ /** @description Open duplicate candidates of the car */
204718
+ 200: {
204719
+ headers: {
204720
+ [name: string]: unknown;
204721
+ };
204722
+ content: {
204723
+ /**
204724
+ * @example {
204725
+ * "data": [
204726
+ * {
204727
+ * "id": "0b7c4e2a-5d1f-4a8e-9c3b-2f6d8e1a4b70",
204728
+ * "reason": "plate_typo",
204729
+ * "detected_at": "2026-10-26T06:12:40.000Z",
204730
+ * "other_vehicle": {
204731
+ * "id": "88f2fa25-3c71-4e0b-9a4d-6b1e2c7d5f90",
204732
+ * "title": "MINI Cooper S 2017",
204733
+ * "plate_normalized": "JLGJ42",
204734
+ * "vin": "25423423423131313",
204735
+ * "status": "disponible",
204736
+ * "active": true,
204737
+ * "price_clp": 15990000,
204738
+ * "photo_url": "https://cdn.example.com/vehicles/88f2fa25/1.jpg",
204739
+ * "lead_count": 5,
204740
+ * "created_at": "2026-09-02T14:05:11.000Z"
204741
+ * }
204742
+ * }
204743
+ * ]
204744
+ * }
204745
+ */
204746
+ "application/json": {
204747
+ data?: unknown;
204748
+ meta?: {
204749
+ [key: string]: unknown;
204750
+ };
204751
+ };
204752
+ };
204753
+ };
204754
+ /** @description Validation error */
204755
+ 400: {
204756
+ headers: {
204757
+ [name: string]: unknown;
204758
+ };
204759
+ content: {
204760
+ "application/json": components["schemas"]["Error"];
204761
+ };
204762
+ };
204763
+ /** @description Unauthorized */
204764
+ 401: {
204765
+ headers: {
204766
+ [name: string]: unknown;
204767
+ };
204768
+ content: {
204769
+ "application/json": components["schemas"]["Error"];
204770
+ };
204771
+ };
204772
+ /** @description Forbidden */
204773
+ 403: {
204774
+ headers: {
204775
+ [name: string]: unknown;
204776
+ };
204777
+ content: {
204778
+ "application/json": components["schemas"]["Error"];
204779
+ };
204780
+ };
204781
+ /** @description Not found */
204782
+ 404: {
204783
+ headers: {
204784
+ [name: string]: unknown;
204785
+ };
204786
+ content: {
204787
+ "application/json": components["schemas"]["Error"];
204788
+ };
204789
+ };
204790
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
204791
+ 409: {
204792
+ headers: {
204793
+ [name: string]: unknown;
204794
+ };
204795
+ content: {
204796
+ "application/json": components["schemas"]["Error"];
204797
+ };
204798
+ };
204799
+ /** @description Rate limited */
204800
+ 429: {
204801
+ headers: {
204802
+ [name: string]: unknown;
204803
+ };
204804
+ content: {
204805
+ "application/json": components["schemas"]["Error"];
204806
+ };
204807
+ };
204808
+ };
204809
+ };
204810
+ put?: never;
204811
+ post?: never;
204812
+ delete?: never;
204813
+ options?: never;
204814
+ head?: never;
204815
+ patch?: never;
204816
+ trace?: never;
204817
+ };
204818
+ "/vehicles/{id}/merge": {
204819
+ parameters: {
204820
+ query?: never;
204821
+ header?: never;
204822
+ path?: never;
204823
+ cookie?: never;
204824
+ };
204825
+ get?: never;
204826
+ put?: never;
204827
+ /**
204828
+ * Merge two cars into one
204829
+ * @description Fusionar: collapse this car and `other_vehicle_id` into ONE car. The survivor is chosen by the platform, never by the caller: an active car beats an inactive one, then the ERP stock-of-record row beats a portal row, then the car with more activity (leads, alerts, publications), then the older one. Every lead, reserva, documento, publicación, cita and cost line of the loser moves onto the survivor; the loser stops appearing in Stock. It cannot be undone through the API.
204830
+ *
204831
+ * Any two live cars of the workspace may be merged; a duplicate candidate is not required. Merging resolves every candidate naming the loser. 404 when either car is unknown, merged or deleted; 409 when both ids are the same car. Answers `{ survivor_id, loser_id }`. Automotive-vertical only: a workspace on another vertical gets 403 here however its scopes are set.
204832
+ */
204833
+ post: {
204834
+ parameters: {
204835
+ query?: never;
204836
+ header?: {
204837
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
204838
+ "Idempotency-Key"?: string;
204839
+ };
204840
+ path: {
204841
+ id: string;
204842
+ };
204843
+ cookie?: never;
204844
+ };
204845
+ requestBody?: {
204846
+ content: {
204847
+ /**
204848
+ * @example {
204849
+ * "other_vehicle_id": "88f2fa25-3c71-4e0b-9a4d-6b1e2c7d5f90"
204850
+ * }
204851
+ */
204852
+ "application/json": {
204853
+ /**
204854
+ * Format: uuid
204855
+ * @description The other car of the workspace to merge with this one.
204856
+ */
204857
+ other_vehicle_id: string;
204858
+ };
204859
+ };
204860
+ };
204861
+ responses: {
204862
+ /** @description `{ survivor_id, loser_id }` */
204863
+ 200: {
204864
+ headers: {
204865
+ [name: string]: unknown;
204866
+ };
204867
+ content: {
204868
+ /**
204869
+ * @example {
204870
+ * "data": {
204871
+ * "survivor_id": "3b1f8a52-9d34-4a7e-8f2c-1a2b3c4d5e6f",
204872
+ * "loser_id": "88f2fa25-3c71-4e0b-9a4d-6b1e2c7d5f90"
204873
+ * }
204874
+ * }
204875
+ */
204876
+ "application/json": {
204877
+ data?: unknown;
204878
+ meta?: {
204879
+ [key: string]: unknown;
204880
+ };
204881
+ };
204882
+ };
204883
+ };
204884
+ /** @description Validation error */
204885
+ 400: {
204886
+ headers: {
204887
+ [name: string]: unknown;
204888
+ };
204889
+ content: {
204890
+ "application/json": components["schemas"]["Error"];
204891
+ };
204892
+ };
204893
+ /** @description Unauthorized */
204894
+ 401: {
204895
+ headers: {
204896
+ [name: string]: unknown;
204897
+ };
204898
+ content: {
204899
+ "application/json": components["schemas"]["Error"];
204900
+ };
204901
+ };
204902
+ /** @description Forbidden */
204903
+ 403: {
204904
+ headers: {
204905
+ [name: string]: unknown;
204906
+ };
204907
+ content: {
204908
+ "application/json": components["schemas"]["Error"];
204909
+ };
204910
+ };
204911
+ /** @description Not found */
204912
+ 404: {
204913
+ headers: {
204914
+ [name: string]: unknown;
204915
+ };
204916
+ content: {
204917
+ "application/json": components["schemas"]["Error"];
204918
+ };
204919
+ };
204920
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
204921
+ 409: {
204922
+ headers: {
204923
+ [name: string]: unknown;
204924
+ };
204925
+ content: {
204926
+ "application/json": components["schemas"]["Error"];
204927
+ };
204928
+ };
204929
+ /** @description Rate limited */
204930
+ 429: {
204931
+ headers: {
204932
+ [name: string]: unknown;
204933
+ };
204934
+ content: {
204935
+ "application/json": components["schemas"]["Error"];
204936
+ };
204937
+ };
204938
+ };
204939
+ };
204940
+ delete?: never;
204941
+ options?: never;
204942
+ head?: never;
204943
+ patch?: never;
204944
+ trace?: never;
204945
+ };
204946
+ "/vehicles/duplicate-candidates/{candidateId}/dismiss": {
204947
+ parameters: {
204948
+ query?: never;
204949
+ header?: never;
204950
+ path?: never;
204951
+ cookie?: never;
204952
+ };
204953
+ get?: never;
204954
+ put?: never;
204955
+ /**
204956
+ * Dismiss a possible duplicate
204957
+ * @description «No es el mismo auto»: the two cars of the candidate are different cars. The pair leaves `GET /vehicles/{id}/duplicate-candidates` and the Stock list’s `possible_duplicate` flag, and the reconciliation never flags it again. Idempotent. 404 when the candidate is not in this workspace. Answers `{ id }`. Automotive-vertical only: a workspace on another vertical gets 403 here however its scopes are set.
204958
+ */
204959
+ post: {
204960
+ parameters: {
204961
+ query?: never;
204962
+ header?: {
204963
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
204964
+ "Idempotency-Key"?: string;
204965
+ };
204966
+ path: {
204967
+ candidateId: string;
204968
+ };
204969
+ cookie?: never;
204970
+ };
204971
+ requestBody?: never;
204972
+ responses: {
204973
+ /** @description `{ id }` of the dismissed candidate */
204974
+ 200: {
204975
+ headers: {
204976
+ [name: string]: unknown;
204977
+ };
204978
+ content: {
204979
+ /**
204980
+ * @example {
204981
+ * "data": {
204982
+ * "id": "0b7c4e2a-5d1f-4a8e-9c3b-2f6d8e1a4b70"
204983
+ * }
204984
+ * }
204985
+ */
204986
+ "application/json": {
204987
+ data?: unknown;
204988
+ meta?: {
204989
+ [key: string]: unknown;
204990
+ };
204991
+ };
204992
+ };
204993
+ };
204994
+ /** @description Validation error */
204995
+ 400: {
204996
+ headers: {
204997
+ [name: string]: unknown;
204998
+ };
204999
+ content: {
205000
+ "application/json": components["schemas"]["Error"];
205001
+ };
205002
+ };
205003
+ /** @description Unauthorized */
205004
+ 401: {
205005
+ headers: {
205006
+ [name: string]: unknown;
205007
+ };
205008
+ content: {
205009
+ "application/json": components["schemas"]["Error"];
205010
+ };
205011
+ };
205012
+ /** @description Forbidden */
205013
+ 403: {
205014
+ headers: {
205015
+ [name: string]: unknown;
205016
+ };
205017
+ content: {
205018
+ "application/json": components["schemas"]["Error"];
205019
+ };
205020
+ };
205021
+ /** @description Not found */
205022
+ 404: {
205023
+ headers: {
205024
+ [name: string]: unknown;
205025
+ };
205026
+ content: {
205027
+ "application/json": components["schemas"]["Error"];
205028
+ };
205029
+ };
205030
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
205031
+ 409: {
205032
+ headers: {
205033
+ [name: string]: unknown;
205034
+ };
205035
+ content: {
205036
+ "application/json": components["schemas"]["Error"];
205037
+ };
205038
+ };
205039
+ /** @description Rate limited */
205040
+ 429: {
205041
+ headers: {
205042
+ [name: string]: unknown;
205043
+ };
205044
+ content: {
205045
+ "application/json": components["schemas"]["Error"];
205046
+ };
205047
+ };
205048
+ };
205049
+ };
205050
+ delete?: never;
205051
+ options?: never;
205052
+ head?: never;
205053
+ patch?: never;
205054
+ trace?: never;
205055
+ };
204692
205056
  "/vehicles/{id}/interest": {
204693
205057
  parameters: {
204694
205058
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "14.106.10",
3
+ "version": "14.107.0",
4
4
  "description": "Typed TypeScript SDK for the Vitrina API pública — generated from the committed openapi.public.json (ADR 0106).",
5
5
  "type": "module",
6
6
  "license": "MIT",