@vitrina/api 17.7.1 → 17.8.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
@@ -145079,8 +145079,22 @@ interface paths {
145079
145079
  aiReplied?: boolean | null;
145080
145080
  fromAd?: boolean | null;
145081
145081
  fromCampaign?: boolean | null;
145082
- /** @description true: only conversations where a customer is waiting on a human («Esperando respuesta»), team-wide. Waiting = open or pending, not filtered, on a channel you can reply in, and either an AI handoff nobody on the team has answered yet (a reply from ANY teammate clears it, including WhatsApp Business / Instagram app replies; a silent «Visita acordada» notice needs no answer) or a human-handled thread whose last message is the customer’s; waits older than 7 days are left out; and what the customer wrote still asks for a reply: a thread whose newest unanswered customer message was judged, with high confidence, as the customer closing the chat («ok», «gracias», 👍 after we answered) or owing nothing, a customer who paid (a transfer receipt after our bank details) or is at the store («llegué», «voy subiendo»), or a follow-up we promised for a later day that is not due yet, is left out (any other open promise of ours always stays); a customer who announced a store visit («mañana paso», «el martes voy») waits through that day and is left out once it is over with nothing newer from them (`visit_passed`: a «Recordatorio acordado» to check whether they came falls due the next morning). `closed`: exactly those left-out threads, still live (not resolved) — `waiting_state` says why (`closed_by_customer` | `nothing_owed` | `paid_or_in_store` | `promised_later` | `visit_passed`), `waiting_due_at` when a promised follow-up or the visit reminder falls due. Each row carries `waiting_since`, `waiting_state`, `waiting_due_at` and `waiting_subject_id` (the message, or handoff event, the wait is about — `POST /conversations/{id}/no-reply-needed` takes it as `subject_id`). Pair with `sort=wait` for the queue order. */
145082
+ /** @description true: only conversations where a customer is waiting on a human («Esperando respuesta»), team-wide. Waiting = open or pending, not filtered, on a channel you can reply in, and either an AI handoff nobody on the team has answered yet (a reply from ANY teammate clears it, including WhatsApp Business / Instagram app replies; a silent «Visita acordada» notice needs no answer) or a human-handled thread whose last message is the customer’s; waits older than 7 days are left out; and what the customer wrote still asks for a reply: a thread whose newest unanswered customer message was judged, with high confidence, as the customer closing the chat («ok», «gracias», 👍 after we answered) or owing nothing, a customer who paid (a transfer receipt after our bank details) or is at the store («llegué», «voy subiendo»), or a follow-up we promised for a later day that is not due yet, is left out (any other open promise of ours always stays); a customer who announced a store visit («mañana paso», «el martes voy») waits through that day and is left out once it is over with nothing newer from them (`visit_passed`: a «Recordatorio acordado» to check whether they came falls due the next morning). `closed`: exactly those left-out threads, still live (not resolved) — `waiting_state` says why (`closed_by_customer` | `nothing_owed` | `paid_or_in_store` | `promised_later` | `visit_passed`), `waiting_due_at` when a promised follow-up or the visit reminder falls due. Each row carries `waiting_since`, `waiting_state`, `waiting_due_at` and `waiting_subject_id` (the message, or handoff event, the wait is about — `POST /conversations/{id}/no-reply-needed` takes it as `subject_id`). Pair with `sort=wait` for the queue order. Conversations matching a workspace inbox view with «Sacar de Esperando respuesta» (`exclude_from_waiting`) are left out of `waiting=true` (and of the `waiting` count) unless the request names that view with `viewId`; they keep their `waiting_since`. An urgent (`handoff_urgent`) thread is never left out. */
145083
145083
  waiting?: boolean | "closed" | null;
145084
+ /** @description Conversation-attribute condition(s) — what the AI agent recorded with `add_metadata` or a person set (`conversation_attribute`). Format `<key>:<op>:<value>`, `op` = `contains` | `equals` (`<key>:<value>` reads as `contains`); repeat the parameter to AND several. Case- and accent-insensitive («18 pro máx» matches «18 Pro Max»), on the stored value as text (a string without its JSON quotes). Key `*` matches the value under ANY attribute key. Examples: `attribute=modelo_buscado:contains:18 pro max`, `attribute=*:contains:18 pro max`. Keys and their common values: `GET /inbox-views/attribute-keys`. */
145085
+ attribute?: {
145086
+ key: string;
145087
+ /**
145088
+ * @default contains
145089
+ * @enum {string}
145090
+ */
145091
+ op?: "contains" | "equals";
145092
+ value: string;
145093
+ }[] | null;
145094
+ /** @description Only conversations carrying ANY of these tags (`GET /tags` ids), comma-separated or repeated; at most 20. */
145095
+ tagIds?: string[] | null;
145096
+ /** @description Apply a saved inbox view (`GET /inbox-views`): its filters are ANDed with every other parameter here, and its `waiting` (if any) applies when `waiting` is not given. A workspace view, or one of your own personal views; any other id is a 404. A view with «Sacar de Esperando respuesta» still lists its matches (with their `waiting_since`) — the exclusion only applies to `waiting=true` WITHOUT a `viewId`. */
145097
+ viewId?: string;
145084
145098
  /** @description `wait`: urgent (`handoff_urgent`) first, then by `waiting_since` — `order=desc` (default) is the longest wait first, `asc` the newest; conversations that are not waiting go last. */
145085
145099
  sort?: "created_at" | "updated_at" | "last_message_date" | "wait";
145086
145100
  order?: "asc" | "desc";
@@ -145658,7 +145672,7 @@ interface paths {
145658
145672
  * Inbox badge counts (my open / unread / mentions / unassigned / waiting)
145659
145673
  * @description The four badge counts on their own, scoped to the calling principal: `myOpen` and `myUnread` are the conversations assigned to the member behind the credential, `myMentions` the ones that @-mention them, `unassigned` the whole workspace’s unowned queue. An API key has no member behind it, so its three "my" counts read 0 and only `unassigned` is meaningful — use a personal token to get a person’s badges.
145660
145674
  *
145661
- * «Esperando respuesta» (the waiting queue): `waiting` is how many conversations have a customer waiting on a human, team-wide (the list `GET /conversations?waiting=true` returns exactly these); `waitingUrgent` how many of them are flagged urgent; `waitingMine` how many are assigned to the caller (0 for an API key); `waitingOldestSince` when the longest wait started (ISO, `null` when nobody waits) — render it as «el más antiguo 2 h»; `waitingClosed` how many live threads were left out because the customer closed the chat, nothing is owed, they paid or are in the store, or a follow-up we promised is not due yet (the list `waiting=closed`).
145675
+ * «Esperando respuesta» (the waiting queue): `waiting` is how many conversations have a customer waiting on a human, team-wide (the list `GET /conversations?waiting=true` returns exactly these); `waitingUrgent` how many of them are flagged urgent; `waitingMine` how many are assigned to the caller (0 for an API key); `waitingOldestSince` when the longest wait started (ISO, `null` when nobody waits) — render it as «el más antiguo 2 h»; `waitingClosed` how many live threads were left out because the customer closed the chat, nothing is owed, they paid or are in the store, or a follow-up we promised is not due yet (the list `waiting=closed`); `waitingExcluded` how many waiting conversations a workspace view with «Sacar de Esperando respuesta» (`exclude_from_waiting`) took out of `waiting` — they are not in the queue, the banner or the urgent / mine / oldest figures, and they wait in their view (an urgent `handoff_urgent` thread is never taken out) (`GET /inbox-views` gives each view its `waiting_count`).
145662
145676
  *
145663
145677
  * `GET /conversations?include=counts` returns the same payload beside a page of conversations; this route exists for the caller that wants the badges without one.
145664
145678
  */
@@ -145688,7 +145702,8 @@ interface paths {
145688
145702
  * "waitingUrgent": 1,
145689
145703
  * "waitingMine": 1,
145690
145704
  * "waitingOldestSince": "2026-10-31T13:05:00.000Z",
145691
- * "waitingClosed": 4
145705
+ * "waitingClosed": 4,
145706
+ * "waitingExcluded": 0
145692
145707
  * }
145693
145708
  * }
145694
145709
  */
@@ -217047,7 +217062,7 @@ interface paths {
217047
217062
  patch?: never;
217048
217063
  trace?: never;
217049
217064
  };
217050
- "/voice-clips": {
217065
+ "/inbox-views": {
217051
217066
  parameters: {
217052
217067
  query?: never;
217053
217068
  header?: never;
@@ -217055,22 +217070,15 @@ interface paths {
217055
217070
  cookie?: never;
217056
217071
  };
217057
217072
  /**
217058
- * List voice clips
217059
- * @description **Deprecated** — use `/media-assets` (voice clips are its audio files, same ids).
217060
- *
217061
- * Every clip in the workspace library, newest first, expired ones included and marked `expired: true`.
217073
+ * List the inbox views you see, with their counts
217074
+ * @description The workspace views (position order), then your personal views. A view: `{ id, name, scope: workspace|personal, owner_user_id, filters, exclude_from_waiting, position, created_by, created_at, updated_at, editable }` — `editable` says whether the caller may change it.
217062
217075
  *
217063
- * With `live=true` the answer is only the clips that may be SENT now: not expired, and whose model filter is empty or names `model` (case- and whitespace-insensitive). Without `model`, only clips with no model filter qualify. `tag` (comma-separated) keeps clips carrying any of the tags.
217076
+ * Each view carries `count` — exactly the total of `GET /conversations?viewId=<id>` for you (your row visibility applies) — and `waiting_count`, how many of its matches have a customer waiting on a human (the sidebar badge of a view with `exclude_from_waiting`). `counts=false` skips both.
217064
217077
  */
217065
217078
  get: {
217066
217079
  parameters: {
217067
217080
  query?: {
217068
- /** @description `true` = only the clips that may be sent now: not expired and admitted by `model`. */
217069
- live?: "true" | "false";
217070
- /** @description With `live=true`: the model under discussion. Without it only clips with no model filter qualify. */
217071
- model?: string;
217072
- /** @description With `live=true`: comma-separated tags; a clip qualifies when it carries any. */
217073
- tag?: string;
217081
+ counts?: boolean | null;
217074
217082
  };
217075
217083
  header?: never;
217076
217084
  path?: never;
@@ -217078,39 +217086,820 @@ interface paths {
217078
217086
  };
217079
217087
  requestBody?: never;
217080
217088
  responses: {
217081
- /** @description Voice clips */
217089
+ /** @description Inbox views */
217082
217090
  200: {
217083
217091
  headers: {
217084
217092
  [name: string]: unknown;
217085
217093
  };
217086
217094
  content: {
217087
217095
  /**
217088
- * @example [
217089
- * {
217090
- * "id": "6b0f3c1e-2a4d-4f7e-9b1a-0c2d3e4f5a6b",
217091
- * "name": "Garantía 6 meses",
217092
- * "tags": [
217093
- * "garantia",
217094
- * "cierre"
217095
- * ],
217096
- * "when_to_use": "Cuando el cliente pregunta por la garantía de un seminuevo.",
217097
- * "expires_at": null,
217098
- * "expired": false,
217099
- * "models": [
217100
- * "iPhone 13",
217101
- * "iPhone 13 Pro",
217102
- * "iPhone 14"
217103
- * ],
217104
- * "transcript": "Hola, te cuento que todos nuestros equipos tienen seis meses de garantía.",
217105
- * "mime_type": "audio/ogg",
217106
- * "byte_size": 48213,
217107
- * "duration_ms": 12480,
217108
- * "original_filename": "garantia.ogg",
217109
- * "created_by": "2f1e0d9c-8b7a-4c6d-9e5f-1a2b3c4d5e6f",
217110
- * "created_at": "2026-10-28T15:04:05.000Z",
217111
- * "updated_at": "2026-10-28T15:04:05.000Z"
217096
+ * @example {
217097
+ * "data": [
217098
+ * {
217099
+ * "id": "6a1f0c7e-3b8d-4e52-9a51-0c2d7b1e9f44",
217100
+ * "name": "Piden 18 Pro Max",
217101
+ * "scope": "workspace",
217102
+ * "owner_user_id": null,
217103
+ * "filters": {
217104
+ * "active": true,
217105
+ * "attributes": [
217106
+ * {
217107
+ * "key": "*",
217108
+ * "op": "contains",
217109
+ * "value": "18 pro max"
217110
+ * }
217111
+ * ]
217112
+ * },
217113
+ * "exclude_from_waiting": true,
217114
+ * "position": 0,
217115
+ * "created_by": "0b9e2f4a-8c1d-4f37-b6a2-5d3e7c9a1b20",
217116
+ * "created_at": "2026-11-04T12:00:00.000Z",
217117
+ * "updated_at": "2026-11-04T12:00:00.000Z",
217118
+ * "editable": true,
217119
+ * "count": 21,
217120
+ * "waiting_count": 15
217121
+ * }
217122
+ * ]
217123
+ * }
217124
+ */
217125
+ "application/json": {
217126
+ data?: unknown;
217127
+ meta?: {
217128
+ [key: string]: unknown;
217129
+ };
217130
+ };
217131
+ };
217132
+ };
217133
+ /** @description Validation error */
217134
+ 400: {
217135
+ headers: {
217136
+ [name: string]: unknown;
217137
+ };
217138
+ content: {
217139
+ "application/json": components["schemas"]["Error"];
217140
+ };
217141
+ };
217142
+ /** @description Unauthorized */
217143
+ 401: {
217144
+ headers: {
217145
+ [name: string]: unknown;
217146
+ };
217147
+ content: {
217148
+ "application/json": components["schemas"]["Error"];
217149
+ };
217150
+ };
217151
+ /** @description Forbidden */
217152
+ 403: {
217153
+ headers: {
217154
+ [name: string]: unknown;
217155
+ };
217156
+ content: {
217157
+ "application/json": components["schemas"]["Error"];
217158
+ };
217159
+ };
217160
+ /** @description Not found */
217161
+ 404: {
217162
+ headers: {
217163
+ [name: string]: unknown;
217164
+ };
217165
+ content: {
217166
+ "application/json": components["schemas"]["Error"];
217167
+ };
217168
+ };
217169
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
217170
+ 409: {
217171
+ headers: {
217172
+ [name: string]: unknown;
217173
+ };
217174
+ content: {
217175
+ "application/json": components["schemas"]["Error"];
217176
+ };
217177
+ };
217178
+ /** @description Rate limited */
217179
+ 429: {
217180
+ headers: {
217181
+ [name: string]: unknown;
217182
+ };
217183
+ content: {
217184
+ "application/json": components["schemas"]["Error"];
217185
+ };
217186
+ };
217187
+ };
217188
+ };
217189
+ put?: never;
217190
+ /**
217191
+ * Create an inbox view
217192
+ * @description `scope: personal` (the default) is yours alone; `scope: workspace` is the whole team’s and needs `routing:write` (a workspace admin). `filters` takes the `InboxViewFilters` subset of `GET /conversations` filters and needs at least one criterion besides `waiting`. An attribute condition `{ key, op, value }` compares the value case- and accent-insensitively; `key: "*"` matches it under any attribute key (one view for `modelo_buscado` and `handoff.reason` alike). `exclude_from_waiting: true` («Sacar de Esperando respuesta») is refused (400) on a personal view; on a workspace view it never takes out an urgent (`handoff_urgent`) thread. A name already used in the same scope (case-insensitive) is a 409. At most 50 views per scope. Answers 201 with the view.
217193
+ */
217194
+ post: {
217195
+ parameters: {
217196
+ query?: never;
217197
+ header?: {
217198
+ /** @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. */
217199
+ "Idempotency-Key"?: string;
217200
+ };
217201
+ path?: never;
217202
+ cookie?: never;
217203
+ };
217204
+ requestBody?: {
217205
+ content: {
217206
+ /**
217207
+ * @example {
217208
+ * "name": "Piden 18 Pro Max",
217209
+ * "scope": "workspace",
217210
+ * "filters": {
217211
+ * "active": true,
217212
+ * "attributes": [
217213
+ * {
217214
+ * "key": "*",
217215
+ * "op": "contains",
217216
+ * "value": "18 pro max"
217217
+ * }
217218
+ * ]
217219
+ * },
217220
+ * "exclude_from_waiting": true
217221
+ * }
217222
+ */
217223
+ "application/json": {
217224
+ name: string;
217225
+ /**
217226
+ * @default personal
217227
+ * @enum {string}
217228
+ */
217229
+ scope?: "workspace" | "personal";
217230
+ filters: components["schemas"]["InboxViewFilters"];
217231
+ /** @default false */
217232
+ exclude_from_waiting?: boolean;
217233
+ };
217234
+ };
217235
+ };
217236
+ responses: {
217237
+ /** @description The created view */
217238
+ 201: {
217239
+ headers: {
217240
+ [name: string]: unknown;
217241
+ };
217242
+ content: {
217243
+ /**
217244
+ * @example {
217245
+ * "data": {
217246
+ * "id": "6a1f0c7e-3b8d-4e52-9a51-0c2d7b1e9f44",
217247
+ * "name": "Piden 18 Pro Max",
217248
+ * "scope": "workspace",
217249
+ * "owner_user_id": null,
217250
+ * "filters": {
217251
+ * "active": true,
217252
+ * "attributes": [
217253
+ * {
217254
+ * "key": "*",
217255
+ * "op": "contains",
217256
+ * "value": "18 pro max"
217257
+ * }
217258
+ * ]
217259
+ * },
217260
+ * "exclude_from_waiting": true,
217261
+ * "position": 0,
217262
+ * "created_by": "0b9e2f4a-8c1d-4f37-b6a2-5d3e7c9a1b20",
217263
+ * "created_at": "2026-11-04T12:00:00.000Z",
217264
+ * "updated_at": "2026-11-04T12:00:00.000Z",
217265
+ * "editable": true,
217266
+ * "count": 21,
217267
+ * "waiting_count": 15
217112
217268
  * }
217113
- * ]
217269
+ * }
217270
+ */
217271
+ "application/json": {
217272
+ data?: unknown;
217273
+ };
217274
+ };
217275
+ };
217276
+ /** @description Validation error */
217277
+ 400: {
217278
+ headers: {
217279
+ [name: string]: unknown;
217280
+ };
217281
+ content: {
217282
+ "application/json": components["schemas"]["Error"];
217283
+ };
217284
+ };
217285
+ /** @description Unauthorized */
217286
+ 401: {
217287
+ headers: {
217288
+ [name: string]: unknown;
217289
+ };
217290
+ content: {
217291
+ "application/json": components["schemas"]["Error"];
217292
+ };
217293
+ };
217294
+ /** @description Forbidden */
217295
+ 403: {
217296
+ headers: {
217297
+ [name: string]: unknown;
217298
+ };
217299
+ content: {
217300
+ "application/json": components["schemas"]["Error"];
217301
+ };
217302
+ };
217303
+ /** @description Not found */
217304
+ 404: {
217305
+ headers: {
217306
+ [name: string]: unknown;
217307
+ };
217308
+ content: {
217309
+ "application/json": components["schemas"]["Error"];
217310
+ };
217311
+ };
217312
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
217313
+ 409: {
217314
+ headers: {
217315
+ [name: string]: unknown;
217316
+ };
217317
+ content: {
217318
+ "application/json": components["schemas"]["Error"];
217319
+ };
217320
+ };
217321
+ /** @description Rate limited */
217322
+ 429: {
217323
+ headers: {
217324
+ [name: string]: unknown;
217325
+ };
217326
+ content: {
217327
+ "application/json": components["schemas"]["Error"];
217328
+ };
217329
+ };
217330
+ };
217331
+ };
217332
+ delete?: never;
217333
+ options?: never;
217334
+ head?: never;
217335
+ patch?: never;
217336
+ trace?: never;
217337
+ };
217338
+ "/inbox-views/attribute-keys": {
217339
+ parameters: {
217340
+ query?: never;
217341
+ header?: never;
217342
+ path?: never;
217343
+ cookie?: never;
217344
+ };
217345
+ /**
217346
+ * Conversation-attribute keys and their common values
217347
+ * @description The workspace’s conversation-attribute keys (what the AI agent recorded with `add_metadata`, or a person set), most used first, each with `count` (conversations carrying it) and `top_values` — the `top` most frequent scalar values, cut to 120 characters — for a view editor’s picker. `key` narrows to one key.
217348
+ */
217349
+ get: {
217350
+ parameters: {
217351
+ query?: {
217352
+ key?: string;
217353
+ limit?: number;
217354
+ top?: number | null;
217355
+ };
217356
+ header?: never;
217357
+ path?: never;
217358
+ cookie?: never;
217359
+ };
217360
+ requestBody?: never;
217361
+ responses: {
217362
+ /** @description Attribute keys */
217363
+ 200: {
217364
+ headers: {
217365
+ [name: string]: unknown;
217366
+ };
217367
+ content: {
217368
+ /**
217369
+ * @example {
217370
+ * "data": [
217371
+ * {
217372
+ * "key": "modelo",
217373
+ * "count": 1334,
217374
+ * "top_values": [
217375
+ * {
217376
+ * "value": "iPhone 18 Pro 256 GB",
217377
+ * "count": 72
217378
+ * },
217379
+ * {
217380
+ * "value": "iPhone 18 Pro Max",
217381
+ * "count": 26
217382
+ * }
217383
+ * ]
217384
+ * }
217385
+ * ]
217386
+ * }
217387
+ */
217388
+ "application/json": {
217389
+ data?: unknown;
217390
+ meta?: {
217391
+ [key: string]: unknown;
217392
+ };
217393
+ };
217394
+ };
217395
+ };
217396
+ /** @description Validation error */
217397
+ 400: {
217398
+ headers: {
217399
+ [name: string]: unknown;
217400
+ };
217401
+ content: {
217402
+ "application/json": components["schemas"]["Error"];
217403
+ };
217404
+ };
217405
+ /** @description Unauthorized */
217406
+ 401: {
217407
+ headers: {
217408
+ [name: string]: unknown;
217409
+ };
217410
+ content: {
217411
+ "application/json": components["schemas"]["Error"];
217412
+ };
217413
+ };
217414
+ /** @description Forbidden */
217415
+ 403: {
217416
+ headers: {
217417
+ [name: string]: unknown;
217418
+ };
217419
+ content: {
217420
+ "application/json": components["schemas"]["Error"];
217421
+ };
217422
+ };
217423
+ /** @description Not found */
217424
+ 404: {
217425
+ headers: {
217426
+ [name: string]: unknown;
217427
+ };
217428
+ content: {
217429
+ "application/json": components["schemas"]["Error"];
217430
+ };
217431
+ };
217432
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
217433
+ 409: {
217434
+ headers: {
217435
+ [name: string]: unknown;
217436
+ };
217437
+ content: {
217438
+ "application/json": components["schemas"]["Error"];
217439
+ };
217440
+ };
217441
+ /** @description Rate limited */
217442
+ 429: {
217443
+ headers: {
217444
+ [name: string]: unknown;
217445
+ };
217446
+ content: {
217447
+ "application/json": components["schemas"]["Error"];
217448
+ };
217449
+ };
217450
+ };
217451
+ };
217452
+ put?: never;
217453
+ post?: never;
217454
+ delete?: never;
217455
+ options?: never;
217456
+ head?: never;
217457
+ patch?: never;
217458
+ trace?: never;
217459
+ };
217460
+ "/inbox-views/reorder": {
217461
+ parameters: {
217462
+ query?: never;
217463
+ header?: never;
217464
+ path?: never;
217465
+ cookie?: never;
217466
+ };
217467
+ get?: never;
217468
+ put?: never;
217469
+ /**
217470
+ * Reorder inbox views
217471
+ * @description Sets each listed view’s `position` to its index in `ids`. All ids must be views of `scope` that you write (workspace: `routing:write`; personal: your own); views left out keep their position. Answers the views you see, in their new order.
217472
+ */
217473
+ post: {
217474
+ parameters: {
217475
+ query?: never;
217476
+ header?: {
217477
+ /** @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. */
217478
+ "Idempotency-Key"?: string;
217479
+ };
217480
+ path?: never;
217481
+ cookie?: never;
217482
+ };
217483
+ requestBody?: {
217484
+ content: {
217485
+ "application/json": {
217486
+ /** @enum {string} */
217487
+ scope: "workspace" | "personal";
217488
+ ids: string[];
217489
+ };
217490
+ };
217491
+ };
217492
+ responses: {
217493
+ /** @description Inbox views, reordered */
217494
+ 200: {
217495
+ headers: {
217496
+ [name: string]: unknown;
217497
+ };
217498
+ content: {
217499
+ "application/json": {
217500
+ data?: unknown;
217501
+ meta?: {
217502
+ [key: string]: unknown;
217503
+ };
217504
+ };
217505
+ };
217506
+ };
217507
+ /** @description Validation error */
217508
+ 400: {
217509
+ headers: {
217510
+ [name: string]: unknown;
217511
+ };
217512
+ content: {
217513
+ "application/json": components["schemas"]["Error"];
217514
+ };
217515
+ };
217516
+ /** @description Unauthorized */
217517
+ 401: {
217518
+ headers: {
217519
+ [name: string]: unknown;
217520
+ };
217521
+ content: {
217522
+ "application/json": components["schemas"]["Error"];
217523
+ };
217524
+ };
217525
+ /** @description Forbidden */
217526
+ 403: {
217527
+ headers: {
217528
+ [name: string]: unknown;
217529
+ };
217530
+ content: {
217531
+ "application/json": components["schemas"]["Error"];
217532
+ };
217533
+ };
217534
+ /** @description Not found */
217535
+ 404: {
217536
+ headers: {
217537
+ [name: string]: unknown;
217538
+ };
217539
+ content: {
217540
+ "application/json": components["schemas"]["Error"];
217541
+ };
217542
+ };
217543
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
217544
+ 409: {
217545
+ headers: {
217546
+ [name: string]: unknown;
217547
+ };
217548
+ content: {
217549
+ "application/json": components["schemas"]["Error"];
217550
+ };
217551
+ };
217552
+ /** @description Rate limited */
217553
+ 429: {
217554
+ headers: {
217555
+ [name: string]: unknown;
217556
+ };
217557
+ content: {
217558
+ "application/json": components["schemas"]["Error"];
217559
+ };
217560
+ };
217561
+ };
217562
+ };
217563
+ delete?: never;
217564
+ options?: never;
217565
+ head?: never;
217566
+ patch?: never;
217567
+ trace?: never;
217568
+ };
217569
+ "/inbox-views/{id}": {
217570
+ parameters: {
217571
+ query?: never;
217572
+ header?: never;
217573
+ path?: never;
217574
+ cookie?: never;
217575
+ };
217576
+ /**
217577
+ * Fetch one inbox view
217578
+ * @description A view: `{ id, name, scope: workspace|personal, owner_user_id, filters, exclude_from_waiting, position, created_by, created_at, updated_at, editable }` — `editable` says whether the caller may change it. Another member’s personal view is a 404.
217579
+ */
217580
+ get: {
217581
+ parameters: {
217582
+ query?: never;
217583
+ header?: never;
217584
+ path: {
217585
+ id: string;
217586
+ };
217587
+ cookie?: never;
217588
+ };
217589
+ requestBody?: never;
217590
+ responses: {
217591
+ /** @description The view */
217592
+ 200: {
217593
+ headers: {
217594
+ [name: string]: unknown;
217595
+ };
217596
+ content: {
217597
+ "application/json": {
217598
+ data?: unknown;
217599
+ meta?: {
217600
+ [key: string]: unknown;
217601
+ };
217602
+ };
217603
+ };
217604
+ };
217605
+ /** @description Validation error */
217606
+ 400: {
217607
+ headers: {
217608
+ [name: string]: unknown;
217609
+ };
217610
+ content: {
217611
+ "application/json": components["schemas"]["Error"];
217612
+ };
217613
+ };
217614
+ /** @description Unauthorized */
217615
+ 401: {
217616
+ headers: {
217617
+ [name: string]: unknown;
217618
+ };
217619
+ content: {
217620
+ "application/json": components["schemas"]["Error"];
217621
+ };
217622
+ };
217623
+ /** @description Forbidden */
217624
+ 403: {
217625
+ headers: {
217626
+ [name: string]: unknown;
217627
+ };
217628
+ content: {
217629
+ "application/json": components["schemas"]["Error"];
217630
+ };
217631
+ };
217632
+ /** @description Not found */
217633
+ 404: {
217634
+ headers: {
217635
+ [name: string]: unknown;
217636
+ };
217637
+ content: {
217638
+ "application/json": components["schemas"]["Error"];
217639
+ };
217640
+ };
217641
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
217642
+ 409: {
217643
+ headers: {
217644
+ [name: string]: unknown;
217645
+ };
217646
+ content: {
217647
+ "application/json": components["schemas"]["Error"];
217648
+ };
217649
+ };
217650
+ /** @description Rate limited */
217651
+ 429: {
217652
+ headers: {
217653
+ [name: string]: unknown;
217654
+ };
217655
+ content: {
217656
+ "application/json": components["schemas"]["Error"];
217657
+ };
217658
+ };
217659
+ };
217660
+ };
217661
+ put?: never;
217662
+ post?: never;
217663
+ /**
217664
+ * Delete an inbox view
217665
+ * @description Deletes the view (never a conversation). A view with `exclude_from_waiting` puts its matches back in «Esperando respuesta». Answers 204.
217666
+ */
217667
+ delete: {
217668
+ parameters: {
217669
+ query?: never;
217670
+ header?: never;
217671
+ path: {
217672
+ id: string;
217673
+ };
217674
+ cookie?: never;
217675
+ };
217676
+ requestBody?: never;
217677
+ responses: {
217678
+ /** @description No content */
217679
+ 204: {
217680
+ headers: {
217681
+ [name: string]: unknown;
217682
+ };
217683
+ content?: never;
217684
+ };
217685
+ /** @description Validation error */
217686
+ 400: {
217687
+ headers: {
217688
+ [name: string]: unknown;
217689
+ };
217690
+ content: {
217691
+ "application/json": components["schemas"]["Error"];
217692
+ };
217693
+ };
217694
+ /** @description Unauthorized */
217695
+ 401: {
217696
+ headers: {
217697
+ [name: string]: unknown;
217698
+ };
217699
+ content: {
217700
+ "application/json": components["schemas"]["Error"];
217701
+ };
217702
+ };
217703
+ /** @description Forbidden */
217704
+ 403: {
217705
+ headers: {
217706
+ [name: string]: unknown;
217707
+ };
217708
+ content: {
217709
+ "application/json": components["schemas"]["Error"];
217710
+ };
217711
+ };
217712
+ /** @description Not found */
217713
+ 404: {
217714
+ headers: {
217715
+ [name: string]: unknown;
217716
+ };
217717
+ content: {
217718
+ "application/json": components["schemas"]["Error"];
217719
+ };
217720
+ };
217721
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
217722
+ 409: {
217723
+ headers: {
217724
+ [name: string]: unknown;
217725
+ };
217726
+ content: {
217727
+ "application/json": components["schemas"]["Error"];
217728
+ };
217729
+ };
217730
+ /** @description Rate limited */
217731
+ 429: {
217732
+ headers: {
217733
+ [name: string]: unknown;
217734
+ };
217735
+ content: {
217736
+ "application/json": components["schemas"]["Error"];
217737
+ };
217738
+ };
217739
+ };
217740
+ };
217741
+ options?: never;
217742
+ head?: never;
217743
+ /**
217744
+ * Update an inbox view
217745
+ * @description Any of `name`, `filters` (replaced whole), `exclude_from_waiting`, `position`. Same rules as create; the scope cannot change. Turning `exclude_from_waiting` off puts the matches back in «Esperando respuesta» on the next read.
217746
+ */
217747
+ patch: {
217748
+ parameters: {
217749
+ query?: never;
217750
+ header?: never;
217751
+ path: {
217752
+ id: string;
217753
+ };
217754
+ cookie?: never;
217755
+ };
217756
+ requestBody?: {
217757
+ content: {
217758
+ "application/json": {
217759
+ name?: string;
217760
+ filters?: components["schemas"]["InboxViewFilters"];
217761
+ exclude_from_waiting?: boolean;
217762
+ position?: number;
217763
+ };
217764
+ };
217765
+ };
217766
+ responses: {
217767
+ /** @description The updated view */
217768
+ 200: {
217769
+ headers: {
217770
+ [name: string]: unknown;
217771
+ };
217772
+ content: {
217773
+ "application/json": {
217774
+ data?: unknown;
217775
+ meta?: {
217776
+ [key: string]: unknown;
217777
+ };
217778
+ };
217779
+ };
217780
+ };
217781
+ /** @description Validation error */
217782
+ 400: {
217783
+ headers: {
217784
+ [name: string]: unknown;
217785
+ };
217786
+ content: {
217787
+ "application/json": components["schemas"]["Error"];
217788
+ };
217789
+ };
217790
+ /** @description Unauthorized */
217791
+ 401: {
217792
+ headers: {
217793
+ [name: string]: unknown;
217794
+ };
217795
+ content: {
217796
+ "application/json": components["schemas"]["Error"];
217797
+ };
217798
+ };
217799
+ /** @description Forbidden */
217800
+ 403: {
217801
+ headers: {
217802
+ [name: string]: unknown;
217803
+ };
217804
+ content: {
217805
+ "application/json": components["schemas"]["Error"];
217806
+ };
217807
+ };
217808
+ /** @description Not found */
217809
+ 404: {
217810
+ headers: {
217811
+ [name: string]: unknown;
217812
+ };
217813
+ content: {
217814
+ "application/json": components["schemas"]["Error"];
217815
+ };
217816
+ };
217817
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
217818
+ 409: {
217819
+ headers: {
217820
+ [name: string]: unknown;
217821
+ };
217822
+ content: {
217823
+ "application/json": components["schemas"]["Error"];
217824
+ };
217825
+ };
217826
+ /** @description Rate limited */
217827
+ 429: {
217828
+ headers: {
217829
+ [name: string]: unknown;
217830
+ };
217831
+ content: {
217832
+ "application/json": components["schemas"]["Error"];
217833
+ };
217834
+ };
217835
+ };
217836
+ };
217837
+ trace?: never;
217838
+ };
217839
+ "/voice-clips": {
217840
+ parameters: {
217841
+ query?: never;
217842
+ header?: never;
217843
+ path?: never;
217844
+ cookie?: never;
217845
+ };
217846
+ /**
217847
+ * List voice clips
217848
+ * @description **Deprecated** — use `/media-assets` (voice clips are its audio files, same ids).
217849
+ *
217850
+ * Every clip in the workspace library, newest first, expired ones included and marked `expired: true`.
217851
+ *
217852
+ * With `live=true` the answer is only the clips that may be SENT now: not expired, and whose model filter is empty or names `model` (case- and whitespace-insensitive). Without `model`, only clips with no model filter qualify. `tag` (comma-separated) keeps clips carrying any of the tags.
217853
+ */
217854
+ get: {
217855
+ parameters: {
217856
+ query?: {
217857
+ /** @description `true` = only the clips that may be sent now: not expired and admitted by `model`. */
217858
+ live?: "true" | "false";
217859
+ /** @description With `live=true`: the model under discussion. Without it only clips with no model filter qualify. */
217860
+ model?: string;
217861
+ /** @description With `live=true`: comma-separated tags; a clip qualifies when it carries any. */
217862
+ tag?: string;
217863
+ };
217864
+ header?: never;
217865
+ path?: never;
217866
+ cookie?: never;
217867
+ };
217868
+ requestBody?: never;
217869
+ responses: {
217870
+ /** @description Voice clips */
217871
+ 200: {
217872
+ headers: {
217873
+ [name: string]: unknown;
217874
+ };
217875
+ content: {
217876
+ /**
217877
+ * @example [
217878
+ * {
217879
+ * "id": "6b0f3c1e-2a4d-4f7e-9b1a-0c2d3e4f5a6b",
217880
+ * "name": "Garantía 6 meses",
217881
+ * "tags": [
217882
+ * "garantia",
217883
+ * "cierre"
217884
+ * ],
217885
+ * "when_to_use": "Cuando el cliente pregunta por la garantía de un seminuevo.",
217886
+ * "expires_at": null,
217887
+ * "expired": false,
217888
+ * "models": [
217889
+ * "iPhone 13",
217890
+ * "iPhone 13 Pro",
217891
+ * "iPhone 14"
217892
+ * ],
217893
+ * "transcript": "Hola, te cuento que todos nuestros equipos tienen seis meses de garantía.",
217894
+ * "mime_type": "audio/ogg",
217895
+ * "byte_size": 48213,
217896
+ * "duration_ms": 12480,
217897
+ * "original_filename": "garantia.ogg",
217898
+ * "created_by": "2f1e0d9c-8b7a-4c6d-9e5f-1a2b3c4d5e6f",
217899
+ * "created_at": "2026-10-28T15:04:05.000Z",
217900
+ * "updated_at": "2026-10-28T15:04:05.000Z"
217901
+ * }
217902
+ * ]
217114
217903
  */
217115
217904
  "application/json": {
217116
217905
  data?: unknown;
@@ -288539,6 +289328,50 @@ interface components {
288539
289328
  text_hash: string;
288540
289329
  };
288541
289330
  };
289331
+ /**
289332
+ * @description A subset of `GET /conversations` filters, same names and meaning. `attributes` are ANDed (`{ key, op: contains|equals, value }`, case- and accent-insensitive on the stored value as text; `key: "*"` matches the value under ANY attribute key); `tagIds` matches ANY of the tags; `waiting: true` lists only the matches a customer is waiting on (`closed`: the ones left out of the queue). At least one criterion other than `waiting` is required.
289333
+ * @example {
289334
+ * "attributes": [
289335
+ * {
289336
+ * "key": "*",
289337
+ * "op": "contains",
289338
+ * "value": "18 pro max"
289339
+ * }
289340
+ * ],
289341
+ * "active": true
289342
+ * }
289343
+ */
289344
+ InboxViewFilters: {
289345
+ channel?: string;
289346
+ /** Format: uuid */
289347
+ messagingAccountId?: string;
289348
+ /** @enum {string} */
289349
+ source?: "conversation" | "marketplace" | "manual" | "import" | "ai_agent" | "chileautos" | "yapo" | "mercadolibre" | "website";
289350
+ /** @enum {string} */
289351
+ convStatus?: "open" | "pending" | "snoozed" | "resolved" | "closed";
289352
+ active?: boolean;
289353
+ /** @enum {string} */
289354
+ handler?: "bot" | "human" | "external";
289355
+ /** Format: uuid */
289356
+ assigneeUserId?: string;
289357
+ unassigned?: boolean;
289358
+ /** Format: uuid */
289359
+ teamId?: string;
289360
+ aiReplied?: boolean;
289361
+ fromAd?: boolean;
289362
+ fromCampaign?: boolean;
289363
+ waiting?: true | "closed";
289364
+ attributes?: {
289365
+ key: string;
289366
+ /**
289367
+ * @default contains
289368
+ * @enum {string}
289369
+ */
289370
+ op: "contains" | "equals";
289371
+ value: string;
289372
+ }[];
289373
+ tagIds?: string[];
289374
+ };
288542
289375
  Property: {
288543
289376
  /** Format: uuid */
288544
289377
  id: string;