@vitrina/api 14.43.0 → 14.44.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- 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,
|
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,
|
package/package.json
CHANGED