@vitrina/api 17.72.1 → 17.76.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 +430 -0
- package/dist/index.d.ts +430 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -38383,6 +38383,7 @@ interface paths {
|
|
|
38383
38383
|
* "clp_year_estimate": 1133000,
|
|
38384
38384
|
* "covers_until": "2027-11-17"
|
|
38385
38385
|
* },
|
|
38386
|
+
* "annual_unavailable_reason": null,
|
|
38386
38387
|
* "uf_value": 39350,
|
|
38387
38388
|
* "uf_value_date": "2026-11-18"
|
|
38388
38389
|
* }
|
|
@@ -38423,6 +38424,8 @@ interface paths {
|
|
|
38423
38424
|
dunning_steps: string[];
|
|
38424
38425
|
pause_on_date: string | null;
|
|
38425
38426
|
band_rule: string;
|
|
38427
|
+
purchase_expires_on: string | null;
|
|
38428
|
+
annual_payment_ways: ("transfer" | "card")[];
|
|
38426
38429
|
/** @enum {string|null} */
|
|
38427
38430
|
billing_interval: "monthly" | "annual" | null;
|
|
38428
38431
|
paid_until: string | null;
|
|
@@ -38441,9 +38444,14 @@ interface paths {
|
|
|
38441
38444
|
clp_year_estimate: number | null;
|
|
38442
38445
|
covers_until: string;
|
|
38443
38446
|
};
|
|
38447
|
+
/** @enum {string|null} */
|
|
38448
|
+
annual_unavailable_reason: "quoted_price" | "price_lock" | "agency_agreement" | "negotiated_contract" | "price_check_failed" | null;
|
|
38444
38449
|
uf_value: number | null;
|
|
38445
38450
|
uf_value_date: string | null;
|
|
38446
38451
|
} | null;
|
|
38452
|
+
cancel_at_period_end: boolean;
|
|
38453
|
+
ends_on: string | null;
|
|
38454
|
+
plan_ended_at: string | null;
|
|
38447
38455
|
};
|
|
38448
38456
|
};
|
|
38449
38457
|
};
|
|
@@ -39552,6 +39560,7 @@ interface paths {
|
|
|
39552
39560
|
* "deed_version": null,
|
|
39553
39561
|
* "fee_schedule_version": null,
|
|
39554
39562
|
* "terms_version": null,
|
|
39563
|
+
* "document_family": null,
|
|
39555
39564
|
* "rendered_at": "2026-09-19T15:10:00.000Z",
|
|
39556
39565
|
* "rendered_by": "11111111-0000-4000-8000-000000000001",
|
|
39557
39566
|
* "supersedes_id": null
|
|
@@ -39597,6 +39606,7 @@ interface paths {
|
|
|
39597
39606
|
* "deed_version": null,
|
|
39598
39607
|
* "fee_schedule_version": null,
|
|
39599
39608
|
* "terms_version": null,
|
|
39609
|
+
* "document_family": null,
|
|
39600
39610
|
* "rendered_at": "2026-09-19T15:10:00.000Z",
|
|
39601
39611
|
* "rendered_by": "11111111-0000-4000-8000-000000000001",
|
|
39602
39612
|
* "supersedes_id": null
|
|
@@ -39809,6 +39819,282 @@ interface paths {
|
|
|
39809
39819
|
patch?: never;
|
|
39810
39820
|
trace?: never;
|
|
39811
39821
|
};
|
|
39822
|
+
"/sale-notes/{id}/declaracion-responsabilidad": {
|
|
39823
|
+
parameters: {
|
|
39824
|
+
query?: never;
|
|
39825
|
+
header?: never;
|
|
39826
|
+
path?: never;
|
|
39827
|
+
cookie?: never;
|
|
39828
|
+
};
|
|
39829
|
+
get?: never;
|
|
39830
|
+
put?: never;
|
|
39831
|
+
/**
|
|
39832
|
+
* Print and freeze the buyer’s declaración de responsabilidad
|
|
39833
|
+
* @description Produces the **declaración de responsabilidad** the buyer signs when taking the car, for a closed (approved) nota de venta, and freezes it as an immutable `rendered_document` (ADR 0057) with `document_family: "declaracion_responsabilidad"` and the template version it was worded with. One page, portrait A4, on the workspace’s document branding.
|
|
39834
|
+
*
|
|
39835
|
+
* The buyer declares that, from the purchase on, they answer for any damage to people or property from using the car (by them or anyone else) and for every traffic fine and toll charge, and that fines from before the purchase stay with the dealership. The plate stays registered to the seller until the transfer is inscribed; this is the dealership’s cover for that window.
|
|
39836
|
+
*
|
|
39837
|
+
* **The words are the dealership’s own:** the workspace’s `declaracion_responsabilidad` document template (Plantillas) — its default, else its only one, else the standard text (`declaracion-de-responsabilidad-estandar`). Withdrawing the template returns to the standard text. A re-print keeps the words of the declaración already issued.
|
|
39838
|
+
*
|
|
39839
|
+
* **It never asks for legal data.** It prints with whatever the sale has (buyer name, RUT, domicilio, phone and e-mail; the car’s make, model, year, colour, plate with its check digit, VIN) and leaves out what is missing — never a blank, never a placeholder, never a 409 for data.
|
|
39840
|
+
*
|
|
39841
|
+
* **Reachable only once the sale is closed (approved) and not voided:** a sale not yet closed is a **409** with `details.blocked_reason: sale_note_not_approved` («La venta V-12 todavía no está cerrada. Ciérrala para imprimir la declaración de responsabilidad.»), a voided one a **409** with `sale_note_voided`.
|
|
39842
|
+
*
|
|
39843
|
+
* **Re-printing is not a new document:** an unchanged note answers **200** with the same artefact, `frozen: true`. When the facts changed (say the buyer’s RUT was added) a **201** carries a NEW artefact whose `supersedes_id` names the previous one. Then `GET /sale-notes/{id}/declaracion-responsabilidad/pdf` serves the bytes.
|
|
39844
|
+
*/
|
|
39845
|
+
post: {
|
|
39846
|
+
parameters: {
|
|
39847
|
+
query?: never;
|
|
39848
|
+
header?: {
|
|
39849
|
+
/** @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. */
|
|
39850
|
+
"Idempotency-Key"?: string;
|
|
39851
|
+
};
|
|
39852
|
+
path: {
|
|
39853
|
+
id: string;
|
|
39854
|
+
};
|
|
39855
|
+
cookie?: never;
|
|
39856
|
+
};
|
|
39857
|
+
requestBody?: never;
|
|
39858
|
+
responses: {
|
|
39859
|
+
/** @description The frozen artefact, served unchanged */
|
|
39860
|
+
200: {
|
|
39861
|
+
headers: {
|
|
39862
|
+
[name: string]: unknown;
|
|
39863
|
+
};
|
|
39864
|
+
content: {
|
|
39865
|
+
/**
|
|
39866
|
+
* @example {
|
|
39867
|
+
* "data": {
|
|
39868
|
+
* "document": {
|
|
39869
|
+
* "id": "d5d5d5d5-0000-4000-8000-000000000002",
|
|
39870
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
39871
|
+
* "sale_note_id": "d4d4d4d4-0000-4000-8000-000000000001",
|
|
39872
|
+
* "purchase_note_id": null,
|
|
39873
|
+
* "consignment_contract_id": null,
|
|
39874
|
+
* "clinic_consent_id": null,
|
|
39875
|
+
* "storage_bucket": "rendered-documents",
|
|
39876
|
+
* "storage_key": "tenants/a1a1a1a1-0000-4000-8000-000000000001/documents/sale_note/d4d4d4d4-0000-4000-8000-000000000001/d5d5d5d5-0000-4000-8000-000000000002.pdf",
|
|
39877
|
+
* "mime": "application/pdf",
|
|
39878
|
+
* "byte_size": 31877,
|
|
39879
|
+
* "sha256": "4be1c0d2a3f4e5d6c7b8a9f0e1d2c3b4a5f6e7d8c9b0a1f2e3d4c5b6a7f8e9d0",
|
|
39880
|
+
* "template_version": "declaracion-de-responsabilidad-v1",
|
|
39881
|
+
* "deed_version": null,
|
|
39882
|
+
* "fee_schedule_version": null,
|
|
39883
|
+
* "terms_version": null,
|
|
39884
|
+
* "document_family": "declaracion_responsabilidad",
|
|
39885
|
+
* "rendered_at": "2026-11-19T15:10:00.000Z",
|
|
39886
|
+
* "rendered_by": "11111111-0000-4000-8000-000000000001",
|
|
39887
|
+
* "supersedes_id": null
|
|
39888
|
+
* },
|
|
39889
|
+
* "frozen": true,
|
|
39890
|
+
* "already_issued": true,
|
|
39891
|
+
* "template_version": "declaracion-de-responsabilidad-v1"
|
|
39892
|
+
* }
|
|
39893
|
+
* }
|
|
39894
|
+
*/
|
|
39895
|
+
"application/json": {
|
|
39896
|
+
data: components["schemas"]["DeclaracionResponsabilidadIssuance"];
|
|
39897
|
+
};
|
|
39898
|
+
};
|
|
39899
|
+
};
|
|
39900
|
+
/** @description The newly issued artefact */
|
|
39901
|
+
201: {
|
|
39902
|
+
headers: {
|
|
39903
|
+
[name: string]: unknown;
|
|
39904
|
+
};
|
|
39905
|
+
content: {
|
|
39906
|
+
/**
|
|
39907
|
+
* @example {
|
|
39908
|
+
* "data": {
|
|
39909
|
+
* "document": {
|
|
39910
|
+
* "id": "d5d5d5d5-0000-4000-8000-000000000002",
|
|
39911
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
39912
|
+
* "sale_note_id": "d4d4d4d4-0000-4000-8000-000000000001",
|
|
39913
|
+
* "purchase_note_id": null,
|
|
39914
|
+
* "consignment_contract_id": null,
|
|
39915
|
+
* "clinic_consent_id": null,
|
|
39916
|
+
* "storage_bucket": "rendered-documents",
|
|
39917
|
+
* "storage_key": "tenants/a1a1a1a1-0000-4000-8000-000000000001/documents/sale_note/d4d4d4d4-0000-4000-8000-000000000001/d5d5d5d5-0000-4000-8000-000000000002.pdf",
|
|
39918
|
+
* "mime": "application/pdf",
|
|
39919
|
+
* "byte_size": 31877,
|
|
39920
|
+
* "sha256": "4be1c0d2a3f4e5d6c7b8a9f0e1d2c3b4a5f6e7d8c9b0a1f2e3d4c5b6a7f8e9d0",
|
|
39921
|
+
* "template_version": "declaracion-de-responsabilidad-v1",
|
|
39922
|
+
* "deed_version": null,
|
|
39923
|
+
* "fee_schedule_version": null,
|
|
39924
|
+
* "terms_version": null,
|
|
39925
|
+
* "document_family": "declaracion_responsabilidad",
|
|
39926
|
+
* "rendered_at": "2026-11-19T15:10:00.000Z",
|
|
39927
|
+
* "rendered_by": "11111111-0000-4000-8000-000000000001",
|
|
39928
|
+
* "supersedes_id": null
|
|
39929
|
+
* },
|
|
39930
|
+
* "frozen": false,
|
|
39931
|
+
* "already_issued": false,
|
|
39932
|
+
* "template_version": "declaracion-de-responsabilidad-v1"
|
|
39933
|
+
* }
|
|
39934
|
+
* }
|
|
39935
|
+
*/
|
|
39936
|
+
"application/json": {
|
|
39937
|
+
data: components["schemas"]["DeclaracionResponsabilidadIssuance"];
|
|
39938
|
+
};
|
|
39939
|
+
};
|
|
39940
|
+
};
|
|
39941
|
+
/** @description Validation error */
|
|
39942
|
+
400: {
|
|
39943
|
+
headers: {
|
|
39944
|
+
[name: string]: unknown;
|
|
39945
|
+
};
|
|
39946
|
+
content: {
|
|
39947
|
+
"application/json": components["schemas"]["Error"];
|
|
39948
|
+
};
|
|
39949
|
+
};
|
|
39950
|
+
/** @description Unauthorized */
|
|
39951
|
+
401: {
|
|
39952
|
+
headers: {
|
|
39953
|
+
[name: string]: unknown;
|
|
39954
|
+
};
|
|
39955
|
+
content: {
|
|
39956
|
+
"application/json": components["schemas"]["Error"];
|
|
39957
|
+
};
|
|
39958
|
+
};
|
|
39959
|
+
/** @description Forbidden */
|
|
39960
|
+
403: {
|
|
39961
|
+
headers: {
|
|
39962
|
+
[name: string]: unknown;
|
|
39963
|
+
};
|
|
39964
|
+
content: {
|
|
39965
|
+
"application/json": components["schemas"]["Error"];
|
|
39966
|
+
};
|
|
39967
|
+
};
|
|
39968
|
+
/** @description Not found */
|
|
39969
|
+
404: {
|
|
39970
|
+
headers: {
|
|
39971
|
+
[name: string]: unknown;
|
|
39972
|
+
};
|
|
39973
|
+
content: {
|
|
39974
|
+
"application/json": components["schemas"]["Error"];
|
|
39975
|
+
};
|
|
39976
|
+
};
|
|
39977
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
39978
|
+
409: {
|
|
39979
|
+
headers: {
|
|
39980
|
+
[name: string]: unknown;
|
|
39981
|
+
};
|
|
39982
|
+
content: {
|
|
39983
|
+
"application/json": components["schemas"]["Error"];
|
|
39984
|
+
};
|
|
39985
|
+
};
|
|
39986
|
+
/** @description Rate limited */
|
|
39987
|
+
429: {
|
|
39988
|
+
headers: {
|
|
39989
|
+
[name: string]: unknown;
|
|
39990
|
+
};
|
|
39991
|
+
content: {
|
|
39992
|
+
"application/json": components["schemas"]["Error"];
|
|
39993
|
+
};
|
|
39994
|
+
};
|
|
39995
|
+
};
|
|
39996
|
+
};
|
|
39997
|
+
delete?: never;
|
|
39998
|
+
options?: never;
|
|
39999
|
+
head?: never;
|
|
40000
|
+
patch?: never;
|
|
40001
|
+
trace?: never;
|
|
40002
|
+
};
|
|
40003
|
+
"/sale-notes/{id}/declaracion-responsabilidad/pdf": {
|
|
40004
|
+
parameters: {
|
|
40005
|
+
query?: never;
|
|
40006
|
+
header?: never;
|
|
40007
|
+
path?: never;
|
|
40008
|
+
cookie?: never;
|
|
40009
|
+
};
|
|
40010
|
+
/**
|
|
40011
|
+
* Download the declaración de responsabilidad
|
|
40012
|
+
* @description The **stored bytes** of the current declaración, as `application/pdf` (inline), with its `sha256` re-verified against the row; it never re-renders. The `X-Template-Version` header names the words it carries. A voided note still serves the declaración it printed before the void. A **404** when none was printed yet — call `POST /sale-notes/{id}/declaracion-responsabilidad` first.
|
|
40013
|
+
*/
|
|
40014
|
+
get: {
|
|
40015
|
+
parameters: {
|
|
40016
|
+
query?: never;
|
|
40017
|
+
header?: never;
|
|
40018
|
+
path: {
|
|
40019
|
+
id: string;
|
|
40020
|
+
};
|
|
40021
|
+
cookie?: never;
|
|
40022
|
+
};
|
|
40023
|
+
requestBody?: never;
|
|
40024
|
+
responses: {
|
|
40025
|
+
/** @description The declaración, as stored */
|
|
40026
|
+
200: {
|
|
40027
|
+
headers: {
|
|
40028
|
+
[name: string]: unknown;
|
|
40029
|
+
};
|
|
40030
|
+
content: {
|
|
40031
|
+
"application/pdf": string;
|
|
40032
|
+
};
|
|
40033
|
+
};
|
|
40034
|
+
/** @description Validation error */
|
|
40035
|
+
400: {
|
|
40036
|
+
headers: {
|
|
40037
|
+
[name: string]: unknown;
|
|
40038
|
+
};
|
|
40039
|
+
content: {
|
|
40040
|
+
"application/json": components["schemas"]["Error"];
|
|
40041
|
+
};
|
|
40042
|
+
};
|
|
40043
|
+
/** @description Unauthorized */
|
|
40044
|
+
401: {
|
|
40045
|
+
headers: {
|
|
40046
|
+
[name: string]: unknown;
|
|
40047
|
+
};
|
|
40048
|
+
content: {
|
|
40049
|
+
"application/json": components["schemas"]["Error"];
|
|
40050
|
+
};
|
|
40051
|
+
};
|
|
40052
|
+
/** @description Forbidden */
|
|
40053
|
+
403: {
|
|
40054
|
+
headers: {
|
|
40055
|
+
[name: string]: unknown;
|
|
40056
|
+
};
|
|
40057
|
+
content: {
|
|
40058
|
+
"application/json": components["schemas"]["Error"];
|
|
40059
|
+
};
|
|
40060
|
+
};
|
|
40061
|
+
/** @description Not found */
|
|
40062
|
+
404: {
|
|
40063
|
+
headers: {
|
|
40064
|
+
[name: string]: unknown;
|
|
40065
|
+
};
|
|
40066
|
+
content: {
|
|
40067
|
+
"application/json": components["schemas"]["Error"];
|
|
40068
|
+
};
|
|
40069
|
+
};
|
|
40070
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
40071
|
+
409: {
|
|
40072
|
+
headers: {
|
|
40073
|
+
[name: string]: unknown;
|
|
40074
|
+
};
|
|
40075
|
+
content: {
|
|
40076
|
+
"application/json": components["schemas"]["Error"];
|
|
40077
|
+
};
|
|
40078
|
+
};
|
|
40079
|
+
/** @description Rate limited */
|
|
40080
|
+
429: {
|
|
40081
|
+
headers: {
|
|
40082
|
+
[name: string]: unknown;
|
|
40083
|
+
};
|
|
40084
|
+
content: {
|
|
40085
|
+
"application/json": components["schemas"]["Error"];
|
|
40086
|
+
};
|
|
40087
|
+
};
|
|
40088
|
+
};
|
|
40089
|
+
};
|
|
40090
|
+
put?: never;
|
|
40091
|
+
post?: never;
|
|
40092
|
+
delete?: never;
|
|
40093
|
+
options?: never;
|
|
40094
|
+
head?: never;
|
|
40095
|
+
patch?: never;
|
|
40096
|
+
trace?: never;
|
|
40097
|
+
};
|
|
39812
40098
|
"/sale-notes/{id}/registered-owner": {
|
|
39813
40099
|
parameters: {
|
|
39814
40100
|
query?: never;
|
|
@@ -295767,6 +296053,123 @@ interface paths {
|
|
|
295767
296053
|
patch?: never;
|
|
295768
296054
|
trace?: never;
|
|
295769
296055
|
};
|
|
296056
|
+
"/billing/invoices/{id}/pay-by-transfer": {
|
|
296057
|
+
parameters: {
|
|
296058
|
+
query?: never;
|
|
296059
|
+
header?: never;
|
|
296060
|
+
path?: never;
|
|
296061
|
+
cookie?: never;
|
|
296062
|
+
};
|
|
296063
|
+
get?: never;
|
|
296064
|
+
put?: never;
|
|
296065
|
+
/**
|
|
296066
|
+
* Pay an annual cobro by bank transfer instead of the card
|
|
296067
|
+
* @description Annual plans are paid once, by card or by bank transfer, whatever the workspace has on file. This moves one open annual cobro (`issued` or `past_due`, carrying the annual discount or a band difference) to transfer: nothing charges it automatically from now on (the owner can still pay it with `POST …/pay`), and it falls due at the end of the transfer term (3 Chile business days) when that is later than its current due date. The cobro page and its emails then print the account and the reference. Repeating it answers the cobro with `changed: false`. 409 `details.reason`: `not_annual_cobro` (a monthly cobro follows the workspace switch), `charge_in_flight`, `cobro_not_open`, `collection_running`. Requires `billing:write`.
|
|
296068
|
+
*/
|
|
296069
|
+
post: {
|
|
296070
|
+
parameters: {
|
|
296071
|
+
query?: never;
|
|
296072
|
+
header?: {
|
|
296073
|
+
/** @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. */
|
|
296074
|
+
"Idempotency-Key"?: string;
|
|
296075
|
+
};
|
|
296076
|
+
path: {
|
|
296077
|
+
id: string;
|
|
296078
|
+
};
|
|
296079
|
+
cookie?: never;
|
|
296080
|
+
};
|
|
296081
|
+
requestBody?: never;
|
|
296082
|
+
responses: {
|
|
296083
|
+
/** @description The cobro, now paid by transfer */
|
|
296084
|
+
200: {
|
|
296085
|
+
headers: {
|
|
296086
|
+
[name: string]: unknown;
|
|
296087
|
+
};
|
|
296088
|
+
content: {
|
|
296089
|
+
/**
|
|
296090
|
+
* @example {
|
|
296091
|
+
* "data": {
|
|
296092
|
+
* "invoice_id": "9a1bd325-3ab8-47e8-afe1-7b87c550b139",
|
|
296093
|
+
* "number": "INV-0a1b2c3d-A202611",
|
|
296094
|
+
* "pay_by_transfer_at": "2026-11-18T15:04:11.000Z",
|
|
296095
|
+
* "due_at": "2026-11-24T12:00:00.000Z",
|
|
296096
|
+
* "changed": true
|
|
296097
|
+
* }
|
|
296098
|
+
* }
|
|
296099
|
+
*/
|
|
296100
|
+
"application/json": {
|
|
296101
|
+
data: {
|
|
296102
|
+
invoice_id: string;
|
|
296103
|
+
number: string;
|
|
296104
|
+
pay_by_transfer_at: string | null;
|
|
296105
|
+
due_at: string | null;
|
|
296106
|
+
changed: boolean;
|
|
296107
|
+
};
|
|
296108
|
+
};
|
|
296109
|
+
};
|
|
296110
|
+
};
|
|
296111
|
+
/** @description Validation error */
|
|
296112
|
+
400: {
|
|
296113
|
+
headers: {
|
|
296114
|
+
[name: string]: unknown;
|
|
296115
|
+
};
|
|
296116
|
+
content: {
|
|
296117
|
+
"application/json": components["schemas"]["Error"];
|
|
296118
|
+
};
|
|
296119
|
+
};
|
|
296120
|
+
/** @description Unauthorized */
|
|
296121
|
+
401: {
|
|
296122
|
+
headers: {
|
|
296123
|
+
[name: string]: unknown;
|
|
296124
|
+
};
|
|
296125
|
+
content: {
|
|
296126
|
+
"application/json": components["schemas"]["Error"];
|
|
296127
|
+
};
|
|
296128
|
+
};
|
|
296129
|
+
/** @description Forbidden */
|
|
296130
|
+
403: {
|
|
296131
|
+
headers: {
|
|
296132
|
+
[name: string]: unknown;
|
|
296133
|
+
};
|
|
296134
|
+
content: {
|
|
296135
|
+
"application/json": components["schemas"]["Error"];
|
|
296136
|
+
};
|
|
296137
|
+
};
|
|
296138
|
+
/** @description Not found */
|
|
296139
|
+
404: {
|
|
296140
|
+
headers: {
|
|
296141
|
+
[name: string]: unknown;
|
|
296142
|
+
};
|
|
296143
|
+
content: {
|
|
296144
|
+
"application/json": components["schemas"]["Error"];
|
|
296145
|
+
};
|
|
296146
|
+
};
|
|
296147
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
296148
|
+
409: {
|
|
296149
|
+
headers: {
|
|
296150
|
+
[name: string]: unknown;
|
|
296151
|
+
};
|
|
296152
|
+
content: {
|
|
296153
|
+
"application/json": components["schemas"]["Error"];
|
|
296154
|
+
};
|
|
296155
|
+
};
|
|
296156
|
+
/** @description Rate limited */
|
|
296157
|
+
429: {
|
|
296158
|
+
headers: {
|
|
296159
|
+
[name: string]: unknown;
|
|
296160
|
+
};
|
|
296161
|
+
content: {
|
|
296162
|
+
"application/json": components["schemas"]["Error"];
|
|
296163
|
+
};
|
|
296164
|
+
};
|
|
296165
|
+
};
|
|
296166
|
+
};
|
|
296167
|
+
delete?: never;
|
|
296168
|
+
options?: never;
|
|
296169
|
+
head?: never;
|
|
296170
|
+
patch?: never;
|
|
296171
|
+
trace?: never;
|
|
296172
|
+
};
|
|
295770
296173
|
"/sandbox/clinic": {
|
|
295771
296174
|
parameters: {
|
|
295772
296175
|
query?: never;
|
|
@@ -316785,6 +317188,7 @@ interface paths {
|
|
|
316785
317188
|
* "vendor_active": true,
|
|
316786
317189
|
* "active": true,
|
|
316787
317190
|
* "agent_bookable": true,
|
|
317191
|
+
* "is_evaluation": true,
|
|
316788
317192
|
* "color": "#cccccc",
|
|
316789
317193
|
* "agenda_online": false,
|
|
316790
317194
|
* "overrides": [
|
|
@@ -316908,6 +317312,8 @@ interface paths {
|
|
|
316908
317312
|
duration_minutes?: number | null;
|
|
316909
317313
|
active?: boolean;
|
|
316910
317314
|
agent_bookable?: boolean;
|
|
317315
|
+
/** @description Is this motivo the evaluation visit? Absent = seeded from the name («Evaluación», «Diagnóstico», «Primera consulta»…). */
|
|
317316
|
+
is_evaluation?: boolean;
|
|
316911
317317
|
professionals?: {
|
|
316912
317318
|
/** Format: uuid */
|
|
316913
317319
|
professional_id: string;
|
|
@@ -316937,6 +317343,7 @@ interface paths {
|
|
|
316937
317343
|
* "vendor_active": true,
|
|
316938
317344
|
* "active": true,
|
|
316939
317345
|
* "agent_bookable": true,
|
|
317346
|
+
* "is_evaluation": true,
|
|
316940
317347
|
* "color": "#cccccc",
|
|
316941
317348
|
* "agenda_online": false,
|
|
316942
317349
|
* "overrides": [],
|
|
@@ -317322,6 +317729,8 @@ interface paths {
|
|
|
317322
317729
|
duration_minutes?: number;
|
|
317323
317730
|
active?: boolean;
|
|
317324
317731
|
agent_bookable?: boolean;
|
|
317732
|
+
/** @description Mark or unmark this motivo as the evaluation visit (mirrored and native motivos alike; never an override, a resync keeps it). */
|
|
317733
|
+
is_evaluation?: boolean;
|
|
317325
317734
|
reset?: ("duration_minutes" | "active" | "professionals")[];
|
|
317326
317735
|
};
|
|
317327
317736
|
};
|
|
@@ -317347,6 +317756,7 @@ interface paths {
|
|
|
317347
317756
|
* "vendor_active": true,
|
|
317348
317757
|
* "active": true,
|
|
317349
317758
|
* "agent_bookable": true,
|
|
317759
|
+
* "is_evaluation": true,
|
|
317350
317760
|
* "color": "#cccccc",
|
|
317351
317761
|
* "agenda_online": false,
|
|
317352
317762
|
* "overrides": [
|
|
@@ -317491,6 +317901,7 @@ interface paths {
|
|
|
317491
317901
|
* "vendor_active": true,
|
|
317492
317902
|
* "active": true,
|
|
317493
317903
|
* "agent_bookable": true,
|
|
317904
|
+
* "is_evaluation": true,
|
|
317494
317905
|
* "color": "#cccccc",
|
|
317495
317906
|
* "agenda_online": false,
|
|
317496
317907
|
* "overrides": [
|
|
@@ -317630,6 +318041,7 @@ interface paths {
|
|
|
317630
318041
|
* "vendor_active": true,
|
|
317631
318042
|
* "active": true,
|
|
317632
318043
|
* "agent_bookable": true,
|
|
318044
|
+
* "is_evaluation": true,
|
|
317633
318045
|
* "color": "#cccccc",
|
|
317634
318046
|
* "agenda_online": false,
|
|
317635
318047
|
* "overrides": [],
|
|
@@ -317788,6 +318200,7 @@ interface paths {
|
|
|
317788
318200
|
* "vendor_active": true,
|
|
317789
318201
|
* "active": true,
|
|
317790
318202
|
* "agent_bookable": true,
|
|
318203
|
+
* "is_evaluation": true,
|
|
317791
318204
|
* "color": "#cccccc",
|
|
317792
318205
|
* "agenda_online": false,
|
|
317793
318206
|
* "overrides": [],
|
|
@@ -317940,6 +318353,7 @@ interface paths {
|
|
|
317940
318353
|
* "vendor_active": true,
|
|
317941
318354
|
* "active": true,
|
|
317942
318355
|
* "agent_bookable": true,
|
|
318356
|
+
* "is_evaluation": true,
|
|
317943
318357
|
* "color": "#cccccc",
|
|
317944
318358
|
* "agenda_online": false,
|
|
317945
318359
|
* "overrides": [],
|
|
@@ -321854,6 +322268,13 @@ interface components {
|
|
|
321854
322268
|
/** @description The reference to write in a transfer comment («VT-7K2QM9»). */
|
|
321855
322269
|
reference: string | null;
|
|
321856
322270
|
due_at: string | null;
|
|
322271
|
+
/**
|
|
322272
|
+
* @description #7569: the kind of annual cobro (`annual_purchase`, `annual_renewal`, `annual_difference`); null for a monthly or usage cobro.
|
|
322273
|
+
* @enum {string|null}
|
|
322274
|
+
*/
|
|
322275
|
+
kind: "annual_purchase" | "annual_renewal" | "annual_difference" | null;
|
|
322276
|
+
/** @description #7569: the cobro total in whole CLP, IVA included. */
|
|
322277
|
+
clp_total: number | null;
|
|
321857
322278
|
} | null;
|
|
321858
322279
|
/** @description Set only when `pays_by` is `transfer`. */
|
|
321859
322280
|
transfer: {
|
|
@@ -322501,6 +322922,7 @@ interface components {
|
|
|
322501
322922
|
byte_size: number;
|
|
322502
322923
|
sha256: string;
|
|
322503
322924
|
template_version: string | null;
|
|
322925
|
+
document_family?: string | null;
|
|
322504
322926
|
rendered_at: string;
|
|
322505
322927
|
rendered_by: string | null;
|
|
322506
322928
|
/** Format: uuid */
|
|
@@ -322548,6 +322970,12 @@ interface components {
|
|
|
322548
322970
|
message: string;
|
|
322549
322971
|
} | null;
|
|
322550
322972
|
};
|
|
322973
|
+
DeclaracionResponsabilidadIssuance: {
|
|
322974
|
+
document: components["schemas"]["CompraventaArtefact"];
|
|
322975
|
+
frozen: boolean;
|
|
322976
|
+
already_issued: boolean;
|
|
322977
|
+
template_version: string;
|
|
322978
|
+
};
|
|
322551
322979
|
SaleNoteCorrection: {
|
|
322552
322980
|
/** @enum {string} */
|
|
322553
322981
|
outcome: "applied" | "pending_approval" | "unchanged";
|
|
@@ -339685,6 +340113,8 @@ interface components {
|
|
|
339685
340113
|
vendor_active: boolean;
|
|
339686
340114
|
active: boolean;
|
|
339687
340115
|
agent_bookable: boolean;
|
|
340116
|
+
/** @description Vitrina's own answer: this motivo is the evaluation visit (where a plan is diagnosed and quoted). Seeded from the name when the motivo is created or first synced, editable, never overwritten by a resync. The AI agent never books a second live evaluation for the same patient. */
|
|
340117
|
+
is_evaluation: boolean;
|
|
339688
340118
|
color: string | null;
|
|
339689
340119
|
agenda_online: boolean | null;
|
|
339690
340120
|
overrides: ("duration_minutes" | "active" | "professionals")[];
|
package/dist/index.d.ts
CHANGED
|
@@ -38383,6 +38383,7 @@ interface paths {
|
|
|
38383
38383
|
* "clp_year_estimate": 1133000,
|
|
38384
38384
|
* "covers_until": "2027-11-17"
|
|
38385
38385
|
* },
|
|
38386
|
+
* "annual_unavailable_reason": null,
|
|
38386
38387
|
* "uf_value": 39350,
|
|
38387
38388
|
* "uf_value_date": "2026-11-18"
|
|
38388
38389
|
* }
|
|
@@ -38423,6 +38424,8 @@ interface paths {
|
|
|
38423
38424
|
dunning_steps: string[];
|
|
38424
38425
|
pause_on_date: string | null;
|
|
38425
38426
|
band_rule: string;
|
|
38427
|
+
purchase_expires_on: string | null;
|
|
38428
|
+
annual_payment_ways: ("transfer" | "card")[];
|
|
38426
38429
|
/** @enum {string|null} */
|
|
38427
38430
|
billing_interval: "monthly" | "annual" | null;
|
|
38428
38431
|
paid_until: string | null;
|
|
@@ -38441,9 +38444,14 @@ interface paths {
|
|
|
38441
38444
|
clp_year_estimate: number | null;
|
|
38442
38445
|
covers_until: string;
|
|
38443
38446
|
};
|
|
38447
|
+
/** @enum {string|null} */
|
|
38448
|
+
annual_unavailable_reason: "quoted_price" | "price_lock" | "agency_agreement" | "negotiated_contract" | "price_check_failed" | null;
|
|
38444
38449
|
uf_value: number | null;
|
|
38445
38450
|
uf_value_date: string | null;
|
|
38446
38451
|
} | null;
|
|
38452
|
+
cancel_at_period_end: boolean;
|
|
38453
|
+
ends_on: string | null;
|
|
38454
|
+
plan_ended_at: string | null;
|
|
38447
38455
|
};
|
|
38448
38456
|
};
|
|
38449
38457
|
};
|
|
@@ -39552,6 +39560,7 @@ interface paths {
|
|
|
39552
39560
|
* "deed_version": null,
|
|
39553
39561
|
* "fee_schedule_version": null,
|
|
39554
39562
|
* "terms_version": null,
|
|
39563
|
+
* "document_family": null,
|
|
39555
39564
|
* "rendered_at": "2026-09-19T15:10:00.000Z",
|
|
39556
39565
|
* "rendered_by": "11111111-0000-4000-8000-000000000001",
|
|
39557
39566
|
* "supersedes_id": null
|
|
@@ -39597,6 +39606,7 @@ interface paths {
|
|
|
39597
39606
|
* "deed_version": null,
|
|
39598
39607
|
* "fee_schedule_version": null,
|
|
39599
39608
|
* "terms_version": null,
|
|
39609
|
+
* "document_family": null,
|
|
39600
39610
|
* "rendered_at": "2026-09-19T15:10:00.000Z",
|
|
39601
39611
|
* "rendered_by": "11111111-0000-4000-8000-000000000001",
|
|
39602
39612
|
* "supersedes_id": null
|
|
@@ -39809,6 +39819,282 @@ interface paths {
|
|
|
39809
39819
|
patch?: never;
|
|
39810
39820
|
trace?: never;
|
|
39811
39821
|
};
|
|
39822
|
+
"/sale-notes/{id}/declaracion-responsabilidad": {
|
|
39823
|
+
parameters: {
|
|
39824
|
+
query?: never;
|
|
39825
|
+
header?: never;
|
|
39826
|
+
path?: never;
|
|
39827
|
+
cookie?: never;
|
|
39828
|
+
};
|
|
39829
|
+
get?: never;
|
|
39830
|
+
put?: never;
|
|
39831
|
+
/**
|
|
39832
|
+
* Print and freeze the buyer’s declaración de responsabilidad
|
|
39833
|
+
* @description Produces the **declaración de responsabilidad** the buyer signs when taking the car, for a closed (approved) nota de venta, and freezes it as an immutable `rendered_document` (ADR 0057) with `document_family: "declaracion_responsabilidad"` and the template version it was worded with. One page, portrait A4, on the workspace’s document branding.
|
|
39834
|
+
*
|
|
39835
|
+
* The buyer declares that, from the purchase on, they answer for any damage to people or property from using the car (by them or anyone else) and for every traffic fine and toll charge, and that fines from before the purchase stay with the dealership. The plate stays registered to the seller until the transfer is inscribed; this is the dealership’s cover for that window.
|
|
39836
|
+
*
|
|
39837
|
+
* **The words are the dealership’s own:** the workspace’s `declaracion_responsabilidad` document template (Plantillas) — its default, else its only one, else the standard text (`declaracion-de-responsabilidad-estandar`). Withdrawing the template returns to the standard text. A re-print keeps the words of the declaración already issued.
|
|
39838
|
+
*
|
|
39839
|
+
* **It never asks for legal data.** It prints with whatever the sale has (buyer name, RUT, domicilio, phone and e-mail; the car’s make, model, year, colour, plate with its check digit, VIN) and leaves out what is missing — never a blank, never a placeholder, never a 409 for data.
|
|
39840
|
+
*
|
|
39841
|
+
* **Reachable only once the sale is closed (approved) and not voided:** a sale not yet closed is a **409** with `details.blocked_reason: sale_note_not_approved` («La venta V-12 todavía no está cerrada. Ciérrala para imprimir la declaración de responsabilidad.»), a voided one a **409** with `sale_note_voided`.
|
|
39842
|
+
*
|
|
39843
|
+
* **Re-printing is not a new document:** an unchanged note answers **200** with the same artefact, `frozen: true`. When the facts changed (say the buyer’s RUT was added) a **201** carries a NEW artefact whose `supersedes_id` names the previous one. Then `GET /sale-notes/{id}/declaracion-responsabilidad/pdf` serves the bytes.
|
|
39844
|
+
*/
|
|
39845
|
+
post: {
|
|
39846
|
+
parameters: {
|
|
39847
|
+
query?: never;
|
|
39848
|
+
header?: {
|
|
39849
|
+
/** @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. */
|
|
39850
|
+
"Idempotency-Key"?: string;
|
|
39851
|
+
};
|
|
39852
|
+
path: {
|
|
39853
|
+
id: string;
|
|
39854
|
+
};
|
|
39855
|
+
cookie?: never;
|
|
39856
|
+
};
|
|
39857
|
+
requestBody?: never;
|
|
39858
|
+
responses: {
|
|
39859
|
+
/** @description The frozen artefact, served unchanged */
|
|
39860
|
+
200: {
|
|
39861
|
+
headers: {
|
|
39862
|
+
[name: string]: unknown;
|
|
39863
|
+
};
|
|
39864
|
+
content: {
|
|
39865
|
+
/**
|
|
39866
|
+
* @example {
|
|
39867
|
+
* "data": {
|
|
39868
|
+
* "document": {
|
|
39869
|
+
* "id": "d5d5d5d5-0000-4000-8000-000000000002",
|
|
39870
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
39871
|
+
* "sale_note_id": "d4d4d4d4-0000-4000-8000-000000000001",
|
|
39872
|
+
* "purchase_note_id": null,
|
|
39873
|
+
* "consignment_contract_id": null,
|
|
39874
|
+
* "clinic_consent_id": null,
|
|
39875
|
+
* "storage_bucket": "rendered-documents",
|
|
39876
|
+
* "storage_key": "tenants/a1a1a1a1-0000-4000-8000-000000000001/documents/sale_note/d4d4d4d4-0000-4000-8000-000000000001/d5d5d5d5-0000-4000-8000-000000000002.pdf",
|
|
39877
|
+
* "mime": "application/pdf",
|
|
39878
|
+
* "byte_size": 31877,
|
|
39879
|
+
* "sha256": "4be1c0d2a3f4e5d6c7b8a9f0e1d2c3b4a5f6e7d8c9b0a1f2e3d4c5b6a7f8e9d0",
|
|
39880
|
+
* "template_version": "declaracion-de-responsabilidad-v1",
|
|
39881
|
+
* "deed_version": null,
|
|
39882
|
+
* "fee_schedule_version": null,
|
|
39883
|
+
* "terms_version": null,
|
|
39884
|
+
* "document_family": "declaracion_responsabilidad",
|
|
39885
|
+
* "rendered_at": "2026-11-19T15:10:00.000Z",
|
|
39886
|
+
* "rendered_by": "11111111-0000-4000-8000-000000000001",
|
|
39887
|
+
* "supersedes_id": null
|
|
39888
|
+
* },
|
|
39889
|
+
* "frozen": true,
|
|
39890
|
+
* "already_issued": true,
|
|
39891
|
+
* "template_version": "declaracion-de-responsabilidad-v1"
|
|
39892
|
+
* }
|
|
39893
|
+
* }
|
|
39894
|
+
*/
|
|
39895
|
+
"application/json": {
|
|
39896
|
+
data: components["schemas"]["DeclaracionResponsabilidadIssuance"];
|
|
39897
|
+
};
|
|
39898
|
+
};
|
|
39899
|
+
};
|
|
39900
|
+
/** @description The newly issued artefact */
|
|
39901
|
+
201: {
|
|
39902
|
+
headers: {
|
|
39903
|
+
[name: string]: unknown;
|
|
39904
|
+
};
|
|
39905
|
+
content: {
|
|
39906
|
+
/**
|
|
39907
|
+
* @example {
|
|
39908
|
+
* "data": {
|
|
39909
|
+
* "document": {
|
|
39910
|
+
* "id": "d5d5d5d5-0000-4000-8000-000000000002",
|
|
39911
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
39912
|
+
* "sale_note_id": "d4d4d4d4-0000-4000-8000-000000000001",
|
|
39913
|
+
* "purchase_note_id": null,
|
|
39914
|
+
* "consignment_contract_id": null,
|
|
39915
|
+
* "clinic_consent_id": null,
|
|
39916
|
+
* "storage_bucket": "rendered-documents",
|
|
39917
|
+
* "storage_key": "tenants/a1a1a1a1-0000-4000-8000-000000000001/documents/sale_note/d4d4d4d4-0000-4000-8000-000000000001/d5d5d5d5-0000-4000-8000-000000000002.pdf",
|
|
39918
|
+
* "mime": "application/pdf",
|
|
39919
|
+
* "byte_size": 31877,
|
|
39920
|
+
* "sha256": "4be1c0d2a3f4e5d6c7b8a9f0e1d2c3b4a5f6e7d8c9b0a1f2e3d4c5b6a7f8e9d0",
|
|
39921
|
+
* "template_version": "declaracion-de-responsabilidad-v1",
|
|
39922
|
+
* "deed_version": null,
|
|
39923
|
+
* "fee_schedule_version": null,
|
|
39924
|
+
* "terms_version": null,
|
|
39925
|
+
* "document_family": "declaracion_responsabilidad",
|
|
39926
|
+
* "rendered_at": "2026-11-19T15:10:00.000Z",
|
|
39927
|
+
* "rendered_by": "11111111-0000-4000-8000-000000000001",
|
|
39928
|
+
* "supersedes_id": null
|
|
39929
|
+
* },
|
|
39930
|
+
* "frozen": false,
|
|
39931
|
+
* "already_issued": false,
|
|
39932
|
+
* "template_version": "declaracion-de-responsabilidad-v1"
|
|
39933
|
+
* }
|
|
39934
|
+
* }
|
|
39935
|
+
*/
|
|
39936
|
+
"application/json": {
|
|
39937
|
+
data: components["schemas"]["DeclaracionResponsabilidadIssuance"];
|
|
39938
|
+
};
|
|
39939
|
+
};
|
|
39940
|
+
};
|
|
39941
|
+
/** @description Validation error */
|
|
39942
|
+
400: {
|
|
39943
|
+
headers: {
|
|
39944
|
+
[name: string]: unknown;
|
|
39945
|
+
};
|
|
39946
|
+
content: {
|
|
39947
|
+
"application/json": components["schemas"]["Error"];
|
|
39948
|
+
};
|
|
39949
|
+
};
|
|
39950
|
+
/** @description Unauthorized */
|
|
39951
|
+
401: {
|
|
39952
|
+
headers: {
|
|
39953
|
+
[name: string]: unknown;
|
|
39954
|
+
};
|
|
39955
|
+
content: {
|
|
39956
|
+
"application/json": components["schemas"]["Error"];
|
|
39957
|
+
};
|
|
39958
|
+
};
|
|
39959
|
+
/** @description Forbidden */
|
|
39960
|
+
403: {
|
|
39961
|
+
headers: {
|
|
39962
|
+
[name: string]: unknown;
|
|
39963
|
+
};
|
|
39964
|
+
content: {
|
|
39965
|
+
"application/json": components["schemas"]["Error"];
|
|
39966
|
+
};
|
|
39967
|
+
};
|
|
39968
|
+
/** @description Not found */
|
|
39969
|
+
404: {
|
|
39970
|
+
headers: {
|
|
39971
|
+
[name: string]: unknown;
|
|
39972
|
+
};
|
|
39973
|
+
content: {
|
|
39974
|
+
"application/json": components["schemas"]["Error"];
|
|
39975
|
+
};
|
|
39976
|
+
};
|
|
39977
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
39978
|
+
409: {
|
|
39979
|
+
headers: {
|
|
39980
|
+
[name: string]: unknown;
|
|
39981
|
+
};
|
|
39982
|
+
content: {
|
|
39983
|
+
"application/json": components["schemas"]["Error"];
|
|
39984
|
+
};
|
|
39985
|
+
};
|
|
39986
|
+
/** @description Rate limited */
|
|
39987
|
+
429: {
|
|
39988
|
+
headers: {
|
|
39989
|
+
[name: string]: unknown;
|
|
39990
|
+
};
|
|
39991
|
+
content: {
|
|
39992
|
+
"application/json": components["schemas"]["Error"];
|
|
39993
|
+
};
|
|
39994
|
+
};
|
|
39995
|
+
};
|
|
39996
|
+
};
|
|
39997
|
+
delete?: never;
|
|
39998
|
+
options?: never;
|
|
39999
|
+
head?: never;
|
|
40000
|
+
patch?: never;
|
|
40001
|
+
trace?: never;
|
|
40002
|
+
};
|
|
40003
|
+
"/sale-notes/{id}/declaracion-responsabilidad/pdf": {
|
|
40004
|
+
parameters: {
|
|
40005
|
+
query?: never;
|
|
40006
|
+
header?: never;
|
|
40007
|
+
path?: never;
|
|
40008
|
+
cookie?: never;
|
|
40009
|
+
};
|
|
40010
|
+
/**
|
|
40011
|
+
* Download the declaración de responsabilidad
|
|
40012
|
+
* @description The **stored bytes** of the current declaración, as `application/pdf` (inline), with its `sha256` re-verified against the row; it never re-renders. The `X-Template-Version` header names the words it carries. A voided note still serves the declaración it printed before the void. A **404** when none was printed yet — call `POST /sale-notes/{id}/declaracion-responsabilidad` first.
|
|
40013
|
+
*/
|
|
40014
|
+
get: {
|
|
40015
|
+
parameters: {
|
|
40016
|
+
query?: never;
|
|
40017
|
+
header?: never;
|
|
40018
|
+
path: {
|
|
40019
|
+
id: string;
|
|
40020
|
+
};
|
|
40021
|
+
cookie?: never;
|
|
40022
|
+
};
|
|
40023
|
+
requestBody?: never;
|
|
40024
|
+
responses: {
|
|
40025
|
+
/** @description The declaración, as stored */
|
|
40026
|
+
200: {
|
|
40027
|
+
headers: {
|
|
40028
|
+
[name: string]: unknown;
|
|
40029
|
+
};
|
|
40030
|
+
content: {
|
|
40031
|
+
"application/pdf": string;
|
|
40032
|
+
};
|
|
40033
|
+
};
|
|
40034
|
+
/** @description Validation error */
|
|
40035
|
+
400: {
|
|
40036
|
+
headers: {
|
|
40037
|
+
[name: string]: unknown;
|
|
40038
|
+
};
|
|
40039
|
+
content: {
|
|
40040
|
+
"application/json": components["schemas"]["Error"];
|
|
40041
|
+
};
|
|
40042
|
+
};
|
|
40043
|
+
/** @description Unauthorized */
|
|
40044
|
+
401: {
|
|
40045
|
+
headers: {
|
|
40046
|
+
[name: string]: unknown;
|
|
40047
|
+
};
|
|
40048
|
+
content: {
|
|
40049
|
+
"application/json": components["schemas"]["Error"];
|
|
40050
|
+
};
|
|
40051
|
+
};
|
|
40052
|
+
/** @description Forbidden */
|
|
40053
|
+
403: {
|
|
40054
|
+
headers: {
|
|
40055
|
+
[name: string]: unknown;
|
|
40056
|
+
};
|
|
40057
|
+
content: {
|
|
40058
|
+
"application/json": components["schemas"]["Error"];
|
|
40059
|
+
};
|
|
40060
|
+
};
|
|
40061
|
+
/** @description Not found */
|
|
40062
|
+
404: {
|
|
40063
|
+
headers: {
|
|
40064
|
+
[name: string]: unknown;
|
|
40065
|
+
};
|
|
40066
|
+
content: {
|
|
40067
|
+
"application/json": components["schemas"]["Error"];
|
|
40068
|
+
};
|
|
40069
|
+
};
|
|
40070
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
40071
|
+
409: {
|
|
40072
|
+
headers: {
|
|
40073
|
+
[name: string]: unknown;
|
|
40074
|
+
};
|
|
40075
|
+
content: {
|
|
40076
|
+
"application/json": components["schemas"]["Error"];
|
|
40077
|
+
};
|
|
40078
|
+
};
|
|
40079
|
+
/** @description Rate limited */
|
|
40080
|
+
429: {
|
|
40081
|
+
headers: {
|
|
40082
|
+
[name: string]: unknown;
|
|
40083
|
+
};
|
|
40084
|
+
content: {
|
|
40085
|
+
"application/json": components["schemas"]["Error"];
|
|
40086
|
+
};
|
|
40087
|
+
};
|
|
40088
|
+
};
|
|
40089
|
+
};
|
|
40090
|
+
put?: never;
|
|
40091
|
+
post?: never;
|
|
40092
|
+
delete?: never;
|
|
40093
|
+
options?: never;
|
|
40094
|
+
head?: never;
|
|
40095
|
+
patch?: never;
|
|
40096
|
+
trace?: never;
|
|
40097
|
+
};
|
|
39812
40098
|
"/sale-notes/{id}/registered-owner": {
|
|
39813
40099
|
parameters: {
|
|
39814
40100
|
query?: never;
|
|
@@ -295767,6 +296053,123 @@ interface paths {
|
|
|
295767
296053
|
patch?: never;
|
|
295768
296054
|
trace?: never;
|
|
295769
296055
|
};
|
|
296056
|
+
"/billing/invoices/{id}/pay-by-transfer": {
|
|
296057
|
+
parameters: {
|
|
296058
|
+
query?: never;
|
|
296059
|
+
header?: never;
|
|
296060
|
+
path?: never;
|
|
296061
|
+
cookie?: never;
|
|
296062
|
+
};
|
|
296063
|
+
get?: never;
|
|
296064
|
+
put?: never;
|
|
296065
|
+
/**
|
|
296066
|
+
* Pay an annual cobro by bank transfer instead of the card
|
|
296067
|
+
* @description Annual plans are paid once, by card or by bank transfer, whatever the workspace has on file. This moves one open annual cobro (`issued` or `past_due`, carrying the annual discount or a band difference) to transfer: nothing charges it automatically from now on (the owner can still pay it with `POST …/pay`), and it falls due at the end of the transfer term (3 Chile business days) when that is later than its current due date. The cobro page and its emails then print the account and the reference. Repeating it answers the cobro with `changed: false`. 409 `details.reason`: `not_annual_cobro` (a monthly cobro follows the workspace switch), `charge_in_flight`, `cobro_not_open`, `collection_running`. Requires `billing:write`.
|
|
296068
|
+
*/
|
|
296069
|
+
post: {
|
|
296070
|
+
parameters: {
|
|
296071
|
+
query?: never;
|
|
296072
|
+
header?: {
|
|
296073
|
+
/** @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. */
|
|
296074
|
+
"Idempotency-Key"?: string;
|
|
296075
|
+
};
|
|
296076
|
+
path: {
|
|
296077
|
+
id: string;
|
|
296078
|
+
};
|
|
296079
|
+
cookie?: never;
|
|
296080
|
+
};
|
|
296081
|
+
requestBody?: never;
|
|
296082
|
+
responses: {
|
|
296083
|
+
/** @description The cobro, now paid by transfer */
|
|
296084
|
+
200: {
|
|
296085
|
+
headers: {
|
|
296086
|
+
[name: string]: unknown;
|
|
296087
|
+
};
|
|
296088
|
+
content: {
|
|
296089
|
+
/**
|
|
296090
|
+
* @example {
|
|
296091
|
+
* "data": {
|
|
296092
|
+
* "invoice_id": "9a1bd325-3ab8-47e8-afe1-7b87c550b139",
|
|
296093
|
+
* "number": "INV-0a1b2c3d-A202611",
|
|
296094
|
+
* "pay_by_transfer_at": "2026-11-18T15:04:11.000Z",
|
|
296095
|
+
* "due_at": "2026-11-24T12:00:00.000Z",
|
|
296096
|
+
* "changed": true
|
|
296097
|
+
* }
|
|
296098
|
+
* }
|
|
296099
|
+
*/
|
|
296100
|
+
"application/json": {
|
|
296101
|
+
data: {
|
|
296102
|
+
invoice_id: string;
|
|
296103
|
+
number: string;
|
|
296104
|
+
pay_by_transfer_at: string | null;
|
|
296105
|
+
due_at: string | null;
|
|
296106
|
+
changed: boolean;
|
|
296107
|
+
};
|
|
296108
|
+
};
|
|
296109
|
+
};
|
|
296110
|
+
};
|
|
296111
|
+
/** @description Validation error */
|
|
296112
|
+
400: {
|
|
296113
|
+
headers: {
|
|
296114
|
+
[name: string]: unknown;
|
|
296115
|
+
};
|
|
296116
|
+
content: {
|
|
296117
|
+
"application/json": components["schemas"]["Error"];
|
|
296118
|
+
};
|
|
296119
|
+
};
|
|
296120
|
+
/** @description Unauthorized */
|
|
296121
|
+
401: {
|
|
296122
|
+
headers: {
|
|
296123
|
+
[name: string]: unknown;
|
|
296124
|
+
};
|
|
296125
|
+
content: {
|
|
296126
|
+
"application/json": components["schemas"]["Error"];
|
|
296127
|
+
};
|
|
296128
|
+
};
|
|
296129
|
+
/** @description Forbidden */
|
|
296130
|
+
403: {
|
|
296131
|
+
headers: {
|
|
296132
|
+
[name: string]: unknown;
|
|
296133
|
+
};
|
|
296134
|
+
content: {
|
|
296135
|
+
"application/json": components["schemas"]["Error"];
|
|
296136
|
+
};
|
|
296137
|
+
};
|
|
296138
|
+
/** @description Not found */
|
|
296139
|
+
404: {
|
|
296140
|
+
headers: {
|
|
296141
|
+
[name: string]: unknown;
|
|
296142
|
+
};
|
|
296143
|
+
content: {
|
|
296144
|
+
"application/json": components["schemas"]["Error"];
|
|
296145
|
+
};
|
|
296146
|
+
};
|
|
296147
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
296148
|
+
409: {
|
|
296149
|
+
headers: {
|
|
296150
|
+
[name: string]: unknown;
|
|
296151
|
+
};
|
|
296152
|
+
content: {
|
|
296153
|
+
"application/json": components["schemas"]["Error"];
|
|
296154
|
+
};
|
|
296155
|
+
};
|
|
296156
|
+
/** @description Rate limited */
|
|
296157
|
+
429: {
|
|
296158
|
+
headers: {
|
|
296159
|
+
[name: string]: unknown;
|
|
296160
|
+
};
|
|
296161
|
+
content: {
|
|
296162
|
+
"application/json": components["schemas"]["Error"];
|
|
296163
|
+
};
|
|
296164
|
+
};
|
|
296165
|
+
};
|
|
296166
|
+
};
|
|
296167
|
+
delete?: never;
|
|
296168
|
+
options?: never;
|
|
296169
|
+
head?: never;
|
|
296170
|
+
patch?: never;
|
|
296171
|
+
trace?: never;
|
|
296172
|
+
};
|
|
295770
296173
|
"/sandbox/clinic": {
|
|
295771
296174
|
parameters: {
|
|
295772
296175
|
query?: never;
|
|
@@ -316785,6 +317188,7 @@ interface paths {
|
|
|
316785
317188
|
* "vendor_active": true,
|
|
316786
317189
|
* "active": true,
|
|
316787
317190
|
* "agent_bookable": true,
|
|
317191
|
+
* "is_evaluation": true,
|
|
316788
317192
|
* "color": "#cccccc",
|
|
316789
317193
|
* "agenda_online": false,
|
|
316790
317194
|
* "overrides": [
|
|
@@ -316908,6 +317312,8 @@ interface paths {
|
|
|
316908
317312
|
duration_minutes?: number | null;
|
|
316909
317313
|
active?: boolean;
|
|
316910
317314
|
agent_bookable?: boolean;
|
|
317315
|
+
/** @description Is this motivo the evaluation visit? Absent = seeded from the name («Evaluación», «Diagnóstico», «Primera consulta»…). */
|
|
317316
|
+
is_evaluation?: boolean;
|
|
316911
317317
|
professionals?: {
|
|
316912
317318
|
/** Format: uuid */
|
|
316913
317319
|
professional_id: string;
|
|
@@ -316937,6 +317343,7 @@ interface paths {
|
|
|
316937
317343
|
* "vendor_active": true,
|
|
316938
317344
|
* "active": true,
|
|
316939
317345
|
* "agent_bookable": true,
|
|
317346
|
+
* "is_evaluation": true,
|
|
316940
317347
|
* "color": "#cccccc",
|
|
316941
317348
|
* "agenda_online": false,
|
|
316942
317349
|
* "overrides": [],
|
|
@@ -317322,6 +317729,8 @@ interface paths {
|
|
|
317322
317729
|
duration_minutes?: number;
|
|
317323
317730
|
active?: boolean;
|
|
317324
317731
|
agent_bookable?: boolean;
|
|
317732
|
+
/** @description Mark or unmark this motivo as the evaluation visit (mirrored and native motivos alike; never an override, a resync keeps it). */
|
|
317733
|
+
is_evaluation?: boolean;
|
|
317325
317734
|
reset?: ("duration_minutes" | "active" | "professionals")[];
|
|
317326
317735
|
};
|
|
317327
317736
|
};
|
|
@@ -317347,6 +317756,7 @@ interface paths {
|
|
|
317347
317756
|
* "vendor_active": true,
|
|
317348
317757
|
* "active": true,
|
|
317349
317758
|
* "agent_bookable": true,
|
|
317759
|
+
* "is_evaluation": true,
|
|
317350
317760
|
* "color": "#cccccc",
|
|
317351
317761
|
* "agenda_online": false,
|
|
317352
317762
|
* "overrides": [
|
|
@@ -317491,6 +317901,7 @@ interface paths {
|
|
|
317491
317901
|
* "vendor_active": true,
|
|
317492
317902
|
* "active": true,
|
|
317493
317903
|
* "agent_bookable": true,
|
|
317904
|
+
* "is_evaluation": true,
|
|
317494
317905
|
* "color": "#cccccc",
|
|
317495
317906
|
* "agenda_online": false,
|
|
317496
317907
|
* "overrides": [
|
|
@@ -317630,6 +318041,7 @@ interface paths {
|
|
|
317630
318041
|
* "vendor_active": true,
|
|
317631
318042
|
* "active": true,
|
|
317632
318043
|
* "agent_bookable": true,
|
|
318044
|
+
* "is_evaluation": true,
|
|
317633
318045
|
* "color": "#cccccc",
|
|
317634
318046
|
* "agenda_online": false,
|
|
317635
318047
|
* "overrides": [],
|
|
@@ -317788,6 +318200,7 @@ interface paths {
|
|
|
317788
318200
|
* "vendor_active": true,
|
|
317789
318201
|
* "active": true,
|
|
317790
318202
|
* "agent_bookable": true,
|
|
318203
|
+
* "is_evaluation": true,
|
|
317791
318204
|
* "color": "#cccccc",
|
|
317792
318205
|
* "agenda_online": false,
|
|
317793
318206
|
* "overrides": [],
|
|
@@ -317940,6 +318353,7 @@ interface paths {
|
|
|
317940
318353
|
* "vendor_active": true,
|
|
317941
318354
|
* "active": true,
|
|
317942
318355
|
* "agent_bookable": true,
|
|
318356
|
+
* "is_evaluation": true,
|
|
317943
318357
|
* "color": "#cccccc",
|
|
317944
318358
|
* "agenda_online": false,
|
|
317945
318359
|
* "overrides": [],
|
|
@@ -321854,6 +322268,13 @@ interface components {
|
|
|
321854
322268
|
/** @description The reference to write in a transfer comment («VT-7K2QM9»). */
|
|
321855
322269
|
reference: string | null;
|
|
321856
322270
|
due_at: string | null;
|
|
322271
|
+
/**
|
|
322272
|
+
* @description #7569: the kind of annual cobro (`annual_purchase`, `annual_renewal`, `annual_difference`); null for a monthly or usage cobro.
|
|
322273
|
+
* @enum {string|null}
|
|
322274
|
+
*/
|
|
322275
|
+
kind: "annual_purchase" | "annual_renewal" | "annual_difference" | null;
|
|
322276
|
+
/** @description #7569: the cobro total in whole CLP, IVA included. */
|
|
322277
|
+
clp_total: number | null;
|
|
321857
322278
|
} | null;
|
|
321858
322279
|
/** @description Set only when `pays_by` is `transfer`. */
|
|
321859
322280
|
transfer: {
|
|
@@ -322501,6 +322922,7 @@ interface components {
|
|
|
322501
322922
|
byte_size: number;
|
|
322502
322923
|
sha256: string;
|
|
322503
322924
|
template_version: string | null;
|
|
322925
|
+
document_family?: string | null;
|
|
322504
322926
|
rendered_at: string;
|
|
322505
322927
|
rendered_by: string | null;
|
|
322506
322928
|
/** Format: uuid */
|
|
@@ -322548,6 +322970,12 @@ interface components {
|
|
|
322548
322970
|
message: string;
|
|
322549
322971
|
} | null;
|
|
322550
322972
|
};
|
|
322973
|
+
DeclaracionResponsabilidadIssuance: {
|
|
322974
|
+
document: components["schemas"]["CompraventaArtefact"];
|
|
322975
|
+
frozen: boolean;
|
|
322976
|
+
already_issued: boolean;
|
|
322977
|
+
template_version: string;
|
|
322978
|
+
};
|
|
322551
322979
|
SaleNoteCorrection: {
|
|
322552
322980
|
/** @enum {string} */
|
|
322553
322981
|
outcome: "applied" | "pending_approval" | "unchanged";
|
|
@@ -339685,6 +340113,8 @@ interface components {
|
|
|
339685
340113
|
vendor_active: boolean;
|
|
339686
340114
|
active: boolean;
|
|
339687
340115
|
agent_bookable: boolean;
|
|
340116
|
+
/** @description Vitrina's own answer: this motivo is the evaluation visit (where a plan is diagnosed and quoted). Seeded from the name when the motivo is created or first synced, editable, never overwritten by a resync. The AI agent never books a second live evaluation for the same patient. */
|
|
340117
|
+
is_evaluation: boolean;
|
|
339688
340118
|
color: string | null;
|
|
339689
340119
|
agenda_online: boolean | null;
|
|
339690
340120
|
overrides: ("duration_minutes" | "active" | "professionals")[];
|
package/package.json
CHANGED