@vitrina/api 15.28.1 → 15.28.3

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
@@ -86189,24 +86189,41 @@ interface paths {
86189
86189
  * "totals_check": {
86190
86190
  * "available": true,
86191
86191
  * "mismatches": 1,
86192
+ * "explained": 1,
86193
+ * "explained_by_code": {
86194
+ * "redondeo": -1
86195
+ * },
86192
86196
  * "rows": [
86193
86197
  * {
86194
- * "chipax_account": 5101,
86195
- * "account_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4c11",
86196
- * "month": "2026-09",
86197
- * "chipax_clp": 2380000,
86198
- * "imported_chipax_clp": 2380000,
86199
- * "vitrina_clp": 2832200,
86200
- * "matches": true
86201
- * },
86202
- * {
86203
86198
  * "chipax_account": 5110,
86204
86199
  * "account_id": null,
86205
86200
  * "month": "2026-09",
86206
86201
  * "chipax_clp": 6120000,
86207
86202
  * "imported_chipax_clp": 0,
86208
86203
  * "vitrina_clp": 0,
86204
+ * "difference_clp": -6120000,
86205
+ * "explanations": [],
86206
+ * "unexplained_clp": -6120000,
86207
+ * "status": "mismatch",
86209
86208
  * "matches": false
86209
+ * },
86210
+ * {
86211
+ * "chipax_account": 5101,
86212
+ * "account_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4c11",
86213
+ * "month": "2026-09",
86214
+ * "chipax_clp": 2380000,
86215
+ * "imported_chipax_clp": 2380000,
86216
+ * "vitrina_clp": 2379999,
86217
+ * "difference_clp": -1,
86218
+ * "explanations": [
86219
+ * {
86220
+ * "code": "redondeo",
86221
+ * "amount_clp": -1
86222
+ * }
86223
+ * ],
86224
+ * "unexplained_clp": 0,
86225
+ * "status": "explained",
86226
+ * "matches": true
86210
86227
  * }
86211
86228
  * ]
86212
86229
  * },
@@ -259313,6 +259330,24 @@ interface components {
259313
259330
  reason: string;
259314
259331
  };
259315
259332
  };
