@vitrina/api 17.79.0 → 17.80.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 +214 -3
- package/dist/index.d.ts +214 -3
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -17075,6 +17075,31 @@ interface paths {
|
|
|
17075
17075
|
perUnitClpMonth?: number | null;
|
|
17076
17076
|
perUnitUfMonth?: number | null;
|
|
17077
17077
|
billedUnit?: string;
|
|
17078
|
+
/** @description Finanzas: banks the plan includes at no extra charge (1). */
|
|
17079
|
+
includedBanks?: number;
|
|
17080
|
+
/** @description Finanzas: UF per connected bank beyond the included ones, per month, billed monthly in arrears even on an annual plan (0.45). */
|
|
17081
|
+
extraBankUfMonth?: number | null;
|
|
17082
|
+
/** @description Finanzas: the base paid 12 months in advance at 20 % off. Buy it with `POST /entitlements/finanzas/activate` and `{ "billing_interval": "annual" }`. */
|
|
17083
|
+
annual?: {
|
|
17084
|
+
/** @description 12 × the monthly price, UF (18). */
|
|
17085
|
+
ufGrossYear: number;
|
|
17086
|
+
/** @description The annual discount, percent (20). */
|
|
17087
|
+
discountPct: number;
|
|
17088
|
+
/** @description The discount, UF (3.6). */
|
|
17089
|
+
ufDiscount: number;
|
|
17090
|
+
/** @description Net UF of the year, before IVA (14.4). */
|
|
17091
|
+
ufYear: number;
|
|
17092
|
+
/** @description The year expressed per month, UF (1.2). */
|
|
17093
|
+
ufMonthEquivalent: number;
|
|
17094
|
+
/** @description Net CLP of the year at today's UF; null when the UF is unknown. */
|
|
17095
|
+
clpYearEstimate: number | null;
|
|
17096
|
+
/** @description First Santiago day of the year if paid today (`YYYY-MM-DD`). */
|
|
17097
|
+
termStart: string;
|
|
17098
|
+
/** @description Last Santiago day of the year if paid today (`YYYY-MM-DD`). */
|
|
17099
|
+
termEnd: string;
|
|
17100
|
+
/** @description The unpaid annual purchase cobro, if one is out. */
|
|
17101
|
+
purchaseInvoiceId: string | null;
|
|
17102
|
+
};
|
|
17078
17103
|
/** @description The business types (`tenant.vertical`) this add-on is sold to. Omitted = every vertical. Read `offers` for the per-workspace answer. */
|
|
17079
17104
|
verticals?: string[];
|
|
17080
17105
|
}[];
|
|
@@ -17101,6 +17126,15 @@ interface paths {
|
|
|
17101
17126
|
};
|
|
17102
17127
|
/** @description Last calendar day (`YYYY-MM-DD`, America/Santiago) this add-on is free under a time-boxed waiver: no charge accrues through the end of that day and activation needs no payment method. It bills normally from 00:00 Santiago of the next day. `null` = no waiver. */
|
|
17103
17128
|
waiver_until?: string | null;
|
|
17129
|
+
/**
|
|
17130
|
+
* @description `annual` only while the row holds a paid 12-month term that has not ended (Vitrina Finanzas); a term that ended unrenewed reads `monthly`. Extra banks bill monthly either way.
|
|
17131
|
+
* @enum {string}
|
|
17132
|
+
*/
|
|
17133
|
+
billing_interval?: "monthly" | "annual";
|
|
17134
|
+
/** @description Start of the current (or last) paid annual term (ISO). */
|
|
17135
|
+
term_start?: string | null;
|
|
17136
|
+
/** @description End (exclusive, ISO) of the current (or last) paid annual term. A cancelled annual add-on stays active until here, then lapses. */
|
|
17137
|
+
term_end?: string | null;
|
|
17104
17138
|
created_at: string;
|
|
17105
17139
|
updated_at: string;
|
|
17106
17140
|
/** @description Who invoices this add-on. `vitrina` (default) = Vitrina bills it at the catalog price. Any other value names the partner whose plan covers it; Vitrina charges nothing, so show the add-on as included and never render the partner value or the catalog price. */
|
|
@@ -17114,6 +17148,24 @@ interface paths {
|
|
|
17114
17148
|
* @enum {string|null}
|
|
17115
17149
|
*/
|
|
17116
17150
|
covered_by: "complimentary" | "contract" | "not_billed" | null;
|
|
17151
|
+
/** @description The unpaid annual purchase cobro of this add-on (Vitrina Finanzas), or null. The add-on turns annual only when it is paid. */
|
|
17152
|
+
annual_purchase_invoice_id?: string | null;
|
|
17153
|
+
/** @description While annual: the last Santiago day (`YYYY-MM-DD`) the paid term covers. Null when monthly. */
|
|
17154
|
+
paid_until?: string | null;
|
|
17155
|
+
/** @description While annual, not cancelled and not going back to monthly: the Santiago day (`YYYY-MM-DD`) the term ends and its renewal starts. Null otherwise. */
|
|
17156
|
+
renews_on?: string | null;
|
|
17157
|
+
/**
|
|
17158
|
+
* @description `monthly` when the owner chose to go back to monthly at the term end (`PUT /entitlements/finanzas/interval`); null when the term renews.
|
|
17159
|
+
* @enum {string|null}
|
|
17160
|
+
*/
|
|
17161
|
+
next_billing_interval?: "monthly" | "annual" | null;
|
|
17162
|
+
/** @description When the 30-day renewal notice of the current term went out. */
|
|
17163
|
+
renewal_notice_sent_at?: string | null;
|
|
17164
|
+
/** @description While annual and renewing: the next year in UF after the 20 % and its pesos at today's UF (before IVA). Null otherwise. */
|
|
17165
|
+
renewal_preview?: {
|
|
17166
|
+
uf_period: number;
|
|
17167
|
+
clp_estimate: number | null;
|
|
17168
|
+
} | null;
|
|
17117
17169
|
}[];
|
|
17118
17170
|
usage: {
|
|
17119
17171
|
tasador: {
|
|
@@ -17219,7 +17271,7 @@ interface paths {
|
|
|
17219
17271
|
put?: never;
|
|
17220
17272
|
/**
|
|
17221
17273
|
* Self-serve activate an add-on (returns needs_enrollment without a payment mandate)
|
|
17222
|
-
* @description Grants `feature` to the workspace once an active payment mandate exists (`{ status: "active", entitlement }`); with none, answers `{ status: "needs_enrollment" }` and grants nothing — the caller routes the dealer through the Fintoc/Mercado Pago enrollment step and retries. No payment method is needed when the add-on costs the workspace nothing: its row is covered by another biller (`billed_by` other than `vitrina`) or sits inside an active `waiver_until` waiver; such an activation answers `active` and accrues no charge for the covered days. An add-on this workspace cannot buy answers 409 `ADDON_NOT_OFFERED` (`details.reason`: `sandbox` or `vertical`, the same answer `GET /entitlements` publishes in `offers`); reactivating an add-on the workspace still holds is never refused for that. Idempotent on an already-active feature (re-answers the same `active` row rather than erroring).
|
|
17274
|
+
* @description Grants `feature` to the workspace once an active payment mandate exists (`{ status: "active", entitlement }`); with none, answers `{ status: "needs_enrollment" }` and grants nothing — the caller routes the dealer through the Fintoc/Mercado Pago enrollment step and retries. No payment method is needed when the add-on costs the workspace nothing: its row is covered by another biller (`billed_by` other than `vitrina`) or sits inside an active `waiver_until` waiver; such an activation answers `active` and accrues no charge for the covered days. An add-on this workspace cannot buy answers 409 `ADDON_NOT_OFFERED` (`details.reason`: `sandbox` or `vertical`, the same answer `GET /entitlements` publishes in `offers`); reactivating an add-on the workspace still holds is never refused for that. Idempotent on an already-active feature (re-answers the same `active` row rather than erroring). ANNUAL (Vitrina Finanzas only, needs `billing:write`; monthly activation keeps `tenant:write`): body `{ "billing_interval": "annual", "payment": "card" | "transfer" }` issues ONE cobro for the base, 12 months at 20 % off (14.4 UF neto at the UF of the issue day, number `INV-{tenant}-AF{YYYYMM}`), with no payment method required, and answers `{ status: "awaiting_payment" | "active", billing_interval: "annual", invoice_id, invoice_number, uf_total, clp_total, due_at, purchase_expires_on, next_step, term_start, term_end }`. Finanzas opens (or turns annual) only when that cobro is paid; its year starts at the payment instant (after a running waiver). Unpaid, the cobro is voided 30 days after issue and nothing changes. Extra banks keep billing monthly. 409 `ANNUAL_NOT_AVAILABLE` (`details.reason`: `not_annual_feature`, `complimentary`, `billed_elsewhere`, `suspended`, `term_running`); 409 `ANNUAL_PURCHASE_PENDING` while an unpaid purchase is out (`details.invoice_id`).
|
|
17223
17275
|
*/
|
|
17224
17276
|
post: {
|
|
17225
17277
|
parameters: {
|
|
@@ -17233,7 +17285,22 @@ interface paths {
|
|
|
17233
17285
|
};
|
|
17234
17286
|
cookie?: never;
|
|
17235
17287
|
};
|
|
17236
|
-
requestBody?:
|
|
17288
|
+
requestBody?: {
|
|
17289
|
+
content: {
|
|
17290
|
+
/**
|
|
17291
|
+
* @example {
|
|
17292
|
+
* "billing_interval": "annual",
|
|
17293
|
+
* "payment": "transfer"
|
|
17294
|
+
* }
|
|
17295
|
+
*/
|
|
17296
|
+
"application/json": {
|
|
17297
|
+
/** @enum {string} */
|
|
17298
|
+
billing_interval?: "monthly" | "annual";
|
|
17299
|
+
/** @enum {string} */
|
|
17300
|
+
payment?: "card" | "transfer";
|
|
17301
|
+
};
|
|
17302
|
+
};
|
|
17303
|
+
};
|
|
17237
17304
|
responses: {
|
|
17238
17305
|
/** @description Activation result */
|
|
17239
17306
|
200: {
|
|
@@ -17453,6 +17520,133 @@ interface paths {
|
|
|
17453
17520
|
patch?: never;
|
|
17454
17521
|
trace?: never;
|
|
17455
17522
|
};
|
|
17523
|
+
"/entitlements/finanzas/interval": {
|
|
17524
|
+
parameters: {
|
|
17525
|
+
query?: never;
|
|
17526
|
+
header?: never;
|
|
17527
|
+
path?: never;
|
|
17528
|
+
cookie?: never;
|
|
17529
|
+
};
|
|
17530
|
+
get?: never;
|
|
17531
|
+
/**
|
|
17532
|
+
* Switch annual Vitrina Finanzas back to monthly at the term end
|
|
17533
|
+
* @description `monthly`: the paid year runs to its end with no refund and does not renew; from that day the base bills monthly in arrears. `annual` undoes it (the year renews). Monthly to annual is the purchase, `POST /entitlements/finanzas/activate` with `billing_interval: annual`. 409 `details.code`: `use_annual_purchase` (annual asked on a monthly row), `not_annual`, `plan_cancelling`, `next_cobro_issued` (the renewal Cobro is already out); 409 `ANNUAL_NOT_AVAILABLE` with `details.reason` `quoted` | `agency` | `contract` on `annual`: the 20 % annual discount is for the public price list only. Requires `billing:write`.
|
|
17534
|
+
*/
|
|
17535
|
+
put: {
|
|
17536
|
+
parameters: {
|
|
17537
|
+
query?: never;
|
|
17538
|
+
header?: never;
|
|
17539
|
+
path?: never;
|
|
17540
|
+
cookie?: never;
|
|
17541
|
+
};
|
|
17542
|
+
requestBody?: {
|
|
17543
|
+
content: {
|
|
17544
|
+
/**
|
|
17545
|
+
* @example {
|
|
17546
|
+
* "interval": "monthly"
|
|
17547
|
+
* }
|
|
17548
|
+
*/
|
|
17549
|
+
"application/json": {
|
|
17550
|
+
/** @enum {string} */
|
|
17551
|
+
interval: "monthly" | "annual";
|
|
17552
|
+
};
|
|
17553
|
+
};
|
|
17554
|
+
};
|
|
17555
|
+
responses: {
|
|
17556
|
+
/** @description When the change applies and the new price */
|
|
17557
|
+
200: {
|
|
17558
|
+
headers: {
|
|
17559
|
+
[name: string]: unknown;
|
|
17560
|
+
};
|
|
17561
|
+
content: {
|
|
17562
|
+
/**
|
|
17563
|
+
* @example {
|
|
17564
|
+
* "data": {
|
|
17565
|
+
* "interval": "monthly",
|
|
17566
|
+
* "effective_on": "2027-11-17",
|
|
17567
|
+
* "preview": {
|
|
17568
|
+
* "uf_period": 1.5,
|
|
17569
|
+
* "clp_estimate": 59785
|
|
17570
|
+
* }
|
|
17571
|
+
* }
|
|
17572
|
+
* }
|
|
17573
|
+
*/
|
|
17574
|
+
"application/json": {
|
|
17575
|
+
data: {
|
|
17576
|
+
/** @enum {string} */
|
|
17577
|
+
interval: "monthly" | "annual";
|
|
17578
|
+
effective_on: string;
|
|
17579
|
+
preview: {
|
|
17580
|
+
uf_period: number;
|
|
17581
|
+
clp_estimate: number | null;
|
|
17582
|
+
};
|
|
17583
|
+
};
|
|
17584
|
+
};
|
|
17585
|
+
};
|
|
17586
|
+
};
|
|
17587
|
+
/** @description Validation error */
|
|
17588
|
+
400: {
|
|
17589
|
+
headers: {
|
|
17590
|
+
[name: string]: unknown;
|
|
17591
|
+
};
|
|
17592
|
+
content: {
|
|
17593
|
+
"application/json": components["schemas"]["Error"];
|
|
17594
|
+
};
|
|
17595
|
+
};
|
|
17596
|
+
/** @description Unauthorized */
|
|
17597
|
+
401: {
|
|
17598
|
+
headers: {
|
|
17599
|
+
[name: string]: unknown;
|
|
17600
|
+
};
|
|
17601
|
+
content: {
|
|
17602
|
+
"application/json": components["schemas"]["Error"];
|
|
17603
|
+
};
|
|
17604
|
+
};
|
|
17605
|
+
/** @description Forbidden */
|
|
17606
|
+
403: {
|
|
17607
|
+
headers: {
|
|
17608
|
+
[name: string]: unknown;
|
|
17609
|
+
};
|
|
17610
|
+
content: {
|
|
17611
|
+
"application/json": components["schemas"]["Error"];
|
|
17612
|
+
};
|
|
17613
|
+
};
|
|
17614
|
+
/** @description Not found */
|
|
17615
|
+
404: {
|
|
17616
|
+
headers: {
|
|
17617
|
+
[name: string]: unknown;
|
|
17618
|
+
};
|
|
17619
|
+
content: {
|
|
17620
|
+
"application/json": components["schemas"]["Error"];
|
|
17621
|
+
};
|
|
17622
|
+
};
|
|
17623
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
17624
|
+
409: {
|
|
17625
|
+
headers: {
|
|
17626
|
+
[name: string]: unknown;
|
|
17627
|
+
};
|
|
17628
|
+
content: {
|
|
17629
|
+
"application/json": components["schemas"]["Error"];
|
|
17630
|
+
};
|
|
17631
|
+
};
|
|
17632
|
+
/** @description Rate limited */
|
|
17633
|
+
429: {
|
|
17634
|
+
headers: {
|
|
17635
|
+
[name: string]: unknown;
|
|
17636
|
+
};
|
|
17637
|
+
content: {
|
|
17638
|
+
"application/json": components["schemas"]["Error"];
|
|
17639
|
+
};
|
|
17640
|
+
};
|
|
17641
|
+
};
|
|
17642
|
+
};
|
|
17643
|
+
post?: never;
|
|
17644
|
+
delete?: never;
|
|
17645
|
+
options?: never;
|
|
17646
|
+
head?: never;
|
|
17647
|
+
patch?: never;
|
|
17648
|
+
trace?: never;
|
|
17649
|
+
};
|
|
17456
17650
|
"/vehicles/catalog/brands": {
|
|
17457
17651
|
parameters: {
|
|
17458
17652
|
query?: never;
|
|
@@ -38323,7 +38517,7 @@ interface paths {
|
|
|
38323
38517
|
};
|
|
38324
38518
|
/**
|
|
38325
38519
|
* The clinic banded plan: band, count, price, review, pause state
|
|
38326
|
-
* @description Band (S/M/L/XL or quoted), the 3-month average of professionals who attended patients that produced it, the UF/month price with the design-partner lock honoured, the next band review, any announced move, the payment mandate, the pause state and where the non-payment ladder has got to.
|
|
38520
|
+
* @description Band (S/M/L/XL or quoted), the 3-month average of professionals who attended patients that produced it, the UF/month price with the design-partner lock honoured, the next band review, any announced move, the payment mandate, the pause state and where the non-payment ladder has got to. On an annual plan a move up is charged once as the difference for the months of the paid year left, at the annual price (`announced_remaining_months`, `announced_difference_uf`, `announced_difference_clp_estimate`), and a move down only shows as `pending_down_band` until the renewal.
|
|
38327
38521
|
*/
|
|
38328
38522
|
get: {
|
|
38329
38523
|
parameters: {
|
|
@@ -38452,6 +38646,23 @@ interface paths {
|
|
|
38452
38646
|
cancel_at_period_end: boolean;
|
|
38453
38647
|
ends_on: string | null;
|
|
38454
38648
|
plan_ended_at: string | null;
|
|
38649
|
+
/** @enum {string|null} */
|
|
38650
|
+
pending_down_band: "S" | "M" | "L" | "XL" | "quoted" | null;
|
|
38651
|
+
announced_remaining_months: number | null;
|
|
38652
|
+
announced_difference_uf: number | null;
|
|
38653
|
+
announced_difference_clp_estimate: number | null;
|
|
38654
|
+
/** @enum {string|null} */
|
|
38655
|
+
next_billing_interval: "monthly" | "annual" | null;
|
|
38656
|
+
renewal_notice_sent_at: string | null;
|
|
38657
|
+
renewal_preview: {
|
|
38658
|
+
/** @enum {string} */
|
|
38659
|
+
interval: "monthly" | "annual";
|
|
38660
|
+
/** @enum {string} */
|
|
38661
|
+
band: "S" | "M" | "L" | "XL" | "quoted";
|
|
38662
|
+
uf_month: number;
|
|
38663
|
+
uf_period: number;
|
|
38664
|
+
clp_estimate: number | null;
|
|
38665
|
+
} | null;
|
|
38455
38666
|
};
|
|
38456
38667
|
};
|
|
38457
38668
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -17075,6 +17075,31 @@ interface paths {
|
|
|
17075
17075
|
perUnitClpMonth?: number | null;
|
|
17076
17076
|
perUnitUfMonth?: number | null;
|
|
17077
17077
|
billedUnit?: string;
|
|
17078
|
+
/** @description Finanzas: banks the plan includes at no extra charge (1). */
|
|
17079
|
+
includedBanks?: number;
|
|
17080
|
+
/** @description Finanzas: UF per connected bank beyond the included ones, per month, billed monthly in arrears even on an annual plan (0.45). */
|
|
17081
|
+
extraBankUfMonth?: number | null;
|
|
17082
|
+
/** @description Finanzas: the base paid 12 months in advance at 20 % off. Buy it with `POST /entitlements/finanzas/activate` and `{ "billing_interval": "annual" }`. */
|
|
17083
|
+
annual?: {
|
|
17084
|
+
/** @description 12 × the monthly price, UF (18). */
|
|
17085
|
+
ufGrossYear: number;
|
|
17086
|
+
/** @description The annual discount, percent (20). */
|
|
17087
|
+
discountPct: number;
|
|
17088
|
+
/** @description The discount, UF (3.6). */
|
|
17089
|
+
ufDiscount: number;
|
|
17090
|
+
/** @description Net UF of the year, before IVA (14.4). */
|
|
17091
|
+
ufYear: number;
|
|
17092
|
+
/** @description The year expressed per month, UF (1.2). */
|
|
17093
|
+
ufMonthEquivalent: number;
|
|
17094
|
+
/** @description Net CLP of the year at today's UF; null when the UF is unknown. */
|
|
17095
|
+
clpYearEstimate: number | null;
|
|
17096
|
+
/** @description First Santiago day of the year if paid today (`YYYY-MM-DD`). */
|
|
17097
|
+
termStart: string;
|
|
17098
|
+
/** @description Last Santiago day of the year if paid today (`YYYY-MM-DD`). */
|
|
17099
|
+
termEnd: string;
|
|
17100
|
+
/** @description The unpaid annual purchase cobro, if one is out. */
|
|
17101
|
+
purchaseInvoiceId: string | null;
|
|
17102
|
+
};
|
|
17078
17103
|
/** @description The business types (`tenant.vertical`) this add-on is sold to. Omitted = every vertical. Read `offers` for the per-workspace answer. */
|
|
17079
17104
|
verticals?: string[];
|
|
17080
17105
|
}[];
|
|
@@ -17101,6 +17126,15 @@ interface paths {
|
|
|
17101
17126
|
};
|
|
17102
17127
|
/** @description Last calendar day (`YYYY-MM-DD`, America/Santiago) this add-on is free under a time-boxed waiver: no charge accrues through the end of that day and activation needs no payment method. It bills normally from 00:00 Santiago of the next day. `null` = no waiver. */
|
|
17103
17128
|
waiver_until?: string | null;
|
|
17129
|
+
/**
|
|
17130
|
+
* @description `annual` only while the row holds a paid 12-month term that has not ended (Vitrina Finanzas); a term that ended unrenewed reads `monthly`. Extra banks bill monthly either way.
|
|
17131
|
+
* @enum {string}
|
|
17132
|
+
*/
|
|
17133
|
+
billing_interval?: "monthly" | "annual";
|
|
17134
|
+
/** @description Start of the current (or last) paid annual term (ISO). */
|
|
17135
|
+
term_start?: string | null;
|
|
17136
|
+
/** @description End (exclusive, ISO) of the current (or last) paid annual term. A cancelled annual add-on stays active until here, then lapses. */
|
|
17137
|
+
term_end?: string | null;
|
|
17104
17138
|
created_at: string;
|
|
17105
17139
|
updated_at: string;
|
|
17106
17140
|
/** @description Who invoices this add-on. `vitrina` (default) = Vitrina bills it at the catalog price. Any other value names the partner whose plan covers it; Vitrina charges nothing, so show the add-on as included and never render the partner value or the catalog price. */
|
|
@@ -17114,6 +17148,24 @@ interface paths {
|
|
|
17114
17148
|
* @enum {string|null}
|
|
17115
17149
|
*/
|
|
17116
17150
|
covered_by: "complimentary" | "contract" | "not_billed" | null;
|
|
17151
|
+
/** @description The unpaid annual purchase cobro of this add-on (Vitrina Finanzas), or null. The add-on turns annual only when it is paid. */
|
|
17152
|
+
annual_purchase_invoice_id?: string | null;
|
|
17153
|
+
/** @description While annual: the last Santiago day (`YYYY-MM-DD`) the paid term covers. Null when monthly. */
|
|
17154
|
+
paid_until?: string | null;
|
|
17155
|
+
/** @description While annual, not cancelled and not going back to monthly: the Santiago day (`YYYY-MM-DD`) the term ends and its renewal starts. Null otherwise. */
|
|
17156
|
+
renews_on?: string | null;
|
|
17157
|
+
/**
|
|
17158
|
+
* @description `monthly` when the owner chose to go back to monthly at the term end (`PUT /entitlements/finanzas/interval`); null when the term renews.
|
|
17159
|
+
* @enum {string|null}
|
|
17160
|
+
*/
|
|
17161
|
+
next_billing_interval?: "monthly" | "annual" | null;
|
|
17162
|
+
/** @description When the 30-day renewal notice of the current term went out. */
|
|
17163
|
+
renewal_notice_sent_at?: string | null;
|
|
17164
|
+
/** @description While annual and renewing: the next year in UF after the 20 % and its pesos at today's UF (before IVA). Null otherwise. */
|
|
17165
|
+
renewal_preview?: {
|
|
17166
|
+
uf_period: number;
|
|
17167
|
+
clp_estimate: number | null;
|
|
17168
|
+
} | null;
|
|
17117
17169
|
}[];
|
|
17118
17170
|
usage: {
|
|
17119
17171
|
tasador: {
|
|
@@ -17219,7 +17271,7 @@ interface paths {
|
|
|
17219
17271
|
put?: never;
|
|
17220
17272
|
/**
|
|
17221
17273
|
* Self-serve activate an add-on (returns needs_enrollment without a payment mandate)
|
|
17222
|
-
* @description Grants `feature` to the workspace once an active payment mandate exists (`{ status: "active", entitlement }`); with none, answers `{ status: "needs_enrollment" }` and grants nothing — the caller routes the dealer through the Fintoc/Mercado Pago enrollment step and retries. No payment method is needed when the add-on costs the workspace nothing: its row is covered by another biller (`billed_by` other than `vitrina`) or sits inside an active `waiver_until` waiver; such an activation answers `active` and accrues no charge for the covered days. An add-on this workspace cannot buy answers 409 `ADDON_NOT_OFFERED` (`details.reason`: `sandbox` or `vertical`, the same answer `GET /entitlements` publishes in `offers`); reactivating an add-on the workspace still holds is never refused for that. Idempotent on an already-active feature (re-answers the same `active` row rather than erroring).
|
|
17274
|
+
* @description Grants `feature` to the workspace once an active payment mandate exists (`{ status: "active", entitlement }`); with none, answers `{ status: "needs_enrollment" }` and grants nothing — the caller routes the dealer through the Fintoc/Mercado Pago enrollment step and retries. No payment method is needed when the add-on costs the workspace nothing: its row is covered by another biller (`billed_by` other than `vitrina`) or sits inside an active `waiver_until` waiver; such an activation answers `active` and accrues no charge for the covered days. An add-on this workspace cannot buy answers 409 `ADDON_NOT_OFFERED` (`details.reason`: `sandbox` or `vertical`, the same answer `GET /entitlements` publishes in `offers`); reactivating an add-on the workspace still holds is never refused for that. Idempotent on an already-active feature (re-answers the same `active` row rather than erroring). ANNUAL (Vitrina Finanzas only, needs `billing:write`; monthly activation keeps `tenant:write`): body `{ "billing_interval": "annual", "payment": "card" | "transfer" }` issues ONE cobro for the base, 12 months at 20 % off (14.4 UF neto at the UF of the issue day, number `INV-{tenant}-AF{YYYYMM}`), with no payment method required, and answers `{ status: "awaiting_payment" | "active", billing_interval: "annual", invoice_id, invoice_number, uf_total, clp_total, due_at, purchase_expires_on, next_step, term_start, term_end }`. Finanzas opens (or turns annual) only when that cobro is paid; its year starts at the payment instant (after a running waiver). Unpaid, the cobro is voided 30 days after issue and nothing changes. Extra banks keep billing monthly. 409 `ANNUAL_NOT_AVAILABLE` (`details.reason`: `not_annual_feature`, `complimentary`, `billed_elsewhere`, `suspended`, `term_running`); 409 `ANNUAL_PURCHASE_PENDING` while an unpaid purchase is out (`details.invoice_id`).
|
|
17223
17275
|
*/
|
|
17224
17276
|
post: {
|
|
17225
17277
|
parameters: {
|
|
@@ -17233,7 +17285,22 @@ interface paths {
|
|
|
17233
17285
|
};
|
|
17234
17286
|
cookie?: never;
|
|
17235
17287
|
};
|
|
17236
|
-
requestBody?:
|
|
17288
|
+
requestBody?: {
|
|
17289
|
+
content: {
|
|
17290
|
+
/**
|
|
17291
|
+
* @example {
|
|
17292
|
+
* "billing_interval": "annual",
|
|
17293
|
+
* "payment": "transfer"
|
|
17294
|
+
* }
|
|
17295
|
+
*/
|
|
17296
|
+
"application/json": {
|
|
17297
|
+
/** @enum {string} */
|
|
17298
|
+
billing_interval?: "monthly" | "annual";
|
|
17299
|
+
/** @enum {string} */
|
|
17300
|
+
payment?: "card" | "transfer";
|
|
17301
|
+
};
|
|
17302
|
+
};
|
|
17303
|
+
};
|
|
17237
17304
|
responses: {
|
|
17238
17305
|
/** @description Activation result */
|
|
17239
17306
|
200: {
|
|
@@ -17453,6 +17520,133 @@ interface paths {
|
|
|
17453
17520
|
patch?: never;
|
|
17454
17521
|
trace?: never;
|
|
17455
17522
|
};
|
|
17523
|
+
"/entitlements/finanzas/interval": {
|
|
17524
|
+
parameters: {
|
|
17525
|
+
query?: never;
|
|
17526
|
+
header?: never;
|
|
17527
|
+
path?: never;
|
|
17528
|
+
cookie?: never;
|
|
17529
|
+
};
|
|
17530
|
+
get?: never;
|
|
17531
|
+
/**
|
|
17532
|
+
* Switch annual Vitrina Finanzas back to monthly at the term end
|
|
17533
|
+
* @description `monthly`: the paid year runs to its end with no refund and does not renew; from that day the base bills monthly in arrears. `annual` undoes it (the year renews). Monthly to annual is the purchase, `POST /entitlements/finanzas/activate` with `billing_interval: annual`. 409 `details.code`: `use_annual_purchase` (annual asked on a monthly row), `not_annual`, `plan_cancelling`, `next_cobro_issued` (the renewal Cobro is already out); 409 `ANNUAL_NOT_AVAILABLE` with `details.reason` `quoted` | `agency` | `contract` on `annual`: the 20 % annual discount is for the public price list only. Requires `billing:write`.
|
|
17534
|
+
*/
|
|
17535
|
+
put: {
|
|
17536
|
+
parameters: {
|
|
17537
|
+
query?: never;
|
|
17538
|
+
header?: never;
|
|
17539
|
+
path?: never;
|
|
17540
|
+
cookie?: never;
|
|
17541
|
+
};
|
|
17542
|
+
requestBody?: {
|
|
17543
|
+
content: {
|
|
17544
|
+
/**
|
|
17545
|
+
* @example {
|
|
17546
|
+
* "interval": "monthly"
|
|
17547
|
+
* }
|
|
17548
|
+
*/
|
|
17549
|
+
"application/json": {
|
|
17550
|
+
/** @enum {string} */
|
|
17551
|
+
interval: "monthly" | "annual";
|
|
17552
|
+
};
|
|
17553
|
+
};
|
|
17554
|
+
};
|
|
17555
|
+
responses: {
|
|
17556
|
+
/** @description When the change applies and the new price */
|
|
17557
|
+
200: {
|
|
17558
|
+
headers: {
|
|
17559
|
+
[name: string]: unknown;
|
|
17560
|
+
};
|
|
17561
|
+
content: {
|
|
17562
|
+
/**
|
|
17563
|
+
* @example {
|
|
17564
|
+
* "data": {
|
|
17565
|
+
* "interval": "monthly",
|
|
17566
|
+
* "effective_on": "2027-11-17",
|
|
17567
|
+
* "preview": {
|
|
17568
|
+
* "uf_period": 1.5,
|
|
17569
|
+
* "clp_estimate": 59785
|
|
17570
|
+
* }
|
|
17571
|
+
* }
|
|
17572
|
+
* }
|
|
17573
|
+
*/
|
|
17574
|
+
"application/json": {
|
|
17575
|
+
data: {
|
|
17576
|
+
/** @enum {string} */
|
|
17577
|
+
interval: "monthly" | "annual";
|
|
17578
|
+
effective_on: string;
|
|
17579
|
+
preview: {
|
|
17580
|
+
uf_period: number;
|
|
17581
|
+
clp_estimate: number | null;
|
|
17582
|
+
};
|
|
17583
|
+
};
|
|
17584
|
+
};
|
|
17585
|
+
};
|
|
17586
|
+
};
|
|
17587
|
+
/** @description Validation error */
|
|
17588
|
+
400: {
|
|
17589
|
+
headers: {
|
|
17590
|
+
[name: string]: unknown;
|
|
17591
|
+
};
|
|
17592
|
+
content: {
|
|
17593
|
+
"application/json": components["schemas"]["Error"];
|
|
17594
|
+
};
|
|
17595
|
+
};
|
|
17596
|
+
/** @description Unauthorized */
|
|
17597
|
+
401: {
|
|
17598
|
+
headers: {
|
|
17599
|
+
[name: string]: unknown;
|
|
17600
|
+
};
|
|
17601
|
+
content: {
|
|
17602
|
+
"application/json": components["schemas"]["Error"];
|
|
17603
|
+
};
|
|
17604
|
+
};
|
|
17605
|
+
/** @description Forbidden */
|
|
17606
|
+
403: {
|
|
17607
|
+
headers: {
|
|
17608
|
+
[name: string]: unknown;
|
|
17609
|
+
};
|
|
17610
|
+
content: {
|
|
17611
|
+
"application/json": components["schemas"]["Error"];
|
|
17612
|
+
};
|
|
17613
|
+
};
|
|
17614
|
+
/** @description Not found */
|
|
17615
|
+
404: {
|
|
17616
|
+
headers: {
|
|
17617
|
+
[name: string]: unknown;
|
|
17618
|
+
};
|
|
17619
|
+
content: {
|
|
17620
|
+
"application/json": components["schemas"]["Error"];
|
|
17621
|
+
};
|
|
17622
|
+
};
|
|
17623
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
17624
|
+
409: {
|
|
17625
|
+
headers: {
|
|
17626
|
+
[name: string]: unknown;
|
|
17627
|
+
};
|
|
17628
|
+
content: {
|
|
17629
|
+
"application/json": components["schemas"]["Error"];
|
|
17630
|
+
};
|
|
17631
|
+
};
|
|
17632
|
+
/** @description Rate limited */
|
|
17633
|
+
429: {
|
|
17634
|
+
headers: {
|
|
17635
|
+
[name: string]: unknown;
|
|
17636
|
+
};
|
|
17637
|
+
content: {
|
|
17638
|
+
"application/json": components["schemas"]["Error"];
|
|
17639
|
+
};
|
|
17640
|
+
};
|
|
17641
|
+
};
|
|
17642
|
+
};
|
|
17643
|
+
post?: never;
|
|
17644
|
+
delete?: never;
|
|
17645
|
+
options?: never;
|
|
17646
|
+
head?: never;
|
|
17647
|
+
patch?: never;
|
|
17648
|
+
trace?: never;
|
|
17649
|
+
};
|
|
17456
17650
|
"/vehicles/catalog/brands": {
|
|
17457
17651
|
parameters: {
|
|
17458
17652
|
query?: never;
|
|
@@ -38323,7 +38517,7 @@ interface paths {
|
|
|
38323
38517
|
};
|
|
38324
38518
|
/**
|
|
38325
38519
|
* The clinic banded plan: band, count, price, review, pause state
|
|
38326
|
-
* @description Band (S/M/L/XL or quoted), the 3-month average of professionals who attended patients that produced it, the UF/month price with the design-partner lock honoured, the next band review, any announced move, the payment mandate, the pause state and where the non-payment ladder has got to.
|
|
38520
|
+
* @description Band (S/M/L/XL or quoted), the 3-month average of professionals who attended patients that produced it, the UF/month price with the design-partner lock honoured, the next band review, any announced move, the payment mandate, the pause state and where the non-payment ladder has got to. On an annual plan a move up is charged once as the difference for the months of the paid year left, at the annual price (`announced_remaining_months`, `announced_difference_uf`, `announced_difference_clp_estimate`), and a move down only shows as `pending_down_band` until the renewal.
|
|
38327
38521
|
*/
|
|
38328
38522
|
get: {
|
|
38329
38523
|
parameters: {
|
|
@@ -38452,6 +38646,23 @@ interface paths {
|
|
|
38452
38646
|
cancel_at_period_end: boolean;
|
|
38453
38647
|
ends_on: string | null;
|
|
38454
38648
|
plan_ended_at: string | null;
|
|
38649
|
+
/** @enum {string|null} */
|
|
38650
|
+
pending_down_band: "S" | "M" | "L" | "XL" | "quoted" | null;
|
|
38651
|
+
announced_remaining_months: number | null;
|
|
38652
|
+
announced_difference_uf: number | null;
|
|
38653
|
+
announced_difference_clp_estimate: number | null;
|
|
38654
|
+
/** @enum {string|null} */
|
|
38655
|
+
next_billing_interval: "monthly" | "annual" | null;
|
|
38656
|
+
renewal_notice_sent_at: string | null;
|
|
38657
|
+
renewal_preview: {
|
|
38658
|
+
/** @enum {string} */
|
|
38659
|
+
interval: "monthly" | "annual";
|
|
38660
|
+
/** @enum {string} */
|
|
38661
|
+
band: "S" | "M" | "L" | "XL" | "quoted";
|
|
38662
|
+
uf_month: number;
|
|
38663
|
+
uf_period: number;
|
|
38664
|
+
clp_estimate: number | null;
|
|
38665
|
+
} | null;
|
|
38455
38666
|
};
|
|
38456
38667
|
};
|
|
38457
38668
|
};
|
package/package.json
CHANGED