@vitrina/api 14.101.10 → 14.102.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
@@ -115048,6 +115048,486 @@ interface paths {
115048
115048
  patch?: never;
115049
115049
  trace?: never;
115050
115050
  };
115051
+ "/ads/conversion-sync/messaging-event-names": {
115052
+ parameters: {
115053
+ query?: never;
115054
+ header?: never;
115055
+ path?: never;
115056
+ cookie?: never;
115057
+ };
115058
+ /**
115059
+ * Each stage’s Meta event name on the website and WhatsApp lanes
115060
+ * @description Per stage the workspace sends: the website pixel lane’s name (`website_event`, fixed), the WhatsApp (business_messaging) lane’s default (`messaging_default`) and the name in force (`messaging_event`: the workspace’s choice, else the default; `null` = not sent on that lane). `accepted_events` are the 14 names Meta’s WhatsApp dataset accepts. Change them with `PATCH` on this path. `sample=1` (or a sandbox) answers the defaults. Requires `ads:read`.
115061
+ */
115062
+ get: {
115063
+ parameters: {
115064
+ query?: {
115065
+ /** @description `1` serves the deterministic sample dataset («Ver con datos de ejemplo»): same shapes, invented but internally consistent figures, no entitlement required (the scope still is). A sandbox workspace is always served the sample, with or without this parameter. */
115066
+ sample?: "1" | "true";
115067
+ };
115068
+ header?: never;
115069
+ path?: never;
115070
+ cookie?: never;
115071
+ };
115072
+ requestBody?: never;
115073
+ responses: {
115074
+ /** @description The stages and their names */
115075
+ 200: {
115076
+ headers: {
115077
+ [name: string]: unknown;
115078
+ };
115079
+ content: {
115080
+ /**
115081
+ * @example {
115082
+ * "data": {
115083
+ * "overrides": {
115084
+ * "lead_qualified": "InitiateCheckout"
115085
+ * },
115086
+ * "accepted_events": [
115087
+ * "Purchase",
115088
+ * "LeadSubmitted",
115089
+ * "InitiateCheckout",
115090
+ * "AddToCart",
115091
+ * "ViewContent",
115092
+ * "OrderCreated",
115093
+ * "OrderShipped",
115094
+ * "OrderDelivered",
115095
+ * "OrderCanceled",
115096
+ * "OrderReturned",
115097
+ * "CartAbandoned",
115098
+ * "QualifiedLead",
115099
+ * "RatingProvided",
115100
+ * "ReviewProvided"
115101
+ * ],
115102
+ * "stages": [
115103
+ * {
115104
+ * "stage": "lead_created",
115105
+ * "label": "Contacto nuevo",
115106
+ * "website_event": "Lead",
115107
+ * "messaging_default": "LeadSubmitted",
115108
+ * "messaging_event": "LeadSubmitted",
115109
+ * "overridden": false
115110
+ * },
115111
+ * {
115112
+ * "stage": "lead_qualified",
115113
+ * "label": "Cotizó",
115114
+ * "website_event": "QualifiedLead",
115115
+ * "messaging_default": "QualifiedLead",
115116
+ * "messaging_event": "InitiateCheckout",
115117
+ * "overridden": true
115118
+ * },
115119
+ * {
115120
+ * "stage": "appointment_booked",
115121
+ * "label": "Visita agendada",
115122
+ * "website_event": "Schedule",
115123
+ * "messaging_default": "QualifiedLead",
115124
+ * "messaging_event": "QualifiedLead",
115125
+ * "overridden": false
115126
+ * },
115127
+ * {
115128
+ * "stage": "checkout_started",
115129
+ * "label": "Abrió el link de pago",
115130
+ * "website_event": "InitiateCheckout",
115131
+ * "messaging_default": "InitiateCheckout",
115132
+ * "messaging_event": "InitiateCheckout",
115133
+ * "overridden": false
115134
+ * },
115135
+ * {
115136
+ * "stage": "deposit_paid",
115137
+ * "label": "Abono pagado",
115138
+ * "website_event": "vitrina_step_8",
115139
+ * "messaging_default": "OrderCreated",
115140
+ * "messaging_event": "OrderCreated",
115141
+ * "overridden": false
115142
+ * },
115143
+ * {
115144
+ * "stage": "closed_won",
115145
+ * "label": "Venta o compra",
115146
+ * "website_event": "Purchase",
115147
+ * "messaging_default": "Purchase",
115148
+ * "messaging_event": "Purchase",
115149
+ * "overridden": false
115150
+ * },
115151
+ * {
115152
+ * "stage": "payment_received",
115153
+ * "label": "Pago recibido",
115154
+ * "website_event": "Purchase",
115155
+ * "messaging_default": "Purchase",
115156
+ * "messaging_event": "Purchase",
115157
+ * "overridden": false
115158
+ * },
115159
+ * {
115160
+ * "stage": "seller_qualified",
115161
+ * "label": "Vendedor calificado",
115162
+ * "website_event": "SellerQualified",
115163
+ * "messaging_default": "AddToCart",
115164
+ * "messaging_event": "AddToCart",
115165
+ * "overridden": false
115166
+ * },
115167
+ * {
115168
+ * "stage": "seller_visit_booked",
115169
+ * "label": "Vendedor con visita agendada",
115170
+ * "website_event": "SellerVisitScheduled",
115171
+ * "messaging_default": null,
115172
+ * "messaging_event": null,
115173
+ * "overridden": false
115174
+ * },
115175
+ * {
115176
+ * "stage": "seller_deal_closed",
115177
+ * "label": "Compra cerrada a un vendedor",
115178
+ * "website_event": "SellerDealClosed",
115179
+ * "messaging_default": "OrderDelivered",
115180
+ * "messaging_event": "OrderDelivered",
115181
+ * "overridden": false
115182
+ * }
115183
+ * ]
115184
+ * }
115185
+ * }
115186
+ */
115187
+ "application/json": {
115188
+ data: components["schemas"]["AdsMessagingEventNames"];
115189
+ };
115190
+ };
115191
+ };
115192
+ /** @description Validation error */
115193
+ 400: {
115194
+ headers: {
115195
+ [name: string]: unknown;
115196
+ };
115197
+ content: {
115198
+ "application/json": components["schemas"]["Error"];
115199
+ };
115200
+ };
115201
+ /** @description Unauthorized */
115202
+ 401: {
115203
+ headers: {
115204
+ [name: string]: unknown;
115205
+ };
115206
+ content: {
115207
+ "application/json": components["schemas"]["Error"];
115208
+ };
115209
+ };
115210
+ /** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
115211
+ 402: {
115212
+ headers: {
115213
+ [name: string]: unknown;
115214
+ };
115215
+ content: {
115216
+ /**
115217
+ * @example {
115218
+ * "error": {
115219
+ * "code": "ENTITLEMENT_NOT_ACTIVE",
115220
+ * "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
115221
+ * "details": {
115222
+ * "required": [
115223
+ * "vitrina_ads"
115224
+ * ],
115225
+ * "active": [],
115226
+ * "feature": "vitrina_ads",
115227
+ * "entitlement_state": "off"
115228
+ * }
115229
+ * }
115230
+ * }
115231
+ */
115232
+ "application/json": components["schemas"]["Error"];
115233
+ };
115234
+ };
115235
+ /** @description Forbidden */
115236
+ 403: {
115237
+ headers: {
115238
+ [name: string]: unknown;
115239
+ };
115240
+ content: {
115241
+ "application/json": components["schemas"]["Error"];
115242
+ };
115243
+ };
115244
+ /** @description Not found */
115245
+ 404: {
115246
+ headers: {
115247
+ [name: string]: unknown;
115248
+ };
115249
+ content: {
115250
+ "application/json": components["schemas"]["Error"];
115251
+ };
115252
+ };
115253
+ /** @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. */
115254
+ 409: {
115255
+ headers: {
115256
+ [name: string]: unknown;
115257
+ };
115258
+ content: {
115259
+ /**
115260
+ * @example {
115261
+ * "error": {
115262
+ * "code": "ADS_KEY_NEEDS_REMINT",
115263
+ * "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
115264
+ * "details": {
115265
+ * "key_kind": "core"
115266
+ * }
115267
+ * }
115268
+ * }
115269
+ */
115270
+ "application/json": components["schemas"]["Error"];
115271
+ };
115272
+ };
115273
+ /** @description Rate limited */
115274
+ 429: {
115275
+ headers: {
115276
+ [name: string]: unknown;
115277
+ };
115278
+ content: {
115279
+ "application/json": components["schemas"]["Error"];
115280
+ };
115281
+ };
115282
+ };
115283
+ };
115284
+ put?: never;
115285
+ post?: never;
115286
+ delete?: never;
115287
+ options?: never;
115288
+ head?: never;
115289
+ /**
115290
+ * Choose a stage’s Meta event name on the WhatsApp lane
115291
+ * @description Merges onto the stored choices: `overrides` sets a stage’s name (one of `accepted_events`, or `null` = do not send it on the WhatsApp lane), `reset` drops a choice (back to `messaging_default`). The website lane never changes. The RESULT is validated, and nothing is stored on a `422` (`field_errors.overrides.<stage>`, `details.problems.<stage>`): `unknown_stage` (the workspace does not send it), `stage_not_sent` (instalments), `name_not_accepted`, `purchase_needs_value` (Purchase only on a stage that carries a value), `seller_name_shared` (a seller-side stage never shares its name with a buyer stage, so an ad set that optimises on buyers never learns from sellers; buyer stages may share). Then the engine’s live rules are converged at once (`sync.state: converged`, `sync.updated` = the stages rewritten); `pending` = stored, the daily sweep retries the write. Requires `ads:write`. Errors: `402 ENTITLEMENT_NOT_ACTIVE` (`details.feature: vitrina_ads`, with `hint`) when the Vitrina Ads Add-on is not active — never retried; `409 ADS_KEY_NEEDS_REMINT` when the Add-on is on but the delegated key has not finished rotating, or still lacks `exports:write` after one automatic re-mint (the entitlement rail converges it; see `GET /ads/state`).
115292
+ */
115293
+ patch: {
115294
+ parameters: {
115295
+ query?: never;
115296
+ header?: never;
115297
+ path?: never;
115298
+ cookie?: never;
115299
+ };
115300
+ requestBody?: {
115301
+ content: {
115302
+ /**
115303
+ * @example {
115304
+ * "overrides": {
115305
+ * "lead_qualified": "InitiateCheckout"
115306
+ * }
115307
+ * }
115308
+ */
115309
+ "application/json": components["schemas"]["AdsMessagingEventNamesPatch"];
115310
+ };
115311
+ };
115312
+ responses: {
115313
+ /** @description The stored choices and the engine write */
115314
+ 200: {
115315
+ headers: {
115316
+ [name: string]: unknown;
115317
+ };
115318
+ content: {
115319
+ /**
115320
+ * @example {
115321
+ * "data": {
115322
+ * "overrides": {
115323
+ * "lead_qualified": "InitiateCheckout"
115324
+ * },
115325
+ * "accepted_events": [
115326
+ * "Purchase",
115327
+ * "LeadSubmitted",
115328
+ * "InitiateCheckout",
115329
+ * "AddToCart",
115330
+ * "ViewContent",
115331
+ * "OrderCreated",
115332
+ * "OrderShipped",
115333
+ * "OrderDelivered",
115334
+ * "OrderCanceled",
115335
+ * "OrderReturned",
115336
+ * "CartAbandoned",
115337
+ * "QualifiedLead",
115338
+ * "RatingProvided",
115339
+ * "ReviewProvided"
115340
+ * ],
115341
+ * "stages": [
115342
+ * {
115343
+ * "stage": "lead_created",
115344
+ * "label": "Contacto nuevo",
115345
+ * "website_event": "Lead",
115346
+ * "messaging_default": "LeadSubmitted",
115347
+ * "messaging_event": "LeadSubmitted",
115348
+ * "overridden": false
115349
+ * },
115350
+ * {
115351
+ * "stage": "lead_qualified",
115352
+ * "label": "Cotizó",
115353
+ * "website_event": "QualifiedLead",
115354
+ * "messaging_default": "QualifiedLead",
115355
+ * "messaging_event": "InitiateCheckout",
115356
+ * "overridden": true
115357
+ * },
115358
+ * {
115359
+ * "stage": "appointment_booked",
115360
+ * "label": "Visita agendada",
115361
+ * "website_event": "Schedule",
115362
+ * "messaging_default": "QualifiedLead",
115363
+ * "messaging_event": "QualifiedLead",
115364
+ * "overridden": false
115365
+ * },
115366
+ * {
115367
+ * "stage": "checkout_started",
115368
+ * "label": "Abrió el link de pago",
115369
+ * "website_event": "InitiateCheckout",
115370
+ * "messaging_default": "InitiateCheckout",
115371
+ * "messaging_event": "InitiateCheckout",
115372
+ * "overridden": false
115373
+ * },
115374
+ * {
115375
+ * "stage": "deposit_paid",
115376
+ * "label": "Abono pagado",
115377
+ * "website_event": "vitrina_step_8",
115378
+ * "messaging_default": "OrderCreated",
115379
+ * "messaging_event": "OrderCreated",
115380
+ * "overridden": false
115381
+ * },
115382
+ * {
115383
+ * "stage": "closed_won",
115384
+ * "label": "Venta o compra",
115385
+ * "website_event": "Purchase",
115386
+ * "messaging_default": "Purchase",
115387
+ * "messaging_event": "Purchase",
115388
+ * "overridden": false
115389
+ * },
115390
+ * {
115391
+ * "stage": "payment_received",
115392
+ * "label": "Pago recibido",
115393
+ * "website_event": "Purchase",
115394
+ * "messaging_default": "Purchase",
115395
+ * "messaging_event": "Purchase",
115396
+ * "overridden": false
115397
+ * },
115398
+ * {
115399
+ * "stage": "seller_qualified",
115400
+ * "label": "Vendedor calificado",
115401
+ * "website_event": "SellerQualified",
115402
+ * "messaging_default": "AddToCart",
115403
+ * "messaging_event": "AddToCart",
115404
+ * "overridden": false
115405
+ * },
115406
+ * {
115407
+ * "stage": "seller_visit_booked",
115408
+ * "label": "Vendedor con visita agendada",
115409
+ * "website_event": "SellerVisitScheduled",
115410
+ * "messaging_default": null,
115411
+ * "messaging_event": null,
115412
+ * "overridden": false
115413
+ * },
115414
+ * {
115415
+ * "stage": "seller_deal_closed",
115416
+ * "label": "Compra cerrada a un vendedor",
115417
+ * "website_event": "SellerDealClosed",
115418
+ * "messaging_default": "OrderDelivered",
115419
+ * "messaging_event": "OrderDelivered",
115420
+ * "overridden": false
115421
+ * }
115422
+ * ],
115423
+ * "sync": {
115424
+ * "state": "converged",
115425
+ * "updated": [
115426
+ * "lead_qualified"
115427
+ * ]
115428
+ * }
115429
+ * }
115430
+ * }
115431
+ */
115432
+ "application/json": {
115433
+ data: components["schemas"]["AdsMessagingEventNamesPatchResult"];
115434
+ };
115435
+ };
115436
+ };
115437
+ /** @description Validation error */
115438
+ 400: {
115439
+ headers: {
115440
+ [name: string]: unknown;
115441
+ };
115442
+ content: {
115443
+ "application/json": components["schemas"]["Error"];
115444
+ };
115445
+ };
115446
+ /** @description Unauthorized */
115447
+ 401: {
115448
+ headers: {
115449
+ [name: string]: unknown;
115450
+ };
115451
+ content: {
115452
+ "application/json": components["schemas"]["Error"];
115453
+ };
115454
+ };
115455
+ /** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
115456
+ 402: {
115457
+ headers: {
115458
+ [name: string]: unknown;
115459
+ };
115460
+ content: {
115461
+ /**
115462
+ * @example {
115463
+ * "error": {
115464
+ * "code": "ENTITLEMENT_NOT_ACTIVE",
115465
+ * "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
115466
+ * "details": {
115467
+ * "required": [
115468
+ * "vitrina_ads"
115469
+ * ],
115470
+ * "active": [],
115471
+ * "feature": "vitrina_ads",
115472
+ * "entitlement_state": "off"
115473
+ * }
115474
+ * }
115475
+ * }
115476
+ */
115477
+ "application/json": components["schemas"]["Error"];
115478
+ };
115479
+ };
115480
+ /** @description Forbidden */
115481
+ 403: {
115482
+ headers: {
115483
+ [name: string]: unknown;
115484
+ };
115485
+ content: {
115486
+ "application/json": components["schemas"]["Error"];
115487
+ };
115488
+ };
115489
+ /** @description Not found */
115490
+ 404: {
115491
+ headers: {
115492
+ [name: string]: unknown;
115493
+ };
115494
+ content: {
115495
+ "application/json": components["schemas"]["Error"];
115496
+ };
115497
+ };
115498
+ /** @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. */
115499
+ 409: {
115500
+ headers: {
115501
+ [name: string]: unknown;
115502
+ };
115503
+ content: {
115504
+ /**
115505
+ * @example {
115506
+ * "error": {
115507
+ * "code": "ADS_KEY_NEEDS_REMINT",
115508
+ * "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
115509
+ * "details": {
115510
+ * "key_kind": "core"
115511
+ * }
115512
+ * }
115513
+ * }
115514
+ */
115515
+ "application/json": components["schemas"]["Error"];
115516
+ };
115517
+ };
115518
+ /** @description Rate limited */
115519
+ 429: {
115520
+ headers: {
115521
+ [name: string]: unknown;
115522
+ };
115523
+ content: {
115524
+ "application/json": components["schemas"]["Error"];
115525
+ };
115526
+ };
115527
+ };
115528
+ };
115529
+ trace?: never;
115530
+ };
115051
115531
  "/ads/conversion-sync/data-sources": {
115052
115532
  parameters: {
115053
115533
  query?: never;
@@ -135997,7 +136477,7 @@ interface paths {
135997
136477
  };
135998
136478
  /**
135999
136479
  * The people behind one «esperando (por qué)» line
136000
- * @description Today’s held subjects for the given guard codes (comma-separated, the `codes` of one `/guards` `held` line): each lead or thread a sweep held without a ledger row and that has not been sent since, with its contact, step and when the hold lifts when known (`held_until`). Same day and same predicate as the `held` counts, newest first, at most 100.
136480
+ * @description Today’s held subjects for the given guard codes (comma-separated, the `codes` of one `/guards` `held` line): each lead or thread a sweep held without a ledger row and that has not been sent since, with its contact, step and when the hold lifts when known (`held_until`), and `step_label`, the step as the «Si no responde» hero names it («Conversó y dejó de responder · paso 3 de 5»; null when the plan does not draw it). One row per person: their latest hold. Same day and same predicate as the `held` counts, newest first, at most 100.
136001
136481
  */
136002
136482
  get: {
136003
136483
  parameters: {
@@ -136440,7 +136920,7 @@ interface paths {
136440
136920
  };
136441
136921
  /**
136442
136922
  * What happens next for each of a contact’s leads
136443
- * @description The contact page’s «Próximo seguimiento»: for each open or lost lead of `contact_id` (or the one `lead_id`), newest first, the next thing the Recontacto engine does, computed by the same ladder walk and decision the sweep runs (contact hours, the night deferral, R12, the answer-debt gate). `state` is `message` (a follow-up is planned: `step` of `steps_total`, `at`, `channel`, `what`, `autonomy`, `deferred_from_label` when contact hours moved it, `due_now` when the next sweep takes it; with today’s daily cap (G2) or review budget (G41) spent, a step due today moves to tomorrow’s opening and `deferred_reason` says which). `at` is never outside contact hours: a step due at night (or a G8 re-look that opens at midnight) moves to the next opening. `deferred_codes` lists every reason `at` moved (`outside_contact_hours`, `re_evaluation`, `daily_cap_reached`, `review_budget_reached`), `lose` (no more messages; marked lost at `at`), `answer_debt` (the customer wrote last), `path_cap` (R12), `person_ladder` (G13: the person’s ladder runs on a newer lead), `undeliverable` (G35: WhatsApp refused our messages; nothing goes out until they write), `paused` (the master switch is off) or `none`. `sentence` is the whole answer in one line, in `lang` (default the workspace’s). `held` is today’s latest hold of a due step (`guard`, `code`, `since`, `last_seen`, `until`, `sweeps`), or null. Drafts already waiting for approval or in the backlog queue are the ledger’s (`GET /followups/recontacto/attempts?contact_id=`). `handoff` is the person’s open conversation the AI handed to a person, or null: `conversation_id`, `owner_user_id`, `owner_name`, `mode` (`after_handoff.followups`), `class` (`informational` | `operational` | `sensitive`: only `informational` gets drafts or an AI answer), `draft` (the pending draft: `attempt_id`, `auto_send_at`, `auto_send_at_label`, `promise` when a teammate’s promised time set it), `waiting` (the customer wrote last: `since`, `ai_answers_at`, `ai_answers_at_label`) and `sentence`, the state line («Lo atiende Diego · borrador listo · se envía solo mañana 16:30 si nadie lo revisa»).
136923
+ * @description The contact page’s «Próximo seguimiento»: for each open or lost lead of `contact_id` (or the one `lead_id`), newest first, the next thing the Recontacto engine does, computed by the same ladder walk and decision the sweep runs (contact hours, the night deferral, R12, the answer-debt gate). `state` is `message` (a follow-up is planned: `step` of `steps_total`, `at`, `channel`, `what`, `autonomy`, `deferred_from_label` when contact hours moved it, `due_now` when the next sweep takes it; with today’s daily cap (G2) or review budget (G41) spent, a step due today moves to tomorrow’s opening and `deferred_reason` says which). `at` is never outside contact hours: a step due at night (or a G8 re-look that opens at midnight) moves to the next opening. `deferred_codes` lists every reason `at` moved (`outside_contact_hours`, `re_evaluation`, `daily_cap_reached`, `review_budget_reached`), `lose` (no more messages; marked lost at `at`), `answer_debt` (the customer wrote last), `path_cap` (R12), `person_ladder` (G13: the person’s ladder runs on a newer lead), `undeliverable` (G35: WhatsApp refused our messages; nothing goes out until they write), `held` (the sweep holds the step when it comes due: G52 a visit fixed, the store visited or a sale under way; G50 handed to a person for a complaint or a step only a person can do; G49 «Nada». `held` carries the guard, `code` (`bottom_funnel`, `handoff_sensitive`, `handoff_operational`, `handoff_followups_off`) and `until` when known; never a send time), `paused` (the master switch is off) or `none`. `sentence` is the whole answer in one line, in `lang` (default the workspace’s). `held` is today’s latest hold of a due step (`guard`, `code`, `since`, `last_seen`, `until`, `sweeps`), or null. `step_label` names the step as the hero does («Conversó y dejó de responder · paso 3 de 5»), and `sentence` uses it. `at` is the lead sweep’s hourly tick (the grid `/plan` draws). `handoff_draft` is set when the step becomes a draft for the person handling a handed-off conversation (G49: `approver_user_id`, `auto_send_at`, `auto_send_at_label`), else null. Drafts already waiting for approval or in the backlog queue are the ledger’s (`GET /followups/recontacto/attempts?contact_id=`). `handoff` is the person’s open conversation the AI handed to a person, or null: `conversation_id`, `owner_user_id`, `owner_name`, `mode` (`after_handoff.followups`), `class` (`informational` | `operational` | `sensitive`: only `informational` gets drafts or an AI answer), `draft` (the pending draft: `attempt_id`, `auto_send_at`, `auto_send_at_label`, `promise` when a teammate’s promised time set it), `waiting` (the customer wrote last: `since`, `ai_answers_at`, `ai_answers_at_label`) and `sentence`, the state line («Lo atiende Diego · borrador listo · se envía solo mañana 16:30 si nadie lo revisa»).
136444
136924
  */
136445
136925
  get: {
136446
136926
  parameters: {
@@ -136472,8 +136952,8 @@ interface paths {
136472
136952
  * "situation": "never_replied",
136473
136953
  * "step": 2,
136474
136954
  * "steps_total": 4,
136475
- * "at": "2026-10-23T20:12:00-03:00",
136476
- * "at_label": "vie 23 oct · 20:12",
136955
+ * "at": "2026-10-23T20:00:00-03:00",
136956
+ * "at_label": "vie 23 oct · 20:00",
136477
136957
  * "elapsed_label": "8 horas",
136478
136958
  * "due_now": false,
136479
136959
  * "deferred_from_label": null,
@@ -136482,7 +136962,36 @@ interface paths {
136482
136962
  * "what": "WhatsApp",
136483
136963
  * "autonomy": "auto",
136484
136964
  * "autonomy_label": "Automático",
136485
- * "sentence": "Próximo seguimiento: paso 2 de 4 · WhatsApp · vie 23 oct · 20:12"
136965
+ * "sentence": "Próximo seguimiento: paso 2 de 4 · WhatsApp · vie 23 oct · 20:00",
136966
+ * "handoff_draft": null
136967
+ * },
136968
+ * {
136969
+ * "lead_id": "5b0e7c21-9d3a-4f6e-8c1b-3a2d4e5f6a7b",
136970
+ * "state": "held",
136971
+ * "situation": "stalled",
136972
+ * "step": 1,
136973
+ * "steps_total": 2,
136974
+ * "at": null,
136975
+ * "at_label": null,
136976
+ * "elapsed_label": null,
136977
+ * "due_now": false,
136978
+ * "deferred_from_label": null,
136979
+ * "deferred_reason": null,
136980
+ * "channel": "whatsapp",
136981
+ * "what": null,
136982
+ * "autonomy": null,
136983
+ * "autonomy_label": null,
136984
+ * "sentence": "En pausa: ya visitó la tienda o la venta está en curso (se retoma el jue 5 nov)",
136985
+ * "held": {
136986
+ * "guard": "G52",
136987
+ * "code": "bottom_funnel",
136988
+ * "label": "ya visitó la tienda o la venta está en curso",
136989
+ * "since": "2026-10-23T15:10:00-03:00",
136990
+ * "last_seen": "2026-10-23T15:10:00-03:00",
136991
+ * "until": "2026-11-05T13:00:00-03:00",
136992
+ * "sweeps": 0
136993
+ * },
136994
+ * "handoff_draft": null
136486
136995
  * }
136487
136996
  * ],
136488
136997
  * "handoff": {
@@ -136989,7 +137498,7 @@ interface paths {
136989
137498
  };
136990
137499
  /**
136991
137500
  * List Recontacto attempts (ledger and review queue)
136992
- * @description One row per cadence rung. `exhausted` means the rung spent its evaluation budget without ever reaching the customer — never read it as "we chased them". `waiting_template` means it is parked on a WhatsApp template in Meta review: no budget spent, the ladder did not move, and the template hooks own the row. `queued` is an overdue step held by the backlog rule (G24): it waits for its release slot (at most 10 per workspace per day), is never composed and never counts as a try until released; `release_estimate_at` says when it is expected to go out. A `failed` row carries `failure`: `reason`, the owner’s sentence in `lang`, and `next` (`retry`, `wait_for_reply` when WhatsApp cannot deliver to the person and we wait until they write, `fix_template`, or `none`). `statuses` filters several statuses at once; `limit` and `cursor` page the history (`meta.pagination.nextCursor`), and `meta.pagination.total` counts every row the filter matches.
137501
+ * @description One row per cadence rung (with `no_send_code`, the «no enviados» drill, each row also carries `step_label`, the step as the hero names it). `exhausted` means the rung spent its evaluation budget without ever reaching the customer — never read it as "we chased them". `waiting_template` means it is parked on a WhatsApp template in Meta review: no budget spent, the ladder did not move, and the template hooks own the row. `queued` is an overdue step held by the backlog rule (G24): it waits for its release slot (at most 10 per workspace per day), is never composed and never counts as a try until released; `release_estimate_at` says when it is expected to go out. A `failed` row carries `failure`: `reason`, the owner’s sentence in `lang`, and `next` (`retry`, `wait_for_reply` when WhatsApp cannot deliver to the person and we wait until they write, `fix_template`, or `none`). `statuses` filters several statuses at once; `limit` and `cursor` page the history (`meta.pagination.nextCursor`), and `meta.pagination.total` counts every row the filter matches.
136993
137502
  */
136994
137503
  get: {
136995
137504
  parameters: {
@@ -224560,6 +225069,70 @@ interface components {
224560
225069
  test_events_link: string | null;
224561
225070
  simulated: boolean;
224562
225071
  };
225072
+ AdsMessagingEventNames: {
225073
+ /** @description The stored choices, `{ stage: name | null }`. */
225074
+ overrides: {
225075
+ [key: string]: string | null;
225076
+ };
225077
+ accepted_events: string[];
225078
+ stages: {
225079
+ /** @enum {string} */
225080
+ stage: "lead_created" | "lead_qualified" | "appointment_booked" | "checkout_started" | "deposit_paid" | "appointment_attended" | "quote_presented" | "closed_won" | "first_payment" | "returning_first_payment" | "payment_received" | "seller_qualified" | "seller_visit_booked" | "seller_deal_closed";
225081
+ label: string;
225082
+ /** @description The website pixel lane’s name (not configurable here). */
225083
+ website_event: string;
225084
+ /** @description The matrix’s own WhatsApp-lane name; `null` = not sent there. */
225085
+ messaging_default: string | null;
225086
+ /** @description The WhatsApp-lane name in force: the workspace’s choice, else the default; `null` = not sent there. */
225087
+ messaging_event: string | null;
225088
+ overridden: boolean;
225089
+ }[];
225090
+ };
225091
+ AdsMessagingEventNamesPatchResult: components["schemas"]["AdsMessagingEventNames"] & {
225092
+ sync: {
225093
+ /**
225094
+ * @description `converged`: the engine’s live rules now hold the names in force. `pending`: stored, the engine write failed and the daily sweep retries it.
225095
+ * @enum {string}
225096
+ */
225097
+ state: "converged" | "pending";
225098
+ updated: ("lead_created" | "lead_qualified" | "appointment_booked" | "checkout_started" | "deposit_paid" | "appointment_attended" | "quote_presented" | "closed_won" | "first_payment" | "returning_first_payment" | "payment_received" | "seller_qualified" | "seller_visit_booked" | "seller_deal_closed")[];
225099
+ };
225100
+ };
225101
+ AdsMessagingEventNamesPatch: {
225102
+ /** @description Per stage, the name the WhatsApp dataset receives: one of `accepted_events`, or `null` = the stage is not sent on the WhatsApp lane. Stages left out keep what they have. */
225103
+ overrides?: {
225104
+ /** @enum {string|null} */
225105
+ lead_created?: "Purchase" | "LeadSubmitted" | "InitiateCheckout" | "AddToCart" | "ViewContent" | "OrderCreated" | "OrderShipped" | "OrderDelivered" | "OrderCanceled" | "OrderReturned" | "CartAbandoned" | "QualifiedLead" | "RatingProvided" | "ReviewProvided" | null;
225106
+ /** @enum {string|null} */
225107
+ lead_qualified?: "Purchase" | "LeadSubmitted" | "InitiateCheckout" | "AddToCart" | "ViewContent" | "OrderCreated" | "OrderShipped" | "OrderDelivered" | "OrderCanceled" | "OrderReturned" | "CartAbandoned" | "QualifiedLead" | "RatingProvided" | "ReviewProvided" | null;
225108
+ /** @enum {string|null} */
225109
+ appointment_booked?: "Purchase" | "LeadSubmitted" | "InitiateCheckout" | "AddToCart" | "ViewContent" | "OrderCreated" | "OrderShipped" | "OrderDelivered" | "OrderCanceled" | "OrderReturned" | "CartAbandoned" | "QualifiedLead" | "RatingProvided" | "ReviewProvided" | null;
225110
+ /** @enum {string|null} */
225111
+ checkout_started?: "Purchase" | "LeadSubmitted" | "InitiateCheckout" | "AddToCart" | "ViewContent" | "OrderCreated" | "OrderShipped" | "OrderDelivered" | "OrderCanceled" | "OrderReturned" | "CartAbandoned" | "QualifiedLead" | "RatingProvided" | "ReviewProvided" | null;
225112
+ /** @enum {string|null} */
225113
+ deposit_paid?: "Purchase" | "LeadSubmitted" | "InitiateCheckout" | "AddToCart" | "ViewContent" | "OrderCreated" | "OrderShipped" | "OrderDelivered" | "OrderCanceled" | "OrderReturned" | "CartAbandoned" | "QualifiedLead" | "RatingProvided" | "ReviewProvided" | null;
225114
+ /** @enum {string|null} */
225115
+ appointment_attended?: "Purchase" | "LeadSubmitted" | "InitiateCheckout" | "AddToCart" | "ViewContent" | "OrderCreated" | "OrderShipped" | "OrderDelivered" | "OrderCanceled" | "OrderReturned" | "CartAbandoned" | "QualifiedLead" | "RatingProvided" | "ReviewProvided" | null;
225116
+ /** @enum {string|null} */
225117
+ quote_presented?: "Purchase" | "LeadSubmitted" | "InitiateCheckout" | "AddToCart" | "ViewContent" | "OrderCreated" | "OrderShipped" | "OrderDelivered" | "OrderCanceled" | "OrderReturned" | "CartAbandoned" | "QualifiedLead" | "RatingProvided" | "ReviewProvided" | null;
225118
+ /** @enum {string|null} */
225119
+ closed_won?: "Purchase" | "LeadSubmitted" | "InitiateCheckout" | "AddToCart" | "ViewContent" | "OrderCreated" | "OrderShipped" | "OrderDelivered" | "OrderCanceled" | "OrderReturned" | "CartAbandoned" | "QualifiedLead" | "RatingProvided" | "ReviewProvided" | null;
225120
+ /** @enum {string|null} */
225121
+ first_payment?: "Purchase" | "LeadSubmitted" | "InitiateCheckout" | "AddToCart" | "ViewContent" | "OrderCreated" | "OrderShipped" | "OrderDelivered" | "OrderCanceled" | "OrderReturned" | "CartAbandoned" | "QualifiedLead" | "RatingProvided" | "ReviewProvided" | null;
225122
+ /** @enum {string|null} */
225123
+ returning_first_payment?: "Purchase" | "LeadSubmitted" | "InitiateCheckout" | "AddToCart" | "ViewContent" | "OrderCreated" | "OrderShipped" | "OrderDelivered" | "OrderCanceled" | "OrderReturned" | "CartAbandoned" | "QualifiedLead" | "RatingProvided" | "ReviewProvided" | null;
225124
+ /** @enum {string|null} */
225125
+ payment_received?: "Purchase" | "LeadSubmitted" | "InitiateCheckout" | "AddToCart" | "ViewContent" | "OrderCreated" | "OrderShipped" | "OrderDelivered" | "OrderCanceled" | "OrderReturned" | "CartAbandoned" | "QualifiedLead" | "RatingProvided" | "ReviewProvided" | null;
225126
+ /** @enum {string|null} */
225127
+ seller_qualified?: "Purchase" | "LeadSubmitted" | "InitiateCheckout" | "AddToCart" | "ViewContent" | "OrderCreated" | "OrderShipped" | "OrderDelivered" | "OrderCanceled" | "OrderReturned" | "CartAbandoned" | "QualifiedLead" | "RatingProvided" | "ReviewProvided" | null;
225128
+ /** @enum {string|null} */
225129
+ seller_visit_booked?: "Purchase" | "LeadSubmitted" | "InitiateCheckout" | "AddToCart" | "ViewContent" | "OrderCreated" | "OrderShipped" | "OrderDelivered" | "OrderCanceled" | "OrderReturned" | "CartAbandoned" | "QualifiedLead" | "RatingProvided" | "ReviewProvided" | null;
225130
+ /** @enum {string|null} */
225131
+ seller_deal_closed?: "Purchase" | "LeadSubmitted" | "InitiateCheckout" | "AddToCart" | "ViewContent" | "OrderCreated" | "OrderShipped" | "OrderDelivered" | "OrderCanceled" | "OrderReturned" | "CartAbandoned" | "QualifiedLead" | "RatingProvided" | "ReviewProvided" | null;
225132
+ };
225133
+ /** @description Stages whose choice is dropped: they go back to the matrix's name (`messaging_default`). Applied before `overrides`. */
225134
+ reset?: ("lead_created" | "lead_qualified" | "appointment_booked" | "checkout_started" | "deposit_paid" | "appointment_attended" | "quote_presented" | "closed_won" | "first_payment" | "returning_first_payment" | "payment_received" | "seller_qualified" | "seller_visit_booked" | "seller_deal_closed")[];
225135
+ };
224563
225136
  AdsMetaDatasetStatus: {
224564
225137
  prerequisites: {
224565
225138
  meta_ads_connected: boolean | null;