@vitrina/api 15.26.1 → 15.28.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
@@ -141771,7 +141771,7 @@ interface paths {
141771
141771
  *
141772
141772
  * 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.
141773
141773
  *
141774
- * 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. `waiting_state` says why: `owed` (waiting), `closed_by_customer` (the customer only acknowledged, thanked or closed after we answered), `nothing_owed` (they declined, or the message is not for us), `paid_or_in_store` (a transfer receipt right after we sent our bank details, or «llegué» / «voy subiendo»: a suggestion for a person to confirm — nothing moves a lead or records a payment) or `promised_later` (we promised to write on a later day: a dated «Recordatorio acordado» follow-up, due at `waiting_due_at`, after which the thread is waiting again) — the ones left out of the queue by a confident verdict on the newest unanswered customer message, voice notes read as their transcript — and `null` when nobody waits at all. `waiting=closed` lists those left-out threads (still live: resolving stays a person’s click).
141774
+ * 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. `waiting_state` says why: `owed` (waiting), `closed_by_customer` (the customer only acknowledged, thanked or closed after we answered), `nothing_owed` (they declined, or the message is not for us), `paid_or_in_store` (a transfer receipt right after we sent our bank details, or «llegué» / «voy subiendo»: a suggestion for a person to confirm — nothing moves a lead or records a payment) or `promised_later` (we promised to write on a later day: a dated «Recordatorio acordado» follow-up, due at `waiting_due_at`, after which the thread is waiting again) or `visit_passed` (the customer announced a store visit — «mañana paso», «el martes voy» — for a day that is now over, with nothing newer from them: a «Recordatorio acordado» to check whether they came falls due at `waiting_due_at`, the morning after; the thread does not come back to the queue when it does) — the ones left out of the queue by a confident verdict on the newest unanswered customer message, voice notes read as their transcript — and `null` when nobody waits at all. `waiting=closed` lists those left-out threads (still live: resolving stays a person’s click).
141775
141775
  *
141776
141776
  * 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.
141777
141777
  *
@@ -141804,7 +141804,7 @@ interface paths {
141804
141804
  aiReplied?: boolean | null;
141805
141805
  fromAd?: boolean | null;
141806
141806
  fromCampaign?: boolean | null;
141807
- /** @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; and what the customer wrote still asks for a reply: a thread whose newest unanswered customer message was judged, with high confidence, as the customer closing the chat («ok», «gracias», 👍 after we answered) or owing nothing, a customer who paid (a transfer receipt after our bank details) or is at the store («llegué», «voy subiendo»), or a follow-up we promised for a later day that is not due yet, is left out (any other open promise of ours always stays). `closed`: exactly those left-out threads, still live (not resolved) — `waiting_state` says why, `waiting_due_at` when a promised follow-up falls due. Each row carries `waiting_since`, `waiting_state`, `waiting_due_at` and `waiting_subject_id` (the message, or handoff event, the wait is about — `POST /conversations/{id}/no-reply-needed` takes it as `subject_id`). Pair with `sort=wait` for the queue order. */
141807
+ /** @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; and what the customer wrote still asks for a reply: a thread whose newest unanswered customer message was judged, with high confidence, as the customer closing the chat («ok», «gracias», 👍 after we answered) or owing nothing, a customer who paid (a transfer receipt after our bank details) or is at the store («llegué», «voy subiendo»), or a follow-up we promised for a later day that is not due yet, is left out (any other open promise of ours always stays); a customer who announced a store visit («mañana paso», «el martes voy») waits through that day and is left out once it is over with nothing newer from them (`visit_passed`: a «Recordatorio acordado» to check whether they came falls due the next morning). `closed`: exactly those left-out threads, still live (not resolved) — `waiting_state` says why (`closed_by_customer` | `nothing_owed` | `paid_or_in_store` | `promised_later` | `visit_passed`), `waiting_due_at` when a promised follow-up or the visit reminder falls due. Each row carries `waiting_since`, `waiting_state`, `waiting_due_at` and `waiting_subject_id` (the message, or handoff event, the wait is about — `POST /conversations/{id}/no-reply-needed` takes it as `subject_id`). Pair with `sort=wait` for the queue order. */
141808
141808
  waiting?: boolean | "closed" | null;
141809
141809
  /** @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. */
141810
141810
  sort?: "created_at" | "updated_at" | "last_message_date" | "wait";
@@ -261266,6 +261266,12 @@ interface components {
261266
261266
  from: string;
261267
261267
  to: string;
261268
261268
  };
261269
+ /** @description The workspace's own RUT the run writes as (issuer of its sales, receiver of its purchases) and its source: sii = the SII connection, chipax = the company Chipax's login names (no SII connection yet), none = neither (a dry run reports it; an import refuses with 409 company_rut_unknown). An SII RUT that differs from Chipax's fails the run (chipax_company_mismatch). Absent on runs from before 2026-11-02. */
261270
+ company_rut?: {
261271
+ rut: string | null;
261272
+ /** @enum {string} */
261273
+ source: "sii" | "chipax" | "none";
261274
+ };
261269
261275
  /** @description Rows read from Chipax per endpoint. */
261270
261276
  read: {
261271
261277
  [key: string]: number;
@@ -261278,7 +261284,7 @@ interface components {
261278
261284
  /** @description Imported by an earlier run: nothing to do. */
261279
261285
  already: number;
261280
261286
  skip: number;
261281
- /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip. */
261287
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261282
261288
  skip_reasons: {
261283
261289
  [key: string]: number;
261284
261290
  };
@@ -261297,10 +261303,17 @@ interface components {
261297
261303
  account_path: string | null;
261298
261304
  chipax_parent_account: number | null;
261299
261305
  /**
261300
- * @description previous_import = mapped by an earlier run; chosen = the person chose it; same_name = a Vitrina account of the same kind and name; new = will be created; ambiguous = several candidates (pick one in `account_map`).
261306
+ * @description previous_import = mapped by an earlier run; chosen = the person chose it; same_name = matched to an existing Vitrina account of the same kind, by name or by the tree (`match` says how); new = will be created; ambiguous = several candidates (pick one in `account_map`).
261301
261307
  * @enum {string}
261302
261308
  */
261303
261309
  basis: "previous_import" | "chosen" | "same_name" | "new" | "ambiguous";
261310
+ /**
261311
+ * @description How: exact = same name; normalized = same once case, accents, plurals, «de»/«y» and a «(…)» qualifier are folded; similar = one or two letters apart, under the account its Chipax parent maps to; prefix = one name starts the other, there too; children = its children already sit under that account; kept_distinct = another Chipax account claimed the same match, so this one is created rather than merged; none = nothing alike, created. Absent on runs before 2026-11-02.
261312
+ * @enum {string}
261313
+ */
261314
+ match?: "previous" | "chosen" | "exact" | "normalized" | "similar" | "prefix" | "children" | "kept_distinct" | "none" | "ambiguous";
261315
+ /** @description The decision in one sentence (Spanish), for the person reviewing the dry run. Absent on runs before 2026-11-02. */
261316
+ reason?: string;
261304
261317
  candidates: {
261305
261318
  id: string;
261306
261319
  path: string;
@@ -261315,7 +261328,7 @@ interface components {
261315
261328
  /** @description Imported by an earlier run: nothing to do. */
261316
261329
  already: number;
261317
261330
  skip: number;
261318
- /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip. */
261331
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261319
261332
  skip_reasons: {
261320
261333
  [key: string]: number;
261321
261334
  };
@@ -261328,7 +261341,7 @@ interface components {
261328
261341
  /** @description Imported by an earlier run: nothing to do. */
261329
261342
  already: number;
261330
261343
  skip: number;
261331
- /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip. */
261344
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261332
261345
  skip_reasons: {
261333
261346
  [key: string]: number;
261334
261347
  };
@@ -261344,7 +261357,7 @@ interface components {
261344
261357
  /** @description Imported by an earlier run: nothing to do. */
261345
261358
  already: number;
261346
261359
  skip: number;
261347
- /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip. */
261360
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261348
261361
  skip_reasons: {
261349
261362
  [key: string]: number;
261350
261363
  };
@@ -261359,7 +261372,7 @@ interface components {
261359
261372
  /** @description Imported by an earlier run: nothing to do. */
261360
261373
  already: number;
261361
261374
  skip: number;
261362
- /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip. */
261375
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261363
261376
  skip_reasons: {
261364
261377
  [key: string]: number;
261365
261378
  };
@@ -261372,7 +261385,7 @@ interface components {
261372
261385
  /** @description Imported by an earlier run: nothing to do. */
261373
261386
  already: number;
261374
261387
  skip: number;
261375
- /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip. */
261388
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261376
261389
  skip_reasons: {
261377
261390
  [key: string]: number;
261378
261391
  };
@@ -261385,7 +261398,7 @@ interface components {
261385
261398
  /** @description Imported by an earlier run: nothing to do. */
261386
261399
  already: number;
261387
261400
  skip: number;
261388
- /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip. */
261401
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261389
261402
  skip_reasons: {
261390
261403
  [key: string]: number;
261391
261404
  };
@@ -261406,7 +261419,7 @@ interface components {
261406
261419
  /** @description Imported by an earlier run: nothing to do. */
261407
261420
  already: number;
261408
261421
  skip: number;
261409
- /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip. */
261422
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261410
261423
  skip_reasons: {
261411
261424
  [key: string]: number;
261412
261425
  };
@@ -261424,7 +261437,53 @@ interface components {
261424
261437
  /** @description Imported by an earlier run: nothing to do. */
261425
261438
  already: number;
261426
261439
  skip: number;
261427
- /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip. */
261440
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261441
+ skip_reasons: {
261442
+ [key: string]: number;
261443
+ };
261444
+ };
261445
+ /** @description Chipax's bank accounts (/cuentas-corrientes) and the Vitrina account each one is. Absent on runs before 2026-11-02. */
261446
+ bank_accounts?: {
261447
+ /** @description New in Vitrina (dry run: would be created). */
261448
+ create: number;
261449
+ /** @description Already in Vitrina (e.g. from the SII): matched and enriched. */
261450
+ match: number;
261451
+ /** @description Imported by an earlier run: nothing to do. */
261452
+ already: number;
261453
+ skip: number;
261454
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261455
+ skip_reasons: {
261456
+ [key: string]: number;
261457
+ };
261458
+ items: {
261459
+ /** @description Chipax's `cuenta_corriente_id`. */
261460
+ chipax_account: string;
261461
+ name: string;
261462
+ institution: string | null;
261463
+ number_tail: string | null;
261464
+ /** @enum {string} */
261465
+ type: "cuenta_corriente" | "cuenta_vista" | "tarjeta_credito" | "linea_credito" | "mercado_pago" | "otra";
261466
+ /** @enum {string|null} */
261467
+ currency: "CLP" | "USD" | null;
261468
+ /**
261469
+ * @description map = the Vitrina account with the same number and currency; create = a new manual account; skip = not imported (currency_unsupported).
261470
+ * @enum {string}
261471
+ */
261472
+ action: "map" | "create" | "skip";
261473
+ account_id: string | null;
261474
+ reason: string;
261475
+ }[];
261476
+ };
261477
+ /** @description Chipax's statement lines (/flujo-caja/cartolas) as bank movements, source chipax: create = new rows; match = the transfer was already in Vitrina from another rail (the bank's e-mail, a feed), kept as its twin, never a second row; already = an earlier run. Absent on runs before 2026-11-02. */
261478
+ movements?: {
261479
+ /** @description New in Vitrina (dry run: would be created). */
261480
+ create: number;
261481
+ /** @description Already in Vitrina (e.g. from the SII): matched and enriched. */
261482
+ match: number;
261483
+ /** @description Imported by an earlier run: nothing to do. */
261484
+ already: number;
261485
+ skip: number;
261486
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261428
261487
  skip_reasons: {
261429
261488
  [key: string]: number;
261430
261489
  };
@@ -261451,6 +261510,8 @@ interface components {
261451
261510
  vitrina_clp: number;
261452
261511
  matches: boolean;
261453
261512
  }[];
261513
+ /** @description Account × month rows left out of the check: balance accounts (activo, pasivo, patrimonio), which Chipax's Resultado Operacional does not cover. Absent on runs before 2026-11-02. */
261514
+ excluded_balance_rows?: number;
261454
261515
  };
261455
261516
  not_in_api: string[];
261456
261517
  warnings: string[];
package/dist/index.d.ts CHANGED
@@ -141771,7 +141771,7 @@ interface paths {
141771
141771
  *
141772
141772
  * 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.
141773
141773
  *
141774
- * 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. `waiting_state` says why: `owed` (waiting), `closed_by_customer` (the customer only acknowledged, thanked or closed after we answered), `nothing_owed` (they declined, or the message is not for us), `paid_or_in_store` (a transfer receipt right after we sent our bank details, or «llegué» / «voy subiendo»: a suggestion for a person to confirm — nothing moves a lead or records a payment) or `promised_later` (we promised to write on a later day: a dated «Recordatorio acordado» follow-up, due at `waiting_due_at`, after which the thread is waiting again) — the ones left out of the queue by a confident verdict on the newest unanswered customer message, voice notes read as their transcript — and `null` when nobody waits at all. `waiting=closed` lists those left-out threads (still live: resolving stays a person’s click).
141774
+ * 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. `waiting_state` says why: `owed` (waiting), `closed_by_customer` (the customer only acknowledged, thanked or closed after we answered), `nothing_owed` (they declined, or the message is not for us), `paid_or_in_store` (a transfer receipt right after we sent our bank details, or «llegué» / «voy subiendo»: a suggestion for a person to confirm — nothing moves a lead or records a payment) or `promised_later` (we promised to write on a later day: a dated «Recordatorio acordado» follow-up, due at `waiting_due_at`, after which the thread is waiting again) or `visit_passed` (the customer announced a store visit — «mañana paso», «el martes voy» — for a day that is now over, with nothing newer from them: a «Recordatorio acordado» to check whether they came falls due at `waiting_due_at`, the morning after; the thread does not come back to the queue when it does) — the ones left out of the queue by a confident verdict on the newest unanswered customer message, voice notes read as their transcript — and `null` when nobody waits at all. `waiting=closed` lists those left-out threads (still live: resolving stays a person’s click).
141775
141775
  *
141776
141776
  * 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.
141777
141777
  *
@@ -141804,7 +141804,7 @@ interface paths {
141804
141804
  aiReplied?: boolean | null;
141805
141805
  fromAd?: boolean | null;
141806
141806
  fromCampaign?: boolean | null;
141807
- /** @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; and what the customer wrote still asks for a reply: a thread whose newest unanswered customer message was judged, with high confidence, as the customer closing the chat («ok», «gracias», 👍 after we answered) or owing nothing, a customer who paid (a transfer receipt after our bank details) or is at the store («llegué», «voy subiendo»), or a follow-up we promised for a later day that is not due yet, is left out (any other open promise of ours always stays). `closed`: exactly those left-out threads, still live (not resolved) — `waiting_state` says why, `waiting_due_at` when a promised follow-up falls due. Each row carries `waiting_since`, `waiting_state`, `waiting_due_at` and `waiting_subject_id` (the message, or handoff event, the wait is about — `POST /conversations/{id}/no-reply-needed` takes it as `subject_id`). Pair with `sort=wait` for the queue order. */
141807
+ /** @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; and what the customer wrote still asks for a reply: a thread whose newest unanswered customer message was judged, with high confidence, as the customer closing the chat («ok», «gracias», 👍 after we answered) or owing nothing, a customer who paid (a transfer receipt after our bank details) or is at the store («llegué», «voy subiendo»), or a follow-up we promised for a later day that is not due yet, is left out (any other open promise of ours always stays); a customer who announced a store visit («mañana paso», «el martes voy») waits through that day and is left out once it is over with nothing newer from them (`visit_passed`: a «Recordatorio acordado» to check whether they came falls due the next morning). `closed`: exactly those left-out threads, still live (not resolved) — `waiting_state` says why (`closed_by_customer` | `nothing_owed` | `paid_or_in_store` | `promised_later` | `visit_passed`), `waiting_due_at` when a promised follow-up or the visit reminder falls due. Each row carries `waiting_since`, `waiting_state`, `waiting_due_at` and `waiting_subject_id` (the message, or handoff event, the wait is about — `POST /conversations/{id}/no-reply-needed` takes it as `subject_id`). Pair with `sort=wait` for the queue order. */
141808
141808
  waiting?: boolean | "closed" | null;
141809
141809
  /** @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. */
141810
141810
  sort?: "created_at" | "updated_at" | "last_message_date" | "wait";
@@ -261266,6 +261266,12 @@ interface components {
261266
261266
  from: string;
261267
261267
  to: string;
261268
261268
  };
261269
+ /** @description The workspace's own RUT the run writes as (issuer of its sales, receiver of its purchases) and its source: sii = the SII connection, chipax = the company Chipax's login names (no SII connection yet), none = neither (a dry run reports it; an import refuses with 409 company_rut_unknown). An SII RUT that differs from Chipax's fails the run (chipax_company_mismatch). Absent on runs from before 2026-11-02. */
261270
+ company_rut?: {
261271
+ rut: string | null;
261272
+ /** @enum {string} */
261273
+ source: "sii" | "chipax" | "none";
261274
+ };
261269
261275
  /** @description Rows read from Chipax per endpoint. */
261270
261276
  read: {
261271
261277
  [key: string]: number;
@@ -261278,7 +261284,7 @@ interface components {
261278
261284
  /** @description Imported by an earlier run: nothing to do. */
261279
261285
  already: number;
261280
261286
  skip: number;
261281
- /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip. */
261287
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261282
261288
  skip_reasons: {
261283
261289
  [key: string]: number;
261284
261290
  };
@@ -261297,10 +261303,17 @@ interface components {
261297
261303
  account_path: string | null;
261298
261304
  chipax_parent_account: number | null;
261299
261305
  /**
261300
- * @description previous_import = mapped by an earlier run; chosen = the person chose it; same_name = a Vitrina account of the same kind and name; new = will be created; ambiguous = several candidates (pick one in `account_map`).
261306
+ * @description previous_import = mapped by an earlier run; chosen = the person chose it; same_name = matched to an existing Vitrina account of the same kind, by name or by the tree (`match` says how); new = will be created; ambiguous = several candidates (pick one in `account_map`).
261301
261307
  * @enum {string}
261302
261308
  */
261303
261309
  basis: "previous_import" | "chosen" | "same_name" | "new" | "ambiguous";
261310
+ /**
261311
+ * @description How: exact = same name; normalized = same once case, accents, plurals, «de»/«y» and a «(…)» qualifier are folded; similar = one or two letters apart, under the account its Chipax parent maps to; prefix = one name starts the other, there too; children = its children already sit under that account; kept_distinct = another Chipax account claimed the same match, so this one is created rather than merged; none = nothing alike, created. Absent on runs before 2026-11-02.
261312
+ * @enum {string}
261313
+ */
261314
+ match?: "previous" | "chosen" | "exact" | "normalized" | "similar" | "prefix" | "children" | "kept_distinct" | "none" | "ambiguous";
261315
+ /** @description The decision in one sentence (Spanish), for the person reviewing the dry run. Absent on runs before 2026-11-02. */
261316
+ reason?: string;
261304
261317
  candidates: {
261305
261318
  id: string;
261306
261319
  path: string;
@@ -261315,7 +261328,7 @@ interface components {
261315
261328
  /** @description Imported by an earlier run: nothing to do. */
261316
261329
  already: number;
261317
261330
  skip: number;
261318
- /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip. */
261331
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261319
261332
  skip_reasons: {
261320
261333
  [key: string]: number;
261321
261334
  };
@@ -261328,7 +261341,7 @@ interface components {
261328
261341
  /** @description Imported by an earlier run: nothing to do. */
261329
261342
  already: number;
261330
261343
  skip: number;
261331
- /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip. */
261344
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261332
261345
  skip_reasons: {
261333
261346
  [key: string]: number;
261334
261347
  };
@@ -261344,7 +261357,7 @@ interface components {
261344
261357
  /** @description Imported by an earlier run: nothing to do. */
261345
261358
  already: number;
261346
261359
  skip: number;
261347
- /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip. */
261360
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261348
261361
  skip_reasons: {
261349
261362
  [key: string]: number;
261350
261363
  };
@@ -261359,7 +261372,7 @@ interface components {
261359
261372
  /** @description Imported by an earlier run: nothing to do. */
261360
261373
  already: number;
261361
261374
  skip: number;
261362
- /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip. */
261375
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261363
261376
  skip_reasons: {
261364
261377
  [key: string]: number;
261365
261378
  };
@@ -261372,7 +261385,7 @@ interface components {
261372
261385
  /** @description Imported by an earlier run: nothing to do. */
261373
261386
  already: number;
261374
261387
  skip: number;
261375
- /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip. */
261388
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261376
261389
  skip_reasons: {
261377
261390
  [key: string]: number;
261378
261391
  };
@@ -261385,7 +261398,7 @@ interface components {
261385
261398
  /** @description Imported by an earlier run: nothing to do. */
261386
261399
  already: number;
261387
261400
  skip: number;
261388
- /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip. */
261401
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261389
261402
  skip_reasons: {
261390
261403
  [key: string]: number;
261391
261404
  };
@@ -261406,7 +261419,7 @@ interface components {
261406
261419
  /** @description Imported by an earlier run: nothing to do. */
261407
261420
  already: number;
261408
261421
  skip: number;
261409
- /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip. */
261422
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261410
261423
  skip_reasons: {
261411
261424
  [key: string]: number;
261412
261425
  };
@@ -261424,7 +261437,53 @@ interface components {
261424
261437
  /** @description Imported by an earlier run: nothing to do. */
261425
261438
  already: number;
261426
261439
  skip: number;
261427
- /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip. */
261440
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261441
+ skip_reasons: {
261442
+ [key: string]: number;
261443
+ };
261444
+ };
261445
+ /** @description Chipax's bank accounts (/cuentas-corrientes) and the Vitrina account each one is. Absent on runs before 2026-11-02. */
261446
+ bank_accounts?: {
261447
+ /** @description New in Vitrina (dry run: would be created). */
261448
+ create: number;
261449
+ /** @description Already in Vitrina (e.g. from the SII): matched and enriched. */
261450
+ match: number;
261451
+ /** @description Imported by an earlier run: nothing to do. */
261452
+ already: number;
261453
+ skip: number;
261454
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261455
+ skip_reasons: {
261456
+ [key: string]: number;
261457
+ };
261458
+ items: {
261459
+ /** @description Chipax's `cuenta_corriente_id`. */
261460
+ chipax_account: string;
261461
+ name: string;
261462
+ institution: string | null;
261463
+ number_tail: string | null;
261464
+ /** @enum {string} */
261465
+ type: "cuenta_corriente" | "cuenta_vista" | "tarjeta_credito" | "linea_credito" | "mercado_pago" | "otra";
261466
+ /** @enum {string|null} */
261467
+ currency: "CLP" | "USD" | null;
261468
+ /**
261469
+ * @description map = the Vitrina account with the same number and currency; create = a new manual account; skip = not imported (currency_unsupported).
261470
+ * @enum {string}
261471
+ */
261472
+ action: "map" | "create" | "skip";
261473
+ account_id: string | null;
261474
+ reason: string;
261475
+ }[];
261476
+ };
261477
+ /** @description Chipax's statement lines (/flujo-caja/cartolas) as bank movements, source chipax: create = new rows; match = the transfer was already in Vitrina from another rail (the bank's e-mail, a feed), kept as its twin, never a second row; already = an earlier run. Absent on runs before 2026-11-02. */
261478
+ movements?: {
261479
+ /** @description New in Vitrina (dry run: would be created). */
261480
+ create: number;
261481
+ /** @description Already in Vitrina (e.g. from the SII): matched and enriched. */
261482
+ match: number;
261483
+ /** @description Imported by an earlier run: nothing to do. */
261484
+ already: number;
261485
+ skip: number;
261486
+ /** @description Why: unmapped_account, ambiguous, no_categories, voided, classified_in_vitrina (a person already classified it: kept), company_rut_unknown (connect the SII first), movement_not_found (the bank movement is not in Vitrina: connect the bank or upload the cartola), movement_ambiguous, document_not_imported, direction_mismatch, nothing_open, movement_to_income, linked_to_another_contraparte, rut_is_another_contraparte, non_positive, chosen_skip; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261428
261487
  skip_reasons: {
261429
261488
  [key: string]: number;
261430
261489
  };
@@ -261451,6 +261510,8 @@ interface components {
261451
261510
  vitrina_clp: number;
261452
261511
  matches: boolean;
261453
261512
  }[];
261513
+ /** @description Account × month rows left out of the check: balance accounts (activo, pasivo, patrimonio), which Chipax's Resultado Operacional does not cover. Absent on runs before 2026-11-02. */
261514
+ excluded_balance_rows?: number;
261454
261515
  };
261455
261516
  not_in_api: string[];
261456
261517
  warnings: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "15.26.1",
3
+ "version": "15.28.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",