@vitrina/api 11.41.0 → 11.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +902 -31
- package/dist/index.d.ts +902 -31
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -14836,6 +14836,8 @@ interface paths {
|
|
|
14836
14836
|
* Phase 2 (tenencia_source): `tenencia_source` COMPOSES with `tenencia` rather than narrowing it — `?tenencia=propio&tenencia_source=decided` is "propio, and a person or a document actually settled that" (`decided` ⇒ `tenencia_source <> 'default'`); `document` / `declared` / `default` match the column exactly. See `POST /vehicles/tenencia` for how a `declared` row is produced.
|
|
14837
14837
|
*
|
|
14838
14838
|
* SIN COSTO (ADR 0114 §8). A car that entered without a compra (nota de compra), a consignación (contrato) or a parte de pago (nota de venta) has no acquisition, so nothing records what it cost. Every row carries `sin_costo: true` for such a unit (any status), and `view=sin_costo` lists the pile still on the floor — active, not vendido, no acquisition; the SAME predicate as the `sin_costo` count on `GET /vehicles/stats` and the `stock_without_cost` dealer alert. It is never a gate: bulk imports and migrations land cars here on purpose. `sin_costo` is a statement about the cost basis and follows the cost omission above: ABSENT without `dealership_economics:read`.
|
|
14839
|
+
*
|
|
14840
|
+
* MANDATO SIN FIRMAR (ADR 0114 §5). `view=mandato_sin_firmar` lists the cars whose consignación (activa or vendida) has an emitted mandato and no signed copy filed in the expediente — the SAME predicate as the `mandato_sin_firmar` count on `GET /vehicles/stats` and the `mandate_unsigned` dealer alert. Never a gate.
|
|
14839
14841
|
*/
|
|
14840
14842
|
get: {
|
|
14841
14843
|
parameters: {
|
|
@@ -14862,7 +14864,7 @@ interface paths {
|
|
|
14862
14864
|
consignacion_modalidad?: "en_local" | "virtual" | "sin_contrato";
|
|
14863
14865
|
tenencia_source?: "document" | "declared" | "default" | "decided";
|
|
14864
14866
|
without_acquisition?: boolean | string;
|
|
14865
|
-
view?: "published" | "unpublished" | "error" | "stale" | "source_deactivated" | "sin_costo";
|
|
14867
|
+
view?: "published" | "unpublished" | "error" | "stale" | "source_deactivated" | "sin_costo" | "mandato_sin_firmar";
|
|
14866
14868
|
active?: boolean | string;
|
|
14867
14869
|
sort?: "price_asc" | "price_desc" | "year_desc" | "recent" | "days_desc" | "interest_desc" | "estacionamiento";
|
|
14868
14870
|
limit?: number;
|
|
@@ -15357,7 +15359,7 @@ interface paths {
|
|
|
15357
15359
|
query?: {
|
|
15358
15360
|
format?: "xlsx" | "pdf";
|
|
15359
15361
|
q?: string;
|
|
15360
|
-
view?: "published" | "unpublished" | "error" | "stale" | "source_deactivated" | "sin_costo";
|
|
15362
|
+
view?: "published" | "unpublished" | "error" | "stale" | "source_deactivated" | "sin_costo" | "mandato_sin_firmar";
|
|
15361
15363
|
location_id?: string;
|
|
15362
15364
|
status?: "disponible" | "reservado" | "vendido";
|
|
15363
15365
|
vehicle_type?: "auto" | "camion" | "maquinaria" | "nautico";
|
|
@@ -29103,7 +29105,9 @@ interface paths {
|
|
|
29103
29105
|
put?: never;
|
|
29104
29106
|
/**
|
|
29105
29107
|
* Record an outbound preference (consent or DNC) for a contact
|
|
29106
|
-
* @description Appends one fact. **Revoking is a POST with the opposite `status`** — the superseded row stays readable as evidence, which is why there is no PATCH or DELETE here.
|
|
29108
|
+
* @description Appends one fact. **Revoking a block your team set is a POST with the opposite `status`** — the superseded row stays readable as evidence, which is why there is no PATCH or DELETE here.
|
|
29109
|
+
*
|
|
29110
|
+
* An opt-out the **customer** asked for (their message, an unsubscribe link, their own «BAJA») cannot be revoked here: any `status` other than `blocked` that would end it answers 409 with `details.code` `customer_opt_out_lift_required`. Lifting it takes a team member in the Vitrina app, from the contact's card, after confirming.
|
|
29107
29111
|
*
|
|
29108
29112
|
* `recorded_at` is stamped by the server and is deliberately not settable: a caller who could backdate a consent fact could manufacture evidence. `legal_basis` is free text recorded verbatim («consentimiento explícito, Ley 21.719») and `evidence_message_id` points at the customer message that proves it, when there is one.
|
|
29109
29113
|
*
|
|
@@ -32008,6 +32012,7 @@ interface paths {
|
|
|
32008
32012
|
*
|
|
32009
32013
|
* * **409** when the sale’s price is below the level this organisation requires an authorisation for and no APPROVED `price_approval` names this document (BR-433/BR-434 — a sale cannot authorise its own discount). Raise one with `POST /price-approvals` and have somebody else decide it. The refusal deliberately states no figure: the shortfall and the reference are cost disclosures gated on `dealership_economics:read`.
|
|
32010
32014
|
* * **409** when the unit has already been sold by another document.
|
|
32015
|
+
* * **409** when the car is consigned (active contrato de consignación) and its mandato was never emitted — «Emite el mandato antes de aprobar» (`details.reason: mandate_not_emitted`). Emit it with `POST /consignments/{id}/contract`.
|
|
32011
32016
|
* * **409** when the document is already approved, or is voided — an approval names a person and a moment and cannot be restated.
|
|
32012
32017
|
* * **400** when the deal’s board has no Won column, or forbids the move onto it.
|
|
32013
32018
|
*
|
|
@@ -33556,6 +33561,8 @@ interface paths {
|
|
|
33556
33561
|
*
|
|
33557
33562
|
* Returns the document WITH its line items in document order. `corrected_at` / `corrected_by` say whether it has been changed since it was issued, and by whom.
|
|
33558
33563
|
*
|
|
33564
|
+
* It also carries the unit it bought, the same as each row of the list: `vehicle` is `{ id, make, model, year, registration_number }` or `null`, and `vehicle_count` says how many units the document acquired (`vehicle` is the FIRST of them when there are several, and `null` exactly when the count is `0`).
|
|
33565
|
+
*
|
|
33559
33566
|
* A document belonging to another workspace is a 404, indistinguishable from one that does not exist.
|
|
33560
33567
|
*/
|
|
33561
33568
|
get: {
|
|
@@ -33594,7 +33601,15 @@ interface paths {
|
|
|
33594
33601
|
* "void_reason": null,
|
|
33595
33602
|
* "voided_by": null,
|
|
33596
33603
|
* "created_at": "2026-09-12T10:15:00.000Z",
|
|
33597
|
-
* "updated_at": "2026-09-12T10:15:00.000Z"
|
|
33604
|
+
* "updated_at": "2026-09-12T10:15:00.000Z",
|
|
33605
|
+
* "vehicle": {
|
|
33606
|
+
* "id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
33607
|
+
* "make": "Mazda",
|
|
33608
|
+
* "model": "CX-5",
|
|
33609
|
+
* "year": 2020,
|
|
33610
|
+
* "registration_number": "KXPT21"
|
|
33611
|
+
* },
|
|
33612
|
+
* "vehicle_count": 1
|
|
33598
33613
|
* }
|
|
33599
33614
|
* }
|
|
33600
33615
|
*/
|
|
@@ -34172,6 +34187,349 @@ interface paths {
|
|
|
34172
34187
|
patch?: never;
|
|
34173
34188
|
trace?: never;
|
|
34174
34189
|
};
|
|
34190
|
+
"/document-templates/clauses/check": {
|
|
34191
|
+
parameters: {
|
|
34192
|
+
query?: never;
|
|
34193
|
+
header?: never;
|
|
34194
|
+
path?: never;
|
|
34195
|
+
cookie?: never;
|
|
34196
|
+
};
|
|
34197
|
+
get?: never;
|
|
34198
|
+
put?: never;
|
|
34199
|
+
/**
|
|
34200
|
+
* Check a body against its cláusulas esenciales and recomendadas
|
|
34201
|
+
* @description The editor's checklist («Esenciales 5/5 · Recomendadas 5/6», ADR 0114 §6.1), computed by the same function the publish gate uses. Send the body being written plus `template_id` (it is that template's next version: its current version is the baseline for "removed") or `document_kind` (a new template: the standard text is the baseline). Returns each clause with `present`, a `summary` of counts, `missing_esenciales` (publishing is refused while non-empty) and `removed_recomendadas` (each needs a reason in `recommended_clause_removals` when publishing). A clause is detected by structural markers — the `{{VARIABLES}}` it needs (designed blocks count, through their text twins), a section heading, or a signature block — never by free-text search. Writes nothing. Requires `document_templates:read`.
|
|
34202
|
+
*/
|
|
34203
|
+
post: {
|
|
34204
|
+
parameters: {
|
|
34205
|
+
query?: never;
|
|
34206
|
+
header?: {
|
|
34207
|
+
/** @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. */
|
|
34208
|
+
"Idempotency-Key"?: string;
|
|
34209
|
+
};
|
|
34210
|
+
path?: never;
|
|
34211
|
+
cookie?: never;
|
|
34212
|
+
};
|
|
34213
|
+
requestBody?: {
|
|
34214
|
+
content: {
|
|
34215
|
+
/**
|
|
34216
|
+
* @example {
|
|
34217
|
+
* "template_id": "3b1f8a52-9d34-4a7e-8f2c-1a2b3c4d5e6f",
|
|
34218
|
+
* "body": "# Nota de venta N° {{FOLIO}}\n\n{{BLOQUE_PARTES}}\n\n{{BLOQUE_VEHICULO}}\n\n{{BLOQUE_PRECIO}}\n\n{{BLOQUE_FIRMAS}}"
|
|
34219
|
+
* }
|
|
34220
|
+
*/
|
|
34221
|
+
"application/json": {
|
|
34222
|
+
body: string;
|
|
34223
|
+
/** Format: uuid */
|
|
34224
|
+
template_id?: string;
|
|
34225
|
+
document_kind?: string;
|
|
34226
|
+
};
|
|
34227
|
+
};
|
|
34228
|
+
};
|
|
34229
|
+
responses: {
|
|
34230
|
+
/** @description The clause checklist */
|
|
34231
|
+
200: {
|
|
34232
|
+
headers: {
|
|
34233
|
+
[name: string]: unknown;
|
|
34234
|
+
};
|
|
34235
|
+
content: {
|
|
34236
|
+
/**
|
|
34237
|
+
* @example {
|
|
34238
|
+
* "data": {
|
|
34239
|
+
* "document_kind": "sale_note",
|
|
34240
|
+
* "esenciales": [
|
|
34241
|
+
* {
|
|
34242
|
+
* "key": "partes",
|
|
34243
|
+
* "label": "Partes con RUT y domicilio",
|
|
34244
|
+
* "tier": "esencial",
|
|
34245
|
+
* "present": true,
|
|
34246
|
+
* "description": "Partes con RUT y domicilio."
|
|
34247
|
+
* },
|
|
34248
|
+
* {
|
|
34249
|
+
* "key": "vehiculo",
|
|
34250
|
+
* "label": "Identidad del vehículo",
|
|
34251
|
+
* "tier": "esencial",
|
|
34252
|
+
* "present": true,
|
|
34253
|
+
* "description": "Identidad del vehículo."
|
|
34254
|
+
* },
|
|
34255
|
+
* {
|
|
34256
|
+
* "key": "precio",
|
|
34257
|
+
* "label": "Precio en cifras y palabras",
|
|
34258
|
+
* "tier": "esencial",
|
|
34259
|
+
* "present": true,
|
|
34260
|
+
* "description": "Precio en cifras y palabras."
|
|
34261
|
+
* },
|
|
34262
|
+
* {
|
|
34263
|
+
* "key": "pago",
|
|
34264
|
+
* "label": "Forma de pago",
|
|
34265
|
+
* "tier": "esencial",
|
|
34266
|
+
* "present": true,
|
|
34267
|
+
* "description": "Forma de pago."
|
|
34268
|
+
* },
|
|
34269
|
+
* {
|
|
34270
|
+
* "key": "firmas",
|
|
34271
|
+
* "label": "Firmas",
|
|
34272
|
+
* "tier": "esencial",
|
|
34273
|
+
* "present": true,
|
|
34274
|
+
* "description": "Firmas."
|
|
34275
|
+
* }
|
|
34276
|
+
* ],
|
|
34277
|
+
* "recomendadas": [
|
|
34278
|
+
* {
|
|
34279
|
+
* "key": "folio",
|
|
34280
|
+
* "label": "Número de folio",
|
|
34281
|
+
* "tier": "recomendada",
|
|
34282
|
+
* "present": true,
|
|
34283
|
+
* "description": "Número de folio."
|
|
34284
|
+
* },
|
|
34285
|
+
* {
|
|
34286
|
+
* "key": "vendedor",
|
|
34287
|
+
* "label": "Vendedor de la automotora",
|
|
34288
|
+
* "tier": "recomendada",
|
|
34289
|
+
* "present": true,
|
|
34290
|
+
* "description": "Vendedor de la automotora."
|
|
34291
|
+
* },
|
|
34292
|
+
* {
|
|
34293
|
+
* "key": "chasis",
|
|
34294
|
+
* "label": "N° de chasis (VIN)",
|
|
34295
|
+
* "tier": "recomendada",
|
|
34296
|
+
* "present": true,
|
|
34297
|
+
* "description": "N° de chasis (VIN)."
|
|
34298
|
+
* },
|
|
34299
|
+
* {
|
|
34300
|
+
* "key": "kilometraje",
|
|
34301
|
+
* "label": "Kilometraje",
|
|
34302
|
+
* "tier": "recomendada",
|
|
34303
|
+
* "present": true,
|
|
34304
|
+
* "description": "Kilometraje."
|
|
34305
|
+
* },
|
|
34306
|
+
* {
|
|
34307
|
+
* "key": "impuesto_transferencia",
|
|
34308
|
+
* "label": "Impuesto a la transferencia",
|
|
34309
|
+
* "tier": "recomendada",
|
|
34310
|
+
* "present": true,
|
|
34311
|
+
* "description": "Impuesto a la transferencia."
|
|
34312
|
+
* },
|
|
34313
|
+
* {
|
|
34314
|
+
* "key": "condiciones",
|
|
34315
|
+
* "label": "Condiciones",
|
|
34316
|
+
* "tier": "recomendada",
|
|
34317
|
+
* "present": false,
|
|
34318
|
+
* "description": "Condiciones."
|
|
34319
|
+
* }
|
|
34320
|
+
* ],
|
|
34321
|
+
* "summary": {
|
|
34322
|
+
* "esenciales": {
|
|
34323
|
+
* "present": 5,
|
|
34324
|
+
* "total": 5
|
|
34325
|
+
* },
|
|
34326
|
+
* "recomendadas": {
|
|
34327
|
+
* "present": 5,
|
|
34328
|
+
* "total": 6
|
|
34329
|
+
* }
|
|
34330
|
+
* },
|
|
34331
|
+
* "missing_esenciales": [],
|
|
34332
|
+
* "removed_recomendadas": [
|
|
34333
|
+
* {
|
|
34334
|
+
* "key": "condiciones",
|
|
34335
|
+
* "label": "Condiciones",
|
|
34336
|
+
* "description": "La sección «Condiciones» con los términos del documento.",
|
|
34337
|
+
* "tier": "recomendada",
|
|
34338
|
+
* "present": false
|
|
34339
|
+
* }
|
|
34340
|
+
* ]
|
|
34341
|
+
* }
|
|
34342
|
+
* }
|
|
34343
|
+
*/
|
|
34344
|
+
"application/json": {
|
|
34345
|
+
data?: unknown;
|
|
34346
|
+
meta?: {
|
|
34347
|
+
[key: string]: unknown;
|
|
34348
|
+
};
|
|
34349
|
+
};
|
|
34350
|
+
};
|
|
34351
|
+
};
|
|
34352
|
+
/** @description Validation error */
|
|
34353
|
+
400: {
|
|
34354
|
+
headers: {
|
|
34355
|
+
[name: string]: unknown;
|
|
34356
|
+
};
|
|
34357
|
+
content: {
|
|
34358
|
+
"application/json": components["schemas"]["Error"];
|
|
34359
|
+
};
|
|
34360
|
+
};
|
|
34361
|
+
/** @description Unauthorized */
|
|
34362
|
+
401: {
|
|
34363
|
+
headers: {
|
|
34364
|
+
[name: string]: unknown;
|
|
34365
|
+
};
|
|
34366
|
+
content: {
|
|
34367
|
+
"application/json": components["schemas"]["Error"];
|
|
34368
|
+
};
|
|
34369
|
+
};
|
|
34370
|
+
/** @description Forbidden */
|
|
34371
|
+
403: {
|
|
34372
|
+
headers: {
|
|
34373
|
+
[name: string]: unknown;
|
|
34374
|
+
};
|
|
34375
|
+
content: {
|
|
34376
|
+
"application/json": components["schemas"]["Error"];
|
|
34377
|
+
};
|
|
34378
|
+
};
|
|
34379
|
+
/** @description Not found */
|
|
34380
|
+
404: {
|
|
34381
|
+
headers: {
|
|
34382
|
+
[name: string]: unknown;
|
|
34383
|
+
};
|
|
34384
|
+
content: {
|
|
34385
|
+
"application/json": components["schemas"]["Error"];
|
|
34386
|
+
};
|
|
34387
|
+
};
|
|
34388
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
34389
|
+
409: {
|
|
34390
|
+
headers: {
|
|
34391
|
+
[name: string]: unknown;
|
|
34392
|
+
};
|
|
34393
|
+
content: {
|
|
34394
|
+
"application/json": components["schemas"]["Error"];
|
|
34395
|
+
};
|
|
34396
|
+
};
|
|
34397
|
+
/** @description Rate limited */
|
|
34398
|
+
429: {
|
|
34399
|
+
headers: {
|
|
34400
|
+
[name: string]: unknown;
|
|
34401
|
+
};
|
|
34402
|
+
content: {
|
|
34403
|
+
"application/json": components["schemas"]["Error"];
|
|
34404
|
+
};
|
|
34405
|
+
};
|
|
34406
|
+
};
|
|
34407
|
+
};
|
|
34408
|
+
delete?: never;
|
|
34409
|
+
options?: never;
|
|
34410
|
+
head?: never;
|
|
34411
|
+
patch?: never;
|
|
34412
|
+
trace?: never;
|
|
34413
|
+
};
|
|
34414
|
+
"/document-templates/{id}/preview-values": {
|
|
34415
|
+
parameters: {
|
|
34416
|
+
query?: never;
|
|
34417
|
+
header?: never;
|
|
34418
|
+
path?: never;
|
|
34419
|
+
cookie?: never;
|
|
34420
|
+
};
|
|
34421
|
+
/**
|
|
34422
|
+
* Placeholder values of the latest issued document of a template's type
|
|
34423
|
+
* @description What the template preview renders against: the `{{NAME}}` values of the most recent documento emitido of the template's document type, built by the SAME code that prints that document, so the preview cannot drift from the print. Covers `sale_note`, `compraventa`, `deal_settlement` (Resumen del negocio), `consignment` (mandato) and `consignment_settlement` (liquidación); nota de compra, reserva, cotización and ficha técnica print fixed layouts and have no values source. `source` names the document (`display_id`: the folio such as `V-12`, or the patente for a consignment, and when it was issued); it is `null` — with an empty `values` — when none exists or the type has no values source; the caller then falls back to the vocabulary examples. A fact the document lacks is absent from `values`, never blank. The values carry buyer/owner identity and money, so this requires `document_templates:read` AND the read scope of that document (`sale_notes:read` for nota de venta and compraventa, `consignments:read` for the two consignment families, `dealership_economics:read` for the Resumen del negocio). Writes and issues nothing.
|
|
34424
|
+
*/
|
|
34425
|
+
get: {
|
|
34426
|
+
parameters: {
|
|
34427
|
+
query?: never;
|
|
34428
|
+
header?: never;
|
|
34429
|
+
path: {
|
|
34430
|
+
id: string;
|
|
34431
|
+
};
|
|
34432
|
+
cookie?: never;
|
|
34433
|
+
};
|
|
34434
|
+
requestBody?: never;
|
|
34435
|
+
responses: {
|
|
34436
|
+
/** @description The source document and its placeholder values */
|
|
34437
|
+
200: {
|
|
34438
|
+
headers: {
|
|
34439
|
+
[name: string]: unknown;
|
|
34440
|
+
};
|
|
34441
|
+
content: {
|
|
34442
|
+
/**
|
|
34443
|
+
* @example {
|
|
34444
|
+
* "data": {
|
|
34445
|
+
* "document_kind": "sale_note",
|
|
34446
|
+
* "source": {
|
|
34447
|
+
* "document_kind": "sale_note",
|
|
34448
|
+
* "id": "5c1a3f0e-8b7d-4e2a-9c61-2d4f6a8b0c13",
|
|
34449
|
+
* "display_id": "V-12",
|
|
34450
|
+
* "issued_at": "2026-09-29T15:20:00.000Z"
|
|
34451
|
+
* },
|
|
34452
|
+
* "values": {
|
|
34453
|
+
* "FOLIO": "V-12",
|
|
34454
|
+
* "FECHA": "29 de septiembre de 2026",
|
|
34455
|
+
* "COMPRADOR_NOMBRE": "Persona Ejemplo",
|
|
34456
|
+
* "VEHICULO_PATENTE": "AB-CD-12"
|
|
34457
|
+
* }
|
|
34458
|
+
* }
|
|
34459
|
+
* }
|
|
34460
|
+
*/
|
|
34461
|
+
"application/json": {
|
|
34462
|
+
data?: unknown;
|
|
34463
|
+
meta?: {
|
|
34464
|
+
[key: string]: unknown;
|
|
34465
|
+
};
|
|
34466
|
+
};
|
|
34467
|
+
};
|
|
34468
|
+
};
|
|
34469
|
+
/** @description Validation error */
|
|
34470
|
+
400: {
|
|
34471
|
+
headers: {
|
|
34472
|
+
[name: string]: unknown;
|
|
34473
|
+
};
|
|
34474
|
+
content: {
|
|
34475
|
+
"application/json": components["schemas"]["Error"];
|
|
34476
|
+
};
|
|
34477
|
+
};
|
|
34478
|
+
/** @description Unauthorized */
|
|
34479
|
+
401: {
|
|
34480
|
+
headers: {
|
|
34481
|
+
[name: string]: unknown;
|
|
34482
|
+
};
|
|
34483
|
+
content: {
|
|
34484
|
+
"application/json": components["schemas"]["Error"];
|
|
34485
|
+
};
|
|
34486
|
+
};
|
|
34487
|
+
/** @description Forbidden */
|
|
34488
|
+
403: {
|
|
34489
|
+
headers: {
|
|
34490
|
+
[name: string]: unknown;
|
|
34491
|
+
};
|
|
34492
|
+
content: {
|
|
34493
|
+
"application/json": components["schemas"]["Error"];
|
|
34494
|
+
};
|
|
34495
|
+
};
|
|
34496
|
+
/** @description Not found */
|
|
34497
|
+
404: {
|
|
34498
|
+
headers: {
|
|
34499
|
+
[name: string]: unknown;
|
|
34500
|
+
};
|
|
34501
|
+
content: {
|
|
34502
|
+
"application/json": components["schemas"]["Error"];
|
|
34503
|
+
};
|
|
34504
|
+
};
|
|
34505
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
34506
|
+
409: {
|
|
34507
|
+
headers: {
|
|
34508
|
+
[name: string]: unknown;
|
|
34509
|
+
};
|
|
34510
|
+
content: {
|
|
34511
|
+
"application/json": components["schemas"]["Error"];
|
|
34512
|
+
};
|
|
34513
|
+
};
|
|
34514
|
+
/** @description Rate limited */
|
|
34515
|
+
429: {
|
|
34516
|
+
headers: {
|
|
34517
|
+
[name: string]: unknown;
|
|
34518
|
+
};
|
|
34519
|
+
content: {
|
|
34520
|
+
"application/json": components["schemas"]["Error"];
|
|
34521
|
+
};
|
|
34522
|
+
};
|
|
34523
|
+
};
|
|
34524
|
+
};
|
|
34525
|
+
put?: never;
|
|
34526
|
+
post?: never;
|
|
34527
|
+
delete?: never;
|
|
34528
|
+
options?: never;
|
|
34529
|
+
head?: never;
|
|
34530
|
+
patch?: never;
|
|
34531
|
+
trace?: never;
|
|
34532
|
+
};
|
|
34175
34533
|
"/credit-applications": {
|
|
34176
34534
|
parameters: {
|
|
34177
34535
|
query?: never;
|
|
@@ -39298,7 +39656,7 @@ interface paths {
|
|
|
39298
39656
|
period?: components["schemas"]["OverheadPeriod"];
|
|
39299
39657
|
from?: string;
|
|
39300
39658
|
to?: string;
|
|
39301
|
-
/** @description `xlsx` (a workbook, typed cells) or `csv` (UTF-8,
|
|
39659
|
+
/** @description `xlsx` (a workbook, typed cells) or `csv` (`;`-separated, UTF-8 with BOM, dd-mm-aaaa dates, decimal comma; the first sheet only). Date-times are on the America/Santiago clock in both formats. */
|
|
39302
39660
|
format?: "xlsx" | "csv";
|
|
39303
39661
|
};
|
|
39304
39662
|
header?: never;
|
|
@@ -40020,7 +40378,7 @@ interface paths {
|
|
|
40020
40378
|
get: {
|
|
40021
40379
|
parameters: {
|
|
40022
40380
|
query?: {
|
|
40023
|
-
/** @description `xlsx` (a workbook, typed cells) or `csv` (UTF-8,
|
|
40381
|
+
/** @description `xlsx` (a workbook, typed cells) or `csv` (`;`-separated, UTF-8 with BOM, dd-mm-aaaa dates, decimal comma; the first sheet only). Date-times are on the America/Santiago clock in both formats. */
|
|
40024
40382
|
format?: "xlsx" | "csv";
|
|
40025
40383
|
};
|
|
40026
40384
|
header?: never;
|
|
@@ -40122,7 +40480,7 @@ interface paths {
|
|
|
40122
40480
|
from?: string;
|
|
40123
40481
|
to?: string;
|
|
40124
40482
|
status?: "issued" | "approved" | "voided";
|
|
40125
|
-
/** @description `xlsx` (a workbook, typed cells) or `csv` (UTF-8,
|
|
40483
|
+
/** @description `xlsx` (a workbook, typed cells) or `csv` (`;`-separated, UTF-8 with BOM, dd-mm-aaaa dates, decimal comma; the first sheet only). Date-times are on the America/Santiago clock in both formats. */
|
|
40126
40484
|
format?: "xlsx" | "csv";
|
|
40127
40485
|
};
|
|
40128
40486
|
header?: never;
|
|
@@ -40205,6 +40563,115 @@ interface paths {
|
|
|
40205
40563
|
patch?: never;
|
|
40206
40564
|
trace?: never;
|
|
40207
40565
|
};
|
|
40566
|
+
"/insights/seller-performance/export": {
|
|
40567
|
+
parameters: {
|
|
40568
|
+
query?: never;
|
|
40569
|
+
header?: never;
|
|
40570
|
+
path?: never;
|
|
40571
|
+
cookie?: never;
|
|
40572
|
+
};
|
|
40573
|
+
/**
|
|
40574
|
+
* Exportar comisiones — the month-end payroll file (Excel or CSV)
|
|
40575
|
+
* @description The same figures as the report above, rendered as an .xlsx workbook (default) or, with `?format=csv`, a `;`-separated UTF-8 CSV of the ledger, on the same export rail as `GET /vehicles/export`: sheet "Comisiones" is one row per seller per deal with the commission arithmetic visible (base × «Tasa %» → comisión; rates are percentages, never basis points; dates are dd-mm-aaaa hh:mm on the America/Santiago clock), sheet "Resumen" is what to pay each person. Same `?window=` parameter and the same `dealership_economics:read` gate as the report — a file must not be pullable for a period or by a principal the screen refuses. `Content-Disposition` carries the generated filename (`comisiones-<periodo>-<YYYY-MM-DD>.xlsx`). Audited.
|
|
40576
|
+
*/
|
|
40577
|
+
get: {
|
|
40578
|
+
parameters: {
|
|
40579
|
+
query?: {
|
|
40580
|
+
/** @description Which window. Omit it (with `from`/`to`) for an explicit range — the shape every ranged Insights report has always accepted. `calendar_month` is the one payroll wants: commission is paid monthly, and the month is the DEALERSHIP’s (America/Santiago), the same boundary the commission itself was resolved under. */
|
|
40581
|
+
window?: "24h" | "7d" | "30d" | "90d" | "calendar_month" | "calendar_year" | "custom";
|
|
40582
|
+
/** @description `window=calendar_month` only. ISO month, `YYYY-MM`. Defaults to the month in progress. */
|
|
40583
|
+
month?: string;
|
|
40584
|
+
/** @description `window=calendar_year` only. `YYYY`. Defaults to the year in progress. */
|
|
40585
|
+
year?: string;
|
|
40586
|
+
/** @description Explicit range only. ISO instant, INCLUSIVE. */
|
|
40587
|
+
from?: string;
|
|
40588
|
+
/** @description Explicit range only. ISO instant, EXCLUSIVE. */
|
|
40589
|
+
to?: string;
|
|
40590
|
+
/** @description `xlsx` (default; sheets "Comisiones" + "Resumen") or `csv` (the ledger: `;`-separated, UTF-8 with BOM, dd-mm-aaaa dates). */
|
|
40591
|
+
format?: "xlsx" | "csv";
|
|
40592
|
+
};
|
|
40593
|
+
header?: never;
|
|
40594
|
+
path?: never;
|
|
40595
|
+
cookie?: never;
|
|
40596
|
+
};
|
|
40597
|
+
requestBody?: never;
|
|
40598
|
+
responses: {
|
|
40599
|
+
/** @description The comisiones workbook (xlsx) */
|
|
40600
|
+
200: {
|
|
40601
|
+
headers: {
|
|
40602
|
+
/** @description attachment; filename="comisiones-….xlsx" */
|
|
40603
|
+
"Content-Disposition"?: string;
|
|
40604
|
+
[name: string]: unknown;
|
|
40605
|
+
};
|
|
40606
|
+
content: {
|
|
40607
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": string;
|
|
40608
|
+
"text/csv": string;
|
|
40609
|
+
};
|
|
40610
|
+
};
|
|
40611
|
+
/** @description Validation error */
|
|
40612
|
+
400: {
|
|
40613
|
+
headers: {
|
|
40614
|
+
[name: string]: unknown;
|
|
40615
|
+
};
|
|
40616
|
+
content: {
|
|
40617
|
+
"application/json": components["schemas"]["Error"];
|
|
40618
|
+
};
|
|
40619
|
+
};
|
|
40620
|
+
/** @description Unauthorized */
|
|
40621
|
+
401: {
|
|
40622
|
+
headers: {
|
|
40623
|
+
[name: string]: unknown;
|
|
40624
|
+
};
|
|
40625
|
+
content: {
|
|
40626
|
+
"application/json": components["schemas"]["Error"];
|
|
40627
|
+
};
|
|
40628
|
+
};
|
|
40629
|
+
/** @description Forbidden */
|
|
40630
|
+
403: {
|
|
40631
|
+
headers: {
|
|
40632
|
+
[name: string]: unknown;
|
|
40633
|
+
};
|
|
40634
|
+
content: {
|
|
40635
|
+
"application/json": components["schemas"]["Error"];
|
|
40636
|
+
};
|
|
40637
|
+
};
|
|
40638
|
+
/** @description Not found */
|
|
40639
|
+
404: {
|
|
40640
|
+
headers: {
|
|
40641
|
+
[name: string]: unknown;
|
|
40642
|
+
};
|
|
40643
|
+
content: {
|
|
40644
|
+
"application/json": components["schemas"]["Error"];
|
|
40645
|
+
};
|
|
40646
|
+
};
|
|
40647
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
40648
|
+
409: {
|
|
40649
|
+
headers: {
|
|
40650
|
+
[name: string]: unknown;
|
|
40651
|
+
};
|
|
40652
|
+
content: {
|
|
40653
|
+
"application/json": components["schemas"]["Error"];
|
|
40654
|
+
};
|
|
40655
|
+
};
|
|
40656
|
+
/** @description Rate limited */
|
|
40657
|
+
429: {
|
|
40658
|
+
headers: {
|
|
40659
|
+
[name: string]: unknown;
|
|
40660
|
+
};
|
|
40661
|
+
content: {
|
|
40662
|
+
"application/json": components["schemas"]["Error"];
|
|
40663
|
+
};
|
|
40664
|
+
};
|
|
40665
|
+
};
|
|
40666
|
+
};
|
|
40667
|
+
put?: never;
|
|
40668
|
+
post?: never;
|
|
40669
|
+
delete?: never;
|
|
40670
|
+
options?: never;
|
|
40671
|
+
head?: never;
|
|
40672
|
+
patch?: never;
|
|
40673
|
+
trace?: never;
|
|
40674
|
+
};
|
|
40208
40675
|
"/ai-agent-graphs": {
|
|
40209
40676
|
parameters: {
|
|
40210
40677
|
query?: never;
|
|
@@ -42076,7 +42543,7 @@ interface paths {
|
|
|
42076
42543
|
};
|
|
42077
42544
|
requestBody?: never;
|
|
42078
42545
|
responses: {
|
|
42079
|
-
/** @description The workspace’s rules, evaluation order —
|
|
42546
|
+
/** @description The workspace’s rules, evaluation order — responsable del auto, then a consignación intent rule, then an ordinary portal-scoped rule */
|
|
42080
42547
|
200: {
|
|
42081
42548
|
headers: {
|
|
42082
42549
|
[name: string]: unknown;
|
|
@@ -42088,7 +42555,7 @@ interface paths {
|
|
|
42088
42555
|
* {
|
|
42089
42556
|
* "id": "5c6f2a10-9b2e-4f7a-8b8b-1a2b3c4d5e6f",
|
|
42090
42557
|
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
42091
|
-
* "name": "
|
|
42558
|
+
* "name": "Responsable del auto",
|
|
42092
42559
|
* "enabled": true,
|
|
42093
42560
|
* "priority": 0,
|
|
42094
42561
|
* "match_sources": [],
|
|
@@ -60876,6 +61343,301 @@ interface paths {
|
|
|
60876
61343
|
};
|
|
60877
61344
|
trace?: never;
|
|
60878
61345
|
};
|
|
61346
|
+
"/clinic/migration/runs": {
|
|
61347
|
+
parameters: {
|
|
61348
|
+
query?: never;
|
|
61349
|
+
header?: never;
|
|
61350
|
+
path?: never;
|
|
61351
|
+
cookie?: never;
|
|
61352
|
+
};
|
|
61353
|
+
/**
|
|
61354
|
+
* The clinic’s migration runs, newest first
|
|
61355
|
+
* @description The clinic’s migration runs, newest first
|
|
61356
|
+
*
|
|
61357
|
+
* **Connected apps:** every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, `"M.F. · #1001"` — unless the clinic allowed patient names, with RUT, phone and email masked in free text and `meta.patient_privacy` saying so. Clinical alerts (`flags`) are withheld in both modes, and a non-JSON body (an export, a file) is refused with `403 CONNECTED_APP_SENSITIVE_DATA`.
|
|
61358
|
+
*/
|
|
61359
|
+
get: {
|
|
61360
|
+
parameters: {
|
|
61361
|
+
query?: {
|
|
61362
|
+
limit?: number;
|
|
61363
|
+
};
|
|
61364
|
+
header?: never;
|
|
61365
|
+
path?: never;
|
|
61366
|
+
cookie?: never;
|
|
61367
|
+
};
|
|
61368
|
+
requestBody?: never;
|
|
61369
|
+
responses: {
|
|
61370
|
+
/** @description MigrationRuns */
|
|
61371
|
+
200: {
|
|
61372
|
+
headers: {
|
|
61373
|
+
[name: string]: unknown;
|
|
61374
|
+
};
|
|
61375
|
+
content: {
|
|
61376
|
+
/**
|
|
61377
|
+
* @example {
|
|
61378
|
+
* "data": {
|
|
61379
|
+
* "items": [
|
|
61380
|
+
* {
|
|
61381
|
+
* "id": "01929a5e-7c10-7d3e-9a41-5b8f2c6d1e07",
|
|
61382
|
+
* "mode": "apply",
|
|
61383
|
+
* "status": "completed",
|
|
61384
|
+
* "status_label": "Completada",
|
|
61385
|
+
* "families": [
|
|
61386
|
+
* "patients",
|
|
61387
|
+
* "appointments"
|
|
61388
|
+
* ],
|
|
61389
|
+
* "started_at": "2026-10-30T23:05:00.000Z",
|
|
61390
|
+
* "finished_at": "2026-10-31T01:42:10.000Z",
|
|
61391
|
+
* "totals": {
|
|
61392
|
+
* "examined": 4213,
|
|
61393
|
+
* "created": 3980,
|
|
61394
|
+
* "unchanged": 190,
|
|
61395
|
+
* "gaps": 43
|
|
61396
|
+
* }
|
|
61397
|
+
* }
|
|
61398
|
+
* ]
|
|
61399
|
+
* }
|
|
61400
|
+
* }
|
|
61401
|
+
*/
|
|
61402
|
+
"application/json": {
|
|
61403
|
+
data?: unknown;
|
|
61404
|
+
meta?: {
|
|
61405
|
+
[key: string]: unknown;
|
|
61406
|
+
};
|
|
61407
|
+
};
|
|
61408
|
+
};
|
|
61409
|
+
};
|
|
61410
|
+
/** @description Validation error */
|
|
61411
|
+
400: {
|
|
61412
|
+
headers: {
|
|
61413
|
+
[name: string]: unknown;
|
|
61414
|
+
};
|
|
61415
|
+
content: {
|
|
61416
|
+
"application/json": components["schemas"]["Error"];
|
|
61417
|
+
};
|
|
61418
|
+
};
|
|
61419
|
+
/** @description Unauthorized */
|
|
61420
|
+
401: {
|
|
61421
|
+
headers: {
|
|
61422
|
+
[name: string]: unknown;
|
|
61423
|
+
};
|
|
61424
|
+
content: {
|
|
61425
|
+
"application/json": components["schemas"]["Error"];
|
|
61426
|
+
};
|
|
61427
|
+
};
|
|
61428
|
+
/** @description Forbidden */
|
|
61429
|
+
403: {
|
|
61430
|
+
headers: {
|
|
61431
|
+
[name: string]: unknown;
|
|
61432
|
+
};
|
|
61433
|
+
content: {
|
|
61434
|
+
"application/json": components["schemas"]["Error"];
|
|
61435
|
+
};
|
|
61436
|
+
};
|
|
61437
|
+
/** @description Not found */
|
|
61438
|
+
404: {
|
|
61439
|
+
headers: {
|
|
61440
|
+
[name: string]: unknown;
|
|
61441
|
+
};
|
|
61442
|
+
content: {
|
|
61443
|
+
"application/json": components["schemas"]["Error"];
|
|
61444
|
+
};
|
|
61445
|
+
};
|
|
61446
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
61447
|
+
409: {
|
|
61448
|
+
headers: {
|
|
61449
|
+
[name: string]: unknown;
|
|
61450
|
+
};
|
|
61451
|
+
content: {
|
|
61452
|
+
"application/json": components["schemas"]["Error"];
|
|
61453
|
+
};
|
|
61454
|
+
};
|
|
61455
|
+
/** @description Rate limited */
|
|
61456
|
+
429: {
|
|
61457
|
+
headers: {
|
|
61458
|
+
[name: string]: unknown;
|
|
61459
|
+
};
|
|
61460
|
+
content: {
|
|
61461
|
+
"application/json": components["schemas"]["Error"];
|
|
61462
|
+
};
|
|
61463
|
+
};
|
|
61464
|
+
};
|
|
61465
|
+
};
|
|
61466
|
+
put?: never;
|
|
61467
|
+
post?: never;
|
|
61468
|
+
delete?: never;
|
|
61469
|
+
options?: never;
|
|
61470
|
+
head?: never;
|
|
61471
|
+
patch?: never;
|
|
61472
|
+
trace?: never;
|
|
61473
|
+
};
|
|
61474
|
+
"/clinic/migration/runs/{id}": {
|
|
61475
|
+
parameters: {
|
|
61476
|
+
query?: never;
|
|
61477
|
+
header?: never;
|
|
61478
|
+
path?: never;
|
|
61479
|
+
cookie?: never;
|
|
61480
|
+
};
|
|
61481
|
+
/**
|
|
61482
|
+
* One migration run: progress per family, gaps by reason
|
|
61483
|
+
* @description Per family: status, phase, counts (examined / created / converted / updated / unchanged / kept_native / collapsed / skipped / gaps), progress against the latest dry-run, vendor requests. The gap summary counts what could not come across by reason, with Spanish labels. Counts and reason codes only — never a patient.
|
|
61484
|
+
*
|
|
61485
|
+
* **Connected apps:** every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, `"M.F. · #1001"` — unless the clinic allowed patient names, with RUT, phone and email masked in free text and `meta.patient_privacy` saying so. Clinical alerts (`flags`) are withheld in both modes, and a non-JSON body (an export, a file) is refused with `403 CONNECTED_APP_SENSITIVE_DATA`.
|
|
61486
|
+
*/
|
|
61487
|
+
get: {
|
|
61488
|
+
parameters: {
|
|
61489
|
+
query?: never;
|
|
61490
|
+
header?: never;
|
|
61491
|
+
path: {
|
|
61492
|
+
id: string;
|
|
61493
|
+
};
|
|
61494
|
+
cookie?: never;
|
|
61495
|
+
};
|
|
61496
|
+
requestBody?: never;
|
|
61497
|
+
responses: {
|
|
61498
|
+
/** @description MigrationRun */
|
|
61499
|
+
200: {
|
|
61500
|
+
headers: {
|
|
61501
|
+
[name: string]: unknown;
|
|
61502
|
+
};
|
|
61503
|
+
content: {
|
|
61504
|
+
/**
|
|
61505
|
+
* @example {
|
|
61506
|
+
* "data": {
|
|
61507
|
+
* "id": "01929a5e-7c10-7d3e-9a41-5b8f2c6d1e07",
|
|
61508
|
+
* "mode": "apply",
|
|
61509
|
+
* "status": "completed",
|
|
61510
|
+
* "status_label": "Completada",
|
|
61511
|
+
* "families": [
|
|
61512
|
+
* {
|
|
61513
|
+
* "family": "patients",
|
|
61514
|
+
* "label": "Fichas administrativas de pacientes (con cargas)",
|
|
61515
|
+
* "status": "done",
|
|
61516
|
+
* "status_label": "Lista",
|
|
61517
|
+
* "reason": null,
|
|
61518
|
+
* "reason_label": null,
|
|
61519
|
+
* "phase": null,
|
|
61520
|
+
* "phase_label": null,
|
|
61521
|
+
* "counts": {
|
|
61522
|
+
* "examined": 1480,
|
|
61523
|
+
* "created": 1402,
|
|
61524
|
+
* "unchanged": 60,
|
|
61525
|
+
* "gaps": 18
|
|
61526
|
+
* },
|
|
61527
|
+
* "progress": {
|
|
61528
|
+
* "examined": 1480,
|
|
61529
|
+
* "expected": 1480
|
|
61530
|
+
* },
|
|
61531
|
+
* "vendor_requests": 31,
|
|
61532
|
+
* "failures": 0,
|
|
61533
|
+
* "started_at": "2026-10-30T23:05:02.000Z",
|
|
61534
|
+
* "finished_at": "2026-10-30T23:31:40.000Z"
|
|
61535
|
+
* }
|
|
61536
|
+
* ],
|
|
61537
|
+
* "totals": {
|
|
61538
|
+
* "examined": 1480,
|
|
61539
|
+
* "created": 1402,
|
|
61540
|
+
* "unchanged": 60,
|
|
61541
|
+
* "gaps": 18
|
|
61542
|
+
* },
|
|
61543
|
+
* "gaps": [
|
|
61544
|
+
* {
|
|
61545
|
+
* "family": "patients",
|
|
61546
|
+
* "reason": "native_rut_match",
|
|
61547
|
+
* "reason_label": "Ya existe en Vitrina una ficha creada aquí con el mismo RUT: no se duplicó ni se fusionó.",
|
|
61548
|
+
* "count": 18
|
|
61549
|
+
* }
|
|
61550
|
+
* ],
|
|
61551
|
+
* "history_from": "2021-01-01",
|
|
61552
|
+
* "window_ends_at": "2026-11-01T21:00:00.000Z",
|
|
61553
|
+
* "started_at": "2026-10-30T23:05:00.000Z",
|
|
61554
|
+
* "finished_at": "2026-10-30T23:31:40.000Z",
|
|
61555
|
+
* "last_progress_at": "2026-10-30T23:31:40.000Z",
|
|
61556
|
+
* "job_deleted_at": "2026-10-30T23:31:41.000Z",
|
|
61557
|
+
* "instruction": {
|
|
61558
|
+
* "version": "clinic-migration-instruction/2026-09-28",
|
|
61559
|
+
* "sha256": "b1946ac92492d2347c6235b4d2611184b1946ac92492d2347c6235b4d2611184",
|
|
61560
|
+
* "text": "Instruyo a Vitrina copiar desde Dentalink las fichas administrativas de pacientes …",
|
|
61561
|
+
* "instructed_by_user_id": "20000000-0000-4000-8000-000000000001",
|
|
61562
|
+
* "instructed_at": "2026-10-30T23:04:40.000Z",
|
|
61563
|
+
* "document_reference": null
|
|
61564
|
+
* },
|
|
61565
|
+
* "error": null
|
|
61566
|
+
* }
|
|
61567
|
+
* }
|
|
61568
|
+
*/
|
|
61569
|
+
"application/json": {
|
|
61570
|
+
data?: unknown;
|
|
61571
|
+
meta?: {
|
|
61572
|
+
[key: string]: unknown;
|
|
61573
|
+
};
|
|
61574
|
+
};
|
|
61575
|
+
};
|
|
61576
|
+
};
|
|
61577
|
+
/** @description Validation error */
|
|
61578
|
+
400: {
|
|
61579
|
+
headers: {
|
|
61580
|
+
[name: string]: unknown;
|
|
61581
|
+
};
|
|
61582
|
+
content: {
|
|
61583
|
+
"application/json": components["schemas"]["Error"];
|
|
61584
|
+
};
|
|
61585
|
+
};
|
|
61586
|
+
/** @description Unauthorized */
|
|
61587
|
+
401: {
|
|
61588
|
+
headers: {
|
|
61589
|
+
[name: string]: unknown;
|
|
61590
|
+
};
|
|
61591
|
+
content: {
|
|
61592
|
+
"application/json": components["schemas"]["Error"];
|
|
61593
|
+
};
|
|
61594
|
+
};
|
|
61595
|
+
/** @description Forbidden */
|
|
61596
|
+
403: {
|
|
61597
|
+
headers: {
|
|
61598
|
+
[name: string]: unknown;
|
|
61599
|
+
};
|
|
61600
|
+
content: {
|
|
61601
|
+
"application/json": components["schemas"]["Error"];
|
|
61602
|
+
};
|
|
61603
|
+
};
|
|
61604
|
+
/** @description Not found */
|
|
61605
|
+
404: {
|
|
61606
|
+
headers: {
|
|
61607
|
+
[name: string]: unknown;
|
|
61608
|
+
};
|
|
61609
|
+
content: {
|
|
61610
|
+
"application/json": components["schemas"]["Error"];
|
|
61611
|
+
};
|
|
61612
|
+
};
|
|
61613
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
61614
|
+
409: {
|
|
61615
|
+
headers: {
|
|
61616
|
+
[name: string]: unknown;
|
|
61617
|
+
};
|
|
61618
|
+
content: {
|
|
61619
|
+
"application/json": components["schemas"]["Error"];
|
|
61620
|
+
};
|
|
61621
|
+
};
|
|
61622
|
+
/** @description Rate limited */
|
|
61623
|
+
429: {
|
|
61624
|
+
headers: {
|
|
61625
|
+
[name: string]: unknown;
|
|
61626
|
+
};
|
|
61627
|
+
content: {
|
|
61628
|
+
"application/json": components["schemas"]["Error"];
|
|
61629
|
+
};
|
|
61630
|
+
};
|
|
61631
|
+
};
|
|
61632
|
+
};
|
|
61633
|
+
put?: never;
|
|
61634
|
+
post?: never;
|
|
61635
|
+
delete?: never;
|
|
61636
|
+
options?: never;
|
|
61637
|
+
head?: never;
|
|
61638
|
+
patch?: never;
|
|
61639
|
+
trace?: never;
|
|
61640
|
+
};
|
|
60879
61641
|
"/clinic/patients/{id}/encounters": {
|
|
60880
61642
|
parameters: {
|
|
60881
61643
|
query?: never;
|
|
@@ -76995,6 +77757,8 @@ interface paths {
|
|
|
76995
77757
|
* @description Answers the question the agent and the test-drive flow actually ask: is this car ours to hand over? Returns the ACTIVE contract (or null) plus a `not_on_lot` flag.
|
|
76996
77758
|
*
|
|
76997
77759
|
* Use this rather than filtering the list by `vehicle_id`: a vehicle can have several historical contracts and only ever one active, and this endpoint is the one that resolves that.
|
|
77760
|
+
*
|
|
77761
|
+
* `mandato` is the active contract’s mandato (ADR 0114 §5): `sin_emitir` — approving the sale of this car is refused until it is emitted; `sin_firmar` — emitted, but no signed copy was filed in the car’s expediente (the car shows an alert; nothing is blocked); `firmado`. `null` when there is no active contract.
|
|
76998
77762
|
*/
|
|
76999
77763
|
get: {
|
|
77000
77764
|
parameters: {
|
|
@@ -77016,6 +77780,12 @@ interface paths {
|
|
|
77016
77780
|
/**
|
|
77017
77781
|
* @example {
|
|
77018
77782
|
* "data": {
|
|
77783
|
+
* "vehicleId": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
77784
|
+
* "tenencia": "consignacion",
|
|
77785
|
+
* "tenenciaSource": "document",
|
|
77786
|
+
* "hasActiveContract": true,
|
|
77787
|
+
* "modalidad": "en_local",
|
|
77788
|
+
* "notOnLot": false,
|
|
77019
77789
|
* "contract": {
|
|
77020
77790
|
* "id": "d7d7d7d7-0000-4000-8000-000000000001",
|
|
77021
77791
|
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
@@ -77035,7 +77805,12 @@ interface paths {
|
|
|
77035
77805
|
* "sale_iva_regime": "exento",
|
|
77036
77806
|
* "not_on_lot": false
|
|
77037
77807
|
* },
|
|
77038
|
-
* "
|
|
77808
|
+
* "mandato": {
|
|
77809
|
+
* "contractId": "d7d7d7d7-0000-4000-8000-000000000001",
|
|
77810
|
+
* "estado": "sin_firmar",
|
|
77811
|
+
* "emittedAt": "2026-09-10T14:00:00.000Z",
|
|
77812
|
+
* "signedAt": null
|
|
77813
|
+
* }
|
|
77039
77814
|
* }
|
|
77040
77815
|
* }
|
|
77041
77816
|
*/
|
|
@@ -77512,6 +78287,8 @@ interface paths {
|
|
|
77512
78287
|
* Sell the car and settle with the owner
|
|
77513
78288
|
* @description One atomic action doing two things: moves the contract to `vendido`, and produces the **Liquidación** — sale price minus commission equals the amount owed to the owner, plus the payment record. Requires `amount_venta_clp`; `paid_at` records when the owner was actually paid.
|
|
77514
78289
|
*
|
|
78290
|
+
* **The payout is described in full or refused (400)**: `payout_method` (transferencia, vale_vista or cheque), `payout_bank`, `payout_account` (the cuenta de destino — only its last four digits are stored and returned as `payout_account_last4`), `payout_operation_number` and `payout_paid_by` («pagado por», an active member of the workspace). All of them print on the liquidación with the payment and registration dates.
|
|
78291
|
+
*
|
|
77515
78292
|
* Legal only from `activo`; anything else is a 409. Answers 201 with the contract and the Liquidación.
|
|
77516
78293
|
*
|
|
77517
78294
|
* It does NOT close the vehicle’s side — the estadía close belongs to the vehicle lifecycle, so mark the vehicle sold separately.
|
|
@@ -77533,13 +78310,34 @@ interface paths {
|
|
|
77533
78310
|
/**
|
|
77534
78311
|
* @example {
|
|
77535
78312
|
* "amount_venta_clp": 8900000,
|
|
77536
|
-
* "paid_at": "2026-09-18T15:00:00.000Z"
|
|
78313
|
+
* "paid_at": "2026-09-18T15:00:00.000Z",
|
|
78314
|
+
* "payout_method": "transferencia",
|
|
78315
|
+
* "payout_bank": "Banco de Chile",
|
|
78316
|
+
* "payout_account": "00-123-45678-21",
|
|
78317
|
+
* "payout_operation_number": "99887766",
|
|
78318
|
+
* "payout_paid_by": "11111111-0000-4000-8000-000000000001"
|
|
77537
78319
|
* }
|
|
77538
78320
|
*/
|
|
77539
78321
|
"application/json": {
|
|
77540
78322
|
amount_venta_clp: number;
|
|
77541
78323
|
/** Format: date-time */
|
|
77542
78324
|
paid_at?: string;
|
|
78325
|
+
/**
|
|
78326
|
+
* @description Medio de pago al consignante: `transferencia`, `vale_vista` o `cheque`.
|
|
78327
|
+
* @enum {string}
|
|
78328
|
+
*/
|
|
78329
|
+
payout_method: "transferencia" | "vale_vista" | "cheque";
|
|
78330
|
+
/** @description Banco por el que se pagó. */
|
|
78331
|
+
payout_bank: string;
|
|
78332
|
+
/** @description Cuenta de destino. Solo se guardan sus últimos 4 dígitos (`payout_account_last4`), que es lo que muestran la app y la liquidación. */
|
|
78333
|
+
payout_account: string;
|
|
78334
|
+
/** @description Número de operación del pago. */
|
|
78335
|
+
payout_operation_number: string;
|
|
78336
|
+
/**
|
|
78337
|
+
* Format: uuid
|
|
78338
|
+
* @description «Pagado por»: id de usuario de un miembro activo del equipo.
|
|
78339
|
+
*/
|
|
78340
|
+
payout_paid_by: string;
|
|
77543
78341
|
};
|
|
77544
78342
|
};
|
|
77545
78343
|
};
|
|
@@ -77587,6 +78385,12 @@ interface paths {
|
|
|
77587
78385
|
* "deducciones_clp": 0,
|
|
77588
78386
|
* "retiro_motivo": null,
|
|
77589
78387
|
* "retiro_by": null,
|
|
78388
|
+
* "payout_method": "transferencia",
|
|
78389
|
+
* "payout_bank": "Banco de Chile",
|
|
78390
|
+
* "payout_account_last4": "5821",
|
|
78391
|
+
* "payout_operation_number": "99887766",
|
|
78392
|
+
* "payout_paid_by": "11111111-0000-4000-8000-000000000001",
|
|
78393
|
+
* "payout_paid_by_name": "Ana Pérez",
|
|
77590
78394
|
* "paid_at": "2026-09-18T15:00:00.000Z",
|
|
77591
78395
|
* "created_at": "2026-09-18T15:00:05.000Z",
|
|
77592
78396
|
* "updated_at": "2026-09-18T15:00:05.000Z"
|
|
@@ -77671,6 +78475,8 @@ interface paths {
|
|
|
77671
78475
|
/**
|
|
77672
78476
|
* Fetch the settlement record
|
|
77673
78477
|
* @description The persisted Liquidación for a contract. It only exists once the contract has been sold — this is a read of a record, not a projection computed on demand, so the figures are what was agreed at settlement even if the terms changed afterwards.
|
|
78478
|
+
*
|
|
78479
|
+
* It carries how the owner was paid (`payout_*`, with `payout_paid_by_name` resolved for display). On a liquidación registered before the payout fields were required they are all `null`: nothing reconstructs them, and the app shows them as not registered.
|
|
77674
78480
|
*/
|
|
77675
78481
|
get: {
|
|
77676
78482
|
parameters: {
|
|
@@ -77706,6 +78512,12 @@ interface paths {
|
|
|
77706
78512
|
* "deducciones_clp": 0,
|
|
77707
78513
|
* "retiro_motivo": null,
|
|
77708
78514
|
* "retiro_by": null,
|
|
78515
|
+
* "payout_method": "transferencia",
|
|
78516
|
+
* "payout_bank": "Banco de Chile",
|
|
78517
|
+
* "payout_account_last4": "5821",
|
|
78518
|
+
* "payout_operation_number": "99887766",
|
|
78519
|
+
* "payout_paid_by": "11111111-0000-4000-8000-000000000001",
|
|
78520
|
+
* "payout_paid_by_name": "Ana Pérez",
|
|
77709
78521
|
* "paid_at": "2026-09-18T15:00:00.000Z",
|
|
77710
78522
|
* "created_at": "2026-09-18T15:00:05.000Z",
|
|
77711
78523
|
* "updated_at": "2026-09-18T15:00:05.000Z"
|
|
@@ -79622,7 +80434,7 @@ interface paths {
|
|
|
79622
80434
|
"application/json": components["schemas"]["OutboundVerdictError"];
|
|
79623
80435
|
};
|
|
79624
80436
|
};
|
|
79625
|
-
/** @description `OUTBOUND_BLOCKED` — a Bloqueo de envío: an opted-out contact, 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. */
|
|
80437
|
+
/** @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. */
|
|
79626
80438
|
422: {
|
|
79627
80439
|
headers: {
|
|
79628
80440
|
[name: string]: unknown;
|
|
@@ -79888,7 +80700,7 @@ interface paths {
|
|
|
79888
80700
|
};
|
|
79889
80701
|
/**
|
|
79890
80702
|
* List pending scheduled sends
|
|
79891
|
-
* @description The replies waiting to fire on this conversation
|
|
80703
|
+
* @description The replies waiting to fire on this conversation, plus the ones that FAILED in the last 7 days (`status: failed`), one per send. A failed row carries `failure: { code, label }`: `code` is one of `copy_refused`, `policy_blocked`, `conversation_missing`, `delivery_failed` or `not_sent`, and `label` is a Spanish sentence to show as is; the raw error is never exposed. `failure` is null on a pending row. One that has gone out, was cancelled or was dismissed leaves this list. `policy_acknowledged` records the Advertencias the author went ahead over when they scheduled it; those are not re-asked at fire time, a Bloqueo still is.
|
|
79892
80704
|
*/
|
|
79893
80705
|
get: {
|
|
79894
80706
|
parameters: {
|
|
@@ -79921,13 +80733,19 @@ interface paths {
|
|
|
79921
80733
|
* "bcc": [],
|
|
79922
80734
|
* "send_at": "2026-09-23T13:00:00+00:00",
|
|
79923
80735
|
* "status": "scheduled",
|
|
79924
|
-
* "
|
|
79925
|
-
* "
|
|
79926
|
-
*
|
|
79927
|
-
*
|
|
79928
|
-
*
|
|
79929
|
-
* "
|
|
79930
|
-
* "
|
|
80736
|
+
* "failure": null,
|
|
80737
|
+
* "created_at": "2026-09-22T11:09:04.112Z"
|
|
80738
|
+
* },
|
|
80739
|
+
* {
|
|
80740
|
+
* "id": "44444444-0000-4000-8000-00000000b002",
|
|
80741
|
+
* "content": "Adjunto la cotización que me pediste.",
|
|
80742
|
+
* "send_at": "2026-09-22T15:00:00+00:00",
|
|
80743
|
+
* "status": "failed",
|
|
80744
|
+
* "failure": {
|
|
80745
|
+
* "code": "copy_refused",
|
|
80746
|
+
* "label": "Una dirección en copia ya no puede recibir correos (se dio de baja, rebotó o marcó spam). Quítala de cc/bcc y vuelve a enviarlo."
|
|
80747
|
+
* },
|
|
80748
|
+
* "created_at": "2026-09-22T10:02:11.004Z"
|
|
79931
80749
|
* }
|
|
79932
80750
|
* ]
|
|
79933
80751
|
* }
|
|
@@ -80016,7 +80834,7 @@ interface paths {
|
|
|
80016
80834
|
post?: never;
|
|
80017
80835
|
/**
|
|
80018
80836
|
* Cancel a scheduled send
|
|
80019
|
-
* @description The reply never goes out and the row is gone — there is no un-cancel, rescheduling means composing it again. A message that already
|
|
80837
|
+
* @description The reply never goes out and the row is gone — there is no un-cancel, rescheduling means composing it again. On a FAILED row it dismisses it: the row leaves the list. A message that already went out (or was already cancelled or dismissed) is a 404.
|
|
80020
80838
|
*/
|
|
80021
80839
|
delete: {
|
|
80022
80840
|
parameters: {
|
|
@@ -80253,7 +81071,7 @@ interface paths {
|
|
|
80253
81071
|
"application/json": components["schemas"]["OutboundVerdictError"];
|
|
80254
81072
|
};
|
|
80255
81073
|
};
|
|
80256
|
-
/** @description `OUTBOUND_BLOCKED` — a Bloqueo de envío: an opted-out contact, 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. */
|
|
81074
|
+
/** @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. */
|
|
80257
81075
|
422: {
|
|
80258
81076
|
headers: {
|
|
80259
81077
|
[name: string]: unknown;
|
|
@@ -80440,7 +81258,7 @@ interface paths {
|
|
|
80440
81258
|
"application/json": components["schemas"]["OutboundVerdictError"];
|
|
80441
81259
|
};
|
|
80442
81260
|
};
|
|
80443
|
-
/** @description `OUTBOUND_BLOCKED` — a Bloqueo de envío: an opted-out contact, 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. */
|
|
81261
|
+
/** @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. */
|
|
80444
81262
|
422: {
|
|
80445
81263
|
headers: {
|
|
80446
81264
|
[name: string]: unknown;
|
|
@@ -80754,7 +81572,7 @@ interface paths {
|
|
|
80754
81572
|
"application/json": components["schemas"]["OutboundVerdictError"];
|
|
80755
81573
|
};
|
|
80756
81574
|
};
|
|
80757
|
-
/** @description `OUTBOUND_BLOCKED` — a Bloqueo de envío: an opted-out contact, 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. */
|
|
81575
|
+
/** @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. */
|
|
80758
81576
|
422: {
|
|
80759
81577
|
headers: {
|
|
80760
81578
|
[name: string]: unknown;
|
|
@@ -80931,7 +81749,7 @@ interface paths {
|
|
|
80931
81749
|
"application/json": components["schemas"]["OutboundVerdictError"];
|
|
80932
81750
|
};
|
|
80933
81751
|
};
|
|
80934
|
-
/** @description `OUTBOUND_BLOCKED` — a Bloqueo de envío: an opted-out contact, 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. */
|
|
81752
|
+
/** @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. */
|
|
80935
81753
|
422: {
|
|
80936
81754
|
headers: {
|
|
80937
81755
|
[name: string]: unknown;
|
|
@@ -81102,7 +81920,7 @@ interface paths {
|
|
|
81102
81920
|
"application/json": components["schemas"]["OutboundVerdictError"];
|
|
81103
81921
|
};
|
|
81104
81922
|
};
|
|
81105
|
-
/** @description `OUTBOUND_BLOCKED` — a Bloqueo de envío: an opted-out contact, 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. */
|
|
81923
|
+
/** @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. */
|
|
81106
81924
|
422: {
|
|
81107
81925
|
headers: {
|
|
81108
81926
|
[name: string]: unknown;
|
|
@@ -98036,6 +98854,29 @@ interface paths {
|
|
|
98036
98854
|
* "outcomes": 42,
|
|
98037
98855
|
* "attributed_outcomes": 31,
|
|
98038
98856
|
* "coverage_percent": 73.8
|
|
98857
|
+
* },
|
|
98858
|
+
* "signals": {
|
|
98859
|
+
* "score": 72,
|
|
98860
|
+
* "components": [
|
|
98861
|
+
* {
|
|
98862
|
+
* "key": "meta",
|
|
98863
|
+
* "status": "ok",
|
|
98864
|
+
* "earned": 30,
|
|
98865
|
+
* "max": 30
|
|
98866
|
+
* },
|
|
98867
|
+
* {
|
|
98868
|
+
* "key": "origin",
|
|
98869
|
+
* "status": "partial",
|
|
98870
|
+
* "earned": 29.5,
|
|
98871
|
+
* "max": 40
|
|
98872
|
+
* },
|
|
98873
|
+
* {
|
|
98874
|
+
* "key": "site_tag",
|
|
98875
|
+
* "status": "partial",
|
|
98876
|
+
* "earned": 12,
|
|
98877
|
+
* "max": 30
|
|
98878
|
+
* }
|
|
98879
|
+
* ]
|
|
98039
98880
|
* }
|
|
98040
98881
|
* }
|
|
98041
98882
|
* }
|
|
@@ -99179,7 +100020,7 @@ interface paths {
|
|
|
99179
100020
|
* ],
|
|
99180
100021
|
* "primary": true,
|
|
99181
100022
|
* "title": "Pausar «Video testimonio · 30 s»",
|
|
99182
|
-
* "why": "Se desgasta: en sus últimos 7 días, frente a sus 28 días anteriores, el CTR cayó 30 % o más o el costo por resultado subió
|
|
100023
|
+
* "why": "Se desgasta: en sus últimos 7 días, frente a sus 28 días anteriores, el CTR cayó 30 % o más o el costo por resultado subió 43 % o más, durante 3 días seguidos. Lleva **$184.300** de gasto en los últimos 28 días y no le trae presupuestos aceptados.",
|
|
99183
100024
|
* "effect": "Deja de mostrarse de inmediato; puedes reactivarlo cuando quieras.",
|
|
99184
100025
|
* "target": {
|
|
99185
100026
|
* "level": "ad",
|
|
@@ -107582,7 +108423,9 @@ interface paths {
|
|
|
107582
108423
|
*
|
|
107583
108424
|
* `propio_sin_clasificar` (Phase 2, tenencia_source, 20270903000000) is a SUB-COUNT of `propio`, NOT a fifth bucket — the four above still sum to `total`. It is the cars nobody has ever classified (`tenencia_source=default`), provably coextensive with "sin clasificar" (a consignación can never be `default`). Measured on production 2026-08-31: 903 of 967 vehicles carried `propio` with nobody having said so — that is what this number answers, rather than leaving `propio` an unresolved warning. Opens with `GET /vehicles?active=false&tenencia=propio&tenencia_source=default`.
|
|
107584
108425
|
*
|
|
107585
|
-
* `sin_costo` (ADR 0114 §8, «Sin costo») counts the active, non-vendido cars with NO acquisition — no nota de compra, contrato de consignación or parte de pago — so their cost is unknown. Opens with `GET /vehicles?view=sin_costo`, the same predicate. A statement about the cost basis: ABSENT (not 0) for a caller without `dealership_economics:read`.
|
|
108426
|
+
* `sin_costo` (ADR 0114 §8, «Sin costo») counts the active, non-vendido cars with NO acquisition — no nota de compra, contrato de consignación or parte de pago — so their cost is unknown. Opens with `GET /vehicles?view=sin_costo`, the same predicate. A statement about the cost basis: ABSENT (not 0) for a caller without `dealership_economics:read`.
|
|
108427
|
+
*
|
|
108428
|
+
* `mandato_sin_firmar` (ADR 0114 §5) counts the cars whose consignación (activa, or vendida) has an emitted mandato and no signed copy filed in the expediente. Opens with `GET /vehicles?view=mandato_sin_firmar`, the same predicate. Automotive-vertical only: a workspace on another vertical gets 403 here however its scopes are set.
|
|
107586
108429
|
*/
|
|
107587
108430
|
get: {
|
|
107588
108431
|
parameters: {
|
|
@@ -107613,6 +108456,7 @@ interface paths {
|
|
|
107613
108456
|
* "unpublished": 7,
|
|
107614
108457
|
* "stale": 0,
|
|
107615
108458
|
* "sin_costo": 7,
|
|
108459
|
+
* "mandato_sin_firmar": 1,
|
|
107616
108460
|
* "by_location": {
|
|
107617
108461
|
* "b1b1b1b1-0000-4000-8000-000000000001": 3,
|
|
107618
108462
|
* "b1b1b1b1-0000-4000-8000-000000000002": 1,
|
|
@@ -122105,12 +122949,12 @@ interface components {
|
|
|
122105
122949
|
/** @enum {string} */
|
|
122106
122950
|
code: "OUTBOUND_BLOCKED" | "OUTBOUND_WARNING";
|
|
122107
122951
|
message: string;
|
|
122108
|
-
reasons: ("contact_blocked" | "contact_spam" | "channel_suppressed" | "scope_blocked" | "marketing_consent_missing" | "email_not_subscribed" | "outbound_hold_active" | "window_closed" | "template_missing" | "template_not_approved" | "template_unsupported" | "template_params_incomplete" | "template_category_unknown" | "template_category_mismatch" | "legal_basis_mismatch" | "no_channel_identity" | "account_disconnected" | "account_quality_red" | "past_max_lateness" | "quiet_hours" | "conversation_human_owned" | "account_quality_degraded" | "conversation_closed" | "contact_archived" | "contact_merged" | "stale_context" | "input_unresolved" | "loop_same_content" | "loop_burst")[];
|
|
122952
|
+
reasons: ("contact_blocked" | "contact_spam" | "channel_suppressed" | "scope_blocked" | "marketing_consent_missing" | "email_not_subscribed" | "outbound_hold_active" | "window_closed" | "template_missing" | "template_not_approved" | "template_unsupported" | "template_params_incomplete" | "template_category_unknown" | "template_category_mismatch" | "legal_basis_mismatch" | "no_channel_identity" | "account_disconnected" | "account_quality_red" | "past_max_lateness" | "quiet_hours" | "conversation_human_owned" | "account_quality_degraded" | "conversation_closed" | "contact_archived" | "contact_merged" | "stale_context" | "input_unresolved" | "loop_same_content" | "loop_burst" | "copy_address_blocked")[];
|
|
122109
122953
|
hint: string;
|
|
122110
122954
|
details: {
|
|
122111
122955
|
reasons: {
|
|
122112
122956
|
/** @enum {string} */
|
|
122113
|
-
code: "contact_blocked" | "contact_spam" | "channel_suppressed" | "scope_blocked" | "marketing_consent_missing" | "email_not_subscribed" | "outbound_hold_active" | "window_closed" | "template_missing" | "template_not_approved" | "template_unsupported" | "template_params_incomplete" | "template_category_unknown" | "template_category_mismatch" | "legal_basis_mismatch" | "no_channel_identity" | "account_disconnected" | "account_quality_red" | "past_max_lateness" | "quiet_hours" | "conversation_human_owned" | "account_quality_degraded" | "conversation_closed" | "contact_archived" | "contact_merged" | "stale_context" | "input_unresolved" | "loop_same_content" | "loop_burst";
|
|
122957
|
+
code: "contact_blocked" | "contact_spam" | "channel_suppressed" | "scope_blocked" | "marketing_consent_missing" | "email_not_subscribed" | "outbound_hold_active" | "window_closed" | "template_missing" | "template_not_approved" | "template_unsupported" | "template_params_incomplete" | "template_category_unknown" | "template_category_mismatch" | "legal_basis_mismatch" | "no_channel_identity" | "account_disconnected" | "account_quality_red" | "past_max_lateness" | "quiet_hours" | "conversation_human_owned" | "account_quality_degraded" | "conversation_closed" | "contact_archived" | "contact_merged" | "stale_context" | "input_unresolved" | "loop_same_content" | "loop_burst" | "copy_address_blocked";
|
|
122114
122958
|
/** @enum {string} */
|
|
122115
122959
|
kind: "bloqueo" | "advertencia";
|
|
122116
122960
|
hint: string;
|
|
@@ -122371,6 +123215,11 @@ interface components {
|
|
|
122371
123215
|
outcome_counts: {
|
|
122372
123216
|
[key: string]: number;
|
|
122373
123217
|
};
|
|
123218
|
+
/** @description PIPELINE, never cash (not in `revenue` / `roas`): the period’s closes (`closed_won` — a clinic’s accepted plans, a dealer’s closed sales) that the attribution engine credited to an ad, with the value Vitrina recorded for them (CLP). On `current` only. `null` = unknown (the credit is still warming); absent on `previous` and on the sample. */
|
|
123219
|
+
attributed_pipeline?: {
|
|
123220
|
+
closed_count: number;
|
|
123221
|
+
closed_value: number;
|
|
123222
|
+
} | null;
|
|
122374
123223
|
};
|
|
122375
123224
|
previous: {
|
|
122376
123225
|
spend: number | null;
|
|
@@ -122397,6 +123246,11 @@ interface components {
|
|
|
122397
123246
|
outcome_counts: {
|
|
122398
123247
|
[key: string]: number;
|
|
122399
123248
|
};
|
|
123249
|
+
/** @description PIPELINE, never cash (not in `revenue` / `roas`): the period’s closes (`closed_won` — a clinic’s accepted plans, a dealer’s closed sales) that the attribution engine credited to an ad, with the value Vitrina recorded for them (CLP). On `current` only. `null` = unknown (the credit is still warming); absent on `previous` and on the sample. */
|
|
123250
|
+
attributed_pipeline?: {
|
|
123251
|
+
closed_count: number;
|
|
123252
|
+
closed_value: number;
|
|
123253
|
+
} | null;
|
|
122400
123254
|
};
|
|
122401
123255
|
/** @description `grain=day` only: every day of the window, oldest first. */
|
|
122402
123256
|
days?: components["schemas"]["AdsOverviewDay"][];
|
|
@@ -122436,7 +123290,7 @@ interface components {
|
|
|
122436
123290
|
campaign_name: string;
|
|
122437
123291
|
campaign_external_id: string | null;
|
|
122438
123292
|
spend: number;
|
|
122439
|
-
/** @description Conversions the attribution engine credits to this campaign over the period, under `model` —
|
|
123293
|
+
/** @description Conversions the attribution engine credits to this campaign over the period, under `model`. Today the engine counts CASH conversions only (payments; `revenue_type = cash`) — a lead, a cita or an accepted plan without a payment is not in it, so a workspace with no payments recorded reads 0 on every row. Not the population of `/ads/overview` `attributed_outcomes` (every kind) nor of `closed_outcome_count`. */
|
|
122440
123294
|
outcome_count: number;
|
|
122441
123295
|
outcome_value: number;
|
|
122442
123296
|
roas: number;
|
|
@@ -122526,6 +123380,22 @@ interface components {
|
|
|
122526
123380
|
conversational?: components["schemas"]["AdsConversational"] & unknown;
|
|
122527
123381
|
}[];
|
|
122528
123382
|
};
|
|
123383
|
+
AdsSignalComponent: {
|
|
123384
|
+
/** @enum {string} */
|
|
123385
|
+
key: "meta" | "origin" | "site_tag";
|
|
123386
|
+
/** @enum {string} */
|
|
123387
|
+
status: "ok" | "partial" | "missing" | "skipped" | "unknown";
|
|
123388
|
+
/** @description Points earned; 0 when `skipped` or `unknown`. */
|
|
123389
|
+
earned: number;
|
|
123390
|
+
/** @description The component’s weight (meta 30, origin 40, site_tag 30); it counts toward the total unless the status is `skipped` or `unknown`. */
|
|
123391
|
+
max: number;
|
|
123392
|
+
};
|
|
123393
|
+
/** @description Vitrina’s own signal score with partial credit: the Meta connection, the share of results with their origin identified (proportional — the same population as `outcomes_coverage`) and the website tag (live full, sparse partial, never reported 0; skipped when the workspace has no website). Not the engine’s `trust.instrumentation.score`, which grades a web checkout only. */
|
|
123394
|
+
AdsSignalsScore: {
|
|
123395
|
+
/** @description Salud’s «Puntaje de señales», 0–100: the earned share of the components that could be judged. `null` when none could. */
|
|
123396
|
+
score: number | null;
|
|
123397
|
+
components: components["schemas"]["AdsSignalComponent"][];
|
|
123398
|
+
};
|
|
122529
123399
|
AdsHealth: {
|
|
122530
123400
|
trust: {
|
|
122531
123401
|
model: string;
|
|
@@ -122590,6 +123460,7 @@ interface components {
|
|
|
122590
123460
|
attributed_outcomes: number;
|
|
122591
123461
|
coverage_percent: number;
|
|
122592
123462
|
} | null;
|
|
123463
|
+
signals: components["schemas"]["AdsSignalsScore"];
|
|
122593
123464
|
};
|
|
122594
123465
|
AdsFact: {
|
|
122595
123466
|
/** @description Stable fact key (`roas`, `best_campaign_name`, …) — a vocabulary name, not a resource id. */
|