@vitrina/api 15.31.0 → 15.33.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
@@ -82775,7 +82775,7 @@ interface paths {
82775
82775
  };
82776
82776
  /**
82777
82777
  * The «Por resolver» inbox: open cases, biggest first
82778
- * @description A case is the open money of one Contraparte that Vitrina could not resolve on its own: bank movements nothing explains, cost documents with no account, and money out classified with no document («Falta documento»). Cases are recomputed after every bank, Mercado Pago and SII sync and before every read; only cases whose inputs changed are rewritten. Sorted by the money at stake. `kind` filters; `total` and `amount_at_stake_clp` cover every open case of that filter. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`.
82778
+ * @description A case is the open money of one Contraparte that Vitrina could not resolve on its own: bank movements nothing explains, cost documents with no account, and money out classified with no document («Falta documento»). Cases are recomputed after every bank, Mercado Pago and SII sync and before every read; only cases whose inputs changed are rewritten. Sorted by the money at stake (`order=needs_person`: the cases a person must answer first). `kind` and `period` (`recent` = this month and last month, `history` = older) filter; `total` and `amount_at_stake_clp` cover every open case of that filter, `counts` splits them (recent / history, needs_person / ready) and `waiting` lists the payments «esperando factura» (no case yet). Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`.
82779
82779
  */
82780
82780
  get: {
82781
82781
  parameters: {
@@ -82783,6 +82783,8 @@ interface paths {
82783
82783
  kind?: "reconcile" | "transfer" | "classify" | "missing_document" | "unknown" | "ads_charge";
82784
82784
  limit?: number;
82785
82785
  offset?: number | null;
82786
+ period?: "recent" | "history" | "all";
82787
+ order?: "amount" | "needs_person";
82786
82788
  };
82787
82789
  header?: never;
82788
82790
  path?: never;
@@ -82815,7 +82817,9 @@ interface paths {
82815
82817
  * "movement_count": 1,
82816
82818
  * "document_count": 2,
82817
82819
  * "ready": true,
82818
- * "opened_at": "2026-10-22T09:00:00.000Z"
82820
+ * "opened_at": "2026-10-22T09:00:00.000Z",
82821
+ * "latest_day": "2026-10-21",
82822
+ * "fingerprint": "9c1e4b7a2f0d5c8e1b3a6f9d2c5e8b1a4d7f0c3e"
82819
82823
  * },
82820
82824
  * {
82821
82825
  * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4c02",
@@ -82828,11 +82832,25 @@ interface paths {
82828
82832
  * "movement_count": 1,
82829
82833
  * "document_count": 0,
82830
82834
  * "ready": true,
82831
- * "opened_at": "2026-10-23T09:00:00.000Z"
82835
+ * "opened_at": "2026-10-23T09:00:00.000Z",
82836
+ * "latest_day": "2026-10-20",
82837
+ * "fingerprint": "9c1e4b7a2f0d5c8e1b3a6f9d2c5e8b1a4d7f0c3e"
82832
82838
  * }
82833
82839
  * ],
82834
82840
  * "total": 2,
82835
- * "amount_at_stake_clp": 855290
82841
+ * "amount_at_stake_clp": 855290,
82842
+ * "since": "2026-09-01",
82843
+ * "counts": {
82844
+ * "recent": 2,
82845
+ * "history": 0,
82846
+ * "needs_person": 0,
82847
+ * "ready": 2
82848
+ * },
82849
+ * "waiting": {
82850
+ * "count": 0,
82851
+ * "amount_clp": 0,
82852
+ * "items": []
82853
+ * }
82836
82854
  * }
82837
82855
  * }
82838
82856
  */
@@ -83211,6 +83229,137 @@ interface paths {
83211
83229
  patch?: never;
83212
83230
  trace?: never;
83213
83231
  };
