@vitrina/api 17.39.0 → 17.41.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
@@ -73748,6 +73748,11 @@ interface paths {
73748
73748
  * "price_clp_per_bank_month": 15000,
73749
73749
  * "widget_public_key": "pk_test_ejemplo"
73750
73750
  * },
73751
+ * "bank_aggregator": {
73752
+ * "provider": "fintoc",
73753
+ * "configured": true,
73754
+ * "banks": []
73755
+ * },
73751
73756
  * "stale_after_hours": 48,
73752
73757
  * "manual_sync_min_interval_minutes": 60
73753
73758
  * }
@@ -74070,6 +74075,259 @@ interface paths {
74070
74075
  patch?: never;
74071
74076
  trace?: never;
74072
74077
  };
74078
+ "/finanzas/connections/emisso/link-session": {
74079
+ parameters: {
74080
+ query?: never;
74081
+ header?: never;
74082
+ path?: never;
74083
+ cookie?: never;
74084
+ };
74085
+ get?: never;
74086
+ put?: never;
74087
+ /**
74088
+ * Start a bank link (Emisso page)
74089
+ * @description For a workspace whose `bank_aggregator.provider` is `emisso` (see `GET /finanzas/connections`). Returns a one-use page on `connect.emisso.ai` where the account holder enters the credentials of the chosen bank; they never reach Vitrina. Show the page with its full domain and say why it is asked. When the holder is done, call `POST /finanzas/connections/emisso/claim`. With `connection_id` the page renews the credential of that existing bank connection. Reads no bank. Requires the `bank_feed_fintoc` add-on (`402 ENTITLEMENT_NOT_ACTIVE` otherwise); `503 BANK_FEED_NOT_CONFIGURED` when this deployment has no Emisso key. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_admin:write`.
74090
+ *
74091
+ * **Connected apps:** refused with `403 CONNECTED_APP_EXCLUDED_OPERATION` and absent from the MCP catalogue, whatever write pack was granted — the «Agentes de IA» pack promises not to include this act. An API key or a personal token of the workspace holding the scope reaches it as usual.
74092
+ */
74093
+ post: {
74094
+ parameters: {
74095
+ query?: never;
74096
+ header?: {
74097
+ /** @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. */
74098
+ "Idempotency-Key"?: string;
74099
+ };
74100
+ path?: never;
74101
+ cookie?: never;
74102
+ };
74103
+ requestBody?: {
74104
+ content: {
74105
+ /**
74106
+ * @example {
74107
+ * "bank": "bch_empresas"
74108
+ * }
74109
+ */
74110
+ "application/json": components["schemas"]["FinanzasEmissoLinkSessionBody"];
74111
+ };
74112
+ };
74113
+ responses: {
74114
+ /** @description The bank-link page */
74115
+ 201: {
74116
+ headers: {
74117
+ [name: string]: unknown;
74118
+ };
74119
+ content: {
74120
+ /**
74121
+ * @example {
74122
+ * "data": {
74123
+ * "url": "https://connect.emisso.ai/c/connect_cs_ejemplo",
74124
+ * "expires_at": "2026-11-15T15:43:57.205Z",
74125
+ * "bank": "bch_empresas"
74126
+ * }
74127
+ * }
74128
+ */
74129
+ "application/json": {
74130
+ data: components["schemas"]["FinanzasEmissoLinkSession"];
74131
+ };
74132
+ };
74133
+ };
74134
+ /** @description Validation error */
74135
+ 400: {
74136
+ headers: {
74137
+ [name: string]: unknown;
74138
+ };
74139
+ content: {
74140
+ "application/json": components["schemas"]["Error"];
74141
+ };
74142
+ };
74143
+ /** @description Unauthorized */
74144
+ 401: {
74145
+ headers: {
74146
+ [name: string]: unknown;
74147
+ };
74148
+ content: {
74149
+ "application/json": components["schemas"]["Error"];
74150
+ };
74151
+ };
74152
+ /** @description Forbidden */
74153
+ 403: {
74154
+ headers: {
74155
+ [name: string]: unknown;
74156
+ };
74157
+ content: {
74158
+ "application/json": components["schemas"]["Error"];
74159
+ };
74160
+ };
74161
+ /** @description Not found */
74162
+ 404: {
74163
+ headers: {
74164
+ [name: string]: unknown;
74165
+ };
74166
+ content: {
74167
+ "application/json": components["schemas"]["Error"];
74168
+ };
74169
+ };
74170
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
74171
+ 409: {
74172
+ headers: {
74173
+ [name: string]: unknown;
74174
+ };
74175
+ content: {
74176
+ "application/json": components["schemas"]["Error"];
74177
+ };
74178
+ };
74179
+ /** @description Rate limited */
74180
+ 429: {
74181
+ headers: {
74182
+ [name: string]: unknown;
74183
+ };
74184
+ content: {
74185
+ "application/json": components["schemas"]["Error"];
74186
+ };
74187
+ };
74188
+ };
74189
+ };
74190
+ delete?: never;
74191
+ options?: never;
74192
+ head?: never;
74193
+ patch?: never;
74194
+ trace?: never;
74195
+ };
74196
+ "/finanzas/connections/emisso/claim": {
74197
+ parameters: {
74198
+ query?: never;
74199
+ header?: never;
74200
+ path?: never;
74201
+ cookie?: never;
74202
+ };
74203
+ get?: never;
74204
+ put?: never;
74205
+ /**
74206
+ * Add the banks connected on the Emisso page
74207
+ * @description Call it after the holder finishes the page from `…/emisso/link-session` (poll every few seconds while that page is open). Every bank connected for this workspace that Vitrina does not hold yet becomes a bank connection and its first read is queued; a renewed credential reactivates its connection. Idempotent: an empty `connections` means nothing new was ready. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_admin:write`.
74208
+ *
74209
+ * **Connected apps:** refused with `403 CONNECTED_APP_EXCLUDED_OPERATION` and absent from the MCP catalogue, whatever write pack was granted — the «Agentes de IA» pack promises not to include this act. An API key or a personal token of the workspace holding the scope reaches it as usual.
74210
+ */
74211
+ post: {
74212
+ parameters: {
74213
+ query?: never;
74214
+ header?: {
74215
+ /** @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. */
74216
+ "Idempotency-Key"?: string;
74217
+ };
74218
+ path?: never;
74219
+ cookie?: never;
74220
+ };
74221
+ requestBody?: never;
74222
+ responses: {
74223
+ /** @description What was added */
74224
+ 200: {
74225
+ headers: {
74226
+ [name: string]: unknown;
74227
+ };
74228
+ content: {
74229
+ /**
74230
+ * @example {
74231
+ * "data": {
74232
+ * "connections": [
74233
+ * {
74234
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4a5b",
74235
+ * "kind": "bank",
74236
+ * "provider": "fintoc",
74237
+ * "institution_name": "Banco de Chile",
74238
+ * "holder_name": "Clínica Ejemplo SpA",
74239
+ * "accounts": [
74240
+ * {
74241
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4a6c",
74242
+ * "number_masked": "****4821",
74243
+ * "type": "cuenta_corriente",
74244
+ * "currency": "CLP"
74245
+ * }
74246
+ * ],
74247
+ * "movement_count": 1284,
74248
+ * "connected_at": "2026-10-01T14:03:00.000Z",
74249
+ * "last_sync_at": "2026-10-30T08:00:00.000Z",
74250
+ * "last_successful_sync_at": "2026-10-30T08:00:00.000Z",
74251
+ * "last_sync_error": null,
74252
+ * "status": "ok",
74253
+ * "next_refresh_at": "2026-10-30T09:00:00.000Z",
74254
+ * "actions": {
74255
+ * "sync_now": true,
74256
+ * "reconnect": false,
74257
+ * "disconnect": true
74258
+ * }
74259
+ * }
74260
+ * ]
74261
+ * }
74262
+ * }
74263
+ */
74264
+ "application/json": {
74265
+ data: components["schemas"]["FinanzasEmissoClaim"];
74266
+ };
74267
+ };
74268
+ };
74269
+ /** @description Validation error */
74270
+ 400: {
74271
+ headers: {
74272
+ [name: string]: unknown;
74273
+ };
74274
+ content: {
74275
+ "application/json": components["schemas"]["Error"];
74276
+ };
74277
+ };
74278
+ /** @description Unauthorized */
74279
+ 401: {
74280
+ headers: {
74281
+ [name: string]: unknown;
74282
+ };
74283
+ content: {
74284
+ "application/json": components["schemas"]["Error"];
74285
+ };
74286
+ };
74287
+ /** @description Forbidden */
74288
+ 403: {
74289
+ headers: {
74290
+ [name: string]: unknown;
74291
+ };
74292
+ content: {
74293
+ "application/json": components["schemas"]["Error"];
74294
+ };
74295
+ };
74296
+ /** @description Not found */
74297
+ 404: {
74298
+ headers: {
74299
+ [name: string]: unknown;
74300
+ };
74301
+ content: {
74302
+ "application/json": components["schemas"]["Error"];
74303
+ };
74304
+ };
74305
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
74306
+ 409: {
74307
+ headers: {
74308
+ [name: string]: unknown;
74309
+ };
74310
+ content: {
74311
+ "application/json": components["schemas"]["Error"];
74312
+ };
74313
+ };
74314
+ /** @description Rate limited */
74315
+ 429: {
74316
+ headers: {
74317
+ [name: string]: unknown;
74318
+ };
74319
+ content: {
74320
+ "application/json": components["schemas"]["Error"];
74321
+ };
74322
+ };
74323
+ };
74324
+ };
74325
+ delete?: never;
74326
+ options?: never;
74327
+ head?: never;
74328
+ patch?: never;
74329
+ trace?: never;
74330
+ };
74073
74331
  "/finanzas/connections/sync": {
74074
74332
  parameters: {
74075
74333
  query?: never;
@@ -142178,7 +142436,7 @@ interface paths {
142178
142436
  put?: never;
142179
142437
  /**
142180
142438
  * Create the Instagram dataset in Meta (idempotent)
142181
- * @description The Meta destinations of the workspace’s outcomes, each set up by its own explicit press, never as a side effect. Step 1 — the dataset linked to the WhatsApp Business Account — receives the outcomes carrying the click-to-WhatsApp ad click (`ctwa_clid`), as `business_messaging`; a click-to-WhatsApp ad set optimised on Purchase needs it. Step 2 — the website pixel — receives every other outcome, matched by the hashed phone and e-mail; without it those outcomes (most payments) are not sent at all. Step 3 — the dataset linked to the Instagram account — receives the outcomes of conversations an Instagram ad opened, as `business_messaging` with the customer’s Instagram-scoped id (measurement only: Meta offers no Purchase optimisation on Instagram); until it exists they reach the website pixel as before. Each sends from its press on (no history), and nothing flows until the stages are switched on in «Enviar a Meta». Meta cannot delete a dataset. The measurement engine asks Meta to create the dataset linked to the connected Instagram account, and creates its Instagram destination; an existing destination is never repointed. Needs the CURRENT `instagram.notice` (version + hash from the read): 409 `notice_required` otherwise. A retry answers `already_present`; a turned-off dataset is turned back on. 409 `details.reason`: `meta_ads_not_connected`, `instagram_not_connected`, `entitlement_required`, `duplicate_kind`, `dataset_unreadable`, `already_exists`, `engine_not_ready` (the engine cannot create it yet: «Pronto»), `meta_permission_missing` (Meta refused for a missing app permission — `instagram_manage_events`), `reconnect_required` (the Instagram connection expired), `instagram_facebook_login_required` (the Instagram account is connected with Instagram Login; Meta creates the dataset only from a Facebook Login for Business connection linked to a Page — the read-back already carries it as the step's `reason_code`, with no press offered); nothing is created on any refusal. 502 when Meta failed (nothing was created). The answer carries the engine’s read-back. Requires `ads:write`.
142439
+ * @description The Meta destinations of the workspace’s outcomes, each set up by its own explicit press, never as a side effect. Step 1 — the dataset linked to the WhatsApp Business Account — receives the outcomes carrying the click-to-WhatsApp ad click (`ctwa_clid`), as `business_messaging`; a click-to-WhatsApp ad set optimised on Purchase needs it. Step 2 — the website pixel — receives every other outcome, matched by the hashed phone and e-mail; without it those outcomes (most payments) are not sent at all. Step 3 — the dataset linked to the Instagram account — receives the outcomes of conversations an Instagram ad opened, as `business_messaging` with the customer’s Instagram-scoped id (measurement only: Meta offers no Purchase optimisation on Instagram); until it exists they reach the website pixel as before. Each sends from its press on (no history), and nothing flows until the stages are switched on in «Enviar a Meta». Meta cannot delete a dataset. The measurement engine asks Meta to create the dataset linked to the connected Instagram account, and creates its Instagram destination; an existing destination is never repointed. Needs the CURRENT `instagram.notice` (version + hash from the read): 409 `notice_required` otherwise. A retry answers `already_present`; a turned-off dataset is turned back on. 409 `details.reason`: `meta_ads_not_connected`, `instagram_not_connected`, `entitlement_required`, `duplicate_kind`, `dataset_unreadable`, `already_exists`, `engine_not_ready` (the engine cannot create it yet: «Pronto»), `meta_permission_missing` (Meta refused for a missing app permission — `instagram_manage_events`), `reconnect_required` (the Meta Ads connection expired), `instagram_events_permission_required` (the Meta Ads connection has no `instagram_manage_events` yet: `POST …/instagram/enable-events` first; the read-back already carries it as the step's `reason_code`, with no press offered); nothing is created on any refusal. 502 when Meta failed (nothing was created). The answer carries the engine’s read-back. Requires `ads:write`.
142182
142440
  */
142183
142441
  post: {
142184
142442
  parameters: {
@@ -142424,6 +142682,171 @@ interface paths {
142424
142682
  patch?: never;
142425
142683
  trace?: never;
142426
142684
  };
142685
+ "/ads/conversion-sync/data-sources/instagram/enable-events": {
142686
+ parameters: {
142687
+ query?: never;
142688
+ header?: never;
142689
+ path?: never;
142690
+ cookie?: never;
142691
+ };
142692
+ get?: never;
142693
+ put?: never;
142694
+ /**
142695
+ * Start the Meta Ads reconnect that turns on Instagram events
142696
+ * @description The Meta destinations of the workspace’s outcomes, each set up by its own explicit press, never as a side effect. Step 1 — the dataset linked to the WhatsApp Business Account — receives the outcomes carrying the click-to-WhatsApp ad click (`ctwa_clid`), as `business_messaging`; a click-to-WhatsApp ad set optimised on Purchase needs it. Step 2 — the website pixel — receives every other outcome, matched by the hashed phone and e-mail; without it those outcomes (most payments) are not sent at all. Step 3 — the dataset linked to the Instagram account — receives the outcomes of conversations an Instagram ad opened, as `business_messaging` with the customer’s Instagram-scoped id (measurement only: Meta offers no Purchase optimisation on Instagram); until it exists they reach the website pixel as before. Each sends from its press on (no history), and nothing flows until the stages are switched on in «Enviar a Meta». Meta cannot delete a dataset. The Instagram dataset, and every event sent to it, uses the workspace's Meta Ads connection, which needs Meta's `instagram_manage_events` permission first: Step 3 reads `reason_code: instagram_events_permission_required` until it has it. This returns the URL of ONE Meta Ads reconnect that asks for it; open it in a browser, accept, and come back to `return_to` (with `instagram_events=return`), then read the status again. The Meta Ads card and the Instagram connection do not change. Meta reports these events but does not optimize Instagram ads on them yet. 502 when the measurement engine could not mint the link. Requires `ads:write`.
142697
+ */
142698
+ post: {
142699
+ parameters: {
142700
+ query?: never;
142701
+ header?: {
142702
+ /** @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. */
142703
+ "Idempotency-Key"?: string;
142704
+ };
142705
+ path?: never;
142706
+ cookie?: never;
142707
+ };
142708
+ requestBody?: {
142709
+ content: {
142710
+ /**
142711
+ * @example {
142712
+ * "return_to": "https://app.vitrinadev.com/anuncios/salud/envio"
142713
+ * }
142714
+ */
142715
+ "application/json": {
142716
+ /**
142717
+ * Format: uri
142718
+ * @description Where the owner comes back to after Meta’s consent: an absolute URL on the app’s own origin. `instagram_events=return` is appended.
142719
+ */
142720
+ return_to: string;
142721
+ };
142722
+ };
142723
+ };
142724
+ responses: {
142725
+ /** @description The reconnect URL. */
142726
+ 200: {
142727
+ headers: {
142728
+ [name: string]: unknown;
142729
+ };
142730
+ content: {
142731
+ /**
142732
+ * @example {
142733
+ * "data": {
142734
+ * "url": "https://connect.example.com/h/abc123",
142735
+ * "expires_at": "2026-11-03T19:45:00.000Z"
142736
+ * }
142737
+ * }
142738
+ */
142739
+ "application/json": {
142740
+ data: {
142741
+ /**
142742
+ * Format: uri
142743
+ * @description Open it in the browser: the Meta Ads consent that asks for Instagram events.
142744
+ */
142745
+ url: string;
142746
+ /** @description When the link stops working (about 45 minutes). */
142747
+ expires_at: string | null;
142748
+ };
142749
+ };
142750
+ };
142751
+ };
142752
+ /** @description Validation error */
142753
+ 400: {
142754
+ headers: {
142755
+ [name: string]: unknown;
142756
+ };
142757
+ content: {
142758
+ "application/json": components["schemas"]["Error"];
142759
+ };
142760
+ };
142761
+ /** @description Unauthorized */
142762
+ 401: {
142763
+ headers: {
142764
+ [name: string]: unknown;
142765
+ };
142766
+ content: {
142767
+ "application/json": components["schemas"]["Error"];
142768
+ };
142769
+ };
142770
+ /** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
142771
+ 402: {
142772
+ headers: {
142773
+ [name: string]: unknown;
142774
+ };
142775
+ content: {
142776
+ /**
142777
+ * @example {
142778
+ * "error": {
142779
+ * "code": "ENTITLEMENT_NOT_ACTIVE",
142780
+ * "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
142781
+ * "details": {
142782
+ * "required": [
142783
+ * "vitrina_ads"
142784
+ * ],
142785
+ * "active": [],
142786
+ * "feature": "vitrina_ads",
142787
+ * "entitlement_state": "off"
142788
+ * }
142789
+ * }
142790
+ * }
142791
+ */
142792
+ "application/json": components["schemas"]["Error"];
142793
+ };
142794
+ };
142795
+ /** @description Forbidden */
142796
+ 403: {
142797
+ headers: {
142798
+ [name: string]: unknown;
142799
+ };
142800
+ content: {
142801
+ "application/json": components["schemas"]["Error"];
142802
+ };
142803
+ };
142804
+ /** @description Not found */
142805
+ 404: {
142806
+ headers: {
142807
+ [name: string]: unknown;
142808
+ };
142809
+ content: {
142810
+ "application/json": components["schemas"]["Error"];
142811
+ };
142812
+ };
142813
+ /** @description Vitrina Ads is active but the delegated key has not finished rotating (`ADS_KEY_NEEDS_REMINT`) — retry once `GET /ads/state` reports `needs_remint: false`. Also the generic conflict of a write. */
142814
+ 409: {
142815
+ headers: {
142816
+ [name: string]: unknown;
142817
+ };
142818
+ content: {
142819
+ /**
142820
+ * @example {
142821
+ * "error": {
142822
+ * "code": "ADS_KEY_NEEDS_REMINT",
142823
+ * "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
142824
+ * "details": {
142825
+ * "key_kind": "core"
142826
+ * }
142827
+ * }
142828
+ * }
142829
+ */
142830
+ "application/json": components["schemas"]["Error"];
142831
+ };
142832
+ };
142833
+ /** @description Rate limited */
142834
+ 429: {
142835
+ headers: {
142836
+ [name: string]: unknown;
142837
+ };
142838
+ content: {
142839
+ "application/json": components["schemas"]["Error"];
142840
+ };
142841
+ };
142842
+ };
142843
+ };
142844
+ delete?: never;
142845
+ options?: never;
142846
+ head?: never;
142847
+ patch?: never;
142848
+ trace?: never;
142849
+ };
142427
142850
  "/ads/conversion-sync/data-sources/instagram/turn-off": {
142428
142851
  parameters: {
142429
142852
  query?: never;
@@ -283123,7 +283546,7 @@ interface components {
283123
283546
  BankFeedConnection: {
283124
283547
  id: string;
283125
283548
  /** @enum {string} */
283126
- provider: "fintoc" | "bci_api_market";
283549
+ provider: "fintoc" | "emisso" | "bci_api_market";
283127
283550
  institution_name: string | null;
283128
283551
  holder_name: string | null;
283129
283552
  accounts: {
@@ -283273,7 +283696,7 @@ interface components {
283273
283696
  /** @enum {string} */
283274
283697
  kind: "bank" | "mercado_pago" | "sii";
283275
283698
  /** @enum {string} */
283276
- provider: "fintoc" | "bci_api_market" | "mercadopago" | "sii";
283699
+ provider: "fintoc" | "emisso" | "bci_api_market" | "mercadopago" | "sii";
283277
283700
  institution_name: string | null;
283278
283701
  holder_name: string | null;
283279
283702
  accounts: {
@@ -283330,6 +283753,16 @@ interface components {
283330
283753
  price_clp_per_bank_month: number | null;
283331
283754
  widget_public_key: string | null;
283332
283755
  };
283756
+ /** @description Which provider a NEW direct bank link goes through. `fintoc`: open its widget (`…/fintoc/link-intent`). `emisso`: let the user pick one of `banks`, then open the page from `…/emisso/link-session`. */
283757
+ bank_aggregator: {
283758
+ /** @enum {string} */
283759
+ provider: "fintoc" | "emisso";
283760
+ configured: boolean;
283761
+ banks: {
283762
+ code: string;
283763
+ name: string;
283764
+ }[];
283765
+ };
283333
283766
  stale_after_hours: number;
283334
283767
  manual_sync_min_interval_minutes: number;
283335
283768
  };
@@ -283341,6 +283774,19 @@ interface components {
283341
283774
  exchange_token?: string;
283342
283775
  link_token?: string;
283343
283776
  };
283777
+ FinanzasEmissoLinkSession: {
283778
+ url: string;
283779
+ expires_at: string;
283780
+ bank: string;
283781
+ };
283782
+ FinanzasEmissoLinkSessionBody: {
283783
+ bank?: string;
283784
+ /** Format: uuid */
283785
+ connection_id?: string;
283786
+ };
283787
+ FinanzasEmissoClaim: {
283788
+ connections: components["schemas"]["FinanzasConnection"][];
283789
+ };
283344
283790
  FinanzasBankPullLink: {
283345
283791
  /** Format: uuid */
283346
283792
  id: string;
@@ -283998,7 +284444,7 @@ interface components {
283998
284444
  /** @enum {string} */
283999
284445
  currency: "CLP" | "USD";
284000
284446
  /** @enum {string} */
284001
- source: "fintoc" | "mercado_pago" | "manual";
284447
+ source: "fintoc" | "emisso" | "mercado_pago" | "manual";
284002
284448
  has_feed: boolean;
284003
284449
  balance_clp: number | null;
284004
284450
  balance_original: {
@@ -289627,7 +290073,7 @@ interface components {
289627
290073
  */
289628
290074
  state: "coming_soon" | "unknown" | "prerequisites_missing" | "ready" | "created" | "sending" | "off" | "error";
289629
290075
  /** @enum {string|null} */
289630
- reason_code: "entitlement_required" | "duplicate_kind" | "access_missing" | "dataset_unreadable" | "already_exists" | "no_pixel" | "pixels_unavailable" | "pixel_already_attached" | "instagram_facebook_login_required" | "meta_refused" | "meta_unavailable" | "engine_error" | null;
290076
+ reason_code: "entitlement_required" | "duplicate_kind" | "access_missing" | "dataset_unreadable" | "already_exists" | "no_pixel" | "pixels_unavailable" | "pixel_already_attached" | "instagram_facebook_login_required" | "instagram_events_permission_required" | "meta_refused" | "meta_unavailable" | "engine_error" | null;
289631
290077
  /** @description What to do, in Spanish, when `reason_code` is set. */
289632
290078
  message: string | null;
289633
290079
  dataset: {
@@ -289661,7 +290107,7 @@ interface components {
289661
290107
  */
289662
290108
  state: "coming_soon" | "unknown" | "prerequisites_missing" | "ready" | "created" | "sending" | "off" | "error";
289663
290109
  /** @enum {string|null} */
289664
- reason_code: "entitlement_required" | "duplicate_kind" | "access_missing" | "dataset_unreadable" | "already_exists" | "no_pixel" | "pixels_unavailable" | "pixel_already_attached" | "instagram_facebook_login_required" | "meta_refused" | "meta_unavailable" | "engine_error" | null;
290110
+ reason_code: "entitlement_required" | "duplicate_kind" | "access_missing" | "dataset_unreadable" | "already_exists" | "no_pixel" | "pixels_unavailable" | "pixel_already_attached" | "instagram_facebook_login_required" | "instagram_events_permission_required" | "meta_refused" | "meta_unavailable" | "engine_error" | null;
289665
290111
  /** @description What to do, in Spanish, when `reason_code` is set. */
289666
290112
  message: string | null;
289667
290113
  dataset: {
@@ -289706,7 +290152,7 @@ interface components {
289706
290152
  */
289707
290153
  state: "coming_soon" | "unknown" | "prerequisites_missing" | "ready" | "created" | "sending" | "off" | "error";
289708
290154
  /** @enum {string|null} */
289709
- reason_code: "entitlement_required" | "duplicate_kind" | "access_missing" | "dataset_unreadable" | "already_exists" | "no_pixel" | "pixels_unavailable" | "pixel_already_attached" | "instagram_facebook_login_required" | "meta_refused" | "meta_unavailable" | "engine_error" | null;
290155
+ reason_code: "entitlement_required" | "duplicate_kind" | "access_missing" | "dataset_unreadable" | "already_exists" | "no_pixel" | "pixels_unavailable" | "pixel_already_attached" | "instagram_facebook_login_required" | "instagram_events_permission_required" | "meta_refused" | "meta_unavailable" | "engine_error" | null;
289710
290156
  /** @description What to do, in Spanish, when `reason_code` is set. */
289711
290157
  message: string | null;
289712
290158
  dataset: {
package/dist/index.d.ts CHANGED
@@ -73748,6 +73748,11 @@ interface paths {
73748
73748
  * "price_clp_per_bank_month": 15000,
73749
73749
  * "widget_public_key": "pk_test_ejemplo"
73750
73750
  * },
73751
+ * "bank_aggregator": {
73752
+ * "provider": "fintoc",
73753
+ * "configured": true,
73754
+ * "banks": []
73755
+ * },
73751
73756
  * "stale_after_hours": 48,
73752
73757
  * "manual_sync_min_interval_minutes": 60
73753
73758
  * }
@@ -74070,6 +74075,259 @@ interface paths {
74070
74075
  patch?: never;
74071
74076
  trace?: never;
74072
74077
  };
74078
+ "/finanzas/connections/emisso/link-session": {
74079
+ parameters: {
74080
+ query?: never;
74081
+ header?: never;
74082
+ path?: never;
74083
+ cookie?: never;
74084
+ };
74085
+ get?: never;
74086
+ put?: never;
74087
+ /**
74088
+ * Start a bank link (Emisso page)
74089
+ * @description For a workspace whose `bank_aggregator.provider` is `emisso` (see `GET /finanzas/connections`). Returns a one-use page on `connect.emisso.ai` where the account holder enters the credentials of the chosen bank; they never reach Vitrina. Show the page with its full domain and say why it is asked. When the holder is done, call `POST /finanzas/connections/emisso/claim`. With `connection_id` the page renews the credential of that existing bank connection. Reads no bank. Requires the `bank_feed_fintoc` add-on (`402 ENTITLEMENT_NOT_ACTIVE` otherwise); `503 BANK_FEED_NOT_CONFIGURED` when this deployment has no Emisso key. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_admin:write`.
74090
+ *
74091
+ * **Connected apps:** refused with `403 CONNECTED_APP_EXCLUDED_OPERATION` and absent from the MCP catalogue, whatever write pack was granted — the «Agentes de IA» pack promises not to include this act. An API key or a personal token of the workspace holding the scope reaches it as usual.
74092
+ */
74093
+ post: {
74094
+ parameters: {
74095
+ query?: never;
74096
+ header?: {
74097
+ /** @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. */
74098
+ "Idempotency-Key"?: string;
74099
+ };
74100
+ path?: never;
74101
+ cookie?: never;
74102
+ };
74103
+ requestBody?: {
74104
+ content: {
74105
+ /**
74106
+ * @example {
74107
+ * "bank": "bch_empresas"
74108
+ * }
74109
+ */
74110
+ "application/json": components["schemas"]["FinanzasEmissoLinkSessionBody"];
74111
+ };
74112
+ };
74113
+ responses: {
74114
+ /** @description The bank-link page */
74115
+ 201: {
74116
+ headers: {
74117
+ [name: string]: unknown;
74118
+ };
74119
+ content: {
74120
+ /**
74121
+ * @example {
74122
+ * "data": {
74123
+ * "url": "https://connect.emisso.ai/c/connect_cs_ejemplo",
74124
+ * "expires_at": "2026-11-15T15:43:57.205Z",
74125
+ * "bank": "bch_empresas"
74126
+ * }
74127
+ * }
74128
+ */
74129
+ "application/json": {
74130
+ data: components["schemas"]["FinanzasEmissoLinkSession"];
74131
+ };
74132
+ };
74133
+ };
74134
+ /** @description Validation error */
74135
+ 400: {
74136
+ headers: {
74137
+ [name: string]: unknown;
74138
+ };
74139
+ content: {
74140
+ "application/json": components["schemas"]["Error"];
74141
+ };
74142
+ };
74143
+ /** @description Unauthorized */
74144
+ 401: {
74145
+ headers: {
74146
+ [name: string]: unknown;
74147
+ };
74148
+ content: {
74149
+ "application/json": components["schemas"]["Error"];
74150
+ };
74151
+ };
74152
+ /** @description Forbidden */
74153
+ 403: {
74154
+ headers: {
74155
+ [name: string]: unknown;
74156
+ };
74157
+ content: {
74158
+ "application/json": components["schemas"]["Error"];
74159
+ };
74160
+ };
74161
+ /** @description Not found */
74162
+ 404: {
74163
+ headers: {
74164
+ [name: string]: unknown;
74165
+ };
74166
+ content: {
74167
+ "application/json": components["schemas"]["Error"];
74168
+ };
74169
+ };
74170
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
74171
+ 409: {
74172
+ headers: {
74173
+ [name: string]: unknown;
74174
+ };
74175
+ content: {
74176
+ "application/json": components["schemas"]["Error"];
74177
+ };
74178
+ };
74179
+ /** @description Rate limited */
74180
+ 429: {
74181
+ headers: {
74182
+ [name: string]: unknown;
74183
+ };
74184
+ content: {
74185
+ "application/json": components["schemas"]["Error"];
74186
+ };
74187
+ };
74188
+ };
74189
+ };
74190
+ delete?: never;
74191
+ options?: never;
74192
+ head?: never;
74193
+ patch?: never;
74194
+ trace?: never;
74195
+ };
74196
+ "/finanzas/connections/emisso/claim": {
74197
+ parameters: {
74198
+ query?: never;
74199
+ header?: never;
74200
+ path?: never;
74201
+ cookie?: never;
74202
+ };
74203
+ get?: never;
74204
+ put?: never;
74205
+ /**
74206
+ * Add the banks connected on the Emisso page
74207
+ * @description Call it after the holder finishes the page from `…/emisso/link-session` (poll every few seconds while that page is open). Every bank connected for this workspace that Vitrina does not hold yet becomes a bank connection and its first read is queued; a renewed credential reactivates its connection. Idempotent: an empty `connections` means nothing new was ready. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_admin:write`.
74208
+ *
74209
+ * **Connected apps:** refused with `403 CONNECTED_APP_EXCLUDED_OPERATION` and absent from the MCP catalogue, whatever write pack was granted — the «Agentes de IA» pack promises not to include this act. An API key or a personal token of the workspace holding the scope reaches it as usual.
74210
+ */
74211
+ post: {
74212
+ parameters: {
74213
+ query?: never;
74214
+ header?: {
74215
+ /** @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. */
74216
+ "Idempotency-Key"?: string;
74217
+ };
74218
+ path?: never;
74219
+ cookie?: never;
74220
+ };
74221
+ requestBody?: never;
74222
+ responses: {
74223
+ /** @description What was added */
74224
+ 200: {
74225
+ headers: {
74226
+ [name: string]: unknown;
74227
+ };
74228
+ content: {
74229
+ /**
74230
+ * @example {
74231
+ * "data": {
74232
+ * "connections": [
74233
+ * {
74234
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4a5b",
74235
+ * "kind": "bank",
74236
+ * "provider": "fintoc",
74237
+ * "institution_name": "Banco de Chile",
74238
+ * "holder_name": "Clínica Ejemplo SpA",
74239
+ * "accounts": [
74240
+ * {
74241
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4a6c",
74242
+ * "number_masked": "****4821",
74243
+ * "type": "cuenta_corriente",
74244
+ * "currency": "CLP"
74245
+ * }
74246
+ * ],
74247
+ * "movement_count": 1284,
74248
+ * "connected_at": "2026-10-01T14:03:00.000Z",
74249
+ * "last_sync_at": "2026-10-30T08:00:00.000Z",
74250
+ * "last_successful_sync_at": "2026-10-30T08:00:00.000Z",
74251
+ * "last_sync_error": null,
74252
+ * "status": "ok",
74253
+ * "next_refresh_at": "2026-10-30T09:00:00.000Z",
74254
+ * "actions": {
74255
+ * "sync_now": true,
74256
+ * "reconnect": false,
74257
+ * "disconnect": true
74258
+ * }
74259
+ * }
74260
+ * ]
74261
+ * }
74262
+ * }
74263
+ */
74264
+ "application/json": {
74265
+ data: components["schemas"]["FinanzasEmissoClaim"];
74266
+ };
74267
+ };
74268
+ };
74269
+ /** @description Validation error */
74270
+ 400: {
74271
+ headers: {
74272
+ [name: string]: unknown;
74273
+ };
74274
+ content: {
74275
+ "application/json": components["schemas"]["Error"];
74276
+ };
74277
+ };
74278
+ /** @description Unauthorized */
74279
+ 401: {
74280
+ headers: {
74281
+ [name: string]: unknown;
74282
+ };
74283
+ content: {
74284
+ "application/json": components["schemas"]["Error"];
74285
+ };
74286
+ };
74287
+ /** @description Forbidden */
74288
+ 403: {
74289
+ headers: {
74290
+ [name: string]: unknown;
74291
+ };
74292
+ content: {
74293
+ "application/json": components["schemas"]["Error"];
74294
+ };
74295
+ };
74296
+ /** @description Not found */
74297
+ 404: {
74298
+ headers: {
74299
+ [name: string]: unknown;
74300
+ };
74301
+ content: {
74302
+ "application/json": components["schemas"]["Error"];
74303
+ };
74304
+ };
74305
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
74306
+ 409: {
74307
+ headers: {
74308
+ [name: string]: unknown;
74309
+ };
74310
+ content: {
74311
+ "application/json": components["schemas"]["Error"];
74312
+ };
74313
+ };
74314
+ /** @description Rate limited */
74315
+ 429: {
74316
+ headers: {
74317
+ [name: string]: unknown;
74318
+ };
74319
+ content: {
74320
+ "application/json": components["schemas"]["Error"];
74321
+ };
74322
+ };
74323
+ };
74324
+ };
74325
+ delete?: never;
74326
+ options?: never;
74327
+ head?: never;
74328
+ patch?: never;
74329
+ trace?: never;
74330
+ };
74073
74331
  "/finanzas/connections/sync": {
74074
74332
  parameters: {
74075
74333
  query?: never;
@@ -142178,7 +142436,7 @@ interface paths {
142178
142436
  put?: never;
142179
142437
  /**
142180
142438
  * Create the Instagram dataset in Meta (idempotent)
142181
- * @description The Meta destinations of the workspace’s outcomes, each set up by its own explicit press, never as a side effect. Step 1 — the dataset linked to the WhatsApp Business Account — receives the outcomes carrying the click-to-WhatsApp ad click (`ctwa_clid`), as `business_messaging`; a click-to-WhatsApp ad set optimised on Purchase needs it. Step 2 — the website pixel — receives every other outcome, matched by the hashed phone and e-mail; without it those outcomes (most payments) are not sent at all. Step 3 — the dataset linked to the Instagram account — receives the outcomes of conversations an Instagram ad opened, as `business_messaging` with the customer’s Instagram-scoped id (measurement only: Meta offers no Purchase optimisation on Instagram); until it exists they reach the website pixel as before. Each sends from its press on (no history), and nothing flows until the stages are switched on in «Enviar a Meta». Meta cannot delete a dataset. The measurement engine asks Meta to create the dataset linked to the connected Instagram account, and creates its Instagram destination; an existing destination is never repointed. Needs the CURRENT `instagram.notice` (version + hash from the read): 409 `notice_required` otherwise. A retry answers `already_present`; a turned-off dataset is turned back on. 409 `details.reason`: `meta_ads_not_connected`, `instagram_not_connected`, `entitlement_required`, `duplicate_kind`, `dataset_unreadable`, `already_exists`, `engine_not_ready` (the engine cannot create it yet: «Pronto»), `meta_permission_missing` (Meta refused for a missing app permission — `instagram_manage_events`), `reconnect_required` (the Instagram connection expired), `instagram_facebook_login_required` (the Instagram account is connected with Instagram Login; Meta creates the dataset only from a Facebook Login for Business connection linked to a Page — the read-back already carries it as the step's `reason_code`, with no press offered); nothing is created on any refusal. 502 when Meta failed (nothing was created). The answer carries the engine’s read-back. Requires `ads:write`.
142439
+ * @description The Meta destinations of the workspace’s outcomes, each set up by its own explicit press, never as a side effect. Step 1 — the dataset linked to the WhatsApp Business Account — receives the outcomes carrying the click-to-WhatsApp ad click (`ctwa_clid`), as `business_messaging`; a click-to-WhatsApp ad set optimised on Purchase needs it. Step 2 — the website pixel — receives every other outcome, matched by the hashed phone and e-mail; without it those outcomes (most payments) are not sent at all. Step 3 — the dataset linked to the Instagram account — receives the outcomes of conversations an Instagram ad opened, as `business_messaging` with the customer’s Instagram-scoped id (measurement only: Meta offers no Purchase optimisation on Instagram); until it exists they reach the website pixel as before. Each sends from its press on (no history), and nothing flows until the stages are switched on in «Enviar a Meta». Meta cannot delete a dataset. The measurement engine asks Meta to create the dataset linked to the connected Instagram account, and creates its Instagram destination; an existing destination is never repointed. Needs the CURRENT `instagram.notice` (version + hash from the read): 409 `notice_required` otherwise. A retry answers `already_present`; a turned-off dataset is turned back on. 409 `details.reason`: `meta_ads_not_connected`, `instagram_not_connected`, `entitlement_required`, `duplicate_kind`, `dataset_unreadable`, `already_exists`, `engine_not_ready` (the engine cannot create it yet: «Pronto»), `meta_permission_missing` (Meta refused for a missing app permission — `instagram_manage_events`), `reconnect_required` (the Meta Ads connection expired), `instagram_events_permission_required` (the Meta Ads connection has no `instagram_manage_events` yet: `POST …/instagram/enable-events` first; the read-back already carries it as the step's `reason_code`, with no press offered); nothing is created on any refusal. 502 when Meta failed (nothing was created). The answer carries the engine’s read-back. Requires `ads:write`.
142182
142440
  */
142183
142441
  post: {
142184
142442
  parameters: {
@@ -142424,6 +142682,171 @@ interface paths {
142424
142682
  patch?: never;
142425
142683
  trace?: never;
142426
142684
  };
142685
+ "/ads/conversion-sync/data-sources/instagram/enable-events": {
142686
+ parameters: {
142687
+ query?: never;
142688
+ header?: never;
142689
+ path?: never;
142690
+ cookie?: never;
142691
+ };
142692
+ get?: never;
142693
+ put?: never;
142694
+ /**
142695
+ * Start the Meta Ads reconnect that turns on Instagram events
142696
+ * @description The Meta destinations of the workspace’s outcomes, each set up by its own explicit press, never as a side effect. Step 1 — the dataset linked to the WhatsApp Business Account — receives the outcomes carrying the click-to-WhatsApp ad click (`ctwa_clid`), as `business_messaging`; a click-to-WhatsApp ad set optimised on Purchase needs it. Step 2 — the website pixel — receives every other outcome, matched by the hashed phone and e-mail; without it those outcomes (most payments) are not sent at all. Step 3 — the dataset linked to the Instagram account — receives the outcomes of conversations an Instagram ad opened, as `business_messaging` with the customer’s Instagram-scoped id (measurement only: Meta offers no Purchase optimisation on Instagram); until it exists they reach the website pixel as before. Each sends from its press on (no history), and nothing flows until the stages are switched on in «Enviar a Meta». Meta cannot delete a dataset. The Instagram dataset, and every event sent to it, uses the workspace's Meta Ads connection, which needs Meta's `instagram_manage_events` permission first: Step 3 reads `reason_code: instagram_events_permission_required` until it has it. This returns the URL of ONE Meta Ads reconnect that asks for it; open it in a browser, accept, and come back to `return_to` (with `instagram_events=return`), then read the status again. The Meta Ads card and the Instagram connection do not change. Meta reports these events but does not optimize Instagram ads on them yet. 502 when the measurement engine could not mint the link. Requires `ads:write`.
142697
+ */
142698
+ post: {
142699
+ parameters: {
142700
+ query?: never;
142701
+ header?: {
142702
+ /** @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. */
142703
+ "Idempotency-Key"?: string;
142704
+ };
142705
+ path?: never;
142706
+ cookie?: never;
142707
+ };
142708
+ requestBody?: {
142709
+ content: {
142710
+ /**
142711
+ * @example {
142712
+ * "return_to": "https://app.vitrinadev.com/anuncios/salud/envio"
142713
+ * }
142714
+ */
142715
+ "application/json": {
142716
+ /**
142717
+ * Format: uri
142718
+ * @description Where the owner comes back to after Meta’s consent: an absolute URL on the app’s own origin. `instagram_events=return` is appended.
142719
+ */
142720
+ return_to: string;
142721
+ };
142722
+ };
142723
+ };
142724
+ responses: {
142725
+ /** @description The reconnect URL. */
142726
+ 200: {
142727
+ headers: {
142728
+ [name: string]: unknown;
142729
+ };
142730
+ content: {
142731
+ /**
142732
+ * @example {
142733
+ * "data": {
142734
+ * "url": "https://connect.example.com/h/abc123",
142735
+ * "expires_at": "2026-11-03T19:45:00.000Z"
142736
+ * }
142737
+ * }
142738
+ */
142739
+ "application/json": {
142740
+ data: {
142741
+ /**
142742
+ * Format: uri
142743
+ * @description Open it in the browser: the Meta Ads consent that asks for Instagram events.
142744
+ */
142745
+ url: string;
142746
+ /** @description When the link stops working (about 45 minutes). */
142747
+ expires_at: string | null;
142748
+ };
142749
+ };
142750
+ };
142751
+ };
142752
+ /** @description Validation error */
142753
+ 400: {
142754
+ headers: {
142755
+ [name: string]: unknown;
142756
+ };
142757
+ content: {
142758
+ "application/json": components["schemas"]["Error"];
142759
+ };
142760
+ };
142761
+ /** @description Unauthorized */
142762
+ 401: {
142763
+ headers: {
142764
+ [name: string]: unknown;
142765
+ };
142766
+ content: {
142767
+ "application/json": components["schemas"]["Error"];
142768
+ };
142769
+ };
142770
+ /** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
142771
+ 402: {
142772
+ headers: {
142773
+ [name: string]: unknown;
142774
+ };
142775
+ content: {
142776
+ /**
142777
+ * @example {
142778
+ * "error": {
142779
+ * "code": "ENTITLEMENT_NOT_ACTIVE",
142780
+ * "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
142781
+ * "details": {
142782
+ * "required": [
142783
+ * "vitrina_ads"
142784
+ * ],
142785
+ * "active": [],
142786
+ * "feature": "vitrina_ads",
142787
+ * "entitlement_state": "off"
142788
+ * }
142789
+ * }
142790
+ * }
142791
+ */
142792
+ "application/json": components["schemas"]["Error"];
142793
+ };
142794
+ };
142795
+ /** @description Forbidden */
142796
+ 403: {
142797
+ headers: {
142798
+ [name: string]: unknown;
142799
+ };
142800
+ content: {
142801
+ "application/json": components["schemas"]["Error"];
142802
+ };
142803
+ };
142804
+ /** @description Not found */
142805
+ 404: {
142806
+ headers: {
142807
+ [name: string]: unknown;
142808
+ };
142809
+ content: {
142810
+ "application/json": components["schemas"]["Error"];
142811
+ };
142812
+ };
142813
+ /** @description Vitrina Ads is active but the delegated key has not finished rotating (`ADS_KEY_NEEDS_REMINT`) — retry once `GET /ads/state` reports `needs_remint: false`. Also the generic conflict of a write. */
142814
+ 409: {
142815
+ headers: {
142816
+ [name: string]: unknown;
142817
+ };
142818
+ content: {
142819
+ /**
142820
+ * @example {
142821
+ * "error": {
142822
+ * "code": "ADS_KEY_NEEDS_REMINT",
142823
+ * "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
142824
+ * "details": {
142825
+ * "key_kind": "core"
142826
+ * }
142827
+ * }
142828
+ * }
142829
+ */
142830
+ "application/json": components["schemas"]["Error"];
142831
+ };
142832
+ };
142833
+ /** @description Rate limited */
142834
+ 429: {
142835
+ headers: {
142836
+ [name: string]: unknown;
142837
+ };
142838
+ content: {
142839
+ "application/json": components["schemas"]["Error"];
142840
+ };
142841
+ };
142842
+ };
142843
+ };
142844
+ delete?: never;
142845
+ options?: never;
142846
+ head?: never;
142847
+ patch?: never;
142848
+ trace?: never;
142849
+ };
142427
142850
  "/ads/conversion-sync/data-sources/instagram/turn-off": {
142428
142851
  parameters: {
142429
142852
  query?: never;
@@ -283123,7 +283546,7 @@ interface components {
283123
283546
  BankFeedConnection: {
283124
283547
  id: string;
283125
283548
  /** @enum {string} */
283126
- provider: "fintoc" | "bci_api_market";
283549
+ provider: "fintoc" | "emisso" | "bci_api_market";
283127
283550
  institution_name: string | null;
283128
283551
  holder_name: string | null;
283129
283552
  accounts: {
@@ -283273,7 +283696,7 @@ interface components {
283273
283696
  /** @enum {string} */
283274
283697
  kind: "bank" | "mercado_pago" | "sii";
283275
283698
  /** @enum {string} */
283276
- provider: "fintoc" | "bci_api_market" | "mercadopago" | "sii";
283699
+ provider: "fintoc" | "emisso" | "bci_api_market" | "mercadopago" | "sii";
283277
283700
  institution_name: string | null;
283278
283701
  holder_name: string | null;
283279
283702
  accounts: {
@@ -283330,6 +283753,16 @@ interface components {
283330
283753
  price_clp_per_bank_month: number | null;
283331
283754
  widget_public_key: string | null;
283332
283755
  };
283756
+ /** @description Which provider a NEW direct bank link goes through. `fintoc`: open its widget (`…/fintoc/link-intent`). `emisso`: let the user pick one of `banks`, then open the page from `…/emisso/link-session`. */
283757
+ bank_aggregator: {
283758
+ /** @enum {string} */
283759
+ provider: "fintoc" | "emisso";
283760
+ configured: boolean;
283761
+ banks: {
283762
+ code: string;
283763
+ name: string;
283764
+ }[];
283765
+ };
283333
283766
  stale_after_hours: number;
283334
283767
  manual_sync_min_interval_minutes: number;
283335
283768
  };
@@ -283341,6 +283774,19 @@ interface components {
283341
283774
  exchange_token?: string;
283342
283775
  link_token?: string;
283343
283776
  };
283777
+ FinanzasEmissoLinkSession: {
283778
+ url: string;
283779
+ expires_at: string;
283780
+ bank: string;
283781
+ };
283782
+ FinanzasEmissoLinkSessionBody: {
283783
+ bank?: string;
283784
+ /** Format: uuid */
283785
+ connection_id?: string;
283786
+ };
283787
+ FinanzasEmissoClaim: {
283788
+ connections: components["schemas"]["FinanzasConnection"][];
283789
+ };
283344
283790
  FinanzasBankPullLink: {
283345
283791
  /** Format: uuid */
283346
283792
  id: string;
@@ -283998,7 +284444,7 @@ interface components {
283998
284444
  /** @enum {string} */
283999
284445
  currency: "CLP" | "USD";
284000
284446
  /** @enum {string} */
284001
- source: "fintoc" | "mercado_pago" | "manual";
284447
+ source: "fintoc" | "emisso" | "mercado_pago" | "manual";
284002
284448
  has_feed: boolean;
284003
284449
  balance_clp: number | null;
284004
284450
  balance_original: {
@@ -289627,7 +290073,7 @@ interface components {
289627
290073
  */
289628
290074
  state: "coming_soon" | "unknown" | "prerequisites_missing" | "ready" | "created" | "sending" | "off" | "error";
289629
290075
  /** @enum {string|null} */
289630
- reason_code: "entitlement_required" | "duplicate_kind" | "access_missing" | "dataset_unreadable" | "already_exists" | "no_pixel" | "pixels_unavailable" | "pixel_already_attached" | "instagram_facebook_login_required" | "meta_refused" | "meta_unavailable" | "engine_error" | null;
290076
+ reason_code: "entitlement_required" | "duplicate_kind" | "access_missing" | "dataset_unreadable" | "already_exists" | "no_pixel" | "pixels_unavailable" | "pixel_already_attached" | "instagram_facebook_login_required" | "instagram_events_permission_required" | "meta_refused" | "meta_unavailable" | "engine_error" | null;
289631
290077
  /** @description What to do, in Spanish, when `reason_code` is set. */
289632
290078
  message: string | null;
289633
290079
  dataset: {
@@ -289661,7 +290107,7 @@ interface components {
289661
290107
  */
289662
290108
  state: "coming_soon" | "unknown" | "prerequisites_missing" | "ready" | "created" | "sending" | "off" | "error";
289663
290109
  /** @enum {string|null} */
289664
- reason_code: "entitlement_required" | "duplicate_kind" | "access_missing" | "dataset_unreadable" | "already_exists" | "no_pixel" | "pixels_unavailable" | "pixel_already_attached" | "instagram_facebook_login_required" | "meta_refused" | "meta_unavailable" | "engine_error" | null;
290110
+ reason_code: "entitlement_required" | "duplicate_kind" | "access_missing" | "dataset_unreadable" | "already_exists" | "no_pixel" | "pixels_unavailable" | "pixel_already_attached" | "instagram_facebook_login_required" | "instagram_events_permission_required" | "meta_refused" | "meta_unavailable" | "engine_error" | null;
289665
290111
  /** @description What to do, in Spanish, when `reason_code` is set. */
289666
290112
  message: string | null;
289667
290113
  dataset: {
@@ -289706,7 +290152,7 @@ interface components {
289706
290152
  */
289707
290153
  state: "coming_soon" | "unknown" | "prerequisites_missing" | "ready" | "created" | "sending" | "off" | "error";
289708
290154
  /** @enum {string|null} */
289709
- reason_code: "entitlement_required" | "duplicate_kind" | "access_missing" | "dataset_unreadable" | "already_exists" | "no_pixel" | "pixels_unavailable" | "pixel_already_attached" | "instagram_facebook_login_required" | "meta_refused" | "meta_unavailable" | "engine_error" | null;
290155
+ reason_code: "entitlement_required" | "duplicate_kind" | "access_missing" | "dataset_unreadable" | "already_exists" | "no_pixel" | "pixels_unavailable" | "pixel_already_attached" | "instagram_facebook_login_required" | "instagram_events_permission_required" | "meta_refused" | "meta_unavailable" | "engine_error" | null;
289710
290156
  /** @description What to do, in Spanish, when `reason_code` is set. */
289711
290157
  message: string | null;
289712
290158
  dataset: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "17.39.0",
3
+ "version": "17.41.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",