@vitrina/api 12.4.0 → 12.5.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
@@ -280,6 +280,8 @@ interface paths {
280
280
  /**
281
281
  * Create AI agent
282
282
  * @description Only `name` is required. `model` is an escape hatch and almost always omitted — Vitrina picks and manages the runtime model (`ai-agent.service` `DEFAULT_AGENT_MODEL`, currently a flash-tier model; the product never runs a "pro"/reasoning-max tier here) and the UI never asks for one. The agent is born with an empty `system_prompt` and no `published_version_id` — it does nothing until a draft is saved and published. Answers 201.
283
+ *
284
+ * **Connected apps:** refused with `403 CONNECTED_APP_EXCLUDED_OPERATION` and absent from the MCP catalogue, whatever write pack was granted — the «Agentes de IA» pack promises not to include this act. An API key or a personal token of the workspace holding the scope reaches it as usual.
283
285
  */
284
286
  post: {
285
287
  parameters: {
@@ -675,6 +677,8 @@ interface paths {
675
677
  /**
676
678
  * Delete AI agent
677
679
  * @description Removes the agent. Its published versions, skills and KB attachments do not follow it — skills and KB files are tenant-shared resources that survive independently. There is no undelete; recreate and reconfigure from scratch. 204.
680
+ *
681
+ * **Connected apps:** refused with `403 CONNECTED_APP_EXCLUDED_OPERATION` and absent from the MCP catalogue, whatever write pack was granted — the «Agentes de IA» pack promises not to include this act. An API key or a personal token of the workspace holding the scope reaches it as usual.
678
682
  */
679
683
  delete: {
680
684
  parameters: {
@@ -21365,6 +21369,8 @@ interface paths {
21365
21369
  /**
21366
21370
  * List leads
21367
21371
  * @description The flat list, paged (`page` / `page_size`, max 200) and filterable by board, stage, status, source, intent, owner, team, contact, value band, score band and last activity; `q` matches the title and the contact. `temperature` is a SHORTCUT over `score` (`cold` 0–39 · `warm` 40–69 · `hot` 70–100 · `unscored` score IS NULL) and explicit `min_score` / `max_score` win over it — do not confuse it with the `temperature` FIELD on a lead, which is a judgement somebody recorded about momentum and is not derived from the score. `resource_type` and `resource_id` must be supplied together and narrow to the leads interested in one record. `meta.pagination.total` is the match count, not the page size. A member whose role restricts record visibility sees only the leads they own.
21372
+ *
21373
+ * `fields=summary` answers the SAME page with only the identifying and funnel scalars per row — `id`, `display_id`, `title`, `status`, `source`, `intent`, `pipeline_id`, `stage_id`, `contact_id`, `value_amount`, `value_currency`, `owner_user_id`, `score`, `temperature`, `created_at`, `last_activity_at`, `closed_at`, `origin_conversation_id` — plus `stage_name` and `contact_name` when the caller holds the scope that embed rides (`stages:read`, `contacts:read`); a name the caller may not read is ABSENT, never `null`. `meta` is unchanged. A 200-row page is ~525k 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 /leads/{id}` for the ones you need whole.
21368
21374
  */
21369
21375
  get: {
21370
21376
  parameters: {
@@ -21393,6 +21399,8 @@ interface paths {
21393
21399
  first_touch_to?: string;
21394
21400
  page?: number;
21395
21401
  page_size?: number;
21402
+ /** @description `full` (default): every column plus the `contact` / `stage` / `pipeline` / `busqueda` embeds, exactly as without the parameter. `summary`: only the identifying and funnel scalars — `id`, `display_id`, `title`, `status`, `source`, `intent`, `pipeline_id`, `stage_id`, `contact_id`, `value_amount`, `value_currency`, `owner_user_id`, `score`, `temperature`, `created_at`, `last_activity_at`, `closed_at`, `origin_conversation_id`, plus `stage_name` / `contact_name` when the caller may read that embed. Pagination and `meta` are unchanged. Use `summary` to page through many leads cheaply, then `GET /leads/{id}` for the ones you need in full. */
21403
+ fields?: "summary" | "full";
21396
21404
  };
21397
21405
  header?: never;
21398
21406
  path?: never;
@@ -34148,7 +34156,7 @@ interface paths {
34148
34156
  };
34149
34157
  /**
34150
34158
  * The workspace’s payment methods, or how to pay by transfer
34151
- * @description Every payment method with its rail (`fintoc_pac`, `oneclick`, `mercadopago`) named by the rail that holds it, its display fields (PAC: bank + last digits + mandate status `activo` / `pendiente_firma` / `rechazado`; card: brand + last 4 + expiry) and which one is the default the cobros are charged to. With no active method `pays_by` is `transfer` and `transfer` carries Vitrina’s bank account and the reference of the cobro to pay. Never returns a card number, a full account number or a provider token. Requires `billing:read`.
34159
+ * @description Every payment method with its rail (`fintoc_pac`, `fintoc_card`, `oneclick`, `mercadopago`) named by the rail that holds it, its display fields (PAC: bank + last digits + mandate status `activo` / `pendiente_firma` / `rechazado`; card: brand + last 4 + expiry + credit/debit when reported) and which one is the default the cobros are charged to. With no active method `pays_by` is `transfer` and `transfer` carries Vitrina’s bank account and the reference of the cobro to pay. Never returns a card number, a full account number or a provider token. Requires `billing:read`.
34152
34160
  */
34153
34161
  get: {
34154
34162
  parameters: {
@@ -34298,7 +34306,7 @@ interface paths {
34298
34306
  put?: never;
34299
34307
  /**
34300
34308
  * Start adding a payment method (PAC or card)
34301
- * @description Starts the rail’s own enrolment and answers where to send the browser: `fintoc_pac` → a GET to Fintoc’s hosted PAC checkout; `oneclick` → a form POST of `TBK_TOKEN` to Transbank’s inscription page; `mercadopago` takes a card token minted by Mercado Pago’s SDK and is active at once (`redirect: null`). The provider sends the browser back to `return_url`, which must be on the app’s own origin. The current default stays in place until the new method is active; then it becomes the default and any outstanding cobro is retried on it right away. Requires `billing:write`.
34309
+ * @description Starts the rail’s own enrolment and answers where to send the browser: `fintoc_pac` → a GET to Fintoc’s hosted PAC checkout; `fintoc_card` → a GET to Fintoc’s hosted card checkout (credit or debit; offered in `available_rails` only while Fintoc has the card product enabled for Vitrina, else refused with `fintoc_card_unavailable`); `oneclick` → a form POST of `TBK_TOKEN` to Transbank’s inscription page; `mercadopago` takes a card token minted by Mercado Pago’s SDK and is active at once (`redirect: null`). The provider sends the browser back to `return_url`, which must be on the app’s own origin. The current default stays in place until the new method is active; then it becomes the default and any outstanding cobro is retried on it right away. Requires `billing:write`.
34302
34310
  */
34303
34311
  post: {
34304
34312
  parameters: {
@@ -66771,7 +66779,7 @@ interface paths {
66771
66779
  *
66772
66780
  * Lifecycle: `received` → `grounded` → `reproduced` → `proposed` → `applied` → `verified`, plus two terminals that are outcomes rather than failures — `ya_cumple` (the scenario went green on its first run and the complaint was about an older version, so the request closes with that green run attached) and `harness` (the fix belongs to Vitrina's harness — turn loop, retries, handoff mechanics, channel behaviour — so the tenant reads "esto lo arregla Vitrina" with a reference instead of being sent to edit a skill that cannot fix it). `harness` is reachable from every non-terminal state; `ya_cumple` from `grounded` and `reproduced`. Everything else is a 400 naming both ends of the refused edge.
66773
66781
  *
66774
- * Requires `ai_agents:read` AND `corrections:write`.
66782
+ * Requires `ai_agents:read` AND `corrections:read` — a read, so the read pair, never the capture pair.
66775
66783
  */
66776
66784
  get: {
66777
66785
  parameters: {
@@ -67087,7 +67095,7 @@ interface paths {
67087
67095
  * Get one change request
67088
67096
  * @description The whole row: verbatim, reporter, confirmed conversation refs, the linked scenario and the failed run that is its evidence, the proposals it produced, the grounding attempts, any override recorded when somebody published past a red gate, and — for a `harness` terminal — the tenant-facing message and its reference.
67089
67097
  *
67090
- * Requires `ai_agents:read` AND `corrections:write`.
67098
+ * Requires `ai_agents:read` AND `corrections:read` — a read, so the read pair, never the capture pair.
67091
67099
  */
67092
67100
  get: {
67093
67101
  parameters: {
@@ -93909,6 +93917,8 @@ interface paths {
93909
93917
  * Each row also carries `ad_origin` (the `AdOrigin` schema) — the Meta ad that opened the thread, in ONE shape whatever the channel (click-to-WhatsApp or an Instagram DM ad), or `null` for an organic thread. `platform` is the thread channel; `ad_external_id` is Meta's ad id (`null` for a boosted post); `ad_name` and `campaign_name` are `null` when the Ads read does not know them; `title` is the ADVERTISER'S copy, never the customer's words; `thumbnail_url` is Vitrina's durable copy of the creative when `media_archived` is `true`, else Meta's own link, which expires — render it with a fallback; `captured_at` is when the thread opened. Meta's own object stays on `ad_referral`, verbatim and write-once, in the channel's spelling (`source_id`/`ctwa_clid` on WhatsApp; `source: 'ADS'`, `ad_id`, `ads_context_data` on Instagram).
93910
93918
  *
93911
93919
  * 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.
93920
+ *
93921
+ * `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.
93912
93922
  */
93913
93923
  get: {
93914
93924
  parameters: {
@@ -93939,6 +93949,8 @@ interface paths {
93939
93949
  sort?: "created_at" | "updated_at" | "last_message_date";
93940
93950
  order?: "asc" | "desc";
93941
93951
  include?: "counts";
93952
+ /** @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. */
93953
+ fields?: "summary" | "full";
93942
93954
  };
93943
93955
  header?: never;
93944
93956
  path?: never;
@@ -147686,10 +147698,10 @@ interface components {
147686
147698
  /** Format: uuid */
147687
147699
  id: string;
147688
147700
  /**
147689
- * @description The rail that holds the method: `fintoc_pac` (automatic debit from a current account through Fintoc), `oneclick` (card on file at Transbank Webpay Oneclick), `mercadopago` (card on file at Mercado Pago).
147701
+ * @description The rail that holds the method: `fintoc_pac` (automatic debit from a current account through Fintoc), `fintoc_card` (credit or debit card on file at Fintoc), `oneclick` (card on file at Transbank Webpay Oneclick), `mercadopago` (card on file at Mercado Pago).
147690
147702
  * @enum {string}
147691
147703
  */
147692
- rail: "fintoc_pac" | "oneclick" | "mercadopago";
147704
+ rail: "fintoc_pac" | "fintoc_card" | "oneclick" | "mercadopago";
147693
147705
  /** @description The rail by its own name, ready to print («Tarjeta (Webpay Oneclick)»). */
147694
147706
  rail_name: string;
147695
147707
  /**
@@ -147704,12 +147716,17 @@ interface components {
147704
147716
  name: string | null;
147705
147717
  last4: string | null;
147706
147718
  } | null;
147707
- /** @description Cards only: brand, last four digits and expiry. Transbank Oneclick does not report the expiry, so it is null there. */
147719
+ /** @description Cards only: brand, last four digits, expiry and kind. Transbank Oneclick does not report the expiry, so it is null there. */
147708
147720
  card: {
147709
147721
  brand: string | null;
147710
147722
  last4: string | null;
147711
147723
  exp_month: number | null;
147712
147724
  exp_year: number | null;
147725
+ /**
147726
+ * @description Credit, debit or prepaid, when the rail reports it (Fintoc).
147727
+ * @enum {string|null}
147728
+ */
147729
+ kind?: "credit" | "debit" | "prepaid" | null;
147713
147730
  } | null;
147714
147731
  /** @description False for the default method while a cobro is pending, and while a charge is in progress on the method. */
147715
147732
  removable: boolean;
@@ -147749,13 +147766,13 @@ interface components {
147749
147766
  reference: string | null;
147750
147767
  invoice_number: string | null;
147751
147768
  } | null;
147752
- /** @description Rails that can be added now; `oneclick` appears only once Vitrina’s card contract is configured. The PAC is the recommended one. */
147769
+ /** @description Rails that can be added now, card rails most preferred first: `fintoc_pac` and `fintoc_card` appear only while Fintoc has their product enabled for Vitrina (probed, no flag); `oneclick` only once Vitrina’s card contract is configured; `mercadopago` stays listed as the card fallback. The PAC is the recommended one when present. */
147753
147770
  available_rails: {
147754
147771
  /**
147755
- * @description The rail that holds the method: `fintoc_pac` (automatic debit from a current account through Fintoc), `oneclick` (card on file at Transbank Webpay Oneclick), `mercadopago` (card on file at Mercado Pago).
147772
+ * @description The rail that holds the method: `fintoc_pac` (automatic debit from a current account through Fintoc), `fintoc_card` (credit or debit card on file at Fintoc), `oneclick` (card on file at Transbank Webpay Oneclick), `mercadopago` (card on file at Mercado Pago).
147756
147773
  * @enum {string}
147757
147774
  */
147758
- rail: "fintoc_pac" | "oneclick" | "mercadopago";
147775
+ rail: "fintoc_pac" | "fintoc_card" | "oneclick" | "mercadopago";
147759
147776
  rail_name: string;
147760
147777
  recommended: boolean;
147761
147778
  }[];
@@ -148034,10 +148051,10 @@ interface components {
148034
148051
  /** Format: uuid */
148035
148052
  method_id: string;
148036
148053
  /**
148037
- * @description The rail that holds the method: `fintoc_pac` (automatic debit from a current account through Fintoc), `oneclick` (card on file at Transbank Webpay Oneclick), `mercadopago` (card on file at Mercado Pago).
148054
+ * @description The rail that holds the method: `fintoc_pac` (automatic debit from a current account through Fintoc), `fintoc_card` (credit or debit card on file at Fintoc), `oneclick` (card on file at Transbank Webpay Oneclick), `mercadopago` (card on file at Mercado Pago).
148038
148055
  * @enum {string}
148039
148056
  */
148040
- rail: "fintoc_pac" | "oneclick" | "mercadopago";
148057
+ rail: "fintoc_pac" | "fintoc_card" | "oneclick" | "mercadopago";
148041
148058
  /** @enum {string} */
148042
148059
  status: "activo" | "pendiente";
148043
148060
  /** @description Where to send the browser now: a GET to the PAC checkout, or a form POST of `fields` (TBK_TOKEN) to Transbank. Null when the method is already active. */
@@ -148053,18 +148070,18 @@ interface components {
148053
148070
  };
148054
148071
  AddPaymentMethodBody: {
148055
148072
  /**
148056
- * @description The rail that holds the method: `fintoc_pac` (automatic debit from a current account through Fintoc), `oneclick` (card on file at Transbank Webpay Oneclick), `mercadopago` (card on file at Mercado Pago).
148073
+ * @description The rail that holds the method: `fintoc_pac` (automatic debit from a current account through Fintoc), `fintoc_card` (credit or debit card on file at Fintoc), `oneclick` (card on file at Transbank Webpay Oneclick), `mercadopago` (card on file at Mercado Pago).
148057
148074
  * @enum {string}
148058
148075
  */
148059
- rail: "fintoc_pac" | "oneclick" | "mercadopago";
148076
+ rail: "fintoc_pac" | "fintoc_card" | "oneclick" | "mercadopago";
148060
148077
  /**
148061
148078
  * Format: uri
148062
- * @description Where the provider sends the browser back — must be on the app’s own origin (the Facturación page). Required for `fintoc_pac` and `oneclick`.
148079
+ * @description Where the provider sends the browser back — must be on the app’s own origin (the Facturación page). Required for `fintoc_pac`, `fintoc_card` and `oneclick`.
148063
148080
  */
148064
148081
  return_url?: string;
148065
148082
  /**
148066
148083
  * Format: uri
148067
- * @description `fintoc_pac`: where a cancelled enrolment lands (defaults to `return_url`).
148084
+ * @description `fintoc_pac` / `fintoc_card`: where a cancelled enrolment lands (defaults to `return_url`).
148068
148085
  */
148069
148086
  cancel_url?: string;
148070
148087
  /** @description `fintoc_pac`: a bank `code` from `pac_banks`; the enrolment opens on it. */
package/dist/index.d.ts CHANGED
@@ -280,6 +280,8 @@ interface paths {
280
280
  /**
281
281
  * Create AI agent
282
282
  * @description Only `name` is required. `model` is an escape hatch and almost always omitted — Vitrina picks and manages the runtime model (`ai-agent.service` `DEFAULT_AGENT_MODEL`, currently a flash-tier model; the product never runs a "pro"/reasoning-max tier here) and the UI never asks for one. The agent is born with an empty `system_prompt` and no `published_version_id` — it does nothing until a draft is saved and published. Answers 201.
283
+ *
284
+ * **Connected apps:** refused with `403 CONNECTED_APP_EXCLUDED_OPERATION` and absent from the MCP catalogue, whatever write pack was granted — the «Agentes de IA» pack promises not to include this act. An API key or a personal token of the workspace holding the scope reaches it as usual.
283
285
  */
284
286
  post: {
285
287
  parameters: {
@@ -675,6 +677,8 @@ interface paths {
675
677
  /**
676
678
  * Delete AI agent
677
679
  * @description Removes the agent. Its published versions, skills and KB attachments do not follow it — skills and KB files are tenant-shared resources that survive independently. There is no undelete; recreate and reconfigure from scratch. 204.
680
+ *
681
+ * **Connected apps:** refused with `403 CONNECTED_APP_EXCLUDED_OPERATION` and absent from the MCP catalogue, whatever write pack was granted — the «Agentes de IA» pack promises not to include this act. An API key or a personal token of the workspace holding the scope reaches it as usual.
678
682
  */
679
683
  delete: {
680
684
  parameters: {
@@ -21365,6 +21369,8 @@ interface paths {
21365
21369
  /**
21366
21370
  * List leads
21367
21371
  * @description The flat list, paged (`page` / `page_size`, max 200) and filterable by board, stage, status, source, intent, owner, team, contact, value band, score band and last activity; `q` matches the title and the contact. `temperature` is a SHORTCUT over `score` (`cold` 0–39 · `warm` 40–69 · `hot` 70–100 · `unscored` score IS NULL) and explicit `min_score` / `max_score` win over it — do not confuse it with the `temperature` FIELD on a lead, which is a judgement somebody recorded about momentum and is not derived from the score. `resource_type` and `resource_id` must be supplied together and narrow to the leads interested in one record. `meta.pagination.total` is the match count, not the page size. A member whose role restricts record visibility sees only the leads they own.
21372
+ *
21373
+ * `fields=summary` answers the SAME page with only the identifying and funnel scalars per row — `id`, `display_id`, `title`, `status`, `source`, `intent`, `pipeline_id`, `stage_id`, `contact_id`, `value_amount`, `value_currency`, `owner_user_id`, `score`, `temperature`, `created_at`, `last_activity_at`, `closed_at`, `origin_conversation_id` — plus `stage_name` and `contact_name` when the caller holds the scope that embed rides (`stages:read`, `contacts:read`); a name the caller may not read is ABSENT, never `null`. `meta` is unchanged. A 200-row page is ~525k 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 /leads/{id}` for the ones you need whole.
21368
21374
  */
21369
21375
  get: {
21370
21376
  parameters: {
@@ -21393,6 +21399,8 @@ interface paths {
21393
21399
  first_touch_to?: string;
21394
21400
  page?: number;
21395
21401
  page_size?: number;
21402
+ /** @description `full` (default): every column plus the `contact` / `stage` / `pipeline` / `busqueda` embeds, exactly as without the parameter. `summary`: only the identifying and funnel scalars — `id`, `display_id`, `title`, `status`, `source`, `intent`, `pipeline_id`, `stage_id`, `contact_id`, `value_amount`, `value_currency`, `owner_user_id`, `score`, `temperature`, `created_at`, `last_activity_at`, `closed_at`, `origin_conversation_id`, plus `stage_name` / `contact_name` when the caller may read that embed. Pagination and `meta` are unchanged. Use `summary` to page through many leads cheaply, then `GET /leads/{id}` for the ones you need in full. */
21403
+ fields?: "summary" | "full";
21396
21404
  };
21397
21405
  header?: never;
21398
21406
  path?: never;
@@ -34148,7 +34156,7 @@ interface paths {
34148
34156
  };
34149
34157
  /**
34150
34158
  * The workspace’s payment methods, or how to pay by transfer
34151
- * @description Every payment method with its rail (`fintoc_pac`, `oneclick`, `mercadopago`) named by the rail that holds it, its display fields (PAC: bank + last digits + mandate status `activo` / `pendiente_firma` / `rechazado`; card: brand + last 4 + expiry) and which one is the default the cobros are charged to. With no active method `pays_by` is `transfer` and `transfer` carries Vitrina’s bank account and the reference of the cobro to pay. Never returns a card number, a full account number or a provider token. Requires `billing:read`.
34159
+ * @description Every payment method with its rail (`fintoc_pac`, `fintoc_card`, `oneclick`, `mercadopago`) named by the rail that holds it, its display fields (PAC: bank + last digits + mandate status `activo` / `pendiente_firma` / `rechazado`; card: brand + last 4 + expiry + credit/debit when reported) and which one is the default the cobros are charged to. With no active method `pays_by` is `transfer` and `transfer` carries Vitrina’s bank account and the reference of the cobro to pay. Never returns a card number, a full account number or a provider token. Requires `billing:read`.
34152
34160
  */
34153
34161
  get: {
34154
34162
  parameters: {
@@ -34298,7 +34306,7 @@ interface paths {
34298
34306
  put?: never;
34299
34307
  /**
34300
34308
  * Start adding a payment method (PAC or card)
34301
- * @description Starts the rail’s own enrolment and answers where to send the browser: `fintoc_pac` → a GET to Fintoc’s hosted PAC checkout; `oneclick` → a form POST of `TBK_TOKEN` to Transbank’s inscription page; `mercadopago` takes a card token minted by Mercado Pago’s SDK and is active at once (`redirect: null`). The provider sends the browser back to `return_url`, which must be on the app’s own origin. The current default stays in place until the new method is active; then it becomes the default and any outstanding cobro is retried on it right away. Requires `billing:write`.
34309
+ * @description Starts the rail’s own enrolment and answers where to send the browser: `fintoc_pac` → a GET to Fintoc’s hosted PAC checkout; `fintoc_card` → a GET to Fintoc’s hosted card checkout (credit or debit; offered in `available_rails` only while Fintoc has the card product enabled for Vitrina, else refused with `fintoc_card_unavailable`); `oneclick` → a form POST of `TBK_TOKEN` to Transbank’s inscription page; `mercadopago` takes a card token minted by Mercado Pago’s SDK and is active at once (`redirect: null`). The provider sends the browser back to `return_url`, which must be on the app’s own origin. The current default stays in place until the new method is active; then it becomes the default and any outstanding cobro is retried on it right away. Requires `billing:write`.
34302
34310
  */
34303
34311
  post: {
34304
34312
  parameters: {
@@ -66771,7 +66779,7 @@ interface paths {
66771
66779
  *
66772
66780
  * Lifecycle: `received` → `grounded` → `reproduced` → `proposed` → `applied` → `verified`, plus two terminals that are outcomes rather than failures — `ya_cumple` (the scenario went green on its first run and the complaint was about an older version, so the request closes with that green run attached) and `harness` (the fix belongs to Vitrina's harness — turn loop, retries, handoff mechanics, channel behaviour — so the tenant reads "esto lo arregla Vitrina" with a reference instead of being sent to edit a skill that cannot fix it). `harness` is reachable from every non-terminal state; `ya_cumple` from `grounded` and `reproduced`. Everything else is a 400 naming both ends of the refused edge.
66773
66781
  *
66774
- * Requires `ai_agents:read` AND `corrections:write`.
66782
+ * Requires `ai_agents:read` AND `corrections:read` — a read, so the read pair, never the capture pair.
66775
66783
  */
66776
66784
  get: {
66777
66785
  parameters: {
@@ -67087,7 +67095,7 @@ interface paths {
67087
67095
  * Get one change request
67088
67096
  * @description The whole row: verbatim, reporter, confirmed conversation refs, the linked scenario and the failed run that is its evidence, the proposals it produced, the grounding attempts, any override recorded when somebody published past a red gate, and — for a `harness` terminal — the tenant-facing message and its reference.
67089
67097
  *
67090
- * Requires `ai_agents:read` AND `corrections:write`.
67098
+ * Requires `ai_agents:read` AND `corrections:read` — a read, so the read pair, never the capture pair.
67091
67099
  */
67092
67100
  get: {
67093
67101
  parameters: {
@@ -93909,6 +93917,8 @@ interface paths {
93909
93917
  * Each row also carries `ad_origin` (the `AdOrigin` schema) — the Meta ad that opened the thread, in ONE shape whatever the channel (click-to-WhatsApp or an Instagram DM ad), or `null` for an organic thread. `platform` is the thread channel; `ad_external_id` is Meta's ad id (`null` for a boosted post); `ad_name` and `campaign_name` are `null` when the Ads read does not know them; `title` is the ADVERTISER'S copy, never the customer's words; `thumbnail_url` is Vitrina's durable copy of the creative when `media_archived` is `true`, else Meta's own link, which expires — render it with a fallback; `captured_at` is when the thread opened. Meta's own object stays on `ad_referral`, verbatim and write-once, in the channel's spelling (`source_id`/`ctwa_clid` on WhatsApp; `source: 'ADS'`, `ad_id`, `ads_context_data` on Instagram).
93910
93918
  *
93911
93919
  * 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.
93920
+ *
93921
+ * `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.
93912
93922
  */
93913
93923
  get: {
93914
93924
  parameters: {
@@ -93939,6 +93949,8 @@ interface paths {
93939
93949
  sort?: "created_at" | "updated_at" | "last_message_date";
93940
93950
  order?: "asc" | "desc";
93941
93951
  include?: "counts";
93952
+ /** @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. */
93953
+ fields?: "summary" | "full";
93942
93954
  };
93943
93955
  header?: never;
93944
93956
  path?: never;
@@ -147686,10 +147698,10 @@ interface components {
147686
147698
  /** Format: uuid */
147687
147699
  id: string;
147688
147700
  /**
147689
- * @description The rail that holds the method: `fintoc_pac` (automatic debit from a current account through Fintoc), `oneclick` (card on file at Transbank Webpay Oneclick), `mercadopago` (card on file at Mercado Pago).
147701
+ * @description The rail that holds the method: `fintoc_pac` (automatic debit from a current account through Fintoc), `fintoc_card` (credit or debit card on file at Fintoc), `oneclick` (card on file at Transbank Webpay Oneclick), `mercadopago` (card on file at Mercado Pago).
147690
147702
  * @enum {string}
147691
147703
  */
147692
- rail: "fintoc_pac" | "oneclick" | "mercadopago";
147704
+ rail: "fintoc_pac" | "fintoc_card" | "oneclick" | "mercadopago";
147693
147705
  /** @description The rail by its own name, ready to print («Tarjeta (Webpay Oneclick)»). */
147694
147706
  rail_name: string;
147695
147707
  /**
@@ -147704,12 +147716,17 @@ interface components {
147704
147716
  name: string | null;
147705
147717
  last4: string | null;
147706
147718
  } | null;
147707
- /** @description Cards only: brand, last four digits and expiry. Transbank Oneclick does not report the expiry, so it is null there. */
147719
+ /** @description Cards only: brand, last four digits, expiry and kind. Transbank Oneclick does not report the expiry, so it is null there. */
147708
147720
  card: {
147709
147721
  brand: string | null;
147710
147722
  last4: string | null;
147711
147723
  exp_month: number | null;
147712
147724
  exp_year: number | null;
147725
+ /**
147726
+ * @description Credit, debit or prepaid, when the rail reports it (Fintoc).
147727
+ * @enum {string|null}
147728
+ */
147729
+ kind?: "credit" | "debit" | "prepaid" | null;
147713
147730
  } | null;
147714
147731
  /** @description False for the default method while a cobro is pending, and while a charge is in progress on the method. */
147715
147732
  removable: boolean;
@@ -147749,13 +147766,13 @@ interface components {
147749
147766
  reference: string | null;
147750
147767
  invoice_number: string | null;
147751
147768
  } | null;
147752
- /** @description Rails that can be added now; `oneclick` appears only once Vitrina’s card contract is configured. The PAC is the recommended one. */
147769
+ /** @description Rails that can be added now, card rails most preferred first: `fintoc_pac` and `fintoc_card` appear only while Fintoc has their product enabled for Vitrina (probed, no flag); `oneclick` only once Vitrina’s card contract is configured; `mercadopago` stays listed as the card fallback. The PAC is the recommended one when present. */
147753
147770
  available_rails: {
147754
147771
  /**
147755
- * @description The rail that holds the method: `fintoc_pac` (automatic debit from a current account through Fintoc), `oneclick` (card on file at Transbank Webpay Oneclick), `mercadopago` (card on file at Mercado Pago).
147772
+ * @description The rail that holds the method: `fintoc_pac` (automatic debit from a current account through Fintoc), `fintoc_card` (credit or debit card on file at Fintoc), `oneclick` (card on file at Transbank Webpay Oneclick), `mercadopago` (card on file at Mercado Pago).
147756
147773
  * @enum {string}
147757
147774
  */
147758
- rail: "fintoc_pac" | "oneclick" | "mercadopago";
147775
+ rail: "fintoc_pac" | "fintoc_card" | "oneclick" | "mercadopago";
147759
147776
  rail_name: string;
147760
147777
  recommended: boolean;
147761
147778
  }[];
@@ -148034,10 +148051,10 @@ interface components {
148034
148051
  /** Format: uuid */
148035
148052
  method_id: string;
148036
148053
  /**
148037
- * @description The rail that holds the method: `fintoc_pac` (automatic debit from a current account through Fintoc), `oneclick` (card on file at Transbank Webpay Oneclick), `mercadopago` (card on file at Mercado Pago).
148054
+ * @description The rail that holds the method: `fintoc_pac` (automatic debit from a current account through Fintoc), `fintoc_card` (credit or debit card on file at Fintoc), `oneclick` (card on file at Transbank Webpay Oneclick), `mercadopago` (card on file at Mercado Pago).
148038
148055
  * @enum {string}
148039
148056
  */
148040
- rail: "fintoc_pac" | "oneclick" | "mercadopago";
148057
+ rail: "fintoc_pac" | "fintoc_card" | "oneclick" | "mercadopago";
148041
148058
  /** @enum {string} */
148042
148059
  status: "activo" | "pendiente";
148043
148060
  /** @description Where to send the browser now: a GET to the PAC checkout, or a form POST of `fields` (TBK_TOKEN) to Transbank. Null when the method is already active. */
@@ -148053,18 +148070,18 @@ interface components {
148053
148070
  };
148054
148071
  AddPaymentMethodBody: {
148055
148072
  /**
148056
- * @description The rail that holds the method: `fintoc_pac` (automatic debit from a current account through Fintoc), `oneclick` (card on file at Transbank Webpay Oneclick), `mercadopago` (card on file at Mercado Pago).
148073
+ * @description The rail that holds the method: `fintoc_pac` (automatic debit from a current account through Fintoc), `fintoc_card` (credit or debit card on file at Fintoc), `oneclick` (card on file at Transbank Webpay Oneclick), `mercadopago` (card on file at Mercado Pago).
148057
148074
  * @enum {string}
148058
148075
  */
148059
- rail: "fintoc_pac" | "oneclick" | "mercadopago";
148076
+ rail: "fintoc_pac" | "fintoc_card" | "oneclick" | "mercadopago";
148060
148077
  /**
148061
148078
  * Format: uri
148062
- * @description Where the provider sends the browser back — must be on the app’s own origin (the Facturación page). Required for `fintoc_pac` and `oneclick`.
148079
+ * @description Where the provider sends the browser back — must be on the app’s own origin (the Facturación page). Required for `fintoc_pac`, `fintoc_card` and `oneclick`.
148063
148080
  */
148064
148081
  return_url?: string;
148065
148082
  /**
148066
148083
  * Format: uri
148067
- * @description `fintoc_pac`: where a cancelled enrolment lands (defaults to `return_url`).
148084
+ * @description `fintoc_pac` / `fintoc_card`: where a cancelled enrolment lands (defaults to `return_url`).
148068
148085
  */
148069
148086
  cancel_url?: string;
148070
148087
  /** @description `fintoc_pac`: a bank `code` from `pac_banks`; the enrolment opens on it. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "12.4.0",
3
+ "version": "12.5.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",