@vitrina/api 17.18.0 → 17.19.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
@@ -83095,9 +83095,9 @@ interface paths {
83095
83095
  target: "transfer";
83096
83096
  /**
83097
83097
  * Format: uuid
83098
- * @description «Traspaso entre cuentas propias»: the opposite movement on another own account, same amount.
83098
+ * @description «Traspaso entre cuentas propias»: the opposite movement on another own account, same amount. Omit it when the other half is not in Vitrina (an own account that is not connected or registered yet): allowed only when the bank names the tenant's own RUT or one of its own accounts as the other side (400 `VALIDATION_ERROR` otherwise); the whole movement is the traspaso.
83099
83099
  */
83100
- paired_movement_id: string;
83100
+ paired_movement_id?: string | null;
83101
83101
  } | {
83102
83102
  /** @enum {string} */
83103
83103
  target: "third_party";
@@ -84566,9 +84566,9 @@ interface paths {
84566
84566
  target: "transfer";
84567
84567
  /**
84568
84568
  * Format: uuid
84569
- * @description «Traspaso entre cuentas propias»: the opposite movement on another own account, same amount.
84569
+ * @description «Traspaso entre cuentas propias»: the opposite movement on another own account, same amount. Omit it when the other half is not in Vitrina (an own account that is not connected or registered yet): allowed only when the bank names the tenant's own RUT or one of its own accounts as the other side (400 `VALIDATION_ERROR` otherwise); the whole movement is the traspaso.
84570
84570
  */
84571
- paired_movement_id: string;
84571
+ paired_movement_id?: string | null;
84572
84572
  } | {
84573
84573
  /** @enum {string} */
84574
84574
  target: "third_party";
@@ -84907,6 +84907,7 @@ interface paths {
84907
84907
  * "reasons": [
84908
84908
  * "folio_and_amount"
84909
84909
  * ],
84910
+ * "own_transfer": null,
84910
84911
  * "account": null,
84911
84912
  * "split": false,
84912
84913
  * "rule": null,
@@ -84933,6 +84934,7 @@ interface paths {
84933
84934
  * },
84934
84935
  * "target": null,
84935
84936
  * "reasons": [],
84937
+ * "own_transfer": null,
84936
84938
  * "account": {
84937
84939
  * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4c01",
84938
84940
  * "name": "Laboratorio",
@@ -85270,6 +85272,343 @@ interface paths {
85270
85272
  patch?: never;
85271
85273
  trace?: never;
85272
85274
  };
85275
+ "/finanzas/own-account-suggestions": {
85276
+ parameters: {
85277
+ query?: never;
85278
+ header?: never;
85279
+ path?: never;
85280
+ cookie?: never;
85281
+ };
85282
+ /**
85283
+ * Own-account cards: «Agregar ··XXXX como cuenta propia»
85284
+ * @description D5: money that goes to the workspace's own RUT or between two of its accounts is a «Traspaso entre cuentas propias» that Vitrina applies by itself (in Hecho por Vitrina, undoable), never income, never a cost and never a case. When the destination account is not registered yet, one card offers to add it. Lists the destination accounts that live traspasos went to and that are neither registered nor dismissed, biggest first, with the masked number, the total and the count. An account disappears once registered (accept), dismissed («Ahora no») or when all its traspasos were undone. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`.
85285
+ */
85286
+ get: {
85287
+ parameters: {
85288
+ query?: never;
85289
+ header?: never;
85290
+ path?: never;
85291
+ cookie?: never;
85292
+ };
85293
+ requestBody?: never;
85294
+ responses: {
85295
+ /** @description The cards */
85296
+ 200: {
85297
+ headers: {
85298
+ [name: string]: unknown;
85299
+ };
85300
+ content: {
85301
+ /**
85302
+ * @example {
85303
+ * "data": {
85304
+ * "suggestions": [
85305
+ * {
85306
+ * "key": "4521",
85307
+ * "last4": "4521",
85308
+ * "number_masked": "•••• 4521",
85309
+ * "bank_name": null,
85310
+ * "total_clp": 9950000,
85311
+ * "count": 3,
85312
+ * "first_day": "2026-10-13",
85313
+ * "last_day": "2026-11-05",
85314
+ * "title": "Agregar ··4521 como cuenta propia",
85315
+ * "body": "Le transferiste $9.950.000 a tu propio RUT. Si la cuenta es tuya, esos traspasos no cuentan como gasto."
85316
+ * }
85317
+ * ],
85318
+ * "count": 1
85319
+ * }
85320
+ * }
85321
+ */
85322
+ "application/json": {
85323
+ data: components["schemas"]["FinanzasOwnAccountSuggestions"];
85324
+ };
85325
+ };
85326
+ };
85327
+ /** @description Validation error */
85328
+ 400: {
85329
+ headers: {
85330
+ [name: string]: unknown;
85331
+ };
85332
+ content: {
85333
+ "application/json": components["schemas"]["Error"];
85334
+ };
85335
+ };
85336
+ /** @description Unauthorized */
85337
+ 401: {
85338
+ headers: {
85339
+ [name: string]: unknown;
85340
+ };
85341
+ content: {
85342
+ "application/json": components["schemas"]["Error"];
85343
+ };
85344
+ };
85345
+ /** @description Forbidden */
85346
+ 403: {
85347
+ headers: {
85348
+ [name: string]: unknown;
85349
+ };
85350
+ content: {
85351
+ "application/json": components["schemas"]["Error"];
85352
+ };
85353
+ };
85354
+ /** @description Not found */
85355
+ 404: {
85356
+ headers: {
85357
+ [name: string]: unknown;
85358
+ };
85359
+ content: {
85360
+ "application/json": components["schemas"]["Error"];
85361
+ };
85362
+ };
85363
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
85364
+ 409: {
85365
+ headers: {
85366
+ [name: string]: unknown;
85367
+ };
85368
+ content: {
85369
+ "application/json": components["schemas"]["Error"];
85370
+ };
85371
+ };
85372
+ /** @description Rate limited */
85373
+ 429: {
85374
+ headers: {
85375
+ [name: string]: unknown;
85376
+ };
85377
+ content: {
85378
+ "application/json": components["schemas"]["Error"];
85379
+ };
85380
+ };
85381
+ };
85382
+ };
85383
+ put?: never;
85384
+ post?: never;
85385
+ delete?: never;
85386
+ options?: never;
85387
+ head?: never;
85388
+ patch?: never;
85389
+ trace?: never;
85390
+ };
85391
+ "/finanzas/own-account-suggestions/{key}/accept": {
85392
+ parameters: {
85393
+ query?: never;
85394
+ header?: never;
85395
+ path?: never;
85396
+ cookie?: never;
85397
+ };
85398
+ get?: never;
85399
+ put?: never;
85400
+ /**
85401
+ * Add the suggested account as an own account
85402
+ * @description D5: money that goes to the workspace's own RUT or between two of its accounts is a «Traspaso entre cuentas propias» that Vitrina applies by itself (in Hecho por Vitrina, undoable), never income, never a cost and never a case. When the destination account is not registered yet, one card offers to add it. Adds the account to the registry as a Finanzas bank account (Cuentas; the same registry the agent shares from); its traspasos stay traspasos. Idempotent: an account already registered under that number is returned as it is. 404 `NOT_FOUND` when no traspaso went to that number. Audited. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:write`.
85403
+ */
85404
+ post: {
85405
+ parameters: {
85406
+ query?: never;
85407
+ header?: {
85408
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
85409
+ "Idempotency-Key"?: string;
85410
+ };
85411
+ path: {
85412
+ key: string;
85413
+ };
85414
+ cookie?: never;
85415
+ };
85416
+ requestBody?: {
85417
+ content: {
85418
+ /** @example {} */
85419
+ "application/json": components["schemas"]["FinanzasOwnAccountAcceptBody"];
85420
+ };
85421
+ };
85422
+ responses: {
85423
+ /** @description The registered account */
85424
+ 201: {
85425
+ headers: {
85426
+ [name: string]: unknown;
85427
+ };
85428
+ content: {
85429
+ /**
85430
+ * @example {
85431
+ * "data": {
85432
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4b01",
85433
+ * "name": "Cuenta ··4521"
85434
+ * }
85435
+ * }
85436
+ */
85437
+ "application/json": {
85438
+ data: components["schemas"]["FinanzasBankAccount"];
85439
+ };
85440
+ };
85441
+ };
85442
+ /** @description Validation error */
85443
+ 400: {
85444
+ headers: {
85445
+ [name: string]: unknown;
85446
+ };
85447
+ content: {
85448
+ "application/json": components["schemas"]["Error"];
85449
+ };
85450
+ };
85451
+ /** @description Unauthorized */
85452
+ 401: {
85453
+ headers: {
85454
+ [name: string]: unknown;
85455
+ };
85456
+ content: {
85457
+ "application/json": components["schemas"]["Error"];
85458
+ };
85459
+ };
85460
+ /** @description Forbidden */
85461
+ 403: {
85462
+ headers: {
85463
+ [name: string]: unknown;
85464
+ };
85465
+ content: {
85466
+ "application/json": components["schemas"]["Error"];
85467
+ };
85468
+ };
85469
+ /** @description Not found */
85470
+ 404: {
85471
+ headers: {
85472
+ [name: string]: unknown;
85473
+ };
85474
+ content: {
85475
+ "application/json": components["schemas"]["Error"];
85476
+ };
85477
+ };
85478
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
85479
+ 409: {
85480
+ headers: {
85481
+ [name: string]: unknown;
85482
+ };
85483
+ content: {
85484
+ "application/json": components["schemas"]["Error"];
85485
+ };
85486
+ };
85487
+ /** @description Rate limited */
85488
+ 429: {
85489
+ headers: {
85490
+ [name: string]: unknown;
85491
+ };
85492
+ content: {
85493
+ "application/json": components["schemas"]["Error"];
85494
+ };
85495
+ };
85496
+ };
85497
+ };
85498
+ delete?: never;
85499
+ options?: never;
85500
+ head?: never;
85501
+ patch?: never;
85502
+ trace?: never;
85503
+ };
85504
+ "/finanzas/own-account-suggestions/{key}/dismiss": {
85505
+ parameters: {
85506
+ query?: never;
85507
+ header?: never;
85508
+ path?: never;
85509
+ cookie?: never;
85510
+ };
85511
+ get?: never;
85512
+ put?: never;
85513
+ /**
85514
+ * Hide the own-account card for that account («Ahora no»)
85515
+ * @description D5: money that goes to the workspace's own RUT or between two of its accounts is a «Traspaso entre cuentas propias» that Vitrina applies by itself (in Hecho por Vitrina, undoable), never income, never a cost and never a case. When the destination account is not registered yet, one card offers to add it. The card never comes back for that account; its traspasos stay traspasos. Idempotent. Audited. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:write`.
85516
+ */
85517
+ post: {
85518
+ parameters: {
85519
+ query?: never;
85520
+ header?: {
85521
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
85522
+ "Idempotency-Key"?: string;
85523
+ };
85524
+ path: {
85525
+ key: string;
85526
+ };
85527
+ cookie?: never;
85528
+ };
85529
+ requestBody?: never;
85530
+ responses: {
85531
+ /** @description Dismissed */
85532
+ 200: {
85533
+ headers: {
85534
+ [name: string]: unknown;
85535
+ };
85536
+ content: {
85537
+ /**
85538
+ * @example {
85539
+ * "data": {
85540
+ * "key": "4521",
85541
+ * "dismissed": true
85542
+ * }
85543
+ * }
85544
+ */
85545
+ "application/json": {
85546
+ data: components["schemas"]["FinanzasOwnAccountDismiss"];
85547
+ };
85548
+ };
85549
+ };
85550
+ /** @description Validation error */
85551
+ 400: {
85552
+ headers: {
85553
+ [name: string]: unknown;
85554
+ };
85555
+ content: {
85556
+ "application/json": components["schemas"]["Error"];
85557
+ };
85558
+ };
85559
+ /** @description Unauthorized */
85560
+ 401: {
85561
+ headers: {
85562
+ [name: string]: unknown;
85563
+ };
85564
+ content: {
85565
+ "application/json": components["schemas"]["Error"];
85566
+ };
85567
+ };
85568
+ /** @description Forbidden */
85569
+ 403: {
85570
+ headers: {
85571
+ [name: string]: unknown;
85572
+ };
85573
+ content: {
85574
+ "application/json": components["schemas"]["Error"];
85575
+ };
85576
+ };
85577
+ /** @description Not found */
85578
+ 404: {
85579
+ headers: {
85580
+ [name: string]: unknown;
85581
+ };
85582
+ content: {
85583
+ "application/json": components["schemas"]["Error"];
85584
+ };
85585
+ };
85586
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
85587
+ 409: {
85588
+ headers: {
85589
+ [name: string]: unknown;
85590
+ };
85591
+ content: {
85592
+ "application/json": components["schemas"]["Error"];
85593
+ };
85594
+ };
85595
+ /** @description Rate limited */
85596
+ 429: {
85597
+ headers: {
85598
+ [name: string]: unknown;
85599
+ };
85600
+ content: {
85601
+ "application/json": components["schemas"]["Error"];
85602
+ };
85603
+ };
85604
+ };
85605
+ };
85606
+ delete?: never;
85607
+ options?: never;
85608
+ head?: never;
85609
+ patch?: never;
85610
+ trace?: never;
85611
+ };
85273
85612
  "/finanzas/months": {
85274
85613
  parameters: {
85275
85614
  query?: never;
@@ -281159,6 +281498,22 @@ interface components {
281159
281498
  rule_id: string;
281160
281499
  applied: number;
281161
281500
  };
281501
+ /** @description The side the money left; null = an own account Vitrina does not hold. */
281502
+ FinanzasTransferAccount: {
281503
+ /** @description The Finanzas bank account; null for an own account Vitrina does not hold (not connected or not registered yet). */
281504
+ bank_account_id: string | null;
281505
+ institution_name: string | null;
281506
+ last4: string | null;
281507
+ /** @description Ready to show: «BCI ··9819», «Cuenta ··4521» without a bank. */
281508
+ label: string;
281509
+ } | null;
281510
+ /** @description Only on `target = transfer`: «Traspaso entre tus cuentas», both sides ready to show. */
281511
+ FinanzasOwnTransfer: {
281512
+ from: components["schemas"]["FinanzasTransferAccount"];
281513
+ to: components["schemas"]["FinanzasTransferAccount"] & unknown;
281514
+ /** @description The movement on the other side, when Vitrina holds it (link to it). */
281515
+ paired_movement_id: string | null;
281516
+ } | null;
281162
281517
  FinanzasLink: {
281163
281518
  id: string;
281164
281519
  /** @enum {string} */
@@ -281211,6 +281566,7 @@ interface components {
281211
281566
  id: string;
281212
281567
  name: string;
281213
281568
  } | null;
281569
+ own_transfer: components["schemas"]["FinanzasOwnTransfer"];
281214
281570
  undoable: boolean;
281215
281571
  };
281216
281572
  FinanzasLegacyLink: {
@@ -281704,6 +282060,7 @@ interface components {
281704
282060
  reasons: string[];
281705
282061
  /** @description Links Vitrina made from ad data (Finanzas 30, reasons include `ads_charge`): the evidence in one Spanish line, e.g. «Meta Ads cobró $4.211 el 22 oct a las 09:14 (cuenta …)» or «Gasto del 22 al 24 oct: $47.824 en la cuenta … de Google Ads; el cargo lo cubre». A matcher link of a known supplier within rounding (reason `rounding`) or paid before its document was issued (`paid_before_issue`) says so here, e.g. «El pago fue $1 menor que el documento; la diferencia quedó como redondeo y el documento se cerró.». Null otherwise. */
281706
282062
  evidence: string | null;
282063
+ own_transfer: components["schemas"]["FinanzasOwnTransfer"] & unknown;
281707
282064
  account: {
281708
282065
  /** Format: uuid */
281709
282066
  id: string;
@@ -281792,6 +282149,39 @@ interface components {
281792
282149
  document_id: string | null;
281793
282150
  teaching_signal: boolean;
281794
282151
  };
282152
+ FinanzasOwnAccountSuggestion: {
282153
+ /** @description The account number as digits without leading zeros: the id for accept and dismiss. */
282154
+ key: string;
282155
+ last4: string;
282156
+ /** @description «•••• 4521». */
282157
+ number_masked: string;
282158
+ /** @description The destination bank. The bank feeds do not report it for a recipient, so today it is null: show «Cuenta ··4521». */
282159
+ bank_name: string | null;
282160
+ /** @description Σ of the traspasos that went to this account (live ones only). */
282161
+ total_clp: number;
282162
+ count: number;
282163
+ first_day: string;
282164
+ last_day: string;
282165
+ /** @description «Agregar ··4521 como cuenta propia». */
282166
+ title: string;
282167
+ /** @description «Le transferiste $9.950.000 a tu propio RUT. Si la cuenta es tuya, esos traspasos no cuentan como gasto.» */
282168
+ body: string;
282169
+ };
282170
+ FinanzasOwnAccountSuggestions: {
282171
+ suggestions: components["schemas"]["FinanzasOwnAccountSuggestion"][];
282172
+ count: number;
282173
+ };
282174
+ FinanzasOwnAccountAcceptBody: {
282175
+ /** @description The bank, when the person knows it. Optional: one click is enough. */
282176
+ institution_name?: string | null;
282177
+ /** @description Default «Cuenta ··‹últimos 4›». */
282178
+ name?: string | null;
282179
+ };
282180
+ FinanzasOwnAccountDismiss: {
282181
+ key: string;
282182
+ /** @enum {boolean} */
282183
+ dismissed: true;
282184
+ };
281795
282185
  FinanzasMonthSummary: {
281796
282186
  month: string;
281797
282187
  /** @description «septiembre 2026». */
package/dist/index.d.ts CHANGED
@@ -83095,9 +83095,9 @@ interface paths {
83095
83095
  target: "transfer";
83096
83096
  /**
83097
83097
  * Format: uuid
83098
- * @description «Traspaso entre cuentas propias»: the opposite movement on another own account, same amount.
83098
+ * @description «Traspaso entre cuentas propias»: the opposite movement on another own account, same amount. Omit it when the other half is not in Vitrina (an own account that is not connected or registered yet): allowed only when the bank names the tenant's own RUT or one of its own accounts as the other side (400 `VALIDATION_ERROR` otherwise); the whole movement is the traspaso.
83099
83099
  */
83100
- paired_movement_id: string;
83100
+ paired_movement_id?: string | null;
83101
83101
  } | {
83102
83102
  /** @enum {string} */
83103
83103
  target: "third_party";
@@ -84566,9 +84566,9 @@ interface paths {
84566
84566
  target: "transfer";
84567
84567
  /**
84568
84568
  * Format: uuid
84569
- * @description «Traspaso entre cuentas propias»: the opposite movement on another own account, same amount.
84569
+ * @description «Traspaso entre cuentas propias»: the opposite movement on another own account, same amount. Omit it when the other half is not in Vitrina (an own account that is not connected or registered yet): allowed only when the bank names the tenant's own RUT or one of its own accounts as the other side (400 `VALIDATION_ERROR` otherwise); the whole movement is the traspaso.
84570
84570
  */
84571
- paired_movement_id: string;
84571
+ paired_movement_id?: string | null;
84572
84572
  } | {
84573
84573
  /** @enum {string} */
84574
84574
  target: "third_party";
@@ -84907,6 +84907,7 @@ interface paths {
84907
84907
  * "reasons": [
84908
84908
  * "folio_and_amount"
84909
84909
  * ],
84910
+ * "own_transfer": null,
84910
84911
  * "account": null,
84911
84912
  * "split": false,
84912
84913
  * "rule": null,
@@ -84933,6 +84934,7 @@ interface paths {
84933
84934
  * },
84934
84935
  * "target": null,
84935
84936
  * "reasons": [],
84937
+ * "own_transfer": null,
84936
84938
  * "account": {
84937
84939
  * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4c01",
84938
84940
  * "name": "Laboratorio",
@@ -85270,6 +85272,343 @@ interface paths {
85270
85272
  patch?: never;
85271
85273
  trace?: never;
85272
85274
  };
85275
+ "/finanzas/own-account-suggestions": {
85276
+ parameters: {
85277
+ query?: never;
85278
+ header?: never;
85279
+ path?: never;
85280
+ cookie?: never;
85281
+ };
85282
+ /**
85283
+ * Own-account cards: «Agregar ··XXXX como cuenta propia»
85284
+ * @description D5: money that goes to the workspace's own RUT or between two of its accounts is a «Traspaso entre cuentas propias» that Vitrina applies by itself (in Hecho por Vitrina, undoable), never income, never a cost and never a case. When the destination account is not registered yet, one card offers to add it. Lists the destination accounts that live traspasos went to and that are neither registered nor dismissed, biggest first, with the masked number, the total and the count. An account disappears once registered (accept), dismissed («Ahora no») or when all its traspasos were undone. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`.
85285
+ */
85286
+ get: {
85287
+ parameters: {
85288
+ query?: never;
85289
+ header?: never;
85290
+ path?: never;
85291
+ cookie?: never;
85292
+ };
85293
+ requestBody?: never;
85294
+ responses: {
85295
+ /** @description The cards */
85296
+ 200: {
85297
+ headers: {
85298
+ [name: string]: unknown;
85299
+ };
85300
+ content: {
85301
+ /**
85302
+ * @example {
85303
+ * "data": {
85304
+ * "suggestions": [
85305
+ * {
85306
+ * "key": "4521",
85307
+ * "last4": "4521",
85308
+ * "number_masked": "•••• 4521",
85309
+ * "bank_name": null,
85310
+ * "total_clp": 9950000,
85311
+ * "count": 3,
85312
+ * "first_day": "2026-10-13",
85313
+ * "last_day": "2026-11-05",
85314
+ * "title": "Agregar ··4521 como cuenta propia",
85315
+ * "body": "Le transferiste $9.950.000 a tu propio RUT. Si la cuenta es tuya, esos traspasos no cuentan como gasto."
85316
+ * }
85317
+ * ],
85318
+ * "count": 1
85319
+ * }
85320
+ * }
85321
+ */
85322
+ "application/json": {
85323
+ data: components["schemas"]["FinanzasOwnAccountSuggestions"];
85324
+ };
85325
+ };
85326
+ };
85327
+ /** @description Validation error */
85328
+ 400: {
85329
+ headers: {
85330
+ [name: string]: unknown;
85331
+ };
85332
+ content: {
85333
+ "application/json": components["schemas"]["Error"];
85334
+ };
85335
+ };
85336
+ /** @description Unauthorized */
85337
+ 401: {
85338
+ headers: {
85339
+ [name: string]: unknown;
85340
+ };
85341
+ content: {
85342
+ "application/json": components["schemas"]["Error"];
85343
+ };
85344
+ };
85345
+ /** @description Forbidden */
85346
+ 403: {
85347
+ headers: {
85348
+ [name: string]: unknown;
85349
+ };
85350
+ content: {
85351
+ "application/json": components["schemas"]["Error"];
85352
+ };
85353
+ };
85354
+ /** @description Not found */
85355
+ 404: {
85356
+ headers: {
85357
+ [name: string]: unknown;
85358
+ };
85359
+ content: {
85360
+ "application/json": components["schemas"]["Error"];
85361
+ };
85362
+ };
85363
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
85364
+ 409: {
85365
+ headers: {
85366
+ [name: string]: unknown;
85367
+ };
85368
+ content: {
85369
+ "application/json": components["schemas"]["Error"];
85370
+ };
85371
+ };
85372
+ /** @description Rate limited */
85373
+ 429: {
85374
+ headers: {
85375
+ [name: string]: unknown;
85376
+ };
85377
+ content: {
85378
+ "application/json": components["schemas"]["Error"];
85379
+ };
85380
+ };
85381
+ };
85382
+ };
85383
+ put?: never;
85384
+ post?: never;
85385
+ delete?: never;
85386
+ options?: never;
85387
+ head?: never;
85388
+ patch?: never;
85389
+ trace?: never;
85390
+ };
85391
+ "/finanzas/own-account-suggestions/{key}/accept": {
85392
+ parameters: {
85393
+ query?: never;
85394
+ header?: never;
85395
+ path?: never;
85396
+ cookie?: never;
85397
+ };
85398
+ get?: never;
85399
+ put?: never;
85400
+ /**
85401
+ * Add the suggested account as an own account
85402
+ * @description D5: money that goes to the workspace's own RUT or between two of its accounts is a «Traspaso entre cuentas propias» that Vitrina applies by itself (in Hecho por Vitrina, undoable), never income, never a cost and never a case. When the destination account is not registered yet, one card offers to add it. Adds the account to the registry as a Finanzas bank account (Cuentas; the same registry the agent shares from); its traspasos stay traspasos. Idempotent: an account already registered under that number is returned as it is. 404 `NOT_FOUND` when no traspaso went to that number. Audited. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:write`.
85403
+ */
85404
+ post: {
85405
+ parameters: {
85406
+ query?: never;
85407
+ header?: {
85408
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
85409
+ "Idempotency-Key"?: string;
85410
+ };
85411
+ path: {
85412
+ key: string;
85413
+ };
85414
+ cookie?: never;
85415
+ };
85416
+ requestBody?: {
85417
+ content: {
85418
+ /** @example {} */
85419
+ "application/json": components["schemas"]["FinanzasOwnAccountAcceptBody"];
85420
+ };
85421
+ };
85422
+ responses: {
85423
+ /** @description The registered account */
85424
+ 201: {
85425
+ headers: {
85426
+ [name: string]: unknown;
85427
+ };
85428
+ content: {
85429
+ /**
85430
+ * @example {
85431
+ * "data": {
85432
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4b01",
85433
+ * "name": "Cuenta ··4521"
85434
+ * }
85435
+ * }
85436
+ */
85437
+ "application/json": {
85438
+ data: components["schemas"]["FinanzasBankAccount"];
85439
+ };
85440
+ };
85441
+ };
85442
+ /** @description Validation error */
85443
+ 400: {
85444
+ headers: {
85445
+ [name: string]: unknown;
85446
+ };
85447
+ content: {
85448
+ "application/json": components["schemas"]["Error"];
85449
+ };
85450
+ };
85451
+ /** @description Unauthorized */
85452
+ 401: {
85453
+ headers: {
85454
+ [name: string]: unknown;
85455
+ };
85456
+ content: {
85457
+ "application/json": components["schemas"]["Error"];
85458
+ };
85459
+ };
85460
+ /** @description Forbidden */
85461
+ 403: {
85462
+ headers: {
85463
+ [name: string]: unknown;
85464
+ };
85465
+ content: {
85466
+ "application/json": components["schemas"]["Error"];
85467
+ };
85468
+ };
85469
+ /** @description Not found */
85470
+ 404: {
85471
+ headers: {
85472
+ [name: string]: unknown;
85473
+ };
85474
+ content: {
85475
+ "application/json": components["schemas"]["Error"];
85476
+ };
85477
+ };
85478
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
85479
+ 409: {
85480
+ headers: {
85481
+ [name: string]: unknown;
85482
+ };
85483
+ content: {
85484
+ "application/json": components["schemas"]["Error"];
85485
+ };
85486
+ };
85487
+ /** @description Rate limited */
85488
+ 429: {
85489
+ headers: {
85490
+ [name: string]: unknown;
85491
+ };
85492
+ content: {
85493
+ "application/json": components["schemas"]["Error"];
85494
+ };
85495
+ };
85496
+ };
85497
+ };
85498
+ delete?: never;
85499
+ options?: never;
85500
+ head?: never;
85501
+ patch?: never;
85502
+ trace?: never;
85503
+ };
85504
+ "/finanzas/own-account-suggestions/{key}/dismiss": {
85505
+ parameters: {
85506
+ query?: never;
85507
+ header?: never;
85508
+ path?: never;
85509
+ cookie?: never;
85510
+ };
85511
+ get?: never;
85512
+ put?: never;
85513
+ /**
85514
+ * Hide the own-account card for that account («Ahora no»)
85515
+ * @description D5: money that goes to the workspace's own RUT or between two of its accounts is a «Traspaso entre cuentas propias» that Vitrina applies by itself (in Hecho por Vitrina, undoable), never income, never a cost and never a case. When the destination account is not registered yet, one card offers to add it. The card never comes back for that account; its traspasos stay traspasos. Idempotent. Audited. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:write`.
85516
+ */
85517
+ post: {
85518
+ parameters: {
85519
+ query?: never;
85520
+ header?: {
85521
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
85522
+ "Idempotency-Key"?: string;
85523
+ };
85524
+ path: {
85525
+ key: string;
85526
+ };
85527
+ cookie?: never;
85528
+ };
85529
+ requestBody?: never;
85530
+ responses: {
85531
+ /** @description Dismissed */
85532
+ 200: {
85533
+ headers: {
85534
+ [name: string]: unknown;
85535
+ };
85536
+ content: {
85537
+ /**
85538
+ * @example {
85539
+ * "data": {
85540
+ * "key": "4521",
85541
+ * "dismissed": true
85542
+ * }
85543
+ * }
85544
+ */
85545
+ "application/json": {
85546
+ data: components["schemas"]["FinanzasOwnAccountDismiss"];
85547
+ };
85548
+ };
85549
+ };
85550
+ /** @description Validation error */
85551
+ 400: {
85552
+ headers: {
85553
+ [name: string]: unknown;
85554
+ };
85555
+ content: {
85556
+ "application/json": components["schemas"]["Error"];
85557
+ };
85558
+ };
85559
+ /** @description Unauthorized */
85560
+ 401: {
85561
+ headers: {
85562
+ [name: string]: unknown;
85563
+ };
85564
+ content: {
85565
+ "application/json": components["schemas"]["Error"];
85566
+ };
85567
+ };
85568
+ /** @description Forbidden */
85569
+ 403: {
85570
+ headers: {
85571
+ [name: string]: unknown;
85572
+ };
85573
+ content: {
85574
+ "application/json": components["schemas"]["Error"];
85575
+ };
85576
+ };
85577
+ /** @description Not found */
85578
+ 404: {
85579
+ headers: {
85580
+ [name: string]: unknown;
85581
+ };
85582
+ content: {
85583
+ "application/json": components["schemas"]["Error"];
85584
+ };
85585
+ };
85586
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
85587
+ 409: {
85588
+ headers: {
85589
+ [name: string]: unknown;
85590
+ };
85591
+ content: {
85592
+ "application/json": components["schemas"]["Error"];
85593
+ };
85594
+ };
85595
+ /** @description Rate limited */
85596
+ 429: {
85597
+ headers: {
85598
+ [name: string]: unknown;
85599
+ };
85600
+ content: {
85601
+ "application/json": components["schemas"]["Error"];
85602
+ };
85603
+ };
85604
+ };
85605
+ };
85606
+ delete?: never;
85607
+ options?: never;
85608
+ head?: never;
85609
+ patch?: never;
85610
+ trace?: never;
85611
+ };
85273
85612
  "/finanzas/months": {
85274
85613
  parameters: {
85275
85614
  query?: never;
@@ -281159,6 +281498,22 @@ interface components {
281159
281498
  rule_id: string;
281160
281499
  applied: number;
281161
281500
  };
281501
+ /** @description The side the money left; null = an own account Vitrina does not hold. */
281502
+ FinanzasTransferAccount: {
281503
+ /** @description The Finanzas bank account; null for an own account Vitrina does not hold (not connected or not registered yet). */
281504
+ bank_account_id: string | null;
281505
+ institution_name: string | null;
281506
+ last4: string | null;
281507
+ /** @description Ready to show: «BCI ··9819», «Cuenta ··4521» without a bank. */
281508
+ label: string;
281509
+ } | null;
281510
+ /** @description Only on `target = transfer`: «Traspaso entre tus cuentas», both sides ready to show. */
281511
+ FinanzasOwnTransfer: {
281512
+ from: components["schemas"]["FinanzasTransferAccount"];
281513
+ to: components["schemas"]["FinanzasTransferAccount"] & unknown;
281514
+ /** @description The movement on the other side, when Vitrina holds it (link to it). */
281515
+ paired_movement_id: string | null;
281516
+ } | null;
281162
281517
  FinanzasLink: {
281163
281518
  id: string;
281164
281519
  /** @enum {string} */
@@ -281211,6 +281566,7 @@ interface components {
281211
281566
  id: string;
281212
281567
  name: string;
281213
281568
  } | null;
281569
+ own_transfer: components["schemas"]["FinanzasOwnTransfer"];
281214
281570
  undoable: boolean;
281215
281571
  };
281216
281572
  FinanzasLegacyLink: {
@@ -281704,6 +282060,7 @@ interface components {
281704
282060
  reasons: string[];
281705
282061
  /** @description Links Vitrina made from ad data (Finanzas 30, reasons include `ads_charge`): the evidence in one Spanish line, e.g. «Meta Ads cobró $4.211 el 22 oct a las 09:14 (cuenta …)» or «Gasto del 22 al 24 oct: $47.824 en la cuenta … de Google Ads; el cargo lo cubre». A matcher link of a known supplier within rounding (reason `rounding`) or paid before its document was issued (`paid_before_issue`) says so here, e.g. «El pago fue $1 menor que el documento; la diferencia quedó como redondeo y el documento se cerró.». Null otherwise. */
281706
282062
  evidence: string | null;
282063
+ own_transfer: components["schemas"]["FinanzasOwnTransfer"] & unknown;
281707
282064
  account: {
281708
282065
  /** Format: uuid */
281709
282066
  id: string;
@@ -281792,6 +282149,39 @@ interface components {
281792
282149
  document_id: string | null;
281793
282150
  teaching_signal: boolean;
281794
282151
  };
282152
+ FinanzasOwnAccountSuggestion: {
282153
+ /** @description The account number as digits without leading zeros: the id for accept and dismiss. */
282154
+ key: string;
282155
+ last4: string;
282156
+ /** @description «•••• 4521». */
282157
+ number_masked: string;
282158
+ /** @description The destination bank. The bank feeds do not report it for a recipient, so today it is null: show «Cuenta ··4521». */
282159
+ bank_name: string | null;
282160
+ /** @description Σ of the traspasos that went to this account (live ones only). */
282161
+ total_clp: number;
282162
+ count: number;
282163
+ first_day: string;
282164
+ last_day: string;
282165
+ /** @description «Agregar ··4521 como cuenta propia». */
282166
+ title: string;
282167
+ /** @description «Le transferiste $9.950.000 a tu propio RUT. Si la cuenta es tuya, esos traspasos no cuentan como gasto.» */
282168
+ body: string;
282169
+ };
282170
+ FinanzasOwnAccountSuggestions: {
282171
+ suggestions: components["schemas"]["FinanzasOwnAccountSuggestion"][];
282172
+ count: number;
282173
+ };
282174
+ FinanzasOwnAccountAcceptBody: {
282175
+ /** @description The bank, when the person knows it. Optional: one click is enough. */
282176
+ institution_name?: string | null;
282177
+ /** @description Default «Cuenta ··‹últimos 4›». */
282178
+ name?: string | null;
282179
+ };
282180
+ FinanzasOwnAccountDismiss: {
282181
+ key: string;
282182
+ /** @enum {boolean} */
282183
+ dismissed: true;
282184
+ };
281795
282185
  FinanzasMonthSummary: {
281796
282186
  month: string;
281797
282187
  /** @description «septiembre 2026». */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "17.18.0",
3
+ "version": "17.19.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",