@vitrina/api 15.16.0 → 15.17.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 +21 -6
- package/dist/index.d.ts +21 -6
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -22035,7 +22035,7 @@ interface paths {
|
|
|
22035
22035
|
put?: never;
|
|
22036
22036
|
/**
|
|
22037
22037
|
* Submit a website buyer inquiry (dealer-website write API)
|
|
22038
|
-
* @description Creates a CRM lead with `website` origin, attaching the inquired Vehículo when `vehicle_id` is given. A proyecto form (Módulo Proyectos) sends `project_id` and/or `unit_model_id` (a tipología names its proyecto): the lead lands on the proyecto, is routed to its ejecutivos, and `message` becomes optional. `attribution` carries the visitor's `first_touch` and `last_touch` (utm_*, gclid, fbclid, anonymous_id); both are kept on the lead. Requires the write-only `leads:intake` scope (never `leads:write`). Returns a minimized `{ status }` ack — `received` on create, `duplicate` on dedup — and echoes no internal ids. Rate-limited like every authenticated endpoint; a hidden `hp_website` honeypot field silently drops spam.
|
|
22038
|
+
* @description Creates a CRM lead with `website` origin, attaching the inquired Vehículo when `vehicle_id` is given. A proyecto form (Módulo Proyectos) sends `project_id` and/or `unit_model_id` (a tipología names its proyecto): the lead lands on the proyecto, is routed to its ejecutivos, and `message` becomes optional. `attribution` carries the visitor's `first_touch` and `last_touch` (utm_*, gclid, fbclid, anonymous_id); both are kept on the lead. `value_amount` is the lead's value; `quote_amount` is a figure the site quoted that is not the deal (a trade-in quote): it only fills the first-touch template's amount and the inbox card when `value_amount` is absent, and is never stored as the lead's value. Requires the write-only `leads:intake` scope (never `leads:write`). Returns a minimized `{ status }` ack — `received` on create, `duplicate` on dedup — and echoes no internal ids. Rate-limited like every authenticated endpoint; a hidden `hp_website` honeypot field silently drops spam.
|
|
22039
22039
|
*/
|
|
22040
22040
|
post: {
|
|
22041
22041
|
parameters: {
|
|
@@ -22101,6 +22101,7 @@ interface paths {
|
|
|
22101
22101
|
stage_id?: string;
|
|
22102
22102
|
value_amount?: number;
|
|
22103
22103
|
value_currency?: string;
|
|
22104
|
+
quote_amount?: number;
|
|
22104
22105
|
item_label?: string;
|
|
22105
22106
|
source_ref?: string;
|
|
22106
22107
|
fields?: {
|
|
@@ -139133,6 +139134,8 @@ interface paths {
|
|
|
139133
139134
|
*
|
|
139134
139135
|
* Each row also carries `campaign_origin` — the newest campaign send stored in the thread (`null` when none): its campaign, when it left, whether the send created the thread, and whether it is still the newest message (`awaiting_reply`). `fromCampaign=true` lists every such thread, closed ones included.
|
|
139135
139136
|
*
|
|
139137
|
+
* Each row also carries `waiting_since` — when its customer started waiting on a human, `null` when nobody waits (the «Esperando respuesta» rule; see the `waiting` parameter). `waiting=true` lists only waiting conversations, team-wide; `sort=wait` orders urgent first, then the longest wait.
|
|
139138
|
+
*
|
|
139136
139139
|
* Rows here do NOT carry `ad_origin_nudge` — that field is single-conversation-read only, to avoid a per-row integration lookup on every page of the inbox.
|
|
139137
139140
|
*
|
|
139138
139141
|
* `fields=summary` answers the SAME page with only the identifying and funnel scalars per row — `id`, `display_id`, `channel`, `source`, `status`, `handler`, `assignee_user_id`, `contact_id`, `ticket_id`, `awaiting_human_since`, `first_ai_message_at`, `last_message_date`, `created_at`, `ad_origin` — plus `contact_name`, `ticket_status` and `current_stage_id` off the embeds, and `assignee_name` / `unread` when the list computed them (an api_key has no read markers, so no `unread`). No `contact`, `ticket`, `lastMessage`, `tags`, `marketplaceWindow` or `last_call`. `meta` and `counts` are unchanged. A 20-row page is ~147k characters at `full` (the default, byte-identical to omitting the parameter) and a fraction of that at `summary`; page with `summary` to choose, then `GET /conversations/{id}` for one thread whole.
|
|
@@ -139164,7 +139167,10 @@ interface paths {
|
|
|
139164
139167
|
aiReplied?: boolean | null;
|
|
139165
139168
|
fromAd?: boolean | null;
|
|
139166
139169
|
fromCampaign?: boolean | null;
|
|
139167
|
-
sort
|
|
139170
|
+
/** @description true: only conversations where a customer is waiting on a human («Esperando respuesta»), team-wide. Waiting = open or pending, not filtered, on a channel you can reply in, and either an AI handoff nobody on the team has answered yet (a reply from ANY teammate clears it, including WhatsApp Business / Instagram app replies; a silent «Visita acordada» notice needs no answer) or a human-handled thread whose last message is the customer’s; waits older than 7 days are left out. Each row carries `waiting_since`. Pair with `sort=wait` for the queue order. */
|
|
139171
|
+
waiting?: boolean | null;
|
|
139172
|
+
/** @description `wait`: urgent (`handoff_urgent`) first, then by `waiting_since` — `order=desc` (default) is the longest wait first, `asc` the newest; conversations that are not waiting go last. */
|
|
139173
|
+
sort?: "created_at" | "updated_at" | "last_message_date" | "wait";
|
|
139168
139174
|
order?: "asc" | "desc";
|
|
139169
139175
|
include?: "counts";
|
|
139170
139176
|
/** @description `full` (default): the inbox row with its `contact`, `ticket`, `lastMessage`, `tags`, `marketplaceWindow`, `ad_origin` and `last_call`, exactly as without the parameter. `summary`: only the identifying and funnel scalars — `id`, `display_id`, `channel`, `source`, `status`, `handler`, `assignee_user_id`, `contact_id`, `ticket_id`, `awaiting_human_since`, `first_ai_message_at`, `last_message_date`, `created_at`, `ad_origin`, plus `contact_name`, `ticket_status`, `current_stage_id` off the embeds and `assignee_name` / `unread` when the list computed them. Pagination, `meta` and `counts` are unchanged. Use `summary` to page the inbox cheaply, then `GET /conversations/{id}` for one thread in full. */
|
|
@@ -139303,7 +139309,8 @@ interface paths {
|
|
|
139303
139309
|
* }
|
|
139304
139310
|
* ],
|
|
139305
139311
|
* "last_call": null,
|
|
139306
|
-
* "handoff_urgent": false
|
|
139312
|
+
* "handoff_urgent": false,
|
|
139313
|
+
* "waiting_since": null
|
|
139307
139314
|
* },
|
|
139308
139315
|
* {
|
|
139309
139316
|
* "id": "bbbbbbbb-0000-4000-8000-000000000002",
|
|
@@ -139440,7 +139447,8 @@ interface paths {
|
|
|
139440
139447
|
* },
|
|
139441
139448
|
* "tags": [],
|
|
139442
139449
|
* "last_call": null,
|
|
139443
|
-
* "handoff_urgent": false
|
|
139450
|
+
* "handoff_urgent": false,
|
|
139451
|
+
* "waiting_since": null
|
|
139444
139452
|
* }
|
|
139445
139453
|
* ],
|
|
139446
139454
|
* "meta": {
|
|
@@ -139729,9 +139737,11 @@ interface paths {
|
|
|
139729
139737
|
cookie?: never;
|
|
139730
139738
|
};
|
|
139731
139739
|
/**
|
|
139732
|
-
* Inbox badge counts (my open / unread / mentions / unassigned)
|
|
139740
|
+
* Inbox badge counts (my open / unread / mentions / unassigned / waiting)
|
|
139733
139741
|
* @description The four badge counts on their own, scoped to the calling principal: `myOpen` and `myUnread` are the conversations assigned to the member behind the credential, `myMentions` the ones that @-mention them, `unassigned` the whole workspace’s unowned queue. An API key has no member behind it, so its three "my" counts read 0 and only `unassigned` is meaningful — use a personal token to get a person’s badges.
|
|
139734
139742
|
*
|
|
139743
|
+
* «Esperando respuesta» (the waiting queue): `waiting` is how many conversations have a customer waiting on a human, team-wide (the list `GET /conversations?waiting=true` returns exactly these); `waitingUrgent` how many of them are flagged urgent; `waitingMine` how many are assigned to the caller (0 for an API key); `waitingOldestSince` when the longest wait started (ISO, `null` when nobody waits) — render it as «el más antiguo 2 h».
|
|
139744
|
+
*
|
|
139735
139745
|
* `GET /conversations?include=counts` returns the same payload beside a page of conversations; this route exists for the caller that wants the badges without one.
|
|
139736
139746
|
*/
|
|
139737
139747
|
get: {
|
|
@@ -139755,7 +139765,11 @@ interface paths {
|
|
|
139755
139765
|
* "myOpen": 3,
|
|
139756
139766
|
* "myUnread": 1,
|
|
139757
139767
|
* "unassigned": 2,
|
|
139758
|
-
* "myMentions": 0
|
|
139768
|
+
* "myMentions": 0,
|
|
139769
|
+
* "waiting": 3,
|
|
139770
|
+
* "waitingUrgent": 1,
|
|
139771
|
+
* "waitingMine": 1,
|
|
139772
|
+
* "waitingOldestSince": "2026-10-31T13:05:00.000Z"
|
|
139759
139773
|
* }
|
|
139760
139774
|
* }
|
|
139761
139775
|
*/
|
|
@@ -139994,6 +140008,7 @@ interface paths {
|
|
|
139994
140008
|
* ],
|
|
139995
140009
|
* "last_call": null,
|
|
139996
140010
|
* "handoff_urgent": false,
|
|
140011
|
+
* "waiting_since": null,
|
|
139997
140012
|
* "ad_origin_nudge": null,
|
|
139998
140013
|
* "handoff_resolved_suggested": false,
|
|
139999
140014
|
* "message": [
|
package/dist/index.d.ts
CHANGED
|
@@ -22035,7 +22035,7 @@ interface paths {
|
|
|
22035
22035
|
put?: never;
|
|
22036
22036
|
/**
|
|
22037
22037
|
* Submit a website buyer inquiry (dealer-website write API)
|
|
22038
|
-
* @description Creates a CRM lead with `website` origin, attaching the inquired Vehículo when `vehicle_id` is given. A proyecto form (Módulo Proyectos) sends `project_id` and/or `unit_model_id` (a tipología names its proyecto): the lead lands on the proyecto, is routed to its ejecutivos, and `message` becomes optional. `attribution` carries the visitor's `first_touch` and `last_touch` (utm_*, gclid, fbclid, anonymous_id); both are kept on the lead. Requires the write-only `leads:intake` scope (never `leads:write`). Returns a minimized `{ status }` ack — `received` on create, `duplicate` on dedup — and echoes no internal ids. Rate-limited like every authenticated endpoint; a hidden `hp_website` honeypot field silently drops spam.
|
|
22038
|
+
* @description Creates a CRM lead with `website` origin, attaching the inquired Vehículo when `vehicle_id` is given. A proyecto form (Módulo Proyectos) sends `project_id` and/or `unit_model_id` (a tipología names its proyecto): the lead lands on the proyecto, is routed to its ejecutivos, and `message` becomes optional. `attribution` carries the visitor's `first_touch` and `last_touch` (utm_*, gclid, fbclid, anonymous_id); both are kept on the lead. `value_amount` is the lead's value; `quote_amount` is a figure the site quoted that is not the deal (a trade-in quote): it only fills the first-touch template's amount and the inbox card when `value_amount` is absent, and is never stored as the lead's value. Requires the write-only `leads:intake` scope (never `leads:write`). Returns a minimized `{ status }` ack — `received` on create, `duplicate` on dedup — and echoes no internal ids. Rate-limited like every authenticated endpoint; a hidden `hp_website` honeypot field silently drops spam.
|
|
22039
22039
|
*/
|
|
22040
22040
|
post: {
|
|
22041
22041
|
parameters: {
|
|
@@ -22101,6 +22101,7 @@ interface paths {
|
|
|
22101
22101
|
stage_id?: string;
|
|
22102
22102
|
value_amount?: number;
|
|
22103
22103
|
value_currency?: string;
|
|
22104
|
+
quote_amount?: number;
|
|
22104
22105
|
item_label?: string;
|
|
22105
22106
|
source_ref?: string;
|
|
22106
22107
|
fields?: {
|
|
@@ -139133,6 +139134,8 @@ interface paths {
|
|
|
139133
139134
|
*
|
|
139134
139135
|
* Each row also carries `campaign_origin` — the newest campaign send stored in the thread (`null` when none): its campaign, when it left, whether the send created the thread, and whether it is still the newest message (`awaiting_reply`). `fromCampaign=true` lists every such thread, closed ones included.
|
|
139135
139136
|
*
|
|
139137
|
+
* Each row also carries `waiting_since` — when its customer started waiting on a human, `null` when nobody waits (the «Esperando respuesta» rule; see the `waiting` parameter). `waiting=true` lists only waiting conversations, team-wide; `sort=wait` orders urgent first, then the longest wait.
|
|
139138
|
+
*
|
|
139136
139139
|
* Rows here do NOT carry `ad_origin_nudge` — that field is single-conversation-read only, to avoid a per-row integration lookup on every page of the inbox.
|
|
139137
139140
|
*
|
|
139138
139141
|
* `fields=summary` answers the SAME page with only the identifying and funnel scalars per row — `id`, `display_id`, `channel`, `source`, `status`, `handler`, `assignee_user_id`, `contact_id`, `ticket_id`, `awaiting_human_since`, `first_ai_message_at`, `last_message_date`, `created_at`, `ad_origin` — plus `contact_name`, `ticket_status` and `current_stage_id` off the embeds, and `assignee_name` / `unread` when the list computed them (an api_key has no read markers, so no `unread`). No `contact`, `ticket`, `lastMessage`, `tags`, `marketplaceWindow` or `last_call`. `meta` and `counts` are unchanged. A 20-row page is ~147k characters at `full` (the default, byte-identical to omitting the parameter) and a fraction of that at `summary`; page with `summary` to choose, then `GET /conversations/{id}` for one thread whole.
|
|
@@ -139164,7 +139167,10 @@ interface paths {
|
|
|
139164
139167
|
aiReplied?: boolean | null;
|
|
139165
139168
|
fromAd?: boolean | null;
|
|
139166
139169
|
fromCampaign?: boolean | null;
|
|
139167
|
-
sort
|
|
139170
|
+
/** @description true: only conversations where a customer is waiting on a human («Esperando respuesta»), team-wide. Waiting = open or pending, not filtered, on a channel you can reply in, and either an AI handoff nobody on the team has answered yet (a reply from ANY teammate clears it, including WhatsApp Business / Instagram app replies; a silent «Visita acordada» notice needs no answer) or a human-handled thread whose last message is the customer’s; waits older than 7 days are left out. Each row carries `waiting_since`. Pair with `sort=wait` for the queue order. */
|
|
139171
|
+
waiting?: boolean | null;
|
|
139172
|
+
/** @description `wait`: urgent (`handoff_urgent`) first, then by `waiting_since` — `order=desc` (default) is the longest wait first, `asc` the newest; conversations that are not waiting go last. */
|
|
139173
|
+
sort?: "created_at" | "updated_at" | "last_message_date" | "wait";
|
|
139168
139174
|
order?: "asc" | "desc";
|
|
139169
139175
|
include?: "counts";
|
|
139170
139176
|
/** @description `full` (default): the inbox row with its `contact`, `ticket`, `lastMessage`, `tags`, `marketplaceWindow`, `ad_origin` and `last_call`, exactly as without the parameter. `summary`: only the identifying and funnel scalars — `id`, `display_id`, `channel`, `source`, `status`, `handler`, `assignee_user_id`, `contact_id`, `ticket_id`, `awaiting_human_since`, `first_ai_message_at`, `last_message_date`, `created_at`, `ad_origin`, plus `contact_name`, `ticket_status`, `current_stage_id` off the embeds and `assignee_name` / `unread` when the list computed them. Pagination, `meta` and `counts` are unchanged. Use `summary` to page the inbox cheaply, then `GET /conversations/{id}` for one thread in full. */
|
|
@@ -139303,7 +139309,8 @@ interface paths {
|
|
|
139303
139309
|
* }
|
|
139304
139310
|
* ],
|
|
139305
139311
|
* "last_call": null,
|
|
139306
|
-
* "handoff_urgent": false
|
|
139312
|
+
* "handoff_urgent": false,
|
|
139313
|
+
* "waiting_since": null
|
|
139307
139314
|
* },
|
|
139308
139315
|
* {
|
|
139309
139316
|
* "id": "bbbbbbbb-0000-4000-8000-000000000002",
|
|
@@ -139440,7 +139447,8 @@ interface paths {
|
|
|
139440
139447
|
* },
|
|
139441
139448
|
* "tags": [],
|
|
139442
139449
|
* "last_call": null,
|
|
139443
|
-
* "handoff_urgent": false
|
|
139450
|
+
* "handoff_urgent": false,
|
|
139451
|
+
* "waiting_since": null
|
|
139444
139452
|
* }
|
|
139445
139453
|
* ],
|
|
139446
139454
|
* "meta": {
|
|
@@ -139729,9 +139737,11 @@ interface paths {
|
|
|
139729
139737
|
cookie?: never;
|
|
139730
139738
|
};
|
|
139731
139739
|
/**
|
|
139732
|
-
* Inbox badge counts (my open / unread / mentions / unassigned)
|
|
139740
|
+
* Inbox badge counts (my open / unread / mentions / unassigned / waiting)
|
|
139733
139741
|
* @description The four badge counts on their own, scoped to the calling principal: `myOpen` and `myUnread` are the conversations assigned to the member behind the credential, `myMentions` the ones that @-mention them, `unassigned` the whole workspace’s unowned queue. An API key has no member behind it, so its three "my" counts read 0 and only `unassigned` is meaningful — use a personal token to get a person’s badges.
|
|
139734
139742
|
*
|
|
139743
|
+
* «Esperando respuesta» (the waiting queue): `waiting` is how many conversations have a customer waiting on a human, team-wide (the list `GET /conversations?waiting=true` returns exactly these); `waitingUrgent` how many of them are flagged urgent; `waitingMine` how many are assigned to the caller (0 for an API key); `waitingOldestSince` when the longest wait started (ISO, `null` when nobody waits) — render it as «el más antiguo 2 h».
|
|
139744
|
+
*
|
|
139735
139745
|
* `GET /conversations?include=counts` returns the same payload beside a page of conversations; this route exists for the caller that wants the badges without one.
|
|
139736
139746
|
*/
|
|
139737
139747
|
get: {
|
|
@@ -139755,7 +139765,11 @@ interface paths {
|
|
|
139755
139765
|
* "myOpen": 3,
|
|
139756
139766
|
* "myUnread": 1,
|
|
139757
139767
|
* "unassigned": 2,
|
|
139758
|
-
* "myMentions": 0
|
|
139768
|
+
* "myMentions": 0,
|
|
139769
|
+
* "waiting": 3,
|
|
139770
|
+
* "waitingUrgent": 1,
|
|
139771
|
+
* "waitingMine": 1,
|
|
139772
|
+
* "waitingOldestSince": "2026-10-31T13:05:00.000Z"
|
|
139759
139773
|
* }
|
|
139760
139774
|
* }
|
|
139761
139775
|
*/
|
|
@@ -139994,6 +140008,7 @@ interface paths {
|
|
|
139994
140008
|
* ],
|
|
139995
140009
|
* "last_call": null,
|
|
139996
140010
|
* "handoff_urgent": false,
|
|
140011
|
+
* "waiting_since": null,
|
|
139997
140012
|
* "ad_origin_nudge": null,
|
|
139998
140013
|
* "handoff_resolved_suggested": false,
|
|
139999
140014
|
* "message": [
|
package/package.json
CHANGED