@vitrina/api 14.78.0 → 14.79.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 +128 -2
- package/dist/index.d.ts +128 -2
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -22207,6 +22207,130 @@ interface paths {
|
|
|
22207
22207
|
patch?: never;
|
|
22208
22208
|
trace?: never;
|
|
22209
22209
|
};
|
|
22210
|
+
"/storefront/trade-in": {
|
|
22211
|
+
parameters: {
|
|
22212
|
+
query?: never;
|
|
22213
|
+
header?: never;
|
|
22214
|
+
path?: never;
|
|
22215
|
+
cookie?: never;
|
|
22216
|
+
};
|
|
22217
|
+
/**
|
|
22218
|
+
* Buy table for the business’s own quoter (trade-in / buyback)
|
|
22219
|
+
* @description What the business pays at most for each used model, so its own website quoter reads the same table the agent quotes from instead of a hardcoded copy. Per model: `top` (flawless, «Impecable»), `used` (normal wear, «Con uso»), `direct_purchase` (`false` = taken only as part of the payment for another item, never bought outright) and `min_battery_pct` (a known battery under it is not bought; `null` = no minimum). Plus `not_bought` (models never bought), `currency` and `perfect_battery_pct` (from this battery health a unit with nothing else wrong counts as flawless). Readable with the storefront’s `stock:read`; the browser twin is `GET /widget/trade-in` with the site’s `pk_` key. `Cache-Control: private, max-age=300` + a strong `ETag` (send `If-None-Match` for a 304). 404 when the workspace keeps no buy table (`PUT /tenant/settings` `trade_in`).
|
|
22220
|
+
*/
|
|
22221
|
+
get: {
|
|
22222
|
+
parameters: {
|
|
22223
|
+
query?: never;
|
|
22224
|
+
header?: never;
|
|
22225
|
+
path?: never;
|
|
22226
|
+
cookie?: never;
|
|
22227
|
+
};
|
|
22228
|
+
requestBody?: never;
|
|
22229
|
+
responses: {
|
|
22230
|
+
/** @description The public buy table */
|
|
22231
|
+
200: {
|
|
22232
|
+
headers: {
|
|
22233
|
+
[name: string]: unknown;
|
|
22234
|
+
};
|
|
22235
|
+
content: {
|
|
22236
|
+
/**
|
|
22237
|
+
* @example {
|
|
22238
|
+
* "currency": "CLP",
|
|
22239
|
+
* "perfect_battery_pct": 90,
|
|
22240
|
+
* "models": [
|
|
22241
|
+
* {
|
|
22242
|
+
* "model": "iPhone 15",
|
|
22243
|
+
* "top": 350000,
|
|
22244
|
+
* "used": 320000,
|
|
22245
|
+
* "direct_purchase": false,
|
|
22246
|
+
* "min_battery_pct": null
|
|
22247
|
+
* },
|
|
22248
|
+
* {
|
|
22249
|
+
* "model": "iPhone 16 Pro",
|
|
22250
|
+
* "top": 600000,
|
|
22251
|
+
* "used": 570000,
|
|
22252
|
+
* "direct_purchase": true,
|
|
22253
|
+
* "min_battery_pct": 90
|
|
22254
|
+
* }
|
|
22255
|
+
* ],
|
|
22256
|
+
* "not_bought": [
|
|
22257
|
+
* "iPhone 13 mini",
|
|
22258
|
+
* "iPhone 16e"
|
|
22259
|
+
* ]
|
|
22260
|
+
* }
|
|
22261
|
+
*/
|
|
22262
|
+
"application/json": {
|
|
22263
|
+
data?: unknown;
|
|
22264
|
+
meta?: {
|
|
22265
|
+
[key: string]: unknown;
|
|
22266
|
+
};
|
|
22267
|
+
};
|
|
22268
|
+
};
|
|
22269
|
+
};
|
|
22270
|
+
/** @description Validation error */
|
|
22271
|
+
400: {
|
|
22272
|
+
headers: {
|
|
22273
|
+
[name: string]: unknown;
|
|
22274
|
+
};
|
|
22275
|
+
content: {
|
|
22276
|
+
"application/json": components["schemas"]["Error"];
|
|
22277
|
+
};
|
|
22278
|
+
};
|
|
22279
|
+
/** @description Unauthorized */
|
|
22280
|
+
401: {
|
|
22281
|
+
headers: {
|
|
22282
|
+
[name: string]: unknown;
|
|
22283
|
+
};
|
|
22284
|
+
content: {
|
|
22285
|
+
"application/json": components["schemas"]["Error"];
|
|
22286
|
+
};
|
|
22287
|
+
};
|
|
22288
|
+
/** @description Forbidden */
|
|
22289
|
+
403: {
|
|
22290
|
+
headers: {
|
|
22291
|
+
[name: string]: unknown;
|
|
22292
|
+
};
|
|
22293
|
+
content: {
|
|
22294
|
+
"application/json": components["schemas"]["Error"];
|
|
22295
|
+
};
|
|
22296
|
+
};
|
|
22297
|
+
/** @description Not found */
|
|
22298
|
+
404: {
|
|
22299
|
+
headers: {
|
|
22300
|
+
[name: string]: unknown;
|
|
22301
|
+
};
|
|
22302
|
+
content: {
|
|
22303
|
+
"application/json": components["schemas"]["Error"];
|
|
22304
|
+
};
|
|
22305
|
+
};
|
|
22306
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
22307
|
+
409: {
|
|
22308
|
+
headers: {
|
|
22309
|
+
[name: string]: unknown;
|
|
22310
|
+
};
|
|
22311
|
+
content: {
|
|
22312
|
+
"application/json": components["schemas"]["Error"];
|
|
22313
|
+
};
|
|
22314
|
+
};
|
|
22315
|
+
/** @description Rate limited */
|
|
22316
|
+
429: {
|
|
22317
|
+
headers: {
|
|
22318
|
+
[name: string]: unknown;
|
|
22319
|
+
};
|
|
22320
|
+
content: {
|
|
22321
|
+
"application/json": components["schemas"]["Error"];
|
|
22322
|
+
};
|
|
22323
|
+
};
|
|
22324
|
+
};
|
|
22325
|
+
};
|
|
22326
|
+
put?: never;
|
|
22327
|
+
post?: never;
|
|
22328
|
+
delete?: never;
|
|
22329
|
+
options?: never;
|
|
22330
|
+
head?: never;
|
|
22331
|
+
patch?: never;
|
|
22332
|
+
trace?: never;
|
|
22333
|
+
};
|
|
22210
22334
|
"/storefront/events": {
|
|
22211
22335
|
parameters: {
|
|
22212
22336
|
query?: never;
|
|
@@ -201542,13 +201666,14 @@ interface components {
|
|
|
201542
201666
|
push_enabled?: boolean;
|
|
201543
201667
|
};
|
|
201544
201668
|
TenantSettingsPublic: {
|
|
201545
|
-
/** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value), `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
|
|
201669
|
+
/** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?, direct_purchase?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value; `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. */
|
|
201546
201670
|
trade_in?: {
|
|
201547
201671
|
price_table: {
|
|
201548
201672
|
model: string;
|
|
201549
201673
|
top: number;
|
|
201550
201674
|
used: number;
|
|
201551
201675
|
min_battery_pct?: number;
|
|
201676
|
+
direct_purchase?: boolean;
|
|
201552
201677
|
}[];
|
|
201553
201678
|
not_bought?: string[];
|
|
201554
201679
|
floor_factor?: number;
|
|
@@ -201756,13 +201881,14 @@ interface components {
|
|
|
201756
201881
|
};
|
|
201757
201882
|
};
|
|
201758
201883
|
TenantSettingsPublicWrite: {
|
|
201759
|
-
/** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value), `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
|
|
201884
|
+
/** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?, direct_purchase?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value; `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. */
|
|
201760
201885
|
trade_in?: {
|
|
201761
201886
|
price_table: {
|
|
201762
201887
|
model: string;
|
|
201763
201888
|
top: number;
|
|
201764
201889
|
used: number;
|
|
201765
201890
|
min_battery_pct?: number;
|
|
201891
|
+
direct_purchase?: boolean;
|
|
201766
201892
|
}[];
|
|
201767
201893
|
not_bought?: string[];
|
|
201768
201894
|
floor_factor?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -22207,6 +22207,130 @@ interface paths {
|
|
|
22207
22207
|
patch?: never;
|
|
22208
22208
|
trace?: never;
|
|
22209
22209
|
};
|
|
22210
|
+
"/storefront/trade-in": {
|
|
22211
|
+
parameters: {
|
|
22212
|
+
query?: never;
|
|
22213
|
+
header?: never;
|
|
22214
|
+
path?: never;
|
|
22215
|
+
cookie?: never;
|
|
22216
|
+
};
|
|
22217
|
+
/**
|
|
22218
|
+
* Buy table for the business’s own quoter (trade-in / buyback)
|
|
22219
|
+
* @description What the business pays at most for each used model, so its own website quoter reads the same table the agent quotes from instead of a hardcoded copy. Per model: `top` (flawless, «Impecable»), `used` (normal wear, «Con uso»), `direct_purchase` (`false` = taken only as part of the payment for another item, never bought outright) and `min_battery_pct` (a known battery under it is not bought; `null` = no minimum). Plus `not_bought` (models never bought), `currency` and `perfect_battery_pct` (from this battery health a unit with nothing else wrong counts as flawless). Readable with the storefront’s `stock:read`; the browser twin is `GET /widget/trade-in` with the site’s `pk_` key. `Cache-Control: private, max-age=300` + a strong `ETag` (send `If-None-Match` for a 304). 404 when the workspace keeps no buy table (`PUT /tenant/settings` `trade_in`).
|
|
22220
|
+
*/
|
|
22221
|
+
get: {
|
|
22222
|
+
parameters: {
|
|
22223
|
+
query?: never;
|
|
22224
|
+
header?: never;
|
|
22225
|
+
path?: never;
|
|
22226
|
+
cookie?: never;
|
|
22227
|
+
};
|
|
22228
|
+
requestBody?: never;
|
|
22229
|
+
responses: {
|
|
22230
|
+
/** @description The public buy table */
|
|
22231
|
+
200: {
|
|
22232
|
+
headers: {
|
|
22233
|
+
[name: string]: unknown;
|
|
22234
|
+
};
|
|
22235
|
+
content: {
|
|
22236
|
+
/**
|
|
22237
|
+
* @example {
|
|
22238
|
+
* "currency": "CLP",
|
|
22239
|
+
* "perfect_battery_pct": 90,
|
|
22240
|
+
* "models": [
|
|
22241
|
+
* {
|
|
22242
|
+
* "model": "iPhone 15",
|
|
22243
|
+
* "top": 350000,
|
|
22244
|
+
* "used": 320000,
|
|
22245
|
+
* "direct_purchase": false,
|
|
22246
|
+
* "min_battery_pct": null
|
|
22247
|
+
* },
|
|
22248
|
+
* {
|
|
22249
|
+
* "model": "iPhone 16 Pro",
|
|
22250
|
+
* "top": 600000,
|
|
22251
|
+
* "used": 570000,
|
|
22252
|
+
* "direct_purchase": true,
|
|
22253
|
+
* "min_battery_pct": 90
|
|
22254
|
+
* }
|
|
22255
|
+
* ],
|
|
22256
|
+
* "not_bought": [
|
|
22257
|
+
* "iPhone 13 mini",
|
|
22258
|
+
* "iPhone 16e"
|
|
22259
|
+
* ]
|
|
22260
|
+
* }
|
|
22261
|
+
*/
|
|
22262
|
+
"application/json": {
|
|
22263
|
+
data?: unknown;
|
|
22264
|
+
meta?: {
|
|
22265
|
+
[key: string]: unknown;
|
|
22266
|
+
};
|
|
22267
|
+
};
|
|
22268
|
+
};
|
|
22269
|
+
};
|
|
22270
|
+
/** @description Validation error */
|
|
22271
|
+
400: {
|
|
22272
|
+
headers: {
|
|
22273
|
+
[name: string]: unknown;
|
|
22274
|
+
};
|
|
22275
|
+
content: {
|
|
22276
|
+
"application/json": components["schemas"]["Error"];
|
|
22277
|
+
};
|
|
22278
|
+
};
|
|
22279
|
+
/** @description Unauthorized */
|
|
22280
|
+
401: {
|
|
22281
|
+
headers: {
|
|
22282
|
+
[name: string]: unknown;
|
|
22283
|
+
};
|
|
22284
|
+
content: {
|
|
22285
|
+
"application/json": components["schemas"]["Error"];
|
|
22286
|
+
};
|
|
22287
|
+
};
|
|
22288
|
+
/** @description Forbidden */
|
|
22289
|
+
403: {
|
|
22290
|
+
headers: {
|
|
22291
|
+
[name: string]: unknown;
|
|
22292
|
+
};
|
|
22293
|
+
content: {
|
|
22294
|
+
"application/json": components["schemas"]["Error"];
|
|
22295
|
+
};
|
|
22296
|
+
};
|
|
22297
|
+
/** @description Not found */
|
|
22298
|
+
404: {
|
|
22299
|
+
headers: {
|
|
22300
|
+
[name: string]: unknown;
|
|
22301
|
+
};
|
|
22302
|
+
content: {
|
|
22303
|
+
"application/json": components["schemas"]["Error"];
|
|
22304
|
+
};
|
|
22305
|
+
};
|
|
22306
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
22307
|
+
409: {
|
|
22308
|
+
headers: {
|
|
22309
|
+
[name: string]: unknown;
|
|
22310
|
+
};
|
|
22311
|
+
content: {
|
|
22312
|
+
"application/json": components["schemas"]["Error"];
|
|
22313
|
+
};
|
|
22314
|
+
};
|
|
22315
|
+
/** @description Rate limited */
|
|
22316
|
+
429: {
|
|
22317
|
+
headers: {
|
|
22318
|
+
[name: string]: unknown;
|
|
22319
|
+
};
|
|
22320
|
+
content: {
|
|
22321
|
+
"application/json": components["schemas"]["Error"];
|
|
22322
|
+
};
|
|
22323
|
+
};
|
|
22324
|
+
};
|
|
22325
|
+
};
|
|
22326
|
+
put?: never;
|
|
22327
|
+
post?: never;
|
|
22328
|
+
delete?: never;
|
|
22329
|
+
options?: never;
|
|
22330
|
+
head?: never;
|
|
22331
|
+
patch?: never;
|
|
22332
|
+
trace?: never;
|
|
22333
|
+
};
|
|
22210
22334
|
"/storefront/events": {
|
|
22211
22335
|
parameters: {
|
|
22212
22336
|
query?: never;
|
|
@@ -201542,13 +201666,14 @@ interface components {
|
|
|
201542
201666
|
push_enabled?: boolean;
|
|
201543
201667
|
};
|
|
201544
201668
|
TenantSettingsPublic: {
|
|
201545
|
-
/** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value), `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
|
|
201669
|
+
/** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?, direct_purchase?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value; `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. */
|
|
201546
201670
|
trade_in?: {
|
|
201547
201671
|
price_table: {
|
|
201548
201672
|
model: string;
|
|
201549
201673
|
top: number;
|
|
201550
201674
|
used: number;
|
|
201551
201675
|
min_battery_pct?: number;
|
|
201676
|
+
direct_purchase?: boolean;
|
|
201552
201677
|
}[];
|
|
201553
201678
|
not_bought?: string[];
|
|
201554
201679
|
floor_factor?: number;
|
|
@@ -201756,13 +201881,14 @@ interface components {
|
|
|
201756
201881
|
};
|
|
201757
201882
|
};
|
|
201758
201883
|
TenantSettingsPublicWrite: {
|
|
201759
|
-
/** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value), `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
|
|
201884
|
+
/** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?, direct_purchase?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value; `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. */
|
|
201760
201885
|
trade_in?: {
|
|
201761
201886
|
price_table: {
|
|
201762
201887
|
model: string;
|
|
201763
201888
|
top: number;
|
|
201764
201889
|
used: number;
|
|
201765
201890
|
min_battery_pct?: number;
|
|
201891
|
+
direct_purchase?: boolean;
|
|
201766
201892
|
}[];
|
|
201767
201893
|
not_bought?: string[];
|
|
201768
201894
|
floor_factor?: number;
|
package/package.json
CHANGED