@vitrina/api 17.27.2 → 17.28.1

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
@@ -73825,6 +73825,227 @@ interface paths {
73825
73825
  patch?: never;
73826
73826
  trace?: never;
73827
73827
  };
73828
+ "/finanzas/connections/sync": {
73829
+ parameters: {
73830
+ query?: never;
73831
+ header?: never;
73832
+ path?: never;
73833
+ cookie?: never;
73834
+ };
73835
+ /**
73836
+ * Freshness of the bank movements
73837
+ * @description When each bank link was last pulled, and whether a pull is queued. A read: it queues nothing. Poll it after `POST /finanzas/connections/sync` until `queued` is false, then reload. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`.
73838
+ */
73839
+ get: {
73840
+ parameters: {
73841
+ query?: never;
73842
+ header?: never;
73843
+ path?: never;
73844
+ cookie?: never;
73845
+ };
73846
+ requestBody?: never;
73847
+ responses: {
73848
+ /** @description The freshness */
73849
+ 200: {
73850
+ headers: {
73851
+ [name: string]: unknown;
73852
+ };
73853
+ content: {
73854
+ /**
73855
+ * @example {
73856
+ * "data": {
73857
+ * "last_sync_at": "2026-10-30T08:00:00.000Z",
73858
+ * "last_successful_sync_at": "2026-10-30T08:00:00.000Z",
73859
+ * "queued": true,
73860
+ * "enqueued": 0,
73861
+ * "links": [
73862
+ * {
73863
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4a5b",
73864
+ * "institution_name": "Banco de Chile",
73865
+ * "last_sync_at": "2026-10-30T08:00:00.000Z",
73866
+ * "last_successful_sync_at": "2026-10-30T08:00:00.000Z",
73867
+ * "queued": true,
73868
+ * "next_refresh_at": "2026-10-30T09:15:00.000Z",
73869
+ * "skipped": null
73870
+ * }
73871
+ * ],
73872
+ * "min_interval_minutes": 15
73873
+ * }
73874
+ * }
73875
+ */
73876
+ "application/json": {
73877
+ data: components["schemas"]["FinanzasBankPull"];
73878
+ };
73879
+ };
73880
+ };
73881
+ /** @description Validation error */
73882
+ 400: {
73883
+ headers: {
73884
+ [name: string]: unknown;
73885
+ };
73886
+ content: {
73887
+ "application/json": components["schemas"]["Error"];
73888
+ };
73889
+ };
73890
+ /** @description Unauthorized */
73891
+ 401: {
73892
+ headers: {
73893
+ [name: string]: unknown;
73894
+ };
73895
+ content: {
73896
+ "application/json": components["schemas"]["Error"];
73897
+ };
73898
+ };
73899
+ /** @description Forbidden */
73900
+ 403: {
73901
+ headers: {
73902
+ [name: string]: unknown;
73903
+ };
73904
+ content: {
73905
+ "application/json": components["schemas"]["Error"];
73906
+ };
73907
+ };
73908
+ /** @description Not found */
73909
+ 404: {
73910
+ headers: {
73911
+ [name: string]: unknown;
73912
+ };
73913
+ content: {
73914
+ "application/json": components["schemas"]["Error"];
73915
+ };
73916
+ };
73917
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
73918
+ 409: {
73919
+ headers: {
73920
+ [name: string]: unknown;
73921
+ };
73922
+ content: {
73923
+ "application/json": components["schemas"]["Error"];
73924
+ };
73925
+ };
73926
+ /** @description Rate limited */
73927
+ 429: {
73928
+ headers: {
73929
+ [name: string]: unknown;
73930
+ };
73931
+ content: {
73932
+ "application/json": components["schemas"]["Error"];
73933
+ };
73934
+ };
73935
+ };
73936
+ };
73937
+ put?: never;
73938
+ /**
73939
+ * Sync every bank link
73940
+ * @description Sync on entry to Finanzas and «Sincronizar ahora» for every bank link. Idempotent, never throttled: each active link not pulled nor requested in the last `min_interval_minutes` (15) gets one pull, the others answer with their last pull (`enqueued` counts the pulls this call queued). A `login_required` or disconnected link is skipped and reported in `links[].skipped`. Movements land within a minute or two; poll `GET /finanzas/connections/sync` until `queued` is false. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:write`.
73941
+ */
73942
+ post: {
73943
+ parameters: {
73944
+ query?: never;
73945
+ header?: {
73946
+ /** @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. */
73947
+ "Idempotency-Key"?: string;
73948
+ };
73949
+ path?: never;
73950
+ cookie?: never;
73951
+ };
73952
+ requestBody?: never;
73953
+ responses: {
73954
+ /** @description The freshness after the request */
73955
+ 200: {
73956
+ headers: {
73957
+ [name: string]: unknown;
73958
+ };
73959
+ content: {
73960
+ /**
73961
+ * @example {
73962
+ * "data": {
73963
+ * "last_sync_at": "2026-10-30T08:00:00.000Z",
73964
+ * "last_successful_sync_at": "2026-10-30T08:00:00.000Z",
73965
+ * "queued": true,
73966
+ * "enqueued": 1,
73967
+ * "links": [
73968
+ * {
73969
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4a5b",
73970
+ * "institution_name": "Banco de Chile",
73971
+ * "last_sync_at": "2026-10-30T08:00:00.000Z",
73972
+ * "last_successful_sync_at": "2026-10-30T08:00:00.000Z",
73973
+ * "queued": true,
73974
+ * "next_refresh_at": "2026-10-30T09:15:00.000Z",
73975
+ * "skipped": null
73976
+ * }
73977
+ * ],
73978
+ * "min_interval_minutes": 15
73979
+ * }
73980
+ * }
73981
+ */
73982
+ "application/json": {
73983
+ data: components["schemas"]["FinanzasBankPull"];
73984
+ };
73985
+ };
73986
+ };
73987
+ /** @description Validation error */
73988
+ 400: {
73989
+ headers: {
73990
+ [name: string]: unknown;
73991
+ };
73992
+ content: {
73993
+ "application/json": components["schemas"]["Error"];
73994
+ };
73995
+ };
73996
+ /** @description Unauthorized */
73997
+ 401: {
73998
+ headers: {
73999
+ [name: string]: unknown;
74000
+ };
74001
+ content: {
74002
+ "application/json": components["schemas"]["Error"];
74003
+ };
74004
+ };
74005
+ /** @description Forbidden */
74006
+ 403: {
74007
+ headers: {
74008
+ [name: string]: unknown;
74009
+ };
74010
+ content: {
74011
+ "application/json": components["schemas"]["Error"];
74012
+ };
74013
+ };
74014
+ /** @description Not found */
74015
+ 404: {
74016
+ headers: {
74017
+ [name: string]: unknown;
74018
+ };
74019
+ content: {
74020
+ "application/json": components["schemas"]["Error"];
74021
+ };
74022
+ };
74023
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
74024
+ 409: {
74025
+ headers: {
74026
+ [name: string]: unknown;
74027
+ };
74028
+ content: {
74029
+ "application/json": components["schemas"]["Error"];
74030
+ };
74031
+ };
74032
+ /** @description Rate limited */
74033
+ 429: {
74034
+ headers: {
74035
+ [name: string]: unknown;
74036
+ };
74037
+ content: {
74038
+ "application/json": components["schemas"]["Error"];
74039
+ };
74040
+ };
74041
+ };
74042
+ };
74043
+ delete?: never;
74044
+ options?: never;
74045
+ head?: never;
74046
+ patch?: never;
74047
+ trace?: never;
74048
+ };
73828
74049
  "/finanzas/connections/{id}/sync": {
73829
74050
  parameters: {
73830
74051
  query?: never;
@@ -95058,7 +95279,8 @@ interface paths {
95058
95279
  * "label": "septiembre 2026",
95059
95280
  * "equilibrio_clp": 44600000,
95060
95281
  * "sin_calculo": null,
95061
- * "produccion": null
95282
+ * "produccion": null,
95283
+ * "skipped_incompleto": null
95062
95284
  * },
95063
95285
  * "target_clp": 44600000,
95064
95286
  * "cobertura_pct": 92.4,
@@ -282050,6 +282272,25 @@ interface components {
282050
282272
  exchange_token?: string;
282051
282273
  link_token?: string;
282052
282274
  };
282275
+ FinanzasBankPullLink: {
282276
+ /** Format: uuid */
282277
+ id: string;
282278
+ institution_name: string | null;
282279
+ last_sync_at: string | null;
282280
+ last_successful_sync_at: string | null;
282281
+ queued: boolean;
282282
+ next_refresh_at: string | null;
282283
+ /** @enum {string|null} */
282284
+ skipped: "login_required" | "disconnected" | null;
282285
+ };
282286
+ FinanzasBankPull: {
282287
+ last_sync_at: string | null;
282288
+ last_successful_sync_at: string | null;
282289
+ queued: boolean;
282290
+ enqueued: number;
282291
+ links: components["schemas"]["FinanzasBankPullLink"][];
282292
+ min_interval_minutes: number;
282293
+ };
282053
282294
  FinanzasSyncResult: {
282054
282295
  /** @enum {boolean} */
282055
282296
  enqueued: true;
@@ -282445,7 +282686,7 @@ interface components {
282445
282686
  * @description Finanzas 36: set when the bank text names nobody and the movement has no Contraparte: show it as the title with the sub-line «Sin contraparte».
282446
282687
  * @enum {string|null}
282447
282688
  */
282448
- generic_label: "Depósito en efectivo" | "Pago recibido" | "Depósito con cheque" | null;
282689
+ generic_label: "Depósito en efectivo" | "Pago recibido" | "Depósito con cheque" | "Pago de tarjeta de crédito" | null;
282449
282690
  created_at: string;
282450
282691
  };
282451
282692
  FinanzasDocument: {
@@ -285722,6 +285963,13 @@ interface components {
285722
285963
  equilibrio_clp: number;
285723
285964
  }[];
285724
285965
  produccion: components["schemas"]["FinanzasEquilibrioProduccion"];
285966
+ /** @description The newest «Mes incompleto» the bar skipped, so the card can flag it like Resultado and Costos do. Null when no month was skipped. */
285967
+ skipped_incompleto: {
285968
+ month: string;
285969
+ label: string;
285970
+ /** @description Spanish, ready for the tooltip. */
285971
+ message: string;
285972
+ } | null;
285725
285973
  } | null;
285726
285974
  /** @description The break-even on the same terms as `basis`: `equilibrio.produccion.equilibrio_clp` when `basis` is `produccion` and a ratio exists, else `equilibrio.equilibrio_clp`. Null without a break-even. */
285727
285975
  target_clp: number | null;
package/dist/index.d.ts CHANGED
@@ -73825,6 +73825,227 @@ interface paths {
73825
73825
  patch?: never;
73826
73826
  trace?: never;
73827
73827
  };
73828
+ "/finanzas/connections/sync": {
73829
+ parameters: {
73830
+ query?: never;
73831
+ header?: never;
73832
+ path?: never;
73833
+ cookie?: never;
73834
+ };
73835
+ /**
73836
+ * Freshness of the bank movements
73837
+ * @description When each bank link was last pulled, and whether a pull is queued. A read: it queues nothing. Poll it after `POST /finanzas/connections/sync` until `queued` is false, then reload. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`.
73838
+ */
73839
+ get: {
73840
+ parameters: {
73841
+ query?: never;
73842
+ header?: never;
73843
+ path?: never;
73844
+ cookie?: never;
73845
+ };
73846
+ requestBody?: never;
73847
+ responses: {
73848
+ /** @description The freshness */
73849
+ 200: {
73850
+ headers: {
73851
+ [name: string]: unknown;
73852
+ };
73853
+ content: {
73854
+ /**
73855
+ * @example {
73856
+ * "data": {
73857
+ * "last_sync_at": "2026-10-30T08:00:00.000Z",
73858
+ * "last_successful_sync_at": "2026-10-30T08:00:00.000Z",
73859
+ * "queued": true,
73860
+ * "enqueued": 0,
73861
+ * "links": [
73862
+ * {
73863
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4a5b",
73864
+ * "institution_name": "Banco de Chile",
73865
+ * "last_sync_at": "2026-10-30T08:00:00.000Z",
73866
+ * "last_successful_sync_at": "2026-10-30T08:00:00.000Z",
73867
+ * "queued": true,
73868
+ * "next_refresh_at": "2026-10-30T09:15:00.000Z",
73869
+ * "skipped": null
73870
+ * }
73871
+ * ],
73872
+ * "min_interval_minutes": 15
73873
+ * }
73874
+ * }
73875
+ */
73876
+ "application/json": {
73877
+ data: components["schemas"]["FinanzasBankPull"];
73878
+ };
73879
+ };
73880
+ };
73881
+ /** @description Validation error */
73882
+ 400: {
73883
+ headers: {
73884
+ [name: string]: unknown;
73885
+ };
73886
+ content: {
73887
+ "application/json": components["schemas"]["Error"];
73888
+ };
73889
+ };
73890
+ /** @description Unauthorized */
73891
+ 401: {
73892
+ headers: {
73893
+ [name: string]: unknown;
73894
+ };
73895
+ content: {
73896
+ "application/json": components["schemas"]["Error"];
73897
+ };
73898
+ };
73899
+ /** @description Forbidden */
73900
+ 403: {
73901
+ headers: {
73902
+ [name: string]: unknown;
73903
+ };
73904
+ content: {
73905
+ "application/json": components["schemas"]["Error"];
73906
+ };
73907
+ };
73908
+ /** @description Not found */
73909
+ 404: {
73910
+ headers: {
73911
+ [name: string]: unknown;
73912
+ };
73913
+ content: {
73914
+ "application/json": components["schemas"]["Error"];
73915
+ };
73916
+ };
73917
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
73918
+ 409: {
73919
+ headers: {
73920
+ [name: string]: unknown;
73921
+ };
73922
+ content: {
73923
+ "application/json": components["schemas"]["Error"];
73924
+ };
73925
+ };
73926
+ /** @description Rate limited */
73927
+ 429: {
73928
+ headers: {
73929
+ [name: string]: unknown;
73930
+ };
73931
+ content: {
73932
+ "application/json": components["schemas"]["Error"];
73933
+ };
73934
+ };
73935
+ };
73936
+ };
73937
+ put?: never;
73938
+ /**
73939
+ * Sync every bank link
73940
+ * @description Sync on entry to Finanzas and «Sincronizar ahora» for every bank link. Idempotent, never throttled: each active link not pulled nor requested in the last `min_interval_minutes` (15) gets one pull, the others answer with their last pull (`enqueued` counts the pulls this call queued). A `login_required` or disconnected link is skipped and reported in `links[].skipped`. Movements land within a minute or two; poll `GET /finanzas/connections/sync` until `queued` is false. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:write`.
73941
+ */
73942
+ post: {
73943
+ parameters: {
73944
+ query?: never;
73945
+ header?: {
73946
+ /** @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. */
73947
+ "Idempotency-Key"?: string;
73948
+ };
73949
+ path?: never;
73950
+ cookie?: never;
73951
+ };
73952
+ requestBody?: never;
73953
+ responses: {
73954
+ /** @description The freshness after the request */
73955
+ 200: {
73956
+ headers: {
73957
+ [name: string]: unknown;
73958
+ };
73959
+ content: {
73960
+ /**
73961
+ * @example {
73962
+ * "data": {
73963
+ * "last_sync_at": "2026-10-30T08:00:00.000Z",
73964
+ * "last_successful_sync_at": "2026-10-30T08:00:00.000Z",
73965
+ * "queued": true,
73966
+ * "enqueued": 1,
73967
+ * "links": [
73968
+ * {
73969
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4a5b",
73970
+ * "institution_name": "Banco de Chile",
73971
+ * "last_sync_at": "2026-10-30T08:00:00.000Z",
73972
+ * "last_successful_sync_at": "2026-10-30T08:00:00.000Z",
73973
+ * "queued": true,
73974
+ * "next_refresh_at": "2026-10-30T09:15:00.000Z",
73975
+ * "skipped": null
73976
+ * }
73977
+ * ],
73978
+ * "min_interval_minutes": 15
73979
+ * }
73980
+ * }
73981
+ */
73982
+ "application/json": {
73983
+ data: components["schemas"]["FinanzasBankPull"];
73984
+ };
73985
+ };
73986
+ };
73987
+ /** @description Validation error */
73988
+ 400: {
73989
+ headers: {
73990
+ [name: string]: unknown;
73991
+ };
73992
+ content: {
73993
+ "application/json": components["schemas"]["Error"];
73994
+ };
73995
+ };
73996
+ /** @description Unauthorized */
73997
+ 401: {
73998
+ headers: {
73999
+ [name: string]: unknown;
74000
+ };
74001
+ content: {
74002
+ "application/json": components["schemas"]["Error"];
74003
+ };
74004
+ };
74005
+ /** @description Forbidden */
74006
+ 403: {
74007
+ headers: {
74008
+ [name: string]: unknown;
74009
+ };
74010
+ content: {
74011
+ "application/json": components["schemas"]["Error"];
74012
+ };
74013
+ };
74014
+ /** @description Not found */
74015
+ 404: {
74016
+ headers: {
74017
+ [name: string]: unknown;
74018
+ };
74019
+ content: {
74020
+ "application/json": components["schemas"]["Error"];
74021
+ };
74022
+ };
74023
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
74024
+ 409: {
74025
+ headers: {
74026
+ [name: string]: unknown;
74027
+ };
74028
+ content: {
74029
+ "application/json": components["schemas"]["Error"];
74030
+ };
74031
+ };
74032
+ /** @description Rate limited */
74033
+ 429: {
74034
+ headers: {
74035
+ [name: string]: unknown;
74036
+ };
74037
+ content: {
74038
+ "application/json": components["schemas"]["Error"];
74039
+ };
74040
+ };
74041
+ };
74042
+ };
74043
+ delete?: never;
74044
+ options?: never;
74045
+ head?: never;
74046
+ patch?: never;
74047
+ trace?: never;
74048
+ };
73828
74049
  "/finanzas/connections/{id}/sync": {
73829
74050
  parameters: {
73830
74051
  query?: never;
@@ -95058,7 +95279,8 @@ interface paths {
95058
95279
  * "label": "septiembre 2026",
95059
95280
  * "equilibrio_clp": 44600000,
95060
95281
  * "sin_calculo": null,
95061
- * "produccion": null
95282
+ * "produccion": null,
95283
+ * "skipped_incompleto": null
95062
95284
  * },
95063
95285
  * "target_clp": 44600000,
95064
95286
  * "cobertura_pct": 92.4,
@@ -282050,6 +282272,25 @@ interface components {
282050
282272
  exchange_token?: string;
282051
282273
  link_token?: string;
282052
282274
  };
282275
+ FinanzasBankPullLink: {
282276
+ /** Format: uuid */
282277
+ id: string;
282278
+ institution_name: string | null;
282279
+ last_sync_at: string | null;
282280
+ last_successful_sync_at: string | null;
282281
+ queued: boolean;
282282
+ next_refresh_at: string | null;
282283
+ /** @enum {string|null} */
282284
+ skipped: "login_required" | "disconnected" | null;
282285
+ };
282286
+ FinanzasBankPull: {
282287
+ last_sync_at: string | null;
282288
+ last_successful_sync_at: string | null;
282289
+ queued: boolean;
282290
+ enqueued: number;
282291
+ links: components["schemas"]["FinanzasBankPullLink"][];
282292
+ min_interval_minutes: number;
282293
+ };
282053
282294
  FinanzasSyncResult: {
282054
282295
  /** @enum {boolean} */
282055
282296
  enqueued: true;
@@ -282445,7 +282686,7 @@ interface components {
282445
282686
  * @description Finanzas 36: set when the bank text names nobody and the movement has no Contraparte: show it as the title with the sub-line «Sin contraparte».
282446
282687
  * @enum {string|null}
282447
282688
  */
282448
- generic_label: "Depósito en efectivo" | "Pago recibido" | "Depósito con cheque" | null;
282689
+ generic_label: "Depósito en efectivo" | "Pago recibido" | "Depósito con cheque" | "Pago de tarjeta de crédito" | null;
282449
282690
  created_at: string;
282450
282691
  };
282451
282692
  FinanzasDocument: {
@@ -285722,6 +285963,13 @@ interface components {
285722
285963
  equilibrio_clp: number;
285723
285964
  }[];
285724
285965
  produccion: components["schemas"]["FinanzasEquilibrioProduccion"];
285966
+ /** @description The newest «Mes incompleto» the bar skipped, so the card can flag it like Resultado and Costos do. Null when no month was skipped. */
285967
+ skipped_incompleto: {
285968
+ month: string;
285969
+ label: string;
285970
+ /** @description Spanish, ready for the tooltip. */
285971
+ message: string;
285972
+ } | null;
285725
285973
  } | null;
285726
285974
  /** @description The break-even on the same terms as `basis`: `equilibrio.produccion.equilibrio_clp` when `basis` is `produccion` and a ratio exists, else `equilibrio.equilibrio_clp`. Null without a break-even. */
285727
285975
  target_clp: number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "17.27.2",
3
+ "version": "17.28.1",
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",