@vitrina/api 17.86.0 → 17.87.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 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
  };
@@ -76929,7 +76959,7 @@ interface paths {
76929
76959
  };
76930
76960
  /**
76931
76961
  * 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 (America/Santiago), today when absent.
76962
+ * @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
76963
  *
76934
76964
  * **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
76965
  */
@@ -133381,7 +133411,7 @@ interface paths {
133381
133411
  };
133382
133412
  /**
133383
133413
  * 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.
133414
+ * @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
133415
  *
133386
133416
  * `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
133417
  *
@@ -133610,6 +133640,8 @@ interface paths {
133610
133640
  *
133611
133641
  * `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
133642
  *
133643
+ * `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.
133644
+ *
133613
133645
  * `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
133646
  */
133615
133647
  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
  };
@@ -76929,7 +76959,7 @@ interface paths {
76929
76959
  };
76930
76960
  /**
76931
76961
  * 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 (America/Santiago), today when absent.
76962
+ * @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
76963
  *
76934
76964
  * **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
76965
  */
@@ -133381,7 +133411,7 @@ interface paths {
133381
133411
  };
133382
133412
  /**
133383
133413
  * 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.
133414
+ * @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
133415
  *
133386
133416
  * `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
133417
  *
@@ -133610,6 +133640,8 @@ interface paths {
133610
133640
  *
133611
133641
  * `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
133642
  *
133643
+ * `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.
133644
+ *
133613
133645
  * `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
133646
  */
133615
133647
  put: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "17.86.0",
3
+ "version": "17.87.0",
4
4
  "description": "Typed TypeScript SDK for the Vitrina API pública — generated from the committed openapi.public.json (ADR 0106).",
5
5
  "type": "module",
6
6
  "license": "MIT",