@vitrina/api 14.44.0 → 14.45.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 +515 -10
- package/dist/index.d.ts +515 -10
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -17418,7 +17418,7 @@ interface paths {
|
|
|
17418
17418
|
*
|
|
17419
17419
|
* **Plate format.** For a road-registered type (`auto`, `camion`) a non-empty registration_number must be a Chilean plate: AB1234 (old series), BCDF12 (new series: consonants only, no M/N/Q), or for motorcycles AB123 / BCD12; separators, case and a trailing registry check digit are tolerated. Anything else is a 400 VALIDATION_ERROR with `details.reason = "plate_format_invalid"` and a Spanish `fieldErrors.registration_number`. An empty value and a pending declaration («en trámite») stay legal; `maquinaria`/`nautico` are not checked. Stock syncs from portals and feeds do not pass through this check.
|
|
17420
17420
|
*
|
|
17421
|
-
* **Publish in the same call (`publish_to`).** Optional. Name the marketplaces this vehicle should go to — portal slugs such as `chileautos` / `mercadolibre`, or integration ids from GET /marketplaces — and it is published right after it is saved, through the same path as POST /vehicles/{id}/publish. Omitted or `[]` saves only; there is no default. Every entry is validated first: a portal with no connected account, a slug matching several accounts, or an id from another workspace answers **422 and nothing is saved**. Once saved, the vehicle stays saved: a portal that fails to publish is an `error` entry in `publications`, never a failed request (still 201). The response then carries `publications`, one `PublishOutcome` per account (`published`, `pending` for queued transports such as `chileautos_panel
|
|
17421
|
+
* **Publish in the same call (`publish_to`).** Optional. Name the marketplaces this vehicle should go to — portal slugs such as `chileautos` / `mercadolibre`, or integration ids from GET /marketplaces — and it is published right after it is saved, through the same path as POST /vehicles/{id}/publish. Omitted or `[]` saves only; there is no default. Every entry is validated first: a portal with no connected account, a slug matching several accounts, or an id from another workspace answers **422 and nothing is saved**. Once saved, the vehicle stays saved: a portal that fails to publish is an `error` entry in `publications`, never a failed request (still 201). The response then carries `publications`, one `PublishOutcome` per account (`published`, `pending` for queued transports such as `chileautos_panel`, `already_published`, or `error` with the reason). `publications` is absent when `publish_to` was not sent.
|
|
17422
17422
|
*
|
|
17423
17423
|
* **Sanity range.** A price fans out to every connected portal, so a typo is stopped here. `price_amount` must be between 100.000 and 2.000.000.000 CLP (a UF price is bounded at the day's UF; other currencies are not bounded) and `odometer_value` between 0 and 2.000.000; `null` clears either and is always accepted. Outside the range: **422 `VEHICLE_VALUE_OUT_OF_RANGE`**, with a Spanish `message`, `field_errors.<field>` and `details.violations[]` (`field`, `reason` = `price_out_of_range` | `km_out_of_range`, `value`, `min`, `max`, `currency`). A price change beyond 10x up or down from the current price answers **422 `PRICE_CHANGE_CONFIRMATION_REQUIRED`** (`details.reason` = `large_price_change`, `current_price`, `requested_price`, `currency`, `factor`, `confirm_flag`) unless the body carries `confirm_large_price_change: true`; ask the user, then resend the same body with it. Nothing is written on either 422.
|
|
17424
17424
|
*
|
|
@@ -17511,7 +17511,7 @@ interface paths {
|
|
|
17511
17511
|
/** Format: uuid */
|
|
17512
17512
|
responsible_user_id?: string | null;
|
|
17513
17513
|
/**
|
|
17514
|
-
* @description OPTIONAL. Marketplaces to publish this vehicle to right after it is saved — the same effect as a follow-up POST /vehicles/{id}/publish, in one call. Omitted or `[]` means save only and publish nowhere: there is no default and no tenant-level setting. Each entry is either a portal slug (`chileautos`, `chileautos_panel`, `
|
|
17514
|
+
* @description OPTIONAL. Marketplaces to publish this vehicle to right after it is saved — the same effect as a follow-up POST /vehicles/{id}/publish, in one call. Omitted or `[]` means save only and publish nowhere: there is no default and no tenant-level setting. Each entry is either a portal slug (`chileautos`, `chileautos_panel`, `linze`, `mercadolibre`, `yapo`) or a marketplace integration id (the `id` of a row from GET /marketplaces). A portal slug resolves to the connected account the workspace has for that portal, whichever transport it uses (`chileautos` reaches the certified API account or the `chileautos_panel` account). Every entry is validated BEFORE the vehicle is written, and any bad entry answers 422 with nothing saved: a slug with no connected account, a slug matching more than one account (pass the integration id instead), an id that is not one of this workspace's accounts, or a portal that does not accept this vehicle type. Entries resolving to the same account are deduplicated. A portal FAILING to publish never fails the save — see `publications` in the response. On PUT, `publish_to` only ADDS portals: a portal where the vehicle is already live or queued is a no-op (`already_published`), never a second ad, and a portal left out is NOT unpublished — removal is DELETE /vehicles/{id}/publications/{pubId}.
|
|
17515
17515
|
* @example [
|
|
17516
17516
|
* "chileautos",
|
|
17517
17517
|
* "mercadolibre"
|
|
@@ -18161,7 +18161,7 @@ interface paths {
|
|
|
18161
18161
|
/** Format: uuid */
|
|
18162
18162
|
responsible_user_id?: string | null;
|
|
18163
18163
|
/**
|
|
18164
|
-
* @description OPTIONAL. Marketplaces to publish this vehicle to right after it is saved — the same effect as a follow-up POST /vehicles/{id}/publish, in one call. Omitted or `[]` means save only and publish nowhere: there is no default and no tenant-level setting. Each entry is either a portal slug (`chileautos`, `chileautos_panel`, `
|
|
18164
|
+
* @description OPTIONAL. Marketplaces to publish this vehicle to right after it is saved — the same effect as a follow-up POST /vehicles/{id}/publish, in one call. Omitted or `[]` means save only and publish nowhere: there is no default and no tenant-level setting. Each entry is either a portal slug (`chileautos`, `chileautos_panel`, `linze`, `mercadolibre`, `yapo`) or a marketplace integration id (the `id` of a row from GET /marketplaces). A portal slug resolves to the connected account the workspace has for that portal, whichever transport it uses (`chileautos` reaches the certified API account or the `chileautos_panel` account). Every entry is validated BEFORE the vehicle is written, and any bad entry answers 422 with nothing saved: a slug with no connected account, a slug matching more than one account (pass the integration id instead), an id that is not one of this workspace's accounts, or a portal that does not accept this vehicle type. Entries resolving to the same account are deduplicated. A portal FAILING to publish never fails the save — see `publications` in the response. On PUT, `publish_to` only ADDS portals: a portal where the vehicle is already live or queued is a no-op (`already_published`), never a second ad, and a portal left out is NOT unpublished — removal is DELETE /vehicles/{id}/publications/{pubId}.
|
|
18165
18165
|
* @example [
|
|
18166
18166
|
* "chileautos",
|
|
18167
18167
|
* "mercadolibre"
|
|
@@ -20096,9 +20096,9 @@ interface paths {
|
|
|
20096
20096
|
* Publish a vehicle to one or more connected marketplaces
|
|
20097
20097
|
* @description One round trip per portal named in `integration_ids`, and the response is a per-integration outcome list — a 200 does not mean every portal accepted the ad. `status` is `published` (Vitrina pushed or updated the ad), `already_published` (the double-publish guard found a live ad on this (vehicle, integration) that Vitrina did not itself push — nothing was sent, nothing was duplicated) or `error` (`error` names why).
|
|
20098
20098
|
*
|
|
20099
|
-
*
|
|
20099
|
+
* **Facebook Marketplace does not publish.** Vitrina only answers its buyers; naming a `facebook_marketplace` integration here answers `error`, and `facebook` is not a `publish_to` slug.
|
|
20100
20100
|
*
|
|
20101
|
-
* **Chileautos (Panel) (`chileautos_panel`) is asynchronous
|
|
20101
|
+
* **Chileautos (Panel) (`chileautos_panel`) is asynchronous.** It is driven through a browser session on the dealer’s control panel, which only Vitrina’s scraper workers can run, so this call answers `status: "pending"` the instant the job is queued (the publication row reads `pending`, or `updating` when the ad already exists). Same polling and webhooks as above; the row turns `published` or `error` (with `last_error`), usually within a few minutes.
|
|
20102
20102
|
*/
|
|
20103
20103
|
post: {
|
|
20104
20104
|
parameters: {
|
|
@@ -20171,16 +20171,16 @@ interface paths {
|
|
|
20171
20171
|
* },
|
|
20172
20172
|
* {
|
|
20173
20173
|
* "integration_id": "33333333-0000-4000-8000-000000000002",
|
|
20174
|
-
* "provider": "
|
|
20174
|
+
* "provider": "chileautos_panel",
|
|
20175
20175
|
* "status": "pending",
|
|
20176
|
-
* "external_id":
|
|
20176
|
+
* "external_id": null,
|
|
20177
20177
|
* "publication": {
|
|
20178
20178
|
* "id": "88888888-0000-4000-8000-000000000002",
|
|
20179
20179
|
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
20180
20180
|
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
20181
20181
|
* "marketplace_account_id": "33333333-0000-4000-8000-000000000002",
|
|
20182
|
-
* "provider": "
|
|
20183
|
-
* "external_id":
|
|
20182
|
+
* "provider": "chileautos_panel",
|
|
20183
|
+
* "external_id": null,
|
|
20184
20184
|
* "status": "pending",
|
|
20185
20185
|
* "origin": "vitrina",
|
|
20186
20186
|
* "permalink": null,
|
|
@@ -27016,6 +27016,251 @@ interface paths {
|
|
|
27016
27016
|
patch?: never;
|
|
27017
27017
|
trace?: never;
|
|
27018
27018
|
};
|
|
27019
|
+
"/leads/{id}/first-touch": {
|
|
27020
|
+
parameters: {
|
|
27021
|
+
query?: never;
|
|
27022
|
+
header?: never;
|
|
27023
|
+
path?: never;
|
|
27024
|
+
cookie?: never;
|
|
27025
|
+
};
|
|
27026
|
+
/**
|
|
27027
|
+
* One lead's first-touch outcome
|
|
27028
|
+
* @description Whether the proactive first message for this lead went out, and if not, why: `status` (`none` = never attempted, `pending`, `sent`, `skipped`, `error`), the `skip_reason` (`invalid_phone` carries the number the portal delivered in `skip_evidence.raw_phone`), the classified `error_class`/`error_code` of a failed send (`undeliverable` = WhatsApp could not reach the number), the conversation it opened, and the contact's current phone with `phone_dialable`. `retryable` says whether `POST /leads/{id}/first-touch/retry` would be accepted; `retry_blocked_reason` names why not (`already_sent`, `in_progress`, `do_not_contact`, `source_disabled`, `no_contact`).
|
|
27029
|
+
*/
|
|
27030
|
+
get: {
|
|
27031
|
+
parameters: {
|
|
27032
|
+
query?: never;
|
|
27033
|
+
header?: never;
|
|
27034
|
+
path: {
|
|
27035
|
+
id: string;
|
|
27036
|
+
};
|
|
27037
|
+
cookie?: never;
|
|
27038
|
+
};
|
|
27039
|
+
requestBody?: never;
|
|
27040
|
+
responses: {
|
|
27041
|
+
/** @description Lead first-touch state */
|
|
27042
|
+
200: {
|
|
27043
|
+
headers: {
|
|
27044
|
+
[name: string]: unknown;
|
|
27045
|
+
};
|
|
27046
|
+
content: {
|
|
27047
|
+
/**
|
|
27048
|
+
* @example {
|
|
27049
|
+
* "data": {
|
|
27050
|
+
* "status": "skipped",
|
|
27051
|
+
* "skip_reason": "invalid_phone",
|
|
27052
|
+
* "skip_evidence": {
|
|
27053
|
+
* "raw_phone": "+90773361"
|
|
27054
|
+
* },
|
|
27055
|
+
* "error_class": null,
|
|
27056
|
+
* "error_code": null,
|
|
27057
|
+
* "conversation_id": null,
|
|
27058
|
+
* "source": "chileautos",
|
|
27059
|
+
* "contact_id": "01a14658-50d7-764b-89dd-601c87c24fd7",
|
|
27060
|
+
* "phone": "+90773361",
|
|
27061
|
+
* "phone_dialable": false,
|
|
27062
|
+
* "retryable": true,
|
|
27063
|
+
* "retry_blocked_reason": null
|
|
27064
|
+
* }
|
|
27065
|
+
* }
|
|
27066
|
+
*/
|
|
27067
|
+
"application/json": {
|
|
27068
|
+
data?: unknown;
|
|
27069
|
+
meta?: {
|
|
27070
|
+
[key: string]: unknown;
|
|
27071
|
+
};
|
|
27072
|
+
};
|
|
27073
|
+
};
|
|
27074
|
+
};
|
|
27075
|
+
/** @description Validation error */
|
|
27076
|
+
400: {
|
|
27077
|
+
headers: {
|
|
27078
|
+
[name: string]: unknown;
|
|
27079
|
+
};
|
|
27080
|
+
content: {
|
|
27081
|
+
"application/json": components["schemas"]["Error"];
|
|
27082
|
+
};
|
|
27083
|
+
};
|
|
27084
|
+
/** @description Unauthorized */
|
|
27085
|
+
401: {
|
|
27086
|
+
headers: {
|
|
27087
|
+
[name: string]: unknown;
|
|
27088
|
+
};
|
|
27089
|
+
content: {
|
|
27090
|
+
"application/json": components["schemas"]["Error"];
|
|
27091
|
+
};
|
|
27092
|
+
};
|
|
27093
|
+
/** @description Forbidden */
|
|
27094
|
+
403: {
|
|
27095
|
+
headers: {
|
|
27096
|
+
[name: string]: unknown;
|
|
27097
|
+
};
|
|
27098
|
+
content: {
|
|
27099
|
+
"application/json": components["schemas"]["Error"];
|
|
27100
|
+
};
|
|
27101
|
+
};
|
|
27102
|
+
/** @description Not found */
|
|
27103
|
+
404: {
|
|
27104
|
+
headers: {
|
|
27105
|
+
[name: string]: unknown;
|
|
27106
|
+
};
|
|
27107
|
+
content: {
|
|
27108
|
+
"application/json": components["schemas"]["Error"];
|
|
27109
|
+
};
|
|
27110
|
+
};
|
|
27111
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
27112
|
+
409: {
|
|
27113
|
+
headers: {
|
|
27114
|
+
[name: string]: unknown;
|
|
27115
|
+
};
|
|
27116
|
+
content: {
|
|
27117
|
+
"application/json": components["schemas"]["Error"];
|
|
27118
|
+
};
|
|
27119
|
+
};
|
|
27120
|
+
/** @description Rate limited */
|
|
27121
|
+
429: {
|
|
27122
|
+
headers: {
|
|
27123
|
+
[name: string]: unknown;
|
|
27124
|
+
};
|
|
27125
|
+
content: {
|
|
27126
|
+
"application/json": components["schemas"]["Error"];
|
|
27127
|
+
};
|
|
27128
|
+
};
|
|
27129
|
+
};
|
|
27130
|
+
};
|
|
27131
|
+
put?: never;
|
|
27132
|
+
post?: never;
|
|
27133
|
+
delete?: never;
|
|
27134
|
+
options?: never;
|
|
27135
|
+
head?: never;
|
|
27136
|
+
patch?: never;
|
|
27137
|
+
trace?: never;
|
|
27138
|
+
};
|
|
27139
|
+
"/leads/{id}/first-touch/retry": {
|
|
27140
|
+
parameters: {
|
|
27141
|
+
query?: never;
|
|
27142
|
+
header?: never;
|
|
27143
|
+
path?: never;
|
|
27144
|
+
cookie?: never;
|
|
27145
|
+
};
|
|
27146
|
+
get?: never;
|
|
27147
|
+
put?: never;
|
|
27148
|
+
/**
|
|
27149
|
+
* Send the first message again, after fixing the buyer phone
|
|
27150
|
+
* @description Re-runs the proactive first touch for a lead whose first attempt was skipped or failed — typically because the portal delivered a phone WhatsApp cannot reach. Pass `phone` to correct the contact first (it must pass the dial gate: E.164 or a 9-digit Chilean number, else 400 `invalid_phone`). Uses the configured template and account of the lead's source, reopens the buyer's original inquiry as the context card, and answers with the rail's outcome: `sent` with the new `conversation_id`, or `sent: false` with the `reason` (`burst_skip`, `no_template`, `daily_cap`, …). 409 with the blocking reason when the first touch already went out, is in flight, the person asked not to be contacted, or the source is off.
|
|
27151
|
+
*/
|
|
27152
|
+
post: {
|
|
27153
|
+
parameters: {
|
|
27154
|
+
query?: never;
|
|
27155
|
+
header?: {
|
|
27156
|
+
/** @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. */
|
|
27157
|
+
"Idempotency-Key"?: string;
|
|
27158
|
+
};
|
|
27159
|
+
path: {
|
|
27160
|
+
id: string;
|
|
27161
|
+
};
|
|
27162
|
+
cookie?: never;
|
|
27163
|
+
};
|
|
27164
|
+
requestBody?: {
|
|
27165
|
+
content: {
|
|
27166
|
+
/**
|
|
27167
|
+
* @example {
|
|
27168
|
+
* "phone": "+56990773361"
|
|
27169
|
+
* }
|
|
27170
|
+
*/
|
|
27171
|
+
"application/json": {
|
|
27172
|
+
/** @description Corrected buyer phone, applied to the contact before the retry. E.164 (`+56990773361`) or a 9-digit Chilean national number. */
|
|
27173
|
+
phone?: string;
|
|
27174
|
+
};
|
|
27175
|
+
};
|
|
27176
|
+
};
|
|
27177
|
+
responses: {
|
|
27178
|
+
/** @description First-touch retry outcome */
|
|
27179
|
+
200: {
|
|
27180
|
+
headers: {
|
|
27181
|
+
[name: string]: unknown;
|
|
27182
|
+
};
|
|
27183
|
+
content: {
|
|
27184
|
+
/**
|
|
27185
|
+
* @example {
|
|
27186
|
+
* "data": {
|
|
27187
|
+
* "sent": true,
|
|
27188
|
+
* "reason": null,
|
|
27189
|
+
* "conversation_id": "c0c0c0c0-0000-4000-8000-000000000459",
|
|
27190
|
+
* "phone": "+56990773361"
|
|
27191
|
+
* }
|
|
27192
|
+
* }
|
|
27193
|
+
*/
|
|
27194
|
+
"application/json": {
|
|
27195
|
+
data?: unknown;
|
|
27196
|
+
meta?: {
|
|
27197
|
+
[key: string]: unknown;
|
|
27198
|
+
};
|
|
27199
|
+
};
|
|
27200
|
+
};
|
|
27201
|
+
};
|
|
27202
|
+
/** @description Validation error */
|
|
27203
|
+
400: {
|
|
27204
|
+
headers: {
|
|
27205
|
+
[name: string]: unknown;
|
|
27206
|
+
};
|
|
27207
|
+
content: {
|
|
27208
|
+
"application/json": components["schemas"]["Error"];
|
|
27209
|
+
};
|
|
27210
|
+
};
|
|
27211
|
+
/** @description Unauthorized */
|
|
27212
|
+
401: {
|
|
27213
|
+
headers: {
|
|
27214
|
+
[name: string]: unknown;
|
|
27215
|
+
};
|
|
27216
|
+
content: {
|
|
27217
|
+
"application/json": components["schemas"]["Error"];
|
|
27218
|
+
};
|
|
27219
|
+
};
|
|
27220
|
+
/** @description Forbidden */
|
|
27221
|
+
403: {
|
|
27222
|
+
headers: {
|
|
27223
|
+
[name: string]: unknown;
|
|
27224
|
+
};
|
|
27225
|
+
content: {
|
|
27226
|
+
"application/json": components["schemas"]["Error"];
|
|
27227
|
+
};
|
|
27228
|
+
};
|
|
27229
|
+
/** @description Not found */
|
|
27230
|
+
404: {
|
|
27231
|
+
headers: {
|
|
27232
|
+
[name: string]: unknown;
|
|
27233
|
+
};
|
|
27234
|
+
content: {
|
|
27235
|
+
"application/json": components["schemas"]["Error"];
|
|
27236
|
+
};
|
|
27237
|
+
};
|
|
27238
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
27239
|
+
409: {
|
|
27240
|
+
headers: {
|
|
27241
|
+
[name: string]: unknown;
|
|
27242
|
+
};
|
|
27243
|
+
content: {
|
|
27244
|
+
"application/json": components["schemas"]["Error"];
|
|
27245
|
+
};
|
|
27246
|
+
};
|
|
27247
|
+
/** @description Rate limited */
|
|
27248
|
+
429: {
|
|
27249
|
+
headers: {
|
|
27250
|
+
[name: string]: unknown;
|
|
27251
|
+
};
|
|
27252
|
+
content: {
|
|
27253
|
+
"application/json": components["schemas"]["Error"];
|
|
27254
|
+
};
|
|
27255
|
+
};
|
|
27256
|
+
};
|
|
27257
|
+
};
|
|
27258
|
+
delete?: never;
|
|
27259
|
+
options?: never;
|
|
27260
|
+
head?: never;
|
|
27261
|
+
patch?: never;
|
|
27262
|
+
trace?: never;
|
|
27263
|
+
};
|
|
27019
27264
|
"/leads/{id}/interests": {
|
|
27020
27265
|
parameters: {
|
|
27021
27266
|
query?: never;
|
|
@@ -184101,7 +184346,7 @@ interface paths {
|
|
|
184101
184346
|
};
|
|
184102
184347
|
/**
|
|
184103
184348
|
* List the clinic's services
|
|
184104
|
-
* @description The clinic's price list. `search` (min 2 chars) matches nombre, código or categoría accent-insensitively. `active` is OPTIONAL and omitting it returns every row. `precio` is the vendor LIST price before previsión/convenio — it is deliberately never shown to the AI agent. `is_entry` filters entry prestaciones, tri-state: `true` = entry (evaluación / diagnóstico), `false` = CONFIRMED treatment rows only, `unclassified` = nobody has said yet (`is_entry IS NULL`); omitted = every row. `arancel` (repeatable or comma-separated) keeps only rows priced in those vendor aranceles (`'0'` = «Arancel base»); each row carries `arancel_external_id` + `arancel_name`.
|
|
184349
|
+
* @description The clinic's price list. `search` (min 2 chars) matches nombre, código or categoría accent-insensitively. `active` is OPTIONAL and omitting it returns every row. `precio` is the vendor LIST price before previsión/convenio — it is deliberately never shown to the AI agent. `is_entry` filters entry prestaciones, tri-state: `true` = entry (evaluación / diagnóstico), `false` = CONFIRMED treatment rows only, `unclassified` = nobody has said yet (`is_entry IS NULL`); omitted = every row. `arancel` (repeatable or comma-separated) keeps only rows priced in those vendor aranceles (`'0'` = «Arancel base»); each row carries `arancel_external_id` + `arancel_name`. `categoria` keeps one exact category. `agent_bookable` (`yes` | `no`) filters on the EFFECTIVE agent-bookable value: each row carries the explicit `agent_bookable` (null = undecided) and `agent_bookable_effective` (`agent_bookable ?? settings.clinic_attendance.agent_bookable_default`, unset default = true).
|
|
184105
184350
|
*
|
|
184106
184351
|
* **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`.
|
|
184107
184352
|
*/
|
|
@@ -184113,6 +184358,8 @@ interface paths {
|
|
|
184113
184358
|
review_state?: "pending" | "stale" | "draft" | "reviewed";
|
|
184114
184359
|
is_entry?: "true" | "false" | "unclassified";
|
|
184115
184360
|
arancel?: string[] | null;
|
|
184361
|
+
categoria?: string;
|
|
184362
|
+
agent_bookable?: "yes" | "no";
|
|
184116
184363
|
sort?: "nombre" | "codigo" | "categoria" | "tipo" | "precio" | "synced_at";
|
|
184117
184364
|
dir?: "asc" | "desc";
|
|
184118
184365
|
page?: number;
|
|
@@ -184297,6 +184544,7 @@ interface paths {
|
|
|
184297
184544
|
is_telehealth?: boolean;
|
|
184298
184545
|
online_bookable?: boolean;
|
|
184299
184546
|
is_entry?: boolean | null;
|
|
184547
|
+
agent_bookable?: boolean | null;
|
|
184300
184548
|
lab_bearing?: boolean;
|
|
184301
184549
|
/** Format: uuid */
|
|
184302
184550
|
requires_consent_template_id?: string | null;
|
|
@@ -184526,6 +184774,239 @@ interface paths {
|
|
|
184526
184774
|
patch?: never;
|
|
184527
184775
|
trace?: never;
|
|
184528
184776
|
};
|
|
184777
|
+
"/clinic/services/agent-bookable-count": {
|
|
184778
|
+
parameters: {
|
|
184779
|
+
query?: never;
|
|
184780
|
+
header?: never;
|
|
184781
|
+
path?: never;
|
|
184782
|
+
cookie?: never;
|
|
184783
|
+
};
|
|
184784
|
+
/**
|
|
184785
|
+
* How many active prestaciones the AI agent may book
|
|
184786
|
+
* @description `{ bookable, reception_only, total }` over ACTIVE services, by the EFFECTIVE agent-bookable value (`agent_bookable`, or the tenant default `settings.clinic_attendance.agent_bookable_default` when the row is undecided). `arancel` (repeatable or comma-separated) counts only rows priced in those vendor aranceles.
|
|
184787
|
+
*
|
|
184788
|
+
* **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`.
|
|
184789
|
+
*/
|
|
184790
|
+
get: {
|
|
184791
|
+
parameters: {
|
|
184792
|
+
query?: {
|
|
184793
|
+
arancel?: string[] | null;
|
|
184794
|
+
};
|
|
184795
|
+
header?: never;
|
|
184796
|
+
path?: never;
|
|
184797
|
+
cookie?: never;
|
|
184798
|
+
};
|
|
184799
|
+
requestBody?: never;
|
|
184800
|
+
responses: {
|
|
184801
|
+
/** @description Agent-bookable split */
|
|
184802
|
+
200: {
|
|
184803
|
+
headers: {
|
|
184804
|
+
[name: string]: unknown;
|
|
184805
|
+
};
|
|
184806
|
+
content: {
|
|
184807
|
+
/**
|
|
184808
|
+
* @example {
|
|
184809
|
+
* "data": {
|
|
184810
|
+
* "bookable": 12,
|
|
184811
|
+
* "reception_only": 383,
|
|
184812
|
+
* "total": 395
|
|
184813
|
+
* }
|
|
184814
|
+
* }
|
|
184815
|
+
*/
|
|
184816
|
+
"application/json": {
|
|
184817
|
+
data: components["schemas"]["ClinicServiceAgentBookableCount"];
|
|
184818
|
+
};
|
|
184819
|
+
};
|
|
184820
|
+
};
|
|
184821
|
+
/** @description Validation error */
|
|
184822
|
+
400: {
|
|
184823
|
+
headers: {
|
|
184824
|
+
[name: string]: unknown;
|
|
184825
|
+
};
|
|
184826
|
+
content: {
|
|
184827
|
+
"application/json": components["schemas"]["Error"];
|
|
184828
|
+
};
|
|
184829
|
+
};
|
|
184830
|
+
/** @description Unauthorized */
|
|
184831
|
+
401: {
|
|
184832
|
+
headers: {
|
|
184833
|
+
[name: string]: unknown;
|
|
184834
|
+
};
|
|
184835
|
+
content: {
|
|
184836
|
+
"application/json": components["schemas"]["Error"];
|
|
184837
|
+
};
|
|
184838
|
+
};
|
|
184839
|
+
/** @description Forbidden */
|
|
184840
|
+
403: {
|
|
184841
|
+
headers: {
|
|
184842
|
+
[name: string]: unknown;
|
|
184843
|
+
};
|
|
184844
|
+
content: {
|
|
184845
|
+
"application/json": components["schemas"]["Error"];
|
|
184846
|
+
};
|
|
184847
|
+
};
|
|
184848
|
+
/** @description Not found */
|
|
184849
|
+
404: {
|
|
184850
|
+
headers: {
|
|
184851
|
+
[name: string]: unknown;
|
|
184852
|
+
};
|
|
184853
|
+
content: {
|
|
184854
|
+
"application/json": components["schemas"]["Error"];
|
|
184855
|
+
};
|
|
184856
|
+
};
|
|
184857
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
184858
|
+
409: {
|
|
184859
|
+
headers: {
|
|
184860
|
+
[name: string]: unknown;
|
|
184861
|
+
};
|
|
184862
|
+
content: {
|
|
184863
|
+
"application/json": components["schemas"]["Error"];
|
|
184864
|
+
};
|
|
184865
|
+
};
|
|
184866
|
+
/** @description Rate limited */
|
|
184867
|
+
429: {
|
|
184868
|
+
headers: {
|
|
184869
|
+
[name: string]: unknown;
|
|
184870
|
+
};
|
|
184871
|
+
content: {
|
|
184872
|
+
"application/json": components["schemas"]["Error"];
|
|
184873
|
+
};
|
|
184874
|
+
};
|
|
184875
|
+
};
|
|
184876
|
+
};
|
|
184877
|
+
put?: never;
|
|
184878
|
+
post?: never;
|
|
184879
|
+
delete?: never;
|
|
184880
|
+
options?: never;
|
|
184881
|
+
head?: never;
|
|
184882
|
+
patch?: never;
|
|
184883
|
+
trace?: never;
|
|
184884
|
+
};
|
|
184885
|
+
"/clinic/services/agent-bookable": {
|
|
184886
|
+
parameters: {
|
|
184887
|
+
query?: never;
|
|
184888
|
+
header?: never;
|
|
184889
|
+
path?: never;
|
|
184890
|
+
cookie?: never;
|
|
184891
|
+
};
|
|
184892
|
+
get?: never;
|
|
184893
|
+
put?: never;
|
|
184894
|
+
/**
|
|
184895
|
+
* Set which prestaciones the AI agent may book, in bulk
|
|
184896
|
+
* @description Sets `agent_bookable` to `value` — `true` (the agent may offer and book it), `false` (reception-only: the agent knows it exists, tells the patient reception schedules it and never books it) or `null` (back to the tenant default) — on up to 500 `ids`, OR on every row matching `all_matching` (the same filters, in the same string form, as the `GET /clinic/services` query). Exactly one of the two. Works on ANY source — the flag is Vitrina-owned and never reaches the vendor. `updated` is how many rows matched; ids of another tenant match nothing.
|
|
184897
|
+
*
|
|
184898
|
+
* **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`.
|
|
184899
|
+
*/
|
|
184900
|
+
post: {
|
|
184901
|
+
parameters: {
|
|
184902
|
+
query?: never;
|
|
184903
|
+
header?: {
|
|
184904
|
+
/** @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. */
|
|
184905
|
+
"Idempotency-Key"?: string;
|
|
184906
|
+
};
|
|
184907
|
+
path?: never;
|
|
184908
|
+
cookie?: never;
|
|
184909
|
+
};
|
|
184910
|
+
requestBody?: {
|
|
184911
|
+
content: {
|
|
184912
|
+
/**
|
|
184913
|
+
* @example {
|
|
184914
|
+
* "value": false,
|
|
184915
|
+
* "all_matching": {
|
|
184916
|
+
* "search": "control",
|
|
184917
|
+
* "active": "true",
|
|
184918
|
+
* "arancel": "0"
|
|
184919
|
+
* }
|
|
184920
|
+
* }
|
|
184921
|
+
*/
|
|
184922
|
+
"application/json": {
|
|
184923
|
+
value: boolean | null;
|
|
184924
|
+
ids?: string[];
|
|
184925
|
+
all_matching?: components["schemas"]["ClinicServiceMatchFilter"];
|
|
184926
|
+
};
|
|
184927
|
+
};
|
|
184928
|
+
};
|
|
184929
|
+
responses: {
|
|
184930
|
+
/** @description Rows updated */
|
|
184931
|
+
200: {
|
|
184932
|
+
headers: {
|
|
184933
|
+
[name: string]: unknown;
|
|
184934
|
+
};
|
|
184935
|
+
content: {
|
|
184936
|
+
/**
|
|
184937
|
+
* @example {
|
|
184938
|
+
* "data": {
|
|
184939
|
+
* "updated": 37
|
|
184940
|
+
* }
|
|
184941
|
+
* }
|
|
184942
|
+
*/
|
|
184943
|
+
"application/json": {
|
|
184944
|
+
data: components["schemas"]["ClinicServiceEntryFlagsResult"];
|
|
184945
|
+
};
|
|
184946
|
+
};
|
|
184947
|
+
};
|
|
184948
|
+
/** @description Validation error */
|
|
184949
|
+
400: {
|
|
184950
|
+
headers: {
|
|
184951
|
+
[name: string]: unknown;
|
|
184952
|
+
};
|
|
184953
|
+
content: {
|
|
184954
|
+
"application/json": components["schemas"]["Error"];
|
|
184955
|
+
};
|
|
184956
|
+
};
|
|
184957
|
+
/** @description Unauthorized */
|
|
184958
|
+
401: {
|
|
184959
|
+
headers: {
|
|
184960
|
+
[name: string]: unknown;
|
|
184961
|
+
};
|
|
184962
|
+
content: {
|
|
184963
|
+
"application/json": components["schemas"]["Error"];
|
|
184964
|
+
};
|
|
184965
|
+
};
|
|
184966
|
+
/** @description Forbidden */
|
|
184967
|
+
403: {
|
|
184968
|
+
headers: {
|
|
184969
|
+
[name: string]: unknown;
|
|
184970
|
+
};
|
|
184971
|
+
content: {
|
|
184972
|
+
"application/json": components["schemas"]["Error"];
|
|
184973
|
+
};
|
|
184974
|
+
};
|
|
184975
|
+
/** @description Not found */
|
|
184976
|
+
404: {
|
|
184977
|
+
headers: {
|
|
184978
|
+
[name: string]: unknown;
|
|
184979
|
+
};
|
|
184980
|
+
content: {
|
|
184981
|
+
"application/json": components["schemas"]["Error"];
|
|
184982
|
+
};
|
|
184983
|
+
};
|
|
184984
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
184985
|
+
409: {
|
|
184986
|
+
headers: {
|
|
184987
|
+
[name: string]: unknown;
|
|
184988
|
+
};
|
|
184989
|
+
content: {
|
|
184990
|
+
"application/json": components["schemas"]["Error"];
|
|
184991
|
+
};
|
|
184992
|
+
};
|
|
184993
|
+
/** @description Rate limited */
|
|
184994
|
+
429: {
|
|
184995
|
+
headers: {
|
|
184996
|
+
[name: string]: unknown;
|
|
184997
|
+
};
|
|
184998
|
+
content: {
|
|
184999
|
+
"application/json": components["schemas"]["Error"];
|
|
185000
|
+
};
|
|
185001
|
+
};
|
|
185002
|
+
};
|
|
185003
|
+
};
|
|
185004
|
+
delete?: never;
|
|
185005
|
+
options?: never;
|
|
185006
|
+
head?: never;
|
|
185007
|
+
patch?: never;
|
|
185008
|
+
trace?: never;
|
|
185009
|
+
};
|
|
184529
185010
|
"/clinic/services/{id}": {
|
|
184530
185011
|
parameters: {
|
|
184531
185012
|
query?: never;
|
|
@@ -184651,6 +185132,7 @@ interface paths {
|
|
|
184651
185132
|
is_telehealth?: boolean;
|
|
184652
185133
|
online_bookable?: boolean;
|
|
184653
185134
|
is_entry?: boolean | null;
|
|
185135
|
+
agent_bookable?: boolean | null;
|
|
184654
185136
|
lab_bearing?: boolean;
|
|
184655
185137
|
/** Format: uuid */
|
|
184656
185138
|
requires_consent_template_id?: string | null;
|
|
@@ -186873,6 +187355,8 @@ interface components {
|
|
|
186873
187355
|
is_telehealth: boolean;
|
|
186874
187356
|
online_bookable: boolean;
|
|
186875
187357
|
is_entry: boolean | null;
|
|
187358
|
+
agent_bookable: boolean | null;
|
|
187359
|
+
agent_bookable_effective: boolean;
|
|
186876
187360
|
lab_bearing: boolean;
|
|
186877
187361
|
requires_consent_template_id: string | null;
|
|
186878
187362
|
eligibility_min_age_years: number | null;
|
|
@@ -194266,6 +194750,27 @@ interface components {
|
|
|
194266
194750
|
/** @description The Flow JSON, as a string. */
|
|
194267
194751
|
flow_json: string;
|
|
194268
194752
|
};
|
|
194753
|
+
ClinicServiceEntryFlagsResult: {
|
|
194754
|
+
updated: number;
|
|
194755
|
+
};
|
|
194756
|
+
ClinicServiceAgentBookableCount: {
|
|
194757
|
+
bookable: number;
|
|
194758
|
+
reception_only: number;
|
|
194759
|
+
total: number;
|
|
194760
|
+
};
|
|
194761
|
+
ClinicServiceMatchFilter: {
|
|
194762
|
+
search?: string;
|
|
194763
|
+
/** @enum {string} */
|
|
194764
|
+
active?: "true" | "false";
|
|
194765
|
+
/** @enum {string} */
|
|
194766
|
+
review_state?: "pending" | "stale" | "draft" | "reviewed";
|
|
194767
|
+
/** @enum {string} */
|
|
194768
|
+
is_entry?: "true" | "false" | "unclassified";
|
|
194769
|
+
arancel?: string[] | null;
|
|
194770
|
+
categoria?: string;
|
|
194771
|
+
/** @enum {string} */
|
|
194772
|
+
agent_bookable?: "yes" | "no";
|
|
194773
|
+
};
|
|
194269
194774
|
};
|
|
194270
194775
|
responses: never;
|
|
194271
194776
|
parameters: never;
|
package/dist/index.d.ts
CHANGED
|
@@ -17418,7 +17418,7 @@ interface paths {
|
|
|
17418
17418
|
*
|
|
17419
17419
|
* **Plate format.** For a road-registered type (`auto`, `camion`) a non-empty registration_number must be a Chilean plate: AB1234 (old series), BCDF12 (new series: consonants only, no M/N/Q), or for motorcycles AB123 / BCD12; separators, case and a trailing registry check digit are tolerated. Anything else is a 400 VALIDATION_ERROR with `details.reason = "plate_format_invalid"` and a Spanish `fieldErrors.registration_number`. An empty value and a pending declaration («en trámite») stay legal; `maquinaria`/`nautico` are not checked. Stock syncs from portals and feeds do not pass through this check.
|
|
17420
17420
|
*
|
|
17421
|
-
* **Publish in the same call (`publish_to`).** Optional. Name the marketplaces this vehicle should go to — portal slugs such as `chileautos` / `mercadolibre`, or integration ids from GET /marketplaces — and it is published right after it is saved, through the same path as POST /vehicles/{id}/publish. Omitted or `[]` saves only; there is no default. Every entry is validated first: a portal with no connected account, a slug matching several accounts, or an id from another workspace answers **422 and nothing is saved**. Once saved, the vehicle stays saved: a portal that fails to publish is an `error` entry in `publications`, never a failed request (still 201). The response then carries `publications`, one `PublishOutcome` per account (`published`, `pending` for queued transports such as `chileautos_panel
|
|
17421
|
+
* **Publish in the same call (`publish_to`).** Optional. Name the marketplaces this vehicle should go to — portal slugs such as `chileautos` / `mercadolibre`, or integration ids from GET /marketplaces — and it is published right after it is saved, through the same path as POST /vehicles/{id}/publish. Omitted or `[]` saves only; there is no default. Every entry is validated first: a portal with no connected account, a slug matching several accounts, or an id from another workspace answers **422 and nothing is saved**. Once saved, the vehicle stays saved: a portal that fails to publish is an `error` entry in `publications`, never a failed request (still 201). The response then carries `publications`, one `PublishOutcome` per account (`published`, `pending` for queued transports such as `chileautos_panel`, `already_published`, or `error` with the reason). `publications` is absent when `publish_to` was not sent.
|
|
17422
17422
|
*
|
|
17423
17423
|
* **Sanity range.** A price fans out to every connected portal, so a typo is stopped here. `price_amount` must be between 100.000 and 2.000.000.000 CLP (a UF price is bounded at the day's UF; other currencies are not bounded) and `odometer_value` between 0 and 2.000.000; `null` clears either and is always accepted. Outside the range: **422 `VEHICLE_VALUE_OUT_OF_RANGE`**, with a Spanish `message`, `field_errors.<field>` and `details.violations[]` (`field`, `reason` = `price_out_of_range` | `km_out_of_range`, `value`, `min`, `max`, `currency`). A price change beyond 10x up or down from the current price answers **422 `PRICE_CHANGE_CONFIRMATION_REQUIRED`** (`details.reason` = `large_price_change`, `current_price`, `requested_price`, `currency`, `factor`, `confirm_flag`) unless the body carries `confirm_large_price_change: true`; ask the user, then resend the same body with it. Nothing is written on either 422.
|
|
17424
17424
|
*
|
|
@@ -17511,7 +17511,7 @@ interface paths {
|
|
|
17511
17511
|
/** Format: uuid */
|
|
17512
17512
|
responsible_user_id?: string | null;
|
|
17513
17513
|
/**
|
|
17514
|
-
* @description OPTIONAL. Marketplaces to publish this vehicle to right after it is saved — the same effect as a follow-up POST /vehicles/{id}/publish, in one call. Omitted or `[]` means save only and publish nowhere: there is no default and no tenant-level setting. Each entry is either a portal slug (`chileautos`, `chileautos_panel`, `
|
|
17514
|
+
* @description OPTIONAL. Marketplaces to publish this vehicle to right after it is saved — the same effect as a follow-up POST /vehicles/{id}/publish, in one call. Omitted or `[]` means save only and publish nowhere: there is no default and no tenant-level setting. Each entry is either a portal slug (`chileautos`, `chileautos_panel`, `linze`, `mercadolibre`, `yapo`) or a marketplace integration id (the `id` of a row from GET /marketplaces). A portal slug resolves to the connected account the workspace has for that portal, whichever transport it uses (`chileautos` reaches the certified API account or the `chileautos_panel` account). Every entry is validated BEFORE the vehicle is written, and any bad entry answers 422 with nothing saved: a slug with no connected account, a slug matching more than one account (pass the integration id instead), an id that is not one of this workspace's accounts, or a portal that does not accept this vehicle type. Entries resolving to the same account are deduplicated. A portal FAILING to publish never fails the save — see `publications` in the response. On PUT, `publish_to` only ADDS portals: a portal where the vehicle is already live or queued is a no-op (`already_published`), never a second ad, and a portal left out is NOT unpublished — removal is DELETE /vehicles/{id}/publications/{pubId}.
|
|
17515
17515
|
* @example [
|
|
17516
17516
|
* "chileautos",
|
|
17517
17517
|
* "mercadolibre"
|
|
@@ -18161,7 +18161,7 @@ interface paths {
|
|
|
18161
18161
|
/** Format: uuid */
|
|
18162
18162
|
responsible_user_id?: string | null;
|
|
18163
18163
|
/**
|
|
18164
|
-
* @description OPTIONAL. Marketplaces to publish this vehicle to right after it is saved — the same effect as a follow-up POST /vehicles/{id}/publish, in one call. Omitted or `[]` means save only and publish nowhere: there is no default and no tenant-level setting. Each entry is either a portal slug (`chileautos`, `chileautos_panel`, `
|
|
18164
|
+
* @description OPTIONAL. Marketplaces to publish this vehicle to right after it is saved — the same effect as a follow-up POST /vehicles/{id}/publish, in one call. Omitted or `[]` means save only and publish nowhere: there is no default and no tenant-level setting. Each entry is either a portal slug (`chileautos`, `chileautos_panel`, `linze`, `mercadolibre`, `yapo`) or a marketplace integration id (the `id` of a row from GET /marketplaces). A portal slug resolves to the connected account the workspace has for that portal, whichever transport it uses (`chileautos` reaches the certified API account or the `chileautos_panel` account). Every entry is validated BEFORE the vehicle is written, and any bad entry answers 422 with nothing saved: a slug with no connected account, a slug matching more than one account (pass the integration id instead), an id that is not one of this workspace's accounts, or a portal that does not accept this vehicle type. Entries resolving to the same account are deduplicated. A portal FAILING to publish never fails the save — see `publications` in the response. On PUT, `publish_to` only ADDS portals: a portal where the vehicle is already live or queued is a no-op (`already_published`), never a second ad, and a portal left out is NOT unpublished — removal is DELETE /vehicles/{id}/publications/{pubId}.
|
|
18165
18165
|
* @example [
|
|
18166
18166
|
* "chileautos",
|
|
18167
18167
|
* "mercadolibre"
|
|
@@ -20096,9 +20096,9 @@ interface paths {
|
|
|
20096
20096
|
* Publish a vehicle to one or more connected marketplaces
|
|
20097
20097
|
* @description One round trip per portal named in `integration_ids`, and the response is a per-integration outcome list — a 200 does not mean every portal accepted the ad. `status` is `published` (Vitrina pushed or updated the ad), `already_published` (the double-publish guard found a live ad on this (vehicle, integration) that Vitrina did not itself push — nothing was sent, nothing was duplicated) or `error` (`error` names why).
|
|
20098
20098
|
*
|
|
20099
|
-
*
|
|
20099
|
+
* **Facebook Marketplace does not publish.** Vitrina only answers its buyers; naming a `facebook_marketplace` integration here answers `error`, and `facebook` is not a `publish_to` slug.
|
|
20100
20100
|
*
|
|
20101
|
-
* **Chileautos (Panel) (`chileautos_panel`) is asynchronous
|
|
20101
|
+
* **Chileautos (Panel) (`chileautos_panel`) is asynchronous.** It is driven through a browser session on the dealer’s control panel, which only Vitrina’s scraper workers can run, so this call answers `status: "pending"` the instant the job is queued (the publication row reads `pending`, or `updating` when the ad already exists). Same polling and webhooks as above; the row turns `published` or `error` (with `last_error`), usually within a few minutes.
|
|
20102
20102
|
*/
|
|
20103
20103
|
post: {
|
|
20104
20104
|
parameters: {
|
|
@@ -20171,16 +20171,16 @@ interface paths {
|
|
|
20171
20171
|
* },
|
|
20172
20172
|
* {
|
|
20173
20173
|
* "integration_id": "33333333-0000-4000-8000-000000000002",
|
|
20174
|
-
* "provider": "
|
|
20174
|
+
* "provider": "chileautos_panel",
|
|
20175
20175
|
* "status": "pending",
|
|
20176
|
-
* "external_id":
|
|
20176
|
+
* "external_id": null,
|
|
20177
20177
|
* "publication": {
|
|
20178
20178
|
* "id": "88888888-0000-4000-8000-000000000002",
|
|
20179
20179
|
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
20180
20180
|
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
20181
20181
|
* "marketplace_account_id": "33333333-0000-4000-8000-000000000002",
|
|
20182
|
-
* "provider": "
|
|
20183
|
-
* "external_id":
|
|
20182
|
+
* "provider": "chileautos_panel",
|
|
20183
|
+
* "external_id": null,
|
|
20184
20184
|
* "status": "pending",
|
|
20185
20185
|
* "origin": "vitrina",
|
|
20186
20186
|
* "permalink": null,
|
|
@@ -27016,6 +27016,251 @@ interface paths {
|
|
|
27016
27016
|
patch?: never;
|
|
27017
27017
|
trace?: never;
|
|
27018
27018
|
};
|
|
27019
|
+
"/leads/{id}/first-touch": {
|
|
27020
|
+
parameters: {
|
|
27021
|
+
query?: never;
|
|
27022
|
+
header?: never;
|
|
27023
|
+
path?: never;
|
|
27024
|
+
cookie?: never;
|
|
27025
|
+
};
|
|
27026
|
+
/**
|
|
27027
|
+
* One lead's first-touch outcome
|
|
27028
|
+
* @description Whether the proactive first message for this lead went out, and if not, why: `status` (`none` = never attempted, `pending`, `sent`, `skipped`, `error`), the `skip_reason` (`invalid_phone` carries the number the portal delivered in `skip_evidence.raw_phone`), the classified `error_class`/`error_code` of a failed send (`undeliverable` = WhatsApp could not reach the number), the conversation it opened, and the contact's current phone with `phone_dialable`. `retryable` says whether `POST /leads/{id}/first-touch/retry` would be accepted; `retry_blocked_reason` names why not (`already_sent`, `in_progress`, `do_not_contact`, `source_disabled`, `no_contact`).
|
|
27029
|
+
*/
|
|
27030
|
+
get: {
|
|
27031
|
+
parameters: {
|
|
27032
|
+
query?: never;
|
|
27033
|
+
header?: never;
|
|
27034
|
+
path: {
|
|
27035
|
+
id: string;
|
|
27036
|
+
};
|
|
27037
|
+
cookie?: never;
|
|
27038
|
+
};
|
|
27039
|
+
requestBody?: never;
|
|
27040
|
+
responses: {
|
|
27041
|
+
/** @description Lead first-touch state */
|
|
27042
|
+
200: {
|
|
27043
|
+
headers: {
|
|
27044
|
+
[name: string]: unknown;
|
|
27045
|
+
};
|
|
27046
|
+
content: {
|
|
27047
|
+
/**
|
|
27048
|
+
* @example {
|
|
27049
|
+
* "data": {
|
|
27050
|
+
* "status": "skipped",
|
|
27051
|
+
* "skip_reason": "invalid_phone",
|
|
27052
|
+
* "skip_evidence": {
|
|
27053
|
+
* "raw_phone": "+90773361"
|
|
27054
|
+
* },
|
|
27055
|
+
* "error_class": null,
|
|
27056
|
+
* "error_code": null,
|
|
27057
|
+
* "conversation_id": null,
|
|
27058
|
+
* "source": "chileautos",
|
|
27059
|
+
* "contact_id": "01a14658-50d7-764b-89dd-601c87c24fd7",
|
|
27060
|
+
* "phone": "+90773361",
|
|
27061
|
+
* "phone_dialable": false,
|
|
27062
|
+
* "retryable": true,
|
|
27063
|
+
* "retry_blocked_reason": null
|
|
27064
|
+
* }
|
|
27065
|
+
* }
|
|
27066
|
+
*/
|
|
27067
|
+
"application/json": {
|
|
27068
|
+
data?: unknown;
|
|
27069
|
+
meta?: {
|
|
27070
|
+
[key: string]: unknown;
|
|
27071
|
+
};
|
|
27072
|
+
};
|
|
27073
|
+
};
|
|
27074
|
+
};
|
|
27075
|
+
/** @description Validation error */
|
|
27076
|
+
400: {
|
|
27077
|
+
headers: {
|
|
27078
|
+
[name: string]: unknown;
|
|
27079
|
+
};
|
|
27080
|
+
content: {
|
|
27081
|
+
"application/json": components["schemas"]["Error"];
|
|
27082
|
+
};
|
|
27083
|
+
};
|
|
27084
|
+
/** @description Unauthorized */
|
|
27085
|
+
401: {
|
|
27086
|
+
headers: {
|
|
27087
|
+
[name: string]: unknown;
|
|
27088
|
+
};
|
|
27089
|
+
content: {
|
|
27090
|
+
"application/json": components["schemas"]["Error"];
|
|
27091
|
+
};
|
|
27092
|
+
};
|
|
27093
|
+
/** @description Forbidden */
|
|
27094
|
+
403: {
|
|
27095
|
+
headers: {
|
|
27096
|
+
[name: string]: unknown;
|
|
27097
|
+
};
|
|
27098
|
+
content: {
|
|
27099
|
+
"application/json": components["schemas"]["Error"];
|
|
27100
|
+
};
|
|
27101
|
+
};
|
|
27102
|
+
/** @description Not found */
|
|
27103
|
+
404: {
|
|
27104
|
+
headers: {
|
|
27105
|
+
[name: string]: unknown;
|
|
27106
|
+
};
|
|
27107
|
+
content: {
|
|
27108
|
+
"application/json": components["schemas"]["Error"];
|
|
27109
|
+
};
|
|
27110
|
+
};
|
|
27111
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
27112
|
+
409: {
|
|
27113
|
+
headers: {
|
|
27114
|
+
[name: string]: unknown;
|
|
27115
|
+
};
|
|
27116
|
+
content: {
|
|
27117
|
+
"application/json": components["schemas"]["Error"];
|
|
27118
|
+
};
|
|
27119
|
+
};
|
|
27120
|
+
/** @description Rate limited */
|
|
27121
|
+
429: {
|
|
27122
|
+
headers: {
|
|
27123
|
+
[name: string]: unknown;
|
|
27124
|
+
};
|
|
27125
|
+
content: {
|
|
27126
|
+
"application/json": components["schemas"]["Error"];
|
|
27127
|
+
};
|
|
27128
|
+
};
|
|
27129
|
+
};
|
|
27130
|
+
};
|
|
27131
|
+
put?: never;
|
|
27132
|
+
post?: never;
|
|
27133
|
+
delete?: never;
|
|
27134
|
+
options?: never;
|
|
27135
|
+
head?: never;
|
|
27136
|
+
patch?: never;
|
|
27137
|
+
trace?: never;
|
|
27138
|
+
};
|
|
27139
|
+
"/leads/{id}/first-touch/retry": {
|
|
27140
|
+
parameters: {
|
|
27141
|
+
query?: never;
|
|
27142
|
+
header?: never;
|
|
27143
|
+
path?: never;
|
|
27144
|
+
cookie?: never;
|
|
27145
|
+
};
|
|
27146
|
+
get?: never;
|
|
27147
|
+
put?: never;
|
|
27148
|
+
/**
|
|
27149
|
+
* Send the first message again, after fixing the buyer phone
|
|
27150
|
+
* @description Re-runs the proactive first touch for a lead whose first attempt was skipped or failed — typically because the portal delivered a phone WhatsApp cannot reach. Pass `phone` to correct the contact first (it must pass the dial gate: E.164 or a 9-digit Chilean number, else 400 `invalid_phone`). Uses the configured template and account of the lead's source, reopens the buyer's original inquiry as the context card, and answers with the rail's outcome: `sent` with the new `conversation_id`, or `sent: false` with the `reason` (`burst_skip`, `no_template`, `daily_cap`, …). 409 with the blocking reason when the first touch already went out, is in flight, the person asked not to be contacted, or the source is off.
|
|
27151
|
+
*/
|
|
27152
|
+
post: {
|
|
27153
|
+
parameters: {
|
|
27154
|
+
query?: never;
|
|
27155
|
+
header?: {
|
|
27156
|
+
/** @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. */
|
|
27157
|
+
"Idempotency-Key"?: string;
|
|
27158
|
+
};
|
|
27159
|
+
path: {
|
|
27160
|
+
id: string;
|
|
27161
|
+
};
|
|
27162
|
+
cookie?: never;
|
|
27163
|
+
};
|
|
27164
|
+
requestBody?: {
|
|
27165
|
+
content: {
|
|
27166
|
+
/**
|
|
27167
|
+
* @example {
|
|
27168
|
+
* "phone": "+56990773361"
|
|
27169
|
+
* }
|
|
27170
|
+
*/
|
|
27171
|
+
"application/json": {
|
|
27172
|
+
/** @description Corrected buyer phone, applied to the contact before the retry. E.164 (`+56990773361`) or a 9-digit Chilean national number. */
|
|
27173
|
+
phone?: string;
|
|
27174
|
+
};
|
|
27175
|
+
};
|
|
27176
|
+
};
|
|
27177
|
+
responses: {
|
|
27178
|
+
/** @description First-touch retry outcome */
|
|
27179
|
+
200: {
|
|
27180
|
+
headers: {
|
|
27181
|
+
[name: string]: unknown;
|
|
27182
|
+
};
|
|
27183
|
+
content: {
|
|
27184
|
+
/**
|
|
27185
|
+
* @example {
|
|
27186
|
+
* "data": {
|
|
27187
|
+
* "sent": true,
|
|
27188
|
+
* "reason": null,
|
|
27189
|
+
* "conversation_id": "c0c0c0c0-0000-4000-8000-000000000459",
|
|
27190
|
+
* "phone": "+56990773361"
|
|
27191
|
+
* }
|
|
27192
|
+
* }
|
|
27193
|
+
*/
|
|
27194
|
+
"application/json": {
|
|
27195
|
+
data?: unknown;
|
|
27196
|
+
meta?: {
|
|
27197
|
+
[key: string]: unknown;
|
|
27198
|
+
};
|
|
27199
|
+
};
|
|
27200
|
+
};
|
|
27201
|
+
};
|
|
27202
|
+
/** @description Validation error */
|
|
27203
|
+
400: {
|
|
27204
|
+
headers: {
|
|
27205
|
+
[name: string]: unknown;
|
|
27206
|
+
};
|
|
27207
|
+
content: {
|
|
27208
|
+
"application/json": components["schemas"]["Error"];
|
|
27209
|
+
};
|
|
27210
|
+
};
|
|
27211
|
+
/** @description Unauthorized */
|
|
27212
|
+
401: {
|
|
27213
|
+
headers: {
|
|
27214
|
+
[name: string]: unknown;
|
|
27215
|
+
};
|
|
27216
|
+
content: {
|
|
27217
|
+
"application/json": components["schemas"]["Error"];
|
|
27218
|
+
};
|
|
27219
|
+
};
|
|
27220
|
+
/** @description Forbidden */
|
|
27221
|
+
403: {
|
|
27222
|
+
headers: {
|
|
27223
|
+
[name: string]: unknown;
|
|
27224
|
+
};
|
|
27225
|
+
content: {
|
|
27226
|
+
"application/json": components["schemas"]["Error"];
|
|
27227
|
+
};
|
|
27228
|
+
};
|
|
27229
|
+
/** @description Not found */
|
|
27230
|
+
404: {
|
|
27231
|
+
headers: {
|
|
27232
|
+
[name: string]: unknown;
|
|
27233
|
+
};
|
|
27234
|
+
content: {
|
|
27235
|
+
"application/json": components["schemas"]["Error"];
|
|
27236
|
+
};
|
|
27237
|
+
};
|
|
27238
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
27239
|
+
409: {
|
|
27240
|
+
headers: {
|
|
27241
|
+
[name: string]: unknown;
|
|
27242
|
+
};
|
|
27243
|
+
content: {
|
|
27244
|
+
"application/json": components["schemas"]["Error"];
|
|
27245
|
+
};
|
|
27246
|
+
};
|
|
27247
|
+
/** @description Rate limited */
|
|
27248
|
+
429: {
|
|
27249
|
+
headers: {
|
|
27250
|
+
[name: string]: unknown;
|
|
27251
|
+
};
|
|
27252
|
+
content: {
|
|
27253
|
+
"application/json": components["schemas"]["Error"];
|
|
27254
|
+
};
|
|
27255
|
+
};
|
|
27256
|
+
};
|
|
27257
|
+
};
|
|
27258
|
+
delete?: never;
|
|
27259
|
+
options?: never;
|
|
27260
|
+
head?: never;
|
|
27261
|
+
patch?: never;
|
|
27262
|
+
trace?: never;
|
|
27263
|
+
};
|
|
27019
27264
|
"/leads/{id}/interests": {
|
|
27020
27265
|
parameters: {
|
|
27021
27266
|
query?: never;
|
|
@@ -184101,7 +184346,7 @@ interface paths {
|
|
|
184101
184346
|
};
|
|
184102
184347
|
/**
|
|
184103
184348
|
* List the clinic's services
|
|
184104
|
-
* @description The clinic's price list. `search` (min 2 chars) matches nombre, código or categoría accent-insensitively. `active` is OPTIONAL and omitting it returns every row. `precio` is the vendor LIST price before previsión/convenio — it is deliberately never shown to the AI agent. `is_entry` filters entry prestaciones, tri-state: `true` = entry (evaluación / diagnóstico), `false` = CONFIRMED treatment rows only, `unclassified` = nobody has said yet (`is_entry IS NULL`); omitted = every row. `arancel` (repeatable or comma-separated) keeps only rows priced in those vendor aranceles (`'0'` = «Arancel base»); each row carries `arancel_external_id` + `arancel_name`.
|
|
184349
|
+
* @description The clinic's price list. `search` (min 2 chars) matches nombre, código or categoría accent-insensitively. `active` is OPTIONAL and omitting it returns every row. `precio` is the vendor LIST price before previsión/convenio — it is deliberately never shown to the AI agent. `is_entry` filters entry prestaciones, tri-state: `true` = entry (evaluación / diagnóstico), `false` = CONFIRMED treatment rows only, `unclassified` = nobody has said yet (`is_entry IS NULL`); omitted = every row. `arancel` (repeatable or comma-separated) keeps only rows priced in those vendor aranceles (`'0'` = «Arancel base»); each row carries `arancel_external_id` + `arancel_name`. `categoria` keeps one exact category. `agent_bookable` (`yes` | `no`) filters on the EFFECTIVE agent-bookable value: each row carries the explicit `agent_bookable` (null = undecided) and `agent_bookable_effective` (`agent_bookable ?? settings.clinic_attendance.agent_bookable_default`, unset default = true).
|
|
184105
184350
|
*
|
|
184106
184351
|
* **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`.
|
|
184107
184352
|
*/
|
|
@@ -184113,6 +184358,8 @@ interface paths {
|
|
|
184113
184358
|
review_state?: "pending" | "stale" | "draft" | "reviewed";
|
|
184114
184359
|
is_entry?: "true" | "false" | "unclassified";
|
|
184115
184360
|
arancel?: string[] | null;
|
|
184361
|
+
categoria?: string;
|
|
184362
|
+
agent_bookable?: "yes" | "no";
|
|
184116
184363
|
sort?: "nombre" | "codigo" | "categoria" | "tipo" | "precio" | "synced_at";
|
|
184117
184364
|
dir?: "asc" | "desc";
|
|
184118
184365
|
page?: number;
|
|
@@ -184297,6 +184544,7 @@ interface paths {
|
|
|
184297
184544
|
is_telehealth?: boolean;
|
|
184298
184545
|
online_bookable?: boolean;
|
|
184299
184546
|
is_entry?: boolean | null;
|
|
184547
|
+
agent_bookable?: boolean | null;
|
|
184300
184548
|
lab_bearing?: boolean;
|
|
184301
184549
|
/** Format: uuid */
|
|
184302
184550
|
requires_consent_template_id?: string | null;
|
|
@@ -184526,6 +184774,239 @@ interface paths {
|
|
|
184526
184774
|
patch?: never;
|
|
184527
184775
|
trace?: never;
|
|
184528
184776
|
};
|
|
184777
|
+
"/clinic/services/agent-bookable-count": {
|
|
184778
|
+
parameters: {
|
|
184779
|
+
query?: never;
|
|
184780
|
+
header?: never;
|
|
184781
|
+
path?: never;
|
|
184782
|
+
cookie?: never;
|
|
184783
|
+
};
|
|
184784
|
+
/**
|
|
184785
|
+
* How many active prestaciones the AI agent may book
|
|
184786
|
+
* @description `{ bookable, reception_only, total }` over ACTIVE services, by the EFFECTIVE agent-bookable value (`agent_bookable`, or the tenant default `settings.clinic_attendance.agent_bookable_default` when the row is undecided). `arancel` (repeatable or comma-separated) counts only rows priced in those vendor aranceles.
|
|
184787
|
+
*
|
|
184788
|
+
* **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`.
|
|
184789
|
+
*/
|
|
184790
|
+
get: {
|
|
184791
|
+
parameters: {
|
|
184792
|
+
query?: {
|
|
184793
|
+
arancel?: string[] | null;
|
|
184794
|
+
};
|
|
184795
|
+
header?: never;
|
|
184796
|
+
path?: never;
|
|
184797
|
+
cookie?: never;
|
|
184798
|
+
};
|
|
184799
|
+
requestBody?: never;
|
|
184800
|
+
responses: {
|
|
184801
|
+
/** @description Agent-bookable split */
|
|
184802
|
+
200: {
|
|
184803
|
+
headers: {
|
|
184804
|
+
[name: string]: unknown;
|
|
184805
|
+
};
|
|
184806
|
+
content: {
|
|
184807
|
+
/**
|
|
184808
|
+
* @example {
|
|
184809
|
+
* "data": {
|
|
184810
|
+
* "bookable": 12,
|
|
184811
|
+
* "reception_only": 383,
|
|
184812
|
+
* "total": 395
|
|
184813
|
+
* }
|
|
184814
|
+
* }
|
|
184815
|
+
*/
|
|
184816
|
+
"application/json": {
|
|
184817
|
+
data: components["schemas"]["ClinicServiceAgentBookableCount"];
|
|
184818
|
+
};
|
|
184819
|
+
};
|
|
184820
|
+
};
|
|
184821
|
+
/** @description Validation error */
|
|
184822
|
+
400: {
|
|
184823
|
+
headers: {
|
|
184824
|
+
[name: string]: unknown;
|
|
184825
|
+
};
|
|
184826
|
+
content: {
|
|
184827
|
+
"application/json": components["schemas"]["Error"];
|
|
184828
|
+
};
|
|
184829
|
+
};
|
|
184830
|
+
/** @description Unauthorized */
|
|
184831
|
+
401: {
|
|
184832
|
+
headers: {
|
|
184833
|
+
[name: string]: unknown;
|
|
184834
|
+
};
|
|
184835
|
+
content: {
|
|
184836
|
+
"application/json": components["schemas"]["Error"];
|
|
184837
|
+
};
|
|
184838
|
+
};
|
|
184839
|
+
/** @description Forbidden */
|
|
184840
|
+
403: {
|
|
184841
|
+
headers: {
|
|
184842
|
+
[name: string]: unknown;
|
|
184843
|
+
};
|
|
184844
|
+
content: {
|
|
184845
|
+
"application/json": components["schemas"]["Error"];
|
|
184846
|
+
};
|
|
184847
|
+
};
|
|
184848
|
+
/** @description Not found */
|
|
184849
|
+
404: {
|
|
184850
|
+
headers: {
|
|
184851
|
+
[name: string]: unknown;
|
|
184852
|
+
};
|
|
184853
|
+
content: {
|
|
184854
|
+
"application/json": components["schemas"]["Error"];
|
|
184855
|
+
};
|
|
184856
|
+
};
|
|
184857
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
184858
|
+
409: {
|
|
184859
|
+
headers: {
|
|
184860
|
+
[name: string]: unknown;
|
|
184861
|
+
};
|
|
184862
|
+
content: {
|
|
184863
|
+
"application/json": components["schemas"]["Error"];
|
|
184864
|
+
};
|
|
184865
|
+
};
|
|
184866
|
+
/** @description Rate limited */
|
|
184867
|
+
429: {
|
|
184868
|
+
headers: {
|
|
184869
|
+
[name: string]: unknown;
|
|
184870
|
+
};
|
|
184871
|
+
content: {
|
|
184872
|
+
"application/json": components["schemas"]["Error"];
|
|
184873
|
+
};
|
|
184874
|
+
};
|
|
184875
|
+
};
|
|
184876
|
+
};
|
|
184877
|
+
put?: never;
|
|
184878
|
+
post?: never;
|
|
184879
|
+
delete?: never;
|
|
184880
|
+
options?: never;
|
|
184881
|
+
head?: never;
|
|
184882
|
+
patch?: never;
|
|
184883
|
+
trace?: never;
|
|
184884
|
+
};
|
|
184885
|
+
"/clinic/services/agent-bookable": {
|
|
184886
|
+
parameters: {
|
|
184887
|
+
query?: never;
|
|
184888
|
+
header?: never;
|
|
184889
|
+
path?: never;
|
|
184890
|
+
cookie?: never;
|
|
184891
|
+
};
|
|
184892
|
+
get?: never;
|
|
184893
|
+
put?: never;
|
|
184894
|
+
/**
|
|
184895
|
+
* Set which prestaciones the AI agent may book, in bulk
|
|
184896
|
+
* @description Sets `agent_bookable` to `value` — `true` (the agent may offer and book it), `false` (reception-only: the agent knows it exists, tells the patient reception schedules it and never books it) or `null` (back to the tenant default) — on up to 500 `ids`, OR on every row matching `all_matching` (the same filters, in the same string form, as the `GET /clinic/services` query). Exactly one of the two. Works on ANY source — the flag is Vitrina-owned and never reaches the vendor. `updated` is how many rows matched; ids of another tenant match nothing.
|
|
184897
|
+
*
|
|
184898
|
+
* **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`.
|
|
184899
|
+
*/
|
|
184900
|
+
post: {
|
|
184901
|
+
parameters: {
|
|
184902
|
+
query?: never;
|
|
184903
|
+
header?: {
|
|
184904
|
+
/** @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. */
|
|
184905
|
+
"Idempotency-Key"?: string;
|
|
184906
|
+
};
|
|
184907
|
+
path?: never;
|
|
184908
|
+
cookie?: never;
|
|
184909
|
+
};
|
|
184910
|
+
requestBody?: {
|
|
184911
|
+
content: {
|
|
184912
|
+
/**
|
|
184913
|
+
* @example {
|
|
184914
|
+
* "value": false,
|
|
184915
|
+
* "all_matching": {
|
|
184916
|
+
* "search": "control",
|
|
184917
|
+
* "active": "true",
|
|
184918
|
+
* "arancel": "0"
|
|
184919
|
+
* }
|
|
184920
|
+
* }
|
|
184921
|
+
*/
|
|
184922
|
+
"application/json": {
|
|
184923
|
+
value: boolean | null;
|
|
184924
|
+
ids?: string[];
|
|
184925
|
+
all_matching?: components["schemas"]["ClinicServiceMatchFilter"];
|
|
184926
|
+
};
|
|
184927
|
+
};
|
|
184928
|
+
};
|
|
184929
|
+
responses: {
|
|
184930
|
+
/** @description Rows updated */
|
|
184931
|
+
200: {
|
|
184932
|
+
headers: {
|
|
184933
|
+
[name: string]: unknown;
|
|
184934
|
+
};
|
|
184935
|
+
content: {
|
|
184936
|
+
/**
|
|
184937
|
+
* @example {
|
|
184938
|
+
* "data": {
|
|
184939
|
+
* "updated": 37
|
|
184940
|
+
* }
|
|
184941
|
+
* }
|
|
184942
|
+
*/
|
|
184943
|
+
"application/json": {
|
|
184944
|
+
data: components["schemas"]["ClinicServiceEntryFlagsResult"];
|
|
184945
|
+
};
|
|
184946
|
+
};
|
|
184947
|
+
};
|
|
184948
|
+
/** @description Validation error */
|
|
184949
|
+
400: {
|
|
184950
|
+
headers: {
|
|
184951
|
+
[name: string]: unknown;
|
|
184952
|
+
};
|
|
184953
|
+
content: {
|
|
184954
|
+
"application/json": components["schemas"]["Error"];
|
|
184955
|
+
};
|
|
184956
|
+
};
|
|
184957
|
+
/** @description Unauthorized */
|
|
184958
|
+
401: {
|
|
184959
|
+
headers: {
|
|
184960
|
+
[name: string]: unknown;
|
|
184961
|
+
};
|
|
184962
|
+
content: {
|
|
184963
|
+
"application/json": components["schemas"]["Error"];
|
|
184964
|
+
};
|
|
184965
|
+
};
|
|
184966
|
+
/** @description Forbidden */
|
|
184967
|
+
403: {
|
|
184968
|
+
headers: {
|
|
184969
|
+
[name: string]: unknown;
|
|
184970
|
+
};
|
|
184971
|
+
content: {
|
|
184972
|
+
"application/json": components["schemas"]["Error"];
|
|
184973
|
+
};
|
|
184974
|
+
};
|
|
184975
|
+
/** @description Not found */
|
|
184976
|
+
404: {
|
|
184977
|
+
headers: {
|
|
184978
|
+
[name: string]: unknown;
|
|
184979
|
+
};
|
|
184980
|
+
content: {
|
|
184981
|
+
"application/json": components["schemas"]["Error"];
|
|
184982
|
+
};
|
|
184983
|
+
};
|
|
184984
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
184985
|
+
409: {
|
|
184986
|
+
headers: {
|
|
184987
|
+
[name: string]: unknown;
|
|
184988
|
+
};
|
|
184989
|
+
content: {
|
|
184990
|
+
"application/json": components["schemas"]["Error"];
|
|
184991
|
+
};
|
|
184992
|
+
};
|
|
184993
|
+
/** @description Rate limited */
|
|
184994
|
+
429: {
|
|
184995
|
+
headers: {
|
|
184996
|
+
[name: string]: unknown;
|
|
184997
|
+
};
|
|
184998
|
+
content: {
|
|
184999
|
+
"application/json": components["schemas"]["Error"];
|
|
185000
|
+
};
|
|
185001
|
+
};
|
|
185002
|
+
};
|
|
185003
|
+
};
|
|
185004
|
+
delete?: never;
|
|
185005
|
+
options?: never;
|
|
185006
|
+
head?: never;
|
|
185007
|
+
patch?: never;
|
|
185008
|
+
trace?: never;
|
|
185009
|
+
};
|
|
184529
185010
|
"/clinic/services/{id}": {
|
|
184530
185011
|
parameters: {
|
|
184531
185012
|
query?: never;
|
|
@@ -184651,6 +185132,7 @@ interface paths {
|
|
|
184651
185132
|
is_telehealth?: boolean;
|
|
184652
185133
|
online_bookable?: boolean;
|
|
184653
185134
|
is_entry?: boolean | null;
|
|
185135
|
+
agent_bookable?: boolean | null;
|
|
184654
185136
|
lab_bearing?: boolean;
|
|
184655
185137
|
/** Format: uuid */
|
|
184656
185138
|
requires_consent_template_id?: string | null;
|
|
@@ -186873,6 +187355,8 @@ interface components {
|
|
|
186873
187355
|
is_telehealth: boolean;
|
|
186874
187356
|
online_bookable: boolean;
|
|
186875
187357
|
is_entry: boolean | null;
|
|
187358
|
+
agent_bookable: boolean | null;
|
|
187359
|
+
agent_bookable_effective: boolean;
|
|
186876
187360
|
lab_bearing: boolean;
|
|
186877
187361
|
requires_consent_template_id: string | null;
|
|
186878
187362
|
eligibility_min_age_years: number | null;
|
|
@@ -194266,6 +194750,27 @@ interface components {
|
|
|
194266
194750
|
/** @description The Flow JSON, as a string. */
|
|
194267
194751
|
flow_json: string;
|
|
194268
194752
|
};
|
|
194753
|
+
ClinicServiceEntryFlagsResult: {
|
|
194754
|
+
updated: number;
|
|
194755
|
+
};
|
|
194756
|
+
ClinicServiceAgentBookableCount: {
|
|
194757
|
+
bookable: number;
|
|
194758
|
+
reception_only: number;
|
|
194759
|
+
total: number;
|
|
194760
|
+
};
|
|
194761
|
+
ClinicServiceMatchFilter: {
|
|
194762
|
+
search?: string;
|
|
194763
|
+
/** @enum {string} */
|
|
194764
|
+
active?: "true" | "false";
|
|
194765
|
+
/** @enum {string} */
|
|
194766
|
+
review_state?: "pending" | "stale" | "draft" | "reviewed";
|
|
194767
|
+
/** @enum {string} */
|
|
194768
|
+
is_entry?: "true" | "false" | "unclassified";
|
|
194769
|
+
arancel?: string[] | null;
|
|
194770
|
+
categoria?: string;
|
|
194771
|
+
/** @enum {string} */
|
|
194772
|
+
agent_bookable?: "yes" | "no";
|
|
194773
|
+
};
|
|
194269
194774
|
};
|
|
194270
194775
|
responses: never;
|
|
194271
194776
|
parameters: never;
|
package/package.json
CHANGED