@vitrina/api 14.60.1 → 14.62.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.
Files changed (3) hide show
  1. package/dist/index.d.cts +1756 -436
  2. package/dist/index.d.ts +1756 -436
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -17776,6 +17776,8 @@ interface paths {
17776
17776
  * **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.
17777
17777
  *
17778
17778
  * **Normalization and `catalog_match`.** On create and update, `make` and `model` that equal an entry of GET /vehicles/catalog/brands and /catalog/models up to case, accents, spaces and hyphens are stored in the catalog's spelling ("toyota" → "Toyota", "mercedes benz" → "Mercedes-Benz", "rav 4" → "RAV4"); `fuel_type`, `gear_type` and `body_style` are stored as vocabulary codes ("Bencina" → `gasolina`, "Automática" → `automatica`, "Station Wagon" → `wagon`; codes: fuel `gasolina|diesel|hibrido|electrico|gnc|glp|otro`, gear `mecanica|automatica|otro`, body `sedan|hatchback|suv|camioneta|coupe|wagon|furgon|convertible|minivan|otro`). Nothing is invented: a value with no match is stored exactly as sent. The response (and GET /vehicles/{id}) carries `catalog_match`: `make` / `model` are `matched` | `unmatched` | `missing` (`not_applicable` for a non-`auto` vehicle_type); `version` adds `approximate` (word overlap with a catalog version, same displacement) and `catalog_version` names the catalog version it matched or most resembles; `fuel_type` / `gear_type` / `body_style` are `matched` | `unmatched` | `missing`; `warnings[]` lists `{ field, code, message }` for everything not matched, with a Spanish `message` ready to show (codes: `make_missing`, `make_not_in_catalog`, `model_missing`, `model_not_in_catalog`, `version_approximate`, `version_not_in_catalog`, `fuel_type_not_recognized`, `gear_type_not_recognized`, `body_style_not_recognized`). A make or model that is not matched still saves, but Chileautos publishes it without a technical sheet (ficha). `catalog_match` is null only when the catalog could not be loaded. Example of an unmatched push: {"make":"matched","model":"unmatched","version":"unmatched","catalog_version":null,"fuel_type":"unmatched","gear_type":"matched","body_style":"missing","warnings":[{"field":"model","code":"model_not_in_catalog","message":"Modelo 'Rav-4 xx' no está en el catálogo de Toyota (GET /vehicles/catalog/models); Chileautos lo publicará sin ficha."},{"field":"fuel_type","code":"fuel_type_not_recognized","message":"Combustible 'Hidrógeno' no se reconoce; valores aceptados: gasolina, diesel, hibrido, electrico, gnc, glp, otro."}]}
17779
+ *
17780
+ * **Photos are re-hosted.** A `photos[].url` that is not already a Vitrina media url is copied, shortly AFTER the response, onto the Vitrina media host and the stored url is rewritten to that copy, in the same order with every other photo field kept. The copy is normalized: EXIF orientation applied to the pixels, EXIF/GPS/XMP removed, long edge capped at 2560 px, re-encoded only when it had to change. Only public `https` urls are fetched (private/internal addresses are refused) and only image bodies up to 12 MB; a photo that cannot be fetched keeps the url you sent. Re-sending a url that was already copied is stored as the copy straight away, so pushing the same gallery again is not a change. The response of THIS call still shows the urls as sent; read the vehicle again to see the rewritten ones. The rewrite advances `updated_at` but writes no history entry, triggers no portal republish and emits no webhook.
17779
17781
  */
17780
17782
  post: {
17781
17783
  parameters: {
@@ -18443,6 +18445,8 @@ interface paths {
18443
18445
  * **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.
18444
18446
  *
18445
18447
  * **Normalization and `catalog_match`.** On create and update, `make` and `model` that equal an entry of GET /vehicles/catalog/brands and /catalog/models up to case, accents, spaces and hyphens are stored in the catalog's spelling ("toyota" → "Toyota", "mercedes benz" → "Mercedes-Benz", "rav 4" → "RAV4"); `fuel_type`, `gear_type` and `body_style` are stored as vocabulary codes ("Bencina" → `gasolina`, "Automática" → `automatica`, "Station Wagon" → `wagon`; codes: fuel `gasolina|diesel|hibrido|electrico|gnc|glp|otro`, gear `mecanica|automatica|otro`, body `sedan|hatchback|suv|camioneta|coupe|wagon|furgon|convertible|minivan|otro`). Nothing is invented: a value with no match is stored exactly as sent. The response (and GET /vehicles/{id}) carries `catalog_match`: `make` / `model` are `matched` | `unmatched` | `missing` (`not_applicable` for a non-`auto` vehicle_type); `version` adds `approximate` (word overlap with a catalog version, same displacement) and `catalog_version` names the catalog version it matched or most resembles; `fuel_type` / `gear_type` / `body_style` are `matched` | `unmatched` | `missing`; `warnings[]` lists `{ field, code, message }` for everything not matched, with a Spanish `message` ready to show (codes: `make_missing`, `make_not_in_catalog`, `model_missing`, `model_not_in_catalog`, `version_approximate`, `version_not_in_catalog`, `fuel_type_not_recognized`, `gear_type_not_recognized`, `body_style_not_recognized`). A make or model that is not matched still saves, but Chileautos publishes it without a technical sheet (ficha). `catalog_match` is null only when the catalog could not be loaded. Example of an unmatched push: {"make":"matched","model":"unmatched","version":"unmatched","catalog_version":null,"fuel_type":"unmatched","gear_type":"matched","body_style":"missing","warnings":[{"field":"model","code":"model_not_in_catalog","message":"Modelo 'Rav-4 xx' no está en el catálogo de Toyota (GET /vehicles/catalog/models); Chileautos lo publicará sin ficha."},{"field":"fuel_type","code":"fuel_type_not_recognized","message":"Combustible 'Hidrógeno' no se reconoce; valores aceptados: gasolina, diesel, hibrido, electrico, gnc, glp, otro."}]}
18448
+ *
18449
+ * **Photos are re-hosted.** A `photos[].url` that is not already a Vitrina media url is copied, shortly AFTER the response, onto the Vitrina media host and the stored url is rewritten to that copy, in the same order with every other photo field kept. The copy is normalized: EXIF orientation applied to the pixels, EXIF/GPS/XMP removed, long edge capped at 2560 px, re-encoded only when it had to change. Only public `https` urls are fetched (private/internal addresses are refused) and only image bodies up to 12 MB; a photo that cannot be fetched keeps the url you sent. Re-sending a url that was already copied is stored as the copy straight away, so pushing the same gallery again is not a change. The response of THIS call still shows the urls as sent; read the vehicle again to see the rewritten ones. The rewrite advances `updated_at` but writes no history entry, triggers no portal republish and emits no webhook.
18446
18450
  */
18447
18451
  put: {
18448
18452
  parameters: {
@@ -168917,7 +168921,7 @@ interface paths {
168917
168921
  };
168918
168922
  /**
168919
168923
  * List proyectos
168920
- * @description Live proyectos, newest first, every filter ANDed: `comuna` (accent- and case-insensitive), `stage` (etapa), `subsidy` (qualifies for any), `sales_office_location_id`, free text `q`. Each row carries `unit_model_count`. Requires `marketplace:read`. A caller whose role narrows proyectos (`project_visibility` `assigned` = ejecutivo, `sales_office` = jefe de sala) only sees the proyectos it admits; any other answers 404, as if it did not exist. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
168924
+ * @description Live proyectos, newest first, every filter ANDed: `comuna` (accent- and case-insensitive), `stage` (etapa), `subsidy` (qualifies for any), `sales_office_location_id`, free text `q`. Each row carries `unit_model_count` and the stock summary `units_total`, `units_available` and `price_from_uf` (the «desde» in UF) and `member_count` (the team). Requires `marketplace:read`. A caller whose role narrows proyectos (`project_visibility` `assigned` = ejecutivo, `sales_office` = jefe de sala) only sees the proyectos it admits; any other answers 404, as if it did not exist. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
168921
168925
  */
168922
168926
  get: {
168923
168927
  parameters: {
@@ -168972,10 +168976,15 @@ interface paths {
168972
168976
  * "120211111111111111"
168973
168977
  * ],
168974
168978
  * "whatsapp_code": "RK482",
168979
+ * "visor_show_prices": false,
168975
168980
  * "created_by": null,
168976
168981
  * "created_at": "2026-10-20T12:00:00.000Z",
168977
168982
  * "updated_at": "2026-10-20T12:00:00.000Z",
168978
- * "unit_model_count": 1
168983
+ * "unit_model_count": 1,
168984
+ * "units_total": 40,
168985
+ * "units_available": 12,
168986
+ * "price_from_uf": 3250.5,
168987
+ * "member_count": 2
168979
168988
  * }
168980
168989
  * ],
168981
168990
  * "meta": {
@@ -169119,6 +169128,7 @@ interface paths {
169119
169128
  * "120211111111111111"
169120
169129
  * ],
169121
169130
  * "whatsapp_code": "RK482",
169131
+ * "visor_show_prices": false,
169122
169132
  * "created_by": null,
169123
169133
  * "created_at": "2026-10-20T12:00:00.000Z",
169124
169134
  * "updated_at": "2026-10-20T12:00:00.000Z",
@@ -169274,6 +169284,7 @@ interface paths {
169274
169284
  * "120211111111111111"
169275
169285
  * ],
169276
169286
  * "whatsapp_code": "RK482",
169287
+ * "visor_show_prices": false,
169277
169288
  * "created_by": null,
169278
169289
  * "created_at": "2026-10-20T12:00:00.000Z",
169279
169290
  * "updated_at": "2026-10-20T12:00:00.000Z",
@@ -169527,6 +169538,7 @@ interface paths {
169527
169538
  * "120211111111111111"
169528
169539
  * ],
169529
169540
  * "whatsapp_code": "RK482",
169541
+ * "visor_show_prices": false,
169530
169542
  * "created_by": null,
169531
169543
  * "created_at": "2026-10-20T12:00:00.000Z",
169532
169544
  * "updated_at": "2026-10-20T12:00:00.000Z",
@@ -170713,7 +170725,7 @@ interface paths {
170713
170725
  patch?: never;
170714
170726
  trace?: never;
170715
170727
  };
170716
- "/units": {
170728
+ "/project-listings": {
170717
170729
  parameters: {
170718
170730
  query?: never;
170719
170731
  header?: never;
@@ -170721,26 +170733,16 @@ interface paths {
170721
170733
  cookie?: never;
170722
170734
  };
170723
170735
  /**
170724
- * List unidades (a proyecto’s stock)
170725
- * @description Live unidades of live proyectos, by floor, then kind, then number in natural order. Filters ANDed: `project_id`, `unit_model_id`, `kind`, `status`, `min_floor` / `max_floor`, `min_bedrooms`, free text `q`. `meta.status_counts` counts the same filters WITHOUT `status`, for a grid’s status chips. A unidad is a property row: `GET /properties` lists unidades too with `include_units=true`. Requires `marketplace:read`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
170736
+ * List Portal Inmobiliario anuncios and their proyecto
170737
+ * @description Anuncios (portal listings) of the workspace with how many leads arrived on each. `mapped=false` is the queue of anuncios waiting for a proyecto. Requires `marketplace:read`. A question or contact on a Portal Inmobiliario proyecto becomes a lead on the proyecto its anuncio is mapped to (`lead.project_id`), owned by one of its ejecutivos. An anuncio nobody has mapped yet is recorded on its first inquiry and that lead is flagged for mapping (`project_id` null, note on the lead). Only on the Proyectos module; callers whose role narrows proyectos are refused (403).
170726
170738
  */
170727
170739
  get: {
170728
170740
  parameters: {
170729
170741
  query?: {
170730
- /** @description Only these proyectos (comma-separated ids). */
170731
- project_id?: string[];
170732
- /** @description Only these tipologías (comma-separated ids). */
170733
- unit_model_id?: string[];
170734
- /** @description Comma-separated kinds. */
170735
- kind?: ("departamento" | "casa" | "estacionamiento" | "bodega")[];
170736
- /** @description Comma-separated statuses. */
170737
- status?: ("disponible" | "bloqueada" | "reservada" | "promesada" | "vendida" | "arrendada" | "pausada")[];
170738
- min_floor?: number | null;
170739
- max_floor?: number | null;
170740
- min_bedrooms?: number | null;
170741
- /** @description Free text over the unit number, the title and the display id. */
170742
- q?: string;
170743
- /** @description Default 100, max 500 (a whole proyecto fits in one page). */
170742
+ /** @description `false` = the anuncios still waiting for a proyecto (their leads are flagged for mapping); `true` = the mapped ones. */
170743
+ mapped?: "true" | "false";
170744
+ /** @description Only the anuncios of this proyecto. */
170745
+ project_id?: string;
170744
170746
  limit?: number;
170745
170747
  offset?: number | null;
170746
170748
  };
@@ -170750,7 +170752,7 @@ interface paths {
170750
170752
  };
170751
170753
  requestBody?: never;
170752
170754
  responses: {
170753
- /** @description Unidades */
170755
+ /** @description Anuncios */
170754
170756
  200: {
170755
170757
  headers: {
170756
170758
  [name: string]: unknown;
@@ -170760,101 +170762,23 @@ interface paths {
170760
170762
  * @example {
170761
170763
  * "data": [
170762
170764
  * {
170763
- * "id": "0199e3a0-0000-7000-8000-000000000401",
170765
+ * "id": "0199e3a0-0000-7000-8000-000000000501",
170764
170766
  * "tenant_id": "0199e3a0-0000-7000-8000-0000000000aa",
170765
- * "display_id": "I-42",
170766
- * "title": "Departamento 1203 · Parque Los Aromos",
170767
- * "description": null,
170768
- * "operation": "venta",
170769
- * "property_type": "departamento",
170770
- * "kind": "departamento",
170771
- * "status": "disponible",
170772
- * "region": "Metropolitana",
170773
- * "comuna": "La Florida",
170774
- * "sector": null,
170775
- * "address": null,
170776
- * "sale_price_amount": 3250.5,
170777
- * "sale_price_currency": "UF",
170778
- * "rent_price_amount": null,
170779
- * "rent_price_currency": null,
170780
- * "common_expenses_clp": null,
170781
- * "property_tax_clp": null,
170782
- * "bedrooms": 3,
170783
- * "bathrooms": 2,
170784
- * "usable_area_m2": 72.5,
170785
- * "terrace_area_m2": 6,
170786
- * "total_area_m2": 78.5,
170787
- * "parking_spaces": null,
170788
- * "storage_units": null,
170789
- * "orientation": "nororiente",
170790
- * "floor": 12,
170791
- * "year_built": null,
170792
- * "furnished": null,
170793
- * "pets_allowed": null,
170794
- * "photos": [],
170795
- * "broker_user_id": null,
170796
- * "owner_name": null,
170797
- * "owner_phone": null,
170798
- * "owner_email": null,
170799
- * "source": "import",
170800
- * "external_ref": null,
170801
- * "protected_fields": [],
170767
+ * "marketplace_account_id": "0199e3a0-0000-7000-8000-000000000601",
170768
+ * "external_id": "MLC1234567890",
170802
170769
  * "project_id": "0199e3a0-0000-7000-8000-000000000101",
170803
- * "unit_model_id": "0199e3a0-0000-7000-8000-000000000201",
170804
- * "unit_number": "1203",
170805
- * "hold_expires_at": null,
170806
- * "created_by": null,
170770
+ * "title": "Proyecto Parque Central, Ñuñoa",
170771
+ * "permalink": null,
170807
170772
  * "created_at": "2026-10-20T12:00:00.000Z",
170808
170773
  * "updated_at": "2026-10-20T12:00:00.000Z",
170809
- * "sale_price": {
170810
- * "amount": 3250.5,
170811
- * "currency": "UF",
170812
- * "amount_clp": 128500000,
170813
- * "amount_uf": 3250.5
170814
- * },
170815
- * "rent_price": null,
170816
- * "project": {
170817
- * "id": "0199e3a0-0000-7000-8000-000000000101",
170818
- * "name": "Parque Los Aromos"
170819
- * },
170820
- * "unit_model": {
170821
- * "id": "0199e3a0-0000-7000-8000-000000000201",
170822
- * "name": "3D2B 78 m²"
170823
- * }
170824
- * }
170825
- * ],
170826
- * "meta": {
170827
- * "pagination": {
170828
- * "total": 1,
170829
- * "limit": 100,
170830
- * "offset": 0
170831
- * },
170832
- * "status_counts": {
170833
- * "disponible": 1
170834
- * },
170835
- * "uf_value": {
170836
- * "clp": 39532.12,
170837
- * "date": "2026-10-20"
170774
+ * "lead_count": 4,
170775
+ * "unmapped_lead_count": 0
170838
170776
  * }
170839
- * }
170777
+ * ]
170840
170778
  * }
170841
170779
  */
170842
170780
  "application/json": {
170843
- data: components["schemas"]["Unit"][];
170844
- meta: {
170845
- pagination: {
170846
- total: number;
170847
- limit: number;
170848
- offset: number;
170849
- };
170850
- status_counts: {
170851
- [key: string]: number;
170852
- };
170853
- uf_value: {
170854
- clp: number;
170855
- date: string;
170856
- } | null;
170857
- };
170781
+ data: components["schemas"]["ProjectListingListItem"][];
170858
170782
  };
170859
170783
  };
170860
170784
  };
@@ -170916,8 +170840,8 @@ interface paths {
170916
170840
  };
170917
170841
  put?: never;
170918
170842
  /**
170919
- * Add a unidad by hand
170920
- * @description A departamento, casa, estacionamiento or bodega of a proyecto; estacionamientos and bodegas are unidades of their own, priced and sold alone or with a departamento. The number is unique per proyecto and kind (409 otherwise); the tipología must be one of the proyecto’s. Born `disponible`. A unidad’s status is its negocio’s: by hand it can only be paused and put back (disponible ⇄ pausada), and no import ever writes it. Once the proyecto has a published lista de precios (`/price-lists`), its unidades’ prices change only by publishing a new version: a price here answers 409 `unit_price_owned_by_price_list`. Requires `marketplace:write`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
170843
+ * Map a Portal Inmobiliario anuncio to a proyecto
170844
+ * @description Maps the portal's listing id to a proyecto ahead of its first inquiry. Idempotent on the anuncio: posting an already-seen id re-maps it, stamps the proyecto on its waiting leads and routes the unowned ones to the proyecto's ejecutivos. Requires `marketplace:write`. A question or contact on a Portal Inmobiliario proyecto becomes a lead on the proyecto its anuncio is mapped to (`lead.project_id`), owned by one of its ejecutivos. An anuncio nobody has mapped yet is recorded on its first inquiry and that lead is flagged for mapping (`project_id` null, note on the lead). Only on the Proyectos module; callers whose role narrows proyectos are refused (403).
170921
170845
  */
170922
170846
  post: {
170923
170847
  parameters: {
@@ -170934,18 +170858,14 @@ interface paths {
170934
170858
  /**
170935
170859
  * @example {
170936
170860
  * "project_id": "0199e3a0-0000-7000-8000-000000000101",
170937
- * "kind": "estacionamiento",
170938
- * "unit_number": "E-12",
170939
- * "floor": -1,
170940
- * "sale_price_amount": 250,
170941
- * "sale_price_currency": "UF"
170861
+ * "external_id": "MLC1234567890"
170942
170862
  * }
170943
170863
  */
170944
- "application/json": components["schemas"]["CreateUnitBody"];
170864
+ "application/json": components["schemas"]["CreateProjectListingBody"];
170945
170865
  };
170946
170866
  };
170947
170867
  responses: {
170948
- /** @description Created */
170868
+ /** @description Mapped */
170949
170869
  201: {
170950
170870
  headers: {
170951
170871
  [name: string]: unknown;
@@ -170954,72 +170874,21 @@ interface paths {
170954
170874
  /**
170955
170875
  * @example {
170956
170876
  * "data": {
170957
- * "id": "0199e3a0-0000-7000-8000-000000000401",
170877
+ * "id": "0199e3a0-0000-7000-8000-000000000501",
170958
170878
  * "tenant_id": "0199e3a0-0000-7000-8000-0000000000aa",
170959
- * "display_id": "I-42",
170960
- * "title": "Departamento 1203 · Parque Los Aromos",
170961
- * "description": null,
170962
- * "operation": "venta",
170963
- * "property_type": "departamento",
170964
- * "kind": "departamento",
170965
- * "status": "disponible",
170966
- * "region": "Metropolitana",
170967
- * "comuna": "La Florida",
170968
- * "sector": null,
170969
- * "address": null,
170970
- * "sale_price_amount": 3250.5,
170971
- * "sale_price_currency": "UF",
170972
- * "rent_price_amount": null,
170973
- * "rent_price_currency": null,
170974
- * "common_expenses_clp": null,
170975
- * "property_tax_clp": null,
170976
- * "bedrooms": 3,
170977
- * "bathrooms": 2,
170978
- * "usable_area_m2": 72.5,
170979
- * "terrace_area_m2": 6,
170980
- * "total_area_m2": 78.5,
170981
- * "parking_spaces": null,
170982
- * "storage_units": null,
170983
- * "orientation": "nororiente",
170984
- * "floor": 12,
170985
- * "year_built": null,
170986
- * "furnished": null,
170987
- * "pets_allowed": null,
170988
- * "photos": [],
170989
- * "broker_user_id": null,
170990
- * "owner_name": null,
170991
- * "owner_phone": null,
170992
- * "owner_email": null,
170993
- * "source": "import",
170994
- * "external_ref": null,
170995
- * "protected_fields": [],
170879
+ * "marketplace_account_id": "0199e3a0-0000-7000-8000-000000000601",
170880
+ * "external_id": "MLC1234567890",
170996
170881
  * "project_id": "0199e3a0-0000-7000-8000-000000000101",
170997
- * "unit_model_id": "0199e3a0-0000-7000-8000-000000000201",
170998
- * "unit_number": "1203",
170999
- * "hold_expires_at": null,
171000
- * "created_by": null,
170882
+ * "title": "Proyecto Parque Central, Ñuñoa",
170883
+ * "permalink": null,
171001
170884
  * "created_at": "2026-10-20T12:00:00.000Z",
171002
170885
  * "updated_at": "2026-10-20T12:00:00.000Z",
171003
- * "sale_price": {
171004
- * "amount": 3250.5,
171005
- * "currency": "UF",
171006
- * "amount_clp": 128500000,
171007
- * "amount_uf": 3250.5
171008
- * },
171009
- * "rent_price": null,
171010
- * "project": {
171011
- * "id": "0199e3a0-0000-7000-8000-000000000101",
171012
- * "name": "Parque Los Aromos"
171013
- * },
171014
- * "unit_model": {
171015
- * "id": "0199e3a0-0000-7000-8000-000000000201",
171016
- * "name": "3D2B 78 m²"
171017
- * }
170886
+ * "leads_mapped": 0
171018
170887
  * }
171019
170888
  * }
171020
170889
  */
171021
170890
  "application/json": {
171022
- data: components["schemas"]["Unit"];
170891
+ data: components["schemas"]["MappedProjectListing"];
171023
170892
  };
171024
170893
  };
171025
170894
  };
@@ -171085,7 +170954,7 @@ interface paths {
171085
170954
  patch?: never;
171086
170955
  trace?: never;
171087
170956
  };
171088
- "/units/import/columns": {
170957
+ "/project-listings/{id}": {
171089
170958
  parameters: {
171090
170959
  query?: never;
171091
170960
  header?: never;
@@ -171094,34 +170963,36 @@ interface paths {
171094
170963
  };
171095
170964
  get?: never;
171096
170965
  put?: never;
170966
+ post?: never;
170967
+ delete?: never;
170968
+ options?: never;
170969
+ head?: never;
171097
170970
  /**
171098
- * Import step 1: read a stock file’s columns
171099
- * @description Multipart, the file in a part named `file` (.xlsx, .xls or .csv, up to 20 MB; the first sheet with data, the first non-empty row is the header). Returns the header, the first rows, the mapping we suggest from the column names and every field a column can feed — the mapping screen. Writes and stores nothing: send the same file to `POST /units/import`. Requires `marketplace:write`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
170971
+ * Map or unmap a Portal Inmobiliario anuncio
170972
+ * @description Sets the proyecto of an anuncio (`project_id`), or clears it with `null`. Mapping stamps the proyecto on the leads waiting on the anuncio and routes the unowned ones to its ejecutivos; unmapping only affects leads that arrive afterwards. Requires `marketplace:write`. A question or contact on a Portal Inmobiliario proyecto becomes a lead on the proyecto its anuncio is mapped to (`lead.project_id`), owned by one of its ejecutivos. An anuncio nobody has mapped yet is recorded on its first inquiry and that lead is flagged for mapping (`project_id` null, note on the lead). Only on the Proyectos module; callers whose role narrows proyectos are refused (403).
171100
170973
  */
171101
- post: {
170974
+ patch: {
171102
170975
  parameters: {
171103
170976
  query?: never;
171104
- header?: {
171105
- /** @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. */
171106
- "Idempotency-Key"?: string;
170977
+ header?: never;
170978
+ path: {
170979
+ /** @description The anuncio (portal listing) id. */
170980
+ id: string;
171107
170981
  };
171108
- path?: never;
171109
170982
  cookie?: never;
171110
170983
  };
171111
170984
  requestBody?: {
171112
170985
  content: {
171113
170986
  /**
171114
170987
  * @example {
171115
- * "file": "(binary: stock-aromos.xlsx)"
170988
+ * "project_id": "0199e3a0-0000-7000-8000-000000000101"
171116
170989
  * }
171117
170990
  */
171118
- "multipart/form-data": {
171119
- file?: unknown;
171120
- };
170991
+ "application/json": components["schemas"]["UpdateProjectListingBody"];
171121
170992
  };
171122
170993
  };
171123
170994
  responses: {
171124
- /** @description The file’s columns and the suggested mapping */
170995
+ /** @description Updated */
171125
170996
  200: {
171126
170997
  headers: {
171127
170998
  [name: string]: unknown;
@@ -171130,50 +171001,543 @@ interface paths {
171130
171001
  /**
171131
171002
  * @example {
171132
171003
  * "data": {
171133
- * "format": "xlsx",
171134
- * "sheet_name": "Stock",
171135
- * "header": [
171136
- * "Número",
171137
- * "Tipo",
171138
- * "Tipología",
171139
- * "Piso",
171140
- * "Precio UF",
171141
- * "Estado"
171142
- * ],
171143
- * "row_count": 200,
171144
- * "sample": [
171145
- * [
171146
- * "1203",
171147
- * "Depto",
171148
- * "3D2B",
171149
- * "12",
171150
- * "3.250,5",
171151
- * "Disponible"
171152
- * ]
171153
- * ],
171154
- * "suggested_mapping": {
171155
- * "unit_number": "Número",
171156
- * "kind": "Tipo",
171157
- * "unit_model": "Tipología",
171158
- * "floor": "Piso",
171159
- * "price_uf": "Precio UF"
171160
- * },
171161
- * "ignored_status_columns": [
171162
- * "Estado"
171163
- * ],
171164
- * "fields": [
171165
- * {
171166
- * "key": "unit_number",
171167
- * "label": "Número de unidad",
171168
- * "required": true,
171169
- * "description": "The unidad’s number as the inmobiliaria writes it."
171004
+ * "id": "0199e3a0-0000-7000-8000-000000000501",
171005
+ * "tenant_id": "0199e3a0-0000-7000-8000-0000000000aa",
171006
+ * "marketplace_account_id": "0199e3a0-0000-7000-8000-000000000601",
171007
+ * "external_id": "MLC1234567890",
171008
+ * "project_id": "0199e3a0-0000-7000-8000-000000000101",
171009
+ * "title": "Proyecto Parque Central, Ñuñoa",
171010
+ * "permalink": null,
171011
+ * "created_at": "2026-10-20T12:00:00.000Z",
171012
+ * "updated_at": "2026-10-20T12:00:00.000Z",
171013
+ * "leads_mapped": 3
171014
+ * }
171015
+ * }
171016
+ */
171017
+ "application/json": {
171018
+ data: components["schemas"]["MappedProjectListing"];
171019
+ };
171020
+ };
171021
+ };
171022
+ /** @description Validation error */
171023
+ 400: {
171024
+ headers: {
171025
+ [name: string]: unknown;
171026
+ };
171027
+ content: {
171028
+ "application/json": components["schemas"]["Error"];
171029
+ };
171030
+ };
171031
+ /** @description Unauthorized */
171032
+ 401: {
171033
+ headers: {
171034
+ [name: string]: unknown;
171035
+ };
171036
+ content: {
171037
+ "application/json": components["schemas"]["Error"];
171038
+ };
171039
+ };
171040
+ /** @description Forbidden */
171041
+ 403: {
171042
+ headers: {
171043
+ [name: string]: unknown;
171044
+ };
171045
+ content: {
171046
+ "application/json": components["schemas"]["Error"];
171047
+ };
171048
+ };
171049
+ /** @description Not found */
171050
+ 404: {
171051
+ headers: {
171052
+ [name: string]: unknown;
171053
+ };
171054
+ content: {
171055
+ "application/json": components["schemas"]["Error"];
171056
+ };
171057
+ };
171058
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
171059
+ 409: {
171060
+ headers: {
171061
+ [name: string]: unknown;
171062
+ };
171063
+ content: {
171064
+ "application/json": components["schemas"]["Error"];
171065
+ };
171066
+ };
171067
+ /** @description Rate limited */
171068
+ 429: {
171069
+ headers: {
171070
+ [name: string]: unknown;
171071
+ };
171072
+ content: {
171073
+ "application/json": components["schemas"]["Error"];
171074
+ };
171075
+ };
171076
+ };
171077
+ };
171078
+ trace?: never;
171079
+ };
171080
+ "/units": {
171081
+ parameters: {
171082
+ query?: never;
171083
+ header?: never;
171084
+ path?: never;
171085
+ cookie?: never;
171086
+ };
171087
+ /**
171088
+ * List unidades (a proyecto’s stock)
171089
+ * @description Live unidades of live proyectos, by floor, then kind, then number in natural order. Filters ANDed: `project_id`, `unit_model_id`, `kind`, `status`, `min_floor` / `max_floor`, `min_bedrooms`, free text `q`. `meta.status_counts` counts the same filters WITHOUT `status`, for a grid’s status chips. A unidad is a property row: `GET /properties` lists unidades too with `include_units=true`. Requires `marketplace:read`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
171090
+ */
171091
+ get: {
171092
+ parameters: {
171093
+ query?: {
171094
+ /** @description Only these proyectos (comma-separated ids). */
171095
+ project_id?: string[];
171096
+ /** @description Only these tipologías (comma-separated ids). */
171097
+ unit_model_id?: string[];
171098
+ /** @description Comma-separated kinds. */
171099
+ kind?: ("departamento" | "casa" | "estacionamiento" | "bodega")[];
171100
+ /** @description Comma-separated statuses. */
171101
+ status?: ("disponible" | "bloqueada" | "reservada" | "promesada" | "vendida" | "arrendada" | "pausada")[];
171102
+ min_floor?: number | null;
171103
+ max_floor?: number | null;
171104
+ min_bedrooms?: number | null;
171105
+ /** @description Free text over the unit number, the title and the display id. */
171106
+ q?: string;
171107
+ /** @description Default 100, max 500 (a whole proyecto fits in one page). */
171108
+ limit?: number;
171109
+ offset?: number | null;
171110
+ };
171111
+ header?: never;
171112
+ path?: never;
171113
+ cookie?: never;
171114
+ };
171115
+ requestBody?: never;
171116
+ responses: {
171117
+ /** @description Unidades */
171118
+ 200: {
171119
+ headers: {
171120
+ [name: string]: unknown;
171121
+ };
171122
+ content: {
171123
+ /**
171124
+ * @example {
171125
+ * "data": [
171126
+ * {
171127
+ * "id": "0199e3a0-0000-7000-8000-000000000401",
171128
+ * "tenant_id": "0199e3a0-0000-7000-8000-0000000000aa",
171129
+ * "display_id": "I-42",
171130
+ * "title": "Departamento 1203 · Parque Los Aromos",
171131
+ * "description": null,
171132
+ * "operation": "venta",
171133
+ * "property_type": "departamento",
171134
+ * "kind": "departamento",
171135
+ * "status": "disponible",
171136
+ * "region": "Metropolitana",
171137
+ * "comuna": "La Florida",
171138
+ * "sector": null,
171139
+ * "address": null,
171140
+ * "sale_price_amount": 3250.5,
171141
+ * "sale_price_currency": "UF",
171142
+ * "rent_price_amount": null,
171143
+ * "rent_price_currency": null,
171144
+ * "common_expenses_clp": null,
171145
+ * "property_tax_clp": null,
171146
+ * "bedrooms": 3,
171147
+ * "bathrooms": 2,
171148
+ * "usable_area_m2": 72.5,
171149
+ * "terrace_area_m2": 6,
171150
+ * "total_area_m2": 78.5,
171151
+ * "parking_spaces": null,
171152
+ * "storage_units": null,
171153
+ * "orientation": "nororiente",
171154
+ * "floor": 12,
171155
+ * "year_built": null,
171156
+ * "furnished": null,
171157
+ * "pets_allowed": null,
171158
+ * "photos": [],
171159
+ * "broker_user_id": null,
171160
+ * "owner_name": null,
171161
+ * "owner_phone": null,
171162
+ * "owner_email": null,
171163
+ * "source": "import",
171164
+ * "external_ref": null,
171165
+ * "protected_fields": [],
171166
+ * "project_id": "0199e3a0-0000-7000-8000-000000000101",
171167
+ * "unit_model_id": "0199e3a0-0000-7000-8000-000000000201",
171168
+ * "unit_number": "1203",
171169
+ * "hold_expires_at": null,
171170
+ * "created_by": null,
171171
+ * "created_at": "2026-10-20T12:00:00.000Z",
171172
+ * "updated_at": "2026-10-20T12:00:00.000Z",
171173
+ * "sale_price": {
171174
+ * "amount": 3250.5,
171175
+ * "currency": "UF",
171176
+ * "amount_clp": 128500000,
171177
+ * "amount_uf": 3250.5
171178
+ * },
171179
+ * "rent_price": null,
171180
+ * "project": {
171181
+ * "id": "0199e3a0-0000-7000-8000-000000000101",
171182
+ * "name": "Parque Los Aromos"
171183
+ * },
171184
+ * "unit_model": {
171185
+ * "id": "0199e3a0-0000-7000-8000-000000000201",
171186
+ * "name": "3D2B 78 m²"
171170
171187
  * }
171171
- * ]
171188
+ * }
171189
+ * ],
171190
+ * "meta": {
171191
+ * "pagination": {
171192
+ * "total": 1,
171193
+ * "limit": 100,
171194
+ * "offset": 0
171195
+ * },
171196
+ * "status_counts": {
171197
+ * "disponible": 1
171198
+ * },
171199
+ * "uf_value": {
171200
+ * "clp": 39532.12,
171201
+ * "date": "2026-10-20"
171202
+ * }
171172
171203
  * }
171173
171204
  * }
171174
171205
  */
171175
171206
  "application/json": {
171176
- data: components["schemas"]["UnitImportColumns"];
171207
+ data: components["schemas"]["Unit"][];
171208
+ meta: {
171209
+ pagination: {
171210
+ total: number;
171211
+ limit: number;
171212
+ offset: number;
171213
+ };
171214
+ status_counts: {
171215
+ [key: string]: number;
171216
+ };
171217
+ uf_value: {
171218
+ clp: number;
171219
+ date: string;
171220
+ } | null;
171221
+ };
171222
+ };
171223
+ };
171224
+ };
171225
+ /** @description Validation error */
171226
+ 400: {
171227
+ headers: {
171228
+ [name: string]: unknown;
171229
+ };
171230
+ content: {
171231
+ "application/json": components["schemas"]["Error"];
171232
+ };
171233
+ };
171234
+ /** @description Unauthorized */
171235
+ 401: {
171236
+ headers: {
171237
+ [name: string]: unknown;
171238
+ };
171239
+ content: {
171240
+ "application/json": components["schemas"]["Error"];
171241
+ };
171242
+ };
171243
+ /** @description Forbidden */
171244
+ 403: {
171245
+ headers: {
171246
+ [name: string]: unknown;
171247
+ };
171248
+ content: {
171249
+ "application/json": components["schemas"]["Error"];
171250
+ };
171251
+ };
171252
+ /** @description Not found */
171253
+ 404: {
171254
+ headers: {
171255
+ [name: string]: unknown;
171256
+ };
171257
+ content: {
171258
+ "application/json": components["schemas"]["Error"];
171259
+ };
171260
+ };
171261
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
171262
+ 409: {
171263
+ headers: {
171264
+ [name: string]: unknown;
171265
+ };
171266
+ content: {
171267
+ "application/json": components["schemas"]["Error"];
171268
+ };
171269
+ };
171270
+ /** @description Rate limited */
171271
+ 429: {
171272
+ headers: {
171273
+ [name: string]: unknown;
171274
+ };
171275
+ content: {
171276
+ "application/json": components["schemas"]["Error"];
171277
+ };
171278
+ };
171279
+ };
171280
+ };
171281
+ put?: never;
171282
+ /**
171283
+ * Add a unidad by hand
171284
+ * @description A departamento, casa, estacionamiento or bodega of a proyecto; estacionamientos and bodegas are unidades of their own, priced and sold alone or with a departamento. The number is unique per proyecto and kind (409 otherwise); the tipología must be one of the proyecto’s. Born `disponible`. A unidad’s status is its negocio’s: by hand it can only be paused and put back (disponible ⇄ pausada), and no import ever writes it. Once the proyecto has a published lista de precios (`/price-lists`), its unidades’ prices change only by publishing a new version: a price here answers 409 `unit_price_owned_by_price_list`. Requires `marketplace:write`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
171285
+ */
171286
+ post: {
171287
+ parameters: {
171288
+ query?: never;
171289
+ header?: {
171290
+ /** @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. */
171291
+ "Idempotency-Key"?: string;
171292
+ };
171293
+ path?: never;
171294
+ cookie?: never;
171295
+ };
171296
+ requestBody?: {
171297
+ content: {
171298
+ /**
171299
+ * @example {
171300
+ * "project_id": "0199e3a0-0000-7000-8000-000000000101",
171301
+ * "kind": "estacionamiento",
171302
+ * "unit_number": "E-12",
171303
+ * "floor": -1,
171304
+ * "sale_price_amount": 250,
171305
+ * "sale_price_currency": "UF"
171306
+ * }
171307
+ */
171308
+ "application/json": components["schemas"]["CreateUnitBody"];
171309
+ };
171310
+ };
171311
+ responses: {
171312
+ /** @description Created */
171313
+ 201: {
171314
+ headers: {
171315
+ [name: string]: unknown;
171316
+ };
171317
+ content: {
171318
+ /**
171319
+ * @example {
171320
+ * "data": {
171321
+ * "id": "0199e3a0-0000-7000-8000-000000000401",
171322
+ * "tenant_id": "0199e3a0-0000-7000-8000-0000000000aa",
171323
+ * "display_id": "I-42",
171324
+ * "title": "Departamento 1203 · Parque Los Aromos",
171325
+ * "description": null,
171326
+ * "operation": "venta",
171327
+ * "property_type": "departamento",
171328
+ * "kind": "departamento",
171329
+ * "status": "disponible",
171330
+ * "region": "Metropolitana",
171331
+ * "comuna": "La Florida",
171332
+ * "sector": null,
171333
+ * "address": null,
171334
+ * "sale_price_amount": 3250.5,
171335
+ * "sale_price_currency": "UF",
171336
+ * "rent_price_amount": null,
171337
+ * "rent_price_currency": null,
171338
+ * "common_expenses_clp": null,
171339
+ * "property_tax_clp": null,
171340
+ * "bedrooms": 3,
171341
+ * "bathrooms": 2,
171342
+ * "usable_area_m2": 72.5,
171343
+ * "terrace_area_m2": 6,
171344
+ * "total_area_m2": 78.5,
171345
+ * "parking_spaces": null,
171346
+ * "storage_units": null,
171347
+ * "orientation": "nororiente",
171348
+ * "floor": 12,
171349
+ * "year_built": null,
171350
+ * "furnished": null,
171351
+ * "pets_allowed": null,
171352
+ * "photos": [],
171353
+ * "broker_user_id": null,
171354
+ * "owner_name": null,
171355
+ * "owner_phone": null,
171356
+ * "owner_email": null,
171357
+ * "source": "import",
171358
+ * "external_ref": null,
171359
+ * "protected_fields": [],
171360
+ * "project_id": "0199e3a0-0000-7000-8000-000000000101",
171361
+ * "unit_model_id": "0199e3a0-0000-7000-8000-000000000201",
171362
+ * "unit_number": "1203",
171363
+ * "hold_expires_at": null,
171364
+ * "created_by": null,
171365
+ * "created_at": "2026-10-20T12:00:00.000Z",
171366
+ * "updated_at": "2026-10-20T12:00:00.000Z",
171367
+ * "sale_price": {
171368
+ * "amount": 3250.5,
171369
+ * "currency": "UF",
171370
+ * "amount_clp": 128500000,
171371
+ * "amount_uf": 3250.5
171372
+ * },
171373
+ * "rent_price": null,
171374
+ * "project": {
171375
+ * "id": "0199e3a0-0000-7000-8000-000000000101",
171376
+ * "name": "Parque Los Aromos"
171377
+ * },
171378
+ * "unit_model": {
171379
+ * "id": "0199e3a0-0000-7000-8000-000000000201",
171380
+ * "name": "3D2B 78 m²"
171381
+ * }
171382
+ * }
171383
+ * }
171384
+ */
171385
+ "application/json": {
171386
+ data: components["schemas"]["Unit"];
171387
+ };
171388
+ };
171389
+ };
171390
+ /** @description Validation error */
171391
+ 400: {
171392
+ headers: {
171393
+ [name: string]: unknown;
171394
+ };
171395
+ content: {
171396
+ "application/json": components["schemas"]["Error"];
171397
+ };
171398
+ };
171399
+ /** @description Unauthorized */
171400
+ 401: {
171401
+ headers: {
171402
+ [name: string]: unknown;
171403
+ };
171404
+ content: {
171405
+ "application/json": components["schemas"]["Error"];
171406
+ };
171407
+ };
171408
+ /** @description Forbidden */
171409
+ 403: {
171410
+ headers: {
171411
+ [name: string]: unknown;
171412
+ };
171413
+ content: {
171414
+ "application/json": components["schemas"]["Error"];
171415
+ };
171416
+ };
171417
+ /** @description Not found */
171418
+ 404: {
171419
+ headers: {
171420
+ [name: string]: unknown;
171421
+ };
171422
+ content: {
171423
+ "application/json": components["schemas"]["Error"];
171424
+ };
171425
+ };
171426
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
171427
+ 409: {
171428
+ headers: {
171429
+ [name: string]: unknown;
171430
+ };
171431
+ content: {
171432
+ "application/json": components["schemas"]["Error"];
171433
+ };
171434
+ };
171435
+ /** @description Rate limited */
171436
+ 429: {
171437
+ headers: {
171438
+ [name: string]: unknown;
171439
+ };
171440
+ content: {
171441
+ "application/json": components["schemas"]["Error"];
171442
+ };
171443
+ };
171444
+ };
171445
+ };
171446
+ delete?: never;
171447
+ options?: never;
171448
+ head?: never;
171449
+ patch?: never;
171450
+ trace?: never;
171451
+ };
171452
+ "/units/import/columns": {
171453
+ parameters: {
171454
+ query?: never;
171455
+ header?: never;
171456
+ path?: never;
171457
+ cookie?: never;
171458
+ };
171459
+ get?: never;
171460
+ put?: never;
171461
+ /**
171462
+ * Import step 1: read a stock file’s columns
171463
+ * @description Multipart, the file in a part named `file` (.xlsx, .xls or .csv, up to 20 MB; the first sheet with data, the first non-empty row is the header). Returns the header, the first rows, the mapping we suggest from the column names and every field a column can feed — the mapping screen. Writes and stores nothing: send the same file to `POST /units/import`. Requires `marketplace:write`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
171464
+ */
171465
+ post: {
171466
+ parameters: {
171467
+ query?: never;
171468
+ header?: {
171469
+ /** @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. */
171470
+ "Idempotency-Key"?: string;
171471
+ };
171472
+ path?: never;
171473
+ cookie?: never;
171474
+ };
171475
+ requestBody?: {
171476
+ content: {
171477
+ /**
171478
+ * @example {
171479
+ * "file": "(binary: stock-aromos.xlsx)"
171480
+ * }
171481
+ */
171482
+ "multipart/form-data": {
171483
+ file?: unknown;
171484
+ };
171485
+ };
171486
+ };
171487
+ responses: {
171488
+ /** @description The file’s columns and the suggested mapping */
171489
+ 200: {
171490
+ headers: {
171491
+ [name: string]: unknown;
171492
+ };
171493
+ content: {
171494
+ /**
171495
+ * @example {
171496
+ * "data": {
171497
+ * "format": "xlsx",
171498
+ * "sheet_name": "Stock",
171499
+ * "header": [
171500
+ * "Número",
171501
+ * "Tipo",
171502
+ * "Tipología",
171503
+ * "Piso",
171504
+ * "Precio UF",
171505
+ * "Estado"
171506
+ * ],
171507
+ * "row_count": 200,
171508
+ * "sample": [
171509
+ * [
171510
+ * "1203",
171511
+ * "Depto",
171512
+ * "3D2B",
171513
+ * "12",
171514
+ * "3.250,5",
171515
+ * "Disponible"
171516
+ * ]
171517
+ * ],
171518
+ * "suggested_mapping": {
171519
+ * "unit_number": "Número",
171520
+ * "kind": "Tipo",
171521
+ * "unit_model": "Tipología",
171522
+ * "floor": "Piso",
171523
+ * "price_uf": "Precio UF"
171524
+ * },
171525
+ * "ignored_status_columns": [
171526
+ * "Estado"
171527
+ * ],
171528
+ * "fields": [
171529
+ * {
171530
+ * "key": "unit_number",
171531
+ * "label": "Número de unidad",
171532
+ * "required": true,
171533
+ * "description": "The unidad’s number as the inmobiliaria writes it."
171534
+ * }
171535
+ * ]
171536
+ * }
171537
+ * }
171538
+ */
171539
+ "application/json": {
171540
+ data: components["schemas"]["UnitImportColumns"];
171177
171541
  };
171178
171542
  };
171179
171543
  };
@@ -171454,7 +171818,892 @@ interface paths {
171454
171818
  patch?: never;
171455
171819
  trace?: never;
171456
171820
  };
171457
- "/units/{id}": {
171821
+ "/units/{id}": {
171822
+ parameters: {
171823
+ query?: never;
171824
+ header?: never;
171825
+ path?: never;
171826
+ cookie?: never;
171827
+ };
171828
+ /**
171829
+ * One unidad
171830
+ * @description By uuid or display id (`I-42`). Requires `marketplace:read`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
171831
+ */
171832
+ get: {
171833
+ parameters: {
171834
+ query?: never;
171835
+ header?: never;
171836
+ path: {
171837
+ /** @description The unidad’s uuid or its display id (`I-12`). */
171838
+ id: string;
171839
+ };
171840
+ cookie?: never;
171841
+ };
171842
+ requestBody?: never;
171843
+ responses: {
171844
+ /** @description Unidad */
171845
+ 200: {
171846
+ headers: {
171847
+ [name: string]: unknown;
171848
+ };
171849
+ content: {
171850
+ /**
171851
+ * @example {
171852
+ * "data": {
171853
+ * "id": "0199e3a0-0000-7000-8000-000000000401",
171854
+ * "tenant_id": "0199e3a0-0000-7000-8000-0000000000aa",
171855
+ * "display_id": "I-42",
171856
+ * "title": "Departamento 1203 · Parque Los Aromos",
171857
+ * "description": null,
171858
+ * "operation": "venta",
171859
+ * "property_type": "departamento",
171860
+ * "kind": "departamento",
171861
+ * "status": "disponible",
171862
+ * "region": "Metropolitana",
171863
+ * "comuna": "La Florida",
171864
+ * "sector": null,
171865
+ * "address": null,
171866
+ * "sale_price_amount": 3250.5,
171867
+ * "sale_price_currency": "UF",
171868
+ * "rent_price_amount": null,
171869
+ * "rent_price_currency": null,
171870
+ * "common_expenses_clp": null,
171871
+ * "property_tax_clp": null,
171872
+ * "bedrooms": 3,
171873
+ * "bathrooms": 2,
171874
+ * "usable_area_m2": 72.5,
171875
+ * "terrace_area_m2": 6,
171876
+ * "total_area_m2": 78.5,
171877
+ * "parking_spaces": null,
171878
+ * "storage_units": null,
171879
+ * "orientation": "nororiente",
171880
+ * "floor": 12,
171881
+ * "year_built": null,
171882
+ * "furnished": null,
171883
+ * "pets_allowed": null,
171884
+ * "photos": [],
171885
+ * "broker_user_id": null,
171886
+ * "owner_name": null,
171887
+ * "owner_phone": null,
171888
+ * "owner_email": null,
171889
+ * "source": "import",
171890
+ * "external_ref": null,
171891
+ * "protected_fields": [],
171892
+ * "project_id": "0199e3a0-0000-7000-8000-000000000101",
171893
+ * "unit_model_id": "0199e3a0-0000-7000-8000-000000000201",
171894
+ * "unit_number": "1203",
171895
+ * "hold_expires_at": null,
171896
+ * "created_by": null,
171897
+ * "created_at": "2026-10-20T12:00:00.000Z",
171898
+ * "updated_at": "2026-10-20T12:00:00.000Z",
171899
+ * "sale_price": {
171900
+ * "amount": 3250.5,
171901
+ * "currency": "UF",
171902
+ * "amount_clp": 128500000,
171903
+ * "amount_uf": 3250.5
171904
+ * },
171905
+ * "rent_price": null,
171906
+ * "project": {
171907
+ * "id": "0199e3a0-0000-7000-8000-000000000101",
171908
+ * "name": "Parque Los Aromos"
171909
+ * },
171910
+ * "unit_model": {
171911
+ * "id": "0199e3a0-0000-7000-8000-000000000201",
171912
+ * "name": "3D2B 78 m²"
171913
+ * }
171914
+ * }
171915
+ * }
171916
+ */
171917
+ "application/json": {
171918
+ data: components["schemas"]["Unit"];
171919
+ };
171920
+ };
171921
+ };
171922
+ /** @description Validation error */
171923
+ 400: {
171924
+ headers: {
171925
+ [name: string]: unknown;
171926
+ };
171927
+ content: {
171928
+ "application/json": components["schemas"]["Error"];
171929
+ };
171930
+ };
171931
+ /** @description Unauthorized */
171932
+ 401: {
171933
+ headers: {
171934
+ [name: string]: unknown;
171935
+ };
171936
+ content: {
171937
+ "application/json": components["schemas"]["Error"];
171938
+ };
171939
+ };
171940
+ /** @description Forbidden */
171941
+ 403: {
171942
+ headers: {
171943
+ [name: string]: unknown;
171944
+ };
171945
+ content: {
171946
+ "application/json": components["schemas"]["Error"];
171947
+ };
171948
+ };
171949
+ /** @description Not found */
171950
+ 404: {
171951
+ headers: {
171952
+ [name: string]: unknown;
171953
+ };
171954
+ content: {
171955
+ "application/json": components["schemas"]["Error"];
171956
+ };
171957
+ };
171958
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
171959
+ 409: {
171960
+ headers: {
171961
+ [name: string]: unknown;
171962
+ };
171963
+ content: {
171964
+ "application/json": components["schemas"]["Error"];
171965
+ };
171966
+ };
171967
+ /** @description Rate limited */
171968
+ 429: {
171969
+ headers: {
171970
+ [name: string]: unknown;
171971
+ };
171972
+ content: {
171973
+ "application/json": components["schemas"]["Error"];
171974
+ };
171975
+ };
171976
+ };
171977
+ };
171978
+ put?: never;
171979
+ post?: never;
171980
+ /**
171981
+ * Remove a unidad
171982
+ * @description Takes it out of the stock. A unidad a negocio holds (bloqueada, reservada, promesada, vendida) cannot be removed (409 `unit_held_by_negocio`). Requires `marketplace:write`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
171983
+ */
171984
+ delete: {
171985
+ parameters: {
171986
+ query?: never;
171987
+ header?: never;
171988
+ path: {
171989
+ /** @description The unidad’s uuid or its display id (`I-12`). */
171990
+ id: string;
171991
+ };
171992
+ cookie?: never;
171993
+ };
171994
+ requestBody?: never;
171995
+ responses: {
171996
+ /** @description Removed */
171997
+ 200: {
171998
+ headers: {
171999
+ [name: string]: unknown;
172000
+ };
172001
+ content: {
172002
+ /**
172003
+ * @example {
172004
+ * "data": {
172005
+ * "id": "0199e3a0-0000-7000-8000-000000000401",
172006
+ * "display_id": "I-42",
172007
+ * "unit_number": "1203",
172008
+ * "deleted": true
172009
+ * }
172010
+ * }
172011
+ */
172012
+ "application/json": {
172013
+ data: {
172014
+ /** Format: uuid */
172015
+ id: string;
172016
+ display_id: string;
172017
+ unit_number: string;
172018
+ /** @enum {boolean} */
172019
+ deleted: true;
172020
+ };
172021
+ };
172022
+ };
172023
+ };
172024
+ /** @description Validation error */
172025
+ 400: {
172026
+ headers: {
172027
+ [name: string]: unknown;
172028
+ };
172029
+ content: {
172030
+ "application/json": components["schemas"]["Error"];
172031
+ };
172032
+ };
172033
+ /** @description Unauthorized */
172034
+ 401: {
172035
+ headers: {
172036
+ [name: string]: unknown;
172037
+ };
172038
+ content: {
172039
+ "application/json": components["schemas"]["Error"];
172040
+ };
172041
+ };
172042
+ /** @description Forbidden */
172043
+ 403: {
172044
+ headers: {
172045
+ [name: string]: unknown;
172046
+ };
172047
+ content: {
172048
+ "application/json": components["schemas"]["Error"];
172049
+ };
172050
+ };
172051
+ /** @description Not found */
172052
+ 404: {
172053
+ headers: {
172054
+ [name: string]: unknown;
172055
+ };
172056
+ content: {
172057
+ "application/json": components["schemas"]["Error"];
172058
+ };
172059
+ };
172060
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
172061
+ 409: {
172062
+ headers: {
172063
+ [name: string]: unknown;
172064
+ };
172065
+ content: {
172066
+ "application/json": components["schemas"]["Error"];
172067
+ };
172068
+ };
172069
+ /** @description Rate limited */
172070
+ 429: {
172071
+ headers: {
172072
+ [name: string]: unknown;
172073
+ };
172074
+ content: {
172075
+ "application/json": components["schemas"]["Error"];
172076
+ };
172077
+ };
172078
+ };
172079
+ };
172080
+ options?: never;
172081
+ head?: never;
172082
+ /**
172083
+ * Edit a unidad
172084
+ * @description Partial update; `null` clears a field. The proyecto is fixed. A field edited by hand on an imported unidad is protected from the next import (release it with `POST /units/{id}/release-fields`). A unidad’s status is its negocio’s: by hand it can only be paused and put back (disponible ⇄ pausada), and no import ever writes it. A status change while a negocio holds the unidad is a 409 `unit_status_owned_by_negocio`. Once the proyecto has a published lista de precios (`/price-lists`), its unidades’ prices change only by publishing a new version: a price here answers 409 `unit_price_owned_by_price_list`. Requires `marketplace:write`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
172085
+ */
172086
+ patch: {
172087
+ parameters: {
172088
+ query?: never;
172089
+ header?: never;
172090
+ path: {
172091
+ /** @description The unidad’s uuid or its display id (`I-12`). */
172092
+ id: string;
172093
+ };
172094
+ cookie?: never;
172095
+ };
172096
+ requestBody?: {
172097
+ content: {
172098
+ /**
172099
+ * @example {
172100
+ * "status": "pausada"
172101
+ * }
172102
+ */
172103
+ "application/json": components["schemas"]["UpdateUnitBody"];
172104
+ };
172105
+ };
172106
+ responses: {
172107
+ /** @description Updated */
172108
+ 200: {
172109
+ headers: {
172110
+ [name: string]: unknown;
172111
+ };
172112
+ content: {
172113
+ /**
172114
+ * @example {
172115
+ * "data": {
172116
+ * "id": "0199e3a0-0000-7000-8000-000000000401",
172117
+ * "tenant_id": "0199e3a0-0000-7000-8000-0000000000aa",
172118
+ * "display_id": "I-42",
172119
+ * "title": "Departamento 1203 · Parque Los Aromos",
172120
+ * "description": null,
172121
+ * "operation": "venta",
172122
+ * "property_type": "departamento",
172123
+ * "kind": "departamento",
172124
+ * "status": "disponible",
172125
+ * "region": "Metropolitana",
172126
+ * "comuna": "La Florida",
172127
+ * "sector": null,
172128
+ * "address": null,
172129
+ * "sale_price_amount": 3250.5,
172130
+ * "sale_price_currency": "UF",
172131
+ * "rent_price_amount": null,
172132
+ * "rent_price_currency": null,
172133
+ * "common_expenses_clp": null,
172134
+ * "property_tax_clp": null,
172135
+ * "bedrooms": 3,
172136
+ * "bathrooms": 2,
172137
+ * "usable_area_m2": 72.5,
172138
+ * "terrace_area_m2": 6,
172139
+ * "total_area_m2": 78.5,
172140
+ * "parking_spaces": null,
172141
+ * "storage_units": null,
172142
+ * "orientation": "nororiente",
172143
+ * "floor": 12,
172144
+ * "year_built": null,
172145
+ * "furnished": null,
172146
+ * "pets_allowed": null,
172147
+ * "photos": [],
172148
+ * "broker_user_id": null,
172149
+ * "owner_name": null,
172150
+ * "owner_phone": null,
172151
+ * "owner_email": null,
172152
+ * "source": "import",
172153
+ * "external_ref": null,
172154
+ * "protected_fields": [],
172155
+ * "project_id": "0199e3a0-0000-7000-8000-000000000101",
172156
+ * "unit_model_id": "0199e3a0-0000-7000-8000-000000000201",
172157
+ * "unit_number": "1203",
172158
+ * "hold_expires_at": null,
172159
+ * "created_by": null,
172160
+ * "created_at": "2026-10-20T12:00:00.000Z",
172161
+ * "updated_at": "2026-10-20T12:00:00.000Z",
172162
+ * "sale_price": {
172163
+ * "amount": 3250.5,
172164
+ * "currency": "UF",
172165
+ * "amount_clp": 128500000,
172166
+ * "amount_uf": 3250.5
172167
+ * },
172168
+ * "rent_price": null,
172169
+ * "project": {
172170
+ * "id": "0199e3a0-0000-7000-8000-000000000101",
172171
+ * "name": "Parque Los Aromos"
172172
+ * },
172173
+ * "unit_model": {
172174
+ * "id": "0199e3a0-0000-7000-8000-000000000201",
172175
+ * "name": "3D2B 78 m²"
172176
+ * }
172177
+ * }
172178
+ * }
172179
+ */
172180
+ "application/json": {
172181
+ data: components["schemas"]["Unit"];
172182
+ };
172183
+ };
172184
+ };
172185
+ /** @description Validation error */
172186
+ 400: {
172187
+ headers: {
172188
+ [name: string]: unknown;
172189
+ };
172190
+ content: {
172191
+ "application/json": components["schemas"]["Error"];
172192
+ };
172193
+ };
172194
+ /** @description Unauthorized */
172195
+ 401: {
172196
+ headers: {
172197
+ [name: string]: unknown;
172198
+ };
172199
+ content: {
172200
+ "application/json": components["schemas"]["Error"];
172201
+ };
172202
+ };
172203
+ /** @description Forbidden */
172204
+ 403: {
172205
+ headers: {
172206
+ [name: string]: unknown;
172207
+ };
172208
+ content: {
172209
+ "application/json": components["schemas"]["Error"];
172210
+ };
172211
+ };
172212
+ /** @description Not found */
172213
+ 404: {
172214
+ headers: {
172215
+ [name: string]: unknown;
172216
+ };
172217
+ content: {
172218
+ "application/json": components["schemas"]["Error"];
172219
+ };
172220
+ };
172221
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
172222
+ 409: {
172223
+ headers: {
172224
+ [name: string]: unknown;
172225
+ };
172226
+ content: {
172227
+ "application/json": components["schemas"]["Error"];
172228
+ };
172229
+ };
172230
+ /** @description Rate limited */
172231
+ 429: {
172232
+ headers: {
172233
+ [name: string]: unknown;
172234
+ };
172235
+ content: {
172236
+ "application/json": components["schemas"]["Error"];
172237
+ };
172238
+ };
172239
+ };
172240
+ };
172241
+ trace?: never;
172242
+ };
172243
+ "/units/{id}/release-fields": {
172244
+ parameters: {
172245
+ query?: never;
172246
+ header?: never;
172247
+ path?: never;
172248
+ cookie?: never;
172249
+ };
172250
+ get?: never;
172251
+ put?: never;
172252
+ /**
172253
+ * Let a unidad’s protected fields follow the import again
172254
+ * @description Removes fields from `protected_fields`, so the next import may overwrite them. Requires `marketplace:write`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
172255
+ */
172256
+ post: {
172257
+ parameters: {
172258
+ query?: never;
172259
+ header?: {
172260
+ /** @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. */
172261
+ "Idempotency-Key"?: string;
172262
+ };
172263
+ path: {
172264
+ /** @description The unidad’s uuid or its display id (`I-12`). */
172265
+ id: string;
172266
+ };
172267
+ cookie?: never;
172268
+ };
172269
+ requestBody?: {
172270
+ content: {
172271
+ /**
172272
+ * @example {
172273
+ * "fields": [
172274
+ * "sale_price_amount"
172275
+ * ]
172276
+ * }
172277
+ */
172278
+ "application/json": {
172279
+ /** @description Protected fields to hand back to the stock import, so the next import may overwrite them again. */
172280
+ fields: string[];
172281
+ };
172282
+ };
172283
+ };
172284
+ responses: {
172285
+ /** @description Released */
172286
+ 200: {
172287
+ headers: {
172288
+ [name: string]: unknown;
172289
+ };
172290
+ content: {
172291
+ /**
172292
+ * @example {
172293
+ * "data": {
172294
+ * "id": "0199e3a0-0000-7000-8000-000000000401",
172295
+ * "tenant_id": "0199e3a0-0000-7000-8000-0000000000aa",
172296
+ * "display_id": "I-42",
172297
+ * "title": "Departamento 1203 · Parque Los Aromos",
172298
+ * "description": null,
172299
+ * "operation": "venta",
172300
+ * "property_type": "departamento",
172301
+ * "kind": "departamento",
172302
+ * "status": "disponible",
172303
+ * "region": "Metropolitana",
172304
+ * "comuna": "La Florida",
172305
+ * "sector": null,
172306
+ * "address": null,
172307
+ * "sale_price_amount": 3250.5,
172308
+ * "sale_price_currency": "UF",
172309
+ * "rent_price_amount": null,
172310
+ * "rent_price_currency": null,
172311
+ * "common_expenses_clp": null,
172312
+ * "property_tax_clp": null,
172313
+ * "bedrooms": 3,
172314
+ * "bathrooms": 2,
172315
+ * "usable_area_m2": 72.5,
172316
+ * "terrace_area_m2": 6,
172317
+ * "total_area_m2": 78.5,
172318
+ * "parking_spaces": null,
172319
+ * "storage_units": null,
172320
+ * "orientation": "nororiente",
172321
+ * "floor": 12,
172322
+ * "year_built": null,
172323
+ * "furnished": null,
172324
+ * "pets_allowed": null,
172325
+ * "photos": [],
172326
+ * "broker_user_id": null,
172327
+ * "owner_name": null,
172328
+ * "owner_phone": null,
172329
+ * "owner_email": null,
172330
+ * "source": "import",
172331
+ * "external_ref": null,
172332
+ * "protected_fields": [],
172333
+ * "project_id": "0199e3a0-0000-7000-8000-000000000101",
172334
+ * "unit_model_id": "0199e3a0-0000-7000-8000-000000000201",
172335
+ * "unit_number": "1203",
172336
+ * "hold_expires_at": null,
172337
+ * "created_by": null,
172338
+ * "created_at": "2026-10-20T12:00:00.000Z",
172339
+ * "updated_at": "2026-10-20T12:00:00.000Z",
172340
+ * "sale_price": {
172341
+ * "amount": 3250.5,
172342
+ * "currency": "UF",
172343
+ * "amount_clp": 128500000,
172344
+ * "amount_uf": 3250.5
172345
+ * },
172346
+ * "rent_price": null,
172347
+ * "project": {
172348
+ * "id": "0199e3a0-0000-7000-8000-000000000101",
172349
+ * "name": "Parque Los Aromos"
172350
+ * },
172351
+ * "unit_model": {
172352
+ * "id": "0199e3a0-0000-7000-8000-000000000201",
172353
+ * "name": "3D2B 78 m²"
172354
+ * }
172355
+ * }
172356
+ * }
172357
+ */
172358
+ "application/json": {
172359
+ data: components["schemas"]["Unit"];
172360
+ };
172361
+ };
172362
+ };
172363
+ /** @description Validation error */
172364
+ 400: {
172365
+ headers: {
172366
+ [name: string]: unknown;
172367
+ };
172368
+ content: {
172369
+ "application/json": components["schemas"]["Error"];
172370
+ };
172371
+ };
172372
+ /** @description Unauthorized */
172373
+ 401: {
172374
+ headers: {
172375
+ [name: string]: unknown;
172376
+ };
172377
+ content: {
172378
+ "application/json": components["schemas"]["Error"];
172379
+ };
172380
+ };
172381
+ /** @description Forbidden */
172382
+ 403: {
172383
+ headers: {
172384
+ [name: string]: unknown;
172385
+ };
172386
+ content: {
172387
+ "application/json": components["schemas"]["Error"];
172388
+ };
172389
+ };
172390
+ /** @description Not found */
172391
+ 404: {
172392
+ headers: {
172393
+ [name: string]: unknown;
172394
+ };
172395
+ content: {
172396
+ "application/json": components["schemas"]["Error"];
172397
+ };
172398
+ };
172399
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
172400
+ 409: {
172401
+ headers: {
172402
+ [name: string]: unknown;
172403
+ };
172404
+ content: {
172405
+ "application/json": components["schemas"]["Error"];
172406
+ };
172407
+ };
172408
+ /** @description Rate limited */
172409
+ 429: {
172410
+ headers: {
172411
+ [name: string]: unknown;
172412
+ };
172413
+ content: {
172414
+ "application/json": components["schemas"]["Error"];
172415
+ };
172416
+ };
172417
+ };
172418
+ };
172419
+ delete?: never;
172420
+ options?: never;
172421
+ head?: never;
172422
+ patch?: never;
172423
+ trace?: never;
172424
+ };
172425
+ "/projects/{id}/floor-plans": {
172426
+ parameters: {
172427
+ query?: never;
172428
+ header?: never;
172429
+ path?: never;
172430
+ cookie?: never;
172431
+ };
172432
+ /**
172433
+ * List a proyecto’s floor plans
172434
+ * @description The proyecto’s plans in display order (`sort_order`, then floor, then name), each with the unidades placed on it as polygons normalised to the image. The plans feed the embeddable floor-plan visor, which colours each placed unidad by its live status on the inmobiliaria’s own site; whether it shows prices is the proyecto’s `visor_show_prices`. Requires `marketplace:read`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
172435
+ */
172436
+ get: {
172437
+ parameters: {
172438
+ query?: never;
172439
+ header?: never;
172440
+ path: {
172441
+ /** @description The proyecto id. */
172442
+ id: string;
172443
+ };
172444
+ cookie?: never;
172445
+ };
172446
+ requestBody?: never;
172447
+ responses: {
172448
+ /** @description Floor plans */
172449
+ 200: {
172450
+ headers: {
172451
+ [name: string]: unknown;
172452
+ };
172453
+ content: {
172454
+ /**
172455
+ * @example {
172456
+ * "data": [
172457
+ * {
172458
+ * "id": "0199e3a0-0000-7000-8000-000000000501",
172459
+ * "tenant_id": "0199e3a0-0000-7000-8000-0000000000aa",
172460
+ * "project_id": "0199e3a0-0000-7000-8000-000000000101",
172461
+ * "name": "Piso 12",
172462
+ * "floor": 12,
172463
+ * "image_url": "https://media.example.com/t/other/aromos-piso-12.png",
172464
+ * "image_width": 1600,
172465
+ * "image_height": 1000,
172466
+ * "sort_order": 12,
172467
+ * "created_by": null,
172468
+ * "created_at": "2026-10-20T12:00:00.000Z",
172469
+ * "updated_at": "2026-10-20T12:00:00.000Z",
172470
+ * "units": [
172471
+ * {
172472
+ * "unit_id": "0199e3a0-0000-7000-8000-000000000401",
172473
+ * "shape": [
172474
+ * [
172475
+ * 0.1,
172476
+ * 0.2
172477
+ * ],
172478
+ * [
172479
+ * 0.3,
172480
+ * 0.2
172481
+ * ],
172482
+ * [
172483
+ * 0.3,
172484
+ * 0.45
172485
+ * ],
172486
+ * [
172487
+ * 0.1,
172488
+ * 0.45
172489
+ * ]
172490
+ * ]
172491
+ * }
172492
+ * ]
172493
+ * }
172494
+ * ]
172495
+ * }
172496
+ */
172497
+ "application/json": {
172498
+ data: components["schemas"]["FloorPlan"][];
172499
+ };
172500
+ };
172501
+ };
172502
+ /** @description Validation error */
172503
+ 400: {
172504
+ headers: {
172505
+ [name: string]: unknown;
172506
+ };
172507
+ content: {
172508
+ "application/json": components["schemas"]["Error"];
172509
+ };
172510
+ };
172511
+ /** @description Unauthorized */
172512
+ 401: {
172513
+ headers: {
172514
+ [name: string]: unknown;
172515
+ };
172516
+ content: {
172517
+ "application/json": components["schemas"]["Error"];
172518
+ };
172519
+ };
172520
+ /** @description Forbidden */
172521
+ 403: {
172522
+ headers: {
172523
+ [name: string]: unknown;
172524
+ };
172525
+ content: {
172526
+ "application/json": components["schemas"]["Error"];
172527
+ };
172528
+ };
172529
+ /** @description Not found */
172530
+ 404: {
172531
+ headers: {
172532
+ [name: string]: unknown;
172533
+ };
172534
+ content: {
172535
+ "application/json": components["schemas"]["Error"];
172536
+ };
172537
+ };
172538
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
172539
+ 409: {
172540
+ headers: {
172541
+ [name: string]: unknown;
172542
+ };
172543
+ content: {
172544
+ "application/json": components["schemas"]["Error"];
172545
+ };
172546
+ };
172547
+ /** @description Rate limited */
172548
+ 429: {
172549
+ headers: {
172550
+ [name: string]: unknown;
172551
+ };
172552
+ content: {
172553
+ "application/json": components["schemas"]["Error"];
172554
+ };
172555
+ };
172556
+ };
172557
+ };
172558
+ put?: never;
172559
+ /**
172560
+ * Add a floor plan to a proyecto
172561
+ * @description A plan image (a floor, a planta tipo, a site plan of casas). Upload the image with `POST /tenant/media` first and send its `url`; send its pixel size too so the visor reserves the aspect ratio. The name is unique inside the proyecto (409 otherwise). Place unidades with `PUT /floor-plans/{id}/units`. The plans feed the embeddable floor-plan visor, which colours each placed unidad by its live status on the inmobiliaria’s own site; whether it shows prices is the proyecto’s `visor_show_prices`. Requires `marketplace:write`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
172562
+ */
172563
+ post: {
172564
+ parameters: {
172565
+ query?: never;
172566
+ header?: {
172567
+ /** @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. */
172568
+ "Idempotency-Key"?: string;
172569
+ };
172570
+ path: {
172571
+ /** @description The proyecto id. */
172572
+ id: string;
172573
+ };
172574
+ cookie?: never;
172575
+ };
172576
+ requestBody?: {
172577
+ content: {
172578
+ /**
172579
+ * @example {
172580
+ * "name": "Piso 12",
172581
+ * "floor": 12,
172582
+ * "image_url": "https://media.example.com/t/other/aromos-piso-12.png",
172583
+ * "image_width": 1600,
172584
+ * "image_height": 1000,
172585
+ * "sort_order": 12
172586
+ * }
172587
+ */
172588
+ "application/json": components["schemas"]["CreateFloorPlanBody"];
172589
+ };
172590
+ };
172591
+ responses: {
172592
+ /** @description The plan, with no unidades yet */
172593
+ 201: {
172594
+ headers: {
172595
+ [name: string]: unknown;
172596
+ };
172597
+ content: {
172598
+ /**
172599
+ * @example {
172600
+ * "data": {
172601
+ * "id": "0199e3a0-0000-7000-8000-000000000501",
172602
+ * "tenant_id": "0199e3a0-0000-7000-8000-0000000000aa",
172603
+ * "project_id": "0199e3a0-0000-7000-8000-000000000101",
172604
+ * "name": "Piso 12",
172605
+ * "floor": 12,
172606
+ * "image_url": "https://media.example.com/t/other/aromos-piso-12.png",
172607
+ * "image_width": 1600,
172608
+ * "image_height": 1000,
172609
+ * "sort_order": 12,
172610
+ * "created_by": null,
172611
+ * "created_at": "2026-10-20T12:00:00.000Z",
172612
+ * "updated_at": "2026-10-20T12:00:00.000Z",
172613
+ * "units": [
172614
+ * {
172615
+ * "unit_id": "0199e3a0-0000-7000-8000-000000000401",
172616
+ * "shape": [
172617
+ * [
172618
+ * 0.1,
172619
+ * 0.2
172620
+ * ],
172621
+ * [
172622
+ * 0.3,
172623
+ * 0.2
172624
+ * ],
172625
+ * [
172626
+ * 0.3,
172627
+ * 0.45
172628
+ * ],
172629
+ * [
172630
+ * 0.1,
172631
+ * 0.45
172632
+ * ]
172633
+ * ]
172634
+ * }
172635
+ * ]
172636
+ * }
172637
+ * }
172638
+ */
172639
+ "application/json": {
172640
+ data: components["schemas"]["FloorPlan"];
172641
+ };
172642
+ };
172643
+ };
172644
+ /** @description Validation error */
172645
+ 400: {
172646
+ headers: {
172647
+ [name: string]: unknown;
172648
+ };
172649
+ content: {
172650
+ "application/json": components["schemas"]["Error"];
172651
+ };
172652
+ };
172653
+ /** @description Unauthorized */
172654
+ 401: {
172655
+ headers: {
172656
+ [name: string]: unknown;
172657
+ };
172658
+ content: {
172659
+ "application/json": components["schemas"]["Error"];
172660
+ };
172661
+ };
172662
+ /** @description Forbidden */
172663
+ 403: {
172664
+ headers: {
172665
+ [name: string]: unknown;
172666
+ };
172667
+ content: {
172668
+ "application/json": components["schemas"]["Error"];
172669
+ };
172670
+ };
172671
+ /** @description Not found */
172672
+ 404: {
172673
+ headers: {
172674
+ [name: string]: unknown;
172675
+ };
172676
+ content: {
172677
+ "application/json": components["schemas"]["Error"];
172678
+ };
172679
+ };
172680
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
172681
+ 409: {
172682
+ headers: {
172683
+ [name: string]: unknown;
172684
+ };
172685
+ content: {
172686
+ "application/json": components["schemas"]["Error"];
172687
+ };
172688
+ };
172689
+ /** @description Rate limited */
172690
+ 429: {
172691
+ headers: {
172692
+ [name: string]: unknown;
172693
+ };
172694
+ content: {
172695
+ "application/json": components["schemas"]["Error"];
172696
+ };
172697
+ };
172698
+ };
172699
+ };
172700
+ delete?: never;
172701
+ options?: never;
172702
+ head?: never;
172703
+ patch?: never;
172704
+ trace?: never;
172705
+ };
172706
+ "/floor-plans/{id}": {
171458
172707
  parameters: {
171459
172708
  query?: never;
171460
172709
  header?: never;
@@ -171462,22 +172711,22 @@ interface paths {
171462
172711
  cookie?: never;
171463
172712
  };
171464
172713
  /**
171465
- * One unidad
171466
- * @description By uuid or display id (`I-42`). Requires `marketplace:read`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
172714
+ * Get a floor plan
172715
+ * @description One plan with the live unidades placed on it. Requires `marketplace:read`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
171467
172716
  */
171468
172717
  get: {
171469
172718
  parameters: {
171470
172719
  query?: never;
171471
172720
  header?: never;
171472
172721
  path: {
171473
- /** @description The unidad’s uuid or its display id (`I-12`). */
172722
+ /** @description The plan id. */
171474
172723
  id: string;
171475
172724
  };
171476
172725
  cookie?: never;
171477
172726
  };
171478
172727
  requestBody?: never;
171479
172728
  responses: {
171480
- /** @description Unidad */
172729
+ /** @description The plan */
171481
172730
  200: {
171482
172731
  headers: {
171483
172732
  [name: string]: unknown;
@@ -171486,72 +172735,46 @@ interface paths {
171486
172735
  /**
171487
172736
  * @example {
171488
172737
  * "data": {
171489
- * "id": "0199e3a0-0000-7000-8000-000000000401",
172738
+ * "id": "0199e3a0-0000-7000-8000-000000000501",
171490
172739
  * "tenant_id": "0199e3a0-0000-7000-8000-0000000000aa",
171491
- * "display_id": "I-42",
171492
- * "title": "Departamento 1203 · Parque Los Aromos",
171493
- * "description": null,
171494
- * "operation": "venta",
171495
- * "property_type": "departamento",
171496
- * "kind": "departamento",
171497
- * "status": "disponible",
171498
- * "region": "Metropolitana",
171499
- * "comuna": "La Florida",
171500
- * "sector": null,
171501
- * "address": null,
171502
- * "sale_price_amount": 3250.5,
171503
- * "sale_price_currency": "UF",
171504
- * "rent_price_amount": null,
171505
- * "rent_price_currency": null,
171506
- * "common_expenses_clp": null,
171507
- * "property_tax_clp": null,
171508
- * "bedrooms": 3,
171509
- * "bathrooms": 2,
171510
- * "usable_area_m2": 72.5,
171511
- * "terrace_area_m2": 6,
171512
- * "total_area_m2": 78.5,
171513
- * "parking_spaces": null,
171514
- * "storage_units": null,
171515
- * "orientation": "nororiente",
171516
- * "floor": 12,
171517
- * "year_built": null,
171518
- * "furnished": null,
171519
- * "pets_allowed": null,
171520
- * "photos": [],
171521
- * "broker_user_id": null,
171522
- * "owner_name": null,
171523
- * "owner_phone": null,
171524
- * "owner_email": null,
171525
- * "source": "import",
171526
- * "external_ref": null,
171527
- * "protected_fields": [],
171528
172740
  * "project_id": "0199e3a0-0000-7000-8000-000000000101",
171529
- * "unit_model_id": "0199e3a0-0000-7000-8000-000000000201",
171530
- * "unit_number": "1203",
171531
- * "hold_expires_at": null,
172741
+ * "name": "Piso 12",
172742
+ * "floor": 12,
172743
+ * "image_url": "https://media.example.com/t/other/aromos-piso-12.png",
172744
+ * "image_width": 1600,
172745
+ * "image_height": 1000,
172746
+ * "sort_order": 12,
171532
172747
  * "created_by": null,
171533
172748
  * "created_at": "2026-10-20T12:00:00.000Z",
171534
172749
  * "updated_at": "2026-10-20T12:00:00.000Z",
171535
- * "sale_price": {
171536
- * "amount": 3250.5,
171537
- * "currency": "UF",
171538
- * "amount_clp": 128500000,
171539
- * "amount_uf": 3250.5
171540
- * },
171541
- * "rent_price": null,
171542
- * "project": {
171543
- * "id": "0199e3a0-0000-7000-8000-000000000101",
171544
- * "name": "Parque Los Aromos"
171545
- * },
171546
- * "unit_model": {
171547
- * "id": "0199e3a0-0000-7000-8000-000000000201",
171548
- * "name": "3D2B 78 m²"
171549
- * }
172750
+ * "units": [
172751
+ * {
172752
+ * "unit_id": "0199e3a0-0000-7000-8000-000000000401",
172753
+ * "shape": [
172754
+ * [
172755
+ * 0.1,
172756
+ * 0.2
172757
+ * ],
172758
+ * [
172759
+ * 0.3,
172760
+ * 0.2
172761
+ * ],
172762
+ * [
172763
+ * 0.3,
172764
+ * 0.45
172765
+ * ],
172766
+ * [
172767
+ * 0.1,
172768
+ * 0.45
172769
+ * ]
172770
+ * ]
172771
+ * }
172772
+ * ]
171550
172773
  * }
171551
172774
  * }
171552
172775
  */
171553
172776
  "application/json": {
171554
- data: components["schemas"]["Unit"];
172777
+ data: components["schemas"]["FloorPlan"];
171555
172778
  };
171556
172779
  };
171557
172780
  };
@@ -171614,15 +172837,15 @@ interface paths {
171614
172837
  put?: never;
171615
172838
  post?: never;
171616
172839
  /**
171617
- * Remove a unidad
171618
- * @description Takes it out of the stock. A unidad a negocio holds (bloqueada, reservada, promesada, vendida) cannot be removed (409 `unit_held_by_negocio`). Requires `marketplace:write`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
172840
+ * Remove a floor plan
172841
+ * @description Removes the plan and its placements. The unidades themselves are untouched. Requires `marketplace:write`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
171619
172842
  */
171620
172843
  delete: {
171621
172844
  parameters: {
171622
172845
  query?: never;
171623
172846
  header?: never;
171624
172847
  path: {
171625
- /** @description The unidad’s uuid or its display id (`I-12`). */
172848
+ /** @description The plan id. */
171626
172849
  id: string;
171627
172850
  };
171628
172851
  cookie?: never;
@@ -171638,21 +172861,15 @@ interface paths {
171638
172861
  /**
171639
172862
  * @example {
171640
172863
  * "data": {
171641
- * "id": "0199e3a0-0000-7000-8000-000000000401",
171642
- * "display_id": "I-42",
171643
- * "unit_number": "1203",
172864
+ * "id": "0199e3a0-0000-7000-8000-000000000501",
171644
172865
  * "deleted": true
171645
172866
  * }
171646
172867
  * }
171647
172868
  */
171648
172869
  "application/json": {
171649
172870
  data: {
171650
- /** Format: uuid */
171651
172871
  id: string;
171652
- display_id: string;
171653
- unit_number: string;
171654
- /** @enum {boolean} */
171655
- deleted: true;
172872
+ deleted: boolean;
171656
172873
  };
171657
172874
  };
171658
172875
  };
@@ -171716,15 +172933,15 @@ interface paths {
171716
172933
  options?: never;
171717
172934
  head?: never;
171718
172935
  /**
171719
- * Edit a unidad
171720
- * @description Partial update; `null` clears a field. The proyecto is fixed. A field edited by hand on an imported unidad is protected from the next import (release it with `POST /units/{id}/release-fields`). A unidad’s status is its negocio’s: by hand it can only be paused and put back (disponible ⇄ pausada), and no import ever writes it. A status change while a negocio holds the unidad is a 409 `unit_status_owned_by_negocio`. Once the proyecto has a published lista de precios (`/price-lists`), its unidades’ prices change only by publishing a new version: a price here answers 409 `unit_price_owned_by_price_list`. Requires `marketplace:write`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
172936
+ * Edit a floor plan
172937
+ * @description Rename it, change its floor, order or image. Changing the image keeps the placements: their coordinates are fractions of the image, so a re-export of the same plan at another size still fits. Requires `marketplace:write`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
171721
172938
  */
171722
172939
  patch: {
171723
172940
  parameters: {
171724
172941
  query?: never;
171725
172942
  header?: never;
171726
172943
  path: {
171727
- /** @description The unidad’s uuid or its display id (`I-12`). */
172944
+ /** @description The plan id. */
171728
172945
  id: string;
171729
172946
  };
171730
172947
  cookie?: never;
@@ -171733,14 +172950,14 @@ interface paths {
171733
172950
  content: {
171734
172951
  /**
171735
172952
  * @example {
171736
- * "status": "pausada"
172953
+ * "name": "Piso 12 (torre A)"
171737
172954
  * }
171738
172955
  */
171739
- "application/json": components["schemas"]["UpdateUnitBody"];
172956
+ "application/json": components["schemas"]["UpdateFloorPlanBody"];
171740
172957
  };
171741
172958
  };
171742
172959
  responses: {
171743
- /** @description Updated */
172960
+ /** @description The plan, edited */
171744
172961
  200: {
171745
172962
  headers: {
171746
172963
  [name: string]: unknown;
@@ -171749,72 +172966,46 @@ interface paths {
171749
172966
  /**
171750
172967
  * @example {
171751
172968
  * "data": {
171752
- * "id": "0199e3a0-0000-7000-8000-000000000401",
172969
+ * "id": "0199e3a0-0000-7000-8000-000000000501",
171753
172970
  * "tenant_id": "0199e3a0-0000-7000-8000-0000000000aa",
171754
- * "display_id": "I-42",
171755
- * "title": "Departamento 1203 · Parque Los Aromos",
171756
- * "description": null,
171757
- * "operation": "venta",
171758
- * "property_type": "departamento",
171759
- * "kind": "departamento",
171760
- * "status": "disponible",
171761
- * "region": "Metropolitana",
171762
- * "comuna": "La Florida",
171763
- * "sector": null,
171764
- * "address": null,
171765
- * "sale_price_amount": 3250.5,
171766
- * "sale_price_currency": "UF",
171767
- * "rent_price_amount": null,
171768
- * "rent_price_currency": null,
171769
- * "common_expenses_clp": null,
171770
- * "property_tax_clp": null,
171771
- * "bedrooms": 3,
171772
- * "bathrooms": 2,
171773
- * "usable_area_m2": 72.5,
171774
- * "terrace_area_m2": 6,
171775
- * "total_area_m2": 78.5,
171776
- * "parking_spaces": null,
171777
- * "storage_units": null,
171778
- * "orientation": "nororiente",
171779
- * "floor": 12,
171780
- * "year_built": null,
171781
- * "furnished": null,
171782
- * "pets_allowed": null,
171783
- * "photos": [],
171784
- * "broker_user_id": null,
171785
- * "owner_name": null,
171786
- * "owner_phone": null,
171787
- * "owner_email": null,
171788
- * "source": "import",
171789
- * "external_ref": null,
171790
- * "protected_fields": [],
171791
172971
  * "project_id": "0199e3a0-0000-7000-8000-000000000101",
171792
- * "unit_model_id": "0199e3a0-0000-7000-8000-000000000201",
171793
- * "unit_number": "1203",
171794
- * "hold_expires_at": null,
172972
+ * "name": "Piso 12",
172973
+ * "floor": 12,
172974
+ * "image_url": "https://media.example.com/t/other/aromos-piso-12.png",
172975
+ * "image_width": 1600,
172976
+ * "image_height": 1000,
172977
+ * "sort_order": 12,
171795
172978
  * "created_by": null,
171796
172979
  * "created_at": "2026-10-20T12:00:00.000Z",
171797
172980
  * "updated_at": "2026-10-20T12:00:00.000Z",
171798
- * "sale_price": {
171799
- * "amount": 3250.5,
171800
- * "currency": "UF",
171801
- * "amount_clp": 128500000,
171802
- * "amount_uf": 3250.5
171803
- * },
171804
- * "rent_price": null,
171805
- * "project": {
171806
- * "id": "0199e3a0-0000-7000-8000-000000000101",
171807
- * "name": "Parque Los Aromos"
171808
- * },
171809
- * "unit_model": {
171810
- * "id": "0199e3a0-0000-7000-8000-000000000201",
171811
- * "name": "3D2B 78 m²"
171812
- * }
172981
+ * "units": [
172982
+ * {
172983
+ * "unit_id": "0199e3a0-0000-7000-8000-000000000401",
172984
+ * "shape": [
172985
+ * [
172986
+ * 0.1,
172987
+ * 0.2
172988
+ * ],
172989
+ * [
172990
+ * 0.3,
172991
+ * 0.2
172992
+ * ],
172993
+ * [
172994
+ * 0.3,
172995
+ * 0.45
172996
+ * ],
172997
+ * [
172998
+ * 0.1,
172999
+ * 0.45
173000
+ * ]
173001
+ * ]
173002
+ * }
173003
+ * ]
171813
173004
  * }
171814
173005
  * }
171815
173006
  */
171816
173007
  "application/json": {
171817
- data: components["schemas"]["Unit"];
173008
+ data: components["schemas"]["FloorPlan"];
171818
173009
  };
171819
173010
  };
171820
173011
  };
@@ -171876,7 +173067,7 @@ interface paths {
171876
173067
  };
171877
173068
  trace?: never;
171878
173069
  };
171879
- "/units/{id}/release-fields": {
173070
+ "/floor-plans/{id}/units": {
171880
173071
  parameters: {
171881
173072
  query?: never;
171882
173073
  header?: never;
@@ -171884,20 +173075,16 @@ interface paths {
171884
173075
  cookie?: never;
171885
173076
  };
171886
173077
  get?: never;
171887
- put?: never;
171888
173078
  /**
171889
- * Let a unidad’s protected fields follow the import again
171890
- * @description Removes fields from `protected_fields`, so the next import may overwrite them. Requires `marketplace:write`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
173079
+ * Place unidades on a floor plan
173080
+ * @description Replaces every placement of the plan with `units`: each a unidad of the plan’s own proyecto, once, with a polygon of 3 to 64 `[x, y]` points as fractions (0..1) of the image, origin top-left. A unidad of another proyecto, a removed one or a repeated one is a 400 naming the ids, and nothing is written. An empty list clears the plan. A unidad may sit on several plans (a dúplex). Requires `marketplace:write`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
171891
173081
  */
171892
- post: {
173082
+ put: {
171893
173083
  parameters: {
171894
173084
  query?: never;
171895
- header?: {
171896
- /** @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. */
171897
- "Idempotency-Key"?: string;
171898
- };
173085
+ header?: never;
171899
173086
  path: {
171900
- /** @description The unidad’s uuid or its display id (`I-12`). */
173087
+ /** @description The plan id. */
171901
173088
  id: string;
171902
173089
  };
171903
173090
  cookie?: never;
@@ -171906,19 +173093,36 @@ interface paths {
171906
173093
  content: {
171907
173094
  /**
171908
173095
  * @example {
171909
- * "fields": [
171910
- * "sale_price_amount"
173096
+ * "units": [
173097
+ * {
173098
+ * "unit_id": "0199e3a0-0000-7000-8000-000000000401",
173099
+ * "shape": [
173100
+ * [
173101
+ * 0.1,
173102
+ * 0.2
173103
+ * ],
173104
+ * [
173105
+ * 0.3,
173106
+ * 0.2
173107
+ * ],
173108
+ * [
173109
+ * 0.3,
173110
+ * 0.45
173111
+ * ],
173112
+ * [
173113
+ * 0.1,
173114
+ * 0.45
173115
+ * ]
173116
+ * ]
173117
+ * }
171911
173118
  * ]
171912
173119
  * }
171913
173120
  */
171914
- "application/json": {
171915
- /** @description Protected fields to hand back to the stock import, so the next import may overwrite them again. */
171916
- fields: string[];
171917
- };
173121
+ "application/json": components["schemas"]["SetFloorPlanUnitsBody"];
171918
173122
  };
171919
173123
  };
171920
173124
  responses: {
171921
- /** @description Released */
173125
+ /** @description The plan with its unidades */
171922
173126
  200: {
171923
173127
  headers: {
171924
173128
  [name: string]: unknown;
@@ -171927,72 +173131,46 @@ interface paths {
171927
173131
  /**
171928
173132
  * @example {
171929
173133
  * "data": {
171930
- * "id": "0199e3a0-0000-7000-8000-000000000401",
173134
+ * "id": "0199e3a0-0000-7000-8000-000000000501",
171931
173135
  * "tenant_id": "0199e3a0-0000-7000-8000-0000000000aa",
171932
- * "display_id": "I-42",
171933
- * "title": "Departamento 1203 · Parque Los Aromos",
171934
- * "description": null,
171935
- * "operation": "venta",
171936
- * "property_type": "departamento",
171937
- * "kind": "departamento",
171938
- * "status": "disponible",
171939
- * "region": "Metropolitana",
171940
- * "comuna": "La Florida",
171941
- * "sector": null,
171942
- * "address": null,
171943
- * "sale_price_amount": 3250.5,
171944
- * "sale_price_currency": "UF",
171945
- * "rent_price_amount": null,
171946
- * "rent_price_currency": null,
171947
- * "common_expenses_clp": null,
171948
- * "property_tax_clp": null,
171949
- * "bedrooms": 3,
171950
- * "bathrooms": 2,
171951
- * "usable_area_m2": 72.5,
171952
- * "terrace_area_m2": 6,
171953
- * "total_area_m2": 78.5,
171954
- * "parking_spaces": null,
171955
- * "storage_units": null,
171956
- * "orientation": "nororiente",
171957
- * "floor": 12,
171958
- * "year_built": null,
171959
- * "furnished": null,
171960
- * "pets_allowed": null,
171961
- * "photos": [],
171962
- * "broker_user_id": null,
171963
- * "owner_name": null,
171964
- * "owner_phone": null,
171965
- * "owner_email": null,
171966
- * "source": "import",
171967
- * "external_ref": null,
171968
- * "protected_fields": [],
171969
173136
  * "project_id": "0199e3a0-0000-7000-8000-000000000101",
171970
- * "unit_model_id": "0199e3a0-0000-7000-8000-000000000201",
171971
- * "unit_number": "1203",
171972
- * "hold_expires_at": null,
173137
+ * "name": "Piso 12",
173138
+ * "floor": 12,
173139
+ * "image_url": "https://media.example.com/t/other/aromos-piso-12.png",
173140
+ * "image_width": 1600,
173141
+ * "image_height": 1000,
173142
+ * "sort_order": 12,
171973
173143
  * "created_by": null,
171974
173144
  * "created_at": "2026-10-20T12:00:00.000Z",
171975
173145
  * "updated_at": "2026-10-20T12:00:00.000Z",
171976
- * "sale_price": {
171977
- * "amount": 3250.5,
171978
- * "currency": "UF",
171979
- * "amount_clp": 128500000,
171980
- * "amount_uf": 3250.5
171981
- * },
171982
- * "rent_price": null,
171983
- * "project": {
171984
- * "id": "0199e3a0-0000-7000-8000-000000000101",
171985
- * "name": "Parque Los Aromos"
171986
- * },
171987
- * "unit_model": {
171988
- * "id": "0199e3a0-0000-7000-8000-000000000201",
171989
- * "name": "3D2B 78 m²"
171990
- * }
173146
+ * "units": [
173147
+ * {
173148
+ * "unit_id": "0199e3a0-0000-7000-8000-000000000401",
173149
+ * "shape": [
173150
+ * [
173151
+ * 0.1,
173152
+ * 0.2
173153
+ * ],
173154
+ * [
173155
+ * 0.3,
173156
+ * 0.2
173157
+ * ],
173158
+ * [
173159
+ * 0.3,
173160
+ * 0.45
173161
+ * ],
173162
+ * [
173163
+ * 0.1,
173164
+ * 0.45
173165
+ * ]
173166
+ * ]
173167
+ * }
173168
+ * ]
171991
173169
  * }
171992
173170
  * }
171993
173171
  */
171994
173172
  "application/json": {
171995
- data: components["schemas"]["Unit"];
173173
+ data: components["schemas"]["FloorPlan"];
171996
173174
  };
171997
173175
  };
171998
173176
  };
@@ -172052,6 +173230,7 @@ interface paths {
172052
173230
  };
172053
173231
  };
172054
173232
  };
173233
+ post?: never;
172055
173234
  delete?: never;
172056
173235
  options?: never;
172057
173236
  head?: never;
@@ -202722,6 +203901,7 @@ interface components {
202722
203901
  photos: string[];
202723
203902
  brochure_url: string | null;
202724
203903
  meta_ad_ids: string[];
203904
+ visor_show_prices: boolean;
202725
203905
  /** @description The proyecto’s code in its tracked WhatsApp link (two letters + three digits, generated, never edited). A first message that carries it ties the conversation and its lead to this proyecto before the agent replies. `GET /projects/{id}/whatsapp-links` builds the links. */
202726
203906
  whatsapp_code: string;
202727
203907
  created_by: string | null;
@@ -202729,6 +203909,14 @@ interface components {
202729
203909
  updated_at: string;
202730
203910
  /** @description Live tipologías of the proyecto. */
202731
203911
  unit_model_count: number;
203912
+ /** @description Live unidades of the proyecto, in any status. */
203913
+ units_total: number;
203914
+ /** @description Unidades of the proyecto still `disponible`. */
203915
+ units_available: number;
203916
+ /** @description The «desde» price: the lowest UF sale price among the `disponible` unidades (set by the published lista de precios). Null while none is priced in UF. */
203917
+ price_from_uf: number | null;
203918
+ /** @description Ejecutivos on the proyecto’s team. */
203919
+ member_count: number;
202732
203920
  };
202733
203921
  UnitModel: {
202734
203922
  /** Format: uuid */
@@ -202779,6 +203967,7 @@ interface components {
202779
203967
  photos: string[];
202780
203968
  brochure_url: string | null;
202781
203969
  meta_ad_ids: string[];
203970
+ visor_show_prices: boolean;
202782
203971
  /** @description The proyecto’s code in its tracked WhatsApp link (two letters + three digits, generated, never edited). A first message that carries it ties the conversation and its lead to this proyecto before the agent replies. `GET /projects/{id}/whatsapp-links` builds the links. */
202783
203972
  whatsapp_code: string;
202784
203973
  created_by: string | null;
@@ -202824,6 +204013,8 @@ interface components {
202824
204013
  brochure_url?: string | null;
202825
204014
  /** @description The Meta ads (Click-to-WhatsApp, or Instagram / Messenger «Enviar mensaje» ads) that sell this proyecto: a conversation one of them opens is tied to the proyecto before the agent replies, and its lead is about it. One ad sells at most one live proyecto (409 `meta_ad_already_mapped`). Optional: an unmapped ad is still recognised by the proyecto’s name in its campaign, ad set or ad names or in its copy. */
202826
204015
  meta_ad_ids?: string[];
204016
+ /** @description Whether the public floor-plan visor shows the list price of the available unidades. Off by default. */
204017
+ visor_show_prices?: boolean;
202827
204018
  };
202828
204019
  UpdateProjectBody: {
202829
204020
  name?: string;
@@ -202855,6 +204046,8 @@ interface components {
202855
204046
  brochure_url?: string | null;
202856
204047
  /** @description The Meta ads (Click-to-WhatsApp, or Instagram / Messenger «Enviar mensaje» ads) that sell this proyecto: a conversation one of them opens is tied to the proyecto before the agent replies, and its lead is about it. One ad sells at most one live proyecto (409 `meta_ad_already_mapped`). Optional: an unmapped ad is still recognised by the proyecto’s name in its campaign, ad set or ad names or in its copy. */
202857
204048
  meta_ad_ids?: string[];
204049
+ /** @description Whether the public floor-plan visor shows the list price of the available unidades. Off by default. */
204050
+ visor_show_prices?: boolean;
202858
204051
  };
202859
204052
  UnitModelListItem: components["schemas"]["UnitModel"] & {
202860
204053
  /** @description The proyecto it belongs to. */
@@ -202940,6 +204133,57 @@ interface components {
202940
204133
  url: string;
202941
204134
  }[];
202942
204135
  };
204136
+ /** @description A Portal Inmobiliario proyecto listing (anuncio) and the proyecto it maps to. `project_id` null = not mapped yet. */
204137
+ ProjectListing: {
204138
+ /** Format: uuid */
204139
+ id: string;
204140
+ /** Format: uuid */
204141
+ tenant_id: string;
204142
+ /** Format: uuid */
204143
+ marketplace_account_id: string;
204144
+ external_id: string;
204145
+ /** Format: uuid */
204146
+ project_id: string | null;
204147
+ title: string | null;
204148
+ permalink: string | null;
204149
+ created_at: string;
204150
+ updated_at: string;
204151
+ };
204152
+ /** @description A Portal Inmobiliario proyecto listing (anuncio) and the proyecto it maps to. `project_id` null = not mapped yet. */
204153
+ ProjectListingListItem: components["schemas"]["ProjectListing"] & {
204154
+ /** @description Leads that arrived on the anuncio. */
204155
+ lead_count: number;
204156
+ /** @description Of those, the ones still without a proyecto. */
204157
+ unmapped_lead_count: number;
204158
+ };
204159
+ /** @description A Portal Inmobiliario proyecto listing (anuncio) and the proyecto it maps to. `project_id` null = not mapped yet. */
204160
+ MappedProjectListing: components["schemas"]["ProjectListing"] & {
204161
+ /** @description Leads that received the proyecto through this mapping. */
204162
+ leads_mapped: number;
204163
+ };
204164
+ CreateProjectListingBody: {
204165
+ /**
204166
+ * Format: uuid
204167
+ * @description The proyecto the anuncio belongs to.
204168
+ */
204169
+ project_id: string;
204170
+ /** @description The portal’s listing id (the Mercado Libre item id, e.g. `MLC1234567890`). */
204171
+ external_id: string;
204172
+ /**
204173
+ * Format: uuid
204174
+ * @description The Mercado Libre connection. Optional when the workspace has exactly one.
204175
+ */
204176
+ marketplace_account_id?: string;
204177
+ /** @description The anuncio’s title, for display. */
204178
+ title?: string;
204179
+ };
204180
+ UpdateProjectListingBody: {
204181
+ /**
204182
+ * Format: uuid
204183
+ * @description The proyecto to map the anuncio to, or `null` to unmap it. Mapping stamps the proyecto on the leads already waiting on the anuncio and routes the unowned ones to its ejecutivos.
204184
+ */
204185
+ project_id: string | null;
204186
+ };
202943
204187
  Unit: components["schemas"]["Property"] & {
202944
204188
  /**
202945
204189
  * @description Estado: disponible | bloqueada | reservada | promesada | vendida | pausada (arrendada never occurs on a unidad).
@@ -203144,6 +204388,82 @@ interface components {
203144
204388
  */
203145
204389
  status?: "disponible" | "pausada";
203146
204390
  };
204391
+ FloorPlan: {
204392
+ /** Format: uuid */
204393
+ id: string;
204394
+ /** Format: uuid */
204395
+ tenant_id: string;
204396
+ /** Format: uuid */
204397
+ project_id: string;
204398
+ name: string;
204399
+ floor: number | null;
204400
+ image_url: string;
204401
+ image_width: number | null;
204402
+ image_height: number | null;
204403
+ sort_order: number;
204404
+ created_by: string | null;
204405
+ created_at: string;
204406
+ updated_at: string;
204407
+ /** @description The unidades placed on the plan (live ones only). */
204408
+ units: {
204409
+ /** Format: uuid */
204410
+ unit_id: string;
204411
+ /** @description Polygon of 3 to 64 `[x, y]` points, each coordinate a fraction (0..1) of the image width / height, origin top-left. */
204412
+ shape: [
204413
+ number,
204414
+ number
204415
+ ][];
204416
+ }[];
204417
+ };
204418
+ CreateFloorPlanBody: {
204419
+ /** @description «Piso 3», «Planta tipo». */
204420
+ name: string;
204421
+ /** @description The floor this plan shows, when it shows one (negative = subterráneo). */
204422
+ floor?: number | null;
204423
+ /**
204424
+ * Format: uri
204425
+ * @description Public URL of the plan image: upload it with `POST /tenant/media` first and send its `url`.
204426
+ */
204427
+ image_url: string;
204428
+ /** @description Intrinsic width in pixels (with image_height), optional. */
204429
+ image_width?: number | null;
204430
+ /** @description Intrinsic height in pixels (with image_width), optional. */
204431
+ image_height?: number | null;
204432
+ /** @description Display order; lower first. */
204433
+ sort_order?: number;
204434
+ };
204435
+ UpdateFloorPlanBody: {
204436
+ /** @description «Piso 3», «Planta tipo». */
204437
+ name?: string;
204438
+ /** @description The floor this plan shows, when it shows one (negative = subterráneo). */
204439
+ floor?: number | null;
204440
+ /**
204441
+ * Format: uri
204442
+ * @description Public URL of the plan image: upload it with `POST /tenant/media` first and send its `url`.
204443
+ */
204444
+ image_url?: string;
204445
+ /** @description Intrinsic width in pixels (with image_height), optional. */
204446
+ image_width?: number | null;
204447
+ /** @description Intrinsic height in pixels (with image_width), optional. */
204448
+ image_height?: number | null;
204449
+ /** @description Display order; lower first. */
204450
+ sort_order?: number;
204451
+ };
204452
+ SetFloorPlanUnitsBody: {
204453
+ /** @description Every unidad on this plan, each once. Replaces what the plan had; an empty list clears it. */
204454
+ units: {
204455
+ /**
204456
+ * Format: uuid
204457
+ * @description A unidad of the plan’s proyecto.
204458
+ */
204459
+ unit_id: string;
204460
+ /** @description Polygon of 3 to 64 `[x, y]` points, each coordinate a fraction (0..1) of the image width / height, origin top-left. */
204461
+ shape: [
204462
+ number,
204463
+ number
204464
+ ][];
204465
+ }[];
204466
+ };
203147
204467
  PriceList: {
203148
204468
  /**
203149
204469
  * Format: uuid