@vitrina/api 17.75.1 → 17.77.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
@@ -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,6 +38444,8 @@ 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;
@@ -296048,6 +296053,123 @@ interface paths {
296048
296053
  patch?: never;
296049
296054
  trace?: never;
296050
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
+ };
296051
296173
  "/sandbox/clinic": {
296052
296174
  parameters: {
296053
296175
  query?: never;
@@ -321288,6 +321410,8 @@ interface components {
321288
321410
  };
321289
321411
  /** @description Workspace display name. */
321290
321412
  name?: string;
321413
+ /** @description The workspace country, ISO 3166-1 alpha-2 (e.g. `CL`, `MX`, `CO`, `AR`). It supplies the defaults for time zone, currency, phone parsing, national holidays, form of address and patient document whenever those are not set explicitly. Absent until set; `locale_resolved` gives what applies. */
321414
+ country?: string;
321291
321415
  /** @description IANA time zone, e.g. `America/Santiago`. */
321292
321416
  timezone?: string;
321293
321417
  /** @description Default language, e.g. `es`. */
@@ -321387,6 +321511,21 @@ interface components {
321387
321511
  /** @enum {string} */
321388
321512
  register_source: "stored" | "vertical_default";
321389
321513
  };
321514
+ /** @description Read-only: the country, time zone and currency the workspace runs on (stored value, the country default, or the legacy guess), with where each came from. Ignored on write. */
321515
+ locale_resolved?: {
321516
+ /** @description ISO 3166-1 alpha-2. */
321517
+ country: string;
321518
+ /** @description IANA time zone. */
321519
+ timezone: string;
321520
+ /** @description ISO 4217 currency. */
321521
+ currency: string;
321522
+ /** @enum {string} */
321523
+ country_source: "stored" | "country_default" | "legacy_guess";
321524
+ /** @enum {string} */
321525
+ timezone_source: "stored" | "country_default" | "legacy_guess";
321526
+ /** @enum {string} */
321527
+ currency_source: "stored" | "country_default" | "legacy_guess";
321528
+ };
321390
321529
  /**
321391
321530
  * @description Write-only secret: the Slack incoming-webhook URL is never returned. `••••` when one is configured; absent otherwise. Read `slack_webhook_configured` instead.
321392
321531
  * @enum {string}
@@ -321408,6 +321547,8 @@ interface components {
321408
321547
  };
321409
321548
  };
321410
321549
  TenantSettingsPublicWrite: {
321550
+ /** @description The workspace country, ISO 3166-1 alpha-2 (e.g. `CL`, `MX`). Supplies the defaults for time zone, currency, phone parsing, national holidays, form of address and patient document; an explicit `timezone`/`currency` is never rewritten by it. `null` removes it. */
321551
+ country?: string | null;
321411
321552
  /** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?, low_battery_factor?, direct_purchase?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value; `min_battery_pct` = a known battery under it is not bought; `low_battery_factor` (0–1) = a known battery under `perfect_battery_pct` caps the price at `used × low_battery_factor` instead of `used`; `direct_purchase: false` = the model is taken only as part of the payment for another item, never bought outright — absent = true), `not_bought` (models never bought), `floor_factor` (0–1, default 0.7: the low end for a unit with issues or unknown condition is `used × floor_factor`), `perfect_floor_factor` (0–1, default 0.85: the low end for a flawless unit is `used × perfect_floor_factor`, its high end is `top`), `rounding` (default 10000), `perfect_battery_pct` (default 90), `currency` (default CLP). On an ecommerce workspace its presence offers the agents the `estimate_trade_in` tool (a wide range of what the customer would still pay) and the `quote_buyback` tool (the most paid for one device sold outright, or the discount for a `direct_purchase: false` model); the business’s own site reads it at `GET /storefront/trade-in`. Replaced whole on write; `null` clears it. */
321412
321553
  trade_in?: {
321413
321554
  price_table: {
@@ -322146,6 +322287,13 @@ interface components {
322146
322287
  /** @description The reference to write in a transfer comment («VT-7K2QM9»). */
322147
322288
  reference: string | null;
322148
322289
  due_at: string | null;
322290
+ /**
322291
+ * @description #7569: the kind of annual cobro (`annual_purchase`, `annual_renewal`, `annual_difference`); null for a monthly or usage cobro.
322292
+ * @enum {string|null}
322293
+ */
322294
+ kind: "annual_purchase" | "annual_renewal" | "annual_difference" | null;
322295
+ /** @description #7569: the cobro total in whole CLP, IVA included. */
322296
+ clp_total: number | null;
322149
322297
  } | null;
322150
322298
  /** @description Set only when `pays_by` is `transfer`. */
322151
322299
  transfer: {
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,6 +38444,8 @@ 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;
@@ -296048,6 +296053,123 @@ interface paths {
296048
296053
  patch?: never;
296049
296054
  trace?: never;
296050
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
+ };
296051
296173
  "/sandbox/clinic": {
296052
296174
  parameters: {
296053
296175
  query?: never;
@@ -321288,6 +321410,8 @@ interface components {
321288
321410
  };
321289
321411
  /** @description Workspace display name. */
321290
321412
  name?: string;
321413
+ /** @description The workspace country, ISO 3166-1 alpha-2 (e.g. `CL`, `MX`, `CO`, `AR`). It supplies the defaults for time zone, currency, phone parsing, national holidays, form of address and patient document whenever those are not set explicitly. Absent until set; `locale_resolved` gives what applies. */
321414
+ country?: string;
321291
321415
  /** @description IANA time zone, e.g. `America/Santiago`. */
321292
321416
  timezone?: string;
321293
321417
  /** @description Default language, e.g. `es`. */
@@ -321387,6 +321511,21 @@ interface components {
321387
321511
  /** @enum {string} */
321388
321512
  register_source: "stored" | "vertical_default";
321389
321513
  };
321514
+ /** @description Read-only: the country, time zone and currency the workspace runs on (stored value, the country default, or the legacy guess), with where each came from. Ignored on write. */
321515
+ locale_resolved?: {
321516
+ /** @description ISO 3166-1 alpha-2. */
321517
+ country: string;
321518
+ /** @description IANA time zone. */
321519
+ timezone: string;
321520
+ /** @description ISO 4217 currency. */
321521
+ currency: string;
321522
+ /** @enum {string} */
321523
+ country_source: "stored" | "country_default" | "legacy_guess";
321524
+ /** @enum {string} */
321525
+ timezone_source: "stored" | "country_default" | "legacy_guess";
321526
+ /** @enum {string} */
321527
+ currency_source: "stored" | "country_default" | "legacy_guess";
321528
+ };
321390
321529
  /**
321391
321530
  * @description Write-only secret: the Slack incoming-webhook URL is never returned. `••••` when one is configured; absent otherwise. Read `slack_webhook_configured` instead.
321392
321531
  * @enum {string}
@@ -321408,6 +321547,8 @@ interface components {
321408
321547
  };
321409
321548
  };
321410
321549
  TenantSettingsPublicWrite: {
321550
+ /** @description The workspace country, ISO 3166-1 alpha-2 (e.g. `CL`, `MX`). Supplies the defaults for time zone, currency, phone parsing, national holidays, form of address and patient document; an explicit `timezone`/`currency` is never rewritten by it. `null` removes it. */
321551
+ country?: string | null;
321411
321552
  /** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?, low_battery_factor?, direct_purchase?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value; `min_battery_pct` = a known battery under it is not bought; `low_battery_factor` (0–1) = a known battery under `perfect_battery_pct` caps the price at `used × low_battery_factor` instead of `used`; `direct_purchase: false` = the model is taken only as part of the payment for another item, never bought outright — absent = true), `not_bought` (models never bought), `floor_factor` (0–1, default 0.7: the low end for a unit with issues or unknown condition is `used × floor_factor`), `perfect_floor_factor` (0–1, default 0.85: the low end for a flawless unit is `used × perfect_floor_factor`, its high end is `top`), `rounding` (default 10000), `perfect_battery_pct` (default 90), `currency` (default CLP). On an ecommerce workspace its presence offers the agents the `estimate_trade_in` tool (a wide range of what the customer would still pay) and the `quote_buyback` tool (the most paid for one device sold outright, or the discount for a `direct_purchase: false` model); the business’s own site reads it at `GET /storefront/trade-in`. Replaced whole on write; `null` clears it. */
321412
321553
  trade_in?: {
321413
321554
  price_table: {
@@ -322146,6 +322287,13 @@ interface components {
322146
322287
  /** @description The reference to write in a transfer comment («VT-7K2QM9»). */
322147
322288
  reference: string | null;
322148
322289
  due_at: string | null;
322290
+ /**
322291
+ * @description #7569: the kind of annual cobro (`annual_purchase`, `annual_renewal`, `annual_difference`); null for a monthly or usage cobro.
322292
+ * @enum {string|null}
322293
+ */
322294
+ kind: "annual_purchase" | "annual_renewal" | "annual_difference" | null;
322295
+ /** @description #7569: the cobro total in whole CLP, IVA included. */
322296
+ clp_total: number | null;
322149
322297
  } | null;
322150
322298
  /** @description Set only when `pays_by` is `transfer`. */
322151
322299
  transfer: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "17.75.1",
3
+ "version": "17.77.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",