83232
+ "/finanzas/cases/confirm-bulk": {
83233
+ parameters: {
83234
+ query?: never;
83235
+ header?: never;
83236
+ path?: never;
83237
+ cookie?: never;
83238
+ };
83239
+ get?: never;
83240
+ put?: never;
83241
+ /**
83242
+ * «Confirmar en bloque»: several ready cases at once
83243
+ * @description Confirms each case’s own proposal (every case must be `ready`), with the fingerprint the screen read it with. Each case is its own transaction: a changed, resolved, incomplete or refused case stays open and is listed in `failed` with its reason; the rest are confirmed. At most 100 per call. Audited. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:write`.
83244
+ */
83245
+ post: {
83246
+ parameters: {
83247
+ query?: {
83248
+ adjustment_reason?: string;
83249
+ };
83250
+ header?: {
83251
+ /** @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. */
83252
+ "Idempotency-Key"?: string;
83253
+ };
83254
+ path?: never;
83255
+ cookie?: never;
83256
+ };
83257
+ requestBody?: {
83258
+ content: {
83259
+ /**
83260
+ * @example {
83261
+ * "cases": [
83262
+ * {
83263
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4c01",
83264
+ * "fingerprint": "9c1e4b7a2f0d5c8e1b3a6f9d2c5e8b1a4d7f0c3e"
83265
+ * }
83266
+ * ]
83267
+ * }
83268
+ */
83269
+ "application/json": components["schemas"]["FinanzasCasesBulkConfirmBody"];
83270
+ };
83271
+ };
83272
+ responses: {
83273
+ /** @description Confirmed and refused cases */
83274
+ 200: {
83275
+ headers: {
83276
+ [name: string]: unknown;
83277
+ };
83278
+ content: {
83279
+ /**
83280
+ * @example {
83281
+ * "data": {
83282
+ * "confirmed": [
83283
+ * {
83284
+ * "case_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4c01",
83285
+ * "applied": {
83286
+ * "links": 1,
83287
+ * "classifications": 0,
83288
+ * "accepted": 0
83289
+ * }
83290
+ * }
83291
+ * ],
83292
+ * "failed": []
83293
+ * }
83294
+ * }
83295
+ */
83296
+ "application/json": {
83297
+ data: components["schemas"]["FinanzasCasesBulkConfirmResult"];
83298
+ };
83299
+ };
83300
+ };
83301
+ /** @description Validation error */
83302
+ 400: {
83303
+ headers: {
83304
+ [name: string]: unknown;
83305
+ };
83306
+ content: {
83307
+ "application/json": components["schemas"]["Error"];
83308
+ };
83309
+ };
83310
+ /** @description Unauthorized */
83311
+ 401: {
83312
+ headers: {
83313
+ [name: string]: unknown;
83314
+ };
83315
+ content: {
83316
+ "application/json": components["schemas"]["Error"];
83317
+ };
83318
+ };
83319
+ /** @description Forbidden */
83320
+ 403: {
83321
+ headers: {
83322
+ [name: string]: unknown;
83323
+ };
83324
+ content: {
83325
+ "application/json": components["schemas"]["Error"];
83326
+ };
83327
+ };
83328
+ /** @description Not found */
83329
+ 404: {
83330
+ headers: {
83331
+ [name: string]: unknown;
83332
+ };
83333
+ content: {
83334
+ "application/json": components["schemas"]["Error"];
83335
+ };
83336
+ };
83337
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
83338
+ 409: {
83339
+ headers: {
83340
+ [name: string]: unknown;
83341
+ };
83342
+ content: {
83343
+ "application/json": components["schemas"]["Error"];
83344
+ };
83345
+ };
83346
+ /** @description Rate limited */
83347
+ 429: {
83348
+ headers: {
83349
+ [name: string]: unknown;
83350
+ };
83351
+ content: {
83352
+ "application/json": components["schemas"]["Error"];
83353
+ };
83354
+ };
83355
+ };
83356
+ };
83357
+ delete?: never;
83358
+ options?: never;
83359
+ head?: never;
83360
+ patch?: never;
83361
+ trace?: never;
83362
+ };
83214
83363
  "/finanzas/cases/{id}/confirm": {
83215
83364
  parameters: {
83216
83365
  query?: never;
@@ -260868,10 +261017,20 @@ interface components {
260868
261017
  /** @enum {string} */
260869
261018
  status: "active" | "paused" | "archived";
260870
261019
  /**
260871
- * @description person = created by a person; vitrina = Vitrina created it after a person confirmed the same classification twice for this Contraparte (announced in «Hecho por Vitrina»).
261020
+ * @description person = created by a person; vitrina = Vitrina created it, after a person confirmed the same classification twice for this Contraparte or from a consistent history (≥3 items, ≥90 % on one account), announced in «Hecho por Vitrina». Archive it to say no: Vitrina never proposes it again.
260872
261021
  * @enum {string}
260873
261022
  */
260874
261023
  origin: "person" | "vitrina";
261024
+ /**
261025
+ * @description The month the rule books a document in: issue_month, or previous_month («mes anterior»).
261026
+ * @enum {string}
261027
+ */
261028
+ accrual: "issue_month" | "previous_month";
261029
+ /**
261030
+ * @description Who chose `accrual`: default, vitrina (learned from where this supplier's documents were booked before) or person.
261031
+ * @enum {string}
261032
+ */
261033
+ accrual_set_by: "default" | "vitrina" | "person";
260875
261034
  run_count: number;
260876
261035
  last_applied_at: string | null;
260877
261036
  created_at: string;
@@ -261729,6 +261888,11 @@ interface components {
261729
261888
  account_id?: string | null;
261730
261889
  /** @description Plain-language alternative to `account_id`: the account name or path («Laboratorio», «Gastos de administración › Arriendo»), matched without case or accents. Ambiguous → 422 `account_ambiguous` with `details.candidates`. */
261731
261890
  account_name?: string | null;
261891
+ /**
261892
+ * @description The month the rule books a document in: `issue_month` (its issue date, the default) or `previous_month` («mes anterior»: a supplier that bills month M early in M+1). Vitrina learns it from history; a person setting it here wins for good.
261893
+ * @enum {string}
261894
+ */
261895
+ accrual?: "issue_month" | "previous_month";
261732
261896
  /**
261733
261897
  * @description Default `document` (or the type of `from_item`).
261734
261898
  * @enum {string}
@@ -261765,6 +261929,11 @@ interface components {
261765
261929
  account_id?: string | null;
261766
261930
  /** @description Plain-language alternative to `account_id`: the account name or path («Laboratorio», «Gastos de administración › Arriendo»), matched without case or accents. Ambiguous → 422 `account_ambiguous` with `details.candidates`. */
261767
261931
  account_name?: string | null;
261932
+ /**
261933
+ * @description The month the rule books a document in: `issue_month` (its issue date, the default) or `previous_month` («mes anterior»: a supplier that bills month M early in M+1). Vitrina learns it from history; a person setting it here wins for good.
261934
+ * @enum {string}
261935
+ */
261936
+ accrual?: "issue_month" | "previous_month";
261768
261937
  /**
261769
261938
  * @description `document`: classifies documents. `movement`: classifies bank movements that have no document (a gardener paid by transfer).
261770
261939
  * @enum {string}
@@ -262041,9 +262210,38 @@ interface components {
262041
262210
  document_count: number;
262042
262211
  ready: boolean;
262043
262212
  opened_at: string;
262213
+ /** @description The newest day the case touches (a movement, or a document it needs classified). */
262214
+ latest_day: string | null;
262215
+ /** @description The case as listed; «Confirmar en bloque» sends it back (a changed case is refused). */
262216
+ fingerprint: string;
262044
262217
  }[];
262045
262218
  total: number;
262046
262219
  amount_at_stake_clp: number;
262220
+ /** @description First day of last month: `period=recent` keeps the cases touching it or later; older ones are «Historial». */
262221
+ since: string;
262222
+ /** @description Open cases by period (every period) and, within the `period` asked, how many need a person vs are ready to confirm. */
262223
+ counts: {
262224
+ recent: number;
262225
+ history: number;
262226
+ needs_person: number;
262227
+ ready: number;
262228
+ };
262229
+ /** @description «Esperando factura»: payments to a supplier that always invoices, inside its usual wait for the document. No case and no classification until then (the factura links instead); after `wait_until` the payment opens a case asking for it. */
262230
+ waiting: {
262231
+ count: number;
262232
+ amount_clp: number;
262233
+ items: {
262234
+ movement_id: string;
262235
+ day: string;
262236
+ amount_clp: number;
262237
+ contraparte: {
262238
+ id: string;
262239
+ name: string | null;
262240
+ } | null;
262241
+ lag_days: number;
262242
+ wait_until: string | null;
262243
+ }[];
262244
+ };
262047
262245
  };
262048
262246
  FinanzasCaseCount: {
262049
262247
  open: number;
@@ -262178,6 +262376,8 @@ interface components {
262178
262376
  type: "document" | "movement";
262179
262377
  id: string;
262180
262378
  }[];
262379
+ /** @description Movement ids of payments to a supplier that always invoices, past its usual wait: the factura is missing. Never classified on their own nor asked to the IA. */
262380
+ awaiting_document?: string[];
262181
262381
  /** @description Finanzas 30, `ads_charge` cases only: the matcher's verdict per movement and the Meta charges / ad accounts that could be it. Amounts in the smallest unit of `currency`. */
262182
262382
  ads?: {
262183
262383
  /** @enum {string} */
@@ -262209,6 +262409,30 @@ interface components {
262209
262409
  opened_at: string;
262210
262410
  computed_at: string;
262211
262411
  };
262412
+ FinanzasCasesBulkConfirmResult: {
262413
+ confirmed: {
262414
+ case_id: string;
262415
+ applied: {
262416
+ links: number;
262417
+ classifications: number;
262418
+ accepted: number;
262419
+ };
262420
+ }[];
262421
+ failed: {
262422
+ case_id: string;
262423
+ /** @description resolved | fingerprint_mismatch | proposal_incomplete | refused */
262424
+ reason: string;
262425
+ message: string;
262426
+ }[];
262427
+ };
262428
+ FinanzasCasesBulkConfirmBody: {
262429
+ /** @description The ready cases to confirm with their own proposals, with the fingerprint each was read with. */
262430
+ cases: {
262431
+ /** Format: uuid */
262432
+ id: string;
262433
+ fingerprint: string;
262434
+ }[];
262435
+ };
262212
262436
  FinanzasCaseConfirmResult: {
262213
262437
  case_id: string;
262214
262438
  applied: {
package/dist/index.d.ts CHANGED
@@ -82775,7 +82775,7 @@ interface paths {
82775
82775
  };
82776
82776
  /**
82777
82777
  * The «Por resolver» inbox: open cases, biggest first
82778
- * @description A case is the open money of one Contraparte that Vitrina could not resolve on its own: bank movements nothing explains, cost documents with no account, and money out classified with no document («Falta documento»). Cases are recomputed after every bank, Mercado Pago and SII sync and before every read; only cases whose inputs changed are rewritten. Sorted by the money at stake. `kind` filters; `total` and `amount_at_stake_clp` cover every open case of that filter. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`.
82778
+ * @description A case is the open money of one Contraparte that Vitrina could not resolve on its own: bank movements nothing explains, cost documents with no account, and money out classified with no document («Falta documento»). Cases are recomputed after every bank, Mercado Pago and SII sync and before every read; only cases whose inputs changed are rewritten. Sorted by the money at stake (`order=needs_person`: the cases a person must answer first). `kind` and `period` (`recent` = this month and last month, `history` = older) filter; `total` and `amount_at_stake_clp` cover every open case of that filter, `counts` splits them (recent / history, needs_person / ready) and `waiting` lists the payments «esperando factura» (no case yet). Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`.
82779
82779
  */
82780
82780
  get: {
82781
82781
  parameters: {
@@ -82783,6 +82783,8 @@ interface paths {
82783
82783
  kind?: "reconcile" | "transfer" | "classify" | "missing_document" | "unknown" | "ads_charge";
82784
82784
  limit?: number;
82785
82785
  offset?: number | null;
82786
+ period?: "recent" | "history" | "all";
82787
+ order?: "amount" | "needs_person";
82786
82788
  };
82787
82789
  header?: never;
82788
82790
  path?: never;
@@ -82815,7 +82817,9 @@ interface paths {
82815
82817
  * "movement_count": 1,
82816
82818
  * "document_count": 2,
82817
82819
  * "ready": true,
82818
- * "opened_at": "2026-10-22T09:00:00.000Z"
82820
+ * "opened_at": "2026-10-22T09:00:00.000Z",
82821
+ * "latest_day": "2026-10-21",
82822
+ * "fingerprint": "9c1e4b7a2f0d5c8e1b3a6f9d2c5e8b1a4d7f0c3e"
82819
82823
  * },
82820
82824
  * {
82821
82825
  * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4c02",
@@ -82828,11 +82832,25 @@ interface paths {
82828
82832
  * "movement_count": 1,
82829
82833
  * "document_count": 0,
82830
82834
  * "ready": true,
82831
- * "opened_at": "2026-10-23T09:00:00.000Z"
82835
+ * "opened_at": "2026-10-23T09:00:00.000Z",
82836
+ * "latest_day": "2026-10-20",
82837
+ * "fingerprint": "9c1e4b7a2f0d5c8e1b3a6f9d2c5e8b1a4d7f0c3e"
82832
82838
  * }
82833
82839
  * ],
82834
82840
  * "total": 2,
82835
- * "amount_at_stake_clp": 855290
82841
+ * "amount_at_stake_clp": 855290,
82842
+ * "since": "2026-09-01",
82843
+ * "counts": {
82844
+ * "recent": 2,
82845
+ * "history": 0,
82846
+ * "needs_person": 0,
82847
+ * "ready": 2
82848
+ * },
82849
+ * "waiting": {
82850
+ * "count": 0,
82851
+ * "amount_clp": 0,
82852
+ * "items": []
82853
+ * }
82836
82854
  * }
82837
82855
  * }
82838
82856
  */
@@ -83211,6 +83229,137 @@ interface paths {
83211
83229
  patch?: never;
83212
83230
  trace?: never;
83213
83231
  };
83232
+ "/finanzas/cases/confirm-bulk": {
83233
+ parameters: {
83234
+ query?: never;
83235
+ header?: never;
83236
+ path?: never;
83237
+ cookie?: never;
83238
+ };
83239
+ get?: never;
83240
+ put?: never;
83241
+ /**
83242
+ * «Confirmar en bloque»: several ready cases at once
83243
+ * @description Confirms each case’s own proposal (every case must be `ready`), with the fingerprint the screen read it with. Each case is its own transaction: a changed, resolved, incomplete or refused case stays open and is listed in `failed` with its reason; the rest are confirmed. At most 100 per call. Audited. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:write`.
83244
+ */
83245
+ post: {
83246
+ parameters: {
83247
+ query?: {
83248
+ adjustment_reason?: string;
83249
+ };
83250
+ header?: {
83251
+ /** @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. */
83252
+ "Idempotency-Key"?: string;
83253
+ };
83254
+ path?: never;
83255
+ cookie?: never;
83256
+ };
83257
+ requestBody?: {
83258
+ content: {
83259
+ /**
83260
+ * @example {
83261
+ * "cases": [
83262
+ * {
83263
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4c01",
83264
+ * "fingerprint": "9c1e4b7a2f0d5c8e1b3a6f9d2c5e8b1a4d7f0c3e"
83265
+ * }
83266
+ * ]
83267
+ * }
83268
+ */
83269
+ "application/json": components["schemas"]["FinanzasCasesBulkConfirmBody"];
83270
+ };
83271
+ };
83272
+ responses: {
83273
+ /** @description Confirmed and refused cases */
83274
+ 200: {
83275
+ headers: {
83276
+ [name: string]: unknown;
83277
+ };
83278
+ content: {
83279
+ /**
83280
+ * @example {
83281
+ * "data": {
83282
+ * "confirmed": [
83283
+ * {
83284
+ * "case_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4c01",
83285
+ * "applied": {
83286
+ * "links": 1,
83287
+ * "classifications": 0,
83288
+ * "accepted": 0
83289
+ * }
83290
+ * }
83291
+ * ],
83292
+ * "failed": []
83293
+ * }
83294
+ * }
83295
+ */
83296
+ "application/json": {
83297
+ data: components["schemas"]["FinanzasCasesBulkConfirmResult"];
83298
+ };
83299
+ };
83300
+ };
83301
+ /** @description Validation error */
83302
+ 400: {
83303
+ headers: {
83304
+ [name: string]: unknown;
83305
+ };
83306
+ content: {
83307
+ "application/json": components["schemas"]["Error"];
83308
+ };
83309
+ };
83310
+ /** @description Unauthorized */
83311
+ 401: {
83312
+ headers: {
83313
+ [name: string]: unknown;
83314
+ };
83315
+ content: {
83316
+ "application/json": components["schemas"]["Error"];
83317
+ };
83318
+ };
83319
+ /** @description Forbidden */
83320
+ 403: {
83321
+ headers: {
83322
+ [name: string]: unknown;
83323
+ };
83324
+ content: {
83325
+ "application/json": components["schemas"]["Error"];
83326
+ };
83327
+ };
83328
+ /** @description Not found */
83329
+ 404: {
83330
+ headers: {
83331
+ [name: string]: unknown;
83332
+ };
83333
+ content: {
83334
+ "application/json": components["schemas"]["Error"];
83335
+ };
83336
+ };
83337
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
83338
+ 409: {
83339
+ headers: {
83340
+ [name: string]: unknown;
83341
+ };
83342
+ content: {
83343
+ "application/json": components["schemas"]["Error"];
83344
+ };
83345
+ };
83346
+ /** @description Rate limited */
83347
+ 429: {
83348
+ headers: {
83349
+ [name: string]: unknown;
83350
+ };
83351
+ content: {
83352
+ "application/json": components["schemas"]["Error"];
83353
+ };
83354
+ };
83355
+ };
83356
+ };
83357
+ delete?: never;
83358
+ options?: never;
83359
+ head?: never;
83360
+ patch?: never;
83361
+ trace?: never;
83362
+ };
83214
83363
  "/finanzas/cases/{id}/confirm": {
83215
83364
  parameters: {
83216
83365
  query?: never;
@@ -260868,10 +261017,20 @@ interface components {
260868
261017
  /** @enum {string} */
260869
261018
  status: "active" | "paused" | "archived";
260870
261019
  /**
260871
- * @description person = created by a person; vitrina = Vitrina created it after a person confirmed the same classification twice for this Contraparte (announced in «Hecho por Vitrina»).
261020
+ * @description person = created by a person; vitrina = Vitrina created it, after a person confirmed the same classification twice for this Contraparte or from a consistent history (≥3 items, ≥90 % on one account), announced in «Hecho por Vitrina». Archive it to say no: Vitrina never proposes it again.
260872
261021
  * @enum {string}
260873
261022
  */
260874
261023
  origin: "person" | "vitrina";
261024
+ /**
261025
+ * @description The month the rule books a document in: issue_month, or previous_month («mes anterior»).
261026
+ * @enum {string}
261027
+ */
261028
+ accrual: "issue_month" | "previous_month";
261029
+ /**
261030
+ * @description Who chose `accrual`: default, vitrina (learned from where this supplier's documents were booked before) or person.
261031
+ * @enum {string}
261032
+ */
261033
+ accrual_set_by: "default" | "vitrina" | "person";
260875
261034
  run_count: number;
260876
261035
  last_applied_at: string | null;
260877
261036
  created_at: string;
@@ -261729,6 +261888,11 @@ interface components {
261729
261888
  account_id?: string | null;
261730
261889
  /** @description Plain-language alternative to `account_id`: the account name or path («Laboratorio», «Gastos de administración › Arriendo»), matched without case or accents. Ambiguous → 422 `account_ambiguous` with `details.candidates`. */
261731
261890
  account_name?: string | null;
261891
+ /**
261892
+ * @description The month the rule books a document in: `issue_month` (its issue date, the default) or `previous_month` («mes anterior»: a supplier that bills month M early in M+1). Vitrina learns it from history; a person setting it here wins for good.
261893
+ * @enum {string}
261894
+ */
261895
+ accrual?: "issue_month" | "previous_month";
261732
261896
  /**
261733
261897
  * @description Default `document` (or the type of `from_item`).
261734
261898
  * @enum {string}
@@ -261765,6 +261929,11 @@ interface components {
261765
261929
  account_id?: string | null;
261766
261930
  /** @description Plain-language alternative to `account_id`: the account name or path («Laboratorio», «Gastos de administración › Arriendo»), matched without case or accents. Ambiguous → 422 `account_ambiguous` with `details.candidates`. */
261767
261931
  account_name?: string | null;
261932
+ /**
261933
+ * @description The month the rule books a document in: `issue_month` (its issue date, the default) or `previous_month` («mes anterior»: a supplier that bills month M early in M+1). Vitrina learns it from history; a person setting it here wins for good.
261934
+ * @enum {string}
261935
+ */
261936
+ accrual?: "issue_month" | "previous_month";
261768
261937
  /**
261769
261938
  * @description `document`: classifies documents. `movement`: classifies bank movements that have no document (a gardener paid by transfer).
261770
261939
  * @enum {string}
@@ -262041,9 +262210,38 @@ interface components {
262041
262210
  document_count: number;
262042
262211
  ready: boolean;
262043
262212
  opened_at: string;
262213
+ /** @description The newest day the case touches (a movement, or a document it needs classified). */
262214
+ latest_day: string | null;
262215
+ /** @description The case as listed; «Confirmar en bloque» sends it back (a changed case is refused). */
262216
+ fingerprint: string;
262044
262217
  }[];
262045
262218
  total: number;
262046
262219
  amount_at_stake_clp: number;
262220
+ /** @description First day of last month: `period=recent` keeps the cases touching it or later; older ones are «Historial». */
262221
+ since: string;
262222
+ /** @description Open cases by period (every period) and, within the `period` asked, how many need a person vs are ready to confirm. */
262223
+ counts: {
262224
+ recent: number;
262225
+ history: number;
262226
+ needs_person: number;
262227
+ ready: number;
262228
+ };
262229
+ /** @description «Esperando factura»: payments to a supplier that always invoices, inside its usual wait for the document. No case and no classification until then (the factura links instead); after `wait_until` the payment opens a case asking for it. */
262230
+ waiting: {
262231
+ count: number;
262232
+ amount_clp: number;
262233
+ items: {
262234
+ movement_id: string;
262235
+ day: string;
262236
+ amount_clp: number;
262237
+ contraparte: {
262238
+ id: string;
262239
+ name: string | null;
262240
+ } | null;
262241
+ lag_days: number;
262242
+ wait_until: string | null;
262243
+ }[];
262244
+ };
262047
262245
  };
262048
262246
  FinanzasCaseCount: {
262049
262247
  open: number;
@@ -262178,6 +262376,8 @@ interface components {
262178
262376
  type: "document" | "movement";
262179
262377
  id: string;
262180
262378
  }[];
262379
+ /** @description Movement ids of payments to a supplier that always invoices, past its usual wait: the factura is missing. Never classified on their own nor asked to the IA. */
262380
+ awaiting_document?: string[];
262181
262381
  /** @description Finanzas 30, `ads_charge` cases only: the matcher's verdict per movement and the Meta charges / ad accounts that could be it. Amounts in the smallest unit of `currency`. */
262182
262382
  ads?: {
262183
262383
  /** @enum {string} */
@@ -262209,6 +262409,30 @@ interface components {
262209
262409
  opened_at: string;
262210
262410
  computed_at: string;
262211
262411
  };
262412
+ FinanzasCasesBulkConfirmResult: {
262413
+ confirmed: {
262414
+ case_id: string;
262415
+ applied: {
262416
+ links: number;
262417
+ classifications: number;
262418
+ accepted: number;
262419
+ };
262420
+ }[];
262421
+ failed: {
262422
+ case_id: string;
262423
+ /** @description resolved | fingerprint_mismatch | proposal_incomplete | refused */
262424
+ reason: string;
262425
+ message: string;
262426
+ }[];
262427
+ };
262428
+ FinanzasCasesBulkConfirmBody: {
262429
+ /** @description The ready cases to confirm with their own proposals, with the fingerprint each was read with. */
262430
+ cases: {
262431
+ /** Format: uuid */
262432
+ id: string;
262433
+ fingerprint: string;
262434
+ }[];
262435
+ };
262212
262436
  FinanzasCaseConfirmResult: {
262213
262437
  case_id: string;
262214
262438
  applied: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "15.31.0",
3
+ "version": "15.33.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",