@vitrina/api 15.8.1 → 15.9.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.
Files changed (3) hide show
  1. package/dist/index.d.cts +1345 -107
  2. package/dist/index.d.ts +1345 -107
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -125777,7 +125777,9 @@ interface paths {
125777
125777
  put?: never;
125778
125778
  /**
125779
125779
  * Send a library voice clip to the customer
125780
- * @description Sends one clip of the workspace «Clip de voz» library (`GET /voice-clips`) into the conversation as a voice note, as the caller: OGG/Opus with the push-to-talk flag on WhatsApp, AAC by public link on Instagram. The clip's transcript is stored on the message row. Everything `POST /conversations/{id}/voice` checks applies — the reply rail, the política de envíos, the Instagram/Messenger 7-day HUMAN_AGENT window and the provider's own refusal.
125780
+ * @description **Deprecated** — use `POST /conversations/{id}/media-assets/{assetId}/send` (a voice clip is an audio file of the library, same id). Kept working unchanged until it is removed.
125781
+ *
125782
+ * Sends one clip of the workspace «Clip de voz» library (`GET /voice-clips`) into the conversation as a voice note, as the caller: OGG/Opus with the push-to-talk flag on WhatsApp, AAC by public link on Instagram. The clip's transcript is stored on the message row. Everything `POST /conversations/{id}/voice` checks applies — the reply rail, the política de envíos, the Instagram/Messenger 7-day HUMAN_AGENT window and the provider's own refusal.
125781
125783
  *
125782
125784
  * Refused with 409 `CONFLICT` and `details.code`: `VOICE_CLIP_EXPIRED` (the clip is past `expires_at`; nothing is sent) or `VOICE_NOTE_UNSUPPORTED` (the channel cannot carry audio — email, web chat, Messenger, Marketplace; `details.text` holds the clip's words, or null, so the caller can offer them as a text reply; nothing is sent). Another workspace's clip is 404.
125783
125785
  *
@@ -125936,6 +125938,182 @@ interface paths {
125936
125938
  patch?: never;
125937
125939
  trace?: never;
125938
125940
  };
125941
+ "/conversations/{id}/media-assets/{assetId}/send": {
125942
+ parameters: {
125943
+ query?: never;
125944
+ header?: never;
125945
+ path?: never;
125946
+ cookie?: never;
125947
+ };
125948
+ get?: never;
125949
+ put?: never;
125950
+ /**
125951
+ * Send a library file to the customer
125952
+ * @description Sends one file of the workspace library (`GET /media-assets`) into the conversation as its own message, as the caller. Images, videos and PDFs are copied into the conversation (the thread keeps its copy if the library file is later replaced or deleted) and go out with `caption` (omitted = the file’s own caption; null = none). Audio goes out as a voice note with its transcript, exactly like `POST /conversations/{id}/voice`. The message carries `metadata.media_asset_id`, and the send is counted on the file (`send_count`). A file already sent in this conversation may be sent again.
125953
+ *
125954
+ * Refused with `details.code`: 409 `MEDIA_ASSET_NOT_SENDABLE` (`details.reason`: `expired`, or `consent_required` — it shows a person whose consent is not confirmed), 409 `MEDIA_CHANNEL_UNSUPPORTED` (`details.channel`, `details.kind` — e.g. a PDF on Instagram), 409 `VOICE_NOTE_UNSUPPORTED` (audio on a channel without voice notes; `details.text` holds its words so the caller can send them as text), 413 `MEDIA_TOO_LARGE` (over the channel’s per-file cap — email takes 3 MB). Nothing is sent on any refusal. Another workspace’s file is 404.
125955
+ *
125956
+ * Needs `macros:read` (the library) as well as `conversations:write` and `messages:send`.
125957
+ *
125958
+ * Requires `messages:send` in addition to `conversations:write`. Sent by an API key, a personal token or a connected app, it goes through the política de envíos first — 422 `OUTBOUND_BLOCKED`, 409 `OUTBOUND_WARNING` (resend with `acknowledge`) or, for a connected app past its fan-out limit, 202 `pending_approval`. A member in the UI is not checked.
125959
+ */
125960
+ post: {
125961
+ parameters: {
125962
+ query?: never;
125963
+ header?: {
125964
+ /** @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. */
125965
+ "Idempotency-Key"?: string;
125966
+ };
125967
+ path: {
125968
+ id: string;
125969
+ assetId: string;
125970
+ };
125971
+ cookie?: never;
125972
+ };
125973
+ requestBody?: {
125974
+ content: {
125975
+ /**
125976
+ * @example {
125977
+ * "caption": "Resultado real tras 3 sesiones"
125978
+ * }
125979
+ */
125980
+ "application/json": {
125981
+ /** @description Text sent with the file. Omitted = the file’s own caption; null = none. Ignored for audio. */
125982
+ caption?: string | null;
125983
+ /** @description Advertencia de envío codes to go ahead over — every code from a 409 `OUTBOUND_WARNING` response's `reasons`, e.g. `["quiet_hours"]`. Recorded in the audit log and the outbound ledger. Has no effect on a Bloqueo (422 `OUTBOUND_BLOCKED`). */
125984
+ acknowledge?: string[];
125985
+ };
125986
+ };
125987
+ };
125988
+ responses: {
125989
+ /** @description The persisted media message */
125990
+ 201: {
125991
+ headers: {
125992
+ [name: string]: unknown;
125993
+ };
125994
+ content: {
125995
+ /**
125996
+ * @example {
125997
+ * "data": {
125998
+ * "id": "eeeeeeee-0000-4000-8000-000000000002",
125999
+ * "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
126000
+ * "conversation_id": "bbbbbbbb-0000-4000-8000-000000000001",
126001
+ * "content": "Hola Rodrigo, te confirmo la visita del jueves a las 10:00.",
126002
+ * "type": "text",
126003
+ * "sender_role": "assistant",
126004
+ * "sender_type": "api_key",
126005
+ * "sender_id": "c1c1c1c1-0000-4000-8000-000000000001",
126006
+ * "correlation_id": null,
126007
+ * "external_message_id": null,
126008
+ * "media_urls": null,
126009
+ * "media_sensitivity": null,
126010
+ * "media_processing_state": null,
126011
+ * "media_expires_at": null,
126012
+ * "derived_context_expires_at": null,
126013
+ * "metadata": null,
126014
+ * "tool_calls": null,
126015
+ * "tool_call_id": null,
126016
+ * "delivery_status": "sent",
126017
+ * "delivery_error": null,
126018
+ * "delivery_attempt": 1,
126019
+ * "next_attempt_at": null,
126020
+ * "delivered_at": null,
126021
+ * "read_at": null,
126022
+ * "author": {
126023
+ * "kind": "api_key",
126024
+ * "id": "c1c1c1c1-0000-4000-8000-000000000001",
126025
+ * "name": "CRM propio"
126026
+ * },
126027
+ * "created_at": "2026-09-22T11:08:10.882Z",
126028
+ * "updated_at": "2026-09-22T11:08:10.882Z"
126029
+ * }
126030
+ * }
126031
+ */
126032
+ "application/json": {
126033
+ data?: unknown;
126034
+ };
126035
+ };
126036
+ };
126037
+ /** @description Pending approval. A connected app that already wrote to 3 distinct contacts in the last 10 minutes does not write to a new one directly: the message is parked in the approval queue («vía <app>») and goes out when a member approves it. `data.message` is Spanish, for the app to relay to its person. */
126038
+ 202: {
126039
+ headers: {
126040
+ [name: string]: unknown;
126041
+ };
126042
+ content: {
126043
+ "application/json": components["schemas"]["PendingApproval"];
126044
+ };
126045
+ };
126046
+ /** @description Validation error */
126047
+ 400: {
126048
+ headers: {
126049
+ [name: string]: unknown;
126050
+ };
126051
+ content: {
126052
+ "application/json": components["schemas"]["Error"];
126053
+ };
126054
+ };
126055
+ /** @description Unauthorized */
126056
+ 401: {
126057
+ headers: {
126058
+ [name: string]: unknown;
126059
+ };
126060
+ content: {
126061
+ "application/json": components["schemas"]["Error"];
126062
+ };
126063
+ };
126064
+ /** @description Forbidden */
126065
+ 403: {
126066
+ headers: {
126067
+ [name: string]: unknown;
126068
+ };
126069
+ content: {
126070
+ "application/json": components["schemas"]["Error"];
126071
+ };
126072
+ };
126073
+ /** @description Not found */
126074
+ 404: {
126075
+ headers: {
126076
+ [name: string]: unknown;
126077
+ };
126078
+ content: {
126079
+ "application/json": components["schemas"]["Error"];
126080
+ };
126081
+ };
126082
+ /** @description `OUTBOUND_WARNING` — an Advertencia de envío (quiet hours, a thread a member is handling, a degraded number, loop protection). Nothing was sent. Resend the same request with `acknowledge` naming every code in `error.reasons` to send it anyway; the acknowledgment is recorded. (Also `IDEMPOTENCY_KEY_CONFLICT` on an Idempotency-Key reuse.) */
126083
+ 409: {
126084
+ headers: {
126085
+ [name: string]: unknown;
126086
+ };
126087
+ content: {
126088
+ "application/json": components["schemas"]["OutboundVerdictError"];
126089
+ };
126090
+ };
126091
+ /** @description `OUTBOUND_BLOCKED` — a Bloqueo de envío: an opted-out contact (a single free-text reply to a customer who wrote in again after THEIR OWN opt-out passes inside the WhatsApp / Instagram / Messenger 24-hour window, or in the same email thread; a block your team set or a spam complaint still refuses), an active hold, a closed WhatsApp 24-hour window with no template, a template Meta will reject, no channel identity, a disconnected or red account. Never overridable; `error.hint` says what to do instead. */
126092
+ 422: {
126093
+ headers: {
126094
+ [name: string]: unknown;
126095
+ };
126096
+ content: {
126097
+ "application/json": components["schemas"]["OutboundVerdictError"];
126098
+ };
126099
+ };
126100
+ /** @description Rate limited */
126101
+ 429: {
126102
+ headers: {
126103
+ [name: string]: unknown;
126104
+ };
126105
+ content: {
126106
+ "application/json": components["schemas"]["Error"];
126107
+ };
126108
+ };
126109
+ };
126110
+ };
126111
+ delete?: never;
126112
+ options?: never;
126113
+ head?: never;
126114
+ patch?: never;
126115
+ trace?: never;
126116
+ };
125939
126117
  "/conversations/{id}/voice-note": {
125940
126118
  parameters: {
125941
126119
  query?: never;
@@ -179454,7 +179632,7 @@ interface paths {
179454
179632
  *
179455
179633
  * Answers `{ macro, executed }`, where `executed` is one `{ type, ok, error }` entry per step in order. **A 200 does not mean the macro worked** — a failed send and a failed label both appear as `ok: false` inside a successful response, and the steps after them still ran. Surface the failures; they are not retried.
179456
179634
  *
179457
- * Step types that always fail: `send_attachment` and `mute_conversation` are accepted by the builder but not implemented, and report `not yet supported`. An unrecognised type reports `unknown action type`.
179635
+ * `send_attachment` sends a file of the library (`GET /media-assets`): its `value` is the file id (`asset_name` is display-only). It runs in step order, through the same checks as `POST /conversations/{id}/media-assets/{assetId}/send`; a refusal reports its code as `error` (e.g. `MEDIA_ASSET_NOT_SENDABLE`), a value that is not a file id reports `Elige un archivo de la Biblioteca`, and a send parked by the política de envíos reports `status: pending_approval`. `mute_conversation` is accepted by the builder but not implemented and reports `not yet supported`. An unrecognised type reports `unknown action type`.
179458
179636
  *
179459
179637
  * `run_webhook` is a FLAG rather than a step: its presence anywhere in `actions` makes the whole run fire one `macro.applied` webhook after the loop, with the full step log. Listing it twice still fires once, and its position in the list has no effect.
179460
179638
  *
@@ -179824,7 +180002,7 @@ interface paths {
179824
180002
  *
179825
180003
  * Answers `{ macro, executed }`, where `executed` is one `{ type, ok, error }` entry per step in order. **A 200 does not mean the macro worked** — a failed send and a failed label both appear as `ok: false` inside a successful response, and the steps after them still ran. Surface the failures; they are not retried.
179826
180004
  *
179827
- * Step types that always fail: `send_attachment` and `mute_conversation` are accepted by the builder but not implemented, and report `not yet supported`. An unrecognised type reports `unknown action type`.
180005
+ * `send_attachment` sends a file of the library (`GET /media-assets`): its `value` is the file id (`asset_name` is display-only). It runs in step order, through the same checks as `POST /conversations/{id}/media-assets/{assetId}/send`; a refusal reports its code as `error` (e.g. `MEDIA_ASSET_NOT_SENDABLE`), a value that is not a file id reports `Elige un archivo de la Biblioteca`, and a send parked by the política de envíos reports `status: pending_approval`. `mute_conversation` is accepted by the builder but not implemented and reports `not yet supported`. An unrecognised type reports `unknown action type`.
179828
180006
  *
179829
180007
  * `run_webhook` is a FLAG rather than a step: its presence anywhere in `actions` makes the whole run fire one `macro.applied` webhook after the loop, with the full step log. Listing it twice still fires once, and its position in the list has no effect.
179830
180008
  *
@@ -180014,7 +180192,9 @@ interface paths {
180014
180192
  };
180015
180193
  /**
180016
180194
  * List voice clips
180017
- * @description Every clip in the workspace library, newest first, expired ones included and marked `expired: true`.
180195
+ * @description **Deprecated** — use `/media-assets` (voice clips are its audio files, same ids).
180196
+ *
180197
+ * Every clip in the workspace library, newest first, expired ones included and marked `expired: true`.
180018
180198
  *
180019
180199
  * 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.
180020
180200
  */
@@ -180134,8 +180314,799 @@ interface paths {
180134
180314
  };
180135
180315
  put?: never;
180136
180316
  /**
180137
- * Upload a voice clip
180138
- * @description Uploads the audio (`file`: OGG/Opus, MP3, M4A/AAC, WAV, WebM or AMR, at most 16 MB; 415 for another type, 413 above the cap) with its details. The clip is transcribed on upload unless `transcript` is sent; when speech-to-text fails or hears nothing usable, `transcript` is null and can be filled with `PATCH`. `duration_ms` is measured from the audio. `name` defaults to the file name. Answers 201 with the clip.
180317
+ * Upload a voice clip
180318
+ * @description **Deprecated** — use `/media-assets` (voice clips are its audio files, same ids).
180319
+ *
180320
+ * Uploads the audio (`file`: OGG/Opus, MP3, M4A/AAC, WAV, WebM or AMR, at most 16 MB; 415 for another type, 413 above the cap) with its details. The clip is transcribed on upload unless `transcript` is sent; when speech-to-text fails or hears nothing usable, `transcript` is null and can be filled with `PATCH`. `duration_ms` is measured from the audio. `name` defaults to the file name. Answers 201 with the clip.
180321
+ *
180322
+ * **Or a JSON body** (`application/json`) — what an MCP connector sends through `call_operation`, which cannot build multipart: `{ filename, content, content_encoding?, content_type? }` plus the operation's own form fields. `content` is UTF-8 text by default, or base64 when `content_encoding` is `"base64"` (images, PDF, audio, video). The same byte cap applies to the decoded bytes (413 above it); invalid base64 is a 400; the content type defaults from the filename extension.
180323
+ */
180324
+ post: {
180325
+ parameters: {
180326
+ query?: never;
180327
+ header?: {
180328
+ /** @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. */
180329
+ "Idempotency-Key"?: string;
180330
+ };
180331
+ path?: never;
180332
+ cookie?: never;
180333
+ };
180334
+ requestBody?: {
180335
+ content: {
180336
+ /**
180337
+ * @example {
180338
+ * "file": "(binary audio part)",
180339
+ * "name": "Garantía 6 meses",
180340
+ * "tags": "garantia,cierre",
180341
+ * "when_to_use": "Cuando el cliente pregunta por la garantía."
180342
+ * }
180343
+ */
180344
+ "multipart/form-data": {
180345
+ /** @description Defaults to the file name without its extension. */
180346
+ name?: string;
180347
+ /** @description Labels for finding the clip (stored lower-cased). Multipart: repeat the field, or send a comma-separated or JSON-array string. */
180348
+ tags?: string[];
180349
+ /** @description «Cuándo usarlo»: when this clip fits, for the team and the agent. */
180350
+ when_to_use?: string;
180351
+ /** Format: date-time */
180352
+ expires_at?: string | null;
180353
+ /** @description Model filter: the model names the clip applies to, spelled as in the catalog (`product.model`, e.g. "iPhone 13 Pro"). Empty = any model. Matched case- and whitespace-insensitively. */
180354
+ models?: string[];
180355
+ /** @description What the clip says. When given, speech-to-text is skipped. */
180356
+ transcript?: string;
180357
+ file?: unknown;
180358
+ };
180359
+ /**
180360
+ * @example {
180361
+ * "filename": "garantia.ogg",
180362
+ * "content": "T2dnUwACAAAAAAAAAAA…",
180363
+ * "content_encoding": "base64",
180364
+ * "name": "Garantía 6 meses",
180365
+ * "tags": [
180366
+ * "garantia",
180367
+ * "cierre"
180368
+ * ],
180369
+ * "when_to_use": "Cuando el cliente pregunta por la garantía.",
180370
+ * "models": [
180371
+ * "iPhone 13",
180372
+ * "iPhone 14"
180373
+ * ],
180374
+ * "expires_at": "2026-12-31T23:59:59-03:00"
180375
+ * }
180376
+ */
180377
+ "application/json": {
180378
+ /** @description File name with extension; the content type defaults from it. */
180379
+ filename: string;
180380
+ /** @description The file. UTF-8 text by default; base64 when `content_encoding` is "base64" (images, PDF, audio, video). */
180381
+ content: string;
180382
+ /**
180383
+ * @description `utf8` (default) for text, `base64` for binary files.
180384
+ * @enum {string}
180385
+ */
180386
+ content_encoding?: "utf8" | "base64";
180387
+ /** @description MIME type. Defaults from the extension (.png → image/png, …). */
180388
+ content_type?: string;
180389
+ /** @description Defaults to the file name without its extension. */
180390
+ name?: string;
180391
+ /** @description Labels for finding the clip (stored lower-cased). Multipart: repeat the field, or send a comma-separated or JSON-array string. */
180392
+ tags?: string[];
180393
+ /** @description «Cuándo usarlo»: when this clip fits, for the team and the agent. */
180394
+ when_to_use?: string;
180395
+ /** Format: date-time */
180396
+ expires_at?: string | null;
180397
+ /** @description Model filter: the model names the clip applies to, spelled as in the catalog (`product.model`, e.g. "iPhone 13 Pro"). Empty = any model. Matched case- and whitespace-insensitively. */
180398
+ models?: string[];
180399
+ /** @description What the clip says. When given, speech-to-text is skipped. */
180400
+ transcript?: string;
180401
+ };
180402
+ };
180403
+ };
180404
+ responses: {
180405
+ /** @description The created clip */
180406
+ 201: {
180407
+ headers: {
180408
+ [name: string]: unknown;
180409
+ };
180410
+ content: {
180411
+ /**
180412
+ * @example {
180413
+ * "id": "6b0f3c1e-2a4d-4f7e-9b1a-0c2d3e4f5a6b",
180414
+ * "name": "Garantía 6 meses",
180415
+ * "tags": [
180416
+ * "garantia",
180417
+ * "cierre"
180418
+ * ],
180419
+ * "when_to_use": "Cuando el cliente pregunta por la garantía de un seminuevo.",
180420
+ * "expires_at": null,
180421
+ * "expired": false,
180422
+ * "models": [
180423
+ * "iPhone 13",
180424
+ * "iPhone 13 Pro",
180425
+ * "iPhone 14"
180426
+ * ],
180427
+ * "transcript": "Hola, te cuento que todos nuestros equipos tienen seis meses de garantía.",
180428
+ * "mime_type": "audio/ogg",
180429
+ * "byte_size": 48213,
180430
+ * "duration_ms": 12480,
180431
+ * "original_filename": "garantia.ogg",
180432
+ * "created_by": "2f1e0d9c-8b7a-4c6d-9e5f-1a2b3c4d5e6f",
180433
+ * "created_at": "2026-10-28T15:04:05.000Z",
180434
+ * "updated_at": "2026-10-28T15:04:05.000Z"
180435
+ * }
180436
+ */
180437
+ "application/json": {
180438
+ data?: unknown;
180439
+ };
180440
+ };
180441
+ };
180442
+ /** @description Validation error */
180443
+ 400: {
180444
+ headers: {
180445
+ [name: string]: unknown;
180446
+ };
180447
+ content: {
180448
+ "application/json": components["schemas"]["Error"];
180449
+ };
180450
+ };
180451
+ /** @description Unauthorized */
180452
+ 401: {
180453
+ headers: {
180454
+ [name: string]: unknown;
180455
+ };
180456
+ content: {
180457
+ "application/json": components["schemas"]["Error"];
180458
+ };
180459
+ };
180460
+ /** @description Forbidden */
180461
+ 403: {
180462
+ headers: {
180463
+ [name: string]: unknown;
180464
+ };
180465
+ content: {
180466
+ "application/json": components["schemas"]["Error"];
180467
+ };
180468
+ };
180469
+ /** @description Not found */
180470
+ 404: {
180471
+ headers: {
180472
+ [name: string]: unknown;
180473
+ };
180474
+ content: {
180475
+ "application/json": components["schemas"]["Error"];
180476
+ };
180477
+ };
180478
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
180479
+ 409: {
180480
+ headers: {
180481
+ [name: string]: unknown;
180482
+ };
180483
+ content: {
180484
+ "application/json": components["schemas"]["Error"];
180485
+ };
180486
+ };
180487
+ /** @description Rate limited */
180488
+ 429: {
180489
+ headers: {
180490
+ [name: string]: unknown;
180491
+ };
180492
+ content: {
180493
+ "application/json": components["schemas"]["Error"];
180494
+ };
180495
+ };
180496
+ };
180497
+ };
180498
+ delete?: never;
180499
+ options?: never;
180500
+ head?: never;
180501
+ patch?: never;
180502
+ trace?: never;
180503
+ };
180504
+ "/voice-clips/{id}": {
180505
+ parameters: {
180506
+ query?: never;
180507
+ header?: never;
180508
+ path?: never;
180509
+ cookie?: never;
180510
+ };
180511
+ /**
180512
+ * Fetch one voice clip
180513
+ * @description **Deprecated** — use `GET /media-assets/{id}`.
180514
+ *
180515
+ * The clip with its details, transcript and `expired` state.
180516
+ */
180517
+ get: {
180518
+ parameters: {
180519
+ query?: never;
180520
+ header?: never;
180521
+ path: {
180522
+ id: string;
180523
+ };
180524
+ cookie?: never;
180525
+ };
180526
+ requestBody?: never;
180527
+ responses: {
180528
+ /** @description The clip */
180529
+ 200: {
180530
+ headers: {
180531
+ [name: string]: unknown;
180532
+ };
180533
+ content: {
180534
+ /**
180535
+ * @example {
180536
+ * "id": "6b0f3c1e-2a4d-4f7e-9b1a-0c2d3e4f5a6b",
180537
+ * "name": "Garantía 6 meses",
180538
+ * "tags": [
180539
+ * "garantia",
180540
+ * "cierre"
180541
+ * ],
180542
+ * "when_to_use": "Cuando el cliente pregunta por la garantía de un seminuevo.",
180543
+ * "expires_at": null,
180544
+ * "expired": false,
180545
+ * "models": [
180546
+ * "iPhone 13",
180547
+ * "iPhone 13 Pro",
180548
+ * "iPhone 14"
180549
+ * ],
180550
+ * "transcript": "Hola, te cuento que todos nuestros equipos tienen seis meses de garantía.",
180551
+ * "mime_type": "audio/ogg",
180552
+ * "byte_size": 48213,
180553
+ * "duration_ms": 12480,
180554
+ * "original_filename": "garantia.ogg",
180555
+ * "created_by": "2f1e0d9c-8b7a-4c6d-9e5f-1a2b3c4d5e6f",
180556
+ * "created_at": "2026-10-28T15:04:05.000Z",
180557
+ * "updated_at": "2026-10-28T15:04:05.000Z"
180558
+ * }
180559
+ */
180560
+ "application/json": {
180561
+ data?: unknown;
180562
+ meta?: {
180563
+ [key: string]: unknown;
180564
+ };
180565
+ };
180566
+ };
180567
+ };
180568
+ /** @description Validation error */
180569
+ 400: {
180570
+ headers: {
180571
+ [name: string]: unknown;
180572
+ };
180573
+ content: {
180574
+ "application/json": components["schemas"]["Error"];
180575
+ };
180576
+ };
180577
+ /** @description Unauthorized */
180578
+ 401: {
180579
+ headers: {
180580
+ [name: string]: unknown;
180581
+ };
180582
+ content: {
180583
+ "application/json": components["schemas"]["Error"];
180584
+ };
180585
+ };
180586
+ /** @description Forbidden */
180587
+ 403: {
180588
+ headers: {
180589
+ [name: string]: unknown;
180590
+ };
180591
+ content: {
180592
+ "application/json": components["schemas"]["Error"];
180593
+ };
180594
+ };
180595
+ /** @description Not found */
180596
+ 404: {
180597
+ headers: {
180598
+ [name: string]: unknown;
180599
+ };
180600
+ content: {
180601
+ "application/json": components["schemas"]["Error"];
180602
+ };
180603
+ };
180604
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
180605
+ 409: {
180606
+ headers: {
180607
+ [name: string]: unknown;
180608
+ };
180609
+ content: {
180610
+ "application/json": components["schemas"]["Error"];
180611
+ };
180612
+ };
180613
+ /** @description Rate limited */
180614
+ 429: {
180615
+ headers: {
180616
+ [name: string]: unknown;
180617
+ };
180618
+ content: {
180619
+ "application/json": components["schemas"]["Error"];
180620
+ };
180621
+ };
180622
+ };
180623
+ };
180624
+ put?: never;
180625
+ post?: never;
180626
+ /**
180627
+ * Delete a voice clip
180628
+ * @description **Deprecated** — use `/media-assets` (voice clips are its audio files, same ids).
180629
+ *
180630
+ * Removes the clip and its audio from the library. Voice notes already sent in conversations stay there. To stop offering a clip without losing it, set `expires_at` instead.
180631
+ */
180632
+ delete: {
180633
+ parameters: {
180634
+ query?: never;
180635
+ header?: never;
180636
+ path: {
180637
+ id: string;
180638
+ };
180639
+ cookie?: never;
180640
+ };
180641
+ requestBody?: never;
180642
+ responses: {
180643
+ /** @description No content */
180644
+ 204: {
180645
+ headers: {
180646
+ [name: string]: unknown;
180647
+ };
180648
+ content?: never;
180649
+ };
180650
+ /** @description Validation error */
180651
+ 400: {
180652
+ headers: {
180653
+ [name: string]: unknown;
180654
+ };
180655
+ content: {
180656
+ "application/json": components["schemas"]["Error"];
180657
+ };
180658
+ };
180659
+ /** @description Unauthorized */
180660
+ 401: {
180661
+ headers: {
180662
+ [name: string]: unknown;
180663
+ };
180664
+ content: {
180665
+ "application/json": components["schemas"]["Error"];
180666
+ };
180667
+ };
180668
+ /** @description Forbidden */
180669
+ 403: {
180670
+ headers: {
180671
+ [name: string]: unknown;
180672
+ };
180673
+ content: {
180674
+ "application/json": components["schemas"]["Error"];
180675
+ };
180676
+ };
180677
+ /** @description Not found */
180678
+ 404: {
180679
+ headers: {
180680
+ [name: string]: unknown;
180681
+ };
180682
+ content: {
180683
+ "application/json": components["schemas"]["Error"];
180684
+ };
180685
+ };
180686
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
180687
+ 409: {
180688
+ headers: {
180689
+ [name: string]: unknown;
180690
+ };
180691
+ content: {
180692
+ "application/json": components["schemas"]["Error"];
180693
+ };
180694
+ };
180695
+ /** @description Rate limited */
180696
+ 429: {
180697
+ headers: {
180698
+ [name: string]: unknown;
180699
+ };
180700
+ content: {
180701
+ "application/json": components["schemas"]["Error"];
180702
+ };
180703
+ };
180704
+ };
180705
+ };
180706
+ options?: never;
180707
+ head?: never;
180708
+ /**
180709
+ * Edit a voice clip
180710
+ * @description **Deprecated** — use `/media-assets` (voice clips are its audio files, same ids).
180711
+ *
180712
+ * Changes the details and the transcript; the audio itself is replaced by uploading a new clip. `tags` and `models` are replaced wholesale. `expires_at: null` removes the expiry (an expired clip becomes sendable again). At least one field is required.
180713
+ */
180714
+ patch: {
180715
+ parameters: {
180716
+ query?: never;
180717
+ header?: never;
180718
+ path: {
180719
+ id: string;
180720
+ };
180721
+ cookie?: never;
180722
+ };
180723
+ requestBody?: {
180724
+ content: {
180725
+ /**
180726
+ * @example {
180727
+ * "transcript": "Hola, te cuento que todos nuestros equipos tienen seis meses de garantía.",
180728
+ * "expires_at": "2026-11-30T23:59:59-03:00"
180729
+ * }
180730
+ */
180731
+ "application/json": {
180732
+ name?: string;
180733
+ /** @description Labels for finding the clip (stored lower-cased). Multipart: repeat the field, or send a comma-separated or JSON-array string. */
180734
+ tags?: string[];
180735
+ when_to_use?: string;
180736
+ /**
180737
+ * Format: date-time
180738
+ * @description When the clip stops being offered for sending (ISO 8601). Null = never. An expired clip stays in the library, marked `expired`.
180739
+ */
180740
+ expires_at?: string | null;
180741
+ /** @description Model filter: the model names the clip applies to, spelled as in the catalog (`product.model`, e.g. "iPhone 13 Pro"). Empty = any model. Matched case- and whitespace-insensitively. */
180742
+ models?: string[];
180743
+ /** @description The corrected transcript. Empty or null clears it. */
180744
+ transcript?: string | null;
180745
+ };
180746
+ };
180747
+ };
180748
+ responses: {
180749
+ /** @description The updated clip */
180750
+ 200: {
180751
+ headers: {
180752
+ [name: string]: unknown;
180753
+ };
180754
+ content: {
180755
+ /**
180756
+ * @example {
180757
+ * "id": "6b0f3c1e-2a4d-4f7e-9b1a-0c2d3e4f5a6b",
180758
+ * "name": "Garantía 6 meses",
180759
+ * "tags": [
180760
+ * "garantia",
180761
+ * "cierre"
180762
+ * ],
180763
+ * "when_to_use": "Cuando el cliente pregunta por la garantía de un seminuevo.",
180764
+ * "expires_at": null,
180765
+ * "expired": false,
180766
+ * "models": [
180767
+ * "iPhone 13",
180768
+ * "iPhone 13 Pro",
180769
+ * "iPhone 14"
180770
+ * ],
180771
+ * "transcript": "Hola, te cuento que todos nuestros equipos tienen seis meses de garantía.",
180772
+ * "mime_type": "audio/ogg",
180773
+ * "byte_size": 48213,
180774
+ * "duration_ms": 12480,
180775
+ * "original_filename": "garantia.ogg",
180776
+ * "created_by": "2f1e0d9c-8b7a-4c6d-9e5f-1a2b3c4d5e6f",
180777
+ * "created_at": "2026-10-28T15:04:05.000Z",
180778
+ * "updated_at": "2026-10-28T15:04:05.000Z"
180779
+ * }
180780
+ */
180781
+ "application/json": {
180782
+ data?: unknown;
180783
+ meta?: {
180784
+ [key: string]: unknown;
180785
+ };
180786
+ };
180787
+ };
180788
+ };
180789
+ /** @description Validation error */
180790
+ 400: {
180791
+ headers: {
180792
+ [name: string]: unknown;
180793
+ };
180794
+ content: {
180795
+ "application/json": components["schemas"]["Error"];
180796
+ };
180797
+ };
180798
+ /** @description Unauthorized */
180799
+ 401: {
180800
+ headers: {
180801
+ [name: string]: unknown;
180802
+ };
180803
+ content: {
180804
+ "application/json": components["schemas"]["Error"];
180805
+ };
180806
+ };
180807
+ /** @description Forbidden */
180808
+ 403: {
180809
+ headers: {
180810
+ [name: string]: unknown;
180811
+ };
180812
+ content: {
180813
+ "application/json": components["schemas"]["Error"];
180814
+ };
180815
+ };
180816
+ /** @description Not found */
180817
+ 404: {
180818
+ headers: {
180819
+ [name: string]: unknown;
180820
+ };
180821
+ content: {
180822
+ "application/json": components["schemas"]["Error"];
180823
+ };
180824
+ };
180825
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
180826
+ 409: {
180827
+ headers: {
180828
+ [name: string]: unknown;
180829
+ };
180830
+ content: {
180831
+ "application/json": components["schemas"]["Error"];
180832
+ };
180833
+ };
180834
+ /** @description Rate limited */
180835
+ 429: {
180836
+ headers: {
180837
+ [name: string]: unknown;
180838
+ };
180839
+ content: {
180840
+ "application/json": components["schemas"]["Error"];
180841
+ };
180842
+ };
180843
+ };
180844
+ };
180845
+ trace?: never;
180846
+ };
180847
+ "/voice-clips/{id}/play-url": {
180848
+ parameters: {
180849
+ query?: never;
180850
+ header?: never;
180851
+ path?: never;
180852
+ cookie?: never;
180853
+ };
180854
+ /**
180855
+ * Get a play URL for a voice clip
180856
+ * @description **Deprecated** — use `/media-assets` (voice clips are its audio files, same ids).
180857
+ *
180858
+ * A short-lived signed URL (15 minutes) to stream or download the audio. Ask for a new one when it expires; do not store it.
180859
+ */
180860
+ get: {
180861
+ parameters: {
180862
+ query?: never;
180863
+ header?: never;
180864
+ path: {
180865
+ id: string;
180866
+ };
180867
+ cookie?: never;
180868
+ };
180869
+ requestBody?: never;
180870
+ responses: {
180871
+ /** @description `{ url, expires_at, mime_type }` */
180872
+ 200: {
180873
+ headers: {
180874
+ [name: string]: unknown;
180875
+ };
180876
+ content: {
180877
+ /**
180878
+ * @example {
180879
+ * "url": "https://storage.example.com/tenants/…/voice-clips/6b0f….ogg?X-Amz-Signature=…",
180880
+ * "expires_at": "2026-10-28T15:19:05.000Z",
180881
+ * "mime_type": "audio/ogg"
180882
+ * }
180883
+ */
180884
+ "application/json": {
180885
+ data?: unknown;
180886
+ meta?: {
180887
+ [key: string]: unknown;
180888
+ };
180889
+ };
180890
+ };
180891
+ };
180892
+ /** @description Validation error */
180893
+ 400: {
180894
+ headers: {
180895
+ [name: string]: unknown;
180896
+ };
180897
+ content: {
180898
+ "application/json": components["schemas"]["Error"];
180899
+ };
180900
+ };
180901
+ /** @description Unauthorized */
180902
+ 401: {
180903
+ headers: {
180904
+ [name: string]: unknown;
180905
+ };
180906
+ content: {
180907
+ "application/json": components["schemas"]["Error"];
180908
+ };
180909
+ };
180910
+ /** @description Forbidden */
180911
+ 403: {
180912
+ headers: {
180913
+ [name: string]: unknown;
180914
+ };
180915
+ content: {
180916
+ "application/json": components["schemas"]["Error"];
180917
+ };
180918
+ };
180919
+ /** @description Not found */
180920
+ 404: {
180921
+ headers: {
180922
+ [name: string]: unknown;
180923
+ };
180924
+ content: {
180925
+ "application/json": components["schemas"]["Error"];
180926
+ };
180927
+ };
180928
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
180929
+ 409: {
180930
+ headers: {
180931
+ [name: string]: unknown;
180932
+ };
180933
+ content: {
180934
+ "application/json": components["schemas"]["Error"];
180935
+ };
180936
+ };
180937
+ /** @description Rate limited */
180938
+ 429: {
180939
+ headers: {
180940
+ [name: string]: unknown;
180941
+ };
180942
+ content: {
180943
+ "application/json": components["schemas"]["Error"];
180944
+ };
180945
+ };
180946
+ };
180947
+ };
180948
+ put?: never;
180949
+ post?: never;
180950
+ delete?: never;
180951
+ options?: never;
180952
+ head?: never;
180953
+ patch?: never;
180954
+ trace?: never;
180955
+ };
180956
+ "/media-assets": {
180957
+ parameters: {
180958
+ query?: never;
180959
+ header?: never;
180960
+ path?: never;
180961
+ cookie?: never;
180962
+ };
180963
+ /**
180964
+ * List library files
180965
+ * @description The workspace library, newest first (at most 500; deleted files never appear). Every file carries `sendable` / `unsendable_reason` (`expired`, `consent_required` — it shows a person whose consent is not confirmed) and a short-lived `thumb_url` (15 minutes; images and videos). Filters: `kind` and `tag` (comma-separated, any), `topic_id`, `q` (free text over name, «cuándo usarlo», tags and topic names), `ai_enabled`, `status` (`live` | `expired` | `all`, default all).
180966
+ *
180967
+ * With `conversation_id` every file also carries `sent_in_conversation`, `suggested` (linked to a topic the conversation’s contact is about) and `channel_ok` (the conversation’s channel can carry it).
180968
+ */
180969
+ get: {
180970
+ parameters: {
180971
+ query?: {
180972
+ /** @description Comma-separated kinds: image, video, audio, document. */
180973
+ kind?: string;
180974
+ /** @description Comma-separated tags; a file qualifies when it carries any. */
180975
+ tag?: string;
180976
+ topic_id?: string;
180977
+ /** @description Free text over name, «cuándo usarlo», tags and topic names. */
180978
+ q?: string;
180979
+ ai_enabled?: "true" | "false";
180980
+ /** @description Default `all`. */
180981
+ status?: "live" | "expired" | "all";
180982
+ /** @description Adds `sent_in_conversation`, `suggested` and `channel_ok` for that conversation (the composer picker). */
180983
+ conversation_id?: string;
180984
+ };
180985
+ header?: never;
180986
+ path?: never;
180987
+ cookie?: never;
180988
+ };
180989
+ requestBody?: never;
180990
+ responses: {
180991
+ /** @description Library files */
180992
+ 200: {
180993
+ headers: {
180994
+ [name: string]: unknown;
180995
+ };
180996
+ content: {
180997
+ /**
180998
+ * @example [
180999
+ * {
181000
+ * "id": "3f6c2b1a-9d4e-4c7b-8a2f-1e0d9c8b7a65",
181001
+ * "kind": "image",
181002
+ * "name": "Plasma — antes/después 1",
181003
+ * "when_to_use": "Cuando pregunten por resultados del plasma",
181004
+ * "caption": "Resultado real tras 3 sesiones",
181005
+ * "tags": [
181006
+ * "antes-despues"
181007
+ * ],
181008
+ * "topics": [
181009
+ * {
181010
+ * "id": "8e7d6c5b-4a39-4281-9f0e-d1c2b3a49586",
181011
+ * "name": "Plasma rico en plaquetas",
181012
+ * "kind": "treatment"
181013
+ * }
181014
+ * ],
181015
+ * "models": [],
181016
+ * "transcript": null,
181017
+ * "mime_type": "image/jpeg",
181018
+ * "byte_size": 412345,
181019
+ * "duration_ms": null,
181020
+ * "width": 1080,
181021
+ * "height": 1350,
181022
+ * "page_count": null,
181023
+ * "original_filename": "IMG_2231.HEIC",
181024
+ * "ai_enabled": true,
181025
+ * "shows_person": true,
181026
+ * "consent_confirmed_at": "2026-10-29T14:00:00.000Z",
181027
+ * "consent_confirmed_by": "2f1e0d9c-8b7a-4c6d-9e5f-1a2b3c4d5e6f",
181028
+ * "expires_at": null,
181029
+ * "expired": false,
181030
+ * "sendable": true,
181031
+ * "unsendable_reason": null,
181032
+ * "send_count": 3,
181033
+ * "last_sent_at": "2026-10-29T15:10:00.000Z",
181034
+ * "thumb_url": "https://storage.example.com/tenants/…/media/3f6c…/l9x2.thumb.webp?X-Amz-Signature=…",
181035
+ * "thumb_expires_at": "2026-10-29T15:25:00.000Z",
181036
+ * "created_by": "2f1e0d9c-8b7a-4c6d-9e5f-1a2b3c4d5e6f",
181037
+ * "created_at": "2026-10-29T13:58:00.000Z",
181038
+ * "updated_at": "2026-10-29T14:00:00.000Z"
181039
+ * }
181040
+ * ]
181041
+ */
181042
+ "application/json": {
181043
+ data?: unknown;
181044
+ meta?: {
181045
+ [key: string]: unknown;
181046
+ };
181047
+ };
181048
+ };
181049
+ };
181050
+ /** @description Validation error */
181051
+ 400: {
181052
+ headers: {
181053
+ [name: string]: unknown;
181054
+ };
181055
+ content: {
181056
+ "application/json": components["schemas"]["Error"];
181057
+ };
181058
+ };
181059
+ /** @description Unauthorized */
181060
+ 401: {
181061
+ headers: {
181062
+ [name: string]: unknown;
181063
+ };
181064
+ content: {
181065
+ "application/json": components["schemas"]["Error"];
181066
+ };
181067
+ };
181068
+ /** @description Forbidden */
181069
+ 403: {
181070
+ headers: {
181071
+ [name: string]: unknown;
181072
+ };
181073
+ content: {
181074
+ "application/json": components["schemas"]["Error"];
181075
+ };
181076
+ };
181077
+ /** @description Not found */
181078
+ 404: {
181079
+ headers: {
181080
+ [name: string]: unknown;
181081
+ };
181082
+ content: {
181083
+ "application/json": components["schemas"]["Error"];
181084
+ };
181085
+ };
181086
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
181087
+ 409: {
181088
+ headers: {
181089
+ [name: string]: unknown;
181090
+ };
181091
+ content: {
181092
+ "application/json": components["schemas"]["Error"];
181093
+ };
181094
+ };
181095
+ /** @description Rate limited */
181096
+ 429: {
181097
+ headers: {
181098
+ [name: string]: unknown;
181099
+ };
181100
+ content: {
181101
+ "application/json": components["schemas"]["Error"];
181102
+ };
181103
+ };
181104
+ };
181105
+ };
181106
+ put?: never;
181107
+ /**
181108
+ * Upload a file to the library
181109
+ * @description Uploads `file` with its details. The kind (image, video, audio, document) is read from the bytes. Accepted files and caps: images JPG/PNG/WebP/HEIC ≤ 10 MB (auto-rotated, every metadata block — EXIF, GPS — removed, long edge ≤ 2560 px, stored as JPEG, or PNG when it was PNG, ≤ 5 MB); videos MP4/MOV/WebM ≤ 50 MB (converted to a WhatsApp-safe MP4 that must end ≤ 16 MB); PDF ≤ 16 MB; audio OGG/Opus, MP3, M4A/AAC, WAV, WebM, AMR ≤ 16 MB (transcribed unless `transcript` is sent). Refusals carry `details.code`: 413 `MEDIA_TOO_LARGE` (`details.limit_bytes`), 415 `MEDIA_UNSUPPORTED_TYPE` (an HEIC the server cannot decode included: convert it to JPG), 422 `MEDIA_EMPTY`. `name` defaults to the file name. `shows_person` defaults to true for images and videos in a healthcare workspace; while it is true and the consent is not confirmed nobody can send the file. A file identical to one already in the library is still created and the answer carries `duplicate_of: {id, name}`. 409 `MEDIA_LIBRARY_FULL` past 500 files; 422 for an unknown topic.
180139
181110
  *
180140
181111
  * **Or a JSON body** (`application/json`) — what an MCP connector sends through `call_operation`, which cannot build multipart: `{ filename, content, content_encoding?, content_type? }` plus the operation's own form fields. `content` is UTF-8 text by default, or base64 when `content_encoding` is `"base64"` (images, PDF, audio, video). The same byte cap applies to the decoded bytes (413 above it); invalid base64 is a 400; the content type defaults from the filename extension.
180141
181112
  */
@@ -180153,43 +181124,52 @@ interface paths {
180153
181124
  content: {
180154
181125
  /**
180155
181126
  * @example {
180156
- * "file": "(binary audio part)",
180157
- * "name": "Garantía 6 meses",
180158
- * "tags": "garantia,cierre",
180159
- * "when_to_use": "Cuando el cliente pregunta por la garantía."
181127
+ * "file": "(binary part)",
181128
+ * "name": "Plasma — antes/después 1",
181129
+ * "when_to_use": "Cuando pregunten por resultados del plasma",
181130
+ * "tags": "antes-despues",
181131
+ * "topic_ids": "8e7d6c5b-4a39-4281-9f0e-d1c2b3a49586",
181132
+ * "shows_person": "true",
181133
+ * "consent_confirmed": "true"
180160
181134
  * }
180161
181135
  */
180162
181136
  "multipart/form-data": {
180163
181137
  /** @description Defaults to the file name without its extension. */
180164
181138
  name?: string;
180165
- /** @description Labels for finding the clip (stored lower-cased). Multipart: repeat the field, or send a comma-separated or JSON-array string. */
180166
- tags?: string[];
180167
- /** @description «Cuándo usarlo»: when this clip fits, for the team and the agent. */
181139
+ /** @description «Cuándo usarlo»: when this file fits. The agent reads it. */
180168
181140
  when_to_use?: string;
181141
+ /** @description Default text sent with the file (not for audio). */
181142
+ caption?: string;
181143
+ /** @description Labels for finding the file (stored lower-cased). Multipart: repeat the field, or send a comma-separated or JSON-array string. */
181144
+ tags?: string[];
181145
+ /** @description Interest topics (treatment, model, product, service) this file illustrates; replaces the set. Unknown ids → 422. */
181146
+ topic_ids?: string[];
181147
+ /** @description «El agente puede enviarlo». Default true. */
181148
+ ai_enabled?: boolean;
181149
+ /** @description «Muestra a una persona / paciente». Default: true for images/videos in a healthcare workspace, else false. While true and consent is not confirmed, nobody can send the file. */
181150
+ shows_person?: boolean;
181151
+ /** @description The uploading member confirms the written consent of the person shown. */
181152
+ consent_confirmed?: boolean;
180169
181153
  /** Format: date-time */
180170
181154
  expires_at?: string | null;
180171
- /** @description Model filter: the model names the clip applies to, spelled as in the catalog (`product.model`, e.g. "iPhone 13 Pro"). Empty = any model. Matched case- and whitespace-insensitively. */
181155
+ /** @description Model filter: the model names the file applies to, spelled as in the catalog (`product.model`). Empty = any model. */
180172
181156
  models?: string[];
180173
- /** @description What the clip says. When given, speech-to-text is skipped. */
181157
+ /** @description Audio: what it says. When given, speech-to-text is skipped. */
180174
181158
  transcript?: string;
180175
181159
  file?: unknown;
180176
181160
  };
180177
181161
  /**
180178
181162
  * @example {
180179
- * "filename": "garantia.ogg",
180180
- * "content": "T2dnUwACAAAAAAAAAAA…",
181163
+ * "filename": "plasma-1.jpg",
181164
+ * "content": "/9j/4AAQSkZJRgABAQ…",
180181
181165
  * "content_encoding": "base64",
180182
- * "name": "Garantía 6 meses",
181166
+ * "name": "Plasma — antes/después 1",
181167
+ * "when_to_use": "Cuando pregunten por resultados del plasma",
180183
181168
  * "tags": [
180184
- * "garantia",
180185
- * "cierre"
180186
- * ],
180187
- * "when_to_use": "Cuando el cliente pregunta por la garantía.",
180188
- * "models": [
180189
- * "iPhone 13",
180190
- * "iPhone 14"
181169
+ * "antes-despues"
180191
181170
  * ],
180192
- * "expires_at": "2026-12-31T23:59:59-03:00"
181171
+ * "shows_person": true,
181172
+ * "consent_confirmed": true
180193
181173
  * }
180194
181174
  */
180195
181175
  "application/json": {
@@ -180206,21 +181186,31 @@ interface paths {
180206
181186
  content_type?: string;
180207
181187
  /** @description Defaults to the file name without its extension. */
180208
181188
  name?: string;
180209
- /** @description Labels for finding the clip (stored lower-cased). Multipart: repeat the field, or send a comma-separated or JSON-array string. */
180210
- tags?: string[];
180211
- /** @description «Cuándo usarlo»: when this clip fits, for the team and the agent. */
181189
+ /** @description «Cuándo usarlo»: when this file fits. The agent reads it. */
180212
181190
  when_to_use?: string;
181191
+ /** @description Default text sent with the file (not for audio). */
181192
+ caption?: string;
181193
+ /** @description Labels for finding the file (stored lower-cased). Multipart: repeat the field, or send a comma-separated or JSON-array string. */
181194
+ tags?: string[];
181195
+ /** @description Interest topics (treatment, model, product, service) this file illustrates; replaces the set. Unknown ids → 422. */
181196
+ topic_ids?: string[];
181197
+ /** @description «El agente puede enviarlo». Default true. */
181198
+ ai_enabled?: boolean;
181199
+ /** @description «Muestra a una persona / paciente». Default: true for images/videos in a healthcare workspace, else false. While true and consent is not confirmed, nobody can send the file. */
181200
+ shows_person?: boolean;
181201
+ /** @description The uploading member confirms the written consent of the person shown. */
181202
+ consent_confirmed?: boolean;
180213
181203
  /** Format: date-time */
180214
181204
  expires_at?: string | null;
180215
- /** @description Model filter: the model names the clip applies to, spelled as in the catalog (`product.model`, e.g. "iPhone 13 Pro"). Empty = any model. Matched case- and whitespace-insensitively. */
181205
+ /** @description Model filter: the model names the file applies to, spelled as in the catalog (`product.model`). Empty = any model. */
180216
181206
  models?: string[];
180217
- /** @description What the clip says. When given, speech-to-text is skipped. */
181207
+ /** @description Audio: what it says. When given, speech-to-text is skipped. */
180218
181208
  transcript?: string;
180219
181209
  };
180220
181210
  };
180221
181211
  };
180222
181212
  responses: {
180223
- /** @description The created clip */
181213
+ /** @description The created file */
180224
181214
  201: {
180225
181215
  headers: {
180226
181216
  [name: string]: unknown;
@@ -180228,28 +181218,46 @@ interface paths {
180228
181218
  content: {
180229
181219
  /**
180230
181220
  * @example {
180231
- * "id": "6b0f3c1e-2a4d-4f7e-9b1a-0c2d3e4f5a6b",
180232
- * "name": "Garantía 6 meses",
181221
+ * "id": "3f6c2b1a-9d4e-4c7b-8a2f-1e0d9c8b7a65",
181222
+ * "kind": "image",
181223
+ * "name": "Plasma — antes/después 1",
181224
+ * "when_to_use": "Cuando pregunten por resultados del plasma",
181225
+ * "caption": "Resultado real tras 3 sesiones",
180233
181226
  * "tags": [
180234
- * "garantia",
180235
- * "cierre"
181227
+ * "antes-despues"
180236
181228
  * ],
180237
- * "when_to_use": "Cuando el cliente pregunta por la garantía de un seminuevo.",
181229
+ * "topics": [
181230
+ * {
181231
+ * "id": "8e7d6c5b-4a39-4281-9f0e-d1c2b3a49586",
181232
+ * "name": "Plasma rico en plaquetas",
181233
+ * "kind": "treatment"
181234
+ * }
181235
+ * ],
181236
+ * "models": [],
181237
+ * "transcript": null,
181238
+ * "mime_type": "image/jpeg",
181239
+ * "byte_size": 412345,
181240
+ * "duration_ms": null,
181241
+ * "width": 1080,
181242
+ * "height": 1350,
181243
+ * "page_count": null,
181244
+ * "original_filename": "IMG_2231.HEIC",
181245
+ * "ai_enabled": true,
181246
+ * "shows_person": true,
181247
+ * "consent_confirmed_at": "2026-10-29T14:00:00.000Z",
181248
+ * "consent_confirmed_by": "2f1e0d9c-8b7a-4c6d-9e5f-1a2b3c4d5e6f",
180238
181249
  * "expires_at": null,
180239
181250
  * "expired": false,
180240
- * "models": [
180241
- * "iPhone 13",
180242
- * "iPhone 13 Pro",
180243
- * "iPhone 14"
180244
- * ],
180245
- * "transcript": "Hola, te cuento que todos nuestros equipos tienen seis meses de garantía.",
180246
- * "mime_type": "audio/ogg",
180247
- * "byte_size": 48213,
180248
- * "duration_ms": 12480,
180249
- * "original_filename": "garantia.ogg",
181251
+ * "sendable": true,
181252
+ * "unsendable_reason": null,
181253
+ * "send_count": 3,
181254
+ * "last_sent_at": "2026-10-29T15:10:00.000Z",
181255
+ * "thumb_url": "https://storage.example.com/tenants/…/media/3f6c…/l9x2.thumb.webp?X-Amz-Signature=…",
181256
+ * "thumb_expires_at": "2026-10-29T15:25:00.000Z",
180250
181257
  * "created_by": "2f1e0d9c-8b7a-4c6d-9e5f-1a2b3c4d5e6f",
180251
- * "created_at": "2026-10-28T15:04:05.000Z",
180252
- * "updated_at": "2026-10-28T15:04:05.000Z"
181258
+ * "created_at": "2026-10-29T13:58:00.000Z",
181259
+ * "updated_at": "2026-10-29T14:00:00.000Z",
181260
+ * "duplicate_of": null
180253
181261
  * }
180254
181262
  */
180255
181263
  "application/json": {
@@ -180319,7 +181327,7 @@ interface paths {
180319
181327
  patch?: never;
180320
181328
  trace?: never;
180321
181329
  };
180322
- "/voice-clips/{id}": {
181330
+ "/media-assets/{id}": {
180323
181331
  parameters: {
180324
181332
  query?: never;
180325
181333
  header?: never;
@@ -180327,8 +181335,8 @@ interface paths {
180327
181335
  cookie?: never;
180328
181336
  };
180329
181337
  /**
180330
- * Fetch one voice clip
180331
- * @description The clip with its details, transcript and `expired` state.
181338
+ * Fetch one library file
181339
+ * @description The file with its details, topics, send counters and state. 404 for a deleted file or another workspace’s.
180332
181340
  */
180333
181341
  get: {
180334
181342
  parameters: {
@@ -180341,7 +181349,7 @@ interface paths {
180341
181349
  };
180342
181350
  requestBody?: never;
180343
181351
  responses: {
180344
- /** @description The clip */
181352
+ /** @description The file */
180345
181353
  200: {
180346
181354
  headers: {
180347
181355
  [name: string]: unknown;
@@ -180349,28 +181357,45 @@ interface paths {
180349
181357
  content: {
180350
181358
  /**
180351
181359
  * @example {
180352
- * "id": "6b0f3c1e-2a4d-4f7e-9b1a-0c2d3e4f5a6b",
180353
- * "name": "Garantía 6 meses",
181360
+ * "id": "3f6c2b1a-9d4e-4c7b-8a2f-1e0d9c8b7a65",
181361
+ * "kind": "image",
181362
+ * "name": "Plasma — antes/después 1",
181363
+ * "when_to_use": "Cuando pregunten por resultados del plasma",
181364
+ * "caption": "Resultado real tras 3 sesiones",
180354
181365
  * "tags": [
180355
- * "garantia",
180356
- * "cierre"
181366
+ * "antes-despues"
180357
181367
  * ],
180358
- * "when_to_use": "Cuando el cliente pregunta por la garantía de un seminuevo.",
181368
+ * "topics": [
181369
+ * {
181370
+ * "id": "8e7d6c5b-4a39-4281-9f0e-d1c2b3a49586",
181371
+ * "name": "Plasma rico en plaquetas",
181372
+ * "kind": "treatment"
181373
+ * }
181374
+ * ],
181375
+ * "models": [],
181376
+ * "transcript": null,
181377
+ * "mime_type": "image/jpeg",
181378
+ * "byte_size": 412345,
181379
+ * "duration_ms": null,
181380
+ * "width": 1080,
181381
+ * "height": 1350,
181382
+ * "page_count": null,
181383
+ * "original_filename": "IMG_2231.HEIC",
181384
+ * "ai_enabled": true,
181385
+ * "shows_person": true,
181386
+ * "consent_confirmed_at": "2026-10-29T14:00:00.000Z",
181387
+ * "consent_confirmed_by": "2f1e0d9c-8b7a-4c6d-9e5f-1a2b3c4d5e6f",
180359
181388
  * "expires_at": null,
180360
181389
  * "expired": false,
180361
- * "models": [
180362
- * "iPhone 13",
180363
- * "iPhone 13 Pro",
180364
- * "iPhone 14"
180365
- * ],
180366
- * "transcript": "Hola, te cuento que todos nuestros equipos tienen seis meses de garantía.",
180367
- * "mime_type": "audio/ogg",
180368
- * "byte_size": 48213,
180369
- * "duration_ms": 12480,
180370
- * "original_filename": "garantia.ogg",
181390
+ * "sendable": true,
181391
+ * "unsendable_reason": null,
181392
+ * "send_count": 3,
181393
+ * "last_sent_at": "2026-10-29T15:10:00.000Z",
181394
+ * "thumb_url": "https://storage.example.com/tenants/…/media/3f6c…/l9x2.thumb.webp?X-Amz-Signature=…",
181395
+ * "thumb_expires_at": "2026-10-29T15:25:00.000Z",
180371
181396
  * "created_by": "2f1e0d9c-8b7a-4c6d-9e5f-1a2b3c4d5e6f",
180372
- * "created_at": "2026-10-28T15:04:05.000Z",
180373
- * "updated_at": "2026-10-28T15:04:05.000Z"
181397
+ * "created_at": "2026-10-29T13:58:00.000Z",
181398
+ * "updated_at": "2026-10-29T14:00:00.000Z"
180374
181399
  * }
180375
181400
  */
180376
181401
  "application/json": {
@@ -180440,8 +181465,8 @@ interface paths {
180440
181465
  put?: never;
180441
181466
  post?: never;
180442
181467
  /**
180443
- * Delete a voice clip
180444
- * @description Removes the clip and its audio from the library. Voice notes already sent in conversations stay there. To stop offering a clip without losing it, set `expires_at` instead.
181468
+ * Delete a library file
181469
+ * @description Removes the file from the library and deletes its bytes at once (no undo). Conversations where it was already sent keep their own copy. The send history keeps pointing at it. To stop offering a file without losing it, set `expires_at` or turn `ai_enabled` off.
180445
181470
  */
180446
181471
  delete: {
180447
181472
  parameters: {
@@ -180520,8 +181545,8 @@ interface paths {
180520
181545
  options?: never;
180521
181546
  head?: never;
180522
181547
  /**
180523
- * Edit a voice clip
180524
- * @description Changes the details and the transcript; the audio itself is replaced by uploading a new clip. `tags` and `models` are replaced wholesale. `expires_at: null` removes the expiry (an expired clip becomes sendable again). At least one field is required.
181548
+ * Edit a library file
181549
+ * @description Changes the details; the bytes are replaced with `POST /media-assets/{id}/file`. `tags`, `topic_ids` and `models` replace their sets. `caption: null` and `expires_at: null` clear them. `consent_confirmed: true` records the calling member and now as the consent confirmation (a member only; an API key gets 422), `false` clears it. At least one field is required; an unknown topic is 422.
180525
181550
  */
180526
181551
  patch: {
180527
181552
  parameters: {
@@ -180536,29 +181561,39 @@ interface paths {
180536
181561
  content: {
180537
181562
  /**
180538
181563
  * @example {
180539
- * "transcript": "Hola, te cuento que todos nuestros equipos tienen seis meses de garantía.",
180540
- * "expires_at": "2026-11-30T23:59:59-03:00"
181564
+ * "when_to_use": "Cuando pregunten por resultados del plasma capilar",
181565
+ * "topic_ids": [
181566
+ * "8e7d6c5b-4a39-4281-9f0e-d1c2b3a49586"
181567
+ * ],
181568
+ * "consent_confirmed": true
180541
181569
  * }
180542
181570
  */
180543
181571
  "application/json": {
180544
181572
  name?: string;
180545
- /** @description Labels for finding the clip (stored lower-cased). Multipart: repeat the field, or send a comma-separated or JSON-array string. */
180546
- tags?: string[];
180547
181573
  when_to_use?: string;
181574
+ caption?: string | null;
181575
+ /** @description Labels for finding the file (stored lower-cased). Multipart: repeat the field, or send a comma-separated or JSON-array string. */
181576
+ tags?: string[];
181577
+ /** @description Interest topics (treatment, model, product, service) this file illustrates; replaces the set. Unknown ids → 422. */
181578
+ topic_ids?: string[];
181579
+ /** @description Model filter: the model names the file applies to, spelled as in the catalog (`product.model`). Empty = any model. */
181580
+ models?: string[];
181581
+ /** @description Audio: the corrected transcript. Empty or null clears it. */
181582
+ transcript?: string | null;
181583
+ ai_enabled?: boolean;
181584
+ shows_person?: boolean;
181585
+ /** @description `true` records the calling member and now as the consent confirmation; `false` clears it. */
181586
+ consent_confirmed?: boolean;
180548
181587
  /**
180549
181588
  * Format: date-time
180550
- * @description When the clip stops being offered for sending (ISO 8601). Null = never. An expired clip stays in the library, marked `expired`.
181589
+ * @description When the file stops being sendable (ISO 8601). Null = never. An expired file stays in the library, marked `expired`.
180551
181590
  */
180552
181591
  expires_at?: string | null;
180553
- /** @description Model filter: the model names the clip applies to, spelled as in the catalog (`product.model`, e.g. "iPhone 13 Pro"). Empty = any model. Matched case- and whitespace-insensitively. */
180554
- models?: string[];
180555
- /** @description The corrected transcript. Empty or null clears it. */
180556
- transcript?: string | null;
180557
181592
  };
180558
181593
  };
180559
181594
  };
180560
181595
  responses: {
180561
- /** @description The updated clip */
181596
+ /** @description The updated file */
180562
181597
  200: {
180563
181598
  headers: {
180564
181599
  [name: string]: unknown;
@@ -180566,28 +181601,224 @@ interface paths {
180566
181601
  content: {
180567
181602
  /**
180568
181603
  * @example {
180569
- * "id": "6b0f3c1e-2a4d-4f7e-9b1a-0c2d3e4f5a6b",
180570
- * "name": "Garantía 6 meses",
181604
+ * "id": "3f6c2b1a-9d4e-4c7b-8a2f-1e0d9c8b7a65",
181605
+ * "kind": "image",
181606
+ * "name": "Plasma — antes/después 1",
181607
+ * "when_to_use": "Cuando pregunten por resultados del plasma",
181608
+ * "caption": "Resultado real tras 3 sesiones",
180571
181609
  * "tags": [
180572
- * "garantia",
180573
- * "cierre"
181610
+ * "antes-despues"
180574
181611
  * ],
180575
- * "when_to_use": "Cuando el cliente pregunta por la garantía de un seminuevo.",
181612
+ * "topics": [
181613
+ * {
181614
+ * "id": "8e7d6c5b-4a39-4281-9f0e-d1c2b3a49586",
181615
+ * "name": "Plasma rico en plaquetas",
181616
+ * "kind": "treatment"
181617
+ * }
181618
+ * ],
181619
+ * "models": [],
181620
+ * "transcript": null,
181621
+ * "mime_type": "image/jpeg",
181622
+ * "byte_size": 412345,
181623
+ * "duration_ms": null,
181624
+ * "width": 1080,
181625
+ * "height": 1350,
181626
+ * "page_count": null,
181627
+ * "original_filename": "IMG_2231.HEIC",
181628
+ * "ai_enabled": true,
181629
+ * "shows_person": true,
181630
+ * "consent_confirmed_at": "2026-10-29T14:00:00.000Z",
181631
+ * "consent_confirmed_by": "2f1e0d9c-8b7a-4c6d-9e5f-1a2b3c4d5e6f",
180576
181632
  * "expires_at": null,
180577
181633
  * "expired": false,
180578
- * "models": [
180579
- * "iPhone 13",
180580
- * "iPhone 13 Pro",
180581
- * "iPhone 14"
181634
+ * "sendable": true,
181635
+ * "unsendable_reason": null,
181636
+ * "send_count": 3,
181637
+ * "last_sent_at": "2026-10-29T15:10:00.000Z",
181638
+ * "thumb_url": "https://storage.example.com/tenants/…/media/3f6c…/l9x2.thumb.webp?X-Amz-Signature=…",
181639
+ * "thumb_expires_at": "2026-10-29T15:25:00.000Z",
181640
+ * "created_by": "2f1e0d9c-8b7a-4c6d-9e5f-1a2b3c4d5e6f",
181641
+ * "created_at": "2026-10-29T13:58:00.000Z",
181642
+ * "updated_at": "2026-10-29T14:00:00.000Z"
181643
+ * }
181644
+ */
181645
+ "application/json": {
181646
+ data?: unknown;
181647
+ meta?: {
181648
+ [key: string]: unknown;
181649
+ };
181650
+ };
181651
+ };
181652
+ };
181653
+ /** @description Validation error */
181654
+ 400: {
181655
+ headers: {
181656
+ [name: string]: unknown;
181657
+ };
181658
+ content: {
181659
+ "application/json": components["schemas"]["Error"];
181660
+ };
181661
+ };
181662
+ /** @description Unauthorized */
181663
+ 401: {
181664
+ headers: {
181665
+ [name: string]: unknown;
181666
+ };
181667
+ content: {
181668
+ "application/json": components["schemas"]["Error"];
181669
+ };
181670
+ };
181671
+ /** @description Forbidden */
181672
+ 403: {
181673
+ headers: {
181674
+ [name: string]: unknown;
181675
+ };
181676
+ content: {
181677
+ "application/json": components["schemas"]["Error"];
181678
+ };
181679
+ };
181680
+ /** @description Not found */
181681
+ 404: {
181682
+ headers: {
181683
+ [name: string]: unknown;
181684
+ };
181685
+ content: {
181686
+ "application/json": components["schemas"]["Error"];
181687
+ };
181688
+ };
181689
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
181690
+ 409: {
181691
+ headers: {
181692
+ [name: string]: unknown;
181693
+ };
181694
+ content: {
181695
+ "application/json": components["schemas"]["Error"];
181696
+ };
181697
+ };
181698
+ /** @description Rate limited */
181699
+ 429: {
181700
+ headers: {
181701
+ [name: string]: unknown;
181702
+ };
181703
+ content: {
181704
+ "application/json": components["schemas"]["Error"];
181705
+ };
181706
+ };
181707
+ };
181708
+ };
181709
+ trace?: never;
181710
+ };
181711
+ "/media-assets/{id}/file": {
181712
+ parameters: {
181713
+ query?: never;
181714
+ header?: never;
181715
+ path?: never;
181716
+ cookie?: never;
181717
+ };
181718
+ get?: never;
181719
+ put?: never;
181720
+ /**
181721
+ * Replace the file of a library entry
181722
+ * @description Swaps the bytes and keeps the entry (id, name, topics, send history). The new file must be the same kind (409 `MEDIA_KIND_MISMATCH`). Dimensions, duration, page count and (audio) the transcript are re-computed; the consent is CLEARED when the file shows a person (it may be someone else). Accepted files and caps: images JPG/PNG/WebP/HEIC ≤ 10 MB (auto-rotated, every metadata block — EXIF, GPS — removed, long edge ≤ 2560 px, stored as JPEG, or PNG when it was PNG, ≤ 5 MB); videos MP4/MOV/WebM ≤ 50 MB (converted to a WhatsApp-safe MP4 that must end ≤ 16 MB); PDF ≤ 16 MB; audio OGG/Opus, MP3, M4A/AAC, WAV, WebM, AMR ≤ 16 MB (transcribed unless `transcript` is sent). Refusals carry `details.code`: 413 `MEDIA_TOO_LARGE` (`details.limit_bytes`), 415 `MEDIA_UNSUPPORTED_TYPE` (an HEIC the server cannot decode included: convert it to JPG), 422 `MEDIA_EMPTY`.
181723
+ *
181724
+ * **Or a JSON body** (`application/json`) — what an MCP connector sends through `call_operation`, which cannot build multipart: `{ filename, content, content_encoding?, content_type? }` plus the operation's own form fields. `content` is UTF-8 text by default, or base64 when `content_encoding` is `"base64"` (images, PDF, audio, video). The same byte cap applies to the decoded bytes (413 above it); invalid base64 is a 400; the content type defaults from the filename extension.
181725
+ */
181726
+ post: {
181727
+ parameters: {
181728
+ query?: never;
181729
+ header?: {
181730
+ /** @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. */
181731
+ "Idempotency-Key"?: string;
181732
+ };
181733
+ path: {
181734
+ id: string;
181735
+ };
181736
+ cookie?: never;
181737
+ };
181738
+ requestBody?: {
181739
+ content: {
181740
+ /**
181741
+ * @example {
181742
+ * "file": "(binary part)"
181743
+ * }
181744
+ */
181745
+ "multipart/form-data": {
181746
+ /** @description Audio: what the new file says. When given, speech-to-text is skipped. */
181747
+ transcript?: string;
181748
+ file?: unknown;
181749
+ };
181750
+ /**
181751
+ * @example {
181752
+ * "filename": "plasma-1b.jpg",
181753
+ * "content": "/9j/4AAQSkZJRgABAQ…",
181754
+ * "content_encoding": "base64"
181755
+ * }
181756
+ */
181757
+ "application/json": {
181758
+ /** @description File name with extension; the content type defaults from it. */
181759
+ filename: string;
181760
+ /** @description The file. UTF-8 text by default; base64 when `content_encoding` is "base64" (images, PDF, audio, video). */
181761
+ content: string;
181762
+ /**
181763
+ * @description `utf8` (default) for text, `base64` for binary files.
181764
+ * @enum {string}
181765
+ */
181766
+ content_encoding?: "utf8" | "base64";
181767
+ /** @description MIME type. Defaults from the extension (.png → image/png, …). */
181768
+ content_type?: string;
181769
+ /** @description Audio: what the new file says. When given, speech-to-text is skipped. */
181770
+ transcript?: string;
181771
+ };
181772
+ };
181773
+ };
181774
+ responses: {
181775
+ /** @description The updated file */
181776
+ 200: {
181777
+ headers: {
181778
+ [name: string]: unknown;
181779
+ };
181780
+ content: {
181781
+ /**
181782
+ * @example {
181783
+ * "id": "3f6c2b1a-9d4e-4c7b-8a2f-1e0d9c8b7a65",
181784
+ * "kind": "image",
181785
+ * "name": "Plasma — antes/después 1",
181786
+ * "when_to_use": "Cuando pregunten por resultados del plasma",
181787
+ * "caption": "Resultado real tras 3 sesiones",
181788
+ * "tags": [
181789
+ * "antes-despues"
180582
181790
  * ],
180583
- * "transcript": "Hola, te cuento que todos nuestros equipos tienen seis meses de garantía.",
180584
- * "mime_type": "audio/ogg",
180585
- * "byte_size": 48213,
180586
- * "duration_ms": 12480,
180587
- * "original_filename": "garantia.ogg",
181791
+ * "topics": [
181792
+ * {
181793
+ * "id": "8e7d6c5b-4a39-4281-9f0e-d1c2b3a49586",
181794
+ * "name": "Plasma rico en plaquetas",
181795
+ * "kind": "treatment"
181796
+ * }
181797
+ * ],
181798
+ * "models": [],
181799
+ * "transcript": null,
181800
+ * "mime_type": "image/jpeg",
181801
+ * "byte_size": 412345,
181802
+ * "duration_ms": null,
181803
+ * "width": 1080,
181804
+ * "height": 1350,
181805
+ * "page_count": null,
181806
+ * "original_filename": "IMG_2231.HEIC",
181807
+ * "ai_enabled": true,
181808
+ * "shows_person": true,
181809
+ * "consent_confirmed_at": "2026-10-29T14:00:00.000Z",
181810
+ * "consent_confirmed_by": "2f1e0d9c-8b7a-4c6d-9e5f-1a2b3c4d5e6f",
181811
+ * "expires_at": null,
181812
+ * "expired": false,
181813
+ * "sendable": true,
181814
+ * "unsendable_reason": null,
181815
+ * "send_count": 3,
181816
+ * "last_sent_at": "2026-10-29T15:10:00.000Z",
181817
+ * "thumb_url": "https://storage.example.com/tenants/…/media/3f6c…/l9x2.thumb.webp?X-Amz-Signature=…",
181818
+ * "thumb_expires_at": "2026-10-29T15:25:00.000Z",
180588
181819
  * "created_by": "2f1e0d9c-8b7a-4c6d-9e5f-1a2b3c4d5e6f",
180589
- * "created_at": "2026-10-28T15:04:05.000Z",
180590
- * "updated_at": "2026-10-28T15:04:05.000Z"
181820
+ * "created_at": "2026-10-29T13:58:00.000Z",
181821
+ * "updated_at": "2026-10-29T14:00:00.000Z"
180591
181822
  * }
180592
181823
  */
180593
181824
  "application/json": {
@@ -180654,9 +181885,13 @@ interface paths {
180654
181885
  };
180655
181886
  };
180656
181887
  };
181888
+ delete?: never;
181889
+ options?: never;
181890
+ head?: never;
181891
+ patch?: never;
180657
181892
  trace?: never;
180658
181893
  };
180659
- "/voice-clips/{id}/play-url": {
181894
+ "/media-assets/{id}/url": {
180660
181895
  parameters: {
180661
181896
  query?: never;
180662
181897
  header?: never;
@@ -180664,12 +181899,15 @@ interface paths {
180664
181899
  cookie?: never;
180665
181900
  };
180666
181901
  /**
180667
- * Get a play URL for a voice clip
180668
- * @description A short-lived signed URL (15 minutes) to stream or download the audio. Ask for a new one when it expires; do not store it.
181902
+ * Get a short-lived URL to a library file
181903
+ * @description A signed URL (15 minutes) to view or download the file (`variant=original`, default) or its thumbnail (`variant=thumb`; 404 when the file has none — PDFs and audio). `disposition=attachment` asks the browser to download it. Ask for a new one when it expires; never store it.
180669
181904
  */
180670
181905
  get: {
180671
181906
  parameters: {
180672
- query?: never;
181907
+ query?: {
181908
+ variant?: "original" | "thumb";
181909
+ disposition?: "inline" | "attachment";
181910
+ };
180673
181911
  header?: never;
180674
181912
  path: {
180675
181913
  id: string;
@@ -180686,9 +181924,9 @@ interface paths {
180686
181924
  content: {
180687
181925
  /**
180688
181926
  * @example {
180689
- * "url": "https://storage.example.com/tenants/…/voice-clips/6b0f….ogg?X-Amz-Signature=…",
180690
- * "expires_at": "2026-10-28T15:19:05.000Z",
180691
- * "mime_type": "audio/ogg"
181927
+ * "url": "https://storage.example.com/tenants/…/media/3f6c…/l9x2.jpg?X-Amz-Signature=…",
181928
+ * "expires_at": "2026-10-29T15:25:00.000Z",
181929
+ * "mime_type": "image/jpeg"
180692
181930
  * }
180693
181931
  */
180694
181932
  "application/json": {