@vitrina/api 14.57.0 → 14.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +1567 -3
- package/dist/index.d.ts +1567 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -165996,7 +165996,9 @@ interface paths {
|
|
|
165996
165996
|
/** @description What the buyer wants: `venta` also matches venta_y_arriendo, and so does `arriendo`. The price bounds then apply to that operation’s price. */
|
|
165997
165997
|
operation?: "venta" | "arriendo";
|
|
165998
165998
|
property_type?: ("departamento" | "casa" | "oficina" | "local_comercial" | "terreno" | "parcela" | "bodega" | "estacionamiento" | "industrial" | "otro")[];
|
|
165999
|
-
status?: ("disponible" | "reservada" | "vendida" | "arrendada" | "pausada")[];
|
|
165999
|
+
status?: ("disponible" | "bloqueada" | "reservada" | "promesada" | "vendida" | "arrendada" | "pausada")[];
|
|
166000
|
+
/** @description Also list the unidades of the workspace’s proyectos (Módulo Proyectos). Default false: the cartera only. */
|
|
166001
|
+
include_units?: boolean;
|
|
166000
166002
|
/** @description Comma-separated, accent- and case-insensitive. */
|
|
166001
166003
|
comuna?: string[];
|
|
166002
166004
|
min_bedrooms?: number | null;
|
|
@@ -169169,6 +169171,1350 @@ interface paths {
|
|
|
169169
169171
|
};
|
|
169170
169172
|
trace?: never;
|
|
169171
169173
|
};
|
|
169174
|
+
"/units": {
|
|
169175
|
+
parameters: {
|
|
169176
|
+
query?: never;
|
|
169177
|
+
header?: never;
|
|
169178
|
+
path?: never;
|
|
169179
|
+
cookie?: never;
|
|
169180
|
+
};
|
|
169181
|
+
/**
|
|
169182
|
+
* List unidades (a proyecto’s stock)
|
|
169183
|
+
* @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`.
|
|
169184
|
+
*/
|
|
169185
|
+
get: {
|
|
169186
|
+
parameters: {
|
|
169187
|
+
query?: {
|
|
169188
|
+
/** @description Only these proyectos (comma-separated ids). */
|
|
169189
|
+
project_id?: string[];
|
|
169190
|
+
/** @description Only these tipologías (comma-separated ids). */
|
|
169191
|
+
unit_model_id?: string[];
|
|
169192
|
+
/** @description Comma-separated kinds. */
|
|
169193
|
+
kind?: ("departamento" | "casa" | "estacionamiento" | "bodega")[];
|
|
169194
|
+
/** @description Comma-separated statuses. */
|
|
169195
|
+
status?: ("disponible" | "bloqueada" | "reservada" | "promesada" | "vendida" | "arrendada" | "pausada")[];
|
|
169196
|
+
min_floor?: number | null;
|
|
169197
|
+
max_floor?: number | null;
|
|
169198
|
+
min_bedrooms?: number | null;
|
|
169199
|
+
/** @description Free text over the unit number, the title and the display id. */
|
|
169200
|
+
q?: string;
|
|
169201
|
+
/** @description Default 100, max 500 (a whole proyecto fits in one page). */
|
|
169202
|
+
limit?: number;
|
|
169203
|
+
offset?: number | null;
|
|
169204
|
+
};
|
|
169205
|
+
header?: never;
|
|
169206
|
+
path?: never;
|
|
169207
|
+
cookie?: never;
|
|
169208
|
+
};
|
|
169209
|
+
requestBody?: never;
|
|
169210
|
+
responses: {
|
|
169211
|
+
/** @description Unidades */
|
|
169212
|
+
200: {
|
|
169213
|
+
headers: {
|
|
169214
|
+
[name: string]: unknown;
|
|
169215
|
+
};
|
|
169216
|
+
content: {
|
|
169217
|
+
/**
|
|
169218
|
+
* @example {
|
|
169219
|
+
* "data": [
|
|
169220
|
+
* {
|
|
169221
|
+
* "id": "0199e3a0-0000-7000-8000-000000000401",
|
|
169222
|
+
* "tenant_id": "0199e3a0-0000-7000-8000-0000000000aa",
|
|
169223
|
+
* "display_id": "I-42",
|
|
169224
|
+
* "title": "Departamento 1203 · Parque Los Aromos",
|
|
169225
|
+
* "description": null,
|
|
169226
|
+
* "operation": "venta",
|
|
169227
|
+
* "property_type": "departamento",
|
|
169228
|
+
* "kind": "departamento",
|
|
169229
|
+
* "status": "disponible",
|
|
169230
|
+
* "region": "Metropolitana",
|
|
169231
|
+
* "comuna": "La Florida",
|
|
169232
|
+
* "sector": null,
|
|
169233
|
+
* "address": null,
|
|
169234
|
+
* "sale_price_amount": 3250.5,
|
|
169235
|
+
* "sale_price_currency": "UF",
|
|
169236
|
+
* "rent_price_amount": null,
|
|
169237
|
+
* "rent_price_currency": null,
|
|
169238
|
+
* "common_expenses_clp": null,
|
|
169239
|
+
* "property_tax_clp": null,
|
|
169240
|
+
* "bedrooms": 3,
|
|
169241
|
+
* "bathrooms": 2,
|
|
169242
|
+
* "usable_area_m2": 72.5,
|
|
169243
|
+
* "terrace_area_m2": 6,
|
|
169244
|
+
* "total_area_m2": 78.5,
|
|
169245
|
+
* "parking_spaces": null,
|
|
169246
|
+
* "storage_units": null,
|
|
169247
|
+
* "orientation": "nororiente",
|
|
169248
|
+
* "floor": 12,
|
|
169249
|
+
* "year_built": null,
|
|
169250
|
+
* "furnished": null,
|
|
169251
|
+
* "pets_allowed": null,
|
|
169252
|
+
* "photos": [],
|
|
169253
|
+
* "broker_user_id": null,
|
|
169254
|
+
* "owner_name": null,
|
|
169255
|
+
* "owner_phone": null,
|
|
169256
|
+
* "owner_email": null,
|
|
169257
|
+
* "source": "import",
|
|
169258
|
+
* "external_ref": null,
|
|
169259
|
+
* "protected_fields": [],
|
|
169260
|
+
* "project_id": "0199e3a0-0000-7000-8000-000000000101",
|
|
169261
|
+
* "unit_model_id": "0199e3a0-0000-7000-8000-000000000201",
|
|
169262
|
+
* "unit_number": "1203",
|
|
169263
|
+
* "hold_expires_at": null,
|
|
169264
|
+
* "created_by": null,
|
|
169265
|
+
* "created_at": "2026-10-20T12:00:00.000Z",
|
|
169266
|
+
* "updated_at": "2026-10-20T12:00:00.000Z",
|
|
169267
|
+
* "sale_price": {
|
|
169268
|
+
* "amount": 3250.5,
|
|
169269
|
+
* "currency": "UF",
|
|
169270
|
+
* "amount_clp": 128500000,
|
|
169271
|
+
* "amount_uf": 3250.5
|
|
169272
|
+
* },
|
|
169273
|
+
* "rent_price": null,
|
|
169274
|
+
* "project": {
|
|
169275
|
+
* "id": "0199e3a0-0000-7000-8000-000000000101",
|
|
169276
|
+
* "name": "Parque Los Aromos"
|
|
169277
|
+
* },
|
|
169278
|
+
* "unit_model": {
|
|
169279
|
+
* "id": "0199e3a0-0000-7000-8000-000000000201",
|
|
169280
|
+
* "name": "3D2B 78 m²"
|
|
169281
|
+
* }
|
|
169282
|
+
* }
|
|
169283
|
+
* ],
|
|
169284
|
+
* "meta": {
|
|
169285
|
+
* "pagination": {
|
|
169286
|
+
* "total": 1,
|
|
169287
|
+
* "limit": 100,
|
|
169288
|
+
* "offset": 0
|
|
169289
|
+
* },
|
|
169290
|
+
* "status_counts": {
|
|
169291
|
+
* "disponible": 1
|
|
169292
|
+
* },
|
|
169293
|
+
* "uf_value": {
|
|
169294
|
+
* "clp": 39532.12,
|
|
169295
|
+
* "date": "2026-10-20"
|
|
169296
|
+
* }
|
|
169297
|
+
* }
|
|
169298
|
+
* }
|
|
169299
|
+
*/
|
|
169300
|
+
"application/json": {
|
|
169301
|
+
data: components["schemas"]["Unit"][];
|
|
169302
|
+
meta: {
|
|
169303
|
+
pagination: {
|
|
169304
|
+
total: number;
|
|
169305
|
+
limit: number;
|
|
169306
|
+
offset: number;
|
|
169307
|
+
};
|
|
169308
|
+
status_counts: {
|
|
169309
|
+
[key: string]: number;
|
|
169310
|
+
};
|
|
169311
|
+
uf_value: {
|
|
169312
|
+
clp: number;
|
|
169313
|
+
date: string;
|
|
169314
|
+
} | null;
|
|
169315
|
+
};
|
|
169316
|
+
};
|
|
169317
|
+
};
|
|
169318
|
+
};
|
|
169319
|
+
/** @description Validation error */
|
|
169320
|
+
400: {
|
|
169321
|
+
headers: {
|
|
169322
|
+
[name: string]: unknown;
|
|
169323
|
+
};
|
|
169324
|
+
content: {
|
|
169325
|
+
"application/json": components["schemas"]["Error"];
|
|
169326
|
+
};
|
|
169327
|
+
};
|
|
169328
|
+
/** @description Unauthorized */
|
|
169329
|
+
401: {
|
|
169330
|
+
headers: {
|
|
169331
|
+
[name: string]: unknown;
|
|
169332
|
+
};
|
|
169333
|
+
content: {
|
|
169334
|
+
"application/json": components["schemas"]["Error"];
|
|
169335
|
+
};
|
|
169336
|
+
};
|
|
169337
|
+
/** @description Forbidden */
|
|
169338
|
+
403: {
|
|
169339
|
+
headers: {
|
|
169340
|
+
[name: string]: unknown;
|
|
169341
|
+
};
|
|
169342
|
+
content: {
|
|
169343
|
+
"application/json": components["schemas"]["Error"];
|
|
169344
|
+
};
|
|
169345
|
+
};
|
|
169346
|
+
/** @description Not found */
|
|
169347
|
+
404: {
|
|
169348
|
+
headers: {
|
|
169349
|
+
[name: string]: unknown;
|
|
169350
|
+
};
|
|
169351
|
+
content: {
|
|
169352
|
+
"application/json": components["schemas"]["Error"];
|
|
169353
|
+
};
|
|
169354
|
+
};
|
|
169355
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
169356
|
+
409: {
|
|
169357
|
+
headers: {
|
|
169358
|
+
[name: string]: unknown;
|
|
169359
|
+
};
|
|
169360
|
+
content: {
|
|
169361
|
+
"application/json": components["schemas"]["Error"];
|
|
169362
|
+
};
|
|
169363
|
+
};
|
|
169364
|
+
/** @description Rate limited */
|
|
169365
|
+
429: {
|
|
169366
|
+
headers: {
|
|
169367
|
+
[name: string]: unknown;
|
|
169368
|
+
};
|
|
169369
|
+
content: {
|
|
169370
|
+
"application/json": components["schemas"]["Error"];
|
|
169371
|
+
};
|
|
169372
|
+
};
|
|
169373
|
+
};
|
|
169374
|
+
};
|
|
169375
|
+
put?: never;
|
|
169376
|
+
/**
|
|
169377
|
+
* Add a unidad by hand
|
|
169378
|
+
* @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. Requires `marketplace:write`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
|
|
169379
|
+
*/
|
|
169380
|
+
post: {
|
|
169381
|
+
parameters: {
|
|
169382
|
+
query?: never;
|
|
169383
|
+
header?: {
|
|
169384
|
+
/** @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. */
|
|
169385
|
+
"Idempotency-Key"?: string;
|
|
169386
|
+
};
|
|
169387
|
+
path?: never;
|
|
169388
|
+
cookie?: never;
|
|
169389
|
+
};
|
|
169390
|
+
requestBody?: {
|
|
169391
|
+
content: {
|
|
169392
|
+
/**
|
|
169393
|
+
* @example {
|
|
169394
|
+
* "project_id": "0199e3a0-0000-7000-8000-000000000101",
|
|
169395
|
+
* "kind": "estacionamiento",
|
|
169396
|
+
* "unit_number": "E-12",
|
|
169397
|
+
* "floor": -1,
|
|
169398
|
+
* "sale_price_amount": 250,
|
|
169399
|
+
* "sale_price_currency": "UF"
|
|
169400
|
+
* }
|
|
169401
|
+
*/
|
|
169402
|
+
"application/json": components["schemas"]["CreateUnitBody"];
|
|
169403
|
+
};
|
|
169404
|
+
};
|
|
169405
|
+
responses: {
|
|
169406
|
+
/** @description Created */
|
|
169407
|
+
201: {
|
|
169408
|
+
headers: {
|
|
169409
|
+
[name: string]: unknown;
|
|
169410
|
+
};
|
|
169411
|
+
content: {
|
|
169412
|
+
/**
|
|
169413
|
+
* @example {
|
|
169414
|
+
* "data": {
|
|
169415
|
+
* "id": "0199e3a0-0000-7000-8000-000000000401",
|
|
169416
|
+
* "tenant_id": "0199e3a0-0000-7000-8000-0000000000aa",
|
|
169417
|
+
* "display_id": "I-42",
|
|
169418
|
+
* "title": "Departamento 1203 · Parque Los Aromos",
|
|
169419
|
+
* "description": null,
|
|
169420
|
+
* "operation": "venta",
|
|
169421
|
+
* "property_type": "departamento",
|
|
169422
|
+
* "kind": "departamento",
|
|
169423
|
+
* "status": "disponible",
|
|
169424
|
+
* "region": "Metropolitana",
|
|
169425
|
+
* "comuna": "La Florida",
|
|
169426
|
+
* "sector": null,
|
|
169427
|
+
* "address": null,
|
|
169428
|
+
* "sale_price_amount": 3250.5,
|
|
169429
|
+
* "sale_price_currency": "UF",
|
|
169430
|
+
* "rent_price_amount": null,
|
|
169431
|
+
* "rent_price_currency": null,
|
|
169432
|
+
* "common_expenses_clp": null,
|
|
169433
|
+
* "property_tax_clp": null,
|
|
169434
|
+
* "bedrooms": 3,
|
|
169435
|
+
* "bathrooms": 2,
|
|
169436
|
+
* "usable_area_m2": 72.5,
|
|
169437
|
+
* "terrace_area_m2": 6,
|
|
169438
|
+
* "total_area_m2": 78.5,
|
|
169439
|
+
* "parking_spaces": null,
|
|
169440
|
+
* "storage_units": null,
|
|
169441
|
+
* "orientation": "nororiente",
|
|
169442
|
+
* "floor": 12,
|
|
169443
|
+
* "year_built": null,
|
|
169444
|
+
* "furnished": null,
|
|
169445
|
+
* "pets_allowed": null,
|
|
169446
|
+
* "photos": [],
|
|
169447
|
+
* "broker_user_id": null,
|
|
169448
|
+
* "owner_name": null,
|
|
169449
|
+
* "owner_phone": null,
|
|
169450
|
+
* "owner_email": null,
|
|
169451
|
+
* "source": "import",
|
|
169452
|
+
* "external_ref": null,
|
|
169453
|
+
* "protected_fields": [],
|
|
169454
|
+
* "project_id": "0199e3a0-0000-7000-8000-000000000101",
|
|
169455
|
+
* "unit_model_id": "0199e3a0-0000-7000-8000-000000000201",
|
|
169456
|
+
* "unit_number": "1203",
|
|
169457
|
+
* "hold_expires_at": null,
|
|
169458
|
+
* "created_by": null,
|
|
169459
|
+
* "created_at": "2026-10-20T12:00:00.000Z",
|
|
169460
|
+
* "updated_at": "2026-10-20T12:00:00.000Z",
|
|
169461
|
+
* "sale_price": {
|
|
169462
|
+
* "amount": 3250.5,
|
|
169463
|
+
* "currency": "UF",
|
|
169464
|
+
* "amount_clp": 128500000,
|
|
169465
|
+
* "amount_uf": 3250.5
|
|
169466
|
+
* },
|
|
169467
|
+
* "rent_price": null,
|
|
169468
|
+
* "project": {
|
|
169469
|
+
* "id": "0199e3a0-0000-7000-8000-000000000101",
|
|
169470
|
+
* "name": "Parque Los Aromos"
|
|
169471
|
+
* },
|
|
169472
|
+
* "unit_model": {
|
|
169473
|
+
* "id": "0199e3a0-0000-7000-8000-000000000201",
|
|
169474
|
+
* "name": "3D2B 78 m²"
|
|
169475
|
+
* }
|
|
169476
|
+
* }
|
|
169477
|
+
* }
|
|
169478
|
+
*/
|
|
169479
|
+
"application/json": {
|
|
169480
|
+
data: components["schemas"]["Unit"];
|
|
169481
|
+
};
|
|
169482
|
+
};
|
|
169483
|
+
};
|
|
169484
|
+
/** @description Validation error */
|
|
169485
|
+
400: {
|
|
169486
|
+
headers: {
|
|
169487
|
+
[name: string]: unknown;
|
|
169488
|
+
};
|
|
169489
|
+
content: {
|
|
169490
|
+
"application/json": components["schemas"]["Error"];
|
|
169491
|
+
};
|
|
169492
|
+
};
|
|
169493
|
+
/** @description Unauthorized */
|
|
169494
|
+
401: {
|
|
169495
|
+
headers: {
|
|
169496
|
+
[name: string]: unknown;
|
|
169497
|
+
};
|
|
169498
|
+
content: {
|
|
169499
|
+
"application/json": components["schemas"]["Error"];
|
|
169500
|
+
};
|
|
169501
|
+
};
|
|
169502
|
+
/** @description Forbidden */
|
|
169503
|
+
403: {
|
|
169504
|
+
headers: {
|
|
169505
|
+
[name: string]: unknown;
|
|
169506
|
+
};
|
|
169507
|
+
content: {
|
|
169508
|
+
"application/json": components["schemas"]["Error"];
|
|
169509
|
+
};
|
|
169510
|
+
};
|
|
169511
|
+
/** @description Not found */
|
|
169512
|
+
404: {
|
|
169513
|
+
headers: {
|
|
169514
|
+
[name: string]: unknown;
|
|
169515
|
+
};
|
|
169516
|
+
content: {
|
|
169517
|
+
"application/json": components["schemas"]["Error"];
|
|
169518
|
+
};
|
|
169519
|
+
};
|
|
169520
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
169521
|
+
409: {
|
|
169522
|
+
headers: {
|
|
169523
|
+
[name: string]: unknown;
|
|
169524
|
+
};
|
|
169525
|
+
content: {
|
|
169526
|
+
"application/json": components["schemas"]["Error"];
|
|
169527
|
+
};
|
|
169528
|
+
};
|
|
169529
|
+
/** @description Rate limited */
|
|
169530
|
+
429: {
|
|
169531
|
+
headers: {
|
|
169532
|
+
[name: string]: unknown;
|
|
169533
|
+
};
|
|
169534
|
+
content: {
|
|
169535
|
+
"application/json": components["schemas"]["Error"];
|
|
169536
|
+
};
|
|
169537
|
+
};
|
|
169538
|
+
};
|
|
169539
|
+
};
|
|
169540
|
+
delete?: never;
|
|
169541
|
+
options?: never;
|
|
169542
|
+
head?: never;
|
|
169543
|
+
patch?: never;
|
|
169544
|
+
trace?: never;
|
|
169545
|
+
};
|
|
169546
|
+
"/units/import/columns": {
|
|
169547
|
+
parameters: {
|
|
169548
|
+
query?: never;
|
|
169549
|
+
header?: never;
|
|
169550
|
+
path?: never;
|
|
169551
|
+
cookie?: never;
|
|
169552
|
+
};
|
|
169553
|
+
get?: never;
|
|
169554
|
+
put?: never;
|
|
169555
|
+
/**
|
|
169556
|
+
* Import step 1: read a stock file’s columns
|
|
169557
|
+
* @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`.
|
|
169558
|
+
*/
|
|
169559
|
+
post: {
|
|
169560
|
+
parameters: {
|
|
169561
|
+
query?: never;
|
|
169562
|
+
header?: {
|
|
169563
|
+
/** @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. */
|
|
169564
|
+
"Idempotency-Key"?: string;
|
|
169565
|
+
};
|
|
169566
|
+
path?: never;
|
|
169567
|
+
cookie?: never;
|
|
169568
|
+
};
|
|
169569
|
+
requestBody?: {
|
|
169570
|
+
content: {
|
|
169571
|
+
/**
|
|
169572
|
+
* @example {
|
|
169573
|
+
* "file": "(binary: stock-aromos.xlsx)"
|
|
169574
|
+
* }
|
|
169575
|
+
*/
|
|
169576
|
+
"multipart/form-data": {
|
|
169577
|
+
file?: unknown;
|
|
169578
|
+
};
|
|
169579
|
+
};
|
|
169580
|
+
};
|
|
169581
|
+
responses: {
|
|
169582
|
+
/** @description The file’s columns and the suggested mapping */
|
|
169583
|
+
200: {
|
|
169584
|
+
headers: {
|
|
169585
|
+
[name: string]: unknown;
|
|
169586
|
+
};
|
|
169587
|
+
content: {
|
|
169588
|
+
/**
|
|
169589
|
+
* @example {
|
|
169590
|
+
* "data": {
|
|
169591
|
+
* "format": "xlsx",
|
|
169592
|
+
* "sheet_name": "Stock",
|
|
169593
|
+
* "header": [
|
|
169594
|
+
* "Número",
|
|
169595
|
+
* "Tipo",
|
|
169596
|
+
* "Tipología",
|
|
169597
|
+
* "Piso",
|
|
169598
|
+
* "Precio UF",
|
|
169599
|
+
* "Estado"
|
|
169600
|
+
* ],
|
|
169601
|
+
* "row_count": 200,
|
|
169602
|
+
* "sample": [
|
|
169603
|
+
* [
|
|
169604
|
+
* "1203",
|
|
169605
|
+
* "Depto",
|
|
169606
|
+
* "3D2B",
|
|
169607
|
+
* "12",
|
|
169608
|
+
* "3.250,5",
|
|
169609
|
+
* "Disponible"
|
|
169610
|
+
* ]
|
|
169611
|
+
* ],
|
|
169612
|
+
* "suggested_mapping": {
|
|
169613
|
+
* "unit_number": "Número",
|
|
169614
|
+
* "kind": "Tipo",
|
|
169615
|
+
* "unit_model": "Tipología",
|
|
169616
|
+
* "floor": "Piso",
|
|
169617
|
+
* "price_uf": "Precio UF"
|
|
169618
|
+
* },
|
|
169619
|
+
* "ignored_status_columns": [
|
|
169620
|
+
* "Estado"
|
|
169621
|
+
* ],
|
|
169622
|
+
* "fields": [
|
|
169623
|
+
* {
|
|
169624
|
+
* "key": "unit_number",
|
|
169625
|
+
* "label": "Número de unidad",
|
|
169626
|
+
* "required": true,
|
|
169627
|
+
* "description": "The unidad’s number as the inmobiliaria writes it."
|
|
169628
|
+
* }
|
|
169629
|
+
* ]
|
|
169630
|
+
* }
|
|
169631
|
+
* }
|
|
169632
|
+
*/
|
|
169633
|
+
"application/json": {
|
|
169634
|
+
data: components["schemas"]["UnitImportColumns"];
|
|
169635
|
+
};
|
|
169636
|
+
};
|
|
169637
|
+
};
|
|
169638
|
+
/** @description Validation error */
|
|
169639
|
+
400: {
|
|
169640
|
+
headers: {
|
|
169641
|
+
[name: string]: unknown;
|
|
169642
|
+
};
|
|
169643
|
+
content: {
|
|
169644
|
+
"application/json": components["schemas"]["Error"];
|
|
169645
|
+
};
|
|
169646
|
+
};
|
|
169647
|
+
/** @description Unauthorized */
|
|
169648
|
+
401: {
|
|
169649
|
+
headers: {
|
|
169650
|
+
[name: string]: unknown;
|
|
169651
|
+
};
|
|
169652
|
+
content: {
|
|
169653
|
+
"application/json": components["schemas"]["Error"];
|
|
169654
|
+
};
|
|
169655
|
+
};
|
|
169656
|
+
/** @description Forbidden */
|
|
169657
|
+
403: {
|
|
169658
|
+
headers: {
|
|
169659
|
+
[name: string]: unknown;
|
|
169660
|
+
};
|
|
169661
|
+
content: {
|
|
169662
|
+
"application/json": components["schemas"]["Error"];
|
|
169663
|
+
};
|
|
169664
|
+
};
|
|
169665
|
+
/** @description Not found */
|
|
169666
|
+
404: {
|
|
169667
|
+
headers: {
|
|
169668
|
+
[name: string]: unknown;
|
|
169669
|
+
};
|
|
169670
|
+
content: {
|
|
169671
|
+
"application/json": components["schemas"]["Error"];
|
|
169672
|
+
};
|
|
169673
|
+
};
|
|
169674
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
169675
|
+
409: {
|
|
169676
|
+
headers: {
|
|
169677
|
+
[name: string]: unknown;
|
|
169678
|
+
};
|
|
169679
|
+
content: {
|
|
169680
|
+
"application/json": components["schemas"]["Error"];
|
|
169681
|
+
};
|
|
169682
|
+
};
|
|
169683
|
+
/** @description Rate limited */
|
|
169684
|
+
429: {
|
|
169685
|
+
headers: {
|
|
169686
|
+
[name: string]: unknown;
|
|
169687
|
+
};
|
|
169688
|
+
content: {
|
|
169689
|
+
"application/json": components["schemas"]["Error"];
|
|
169690
|
+
};
|
|
169691
|
+
};
|
|
169692
|
+
};
|
|
169693
|
+
};
|
|
169694
|
+
delete?: never;
|
|
169695
|
+
options?: never;
|
|
169696
|
+
head?: never;
|
|
169697
|
+
patch?: never;
|
|
169698
|
+
trace?: never;
|
|
169699
|
+
};
|
|
169700
|
+
"/units/import": {
|
|
169701
|
+
parameters: {
|
|
169702
|
+
query?: never;
|
|
169703
|
+
header?: never;
|
|
169704
|
+
path?: never;
|
|
169705
|
+
cookie?: never;
|
|
169706
|
+
};
|
|
169707
|
+
get?: never;
|
|
169708
|
+
put?: never;
|
|
169709
|
+
/**
|
|
169710
|
+
* Import steps 2–3: dry run, then load a proyecto’s unidades
|
|
169711
|
+
* @description Loads a proyecto’s stock from the inmobiliaria’s Excel or CSV (multipart: `file`, `project_id`, `mapping` as JSON text, `dry_run`, `default_kind`) or from JSON `rows` (one object per unidad keyed by column name — the MCP path). **`dry_run` defaults to true**: the report says, row by row, what would be created, updated (which fields) or left unchanged, and every error with its field; nothing is written. Send `dry_run: false` to write every row without an error in ONE transaction. A unidad is matched by proyecto + kind + number, so re-importing a file changes nothing and an updated file updates in place; unidades missing from the file are counted (`not_in_file`), never removed. **An import never writes a unidad’s status** (there is no status field; a column like «Estado» is listed in `ignored_status_columns`), and fields a person edited by hand stay (`protected_skipped`). A tipología is named by its name in the proyecto; its dormitorios, baños and m² fill a new unidad’s when the file leaves them empty. Requires `marketplace:write`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
|
|
169712
|
+
*/
|
|
169713
|
+
post: {
|
|
169714
|
+
parameters: {
|
|
169715
|
+
query?: never;
|
|
169716
|
+
header?: {
|
|
169717
|
+
/** @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. */
|
|
169718
|
+
"Idempotency-Key"?: string;
|
|
169719
|
+
};
|
|
169720
|
+
path?: never;
|
|
169721
|
+
cookie?: never;
|
|
169722
|
+
};
|
|
169723
|
+
requestBody?: {
|
|
169724
|
+
content: {
|
|
169725
|
+
/**
|
|
169726
|
+
* @example {
|
|
169727
|
+
* "project_id": "0199e3a0-0000-7000-8000-000000000101",
|
|
169728
|
+
* "rows": [
|
|
169729
|
+
* {
|
|
169730
|
+
* "Número": "1203",
|
|
169731
|
+
* "Tipo": "Depto",
|
|
169732
|
+
* "Tipología": "3D2B",
|
|
169733
|
+
* "Piso": 12,
|
|
169734
|
+
* "Precio UF": "3.250,5"
|
|
169735
|
+
* },
|
|
169736
|
+
* {
|
|
169737
|
+
* "Número": "E-12",
|
|
169738
|
+
* "Tipo": "Estacionamiento",
|
|
169739
|
+
* "Piso": -1,
|
|
169740
|
+
* "Precio UF": 250
|
|
169741
|
+
* }
|
|
169742
|
+
* ],
|
|
169743
|
+
* "mapping": {
|
|
169744
|
+
* "unit_number": "Número",
|
|
169745
|
+
* "kind": "Tipo",
|
|
169746
|
+
* "unit_model": "Tipología",
|
|
169747
|
+
* "floor": "Piso",
|
|
169748
|
+
* "price_uf": "Precio UF"
|
|
169749
|
+
* },
|
|
169750
|
+
* "dry_run": true
|
|
169751
|
+
* }
|
|
169752
|
+
*/
|
|
169753
|
+
"application/json": components["schemas"]["ImportUnitsBody"];
|
|
169754
|
+
"multipart/form-data": {
|
|
169755
|
+
file?: unknown;
|
|
169756
|
+
/** Format: uuid */
|
|
169757
|
+
project_id: string;
|
|
169758
|
+
mapping?: string;
|
|
169759
|
+
dry_run?: string;
|
|
169760
|
+
default_kind?: string;
|
|
169761
|
+
};
|
|
169762
|
+
};
|
|
169763
|
+
};
|
|
169764
|
+
responses: {
|
|
169765
|
+
/** @description The import report (what would happen, or what happened) */
|
|
169766
|
+
200: {
|
|
169767
|
+
headers: {
|
|
169768
|
+
[name: string]: unknown;
|
|
169769
|
+
};
|
|
169770
|
+
content: {
|
|
169771
|
+
/**
|
|
169772
|
+
* @example {
|
|
169773
|
+
* "data": {
|
|
169774
|
+
* "dry_run": true,
|
|
169775
|
+
* "project_id": "0199e3a0-0000-7000-8000-000000000101",
|
|
169776
|
+
* "mapping": {
|
|
169777
|
+
* "unit_number": "Número",
|
|
169778
|
+
* "kind": "Tipo",
|
|
169779
|
+
* "unit_model": "Tipología",
|
|
169780
|
+
* "floor": "Piso",
|
|
169781
|
+
* "price_uf": "Precio UF"
|
|
169782
|
+
* },
|
|
169783
|
+
* "ignored_status_columns": [
|
|
169784
|
+
* "Estado"
|
|
169785
|
+
* ],
|
|
169786
|
+
* "summary": {
|
|
169787
|
+
* "total_rows": 3,
|
|
169788
|
+
* "create": 1,
|
|
169789
|
+
* "update": 1,
|
|
169790
|
+
* "unchanged": 0,
|
|
169791
|
+
* "error": 1,
|
|
169792
|
+
* "not_in_file": 0
|
|
169793
|
+
* },
|
|
169794
|
+
* "rows": [
|
|
169795
|
+
* {
|
|
169796
|
+
* "row_number": 2,
|
|
169797
|
+
* "action": "create",
|
|
169798
|
+
* "unit_number": "1203",
|
|
169799
|
+
* "kind": "departamento",
|
|
169800
|
+
* "unit_id": null,
|
|
169801
|
+
* "display_id": null,
|
|
169802
|
+
* "fields": [
|
|
169803
|
+
* "floor",
|
|
169804
|
+
* "sale_price_amount",
|
|
169805
|
+
* "sale_price_currency",
|
|
169806
|
+
* "unit_model_id"
|
|
169807
|
+
* ],
|
|
169808
|
+
* "protected_skipped": [],
|
|
169809
|
+
* "status": "disponible",
|
|
169810
|
+
* "errors": []
|
|
169811
|
+
* },
|
|
169812
|
+
* {
|
|
169813
|
+
* "row_number": 3,
|
|
169814
|
+
* "action": "update",
|
|
169815
|
+
* "unit_number": "E-12",
|
|
169816
|
+
* "kind": "estacionamiento",
|
|
169817
|
+
* "unit_id": "0199e3a0-0000-7000-8000-000000000401",
|
|
169818
|
+
* "display_id": "I-43",
|
|
169819
|
+
* "fields": [
|
|
169820
|
+
* "sale_price_amount"
|
|
169821
|
+
* ],
|
|
169822
|
+
* "protected_skipped": [],
|
|
169823
|
+
* "status": "reservada",
|
|
169824
|
+
* "errors": []
|
|
169825
|
+
* },
|
|
169826
|
+
* {
|
|
169827
|
+
* "row_number": 4,
|
|
169828
|
+
* "action": "error",
|
|
169829
|
+
* "unit_number": "1204",
|
|
169830
|
+
* "kind": "departamento",
|
|
169831
|
+
* "unit_id": null,
|
|
169832
|
+
* "display_id": null,
|
|
169833
|
+
* "fields": [],
|
|
169834
|
+
* "protected_skipped": [],
|
|
169835
|
+
* "status": "disponible",
|
|
169836
|
+
* "errors": [
|
|
169837
|
+
* {
|
|
169838
|
+
* "field": "unit_model",
|
|
169839
|
+
* "message": "La tipología «4D3B» no existe en este proyecto. Créala primero o corrige el nombre."
|
|
169840
|
+
* }
|
|
169841
|
+
* ]
|
|
169842
|
+
* }
|
|
169843
|
+
* ]
|
|
169844
|
+
* }
|
|
169845
|
+
* }
|
|
169846
|
+
*/
|
|
169847
|
+
"application/json": {
|
|
169848
|
+
data: components["schemas"]["UnitImportReport"];
|
|
169849
|
+
};
|
|
169850
|
+
};
|
|
169851
|
+
};
|
|
169852
|
+
/** @description Validation error */
|
|
169853
|
+
400: {
|
|
169854
|
+
headers: {
|
|
169855
|
+
[name: string]: unknown;
|
|
169856
|
+
};
|
|
169857
|
+
content: {
|
|
169858
|
+
"application/json": components["schemas"]["Error"];
|
|
169859
|
+
};
|
|
169860
|
+
};
|
|
169861
|
+
/** @description Unauthorized */
|
|
169862
|
+
401: {
|
|
169863
|
+
headers: {
|
|
169864
|
+
[name: string]: unknown;
|
|
169865
|
+
};
|
|
169866
|
+
content: {
|
|
169867
|
+
"application/json": components["schemas"]["Error"];
|
|
169868
|
+
};
|
|
169869
|
+
};
|
|
169870
|
+
/** @description Forbidden */
|
|
169871
|
+
403: {
|
|
169872
|
+
headers: {
|
|
169873
|
+
[name: string]: unknown;
|
|
169874
|
+
};
|
|
169875
|
+
content: {
|
|
169876
|
+
"application/json": components["schemas"]["Error"];
|
|
169877
|
+
};
|
|
169878
|
+
};
|
|
169879
|
+
/** @description Not found */
|
|
169880
|
+
404: {
|
|
169881
|
+
headers: {
|
|
169882
|
+
[name: string]: unknown;
|
|
169883
|
+
};
|
|
169884
|
+
content: {
|
|
169885
|
+
"application/json": components["schemas"]["Error"];
|
|
169886
|
+
};
|
|
169887
|
+
};
|
|
169888
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
169889
|
+
409: {
|
|
169890
|
+
headers: {
|
|
169891
|
+
[name: string]: unknown;
|
|
169892
|
+
};
|
|
169893
|
+
content: {
|
|
169894
|
+
"application/json": components["schemas"]["Error"];
|
|
169895
|
+
};
|
|
169896
|
+
};
|
|
169897
|
+
/** @description Rate limited */
|
|
169898
|
+
429: {
|
|
169899
|
+
headers: {
|
|
169900
|
+
[name: string]: unknown;
|
|
169901
|
+
};
|
|
169902
|
+
content: {
|
|
169903
|
+
"application/json": components["schemas"]["Error"];
|
|
169904
|
+
};
|
|
169905
|
+
};
|
|
169906
|
+
};
|
|
169907
|
+
};
|
|
169908
|
+
delete?: never;
|
|
169909
|
+
options?: never;
|
|
169910
|
+
head?: never;
|
|
169911
|
+
patch?: never;
|
|
169912
|
+
trace?: never;
|
|
169913
|
+
};
|
|
169914
|
+
"/units/{id}": {
|
|
169915
|
+
parameters: {
|
|
169916
|
+
query?: never;
|
|
169917
|
+
header?: never;
|
|
169918
|
+
path?: never;
|
|
169919
|
+
cookie?: never;
|
|
169920
|
+
};
|
|
169921
|
+
/**
|
|
169922
|
+
* One unidad
|
|
169923
|
+
* @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`.
|
|
169924
|
+
*/
|
|
169925
|
+
get: {
|
|
169926
|
+
parameters: {
|
|
169927
|
+
query?: never;
|
|
169928
|
+
header?: never;
|
|
169929
|
+
path: {
|
|
169930
|
+
/** @description The unidad’s uuid or its display id (`I-12`). */
|
|
169931
|
+
id: string;
|
|
169932
|
+
};
|
|
169933
|
+
cookie?: never;
|
|
169934
|
+
};
|
|
169935
|
+
requestBody?: never;
|
|
169936
|
+
responses: {
|
|
169937
|
+
/** @description Unidad */
|
|
169938
|
+
200: {
|
|
169939
|
+
headers: {
|
|
169940
|
+
[name: string]: unknown;
|
|
169941
|
+
};
|
|
169942
|
+
content: {
|
|
169943
|
+
/**
|
|
169944
|
+
* @example {
|
|
169945
|
+
* "data": {
|
|
169946
|
+
* "id": "0199e3a0-0000-7000-8000-000000000401",
|
|
169947
|
+
* "tenant_id": "0199e3a0-0000-7000-8000-0000000000aa",
|
|
169948
|
+
* "display_id": "I-42",
|
|
169949
|
+
* "title": "Departamento 1203 · Parque Los Aromos",
|
|
169950
|
+
* "description": null,
|
|
169951
|
+
* "operation": "venta",
|
|
169952
|
+
* "property_type": "departamento",
|
|
169953
|
+
* "kind": "departamento",
|
|
169954
|
+
* "status": "disponible",
|
|
169955
|
+
* "region": "Metropolitana",
|
|
169956
|
+
* "comuna": "La Florida",
|
|
169957
|
+
* "sector": null,
|
|
169958
|
+
* "address": null,
|
|
169959
|
+
* "sale_price_amount": 3250.5,
|
|
169960
|
+
* "sale_price_currency": "UF",
|
|
169961
|
+
* "rent_price_amount": null,
|
|
169962
|
+
* "rent_price_currency": null,
|
|
169963
|
+
* "common_expenses_clp": null,
|
|
169964
|
+
* "property_tax_clp": null,
|
|
169965
|
+
* "bedrooms": 3,
|
|
169966
|
+
* "bathrooms": 2,
|
|
169967
|
+
* "usable_area_m2": 72.5,
|
|
169968
|
+
* "terrace_area_m2": 6,
|
|
169969
|
+
* "total_area_m2": 78.5,
|
|
169970
|
+
* "parking_spaces": null,
|
|
169971
|
+
* "storage_units": null,
|
|
169972
|
+
* "orientation": "nororiente",
|
|
169973
|
+
* "floor": 12,
|
|
169974
|
+
* "year_built": null,
|
|
169975
|
+
* "furnished": null,
|
|
169976
|
+
* "pets_allowed": null,
|
|
169977
|
+
* "photos": [],
|
|
169978
|
+
* "broker_user_id": null,
|
|
169979
|
+
* "owner_name": null,
|
|
169980
|
+
* "owner_phone": null,
|
|
169981
|
+
* "owner_email": null,
|
|
169982
|
+
* "source": "import",
|
|
169983
|
+
* "external_ref": null,
|
|
169984
|
+
* "protected_fields": [],
|
|
169985
|
+
* "project_id": "0199e3a0-0000-7000-8000-000000000101",
|
|
169986
|
+
* "unit_model_id": "0199e3a0-0000-7000-8000-000000000201",
|
|
169987
|
+
* "unit_number": "1203",
|
|
169988
|
+
* "hold_expires_at": null,
|
|
169989
|
+
* "created_by": null,
|
|
169990
|
+
* "created_at": "2026-10-20T12:00:00.000Z",
|
|
169991
|
+
* "updated_at": "2026-10-20T12:00:00.000Z",
|
|
169992
|
+
* "sale_price": {
|
|
169993
|
+
* "amount": 3250.5,
|
|
169994
|
+
* "currency": "UF",
|
|
169995
|
+
* "amount_clp": 128500000,
|
|
169996
|
+
* "amount_uf": 3250.5
|
|
169997
|
+
* },
|
|
169998
|
+
* "rent_price": null,
|
|
169999
|
+
* "project": {
|
|
170000
|
+
* "id": "0199e3a0-0000-7000-8000-000000000101",
|
|
170001
|
+
* "name": "Parque Los Aromos"
|
|
170002
|
+
* },
|
|
170003
|
+
* "unit_model": {
|
|
170004
|
+
* "id": "0199e3a0-0000-7000-8000-000000000201",
|
|
170005
|
+
* "name": "3D2B 78 m²"
|
|
170006
|
+
* }
|
|
170007
|
+
* }
|
|
170008
|
+
* }
|
|
170009
|
+
*/
|
|
170010
|
+
"application/json": {
|
|
170011
|
+
data: components["schemas"]["Unit"];
|
|
170012
|
+
};
|
|
170013
|
+
};
|
|
170014
|
+
};
|
|
170015
|
+
/** @description Validation error */
|
|
170016
|
+
400: {
|
|
170017
|
+
headers: {
|
|
170018
|
+
[name: string]: unknown;
|
|
170019
|
+
};
|
|
170020
|
+
content: {
|
|
170021
|
+
"application/json": components["schemas"]["Error"];
|
|
170022
|
+
};
|
|
170023
|
+
};
|
|
170024
|
+
/** @description Unauthorized */
|
|
170025
|
+
401: {
|
|
170026
|
+
headers: {
|
|
170027
|
+
[name: string]: unknown;
|
|
170028
|
+
};
|
|
170029
|
+
content: {
|
|
170030
|
+
"application/json": components["schemas"]["Error"];
|
|
170031
|
+
};
|
|
170032
|
+
};
|
|
170033
|
+
/** @description Forbidden */
|
|
170034
|
+
403: {
|
|
170035
|
+
headers: {
|
|
170036
|
+
[name: string]: unknown;
|
|
170037
|
+
};
|
|
170038
|
+
content: {
|
|
170039
|
+
"application/json": components["schemas"]["Error"];
|
|
170040
|
+
};
|
|
170041
|
+
};
|
|
170042
|
+
/** @description Not found */
|
|
170043
|
+
404: {
|
|
170044
|
+
headers: {
|
|
170045
|
+
[name: string]: unknown;
|
|
170046
|
+
};
|
|
170047
|
+
content: {
|
|
170048
|
+
"application/json": components["schemas"]["Error"];
|
|
170049
|
+
};
|
|
170050
|
+
};
|
|
170051
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
170052
|
+
409: {
|
|
170053
|
+
headers: {
|
|
170054
|
+
[name: string]: unknown;
|
|
170055
|
+
};
|
|
170056
|
+
content: {
|
|
170057
|
+
"application/json": components["schemas"]["Error"];
|
|
170058
|
+
};
|
|
170059
|
+
};
|
|
170060
|
+
/** @description Rate limited */
|
|
170061
|
+
429: {
|
|
170062
|
+
headers: {
|
|
170063
|
+
[name: string]: unknown;
|
|
170064
|
+
};
|
|
170065
|
+
content: {
|
|
170066
|
+
"application/json": components["schemas"]["Error"];
|
|
170067
|
+
};
|
|
170068
|
+
};
|
|
170069
|
+
};
|
|
170070
|
+
};
|
|
170071
|
+
put?: never;
|
|
170072
|
+
post?: never;
|
|
170073
|
+
/**
|
|
170074
|
+
* Remove a unidad
|
|
170075
|
+
* @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`.
|
|
170076
|
+
*/
|
|
170077
|
+
delete: {
|
|
170078
|
+
parameters: {
|
|
170079
|
+
query?: never;
|
|
170080
|
+
header?: never;
|
|
170081
|
+
path: {
|
|
170082
|
+
/** @description The unidad’s uuid or its display id (`I-12`). */
|
|
170083
|
+
id: string;
|
|
170084
|
+
};
|
|
170085
|
+
cookie?: never;
|
|
170086
|
+
};
|
|
170087
|
+
requestBody?: never;
|
|
170088
|
+
responses: {
|
|
170089
|
+
/** @description Removed */
|
|
170090
|
+
200: {
|
|
170091
|
+
headers: {
|
|
170092
|
+
[name: string]: unknown;
|
|
170093
|
+
};
|
|
170094
|
+
content: {
|
|
170095
|
+
/**
|
|
170096
|
+
* @example {
|
|
170097
|
+
* "data": {
|
|
170098
|
+
* "id": "0199e3a0-0000-7000-8000-000000000401",
|
|
170099
|
+
* "display_id": "I-42",
|
|
170100
|
+
* "unit_number": "1203",
|
|
170101
|
+
* "deleted": true
|
|
170102
|
+
* }
|
|
170103
|
+
* }
|
|
170104
|
+
*/
|
|
170105
|
+
"application/json": {
|
|
170106
|
+
data: {
|
|
170107
|
+
/** Format: uuid */
|
|
170108
|
+
id: string;
|
|
170109
|
+
display_id: string;
|
|
170110
|
+
unit_number: string;
|
|
170111
|
+
/** @enum {boolean} */
|
|
170112
|
+
deleted: true;
|
|
170113
|
+
};
|
|
170114
|
+
};
|
|
170115
|
+
};
|
|
170116
|
+
};
|
|
170117
|
+
/** @description Validation error */
|
|
170118
|
+
400: {
|
|
170119
|
+
headers: {
|
|
170120
|
+
[name: string]: unknown;
|
|
170121
|
+
};
|
|
170122
|
+
content: {
|
|
170123
|
+
"application/json": components["schemas"]["Error"];
|
|
170124
|
+
};
|
|
170125
|
+
};
|
|
170126
|
+
/** @description Unauthorized */
|
|
170127
|
+
401: {
|
|
170128
|
+
headers: {
|
|
170129
|
+
[name: string]: unknown;
|
|
170130
|
+
};
|
|
170131
|
+
content: {
|
|
170132
|
+
"application/json": components["schemas"]["Error"];
|
|
170133
|
+
};
|
|
170134
|
+
};
|
|
170135
|
+
/** @description Forbidden */
|
|
170136
|
+
403: {
|
|
170137
|
+
headers: {
|
|
170138
|
+
[name: string]: unknown;
|
|
170139
|
+
};
|
|
170140
|
+
content: {
|
|
170141
|
+
"application/json": components["schemas"]["Error"];
|
|
170142
|
+
};
|
|
170143
|
+
};
|
|
170144
|
+
/** @description Not found */
|
|
170145
|
+
404: {
|
|
170146
|
+
headers: {
|
|
170147
|
+
[name: string]: unknown;
|
|
170148
|
+
};
|
|
170149
|
+
content: {
|
|
170150
|
+
"application/json": components["schemas"]["Error"];
|
|
170151
|
+
};
|
|
170152
|
+
};
|
|
170153
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
170154
|
+
409: {
|
|
170155
|
+
headers: {
|
|
170156
|
+
[name: string]: unknown;
|
|
170157
|
+
};
|
|
170158
|
+
content: {
|
|
170159
|
+
"application/json": components["schemas"]["Error"];
|
|
170160
|
+
};
|
|
170161
|
+
};
|
|
170162
|
+
/** @description Rate limited */
|
|
170163
|
+
429: {
|
|
170164
|
+
headers: {
|
|
170165
|
+
[name: string]: unknown;
|
|
170166
|
+
};
|
|
170167
|
+
content: {
|
|
170168
|
+
"application/json": components["schemas"]["Error"];
|
|
170169
|
+
};
|
|
170170
|
+
};
|
|
170171
|
+
};
|
|
170172
|
+
};
|
|
170173
|
+
options?: never;
|
|
170174
|
+
head?: never;
|
|
170175
|
+
/**
|
|
170176
|
+
* Edit a unidad
|
|
170177
|
+
* @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`. Requires `marketplace:write`. Only on a workspace that runs the Proyectos module (real-estate vertical, inmobiliaria); any other answers 403 `MODULE_NOT_ENABLED`.
|
|
170178
|
+
*/
|
|
170179
|
+
patch: {
|
|
170180
|
+
parameters: {
|
|
170181
|
+
query?: never;
|
|
170182
|
+
header?: never;
|
|
170183
|
+
path: {
|
|
170184
|
+
/** @description The unidad’s uuid or its display id (`I-12`). */
|
|
170185
|
+
id: string;
|
|
170186
|
+
};
|
|
170187
|
+
cookie?: never;
|
|
170188
|
+
};
|
|
170189
|
+
requestBody?: {
|
|
170190
|
+
content: {
|
|
170191
|
+
/**
|
|
170192
|
+
* @example {
|
|
170193
|
+
* "status": "pausada"
|
|
170194
|
+
* }
|
|
170195
|
+
*/
|
|
170196
|
+
"application/json": components["schemas"]["UpdateUnitBody"];
|
|
170197
|
+
};
|
|
170198
|
+
};
|
|
170199
|
+
responses: {
|
|
170200
|
+
/** @description Updated */
|
|
170201
|
+
200: {
|
|
170202
|
+
headers: {
|
|
170203
|
+
[name: string]: unknown;
|
|
170204
|
+
};
|
|
170205
|
+
content: {
|
|
170206
|
+
/**
|
|
170207
|
+
* @example {
|
|
170208
|
+
* "data": {
|
|
170209
|
+
* "id": "0199e3a0-0000-7000-8000-000000000401",
|
|
170210
|
+
* "tenant_id": "0199e3a0-0000-7000-8000-0000000000aa",
|
|
170211
|
+
* "display_id": "I-42",
|
|
170212
|
+
* "title": "Departamento 1203 · Parque Los Aromos",
|
|
170213
|
+
* "description": null,
|
|
170214
|
+
* "operation": "venta",
|
|
170215
|
+
* "property_type": "departamento",
|
|
170216
|
+
* "kind": "departamento",
|
|
170217
|
+
* "status": "disponible",
|
|
170218
|
+
* "region": "Metropolitana",
|
|
170219
|
+
* "comuna": "La Florida",
|
|
170220
|
+
* "sector": null,
|
|
170221
|
+
* "address": null,
|
|
170222
|
+
* "sale_price_amount": 3250.5,
|
|
170223
|
+
* "sale_price_currency": "UF",
|
|
170224
|
+
* "rent_price_amount": null,
|
|
170225
|
+
* "rent_price_currency": null,
|
|
170226
|
+
* "common_expenses_clp": null,
|
|
170227
|
+
* "property_tax_clp": null,
|
|
170228
|
+
* "bedrooms": 3,
|
|
170229
|
+
* "bathrooms": 2,
|
|
170230
|
+
* "usable_area_m2": 72.5,
|
|
170231
|
+
* "terrace_area_m2": 6,
|
|
170232
|
+
* "total_area_m2": 78.5,
|
|
170233
|
+
* "parking_spaces": null,
|
|
170234
|
+
* "storage_units": null,
|
|
170235
|
+
* "orientation": "nororiente",
|
|
170236
|
+
* "floor": 12,
|
|
170237
|
+
* "year_built": null,
|
|
170238
|
+
* "furnished": null,
|
|
170239
|
+
* "pets_allowed": null,
|
|
170240
|
+
* "photos": [],
|
|
170241
|
+
* "broker_user_id": null,
|
|
170242
|
+
* "owner_name": null,
|
|
170243
|
+
* "owner_phone": null,
|
|
170244
|
+
* "owner_email": null,
|
|
170245
|
+
* "source": "import",
|
|
170246
|
+
* "external_ref": null,
|
|
170247
|
+
* "protected_fields": [],
|
|
170248
|
+
* "project_id": "0199e3a0-0000-7000-8000-000000000101",
|
|
170249
|
+
* "unit_model_id": "0199e3a0-0000-7000-8000-000000000201",
|
|
170250
|
+
* "unit_number": "1203",
|
|
170251
|
+
* "hold_expires_at": null,
|
|
170252
|
+
* "created_by": null,
|
|
170253
|
+
* "created_at": "2026-10-20T12:00:00.000Z",
|
|
170254
|
+
* "updated_at": "2026-10-20T12:00:00.000Z",
|
|
170255
|
+
* "sale_price": {
|
|
170256
|
+
* "amount": 3250.5,
|
|
170257
|
+
* "currency": "UF",
|
|
170258
|
+
* "amount_clp": 128500000,
|
|
170259
|
+
* "amount_uf": 3250.5
|
|
170260
|
+
* },
|
|
170261
|
+
* "rent_price": null,
|
|
170262
|
+
* "project": {
|
|
170263
|
+
* "id": "0199e3a0-0000-7000-8000-000000000101",
|
|
170264
|
+
* "name": "Parque Los Aromos"
|
|
170265
|
+
* },
|
|
170266
|
+
* "unit_model": {
|
|
170267
|
+
* "id": "0199e3a0-0000-7000-8000-000000000201",
|
|
170268
|
+
* "name": "3D2B 78 m²"
|
|
170269
|
+
* }
|
|
170270
|
+
* }
|
|
170271
|
+
* }
|
|
170272
|
+
*/
|
|
170273
|
+
"application/json": {
|
|
170274
|
+
data: components["schemas"]["Unit"];
|
|
170275
|
+
};
|
|
170276
|
+
};
|
|
170277
|
+
};
|
|
170278
|
+
/** @description Validation error */
|
|
170279
|
+
400: {
|
|
170280
|
+
headers: {
|
|
170281
|
+
[name: string]: unknown;
|
|
170282
|
+
};
|
|
170283
|
+
content: {
|
|
170284
|
+
"application/json": components["schemas"]["Error"];
|
|
170285
|
+
};
|
|
170286
|
+
};
|
|
170287
|
+
/** @description Unauthorized */
|
|
170288
|
+
401: {
|
|
170289
|
+
headers: {
|
|
170290
|
+
[name: string]: unknown;
|
|
170291
|
+
};
|
|
170292
|
+
content: {
|
|
170293
|
+
"application/json": components["schemas"]["Error"];
|
|
170294
|
+
};
|
|
170295
|
+
};
|
|
170296
|
+
/** @description Forbidden */
|
|
170297
|
+
403: {
|
|
170298
|
+
headers: {
|
|
170299
|
+
[name: string]: unknown;
|
|
170300
|
+
};
|
|
170301
|
+
content: {
|
|
170302
|
+
"application/json": components["schemas"]["Error"];
|
|
170303
|
+
};
|
|
170304
|
+
};
|
|
170305
|
+
/** @description Not found */
|
|
170306
|
+
404: {
|
|
170307
|
+
headers: {
|
|
170308
|
+
[name: string]: unknown;
|
|
170309
|
+
};
|
|
170310
|
+
content: {
|
|
170311
|
+
"application/json": components["schemas"]["Error"];
|
|
170312
|
+
};
|
|
170313
|
+
};
|
|
170314
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
170315
|
+
409: {
|
|
170316
|
+
headers: {
|
|
170317
|
+
[name: string]: unknown;
|
|
170318
|
+
};
|
|
170319
|
+
content: {
|
|
170320
|
+
"application/json": components["schemas"]["Error"];
|
|
170321
|
+
};
|
|
170322
|
+
};
|
|
170323
|
+
/** @description Rate limited */
|
|
170324
|
+
429: {
|
|
170325
|
+
headers: {
|
|
170326
|
+
[name: string]: unknown;
|
|
170327
|
+
};
|
|
170328
|
+
content: {
|
|
170329
|
+
"application/json": components["schemas"]["Error"];
|
|
170330
|
+
};
|
|
170331
|
+
};
|
|
170332
|
+
};
|
|
170333
|
+
};
|
|
170334
|
+
trace?: never;
|
|
170335
|
+
};
|
|
170336
|
+
"/units/{id}/release-fields": {
|
|
170337
|
+
parameters: {
|
|
170338
|
+
query?: never;
|
|
170339
|
+
header?: never;
|
|
170340
|
+
path?: never;
|
|
170341
|
+
cookie?: never;
|
|
170342
|
+
};
|
|
170343
|
+
get?: never;
|
|
170344
|
+
put?: never;
|
|
170345
|
+
/**
|
|
170346
|
+
* Let a unidad’s protected fields follow the import again
|
|
170347
|
+
* @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`.
|
|
170348
|
+
*/
|
|
170349
|
+
post: {
|
|
170350
|
+
parameters: {
|
|
170351
|
+
query?: never;
|
|
170352
|
+
header?: {
|
|
170353
|
+
/** @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. */
|
|
170354
|
+
"Idempotency-Key"?: string;
|
|
170355
|
+
};
|
|
170356
|
+
path: {
|
|
170357
|
+
/** @description The unidad’s uuid or its display id (`I-12`). */
|
|
170358
|
+
id: string;
|
|
170359
|
+
};
|
|
170360
|
+
cookie?: never;
|
|
170361
|
+
};
|
|
170362
|
+
requestBody?: {
|
|
170363
|
+
content: {
|
|
170364
|
+
/**
|
|
170365
|
+
* @example {
|
|
170366
|
+
* "fields": [
|
|
170367
|
+
* "sale_price_amount"
|
|
170368
|
+
* ]
|
|
170369
|
+
* }
|
|
170370
|
+
*/
|
|
170371
|
+
"application/json": {
|
|
170372
|
+
/** @description Protected fields to hand back to the stock import, so the next import may overwrite them again. */
|
|
170373
|
+
fields: string[];
|
|
170374
|
+
};
|
|
170375
|
+
};
|
|
170376
|
+
};
|
|
170377
|
+
responses: {
|
|
170378
|
+
/** @description Released */
|
|
170379
|
+
200: {
|
|
170380
|
+
headers: {
|
|
170381
|
+
[name: string]: unknown;
|
|
170382
|
+
};
|
|
170383
|
+
content: {
|
|
170384
|
+
/**
|
|
170385
|
+
* @example {
|
|
170386
|
+
* "data": {
|
|
170387
|
+
* "id": "0199e3a0-0000-7000-8000-000000000401",
|
|
170388
|
+
* "tenant_id": "0199e3a0-0000-7000-8000-0000000000aa",
|
|
170389
|
+
* "display_id": "I-42",
|
|
170390
|
+
* "title": "Departamento 1203 · Parque Los Aromos",
|
|
170391
|
+
* "description": null,
|
|
170392
|
+
* "operation": "venta",
|
|
170393
|
+
* "property_type": "departamento",
|
|
170394
|
+
* "kind": "departamento",
|
|
170395
|
+
* "status": "disponible",
|
|
170396
|
+
* "region": "Metropolitana",
|
|
170397
|
+
* "comuna": "La Florida",
|
|
170398
|
+
* "sector": null,
|
|
170399
|
+
* "address": null,
|
|
170400
|
+
* "sale_price_amount": 3250.5,
|
|
170401
|
+
* "sale_price_currency": "UF",
|
|
170402
|
+
* "rent_price_amount": null,
|
|
170403
|
+
* "rent_price_currency": null,
|
|
170404
|
+
* "common_expenses_clp": null,
|
|
170405
|
+
* "property_tax_clp": null,
|
|
170406
|
+
* "bedrooms": 3,
|
|
170407
|
+
* "bathrooms": 2,
|
|
170408
|
+
* "usable_area_m2": 72.5,
|
|
170409
|
+
* "terrace_area_m2": 6,
|
|
170410
|
+
* "total_area_m2": 78.5,
|
|
170411
|
+
* "parking_spaces": null,
|
|
170412
|
+
* "storage_units": null,
|
|
170413
|
+
* "orientation": "nororiente",
|
|
170414
|
+
* "floor": 12,
|
|
170415
|
+
* "year_built": null,
|
|
170416
|
+
* "furnished": null,
|
|
170417
|
+
* "pets_allowed": null,
|
|
170418
|
+
* "photos": [],
|
|
170419
|
+
* "broker_user_id": null,
|
|
170420
|
+
* "owner_name": null,
|
|
170421
|
+
* "owner_phone": null,
|
|
170422
|
+
* "owner_email": null,
|
|
170423
|
+
* "source": "import",
|
|
170424
|
+
* "external_ref": null,
|
|
170425
|
+
* "protected_fields": [],
|
|
170426
|
+
* "project_id": "0199e3a0-0000-7000-8000-000000000101",
|
|
170427
|
+
* "unit_model_id": "0199e3a0-0000-7000-8000-000000000201",
|
|
170428
|
+
* "unit_number": "1203",
|
|
170429
|
+
* "hold_expires_at": null,
|
|
170430
|
+
* "created_by": null,
|
|
170431
|
+
* "created_at": "2026-10-20T12:00:00.000Z",
|
|
170432
|
+
* "updated_at": "2026-10-20T12:00:00.000Z",
|
|
170433
|
+
* "sale_price": {
|
|
170434
|
+
* "amount": 3250.5,
|
|
170435
|
+
* "currency": "UF",
|
|
170436
|
+
* "amount_clp": 128500000,
|
|
170437
|
+
* "amount_uf": 3250.5
|
|
170438
|
+
* },
|
|
170439
|
+
* "rent_price": null,
|
|
170440
|
+
* "project": {
|
|
170441
|
+
* "id": "0199e3a0-0000-7000-8000-000000000101",
|
|
170442
|
+
* "name": "Parque Los Aromos"
|
|
170443
|
+
* },
|
|
170444
|
+
* "unit_model": {
|
|
170445
|
+
* "id": "0199e3a0-0000-7000-8000-000000000201",
|
|
170446
|
+
* "name": "3D2B 78 m²"
|
|
170447
|
+
* }
|
|
170448
|
+
* }
|
|
170449
|
+
* }
|
|
170450
|
+
*/
|
|
170451
|
+
"application/json": {
|
|
170452
|
+
data: components["schemas"]["Unit"];
|
|
170453
|
+
};
|
|
170454
|
+
};
|
|
170455
|
+
};
|
|
170456
|
+
/** @description Validation error */
|
|
170457
|
+
400: {
|
|
170458
|
+
headers: {
|
|
170459
|
+
[name: string]: unknown;
|
|
170460
|
+
};
|
|
170461
|
+
content: {
|
|
170462
|
+
"application/json": components["schemas"]["Error"];
|
|
170463
|
+
};
|
|
170464
|
+
};
|
|
170465
|
+
/** @description Unauthorized */
|
|
170466
|
+
401: {
|
|
170467
|
+
headers: {
|
|
170468
|
+
[name: string]: unknown;
|
|
170469
|
+
};
|
|
170470
|
+
content: {
|
|
170471
|
+
"application/json": components["schemas"]["Error"];
|
|
170472
|
+
};
|
|
170473
|
+
};
|
|
170474
|
+
/** @description Forbidden */
|
|
170475
|
+
403: {
|
|
170476
|
+
headers: {
|
|
170477
|
+
[name: string]: unknown;
|
|
170478
|
+
};
|
|
170479
|
+
content: {
|
|
170480
|
+
"application/json": components["schemas"]["Error"];
|
|
170481
|
+
};
|
|
170482
|
+
};
|
|
170483
|
+
/** @description Not found */
|
|
170484
|
+
404: {
|
|
170485
|
+
headers: {
|
|
170486
|
+
[name: string]: unknown;
|
|
170487
|
+
};
|
|
170488
|
+
content: {
|
|
170489
|
+
"application/json": components["schemas"]["Error"];
|
|
170490
|
+
};
|
|
170491
|
+
};
|
|
170492
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
170493
|
+
409: {
|
|
170494
|
+
headers: {
|
|
170495
|
+
[name: string]: unknown;
|
|
170496
|
+
};
|
|
170497
|
+
content: {
|
|
170498
|
+
"application/json": components["schemas"]["Error"];
|
|
170499
|
+
};
|
|
170500
|
+
};
|
|
170501
|
+
/** @description Rate limited */
|
|
170502
|
+
429: {
|
|
170503
|
+
headers: {
|
|
170504
|
+
[name: string]: unknown;
|
|
170505
|
+
};
|
|
170506
|
+
content: {
|
|
170507
|
+
"application/json": components["schemas"]["Error"];
|
|
170508
|
+
};
|
|
170509
|
+
};
|
|
170510
|
+
};
|
|
170511
|
+
};
|
|
170512
|
+
delete?: never;
|
|
170513
|
+
options?: never;
|
|
170514
|
+
head?: never;
|
|
170515
|
+
patch?: never;
|
|
170516
|
+
trace?: never;
|
|
170517
|
+
};
|
|
169172
170518
|
"/orders": {
|
|
169173
170519
|
parameters: {
|
|
169174
170520
|
query?: never;
|
|
@@ -198053,10 +199399,10 @@ interface components {
|
|
|
198053
199399
|
*/
|
|
198054
199400
|
property_type: "departamento" | "casa" | "oficina" | "local_comercial" | "terreno" | "parcela" | "bodega" | "estacionamiento" | "industrial" | "otro";
|
|
198055
199401
|
/**
|
|
198056
|
-
* @description Estado
|
|
199402
|
+
* @description Estado: disponible | bloqueada | reservada | promesada | vendida | arrendada | pausada. `bloqueada` and `promesada` only occur on a proyecto unidad.
|
|
198057
199403
|
* @enum {string}
|
|
198058
199404
|
*/
|
|
198059
|
-
status: "disponible" | "reservada" | "vendida" | "arrendada" | "pausada";
|
|
199405
|
+
status: "disponible" | "bloqueada" | "reservada" | "promesada" | "vendida" | "arrendada" | "pausada";
|
|
198060
199406
|
region: string | null;
|
|
198061
199407
|
comuna: string | null;
|
|
198062
199408
|
sector: string | null;
|
|
@@ -198107,6 +199453,22 @@ interface components {
|
|
|
198107
199453
|
external_ref: string | null;
|
|
198108
199454
|
/** @description Fields a person edited on a sourced row; no sync overwrites them (ADR 0023). */
|
|
198109
199455
|
protected_fields: string[];
|
|
199456
|
+
/**
|
|
199457
|
+
* Format: uuid
|
|
199458
|
+
* @description The proyecto when the row is a unidad (Módulo Proyectos); null for a propiedad of the cartera.
|
|
199459
|
+
*/
|
|
199460
|
+
project_id: string | null;
|
|
199461
|
+
/**
|
|
199462
|
+
* Format: uuid
|
|
199463
|
+
* @description The unidad’s tipología, when it has one.
|
|
199464
|
+
*/
|
|
199465
|
+
unit_model_id: string | null;
|
|
199466
|
+
/** @description The unidad’s number (unidades only). */
|
|
199467
|
+
unit_number: string | null;
|
|
199468
|
+
/** @description Metros de terraza (unidades only). */
|
|
199469
|
+
terrace_area_m2: number | null;
|
|
199470
|
+
/** @description When a bloqueada unidad’s hold ends. */
|
|
199471
|
+
hold_expires_at: string | null;
|
|
198110
199472
|
created_by: string | null;
|
|
198111
199473
|
created_at: string;
|
|
198112
199474
|
updated_at: string;
|
|
@@ -198567,6 +199929,208 @@ interface components {
|
|
|
198567
199929
|
*/
|
|
198568
199930
|
tour_360_url?: string | null;
|
|
198569
199931
|
};
|
|
199932
|
+
Unit: components["schemas"]["Property"] & {
|
|
199933
|
+
/**
|
|
199934
|
+
* @description Estado: disponible | bloqueada | reservada | promesada | vendida | pausada (arrendada never occurs on a unidad).
|
|
199935
|
+
* @enum {string}
|
|
199936
|
+
*/
|
|
199937
|
+
status?: "disponible" | "bloqueada" | "reservada" | "promesada" | "vendida" | "arrendada" | "pausada";
|
|
199938
|
+
/** Format: uuid */
|
|
199939
|
+
project_id?: string;
|
|
199940
|
+
unit_number?: string;
|
|
199941
|
+
/**
|
|
199942
|
+
* @description departamento | casa | estacionamiento | bodega
|
|
199943
|
+
* @enum {string}
|
|
199944
|
+
*/
|
|
199945
|
+
kind: "departamento" | "casa" | "estacionamiento" | "bodega";
|
|
199946
|
+
project: {
|
|
199947
|
+
/** Format: uuid */
|
|
199948
|
+
id: string;
|
|
199949
|
+
name: string;
|
|
199950
|
+
};
|
|
199951
|
+
unit_model: {
|
|
199952
|
+
/** Format: uuid */
|
|
199953
|
+
id: string;
|
|
199954
|
+
name: string;
|
|
199955
|
+
} | null;
|
|
199956
|
+
};
|
|
199957
|
+
CreateUnitBody: {
|
|
199958
|
+
/** Format: uuid */
|
|
199959
|
+
project_id: string;
|
|
199960
|
+
/**
|
|
199961
|
+
* Format: uuid
|
|
199962
|
+
* @description A tipología of the SAME proyecto (`GET /unit-models`).
|
|
199963
|
+
*/
|
|
199964
|
+
unit_model_id?: string | null;
|
|
199965
|
+
/**
|
|
199966
|
+
* @description departamento | casa | estacionamiento | bodega
|
|
199967
|
+
* @enum {string}
|
|
199968
|
+
*/
|
|
199969
|
+
kind: "departamento" | "casa" | "estacionamiento" | "bodega";
|
|
199970
|
+
/** @description The unidad’s number as the inmobiliaria writes it (1203, E-12, B-4). Unique per proyecto and kind. */
|
|
199971
|
+
unit_number: string;
|
|
199972
|
+
/** @description Default «Departamento 1203 · Proyecto»; follows the number and kind until a person writes one. */
|
|
199973
|
+
title?: string;
|
|
199974
|
+
description?: string | null;
|
|
199975
|
+
/** @description Piso (negative: subterráneo). */
|
|
199976
|
+
floor?: number | null;
|
|
199977
|
+
/** @enum {string|null} */
|
|
199978
|
+
orientation?: "norte" | "sur" | "oriente" | "poniente" | "nororiente" | "norponiente" | "suroriente" | "surponiente" | null;
|
|
199979
|
+
bedrooms?: number | null;
|
|
199980
|
+
bathrooms?: number | null;
|
|
199981
|
+
/** @description Metros útiles. */
|
|
199982
|
+
usable_area_m2?: number | null;
|
|
199983
|
+
/** @description Metros de terraza. */
|
|
199984
|
+
terrace_area_m2?: number | null;
|
|
199985
|
+
/** @description Metros totales. */
|
|
199986
|
+
total_area_m2?: number | null;
|
|
199987
|
+
/** @description List price, in `sale_price_currency`. */
|
|
199988
|
+
sale_price_amount?: number | null;
|
|
199989
|
+
/** @enum {string|null} */
|
|
199990
|
+
sale_price_currency?: "UF" | "CLP" | null;
|
|
199991
|
+
/** @description Gastos comunes estimados, CLP/mes. */
|
|
199992
|
+
common_expenses_clp?: number | null;
|
|
199993
|
+
photos?: string[];
|
|
199994
|
+
};
|
|
199995
|
+
UnitImportColumns: {
|
|
199996
|
+
/** @enum {string} */
|
|
199997
|
+
format: "csv" | "xlsx" | "xls";
|
|
199998
|
+
sheet_name: string | null;
|
|
199999
|
+
/** @description The file’s column names. */
|
|
200000
|
+
header: string[];
|
|
200001
|
+
row_count: number;
|
|
200002
|
+
/** @description The first five rows, cell by cell in header order. */
|
|
200003
|
+
sample: string[][];
|
|
200004
|
+
/** @description Field → column we recognised by name. */
|
|
200005
|
+
suggested_mapping: {
|
|
200006
|
+
[key: string]: string;
|
|
200007
|
+
};
|
|
200008
|
+
/** @description Columns that look like a status (Estado…). Never imported: only the negocio moves a unidad’s status. */
|
|
200009
|
+
ignored_status_columns: string[];
|
|
200010
|
+
/** @description Every field a column can feed. */
|
|
200011
|
+
fields: {
|
|
200012
|
+
/** @enum {string} */
|
|
200013
|
+
key: "unit_number" | "kind" | "unit_model" | "floor" | "orientation" | "bedrooms" | "bathrooms" | "usable_area_m2" | "terrace_area_m2" | "total_area_m2" | "price_uf" | "description";
|
|
200014
|
+
label: string;
|
|
200015
|
+
required: boolean;
|
|
200016
|
+
description: string;
|
|
200017
|
+
}[];
|
|
200018
|
+
};
|
|
200019
|
+
UnitImportReport: {
|
|
200020
|
+
dry_run: boolean;
|
|
200021
|
+
/** Format: uuid */
|
|
200022
|
+
project_id: string;
|
|
200023
|
+
/** @description The mapping applied. */
|
|
200024
|
+
mapping: {
|
|
200025
|
+
[key: string]: string;
|
|
200026
|
+
};
|
|
200027
|
+
ignored_status_columns: string[];
|
|
200028
|
+
summary: {
|
|
200029
|
+
total_rows: number;
|
|
200030
|
+
create: number;
|
|
200031
|
+
update: number;
|
|
200032
|
+
unchanged: number;
|
|
200033
|
+
error: number;
|
|
200034
|
+
/** @description Live unidades of the proyecto the file does not mention. An import never removes a unidad. */
|
|
200035
|
+
not_in_file: number;
|
|
200036
|
+
};
|
|
200037
|
+
rows: {
|
|
200038
|
+
/** @description The row in the sheet (header = 1), as the spreadsheet shows it. */
|
|
200039
|
+
row_number: number;
|
|
200040
|
+
/**
|
|
200041
|
+
* @description What this row does (dry run) or did (commit).
|
|
200042
|
+
* @enum {string}
|
|
200043
|
+
*/
|
|
200044
|
+
action: "create" | "update" | "unchanged" | "error";
|
|
200045
|
+
unit_number: string | null;
|
|
200046
|
+
/**
|
|
200047
|
+
* @description departamento | casa | estacionamiento | bodega
|
|
200048
|
+
* @enum {string|null}
|
|
200049
|
+
*/
|
|
200050
|
+
kind: "departamento" | "casa" | "estacionamiento" | "bodega" | null;
|
|
200051
|
+
/** Format: uuid */
|
|
200052
|
+
unit_id: string | null;
|
|
200053
|
+
display_id: string | null;
|
|
200054
|
+
/** @description create: the fields the file sets; update: the fields it changes. */
|
|
200055
|
+
fields: string[];
|
|
200056
|
+
/** @description Fields the file would change but a person edited by hand: kept (release them with `POST /units/{id}/release-fields`). */
|
|
200057
|
+
protected_skipped: string[];
|
|
200058
|
+
/**
|
|
200059
|
+
* @description The status the unidad keeps (an import never changes it) or is born with.
|
|
200060
|
+
* @enum {string}
|
|
200061
|
+
*/
|
|
200062
|
+
status: "disponible" | "bloqueada" | "reservada" | "promesada" | "vendida" | "arrendada" | "pausada";
|
|
200063
|
+
errors: {
|
|
200064
|
+
field: string;
|
|
200065
|
+
message: string;
|
|
200066
|
+
}[];
|
|
200067
|
+
}[];
|
|
200068
|
+
};
|
|
200069
|
+
ImportUnitsBody: {
|
|
200070
|
+
/**
|
|
200071
|
+
* Format: uuid
|
|
200072
|
+
* @description The proyecto the unidades belong to.
|
|
200073
|
+
*/
|
|
200074
|
+
project_id: string;
|
|
200075
|
+
/** @description Multipart only: the .xlsx, .xls or .csv (first sheet with data; the first non-empty row is the header). */
|
|
200076
|
+
file?: unknown;
|
|
200077
|
+
/** @description JSON only, instead of a file: one object per unidad, keyed by column name (`{ "Número": "1203", "Piso": 12, "Tipología": "3D2B" }`). Map with `mapping`, or use field names as keys. */
|
|
200078
|
+
rows?: {
|
|
200079
|
+
[key: string]: string | number | boolean | null;
|
|
200080
|
+
}[];
|
|
200081
|
+
/** @description Field → column name of the file (the header `POST /units/import/columns` returns). A field left out (or null) is not imported. Omitted entirely: the suggested mapping. There is NO status field: an import never writes a unidad’s status. */
|
|
200082
|
+
mapping?: {
|
|
200083
|
+
[key: string]: string | null;
|
|
200084
|
+
};
|
|
200085
|
+
/**
|
|
200086
|
+
* @description The kind of a row with no kind (default departamento). Set `estacionamiento` to load a sheet of estacionamientos.
|
|
200087
|
+
* @enum {string}
|
|
200088
|
+
*/
|
|
200089
|
+
default_kind?: "departamento" | "casa" | "estacionamiento" | "bodega";
|
|
200090
|
+
/** @description Default TRUE: report what would happen and write nothing. Send false to write. */
|
|
200091
|
+
dry_run?: boolean;
|
|
200092
|
+
};
|
|
200093
|
+
UpdateUnitBody: {
|
|
200094
|
+
/**
|
|
200095
|
+
* Format: uuid
|
|
200096
|
+
* @description A tipología of the SAME proyecto (`GET /unit-models`).
|
|
200097
|
+
*/
|
|
200098
|
+
unit_model_id?: string | null;
|
|
200099
|
+
/**
|
|
200100
|
+
* @description departamento | casa | estacionamiento | bodega
|
|
200101
|
+
* @enum {string}
|
|
200102
|
+
*/
|
|
200103
|
+
kind?: "departamento" | "casa" | "estacionamiento" | "bodega";
|
|
200104
|
+
/** @description The unidad’s number as the inmobiliaria writes it (1203, E-12, B-4). Unique per proyecto and kind. */
|
|
200105
|
+
unit_number?: string;
|
|
200106
|
+
/** @description Default «Departamento 1203 · Proyecto»; follows the number and kind until a person writes one. */
|
|
200107
|
+
title?: string;
|
|
200108
|
+
description?: string | null;
|
|
200109
|
+
/** @description Piso (negative: subterráneo). */
|
|
200110
|
+
floor?: number | null;
|
|
200111
|
+
/** @enum {string|null} */
|
|
200112
|
+
orientation?: "norte" | "sur" | "oriente" | "poniente" | "nororiente" | "norponiente" | "suroriente" | "surponiente" | null;
|
|
200113
|
+
bedrooms?: number | null;
|
|
200114
|
+
bathrooms?: number | null;
|
|
200115
|
+
/** @description Metros útiles. */
|
|
200116
|
+
usable_area_m2?: number | null;
|
|
200117
|
+
/** @description Metros de terraza. */
|
|
200118
|
+
terrace_area_m2?: number | null;
|
|
200119
|
+
/** @description Metros totales. */
|
|
200120
|
+
total_area_m2?: number | null;
|
|
200121
|
+
/** @description List price, in `sale_price_currency`. */
|
|
200122
|
+
sale_price_amount?: number | null;
|
|
200123
|
+
/** @enum {string|null} */
|
|
200124
|
+
sale_price_currency?: "UF" | "CLP" | null;
|
|
200125
|
+
/** @description Gastos comunes estimados, CLP/mes. */
|
|
200126
|
+
common_expenses_clp?: number | null;
|
|
200127
|
+
photos?: string[];
|
|
200128
|
+
/**
|
|
200129
|
+
* @description A person may only pause a unidad and put it back: disponible ⇄ pausada, and only while no negocio holds it. Every other move is the negocio’s.
|
|
200130
|
+
* @enum {string}
|
|
200131
|
+
*/
|
|
200132
|
+
status?: "disponible" | "pausada";
|
|
200133
|
+
};
|
|
198570
200134
|
CommerceOrder: {
|
|
198571
200135
|
/** Format: uuid */
|
|
198572
200136
|
id: string;
|