259333
+ FintocAccountMatch: {
259334
+ /** @description Fintoc's account id. */
259335
+ account_id: string;
259336
+ /** @description The Finanzas bank account that now stands for it. */
259337
+ bank_account_id: string;
259338
+ /**
259339
+ * @description `kept`: this link already had it. `adopted`: the existing account with the same number and currency (created by the Chipax import or a cartola upload) took the link, with its movements. `created`: a new account.
259340
+ * @enum {string}
259341
+ */
259342
+ outcome: "kept" | "adopted" | "created";
259343
+ /**
259344
+ * @description Why an account with the same number and currency was NOT adopted (a new one was created instead); null when nothing was in doubt.
259345
+ * @enum {string|null}
259346
+ */
259347
+ reason: "several_candidates" | "different_bank" | "different_holder" | "already_fed" | null;
259348
+ /** @description The existing accounts with the same number and currency. */
259349
+ candidate_bank_account_ids: string[];
259350
+ };
259316
259351
  BankFeedConnection: {
259317
259352
  id: string;
259318
259353
  /** @enum {string} */
@@ -259330,6 +259365,8 @@ interface components {
259330
259365
  last_sync_status: string | null;
259331
259366
  last_sync_error: string | null;
259332
259367
  sync_cursor: string | null;
259368
+ /** @description Connect answer only: what the link did with each of its accounts. */
259369
+ account_matches?: components["schemas"]["FintocAccountMatch"][];
259333
259370
  };
259334
259371
  BankFeedFintocConnectBody: {
259335
259372
  exchange_token?: string;
@@ -259414,6 +259451,8 @@ interface components {
259414
259451
  reconnect: boolean;
259415
259452
  disconnect: boolean;
259416
259453
  };
259454
+ /** @description Connect and reconnect answers only: per linked account, whether it was kept, adopted the existing account with the same number and currency, or created (with the reason a match was not adopted). */
259455
+ account_matches?: components["schemas"]["FintocAccountMatch"][];
259417
259456
  };
259418
259457
  FinanzasConnections: {
259419
259458
  connections: components["schemas"]["FinanzasConnection"][];
@@ -261284,7 +261323,7 @@ interface components {
261284
261323
  /** @description Imported by an earlier run: nothing to do. */
261285
261324
  already: number;
261286
261325
  skip: number;
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. */
261326
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261288
261327
  skip_reasons: {
261289
261328
  [key: string]: number;
261290
261329
  };
@@ -261328,7 +261367,7 @@ interface components {
261328
261367
  /** @description Imported by an earlier run: nothing to do. */
261329
261368
  already: number;
261330
261369
  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; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261370
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261332
261371
  skip_reasons: {
261333
261372
  [key: string]: number;
261334
261373
  };
@@ -261341,7 +261380,7 @@ interface components {
261341
261380
  /** @description Imported by an earlier run: nothing to do. */
261342
261381
  already: number;
261343
261382
  skip: number;
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. */
261383
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261345
261384
  skip_reasons: {
261346
261385
  [key: string]: number;
261347
261386
  };
@@ -261357,13 +261396,30 @@ interface components {
261357
261396
  /** @description Imported by an earlier run: nothing to do. */
261358
261397
  already: number;
261359
261398
  skip: number;
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. */
261399
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261361
261400
  skip_reasons: {
261362
261401
  [key: string]: number;
261363
261402
  };
261364
261403
  /** @description Documents whose Chipax amounts were spread over the document total (Chipax classified the net). */
261365
261404
  scaled: number;
261405
+ /** @description Facturas Chipax classified only in part: Vitrina takes exactly the classified amounts and leaves the rest unclassified (it surfaces in Por resolver). Absent on runs before 2026-11-03. */
261406
+ partial?: number;
261407
+ partial_items?: {
261408
+ chipax_ref: string;
261409
+ label: string;
261410
+ total_clp: number;
261411
+ unclassified_clp: number;
261412
+ }[];
261366
261413
  };
261414
+ /** @description Every nota de crédito of sales and how it got its accounts: summary = Chipax hangs it on a monthly boleta summary (it takes the summary's income accounts); boleta_reference = it references a boleta (the summary of that month); none = neither, left unclassified («Ingresos sin clasificar»). Absent on runs before 2026-11-03. */
261415
+ credit_notes?: {
261416
+ chipax_ref: string;
261417
+ folio: string | null;
261418
+ day: string;
261419
+ amount_clp: number;
261420
+ /** @enum {string} */
261421
+ path: "summary" | "boleta_reference" | "none";
261422
+ }[];
261367
261423
  links: {
261368
261424
  /** @description New in Vitrina (dry run: would be created). */
261369
261425
  create: number;
@@ -261372,7 +261428,7 @@ interface components {
261372
261428
  /** @description Imported by an earlier run: nothing to do. */
261373
261429
  already: number;
261374
261430
  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; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261431
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261376
261432
  skip_reasons: {
261377
261433
  [key: string]: number;
261378
261434
  };
@@ -261385,7 +261441,7 @@ interface components {
261385
261441
  /** @description Imported by an earlier run: nothing to do. */
261386
261442
  already: number;
261387
261443
  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; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261444
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261389
261445
  skip_reasons: {
261390
261446
  [key: string]: number;
261391
261447
  };
@@ -261398,7 +261454,7 @@ interface components {
261398
261454
  /** @description Imported by an earlier run: nothing to do. */
261399
261455
  already: number;
261400
261456
  skip: number;
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. */
261457
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261402
261458
  skip_reasons: {
261403
261459
  [key: string]: number;
261404
261460
  };
@@ -261419,7 +261475,7 @@ interface components {
261419
261475
  /** @description Imported by an earlier run: nothing to do. */
261420
261476
  already: number;
261421
261477
  skip: number;
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. */
261478
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261423
261479
  skip_reasons: {
261424
261480
  [key: string]: number;
261425
261481
  };
@@ -261437,7 +261493,7 @@ interface components {
261437
261493
  /** @description Imported by an earlier run: nothing to do. */
261438
261494
  already: number;
261439
261495
  skip: number;
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. */
261496
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261441
261497
  skip_reasons: {
261442
261498
  [key: string]: number;
261443
261499
  };
@@ -261451,7 +261507,7 @@ interface components {
261451
261507
  /** @description Imported by an earlier run: nothing to do. */
261452
261508
  already: number;
261453
261509
  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. */
261510
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261455
261511
  skip_reasons: {
261456
261512
  [key: string]: number;
261457
261513
  };
@@ -261483,11 +261539,24 @@ interface components {
261483
261539
  /** @description Imported by an earlier run: nothing to do. */
261484
261540
  already: number;
261485
261541
  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. */
261542
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261487
261543
  skip_reasons: {
261488
261544
  [key: string]: number;
261489
261545
  };
261490
261546
  };
261547
+ /** @description Chipax's USD lines (a dollar card) and their CLP at each day's dólar observado, a dry run included. The rate cache is filled first, one mindicador call per year; a day still without a rate fails that line alone (skip reason usd_rate_missing). Absent when there are none, and on runs before 2026-11-03. */
261548
+ usd_movements?: {
261549
+ lines: number;
261550
+ converted: number;
261551
+ failed: number;
261552
+ /** @description In cents. */
261553
+ usd_total: number;
261554
+ clp_total: number;
261555
+ rate_years: {
261556
+ [key: string]: "cached" | "fetched" | "failed";
261557
+ };
261558
+ missing_days: string[];
261559
+ };
261491
261560
  unmapped: {
261492
261561
  /** @enum {string} */
261493
261562
  type: "account" | "document" | "link" | "classification";
@@ -261497,7 +261566,14 @@ interface components {
261497
261566
  }[];
261498
261567
  totals_check: {
261499
261568
  available: boolean;
261569
+ /** @description Rows with a difference no reason covers. */
261500
261570
  mismatches: number;
261571
+ /** @description Rows whose whole difference has a reason. Absent on runs before 2026-11-03. */
261572
+ explained?: number;
261573
+ /** @description The explained pesos per reason over every row. Absent on runs before 2026-11-03. */
261574
+ explained_by_code?: {
261575
+ [key: string]: number;
261576
+ };
261501
261577
  rows: {
261502
261578
  chipax_account: number;
261503
261579
  account_id: string | null;
@@ -261506,8 +261582,24 @@ interface components {
261506
261582
  chipax_clp: number;
261507
261583
  /** @description What Chipax classified on the documents now classified in Vitrina. */
261508
261584
  imported_chipax_clp: number;
261509
- /** @description Vitrina's lines on those documents (the document total; differs from Chipax where Chipax classified the net). */
261585
+ /** @description What Vitrina will book in that account and month for those documents, at the Resultado basis: net of IVA, a nota de crédito subtracts (runs before 2026-11-03: the lines on the document total). */
261510
261586
  vitrina_clp: number;
261587
+ /** @description vitrina_clp − chipax_clp. Absent on runs before 2026-11-03. */
261588
+ difference_clp?: number;
261589
+ /** @description The explained part of the difference, per reason: boletas_sin_nota_de_venta (a boleta summary books the month's boletas; Chipax's RO counts only its notas de venta), nota_de_credito_de_boletas (a nota de crédito of boletas subtracts in Vitrina; Chipax's RO leaves it out), redondeo (a split line prorated to the net books at most ±1 peso off Chipax). Absent on runs before 2026-11-03. */
261590
+ explanations?: {
261591
+ /** @enum {string} */
261592
+ code: "boletas_sin_nota_de_venta" | "nota_de_credito_de_boletas" | "redondeo";
261593
+ amount_clp: number;
261594
+ }[];
261595
+ /** @description The part of the difference no reason covers. Absent on runs before 2026-11-03. */
261596
+ unexplained_clp?: number;
261597
+ /**
261598
+ * @description match = no difference; explained = every peso of the difference has a reason; mismatch = some does not. Absent on runs before 2026-11-03.
261599
+ * @enum {string}
261600
+ */
261601
+ status?: "match" | "explained" | "mismatch";
261602
+ /** @description No unexplained peso (status is not mismatch). */
261511
261603
  matches: boolean;
261512
261604
  }[];
261513
261605
  /** @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. */
package/dist/index.d.ts CHANGED
@@ -86189,24 +86189,41 @@ interface paths {
86189
86189
  * "totals_check": {
86190
86190
  * "available": true,
86191
86191
  * "mismatches": 1,
86192
+ * "explained": 1,
86193
+ * "explained_by_code": {
86194
+ * "redondeo": -1
86195
+ * },
86192
86196
  * "rows": [
86193
86197
  * {
86194
- * "chipax_account": 5101,
86195
- * "account_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4c11",
86196
- * "month": "2026-09",
86197
- * "chipax_clp": 2380000,
86198
- * "imported_chipax_clp": 2380000,
86199
- * "vitrina_clp": 2832200,
86200
- * "matches": true
86201
- * },
86202
- * {
86203
86198
  * "chipax_account": 5110,
86204
86199
  * "account_id": null,
86205
86200
  * "month": "2026-09",
86206
86201
  * "chipax_clp": 6120000,
86207
86202
  * "imported_chipax_clp": 0,
86208
86203
  * "vitrina_clp": 0,
86204
+ * "difference_clp": -6120000,
86205
+ * "explanations": [],
86206
+ * "unexplained_clp": -6120000,
86207
+ * "status": "mismatch",
86209
86208
  * "matches": false
86209
+ * },
86210
+ * {
86211
+ * "chipax_account": 5101,
86212
+ * "account_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4c11",
86213
+ * "month": "2026-09",
86214
+ * "chipax_clp": 2380000,
86215
+ * "imported_chipax_clp": 2380000,
86216
+ * "vitrina_clp": 2379999,
86217
+ * "difference_clp": -1,
86218
+ * "explanations": [
86219
+ * {
86220
+ * "code": "redondeo",
86221
+ * "amount_clp": -1
86222
+ * }
86223
+ * ],
86224
+ * "unexplained_clp": 0,
86225
+ * "status": "explained",
86226
+ * "matches": true
86210
86227
  * }
86211
86228
  * ]
86212
86229
  * },
@@ -259313,6 +259330,24 @@ interface components {
259313
259330
  reason: string;
259314
259331
  };
259315
259332
  };
259333
+ FintocAccountMatch: {
259334
+ /** @description Fintoc's account id. */
259335
+ account_id: string;
259336
+ /** @description The Finanzas bank account that now stands for it. */
259337
+ bank_account_id: string;
259338
+ /**
259339
+ * @description `kept`: this link already had it. `adopted`: the existing account with the same number and currency (created by the Chipax import or a cartola upload) took the link, with its movements. `created`: a new account.
259340
+ * @enum {string}
259341
+ */
259342
+ outcome: "kept" | "adopted" | "created";
259343
+ /**
259344
+ * @description Why an account with the same number and currency was NOT adopted (a new one was created instead); null when nothing was in doubt.
259345
+ * @enum {string|null}
259346
+ */
259347
+ reason: "several_candidates" | "different_bank" | "different_holder" | "already_fed" | null;
259348
+ /** @description The existing accounts with the same number and currency. */
259349
+ candidate_bank_account_ids: string[];
259350
+ };
259316
259351
  BankFeedConnection: {
259317
259352
  id: string;
259318
259353
  /** @enum {string} */
@@ -259330,6 +259365,8 @@ interface components {
259330
259365
  last_sync_status: string | null;
259331
259366
  last_sync_error: string | null;
259332
259367
  sync_cursor: string | null;
259368
+ /** @description Connect answer only: what the link did with each of its accounts. */
259369
+ account_matches?: components["schemas"]["FintocAccountMatch"][];
259333
259370
  };
259334
259371
  BankFeedFintocConnectBody: {
259335
259372
  exchange_token?: string;
@@ -259414,6 +259451,8 @@ interface components {
259414
259451
  reconnect: boolean;
259415
259452
  disconnect: boolean;
259416
259453
  };
259454
+ /** @description Connect and reconnect answers only: per linked account, whether it was kept, adopted the existing account with the same number and currency, or created (with the reason a match was not adopted). */
259455
+ account_matches?: components["schemas"]["FintocAccountMatch"][];
259417
259456
  };
259418
259457
  FinanzasConnections: {
259419
259458
  connections: components["schemas"]["FinanzasConnection"][];
@@ -261284,7 +261323,7 @@ interface components {
261284
261323
  /** @description Imported by an earlier run: nothing to do. */
261285
261324
  already: number;
261286
261325
  skip: number;
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. */
261326
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261288
261327
  skip_reasons: {
261289
261328
  [key: string]: number;
261290
261329
  };
@@ -261328,7 +261367,7 @@ interface components {
261328
261367
  /** @description Imported by an earlier run: nothing to do. */
261329
261368
  already: number;
261330
261369
  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; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261370
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261332
261371
  skip_reasons: {
261333
261372
  [key: string]: number;
261334
261373
  };
@@ -261341,7 +261380,7 @@ interface components {
261341
261380
  /** @description Imported by an earlier run: nothing to do. */
261342
261381
  already: number;
261343
261382
  skip: number;
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. */
261383
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261345
261384
  skip_reasons: {
261346
261385
  [key: string]: number;
261347
261386
  };
@@ -261357,13 +261396,30 @@ interface components {
261357
261396
  /** @description Imported by an earlier run: nothing to do. */
261358
261397
  already: number;
261359
261398
  skip: number;
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. */
261399
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261361
261400
  skip_reasons: {
261362
261401
  [key: string]: number;
261363
261402
  };
261364
261403
  /** @description Documents whose Chipax amounts were spread over the document total (Chipax classified the net). */
261365
261404
  scaled: number;
261405
+ /** @description Facturas Chipax classified only in part: Vitrina takes exactly the classified amounts and leaves the rest unclassified (it surfaces in Por resolver). Absent on runs before 2026-11-03. */
261406
+ partial?: number;
261407
+ partial_items?: {
261408
+ chipax_ref: string;
261409
+ label: string;
261410
+ total_clp: number;
261411
+ unclassified_clp: number;
261412
+ }[];
261366
261413
  };
261414
+ /** @description Every nota de crédito of sales and how it got its accounts: summary = Chipax hangs it on a monthly boleta summary (it takes the summary's income accounts); boleta_reference = it references a boleta (the summary of that month); none = neither, left unclassified («Ingresos sin clasificar»). Absent on runs before 2026-11-03. */
261415
+ credit_notes?: {
261416
+ chipax_ref: string;
261417
+ folio: string | null;
261418
+ day: string;
261419
+ amount_clp: number;
261420
+ /** @enum {string} */
261421
+ path: "summary" | "boleta_reference" | "none";
261422
+ }[];
261367
261423
  links: {
261368
261424
  /** @description New in Vitrina (dry run: would be created). */
261369
261425
  create: number;
@@ -261372,7 +261428,7 @@ interface components {
261372
261428
  /** @description Imported by an earlier run: nothing to do. */
261373
261429
  already: number;
261374
261430
  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; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261431
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261376
261432
  skip_reasons: {
261377
261433
  [key: string]: number;
261378
261434
  };
@@ -261385,7 +261441,7 @@ interface components {
261385
261441
  /** @description Imported by an earlier run: nothing to do. */
261386
261442
  already: number;
261387
261443
  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; bank movements: no_bank_account (Chipax booked the line on no account), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed. */
261444
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261389
261445
  skip_reasons: {
261390
261446
  [key: string]: number;
261391
261447
  };
@@ -261398,7 +261454,7 @@ interface components {
261398
261454
  /** @description Imported by an earlier run: nothing to do. */
261399
261455
  already: number;
261400
261456
  skip: number;
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. */
261457
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261402
261458
  skip_reasons: {
261403
261459
  [key: string]: number;
261404
261460
  };
@@ -261419,7 +261475,7 @@ interface components {
261419
261475
  /** @description Imported by an earlier run: nothing to do. */
261420
261476
  already: number;
261421
261477
  skip: number;
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. */
261478
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261423
261479
  skip_reasons: {
261424
261480
  [key: string]: number;
261425
261481
  };
@@ -261437,7 +261493,7 @@ interface components {
261437
261493
  /** @description Imported by an earlier run: nothing to do. */
261438
261494
  already: number;
261439
261495
  skip: number;
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. */
261496
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261441
261497
  skip_reasons: {
261442
261498
  [key: string]: number;
261443
261499
  };
@@ -261451,7 +261507,7 @@ interface components {
261451
261507
  /** @description Imported by an earlier run: nothing to do. */
261452
261508
  already: number;
261453
261509
  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. */
261510
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261455
261511
  skip_reasons: {
261456
261512
  [key: string]: number;
261457
261513
  };
@@ -261483,11 +261539,24 @@ interface components {
261483
261539
  /** @description Imported by an earlier run: nothing to do. */
261484
261540
  already: number;
261485
261541
  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. */
261542
+ /** @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 (the line names no account at all; a line Chipax books on its «no account» bucket, cuenta_corriente_id 0, lands on a manual account «Chipax: movimientos sin cuenta bancaria» since 2026-11-03), bank_account_not_imported, currency_unsupported, unreadable, ingest_failed, usd_rate_missing (no dólar observado for the day: that line alone). */
261487
261543
  skip_reasons: {
261488
261544
  [key: string]: number;
261489
261545
  };
261490
261546
  };
261547
+ /** @description Chipax's USD lines (a dollar card) and their CLP at each day's dólar observado, a dry run included. The rate cache is filled first, one mindicador call per year; a day still without a rate fails that line alone (skip reason usd_rate_missing). Absent when there are none, and on runs before 2026-11-03. */
261548
+ usd_movements?: {
261549
+ lines: number;
261550
+ converted: number;
261551
+ failed: number;
261552
+ /** @description In cents. */
261553
+ usd_total: number;
261554
+ clp_total: number;
261555
+ rate_years: {
261556
+ [key: string]: "cached" | "fetched" | "failed";
261557
+ };
261558
+ missing_days: string[];
261559
+ };
261491
261560
  unmapped: {
261492
261561
  /** @enum {string} */
261493
261562
  type: "account" | "document" | "link" | "classification";
@@ -261497,7 +261566,14 @@ interface components {
261497
261566
  }[];
261498
261567
  totals_check: {
261499
261568
  available: boolean;
261569
+ /** @description Rows with a difference no reason covers. */
261500
261570
  mismatches: number;
261571
+ /** @description Rows whose whole difference has a reason. Absent on runs before 2026-11-03. */
261572
+ explained?: number;
261573
+ /** @description The explained pesos per reason over every row. Absent on runs before 2026-11-03. */
261574
+ explained_by_code?: {
261575
+ [key: string]: number;
261576
+ };
261501
261577
  rows: {
261502
261578
  chipax_account: number;
261503
261579
  account_id: string | null;
@@ -261506,8 +261582,24 @@ interface components {
261506
261582
  chipax_clp: number;
261507
261583
  /** @description What Chipax classified on the documents now classified in Vitrina. */
261508
261584
  imported_chipax_clp: number;
261509
- /** @description Vitrina's lines on those documents (the document total; differs from Chipax where Chipax classified the net). */
261585
+ /** @description What Vitrina will book in that account and month for those documents, at the Resultado basis: net of IVA, a nota de crédito subtracts (runs before 2026-11-03: the lines on the document total). */
261510
261586
  vitrina_clp: number;
261587
+ /** @description vitrina_clp − chipax_clp. Absent on runs before 2026-11-03. */
261588
+ difference_clp?: number;
261589
+ /** @description The explained part of the difference, per reason: boletas_sin_nota_de_venta (a boleta summary books the month's boletas; Chipax's RO counts only its notas de venta), nota_de_credito_de_boletas (a nota de crédito of boletas subtracts in Vitrina; Chipax's RO leaves it out), redondeo (a split line prorated to the net books at most ±1 peso off Chipax). Absent on runs before 2026-11-03. */
261590
+ explanations?: {
261591
+ /** @enum {string} */
261592
+ code: "boletas_sin_nota_de_venta" | "nota_de_credito_de_boletas" | "redondeo";
261593
+ amount_clp: number;
261594
+ }[];
261595
+ /** @description The part of the difference no reason covers. Absent on runs before 2026-11-03. */
261596
+ unexplained_clp?: number;
261597
+ /**
261598
+ * @description match = no difference; explained = every peso of the difference has a reason; mismatch = some does not. Absent on runs before 2026-11-03.
261599
+ * @enum {string}
261600
+ */
261601
+ status?: "match" | "explained" | "mismatch";
261602
+ /** @description No unexplained peso (status is not mismatch). */
261511
261603
  matches: boolean;
261512
261604
  }[];
261513
261605
  /** @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. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "15.28.1",
3
+ "version": "15.28.3",
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",