@vitrina/api 17.86.0 → 17.88.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 +178 -9
- package/dist/index.d.ts +178 -9
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -17037,7 +17037,13 @@ interface paths {
|
|
|
17037
17037
|
* "voided_on": "2026-11-14",
|
|
17038
17038
|
* "reason": "annual_purchase_expired",
|
|
17039
17039
|
* "credited_clp": 0
|
|
17040
|
-
* }
|
|
17040
|
+
* },
|
|
17041
|
+
* "unavailableReason": null,
|
|
17042
|
+
* "paymentWays": [
|
|
17043
|
+
* "transfer",
|
|
17044
|
+
* "card"
|
|
17045
|
+
* ],
|
|
17046
|
+
* "pendingPurchase": null
|
|
17041
17047
|
* }
|
|
17042
17048
|
* }
|
|
17043
17049
|
* ],
|
|
@@ -17131,8 +17137,31 @@ interface paths {
|
|
|
17131
17137
|
voided_on: string;
|
|
17132
17138
|
/** @enum {string} */
|
|
17133
17139
|
reason: "annual_purchase_expired";
|
|
17140
|
+
/** @description Whole CLP that became Saldo a favor because of the void: what was paid on the cobro before it was voided plus transfers that named it afterwards and were not undone; 0 when nothing. A GROSS figure at the time of the void: it is NOT the available balance, because that saldo may since have been applied to another cobro. Never show it as «saldo disponible»: the current balance is `workspace.billing_credit_clp` on `GET /me` (owners and admins). */
|
|
17134
17141
|
credited_clp: number;
|
|
17135
17142
|
} | null;
|
|
17143
|
+
/**
|
|
17144
|
+
* @description Null when annual is offered self-serve. Otherwise why not (the same values and the same check as `GET /billing/clinic-plan`'s `price_options.annual_unavailable_reason`, and the purchase's 409 `annual_not_self_serve`): a quoted price, a price lock, an agency agreement or a negotiated contract, or `price_check_failed` when the facts could not be read. The other fields of `annual` are then reference arithmetic, never an offer.
|
|
17145
|
+
* @enum {string|null}
|
|
17146
|
+
*/
|
|
17147
|
+
unavailableReason: "quoted_price" | "price_lock" | "agency_agreement" | "negotiated_contract" | "price_check_failed" | null;
|
|
17148
|
+
/** @description The ways an annual purchase can be paid here, in the order to offer them (the plan read's `annual_payment_ways`): `transfer` first (the default), then `card` when a card, PAC or Oneclick is on file. */
|
|
17149
|
+
paymentWays: ("transfer" | "card")[];
|
|
17150
|
+
/** @description The first annual purchase awaiting payment, so the awaiting-transfer and partly-paid states survive a reload; null when none is out. */
|
|
17151
|
+
pendingPurchase: {
|
|
17152
|
+
/** @description The cobro (same as `purchaseInvoiceId`). */
|
|
17153
|
+
invoiceId: string;
|
|
17154
|
+
/** @description The cobro number (`INV-…-AF…`). */
|
|
17155
|
+
invoiceNumber: string;
|
|
17156
|
+
/** @description Net UF of the year, before IVA. */
|
|
17157
|
+
ufTotal: number | null;
|
|
17158
|
+
/** @description The cobro total, whole CLP. */
|
|
17159
|
+
clpTotal: number | null;
|
|
17160
|
+
/** @description Whole CLP already received on it (a partial transfer); 0 when none. */
|
|
17161
|
+
receivedClp: number;
|
|
17162
|
+
/** @description The Santiago day (`YYYY-MM-DD`) it is voided if still unpaid (the plan read's `purchase_expires_on`). */
|
|
17163
|
+
expiresOn: string | null;
|
|
17164
|
+
} | null;
|
|
17136
17165
|
};
|
|
17137
17166
|
/** @description The business types (`tenant.vertical`) this add-on is sold to. Omitted = every vertical. Read `offers` for the per-workspace answer. */
|
|
17138
17167
|
verticals?: string[];
|
|
@@ -38710,6 +38739,7 @@ interface paths {
|
|
|
38710
38739
|
voided_on: string;
|
|
38711
38740
|
/** @enum {string} */
|
|
38712
38741
|
reason: "annual_purchase_expired";
|
|
38742
|
+
/** @description Whole CLP that became Saldo a favor because of the void: what was paid on the cobro before it was voided plus transfers that named it afterwards and were not undone; 0 when nothing. A GROSS figure at the time of the void: it is NOT the available balance, because that saldo may since have been applied to another cobro. Never show it as «saldo disponible»: the current balance is `workspace.billing_credit_clp` on `GET /me` (owners and admins). */
|
|
38713
38743
|
credited_clp: number;
|
|
38714
38744
|
} | null;
|
|
38715
38745
|
};
|
|
@@ -44102,6 +44132,8 @@ interface paths {
|
|
|
44102
44132
|
*
|
|
44103
44133
|
* It also carries the unit it bought, the same as each row of the list: `vehicle` is `{ id, make, model, year, registration_number }` or `null`, and `vehicle_count` says how many units the document acquired (`vehicle` is the FIRST of them when there are several, and `null` exactly when the count is `0`).
|
|
44104
44134
|
*
|
|
44135
|
+
* Since vitrina-app#7723 it also carries what the «Modificar» form opens with: `acquisition` (the car’s cost under this note, with `invoice_includes_iva` and `amount_paid_clp`, or `null`) and `retentions` (the note’s live «Descuentos», each with `description` and `net_clp`).
|
|
44136
|
+
*
|
|
44105
44137
|
* A document belonging to another workspace is a 404, indistinguishable from one that does not exist.
|
|
44106
44138
|
*/
|
|
44107
44139
|
get: {
|
|
@@ -44151,7 +44183,42 @@ interface paths {
|
|
|
44151
44183
|
* "year": 2020,
|
|
44152
44184
|
* "registration_number": "KXPT21"
|
|
44153
44185
|
* },
|
|
44154
|
-
* "vehicle_count": 1
|
|
44186
|
+
* "vehicle_count": 1,
|
|
44187
|
+
* "acquisition": {
|
|
44188
|
+
* "id": "7b0e1c52-3a1f-4d8e-9c2a-5f6b7c8d9e01",
|
|
44189
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
44190
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
44191
|
+
* "kind": "compra",
|
|
44192
|
+
* "counterparty_contact_id": "22222222-0000-4000-8000-000000000003",
|
|
44193
|
+
* "acquired_on": "2026-09-12",
|
|
44194
|
+
* "purchase_note_id": "d5d5d5d5-0000-4000-8000-000000000001",
|
|
44195
|
+
* "consignment_contract_id": null,
|
|
44196
|
+
* "sale_note_id": null,
|
|
44197
|
+
* "net_clp": 6020000,
|
|
44198
|
+
* "tax_clp": null,
|
|
44199
|
+
* "tax_treatment": "no_gravado",
|
|
44200
|
+
* "borne_by": "automotora",
|
|
44201
|
+
* "generates_fiscal_credit": false,
|
|
44202
|
+
* "created_at": "2026-09-12T10:15:00.000Z",
|
|
44203
|
+
* "updated_at": "2026-09-12T10:15:00.000Z",
|
|
44204
|
+
* "invoice_includes_iva": false,
|
|
44205
|
+
* "amount_paid_clp": 6020000
|
|
44206
|
+
* },
|
|
44207
|
+
* "retentions": [
|
|
44208
|
+
* {
|
|
44209
|
+
* "id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f",
|
|
44210
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
44211
|
+
* "kind": "expense",
|
|
44212
|
+
* "description": "Multas",
|
|
44213
|
+
* "net_clp": 180000,
|
|
44214
|
+
* "tax_clp": null,
|
|
44215
|
+
* "tax_treatment": "no_gravado",
|
|
44216
|
+
* "incurred_on": "2026-09-12",
|
|
44217
|
+
* "purchase_note_id": "d5d5d5d5-0000-4000-8000-000000000001",
|
|
44218
|
+
* "retained": true,
|
|
44219
|
+
* "voided_at": null
|
|
44220
|
+
* }
|
|
44221
|
+
* ]
|
|
44155
44222
|
* }
|
|
44156
44223
|
* }
|
|
44157
44224
|
*/
|
|
@@ -44225,8 +44292,10 @@ interface paths {
|
|
|
44225
44292
|
options?: never;
|
|
44226
44293
|
head?: never;
|
|
44227
44294
|
/**
|
|
44228
|
-
*
|
|
44229
|
-
* @description
|
|
44295
|
+
* Modify a nota de compra
|
|
44296
|
+
* @description **Everything is editable until the note is voided** (vitrina-app#7723): seller, car, price, date, «Descuentos», forma de pago, observaciones and the «Compra con factura (incluye IVA)» tick. **The car’s cost follows in the same write**: the acquisition takes the new payout (price − Descuentos), the seller, the day and the tax split; `acquisition.retentions` replaces the Descuentos (the old cost lines are voided, never edited); `acquisition.vehicle_id` moves the cost and the Descuentos to another car (the old one is left without a cost). Send `invoice_includes_iva` on every save of the form. The answer is the note as `GET` returns it plus `previous` (what it said before); every change is also an audit-log row with who and when. Refusals (`error.details.code`): `purchase_note_voided` (409), `discounts_exceed_price` (400), `vehicle_has_documented_cost` (409), `vehicle_sold_by_other_seller` (409), `purchase_note_has_several_cars` (409, a legacy note that bought several cars: price, tick, car or Descuentos), `purchase_note_changed_meanwhile` (409).
|
|
44297
|
+
*
|
|
44298
|
+
* Corrects a LIVE document and **stamps it**: `corrected_at` and the acting principal are written onto the row, so a reader of the document can tell it has been changed since it was issued without joining an audit table. The folio and the status are never touched.
|
|
44230
44299
|
*
|
|
44231
44300
|
* **An ABSENT field is left alone; an explicit `null` CLEARS it.** On `tax_clp` that is the difference between "not recorded" and "no tax", which ADR 0058 §2 keeps apart — so correcting away an amount entered by mistake is expressible without being confused with zero.
|
|
44232
44301
|
*
|
|
@@ -44249,7 +44318,16 @@ interface paths {
|
|
|
44249
44318
|
content: {
|
|
44250
44319
|
/**
|
|
44251
44320
|
* @example {
|
|
44252
|
-
* "net_clp": 6150000
|
|
44321
|
+
* "net_clp": 6150000,
|
|
44322
|
+
* "invoice_includes_iva": false,
|
|
44323
|
+
* "acquisition": {
|
|
44324
|
+
* "retentions": [
|
|
44325
|
+
* {
|
|
44326
|
+
* "description": "Multas",
|
|
44327
|
+
* "net_clp": 180000
|
|
44328
|
+
* }
|
|
44329
|
+
* ]
|
|
44330
|
+
* }
|
|
44253
44331
|
* }
|
|
44254
44332
|
*/
|
|
44255
44333
|
"application/json": {
|
|
@@ -44274,6 +44352,30 @@ interface paths {
|
|
|
44274
44352
|
/** @enum {string} */
|
|
44275
44353
|
tax_treatment: "afecto" | "exento" | "no_gravado" | "pass_through";
|
|
44276
44354
|
}[];
|
|
44355
|
+
/** @description «Compra con factura (incluye IVA)». Mándalo en cada guardado del formulario. true: `net_clp` (o el precio actual si no viene) incluye IVA y se separa como al emitir. false: el precio completo es el costo, sin IVA aparte. Sin el campo, `net_clp` es el precio sin IVA y los campos de impuesto quedan como se indiquen. */
|
|
44356
|
+
invoice_includes_iva?: boolean;
|
|
44357
|
+
acquisition?: {
|
|
44358
|
+
/**
|
|
44359
|
+
* Format: uuid
|
|
44360
|
+
* @description Otro auto para la nota. Su costo y sus descuentos pasan a ese auto; el auto anterior queda sin costo de compra. Sin el campo, el auto no cambia.
|
|
44361
|
+
*/
|
|
44362
|
+
vehicle_id?: string;
|
|
44363
|
+
/** @description Los «Descuentos» pasan a ser exactamente esta lista (`[]` = ninguno). Sin el campo, no cambian. */
|
|
44364
|
+
retentions?: {
|
|
44365
|
+
/** @description Qué se descuenta («Multas», «Prenda», «Permiso de circulación»), hasta 200 caracteres. Se imprime en la nota de compra. */
|
|
44366
|
+
description?: string | null;
|
|
44367
|
+
/** Format: uuid */
|
|
44368
|
+
category_id?: string;
|
|
44369
|
+
net_clp: number;
|
|
44370
|
+
tax_clp?: number | null;
|
|
44371
|
+
/** @enum {string} */
|
|
44372
|
+
tax_treatment?: "afecto" | "exento" | "no_gravado" | "pass_through";
|
|
44373
|
+
incurred_on?: string | null;
|
|
44374
|
+
/** Format: uuid */
|
|
44375
|
+
supplier_contact_id?: string | null;
|
|
44376
|
+
document_ref?: string | null;
|
|
44377
|
+
}[];
|
|
44378
|
+
};
|
|
44277
44379
|
};
|
|
44278
44380
|
};
|
|
44279
44381
|
};
|
|
@@ -44306,7 +44408,57 @@ interface paths {
|
|
|
44306
44408
|
* "void_reason": null,
|
|
44307
44409
|
* "voided_by": null,
|
|
44308
44410
|
* "created_at": "2026-09-12T10:15:00.000Z",
|
|
44309
|
-
* "updated_at": "2026-09-12T10:15:00.000Z"
|
|
44411
|
+
* "updated_at": "2026-09-12T10:15:00.000Z",
|
|
44412
|
+
* "lines": [],
|
|
44413
|
+
* "vehicle": {
|
|
44414
|
+
* "id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
44415
|
+
* "make": "Mazda",
|
|
44416
|
+
* "model": "CX-5",
|
|
44417
|
+
* "year": 2020,
|
|
44418
|
+
* "registration_number": "KXPT21"
|
|
44419
|
+
* },
|
|
44420
|
+
* "vehicle_count": 1,
|
|
44421
|
+
* "acquisition": {
|
|
44422
|
+
* "id": "7b0e1c52-3a1f-4d8e-9c2a-5f6b7c8d9e01",
|
|
44423
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
44424
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
44425
|
+
* "kind": "compra",
|
|
44426
|
+
* "counterparty_contact_id": "22222222-0000-4000-8000-000000000003",
|
|
44427
|
+
* "acquired_on": "2026-09-12",
|
|
44428
|
+
* "purchase_note_id": "d5d5d5d5-0000-4000-8000-000000000001",
|
|
44429
|
+
* "consignment_contract_id": null,
|
|
44430
|
+
* "sale_note_id": null,
|
|
44431
|
+
* "net_clp": 5970000,
|
|
44432
|
+
* "tax_clp": null,
|
|
44433
|
+
* "tax_treatment": "no_gravado",
|
|
44434
|
+
* "borne_by": "automotora",
|
|
44435
|
+
* "generates_fiscal_credit": false,
|
|
44436
|
+
* "created_at": "2026-09-12T10:15:00.000Z",
|
|
44437
|
+
* "updated_at": "2026-09-12T10:15:00.000Z",
|
|
44438
|
+
* "invoice_includes_iva": false,
|
|
44439
|
+
* "amount_paid_clp": 5970000
|
|
44440
|
+
* },
|
|
44441
|
+
* "retentions": [
|
|
44442
|
+
* {
|
|
44443
|
+
* "id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f",
|
|
44444
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
44445
|
+
* "kind": "expense",
|
|
44446
|
+
* "description": "Multas",
|
|
44447
|
+
* "net_clp": 180000,
|
|
44448
|
+
* "tax_clp": null,
|
|
44449
|
+
* "tax_treatment": "no_gravado",
|
|
44450
|
+
* "incurred_on": "2026-09-12",
|
|
44451
|
+
* "purchase_note_id": "d5d5d5d5-0000-4000-8000-000000000001",
|
|
44452
|
+
* "retained": true,
|
|
44453
|
+
* "voided_at": null
|
|
44454
|
+
* }
|
|
44455
|
+
* ],
|
|
44456
|
+
* "previous": {
|
|
44457
|
+
* "net_clp": 6200000,
|
|
44458
|
+
* "tax_clp": null,
|
|
44459
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
44460
|
+
* "discounts_clp": 180000
|
|
44461
|
+
* }
|
|
44310
44462
|
* }
|
|
44311
44463
|
* }
|
|
44312
44464
|
*/
|
|
@@ -44488,6 +44640,8 @@ interface paths {
|
|
|
44488
44640
|
*
|
|
44489
44641
|
* The actor comes from the authenticated principal; a `voided_by` in the body is IGNORED rather than rejected — a self-declared actor is not an attestation. Voiding twice is a **409**: the first actor and reason stand.
|
|
44490
44642
|
*
|
|
44643
|
+
* **The car keeps its cost** (vitrina-app#7723): in the same transaction each car the note bought keeps the note’s total (payout + «Descuentos») as a plain Costo de compra, no longer linked to the note, and the Descuentos stop counting apart. That cost can then be corrected by typing it (`POST /vehicle-acquisitions`) or taken over by a new nota de compra. `void_outcome` says what happened per car, and `void_outcome.message` is ready to show as is. Voiding a voided note is a 409 `purchase_note_voided`.
|
|
44644
|
+
*
|
|
44491
44645
|
* Requires `purchase_notes:void`, which is a DIFFERENT authority from `purchase_notes:write` — holding the write scope does not permit a void.
|
|
44492
44646
|
*/
|
|
44493
44647
|
post: {
|
|
@@ -44543,7 +44697,20 @@ interface paths {
|
|
|
44543
44697
|
* "void_reason": "se anuló la compra: el vendedor desistió antes de firmar",
|
|
44544
44698
|
* "voided_by": "11111111-0000-4000-8000-000000000001",
|
|
44545
44699
|
* "created_at": "2026-09-12T10:15:00.000Z",
|
|
44546
|
-
* "updated_at": "2026-09-12T10:15:00.000Z"
|
|
44700
|
+
* "updated_at": "2026-09-12T10:15:00.000Z",
|
|
44701
|
+
* "lines": [],
|
|
44702
|
+
* "void_outcome": {
|
|
44703
|
+
* "vehicles": [
|
|
44704
|
+
* {
|
|
44705
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
44706
|
+
* "acquisition_id": "7b0e1c52-3a1f-4d8e-9c2a-5f6b7c8d9e01",
|
|
44707
|
+
* "purchase_cost_clp": 6200000,
|
|
44708
|
+
* "invoice_includes_iva": false,
|
|
44709
|
+
* "discounts_clp": 180000
|
|
44710
|
+
* }
|
|
44711
|
+
* ],
|
|
44712
|
+
* "message": "Anulaste la nota de compra P-9. El Mazda CX-5 2020 (KXPT21) conserva su costo de compra de $6.200.000 como costo escrito a mano: puedes corregirlo en la ficha del auto o registrar una nota de compra nueva. Los descuentos de la nota ($180.000) ya no se cuentan aparte: quedan dentro de ese costo."
|
|
44713
|
+
* }
|
|
44547
44714
|
* }
|
|
44548
44715
|
* }
|
|
44549
44716
|
*/
|
|
@@ -76929,7 +77096,7 @@ interface paths {
|
|
|
76929
77096
|
};
|
|
76930
77097
|
/**
|
|
76931
77098
|
* One clinic day's money: what came in, by caja
|
|
76932
|
-
* @description The one read behind Inicio's «La plata de hoy», the Caja tab and Cuadratura. `collected` is the day's cash; its `gift_cards_sold_clp` is the part that bought gift cards (cash in the drawer, income only when a card is used, so «Mi clínica en números» leaves it out); `shifts` splits Vitrina's payments by the caja they were stamped on, and `outside_shift` lists the ones no caja holds, each with its `reason` read against the shifts open when it was recorded (`no_open_caja`, `other_location`, `several_open`, `not_assigned`) and `counts_in_drawer` (cash: the only kind a count adds by hand; a card or transfer never reaches the cajón); `cash_clp` is the cash part of the line. BLIND COUNT: while a caja is open, a seat without `clinic_admin:write` gets `sees_drawer: false`, `in_drawer_clp: null` (top level and per shift) and an empty `by_instrument`; `collected` stays. `open_since` is when a caja still open was opened on an earlier day (a drawer left open overnight), else null. `date` is a clinic calendar day (
|
|
77099
|
+
* @description The one read behind Inicio's «La plata de hoy», the Caja tab and Cuadratura. `collected` is the day's cash; its `gift_cards_sold_clp` is the part that bought gift cards (cash in the drawer, income only when a card is used, so «Mi clínica en números» leaves it out); `shifts` splits Vitrina's payments by the caja they were stamped on, and `outside_shift` lists the ones no caja holds, each with its `reason` read against the shifts open when it was recorded (`no_open_caja`, `other_location`, `several_open`, `not_assigned`) and `counts_in_drawer` (cash: the only kind a count adds by hand; a card or transfer never reaches the cajón); `cash_clp` is the cash part of the line. BLIND COUNT: while a caja is open, a seat without `clinic_admin:write` gets `sees_drawer: false`, `in_drawer_clp: null` (top level and per shift) and an empty `by_instrument`; `collected` stays. `open_since` is when a caja still open was opened on an earlier day (a drawer left open overnight), else null. `date` is a clinic calendar day (the clinic clock: the workspace time zone), today when absent.
|
|
76933
77100
|
*
|
|
76934
77101
|
* **Connected apps:** every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, `"M.F. · #1001"` — unless the clinic allowed patient names, with RUT, phone and email masked in free text and `meta.patient_privacy` saying so. Clinical alerts (`flags`) are withheld in both modes, and a non-JSON body (an export, a file) is refused with `403 CONNECTED_APP_SENSITIVE_DATA`.
|
|
76935
77102
|
*/
|
|
@@ -133381,7 +133548,7 @@ interface paths {
|
|
|
133381
133548
|
};
|
|
133382
133549
|
/**
|
|
133383
133550
|
* The scheduling configuration
|
|
133384
|
-
* @description The workspace’s EFFECTIVE booking rules: timezone, weekly `business_hours` (raw) and `effective_business_hours` (what booking enforces), slot grid, buffer, lead time, horizon, staff capacity, hold TTL, reminder lead, and the `arrival_board_enabled` reception switch. Never null: a workspace that configured nothing gets the table defaults on the workspace clock. A clinic on Vitrina's own diary gets its professionals' working hours as `effective_business_hours` (`business_hours_source: "clinic_agenda"`) — the source its booking reads.
|
|
133551
|
+
* @description The workspace’s EFFECTIVE booking rules: timezone, weekly `business_hours` (raw) and `effective_business_hours` (what booking enforces), slot grid, buffer, lead time, horizon, staff capacity, hold TTL, reminder lead, and the `arrival_board_enabled` reception switch. Never null: a workspace that configured nothing gets the table defaults on the workspace clock. A clinic (`healthcare` workspace) always answers its clinic clock, the workspace time zone, as `timezone`. A clinic on Vitrina's own diary gets its professionals' working hours as `effective_business_hours` (`business_hours_source: "clinic_agenda"`) — the source its booking reads.
|
|
133385
133552
|
*
|
|
133386
133553
|
* `configured` is `true` only once a scheduling POLICY has been saved — a `PUT` carrying any field other than `arrival_board_enabled`. It is NOT "a stored row exists": saving `arrival_board_enabled` alone creates the row and leaves `configured: false` (default knobs, the agent's native `appointments` tools stay gated). It is the same flag `availability` reports.
|
|
133387
133554
|
*
|
|
@@ -133610,6 +133777,8 @@ interface paths {
|
|
|
133610
133777
|
*
|
|
133611
133778
|
* `business_hours` is a weekday map to a list of `["HH:MM", "HH:MM"]` ranges — a list, so a lunch break is two ranges on one day. It is REPLACED wholesale, and it is a different shape from the workspace `business_hours` used for SLA coverage; these are opening hours for booking, not the support clock.
|
|
133612
133779
|
*
|
|
133780
|
+
* `timezone` is ignored for a clinic (a `healthcare` workspace): its agenda runs on the clinic clock, which is the workspace time zone (General settings), so `GET` answers that zone whatever was sent. Other workspaces store it as the booking clock.
|
|
133781
|
+
*
|
|
133613
133782
|
* `slot_minutes` is the grid step (also for a Reservo agenda once a policy is saved; without one, Reservo slots step by the service duration), `buffer_minutes` the gap kept between visits, `staff_capacity` how many can overlap at once, `vehicle_exclusive` whether one car can be on only one active visit at a time (default false: several customers may book the same car at the same hour), `owner_capacity` how many appointments one professional / executive may carry at the same time (default 1). Changing them affects future availability only — appointments already booked are never re-validated or evicted.
|
|
133614
133783
|
*/
|
|
133615
133784
|
put: {
|
package/dist/index.d.ts
CHANGED
|
@@ -17037,7 +17037,13 @@ interface paths {
|
|
|
17037
17037
|
* "voided_on": "2026-11-14",
|
|
17038
17038
|
* "reason": "annual_purchase_expired",
|
|
17039
17039
|
* "credited_clp": 0
|
|
17040
|
-
* }
|
|
17040
|
+
* },
|
|
17041
|
+
* "unavailableReason": null,
|
|
17042
|
+
* "paymentWays": [
|
|
17043
|
+
* "transfer",
|
|
17044
|
+
* "card"
|
|
17045
|
+
* ],
|
|
17046
|
+
* "pendingPurchase": null
|
|
17041
17047
|
* }
|
|
17042
17048
|
* }
|
|
17043
17049
|
* ],
|
|
@@ -17131,8 +17137,31 @@ interface paths {
|
|
|
17131
17137
|
voided_on: string;
|
|
17132
17138
|
/** @enum {string} */
|
|
17133
17139
|
reason: "annual_purchase_expired";
|
|
17140
|
+
/** @description Whole CLP that became Saldo a favor because of the void: what was paid on the cobro before it was voided plus transfers that named it afterwards and were not undone; 0 when nothing. A GROSS figure at the time of the void: it is NOT the available balance, because that saldo may since have been applied to another cobro. Never show it as «saldo disponible»: the current balance is `workspace.billing_credit_clp` on `GET /me` (owners and admins). */
|
|
17134
17141
|
credited_clp: number;
|
|
17135
17142
|
} | null;
|
|
17143
|
+
/**
|
|
17144
|
+
* @description Null when annual is offered self-serve. Otherwise why not (the same values and the same check as `GET /billing/clinic-plan`'s `price_options.annual_unavailable_reason`, and the purchase's 409 `annual_not_self_serve`): a quoted price, a price lock, an agency agreement or a negotiated contract, or `price_check_failed` when the facts could not be read. The other fields of `annual` are then reference arithmetic, never an offer.
|
|
17145
|
+
* @enum {string|null}
|
|
17146
|
+
*/
|
|
17147
|
+
unavailableReason: "quoted_price" | "price_lock" | "agency_agreement" | "negotiated_contract" | "price_check_failed" | null;
|
|
17148
|
+
/** @description The ways an annual purchase can be paid here, in the order to offer them (the plan read's `annual_payment_ways`): `transfer` first (the default), then `card` when a card, PAC or Oneclick is on file. */
|
|
17149
|
+
paymentWays: ("transfer" | "card")[];
|
|
17150
|
+
/** @description The first annual purchase awaiting payment, so the awaiting-transfer and partly-paid states survive a reload; null when none is out. */
|
|
17151
|
+
pendingPurchase: {
|
|
17152
|
+
/** @description The cobro (same as `purchaseInvoiceId`). */
|
|
17153
|
+
invoiceId: string;
|
|
17154
|
+
/** @description The cobro number (`INV-…-AF…`). */
|
|
17155
|
+
invoiceNumber: string;
|
|
17156
|
+
/** @description Net UF of the year, before IVA. */
|
|
17157
|
+
ufTotal: number | null;
|
|
17158
|
+
/** @description The cobro total, whole CLP. */
|
|
17159
|
+
clpTotal: number | null;
|
|
17160
|
+
/** @description Whole CLP already received on it (a partial transfer); 0 when none. */
|
|
17161
|
+
receivedClp: number;
|
|
17162
|
+
/** @description The Santiago day (`YYYY-MM-DD`) it is voided if still unpaid (the plan read's `purchase_expires_on`). */
|
|
17163
|
+
expiresOn: string | null;
|
|
17164
|
+
} | null;
|
|
17136
17165
|
};
|
|
17137
17166
|
/** @description The business types (`tenant.vertical`) this add-on is sold to. Omitted = every vertical. Read `offers` for the per-workspace answer. */
|
|
17138
17167
|
verticals?: string[];
|
|
@@ -38710,6 +38739,7 @@ interface paths {
|
|
|
38710
38739
|
voided_on: string;
|
|
38711
38740
|
/** @enum {string} */
|
|
38712
38741
|
reason: "annual_purchase_expired";
|
|
38742
|
+
/** @description Whole CLP that became Saldo a favor because of the void: what was paid on the cobro before it was voided plus transfers that named it afterwards and were not undone; 0 when nothing. A GROSS figure at the time of the void: it is NOT the available balance, because that saldo may since have been applied to another cobro. Never show it as «saldo disponible»: the current balance is `workspace.billing_credit_clp` on `GET /me` (owners and admins). */
|
|
38713
38743
|
credited_clp: number;
|
|
38714
38744
|
} | null;
|
|
38715
38745
|
};
|
|
@@ -44102,6 +44132,8 @@ interface paths {
|
|
|
44102
44132
|
*
|
|
44103
44133
|
* It also carries the unit it bought, the same as each row of the list: `vehicle` is `{ id, make, model, year, registration_number }` or `null`, and `vehicle_count` says how many units the document acquired (`vehicle` is the FIRST of them when there are several, and `null` exactly when the count is `0`).
|
|
44104
44134
|
*
|
|
44135
|
+
* Since vitrina-app#7723 it also carries what the «Modificar» form opens with: `acquisition` (the car’s cost under this note, with `invoice_includes_iva` and `amount_paid_clp`, or `null`) and `retentions` (the note’s live «Descuentos», each with `description` and `net_clp`).
|
|
44136
|
+
*
|
|
44105
44137
|
* A document belonging to another workspace is a 404, indistinguishable from one that does not exist.
|
|
44106
44138
|
*/
|
|
44107
44139
|
get: {
|
|
@@ -44151,7 +44183,42 @@ interface paths {
|
|
|
44151
44183
|
* "year": 2020,
|
|
44152
44184
|
* "registration_number": "KXPT21"
|
|
44153
44185
|
* },
|
|
44154
|
-
* "vehicle_count": 1
|
|
44186
|
+
* "vehicle_count": 1,
|
|
44187
|
+
* "acquisition": {
|
|
44188
|
+
* "id": "7b0e1c52-3a1f-4d8e-9c2a-5f6b7c8d9e01",
|
|
44189
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
44190
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
44191
|
+
* "kind": "compra",
|
|
44192
|
+
* "counterparty_contact_id": "22222222-0000-4000-8000-000000000003",
|
|
44193
|
+
* "acquired_on": "2026-09-12",
|
|
44194
|
+
* "purchase_note_id": "d5d5d5d5-0000-4000-8000-000000000001",
|
|
44195
|
+
* "consignment_contract_id": null,
|
|
44196
|
+
* "sale_note_id": null,
|
|
44197
|
+
* "net_clp": 6020000,
|
|
44198
|
+
* "tax_clp": null,
|
|
44199
|
+
* "tax_treatment": "no_gravado",
|
|
44200
|
+
* "borne_by": "automotora",
|
|
44201
|
+
* "generates_fiscal_credit": false,
|
|
44202
|
+
* "created_at": "2026-09-12T10:15:00.000Z",
|
|
44203
|
+
* "updated_at": "2026-09-12T10:15:00.000Z",
|
|
44204
|
+
* "invoice_includes_iva": false,
|
|
44205
|
+
* "amount_paid_clp": 6020000
|
|
44206
|
+
* },
|
|
44207
|
+
* "retentions": [
|
|
44208
|
+
* {
|
|
44209
|
+
* "id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f",
|
|
44210
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
44211
|
+
* "kind": "expense",
|
|
44212
|
+
* "description": "Multas",
|
|
44213
|
+
* "net_clp": 180000,
|
|
44214
|
+
* "tax_clp": null,
|
|
44215
|
+
* "tax_treatment": "no_gravado",
|
|
44216
|
+
* "incurred_on": "2026-09-12",
|
|
44217
|
+
* "purchase_note_id": "d5d5d5d5-0000-4000-8000-000000000001",
|
|
44218
|
+
* "retained": true,
|
|
44219
|
+
* "voided_at": null
|
|
44220
|
+
* }
|
|
44221
|
+
* ]
|
|
44155
44222
|
* }
|
|
44156
44223
|
* }
|
|
44157
44224
|
*/
|
|
@@ -44225,8 +44292,10 @@ interface paths {
|
|
|
44225
44292
|
options?: never;
|
|
44226
44293
|
head?: never;
|
|
44227
44294
|
/**
|
|
44228
|
-
*
|
|
44229
|
-
* @description
|
|
44295
|
+
* Modify a nota de compra
|
|
44296
|
+
* @description **Everything is editable until the note is voided** (vitrina-app#7723): seller, car, price, date, «Descuentos», forma de pago, observaciones and the «Compra con factura (incluye IVA)» tick. **The car’s cost follows in the same write**: the acquisition takes the new payout (price − Descuentos), the seller, the day and the tax split; `acquisition.retentions` replaces the Descuentos (the old cost lines are voided, never edited); `acquisition.vehicle_id` moves the cost and the Descuentos to another car (the old one is left without a cost). Send `invoice_includes_iva` on every save of the form. The answer is the note as `GET` returns it plus `previous` (what it said before); every change is also an audit-log row with who and when. Refusals (`error.details.code`): `purchase_note_voided` (409), `discounts_exceed_price` (400), `vehicle_has_documented_cost` (409), `vehicle_sold_by_other_seller` (409), `purchase_note_has_several_cars` (409, a legacy note that bought several cars: price, tick, car or Descuentos), `purchase_note_changed_meanwhile` (409).
|
|
44297
|
+
*
|
|
44298
|
+
* Corrects a LIVE document and **stamps it**: `corrected_at` and the acting principal are written onto the row, so a reader of the document can tell it has been changed since it was issued without joining an audit table. The folio and the status are never touched.
|
|
44230
44299
|
*
|
|
44231
44300
|
* **An ABSENT field is left alone; an explicit `null` CLEARS it.** On `tax_clp` that is the difference between "not recorded" and "no tax", which ADR 0058 §2 keeps apart — so correcting away an amount entered by mistake is expressible without being confused with zero.
|
|
44232
44301
|
*
|
|
@@ -44249,7 +44318,16 @@ interface paths {
|
|
|
44249
44318
|
content: {
|
|
44250
44319
|
/**
|
|
44251
44320
|
* @example {
|
|
44252
|
-
* "net_clp": 6150000
|
|
44321
|
+
* "net_clp": 6150000,
|
|
44322
|
+
* "invoice_includes_iva": false,
|
|
44323
|
+
* "acquisition": {
|
|
44324
|
+
* "retentions": [
|
|
44325
|
+
* {
|
|
44326
|
+
* "description": "Multas",
|
|
44327
|
+
* "net_clp": 180000
|
|
44328
|
+
* }
|
|
44329
|
+
* ]
|
|
44330
|
+
* }
|
|
44253
44331
|
* }
|
|
44254
44332
|
*/
|
|
44255
44333
|
"application/json": {
|
|
@@ -44274,6 +44352,30 @@ interface paths {
|
|
|
44274
44352
|
/** @enum {string} */
|
|
44275
44353
|
tax_treatment: "afecto" | "exento" | "no_gravado" | "pass_through";
|
|
44276
44354
|
}[];
|
|
44355
|
+
/** @description «Compra con factura (incluye IVA)». Mándalo en cada guardado del formulario. true: `net_clp` (o el precio actual si no viene) incluye IVA y se separa como al emitir. false: el precio completo es el costo, sin IVA aparte. Sin el campo, `net_clp` es el precio sin IVA y los campos de impuesto quedan como se indiquen. */
|
|
44356
|
+
invoice_includes_iva?: boolean;
|
|
44357
|
+
acquisition?: {
|
|
44358
|
+
/**
|
|
44359
|
+
* Format: uuid
|
|
44360
|
+
* @description Otro auto para la nota. Su costo y sus descuentos pasan a ese auto; el auto anterior queda sin costo de compra. Sin el campo, el auto no cambia.
|
|
44361
|
+
*/
|
|
44362
|
+
vehicle_id?: string;
|
|
44363
|
+
/** @description Los «Descuentos» pasan a ser exactamente esta lista (`[]` = ninguno). Sin el campo, no cambian. */
|
|
44364
|
+
retentions?: {
|
|
44365
|
+
/** @description Qué se descuenta («Multas», «Prenda», «Permiso de circulación»), hasta 200 caracteres. Se imprime en la nota de compra. */
|
|
44366
|
+
description?: string | null;
|
|
44367
|
+
/** Format: uuid */
|
|
44368
|
+
category_id?: string;
|
|
44369
|
+
net_clp: number;
|
|
44370
|
+
tax_clp?: number | null;
|
|
44371
|
+
/** @enum {string} */
|
|
44372
|
+
tax_treatment?: "afecto" | "exento" | "no_gravado" | "pass_through";
|
|
44373
|
+
incurred_on?: string | null;
|
|
44374
|
+
/** Format: uuid */
|
|
44375
|
+
supplier_contact_id?: string | null;
|
|
44376
|
+
document_ref?: string | null;
|
|
44377
|
+
}[];
|
|
44378
|
+
};
|
|
44277
44379
|
};
|
|
44278
44380
|
};
|
|
44279
44381
|
};
|
|
@@ -44306,7 +44408,57 @@ interface paths {
|
|
|
44306
44408
|
* "void_reason": null,
|
|
44307
44409
|
* "voided_by": null,
|
|
44308
44410
|
* "created_at": "2026-09-12T10:15:00.000Z",
|
|
44309
|
-
* "updated_at": "2026-09-12T10:15:00.000Z"
|
|
44411
|
+
* "updated_at": "2026-09-12T10:15:00.000Z",
|
|
44412
|
+
* "lines": [],
|
|
44413
|
+
* "vehicle": {
|
|
44414
|
+
* "id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
44415
|
+
* "make": "Mazda",
|
|
44416
|
+
* "model": "CX-5",
|
|
44417
|
+
* "year": 2020,
|
|
44418
|
+
* "registration_number": "KXPT21"
|
|
44419
|
+
* },
|
|
44420
|
+
* "vehicle_count": 1,
|
|
44421
|
+
* "acquisition": {
|
|
44422
|
+
* "id": "7b0e1c52-3a1f-4d8e-9c2a-5f6b7c8d9e01",
|
|
44423
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
44424
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
44425
|
+
* "kind": "compra",
|
|
44426
|
+
* "counterparty_contact_id": "22222222-0000-4000-8000-000000000003",
|
|
44427
|
+
* "acquired_on": "2026-09-12",
|
|
44428
|
+
* "purchase_note_id": "d5d5d5d5-0000-4000-8000-000000000001",
|
|
44429
|
+
* "consignment_contract_id": null,
|
|
44430
|
+
* "sale_note_id": null,
|
|
44431
|
+
* "net_clp": 5970000,
|
|
44432
|
+
* "tax_clp": null,
|
|
44433
|
+
* "tax_treatment": "no_gravado",
|
|
44434
|
+
* "borne_by": "automotora",
|
|
44435
|
+
* "generates_fiscal_credit": false,
|
|
44436
|
+
* "created_at": "2026-09-12T10:15:00.000Z",
|
|
44437
|
+
* "updated_at": "2026-09-12T10:15:00.000Z",
|
|
44438
|
+
* "invoice_includes_iva": false,
|
|
44439
|
+
* "amount_paid_clp": 5970000
|
|
44440
|
+
* },
|
|
44441
|
+
* "retentions": [
|
|
44442
|
+
* {
|
|
44443
|
+
* "id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f",
|
|
44444
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
44445
|
+
* "kind": "expense",
|
|
44446
|
+
* "description": "Multas",
|
|
44447
|
+
* "net_clp": 180000,
|
|
44448
|
+
* "tax_clp": null,
|
|
44449
|
+
* "tax_treatment": "no_gravado",
|
|
44450
|
+
* "incurred_on": "2026-09-12",
|
|
44451
|
+
* "purchase_note_id": "d5d5d5d5-0000-4000-8000-000000000001",
|
|
44452
|
+
* "retained": true,
|
|
44453
|
+
* "voided_at": null
|
|
44454
|
+
* }
|
|
44455
|
+
* ],
|
|
44456
|
+
* "previous": {
|
|
44457
|
+
* "net_clp": 6200000,
|
|
44458
|
+
* "tax_clp": null,
|
|
44459
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
44460
|
+
* "discounts_clp": 180000
|
|
44461
|
+
* }
|
|
44310
44462
|
* }
|
|
44311
44463
|
* }
|
|
44312
44464
|
*/
|
|
@@ -44488,6 +44640,8 @@ interface paths {
|
|
|
44488
44640
|
*
|
|
44489
44641
|
* The actor comes from the authenticated principal; a `voided_by` in the body is IGNORED rather than rejected — a self-declared actor is not an attestation. Voiding twice is a **409**: the first actor and reason stand.
|
|
44490
44642
|
*
|
|
44643
|
+
* **The car keeps its cost** (vitrina-app#7723): in the same transaction each car the note bought keeps the note’s total (payout + «Descuentos») as a plain Costo de compra, no longer linked to the note, and the Descuentos stop counting apart. That cost can then be corrected by typing it (`POST /vehicle-acquisitions`) or taken over by a new nota de compra. `void_outcome` says what happened per car, and `void_outcome.message` is ready to show as is. Voiding a voided note is a 409 `purchase_note_voided`.
|
|
44644
|
+
*
|
|
44491
44645
|
* Requires `purchase_notes:void`, which is a DIFFERENT authority from `purchase_notes:write` — holding the write scope does not permit a void.
|
|
44492
44646
|
*/
|
|
44493
44647
|
post: {
|
|
@@ -44543,7 +44697,20 @@ interface paths {
|
|
|
44543
44697
|
* "void_reason": "se anuló la compra: el vendedor desistió antes de firmar",
|
|
44544
44698
|
* "voided_by": "11111111-0000-4000-8000-000000000001",
|
|
44545
44699
|
* "created_at": "2026-09-12T10:15:00.000Z",
|
|
44546
|
-
* "updated_at": "2026-09-12T10:15:00.000Z"
|
|
44700
|
+
* "updated_at": "2026-09-12T10:15:00.000Z",
|
|
44701
|
+
* "lines": [],
|
|
44702
|
+
* "void_outcome": {
|
|
44703
|
+
* "vehicles": [
|
|
44704
|
+
* {
|
|
44705
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
44706
|
+
* "acquisition_id": "7b0e1c52-3a1f-4d8e-9c2a-5f6b7c8d9e01",
|
|
44707
|
+
* "purchase_cost_clp": 6200000,
|
|
44708
|
+
* "invoice_includes_iva": false,
|
|
44709
|
+
* "discounts_clp": 180000
|
|
44710
|
+
* }
|
|
44711
|
+
* ],
|
|
44712
|
+
* "message": "Anulaste la nota de compra P-9. El Mazda CX-5 2020 (KXPT21) conserva su costo de compra de $6.200.000 como costo escrito a mano: puedes corregirlo en la ficha del auto o registrar una nota de compra nueva. Los descuentos de la nota ($180.000) ya no se cuentan aparte: quedan dentro de ese costo."
|
|
44713
|
+
* }
|
|
44547
44714
|
* }
|
|
44548
44715
|
* }
|
|
44549
44716
|
*/
|
|
@@ -76929,7 +77096,7 @@ interface paths {
|
|
|
76929
77096
|
};
|
|
76930
77097
|
/**
|
|
76931
77098
|
* One clinic day's money: what came in, by caja
|
|
76932
|
-
* @description The one read behind Inicio's «La plata de hoy», the Caja tab and Cuadratura. `collected` is the day's cash; its `gift_cards_sold_clp` is the part that bought gift cards (cash in the drawer, income only when a card is used, so «Mi clínica en números» leaves it out); `shifts` splits Vitrina's payments by the caja they were stamped on, and `outside_shift` lists the ones no caja holds, each with its `reason` read against the shifts open when it was recorded (`no_open_caja`, `other_location`, `several_open`, `not_assigned`) and `counts_in_drawer` (cash: the only kind a count adds by hand; a card or transfer never reaches the cajón); `cash_clp` is the cash part of the line. BLIND COUNT: while a caja is open, a seat without `clinic_admin:write` gets `sees_drawer: false`, `in_drawer_clp: null` (top level and per shift) and an empty `by_instrument`; `collected` stays. `open_since` is when a caja still open was opened on an earlier day (a drawer left open overnight), else null. `date` is a clinic calendar day (
|
|
77099
|
+
* @description The one read behind Inicio's «La plata de hoy», the Caja tab and Cuadratura. `collected` is the day's cash; its `gift_cards_sold_clp` is the part that bought gift cards (cash in the drawer, income only when a card is used, so «Mi clínica en números» leaves it out); `shifts` splits Vitrina's payments by the caja they were stamped on, and `outside_shift` lists the ones no caja holds, each with its `reason` read against the shifts open when it was recorded (`no_open_caja`, `other_location`, `several_open`, `not_assigned`) and `counts_in_drawer` (cash: the only kind a count adds by hand; a card or transfer never reaches the cajón); `cash_clp` is the cash part of the line. BLIND COUNT: while a caja is open, a seat without `clinic_admin:write` gets `sees_drawer: false`, `in_drawer_clp: null` (top level and per shift) and an empty `by_instrument`; `collected` stays. `open_since` is when a caja still open was opened on an earlier day (a drawer left open overnight), else null. `date` is a clinic calendar day (the clinic clock: the workspace time zone), today when absent.
|
|
76933
77100
|
*
|
|
76934
77101
|
* **Connected apps:** every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, `"M.F. · #1001"` — unless the clinic allowed patient names, with RUT, phone and email masked in free text and `meta.patient_privacy` saying so. Clinical alerts (`flags`) are withheld in both modes, and a non-JSON body (an export, a file) is refused with `403 CONNECTED_APP_SENSITIVE_DATA`.
|
|
76935
77102
|
*/
|
|
@@ -133381,7 +133548,7 @@ interface paths {
|
|
|
133381
133548
|
};
|
|
133382
133549
|
/**
|
|
133383
133550
|
* The scheduling configuration
|
|
133384
|
-
* @description The workspace’s EFFECTIVE booking rules: timezone, weekly `business_hours` (raw) and `effective_business_hours` (what booking enforces), slot grid, buffer, lead time, horizon, staff capacity, hold TTL, reminder lead, and the `arrival_board_enabled` reception switch. Never null: a workspace that configured nothing gets the table defaults on the workspace clock. A clinic on Vitrina's own diary gets its professionals' working hours as `effective_business_hours` (`business_hours_source: "clinic_agenda"`) — the source its booking reads.
|
|
133551
|
+
* @description The workspace’s EFFECTIVE booking rules: timezone, weekly `business_hours` (raw) and `effective_business_hours` (what booking enforces), slot grid, buffer, lead time, horizon, staff capacity, hold TTL, reminder lead, and the `arrival_board_enabled` reception switch. Never null: a workspace that configured nothing gets the table defaults on the workspace clock. A clinic (`healthcare` workspace) always answers its clinic clock, the workspace time zone, as `timezone`. A clinic on Vitrina's own diary gets its professionals' working hours as `effective_business_hours` (`business_hours_source: "clinic_agenda"`) — the source its booking reads.
|
|
133385
133552
|
*
|
|
133386
133553
|
* `configured` is `true` only once a scheduling POLICY has been saved — a `PUT` carrying any field other than `arrival_board_enabled`. It is NOT "a stored row exists": saving `arrival_board_enabled` alone creates the row and leaves `configured: false` (default knobs, the agent's native `appointments` tools stay gated). It is the same flag `availability` reports.
|
|
133387
133554
|
*
|
|
@@ -133610,6 +133777,8 @@ interface paths {
|
|
|
133610
133777
|
*
|
|
133611
133778
|
* `business_hours` is a weekday map to a list of `["HH:MM", "HH:MM"]` ranges — a list, so a lunch break is two ranges on one day. It is REPLACED wholesale, and it is a different shape from the workspace `business_hours` used for SLA coverage; these are opening hours for booking, not the support clock.
|
|
133612
133779
|
*
|
|
133780
|
+
* `timezone` is ignored for a clinic (a `healthcare` workspace): its agenda runs on the clinic clock, which is the workspace time zone (General settings), so `GET` answers that zone whatever was sent. Other workspaces store it as the booking clock.
|
|
133781
|
+
*
|
|
133613
133782
|
* `slot_minutes` is the grid step (also for a Reservo agenda once a policy is saved; without one, Reservo slots step by the service duration), `buffer_minutes` the gap kept between visits, `staff_capacity` how many can overlap at once, `vehicle_exclusive` whether one car can be on only one active visit at a time (default false: several customers may book the same car at the same hour), `owner_capacity` how many appointments one professional / executive may carry at the same time (default 1). Changing them affects future availability only — appointments already booked are never re-validated or evicted.
|
|
133614
133783
|
*/
|
|
133615
133784
|
put: {
|
package/package.json
CHANGED