@vitrina/api 14.91.0 → 14.92.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -81412,7 +81412,7 @@ interface paths {
81412
81412
  put?: never;
81413
81413
  /**
81414
81414
  * Create a treatment plan by hand
81415
- * @description Accepting a presupuesto creates one automatically; this is the path for a plan that never had a quote.
81415
+ * @description Accepting a presupuesto creates one automatically; this is the path for a plan that never had a quote. Clinical authoring: accepts `clinic_money:write` or `clinic_record:write` (items carry no price); a clinical-only caller must be able to open the patient's ficha.
81416
81416
  *
81417
81417
  * **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`.
81418
81418
  */
@@ -82082,6 +82082,223 @@ interface paths {
82082
82082
  };
82083
82083
  trace?: never;
82084
82084
  };
82085
+ "/clinic/treatment-plans/{id}/items": {
82086
+ parameters: {
82087
+ query?: never;
82088
+ header?: never;
82089
+ path?: never;
82090
+ cookie?: never;
82091
+ };
82092
+ get?: never;
82093
+ put?: never;
82094
+ /**
82095
+ * Add prestaciones to an open plan
82096
+ * @description Clinical authoring (an odontograma finding, a new phase): accepts `clinic_money:write` or `clinic_record:write`. Items carry no price — a presupuesto prices them. A clinical-only caller must be able to open the patient's ficha (own patients). A completed or abandoned plan answers 409 `clinic_plan_closed`.
82097
+ *
82098
+ * **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`.
82099
+ */
82100
+ post: {
82101
+ parameters: {
82102
+ query?: never;
82103
+ header?: {
82104
+ /** @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. */
82105
+ "Idempotency-Key"?: string;
82106
+ };
82107
+ path: {
82108
+ id: string;
82109
+ };
82110
+ cookie?: never;
82111
+ };
82112
+ requestBody?: {
82113
+ content: {
82114
+ /**
82115
+ * @example {
82116
+ * "items": [
82117
+ * {
82118
+ * "clinic_service_id": "4cf5bc59-0000-4000-8000-000000000001",
82119
+ * "quantity": 1,
82120
+ * "tooth_or_zone": {
82121
+ * "fdi": [
82122
+ * 16
82123
+ * ]
82124
+ * }
82125
+ * }
82126
+ * ]
82127
+ * }
82128
+ */
82129
+ "application/json": {
82130
+ items: {
82131
+ /** Format: uuid */
82132
+ clinic_service_id: string;
82133
+ phase?: number;
82134
+ /** @default 1 */
82135
+ quantity?: number;
82136
+ tooth_or_zone?: {
82137
+ [key: string]: unknown;
82138
+ } | null;
82139
+ }[];
82140
+ };
82141
+ };
82142
+ };
82143
+ responses: {
82144
+ /** @description Treatment plan */
82145
+ 201: {
82146
+ headers: {
82147
+ [name: string]: unknown;
82148
+ };
82149
+ content: {
82150
+ /**
82151
+ * @example {
82152
+ * "data": {
82153
+ * "id": "1ccffee2-0000-4000-8000-000000000001",
82154
+ * "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
82155
+ * "source": "native",
82156
+ * "external_id": null,
82157
+ * "clinic_patient_id": "b1b0b8de-0000-4000-8000-000000000001",
82158
+ * "name": "Ortodoncia fija superior e inferior",
82159
+ * "diagnosis": "Apiñamiento anterosuperior moderado",
82160
+ * "professional_id": "18342d1b-0000-4000-8000-000000000001",
82161
+ * "status": "proposed",
82162
+ * "accepted_at": null,
82163
+ * "completed_at": null,
82164
+ * "abandoned_reason": null,
82165
+ * "created_at": "2026-09-22T22:21:15.213Z",
82166
+ * "updated_at": "2026-09-22T22:21:15.285Z",
82167
+ * "patient_name": "María José Fuentes Lagos",
82168
+ * "professional_name": "Ana Rojas Vidal",
82169
+ * "items": [
82170
+ * {
82171
+ * "id": "3a7d9767-0000-4000-8000-000000000002",
82172
+ * "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
82173
+ * "treatment_plan_id": "1ccffee2-0000-4000-8000-000000000001",
82174
+ * "clinic_service_id": "4cf5bc59-0000-4000-8000-000000000001",
82175
+ * "phase": 1,
82176
+ * "quantity": 4,
82177
+ * "tooth_or_zone": null,
82178
+ * "status": "scheduled",
82179
+ * "appointment_id": "d93e8eec-0000-4000-8000-000000000001",
82180
+ * "budget_item_id": null,
82181
+ * "sort_order": 0,
82182
+ * "created_at": "2026-09-22T22:21:15.215Z",
82183
+ * "updated_at": "2026-09-22T22:21:15.337Z",
82184
+ * "service_name": "Control de ortodoncia"
82185
+ * },
82186
+ * {
82187
+ * "id": "3a7d9767-0000-4000-8000-000000000003",
82188
+ * "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
82189
+ * "treatment_plan_id": "1ccffee2-0000-4000-8000-000000000001",
82190
+ * "clinic_service_id": "4cf5bc59-0000-4000-8000-000000000002",
82191
+ * "phase": 2,
82192
+ * "quantity": 1,
82193
+ * "tooth_or_zone": null,
82194
+ * "status": "pending",
82195
+ * "appointment_id": null,
82196
+ * "budget_item_id": null,
82197
+ * "sort_order": 1,
82198
+ * "created_at": "2026-09-22T22:21:15.215Z",
82199
+ * "updated_at": "2026-09-22T22:21:15.215Z",
82200
+ * "service_name": "Limpieza dental"
82201
+ * }
82202
+ * ],
82203
+ * "progress": {
82204
+ * "pending": 1,
82205
+ * "scheduled": 4,
82206
+ * "performed": 0,
82207
+ * "cancelled": 0,
82208
+ * "active": 5,
82209
+ * "percent": 0,
82210
+ * "phases": [
82211
+ * {
82212
+ * "phase": 1,
82213
+ * "pending": 0,
82214
+ * "scheduled": 4,
82215
+ * "performed": 0,
82216
+ * "cancelled": 0,
82217
+ * "active": 4,
82218
+ * "percent": 0
82219
+ * },
82220
+ * {
82221
+ * "phase": 2,
82222
+ * "pending": 1,
82223
+ * "scheduled": 0,
82224
+ * "performed": 0,
82225
+ * "cancelled": 0,
82226
+ * "active": 1,
82227
+ * "percent": 0
82228
+ * }
82229
+ * ],
82230
+ * "current_phase": 1
82231
+ * }
82232
+ * }
82233
+ * }
82234
+ */
82235
+ "application/json": {
82236
+ data?: unknown;
82237
+ };
82238
+ };
82239
+ };
82240
+ /** @description Validation error */
82241
+ 400: {
82242
+ headers: {
82243
+ [name: string]: unknown;
82244
+ };
82245
+ content: {
82246
+ "application/json": components["schemas"]["Error"];
82247
+ };
82248
+ };
82249
+ /** @description Unauthorized */
82250
+ 401: {
82251
+ headers: {
82252
+ [name: string]: unknown;
82253
+ };
82254
+ content: {
82255
+ "application/json": components["schemas"]["Error"];
82256
+ };
82257
+ };
82258
+ /** @description Forbidden */
82259
+ 403: {
82260
+ headers: {
82261
+ [name: string]: unknown;
82262
+ };
82263
+ content: {
82264
+ "application/json": components["schemas"]["Error"];
82265
+ };
82266
+ };
82267
+ /** @description Not found */
82268
+ 404: {
82269
+ headers: {
82270
+ [name: string]: unknown;
82271
+ };
82272
+ content: {
82273
+ "application/json": components["schemas"]["Error"];
82274
+ };
82275
+ };
82276
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
82277
+ 409: {
82278
+ headers: {
82279
+ [name: string]: unknown;
82280
+ };
82281
+ content: {
82282
+ "application/json": components["schemas"]["Error"];
82283
+ };
82284
+ };
82285
+ /** @description Rate limited */
82286
+ 429: {
82287
+ headers: {
82288
+ [name: string]: unknown;
82289
+ };
82290
+ content: {
82291
+ "application/json": components["schemas"]["Error"];
82292
+ };
82293
+ };
82294
+ };
82295
+ };
82296
+ delete?: never;
82297
+ options?: never;
82298
+ head?: never;
82299
+ patch?: never;
82300
+ trace?: never;
82301
+ };
82085
82302
  "/clinic/treatment-plan-items/{id}/status": {
82086
82303
  parameters: {
82087
82304
  query?: never;
@@ -95905,6 +96122,8 @@ interface paths {
95905
96122
  to?: string;
95906
96123
  limit?: number;
95907
96124
  allow_overbook?: boolean | null;
96125
+ duration_minutes?: number;
96126
+ include_past?: boolean | null;
95908
96127
  };
95909
96128
  header?: never;
95910
96129
  path?: never;
@@ -96018,6 +96237,126 @@ interface paths {
96018
96237
  patch?: never;
96019
96238
  trace?: never;
96020
96239
  };
96240
+ "/clinic/agenda/open-plans": {
96241
+ parameters: {
96242
+ query?: never;
96243
+ header?: never;
96244
+ path?: never;
96245
+ cookie?: never;
96246
+ };
96247
+ /**
96248
+ * A patient's open treatment plans, for booking a cita into one
96249
+ * @description The patient's plans de tratamiento that are not closed (draft, proposed, accepted, in progress), newest first, each with its professional. `suggested_plan_id` is the plan a booking with `professional_id` joins when no plan is named: the newest open plan with that professional; null means the booking opens a new one. Same shape as the Dentalink/Medilink read, so one plan step serves every engine. Requires `clinic:read`.
96250
+ *
96251
+ * **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`.
96252
+ */
96253
+ get: {
96254
+ parameters: {
96255
+ query: {
96256
+ patient_id: string;
96257
+ professional_id?: string;
96258
+ };
96259
+ header?: never;
96260
+ path?: never;
96261
+ cookie?: never;
96262
+ };
96263
+ requestBody?: never;
96264
+ responses: {
96265
+ /** @description Open plans */
96266
+ 200: {
96267
+ headers: {
96268
+ [name: string]: unknown;
96269
+ };
96270
+ content: {
96271
+ /**
96272
+ * @example {
96273
+ * "paciente_id": "5b0f8a54-3a43-4c1a-9a51-0e7d3c2f9a10",
96274
+ * "plans": [
96275
+ * {
96276
+ * "id": "9d1c2b3a-4e5f-4a6b-8c7d-1e2f3a4b5c6d",
96277
+ * "nombre": "Ortodoncia",
96278
+ * "profesional_id": "0a1b2c3d-4e5f-4a6b-9c8d-7e6f5a4b3c2d",
96279
+ * "profesional_nombre": "Diego Araya",
96280
+ * "fecha": "2026-09-14",
96281
+ * "total": null,
96282
+ * "deuda": null
96283
+ * }
96284
+ * ],
96285
+ * "suggested_plan_id": "9d1c2b3a-4e5f-4a6b-8c7d-1e2f3a4b5c6d"
96286
+ * }
96287
+ */
96288
+ "application/json": {
96289
+ data?: unknown;
96290
+ meta?: {
96291
+ [key: string]: unknown;
96292
+ };
96293
+ };
96294
+ };
96295
+ };
96296
+ /** @description Validation error */
96297
+ 400: {
96298
+ headers: {
96299
+ [name: string]: unknown;
96300
+ };
96301
+ content: {
96302
+ "application/json": components["schemas"]["Error"];
96303
+ };
96304
+ };
96305
+ /** @description Unauthorized */
96306
+ 401: {
96307
+ headers: {
96308
+ [name: string]: unknown;
96309
+ };
96310
+ content: {
96311
+ "application/json": components["schemas"]["Error"];
96312
+ };
96313
+ };
96314
+ /** @description Forbidden */
96315
+ 403: {
96316
+ headers: {
96317
+ [name: string]: unknown;
96318
+ };
96319
+ content: {
96320
+ "application/json": components["schemas"]["Error"];
96321
+ };
96322
+ };
96323
+ /** @description Not found */
96324
+ 404: {
96325
+ headers: {
96326
+ [name: string]: unknown;
96327
+ };
96328
+ content: {
96329
+ "application/json": components["schemas"]["Error"];
96330
+ };
96331
+ };
96332
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
96333
+ 409: {
96334
+ headers: {
96335
+ [name: string]: unknown;
96336
+ };
96337
+ content: {
96338
+ "application/json": components["schemas"]["Error"];
96339
+ };
96340
+ };
96341
+ /** @description Rate limited */
96342
+ 429: {
96343
+ headers: {
96344
+ [name: string]: unknown;
96345
+ };
96346
+ content: {
96347
+ "application/json": components["schemas"]["Error"];
96348
+ };
96349
+ };
96350
+ };
96351
+ };
96352
+ put?: never;
96353
+ post?: never;
96354
+ delete?: never;
96355
+ options?: never;
96356
+ head?: never;
96357
+ patch?: never;
96358
+ trace?: never;
96359
+ };
96021
96360
  "/clinic/agenda/appointments": {
96022
96361
  parameters: {
96023
96362
  query?: never;
@@ -96029,7 +96368,7 @@ interface paths {
96029
96368
  put?: never;
96030
96369
  /**
96031
96370
  * Book a cita in the diary Vitrina owns
96032
- * @description Routes through the tenant's booking engine, so a vendor clinic gets its own engine's honest refusal rather than a local row the vendor never hears about. Pass either the `slot_ref` from `GET /clinic/agenda/availability` or a `professional_id` outright (a drag-to-create on the grid has no ref). One transaction: the cita, its prestación line with the duration and price FROZEN, and — when a deposit policy applies — the `customer_obligation` the ledger settles against. A collision is refused with `slot_taken` and fresh alternatives unless `allow_overbook` is set, which also requires a reason: a sobrecupo nobody can explain is indistinguishable from a double booking. On a native clinic the cita joins a plan de tratamiento the way Dentalink does it: the patient's newest open plan with the same professional, else a new plan «Diagnóstico» (`treatment_plan_id` on the row); pass `treatment_plan_id` to book into a plan of your choice (the patient's own, not closed — else `invalid_treatment_plan`). A prestación with eligible professionals set refuses anyone else (`professional_not_eligible`). Requires `clinic:write`, which no connected app holds by default.
96371
+ * @description Routes through the tenant's booking engine, so a vendor clinic gets its own engine's honest refusal rather than a local row the vendor never hears about. Pass either the `slot_ref` from `GET /clinic/agenda/availability` or a `professional_id` outright (a drag-to-create on the grid has no ref). One transaction: the cita, its prestación line with the duration and price FROZEN, and — when a deposit policy applies — the `customer_obligation` the ledger settles against. A collision is refused with `slot_taken` and fresh alternatives unless `allow_overbook` is set, which also requires a reason: a sobrecupo nobody can explain is indistinguishable from a double booking. On a native clinic the cita joins a plan de tratamiento the way Dentalink does it: the patient's newest open plan with the same professional, else a new plan «Diagnóstico» (`treatment_plan_id` on the row); pass `treatment_plan_id` to book into a plan of your choice (the patient's own, not closed — else `invalid_treatment_plan`), or `new_treatment_plan: true` to open a new plan named after the visit type even when an open one exists. `duration_minutes` (staff) books a length other than the visit type's: the cita ends `starts_at` + it. A prestación with eligible professionals set refuses anyone else (`professional_not_eligible`). Requires `clinic:write`, which no connected app holds by default.
96033
96372
  *
96034
96373
  * **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`.
96035
96374
  */
@@ -96080,6 +96419,9 @@ interface paths {
96080
96419
  overbook_reason?: string;
96081
96420
  /** Format: uuid */
96082
96421
  treatment_plan_id?: string;
96422
+ new_treatment_plan?: boolean;
96423
+ duration_minutes?: number;
96424
+ confirm_past?: boolean;
96083
96425
  };
96084
96426
  };
96085
96427
  };
@@ -96266,6 +96608,8 @@ interface paths {
96266
96608
  starts_at: string;
96267
96609
  ends_at: string;
96268
96610
  allow_overbook?: boolean;
96611
+ duration_minutes?: number;
96612
+ confirm_past?: boolean;
96269
96613
  };
96270
96614
  };
96271
96615
  };
@@ -109434,7 +109778,7 @@ interface paths {
109434
109778
  };
109435
109779
  /**
109436
109780
  * Ingresos: producción, presupuestado and recaudación by day
109437
- * @description «Ingresos» (D56) for a Dentalink / Medilink clinic (revenue mirror on; otherwise `state: unavailable`). Per day: producción (performed plan lines by fecha de realización), presupuestado (plans issued, header total, evaluación included, as the vendor's panel) and recaudación (live payments by fecha de recepción), each split `nuevos` (the patient's primera visita starts in that month) vs `tratamiento`. `hoy` carries today's three numbers whatever the window. `by_professional`: producción by PERFORMER; presupuestos, aceptación and monto aceptado by the QUOTING professional under Números comerciales' acceptance rule ($0 and evaluación-only presupuestos out); abonado = paid so far on the plans issued in the period; new patients presented / accepted. Default window: the current month to today. With `professional_id` recaudación is `null` (a payment names no professional). Every day and the totals also carry `by_origen` (D77): the three flows split Meta / Orgánico / Sin dato by the shared person-origin resolver; `origin` narrows the whole report to one Origen. Requires `clinic_money:read`, or `clinic_insights:read` (the Consultor seat, D76: the payload is aggregates only). Accepts `from` / `to` (bare `YYYY-MM-DD`, `to` INCLUSIVE), `location_id` and `professional_id`. The default window is the 90 days ending today in the clinic's own zone. A `professional_id` that is not yours is a 404, never an empty report. Also reachable with `clinic_insights:read` — the aggregates-only «Consultor» role (spec #2441 D11) — in addition to the scope named above. A caller WITHOUT the report’s own scope never receives a patient-identifiable row (`inasistencias.citas` and `packs.expiring` come back empty with `aggregate_only: true` and `rows_withheld` naming the field) and reads the minimum-count floor: always the last 3 closed calendar months with no professional or sucursal filter, whatever was asked (`suppression.filters_ignored`); a count or CLP resting on 1–4 cases is `null`; a rate over fewer than 5 cases, or whose numerator is withheld, is `null`; list rows that add up to a shown total get complementary suppression and leave the list (`suppression.withheld_rows`); per-professional/prestación/weekday outcome rows and per-channel confirmation rows carry rates only; producción serves no per-prestación rows (they nest inside the categorías); clinic-wide cash over whole months stays while its slices are floored. `suppression.min_count` is the floor.
109781
+ * @description «Ingresos» (D56). A NATIVE clinic reads Vitrina's own ledger (`source.kind: native`, #5367): producción = the service lines of attended citas by the cita's day, presupuestado = presupuesto lineages first sent that day at the latest version's total, recaudación = live payments by fecha de pago, acceptance = the folio's explicit acceptance. A Dentalink / Medilink clinic with the revenue mirror on reads the mirror (`source.kind: mirror`): producción (performed plan lines by fecha de realización), presupuestado (plans issued, header total, evaluación included, as the vendor's panel) and recaudación (live payments by fecha de recepción). Anything else is `state: unavailable`. Each flow per day is split `nuevos` (the patient's primera visita starts in that month) vs `tratamiento`. `hoy` carries today's three numbers whatever the window. `by_professional`: producción by PERFORMER; presupuestos, aceptación and monto aceptado by the QUOTING professional under Números comerciales' acceptance rule ($0 and evaluación-only presupuestos out); abonado = paid so far on the plans issued in the period; new patients presented / accepted. Default window: the current month to today. With `professional_id` recaudación is `null` (a payment names no professional). Every day and the totals also carry `by_origen` (D77): the three flows split Meta / Orgánico / Sin dato by the shared person-origin resolver; `origin` narrows the whole report to one Origen. Requires `clinic_money:read`, or `clinic_insights:read` (the Consultor seat, D76: the payload is aggregates only). Accepts `from` / `to` (bare `YYYY-MM-DD`, `to` INCLUSIVE), `location_id` and `professional_id`. The default window is the 90 days ending today in the clinic's own zone. A `professional_id` that is not yours is a 404, never an empty report. Also reachable with `clinic_insights:read` — the aggregates-only «Consultor» role (spec #2441 D11) — in addition to the scope named above. A caller WITHOUT the report’s own scope never receives a patient-identifiable row (`inasistencias.citas` and `packs.expiring` come back empty with `aggregate_only: true` and `rows_withheld` naming the field) and reads the minimum-count floor: always the last 3 closed calendar months with no professional or sucursal filter, whatever was asked (`suppression.filters_ignored`); a count or CLP resting on 1–4 cases is `null`; a rate over fewer than 5 cases, or whose numerator is withheld, is `null`; list rows that add up to a shown total get complementary suppression and leave the list (`suppression.withheld_rows`); per-professional/prestación/weekday outcome rows and per-channel confirmation rows carry rates only; producción serves no per-prestación rows (they nest inside the categorías); clinic-wide cash over whole months stays while its slices are floored. `suppression.min_count` is the floor.
109438
109782
  *
109439
109783
  * **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`.
109440
109784
  */
@@ -128755,6 +129099,133 @@ interface paths {
128755
129099
  patch?: never;
128756
129100
  trace?: never;
128757
129101
  };
129102
+ "/conversations/{id}/media/sign": {
129103
+ parameters: {
129104
+ query?: never;
129105
+ header?: never;
129106
+ path?: never;
129107
+ cookie?: never;
129108
+ };
129109
+ get?: never;
129110
+ put?: never;
129111
+ /**
129112
+ * Sign conversation media urls for a short-lived read
129113
+ * @description Stored media urls (`message.media_urls`, `media_playback`) are references, not links: the public media proxy answers `403` to an unsigned url and `410` to an expired one (vitrina-app#5263). Trade them here for urls that work for 15 minutes (`expires_at`), then sign again — a client re-signs before expiry, or on a `410`.
129114
+ *
129115
+ * Only urls whose object belongs to THIS conversation are signed; one from another thread comes back with `error: "forbidden"`. A url that is not conversation media (a channel CDN link) is echoed back in `signed_url` with `expires_at: null`. A healthcare workspace's urls are served `Cache-Control: no-store`. Never log or persist a signed url: it is a bearer credential until it expires.
129116
+ */
129117
+ post: {
129118
+ parameters: {
129119
+ query?: never;
129120
+ header?: {
129121
+ /** @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. */
129122
+ "Idempotency-Key"?: string;
129123
+ };
129124
+ path: {
129125
+ id: string;
129126
+ };
129127
+ cookie?: never;
129128
+ };
129129
+ requestBody?: {
129130
+ content: {
129131
+ /**
129132
+ * @example {
129133
+ * "urls": [
129134
+ * "https://api.vitrina.example/api/v1/public/conversation-media/bbbbbbbb-0000-4000-8000-000000000001/0b7f2c51-voice.ogg"
129135
+ * ]
129136
+ * }
129137
+ */
129138
+ "application/json": {
129139
+ urls: string[];
129140
+ };
129141
+ };
129142
+ };
129143
+ responses: {
129144
+ /** @description One row per url, in request order */
129145
+ 200: {
129146
+ headers: {
129147
+ [name: string]: unknown;
129148
+ };
129149
+ content: {
129150
+ /**
129151
+ * @example [
129152
+ * {
129153
+ * "url": "https://api.vitrina.example/api/v1/public/conversation-media/bbbbbbbb-0000-4000-8000-000000000001/0b7f2c51-voice.ogg",
129154
+ * "signed_url": "https://api.vitrina.example/api/v1/public/conversation-media/bbbbbbbb-0000-4000-8000-000000000001/0b7f2c51-voice.ogg?exp=1793000000&g=s&ns=1&sig=REDACTED",
129155
+ * "expires_at": "2026-10-23T12:15:00.000Z"
129156
+ * }
129157
+ * ]
129158
+ */
129159
+ "application/json": {
129160
+ data?: unknown;
129161
+ meta?: {
129162
+ [key: string]: unknown;
129163
+ };
129164
+ };
129165
+ };
129166
+ };
129167
+ /** @description Validation error */
129168
+ 400: {
129169
+ headers: {
129170
+ [name: string]: unknown;
129171
+ };
129172
+ content: {
129173
+ "application/json": components["schemas"]["Error"];
129174
+ };
129175
+ };
129176
+ /** @description Unauthorized */
129177
+ 401: {
129178
+ headers: {
129179
+ [name: string]: unknown;
129180
+ };
129181
+ content: {
129182
+ "application/json": components["schemas"]["Error"];
129183
+ };
129184
+ };
129185
+ /** @description Forbidden */
129186
+ 403: {
129187
+ headers: {
129188
+ [name: string]: unknown;
129189
+ };
129190
+ content: {
129191
+ "application/json": components["schemas"]["Error"];
129192
+ };
129193
+ };
129194
+ /** @description Not found */
129195
+ 404: {
129196
+ headers: {
129197
+ [name: string]: unknown;
129198
+ };
129199
+ content: {
129200
+ "application/json": components["schemas"]["Error"];
129201
+ };
129202
+ };
129203
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
129204
+ 409: {
129205
+ headers: {
129206
+ [name: string]: unknown;
129207
+ };
129208
+ content: {
129209
+ "application/json": components["schemas"]["Error"];
129210
+ };
129211
+ };
129212
+ /** @description Rate limited */
129213
+ 429: {
129214
+ headers: {
129215
+ [name: string]: unknown;
129216
+ };
129217
+ content: {
129218
+ "application/json": components["schemas"]["Error"];
129219
+ };
129220
+ };
129221
+ };
129222
+ };
129223
+ delete?: never;
129224
+ options?: never;
129225
+ head?: never;
129226
+ patch?: never;
129227
+ trace?: never;
129228
+ };
128758
129229
  "/custom-attributes": {
128759
129230
  parameters: {
128760
129231
  query?: never;
@@ -135814,12 +136285,12 @@ interface paths {
135814
136285
  };
135815
136286
  /**
135816
136287
  * List Recontacto attempts (ledger and review queue)
135817
- * @description One row per cadence rung. `exhausted` means the rung spent its evaluation budget without ever reaching the customer — never read it as "we chased them". `waiting_template` means it is parked on a WhatsApp template in Meta review: no budget spent, the ladder did not move, and the template hooks own the row.
136288
+ * @description One row per cadence rung. `exhausted` means the rung spent its evaluation budget without ever reaching the customer — never read it as "we chased them". `waiting_template` means it is parked on a WhatsApp template in Meta review: no budget spent, the ladder did not move, and the template hooks own the row. `queued` is an overdue step held by the backlog rule (G24): it waits for its release slot (at most 10 per workspace per day), is never composed and never counts as a try until released; `release_estimate_at` says when it is expected to go out.
135818
136289
  */
135819
136290
  get: {
135820
136291
  parameters: {
135821
136292
  query?: {
135822
- status?: "proposed" | "dismissed" | "sent" | "failed" | "skipped" | "exhausted" | "waiting_template";
136293
+ status?: "proposed" | "dismissed" | "sent" | "failed" | "skipped" | "exhausted" | "waiting_template" | "queued";
135823
136294
  situation?: "never_replied" | "stalled" | "lost" | "unanswered_message";
135824
136295
  contact_id?: string;
135825
136296
  lead_id?: string;
@@ -199300,7 +199771,7 @@ interface paths {
199300
199771
  };
199301
199772
  /**
199302
199773
  * List the workspace’s custom roles
199303
- * @description Newest first, with a `total`. Unpaginated — a workspace has a handful of custom roles. Built-in tiers are not returned: they are not rows on this table.
199774
+ * @description Newest first, with a `total`. Unpaginated — a workspace has a handful of custom roles. Built-in tiers are not returned: they are not rows on this table. On a clinic workspace the list always includes the packaged seats (`preset_key` `clinic_reception` | `clinic_professional`; the third, Administración, is the built-in `admin` tier), created on first list; their permissions are managed by Vitrina (editing them, or deleting the role, is a **409**).
199304
199775
  */
199305
199776
  get: {
199306
199777
  parameters: {
@@ -199411,7 +199882,7 @@ interface paths {
199411
199882
  * Create a custom role
199412
199883
  * @description `scopes` is optional; omitting it creates an EMPTY role, which grants nothing and is accepted. Only known, non-owner-only permissions are allowed — the wildcard `*`, an unknown string and the owner-only scopes (`billing:write`, `tenant:delete`) are all a **400**.
199413
199884
  *
199414
- * `record_visibility` is `all` | `assigned_unassigned` | `assigned` and narrows conversations, tickets and leads by assignee. `stock_visibility` is `all` | `own_locations` and narrows VEHICLE reads to the sucursales on the member’s own `workspace_member.location_ids` — a member on an `own_locations` role with no sucursales sees no stock at all, and a vehicle with no `location_id` is invisible to such a member by definition. `project_visibility` (Módulo Proyectos) is `all` | `sales_office` | `assigned` and narrows LEADS (and the proyectos list) to the proyectos the member works: `assigned` = the proyectos they are assigned to (ejecutivo de ventas), `sales_office` = those plus every proyecto served by a sala de ventas on their `location_ids` (jefe de sala). A lead the member owns stays visible. All three default to `all`. `max_discount_percent` (Módulo Proyectos) is the role’s límite de descuento: the largest effective discount, in percent over the list total, a member on the role may send on a cotización without approval. `null` (the default) is no limit; above the limit a member holding `cotizacion_discount:approve` must approve first.
199885
+ * `record_visibility` is `all` | `assigned_unassigned` | `assigned` and narrows conversations, tickets and leads by assignee. `stock_visibility` is `all` | `own_locations` and narrows VEHICLE reads to the sucursales on the member’s own `workspace_member.location_ids` — a member on an `own_locations` role with no sucursales sees no stock at all, and a vehicle with no `location_id` is invisible to such a member by definition. `project_visibility` (Módulo Proyectos) is `all` | `sales_office` | `assigned` and narrows LEADS (and the proyectos list) to the proyectos the member works: `assigned` = the proyectos they are assigned to (ejecutivo de ventas), `sales_office` = those plus every proyecto served by a sala de ventas on their `location_ids` (jefe de sala). A lead the member owns stays visible. All three default to `all`. `max_discount_percent` (Módulo Proyectos) is the role’s límite de descuento: the largest effective discount, in percent over the list total, a member on the role may send on a cotización without approval. `null` (the default) is no limit; above the limit a member holding `cotizacion_discount:approve` must approve first. `clinic_record_visibility` (clinics) is `all` | `own_patients`: with `own_patients` a `clinic_record:read` holder opens only the clinical records of patients their linked professional attended or is assigned to (lifted by the clinic setting `clinic_records_shared_across_professionals`).
199415
199886
  *
199416
199887
  * Every field is priced against the caller’s own access: a scope you do not hold, a `record_visibility` wider than yours, or a `stock_visibility` or `project_visibility` wider than yours is a **403**. Owners and unrestricted admins are unaffected — the ceilings can only ever bite a caller who is themselves restricted. A narrowly-scoped `sk_` key cannot set `record_visibility` at all (a credential carries no such ceiling of its own, so there is nothing to bound the grant against); use a signed-in user.
199417
199888
  */
@@ -199451,6 +199922,8 @@ interface paths {
199451
199922
  stock_visibility?: "all" | "own_locations";
199452
199923
  /** @enum {string} */
199453
199924
  project_visibility?: "all" | "sales_office" | "assigned";
199925
+ /** @enum {string} */
199926
+ clinic_record_visibility?: "all" | "own_patients";
199454
199927
  max_discount_percent?: number | null;
199455
199928
  };
199456
199929
  };
@@ -199667,7 +200140,7 @@ interface paths {
199667
200140
  *
199668
200141
  * The change takes effect on the next request of every member already on the role, including the caller.
199669
200142
  *
199670
- * `record_visibility` is `all` | `assigned_unassigned` | `assigned` and narrows conversations, tickets and leads by assignee. `stock_visibility` is `all` | `own_locations` and narrows VEHICLE reads to the sucursales on the member’s own `workspace_member.location_ids` — a member on an `own_locations` role with no sucursales sees no stock at all, and a vehicle with no `location_id` is invisible to such a member by definition. `project_visibility` (Módulo Proyectos) is `all` | `sales_office` | `assigned` and narrows LEADS (and the proyectos list) to the proyectos the member works: `assigned` = the proyectos they are assigned to (ejecutivo de ventas), `sales_office` = those plus every proyecto served by a sala de ventas on their `location_ids` (jefe de sala). A lead the member owns stays visible. All three default to `all`. `max_discount_percent` (Módulo Proyectos) is the role’s límite de descuento: the largest effective discount, in percent over the list total, a member on the role may send on a cotización without approval. `null` (the default) is no limit; above the limit a member holding `cotizacion_discount:approve` must approve first.
200143
+ * `record_visibility` is `all` | `assigned_unassigned` | `assigned` and narrows conversations, tickets and leads by assignee. `stock_visibility` is `all` | `own_locations` and narrows VEHICLE reads to the sucursales on the member’s own `workspace_member.location_ids` — a member on an `own_locations` role with no sucursales sees no stock at all, and a vehicle with no `location_id` is invisible to such a member by definition. `project_visibility` (Módulo Proyectos) is `all` | `sales_office` | `assigned` and narrows LEADS (and the proyectos list) to the proyectos the member works: `assigned` = the proyectos they are assigned to (ejecutivo de ventas), `sales_office` = those plus every proyecto served by a sala de ventas on their `location_ids` (jefe de sala). A lead the member owns stays visible. All three default to `all`. `max_discount_percent` (Módulo Proyectos) is the role’s límite de descuento: the largest effective discount, in percent over the list total, a member on the role may send on a cotización without approval. `null` (the default) is no limit; above the limit a member holding `cotizacion_discount:approve` must approve first. `clinic_record_visibility` (clinics) is `all` | `own_patients`: with `own_patients` a `clinic_record:read` holder opens only the clinical records of patients their linked professional attended or is assigned to (lifted by the clinic setting `clinic_records_shared_across_professionals`).
199671
200144
  *
199672
200145
  * Every field is priced against the caller’s own access: a scope you do not hold, a `record_visibility` wider than yours, or a `stock_visibility` or `project_visibility` wider than yours is a **403**. Owners and unrestricted admins are unaffected — the ceilings can only ever bite a caller who is themselves restricted. A narrowly-scoped `sk_` key cannot set `record_visibility` at all (a credential carries no such ceiling of its own, so there is nothing to bound the grant against); use a signed-in user.
199673
200146
  */
@@ -199698,6 +200171,8 @@ interface paths {
199698
200171
  stock_visibility?: "all" | "own_locations";
199699
200172
  /** @enum {string} */
199700
200173
  project_visibility?: "all" | "sales_office" | "assigned";
200174
+ /** @enum {string} */
200175
+ clinic_record_visibility?: "all" | "own_patients";
199701
200176
  max_discount_percent?: number | null;
199702
200177
  };
199703
200178
  };
@@ -215666,6 +216141,288 @@ interface paths {
215666
216141
  patch?: never;
215667
216142
  trace?: never;
215668
216143
  };
216144
+ "/clinic/booking-roster": {
216145
+ parameters: {
216146
+ query?: never;
216147
+ header?: never;
216148
+ path?: never;
216149
+ cookie?: never;
216150
+ };
216151
+ /**
216152
+ * «Nueva cita» pickers from Vitrina (professionals + visit types)
216153
+ * @description The active professionals and the bookable visit types of the clinic, read from Vitrina's own tables for every engine (never the vendor live). `synced_at` says how fresh the vendor roster is. Ids are the ones each engine's booking takes (see the schema).
216154
+ *
216155
+ * **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`.
216156
+ */
216157
+ get: {
216158
+ parameters: {
216159
+ query?: never;
216160
+ header?: never;
216161
+ path?: never;
216162
+ cookie?: never;
216163
+ };
216164
+ requestBody?: never;
216165
+ responses: {
216166
+ /** @description Booking roster */
216167
+ 200: {
216168
+ headers: {
216169
+ [name: string]: unknown;
216170
+ };
216171
+ content: {
216172
+ /**
216173
+ * @example {
216174
+ * "data": {
216175
+ * "engine": "healthatom",
216176
+ * "synced_at": "2026-10-23T12:00:00.000Z",
216177
+ * "professionals": [
216178
+ * {
216179
+ * "id": "b6a1c2d3-0000-4000-8000-000000000001",
216180
+ * "external_id": "12",
216181
+ * "nombre": "Dra. Camila Rojas",
216182
+ * "especialidad": "Ortodoncia",
216183
+ * "especialidades": [
216184
+ * "Ortodoncia"
216185
+ * ],
216186
+ * "sucursal_ids": [
216187
+ * "1"
216188
+ * ],
216189
+ * "intervalo_minutes": 30,
216190
+ * "agenda_online": true
216191
+ * }
216192
+ * ],
216193
+ * "services": [
216194
+ * {
216195
+ * "id": "c7b2d3e4-0000-4000-8000-000000000002",
216196
+ * "kind": "motivo",
216197
+ * "external_id": "501",
216198
+ * "nombre": "Evaluación de ortodoncia",
216199
+ * "categoria": "Ortodoncia",
216200
+ * "especialidad": "Ortodoncia",
216201
+ * "duracion": 30,
216202
+ * "profesionales": [
216203
+ * "12"
216204
+ * ],
216205
+ * "duraciones": {
216206
+ * "12": 30
216207
+ * }
216208
+ * }
216209
+ * ]
216210
+ * }
216211
+ * }
216212
+ */
216213
+ "application/json": {
216214
+ data: components["schemas"]["BookingRoster"];
216215
+ };
216216
+ };
216217
+ };
216218
+ /** @description Validation error */
216219
+ 400: {
216220
+ headers: {
216221
+ [name: string]: unknown;
216222
+ };
216223
+ content: {
216224
+ "application/json": components["schemas"]["Error"];
216225
+ };
216226
+ };
216227
+ /** @description Unauthorized */
216228
+ 401: {
216229
+ headers: {
216230
+ [name: string]: unknown;
216231
+ };
216232
+ content: {
216233
+ "application/json": components["schemas"]["Error"];
216234
+ };
216235
+ };
216236
+ /** @description Forbidden */
216237
+ 403: {
216238
+ headers: {
216239
+ [name: string]: unknown;
216240
+ };
216241
+ content: {
216242
+ "application/json": components["schemas"]["Error"];
216243
+ };
216244
+ };
216245
+ /** @description Not found */
216246
+ 404: {
216247
+ headers: {
216248
+ [name: string]: unknown;
216249
+ };
216250
+ content: {
216251
+ "application/json": components["schemas"]["Error"];
216252
+ };
216253
+ };
216254
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
216255
+ 409: {
216256
+ headers: {
216257
+ [name: string]: unknown;
216258
+ };
216259
+ content: {
216260
+ "application/json": components["schemas"]["Error"];
216261
+ };
216262
+ };
216263
+ /** @description Rate limited */
216264
+ 429: {
216265
+ headers: {
216266
+ [name: string]: unknown;
216267
+ };
216268
+ content: {
216269
+ "application/json": components["schemas"]["Error"];
216270
+ };
216271
+ };
216272
+ };
216273
+ };
216274
+ put?: never;
216275
+ post?: never;
216276
+ delete?: never;
216277
+ options?: never;
216278
+ head?: never;
216279
+ patch?: never;
216280
+ trace?: never;
216281
+ };
216282
+ "/clinic/booking-roster/refresh": {
216283
+ parameters: {
216284
+ query?: never;
216285
+ header?: never;
216286
+ path?: never;
216287
+ cookie?: never;
216288
+ };
216289
+ get?: never;
216290
+ put?: never;
216291
+ /**
216292
+ * Re-read the vendor's roster now («Actualizar»)
216293
+ * @description HealthAtom: re-reads the professionals roster now (`done`). Reservo: queues the account sync (`queued`). Native, or a refresh in the last minute: `not_needed`. Always answers with the roster as it stands.
216294
+ *
216295
+ * **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`.
216296
+ */
216297
+ post: {
216298
+ parameters: {
216299
+ query?: never;
216300
+ header?: {
216301
+ /** @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. */
216302
+ "Idempotency-Key"?: string;
216303
+ };
216304
+ path?: never;
216305
+ cookie?: never;
216306
+ };
216307
+ requestBody?: never;
216308
+ responses: {
216309
+ /** @description Refresh outcome and the roster */
216310
+ 200: {
216311
+ headers: {
216312
+ [name: string]: unknown;
216313
+ };
216314
+ content: {
216315
+ /**
216316
+ * @example {
216317
+ * "data": {
216318
+ * "status": "done",
216319
+ * "roster": {
216320
+ * "engine": "healthatom",
216321
+ * "synced_at": "2026-10-23T12:00:00.000Z",
216322
+ * "professionals": [
216323
+ * {
216324
+ * "id": "b6a1c2d3-0000-4000-8000-000000000001",
216325
+ * "external_id": "12",
216326
+ * "nombre": "Dra. Camila Rojas",
216327
+ * "especialidad": "Ortodoncia",
216328
+ * "especialidades": [
216329
+ * "Ortodoncia"
216330
+ * ],
216331
+ * "sucursal_ids": [
216332
+ * "1"
216333
+ * ],
216334
+ * "intervalo_minutes": 30,
216335
+ * "agenda_online": true
216336
+ * }
216337
+ * ],
216338
+ * "services": [
216339
+ * {
216340
+ * "id": "c7b2d3e4-0000-4000-8000-000000000002",
216341
+ * "kind": "motivo",
216342
+ * "external_id": "501",
216343
+ * "nombre": "Evaluación de ortodoncia",
216344
+ * "categoria": "Ortodoncia",
216345
+ * "especialidad": "Ortodoncia",
216346
+ * "duracion": 30,
216347
+ * "profesionales": [
216348
+ * "12"
216349
+ * ],
216350
+ * "duraciones": {
216351
+ * "12": 30
216352
+ * }
216353
+ * }
216354
+ * ]
216355
+ * }
216356
+ * }
216357
+ * }
216358
+ */
216359
+ "application/json": {
216360
+ data: components["schemas"]["BookingRosterRefresh"];
216361
+ };
216362
+ };
216363
+ };
216364
+ /** @description Validation error */
216365
+ 400: {
216366
+ headers: {
216367
+ [name: string]: unknown;
216368
+ };
216369
+ content: {
216370
+ "application/json": components["schemas"]["Error"];
216371
+ };
216372
+ };
216373
+ /** @description Unauthorized */
216374
+ 401: {
216375
+ headers: {
216376
+ [name: string]: unknown;
216377
+ };
216378
+ content: {
216379
+ "application/json": components["schemas"]["Error"];
216380
+ };
216381
+ };
216382
+ /** @description Forbidden */
216383
+ 403: {
216384
+ headers: {
216385
+ [name: string]: unknown;
216386
+ };
216387
+ content: {
216388
+ "application/json": components["schemas"]["Error"];
216389
+ };
216390
+ };
216391
+ /** @description Not found */
216392
+ 404: {
216393
+ headers: {
216394
+ [name: string]: unknown;
216395
+ };
216396
+ content: {
216397
+ "application/json": components["schemas"]["Error"];
216398
+ };
216399
+ };
216400
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
216401
+ 409: {
216402
+ headers: {
216403
+ [name: string]: unknown;
216404
+ };
216405
+ content: {
216406
+ "application/json": components["schemas"]["Error"];
216407
+ };
216408
+ };
216409
+ /** @description Rate limited */
216410
+ 429: {
216411
+ headers: {
216412
+ [name: string]: unknown;
216413
+ };
216414
+ content: {
216415
+ "application/json": components["schemas"]["Error"];
216416
+ };
216417
+ };
216418
+ };
216419
+ };
216420
+ delete?: never;
216421
+ options?: never;
216422
+ head?: never;
216423
+ patch?: never;
216424
+ trace?: never;
216425
+ };
215669
216426
  "/clinic/professionals": {
215670
216427
  parameters: {
215671
216428
  query?: never;
@@ -216279,6 +217036,11 @@ interface paths {
216279
217036
  charges_with?: "company_invoice" | "fee_receipt" | null;
216280
217037
  company_legal_name?: string | null;
216281
217038
  company_rut?: string | null;
217039
+ /**
217040
+ * Format: uuid
217041
+ * @description The workspace member who IS this professional (a member of this workspace, or null to unlink). Decides whose clinical records a member on an own-patients role opens. Vitrina-owned: editable on any source. Requires `clinic_admin:write`.
217042
+ */
217043
+ user_id?: string | null;
216282
217044
  };
216283
217045
  };
216284
217046
  };
@@ -220223,6 +220985,7 @@ interface components {
220223
220985
  charges_with: "company_invoice" | "fee_receipt" | null;
220224
220986
  company_legal_name: string | null;
220225
220987
  company_rut: string | null;
220988
+ user_id: string | null;
220226
220989
  schedule: {
220227
220990
  [key: string]: {
220228
220991
  inicio: string;
@@ -221883,8 +222646,11 @@ interface components {
221883
222646
  state: "ready" | "unavailable";
221884
222647
  state_reason: string | null;
221885
222648
  source: {
221886
- /** @enum {string} */
221887
- kind: "mirror" | "none";
222649
+ /**
222650
+ * @description `native`: Vitrina's own agenda and caja (a native clinic). `mirror`: the Dentalink / Medilink revenue mirror. `none`: neither (`state: unavailable`).
222651
+ * @enum {string}
222652
+ */
222653
+ kind: "mirror" | "native" | "none";
221888
222654
  synced_at: string | null;
221889
222655
  };
221890
222656
  rules: {
@@ -230620,6 +231386,53 @@ interface components {
230620
231386
  /** @description The Flow JSON, as a string. */
230621
231387
  flow_json: string;
230622
231388
  };
231389
+ BookingRosterProfessional: {
231390
+ /**
231391
+ * Format: uuid
231392
+ * @description clinic_professional.id
231393
+ */
231394
+ id: string;
231395
+ /** @description The vendor's id — HealthAtom `profesional_id` for /healthatom/slots and POST /healthatom/citas; Reservo agenda id; null when native. */
231396
+ external_id: string | null;
231397
+ nombre: string;
231398
+ especialidad: string | null;
231399
+ especialidades: string[];
231400
+ /** @description HealthAtom sucursal ids the professional works at; empty when the engine does not say. */
231401
+ sucursal_ids: string[];
231402
+ intervalo_minutes: number | null;
231403
+ agenda_online: boolean;
231404
+ };
231405
+ BookingRosterService: {
231406
+ /** @description The id the engine's booking takes: a motivo's uuid (HealthAtom `servicio_id`), a HealthAtom prestación's vendor id, or the clinic_service uuid (Reservo / native). */
231407
+ id: string;
231408
+ /** @enum {string} */
231409
+ kind: "motivo" | "service";
231410
+ external_id: string | null;
231411
+ nombre: string;
231412
+ categoria: string | null;
231413
+ especialidad: string | null;
231414
+ /** @description Minutes, when known. */
231415
+ duracion: number | null;
231416
+ /** @description Motivos: vendor ids of the professionals who attend it; empty = anyone. */
231417
+ profesionales: string[];
231418
+ /** @description Motivos: each professional's own length. */
231419
+ duraciones: {
231420
+ [key: string]: number | null;
231421
+ };
231422
+ };
231423
+ BookingRoster: {
231424
+ /** @enum {string} */
231425
+ engine: "healthatom" | "reservo" | "native";
231426
+ /** @description When the roster was last read from the vendor; null when native. */
231427
+ synced_at: string | null;
231428
+ professionals: components["schemas"]["BookingRosterProfessional"][];
231429
+ services: components["schemas"]["BookingRosterService"][];
231430
+ };
231431
+ BookingRosterRefresh: {
231432
+ /** @enum {string} */
231433
+ status: "done" | "queued" | "not_needed";
231434
+ roster: components["schemas"]["BookingRoster"];
231435
+ };
230623
231436
  ClinicServiceEntryFlagsResult: {
230624
231437
  updated: number;
230625
231438
  };
@@ -230773,7 +231586,7 @@ declare function createClient(opts: CreateClientOptions): VitrinaClient;
230773
231586
  * is regenerated — narrow on the ones you handle, never assume this
230774
231587
  * list is exhaustive at runtime.
230775
231588
  */
230776
- type ErrorCode = 'VALIDATION_ERROR' | 'NOT_FOUND' | 'UNAUTHORIZED' | 'FORBIDDEN' | 'CONFLICT' | 'ACCOUNT_DELETION_BLOCKED' | 'CONFIRMATION_REQUIRED' | 'VERSION_CONFLICT' | 'UNIQUE_CONFLICT' | 'IDEMPOTENCY_KEY_CONFLICT' | 'VERTICAL_NOT_ENABLED' | 'MODULE_NOT_ENABLED' | 'ENTITLEMENT_NOT_ACTIVE' | 'UNSUPPORTED_VEHICLE_TYPE' | 'VEHICLE_VALUE_OUT_OF_RANGE' | 'PRICE_CHANGE_CONFIRMATION_REQUIRED' | 'NO_OFFERING_ADAPTER' | 'PAYLOAD_TOO_LARGE' | 'UNSUPPORTED_MEDIA_TYPE' | 'UPSTREAM_ERROR' | 'RATE_LIMITED' | 'GONE' | 'INTERNAL_ERROR' | 'MESSAGING_ACCOUNT_TENANT_MISSING' | 'COPILOT_APPROVALS_UNAVAILABLE' | 'COPILOT_APPROVAL_REPLAY_BLOCKED' | 'COPILOT_DISABLED' | 'COPILOT_BUDGET_EXCEEDED' | 'DEALER_SITES_NOT_CONFIGURED' | 'STAGE_QUALIFIES_LEAD_NOT_ALLOWED' | 'STOREFRONT_ZONES_NOT_CONFIGURED' | 'RECONTACTO_NOT_ENABLED' | 'SYNC_QUEUE_UNAVAILABLE' | 'SHARE_IMAGE_UNAVAILABLE' | 'AUDIO_RENDITION_PENDING' | 'ATTRIBUTION_PROFILE_UNAVAILABLE' | 'DOCUMENT_LOGO_UNAVAILABLE' | 'ATTRIBUTION_PROFILE_MISMATCH' | 'ADS_KEY_NEEDS_REMINT' | 'ADS_ACTION_READ_UNAVAILABLE' | 'ADS_ACTION_REPLAY_BLOCKED' | 'ADS_ACTION_NOT_AVAILABLE' | 'ADS_ACTION_NOT_REVERSIBLE' | 'ADS_ACTION_CONSENT_REQUIRED' | 'GTM_NOT_CONFIGURED' | 'GTM_NOT_CONNECTED' | 'GTM_CONSENT_REQUIRED' | 'GTM_PERMISSION_DENIED' | 'GTM_CONTAINER_REQUIRED' | 'GTM_PENDING_CHANGES' | 'GTM_WORKSPACE_CONFLICT' | 'GTM_WORKSPACE_LIMIT' | 'MISSING_SIGNATURE' | 'MALFORMED_SIGNATURE' | 'STALE_SIGNATURE' | 'INVALID_SIGNATURE' | 'REPLAY_DETECTED' | 'TURNSTILE_UNAVAILABLE' | 'TASADOR_QUOTA_EXHAUSTED' | 'TASADOR_ANON_DAILY_LIMIT' | 'TASADOR_CAPACITY_REACHED' | 'CLINIC_PLAN_REQUIRED' | 'TENANT_BILLING_PAUSED';
231589
+ type ErrorCode = 'VALIDATION_ERROR' | 'NOT_FOUND' | 'UNAUTHORIZED' | 'FORBIDDEN' | 'CONFLICT' | 'ACCOUNT_DELETION_BLOCKED' | 'CONFIRMATION_REQUIRED' | 'VERSION_CONFLICT' | 'UNIQUE_CONFLICT' | 'IDEMPOTENCY_KEY_CONFLICT' | 'VERTICAL_NOT_ENABLED' | 'MODULE_NOT_ENABLED' | 'ENTITLEMENT_NOT_ACTIVE' | 'UNSUPPORTED_VEHICLE_TYPE' | 'VEHICLE_VALUE_OUT_OF_RANGE' | 'PRICE_CHANGE_CONFIRMATION_REQUIRED' | 'NO_OFFERING_ADAPTER' | 'PAYLOAD_TOO_LARGE' | 'UNSUPPORTED_MEDIA_TYPE' | 'UPSTREAM_ERROR' | 'RATE_LIMITED' | 'GONE' | 'INTERNAL_ERROR' | 'MESSAGING_ACCOUNT_TENANT_MISSING' | 'COPILOT_APPROVALS_UNAVAILABLE' | 'COPILOT_APPROVAL_REPLAY_BLOCKED' | 'COPILOT_DISABLED' | 'COPILOT_BUDGET_EXCEEDED' | 'DEALER_SITES_NOT_CONFIGURED' | 'STAGE_QUALIFIES_LEAD_NOT_ALLOWED' | 'STOREFRONT_ZONES_NOT_CONFIGURED' | 'RECONTACTO_NOT_ENABLED' | 'SYNC_QUEUE_UNAVAILABLE' | 'SHARE_IMAGE_UNAVAILABLE' | 'AUDIO_RENDITION_PENDING' | 'MEDIA_SIGNING_UNAVAILABLE' | 'ATTRIBUTION_PROFILE_UNAVAILABLE' | 'DOCUMENT_LOGO_UNAVAILABLE' | 'ATTRIBUTION_PROFILE_MISMATCH' | 'ADS_KEY_NEEDS_REMINT' | 'ADS_ACTION_READ_UNAVAILABLE' | 'ADS_ACTION_REPLAY_BLOCKED' | 'ADS_ACTION_NOT_AVAILABLE' | 'ADS_ACTION_NOT_REVERSIBLE' | 'ADS_ACTION_CONSENT_REQUIRED' | 'GTM_NOT_CONFIGURED' | 'GTM_NOT_CONNECTED' | 'GTM_CONSENT_REQUIRED' | 'GTM_PERMISSION_DENIED' | 'GTM_CONTAINER_REQUIRED' | 'GTM_PENDING_CHANGES' | 'GTM_WORKSPACE_CONFLICT' | 'GTM_WORKSPACE_LIMIT' | 'MISSING_SIGNATURE' | 'MALFORMED_SIGNATURE' | 'STALE_SIGNATURE' | 'INVALID_SIGNATURE' | 'REPLAY_DETECTED' | 'TURNSTILE_UNAVAILABLE' | 'TASADOR_QUOTA_EXHAUSTED' | 'TASADOR_ANON_DAILY_LIMIT' | 'TASADOR_CAPACITY_REACHED' | 'CLINIC_PLAN_REQUIRED' | 'TENANT_BILLING_PAUSED';
230777
231590
  declare const ERROR_CODES: readonly ErrorCode[];
230778
231591
 
230779
231592
  /**