scrapebadger 0.23.0 → 0.24.1
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 +54 -11
- package/dist/index.d.ts +54 -11
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -243,10 +243,22 @@ interface VintedItemSummary {
|
|
|
243
243
|
brand_title: string;
|
|
244
244
|
/** Size label */
|
|
245
245
|
size_title: string;
|
|
246
|
-
/** Item condition status */
|
|
246
|
+
/** Item condition status, localized to the market */
|
|
247
247
|
status: string;
|
|
248
248
|
/** Item URL on Vinted */
|
|
249
249
|
url: string;
|
|
250
|
+
/** Path portion of the item URL */
|
|
251
|
+
path: string | null;
|
|
252
|
+
/** Buyer-protection fee as a decimal string, in `price.currency_code` */
|
|
253
|
+
service_fee: string | null;
|
|
254
|
+
/** Price + buyer protection as a decimal string, in `price.currency_code` */
|
|
255
|
+
total_item_price: string | null;
|
|
256
|
+
/** Whether the listing is publicly visible */
|
|
257
|
+
is_visible: boolean;
|
|
258
|
+
/** Whether the listing is a promoted/bumped placement */
|
|
259
|
+
promoted: boolean;
|
|
260
|
+
/** Vinted's own label for where the result came from (e.g. "search") */
|
|
261
|
+
content_source: string | null;
|
|
250
262
|
/** Number of users who favorited this item */
|
|
251
263
|
favourite_count: number;
|
|
252
264
|
/** Number of views */
|
|
@@ -269,20 +281,31 @@ interface VintedItemSummary {
|
|
|
269
281
|
interface VintedItemDetail extends VintedItemSummary {
|
|
270
282
|
/** Item description */
|
|
271
283
|
description: string;
|
|
272
|
-
/** Catalog category identifier */
|
|
284
|
+
/** Catalog category identifier — the value to pass as `catalog_ids` when searching */
|
|
273
285
|
catalog_id: number;
|
|
274
|
-
/** Primary color */
|
|
286
|
+
/** Primary color, localized. May list several, comma-separated */
|
|
275
287
|
color1: string;
|
|
288
|
+
/** Secondary color */
|
|
289
|
+
color2: string | null;
|
|
276
290
|
/** Seller details */
|
|
277
291
|
seller: VintedSellerSummary;
|
|
278
|
-
/** Category
|
|
279
|
-
category: string;
|
|
280
|
-
/**
|
|
292
|
+
/** Category breadcrumb, root first, localized to the market */
|
|
293
|
+
category: string[];
|
|
294
|
+
/**
|
|
295
|
+
* Vinted's relative "listed" label, localized (e.g. "Il y a une semaine").
|
|
296
|
+
* Not an ISO timestamp.
|
|
297
|
+
*/
|
|
281
298
|
upload_date: string;
|
|
282
299
|
/** Whether the item can be purchased */
|
|
283
300
|
can_buy: boolean;
|
|
284
301
|
/** Whether instant buy is enabled */
|
|
285
302
|
instant_buy: boolean;
|
|
303
|
+
/** Whether the seller accepts bundles */
|
|
304
|
+
can_bundle: boolean;
|
|
305
|
+
/** Whether the item can be reserved */
|
|
306
|
+
can_reserve: boolean;
|
|
307
|
+
/** Whether the item is favourited */
|
|
308
|
+
is_favourite: boolean;
|
|
286
309
|
/** Whether the listing is closed */
|
|
287
310
|
is_closed: boolean;
|
|
288
311
|
/** Whether the item is reserved */
|
|
@@ -501,6 +524,15 @@ interface VintedSearchParams {
|
|
|
501
524
|
price_to?: number;
|
|
502
525
|
/** Comma-separated brand IDs */
|
|
503
526
|
brand_ids?: string;
|
|
527
|
+
/**
|
|
528
|
+
* Comma-separated Vinted catalog (category) IDs to restrict the search to
|
|
529
|
+
* (e.g. "221" or "221,1242"). Vinted applies this before the search runs,
|
|
530
|
+
* and sub-categories are included.
|
|
531
|
+
*
|
|
532
|
+
* A catalog ID is the `catalog[]` value in a Vinted category URL
|
|
533
|
+
* (vinted.fr/catalog?catalog[]=221). IDs are per market.
|
|
534
|
+
*/
|
|
535
|
+
catalog_ids?: string;
|
|
504
536
|
/** Comma-separated color IDs */
|
|
505
537
|
color_ids?: string;
|
|
506
538
|
/** Comma-separated status IDs */
|
|
@@ -516,7 +548,8 @@ interface VintedSearchParams {
|
|
|
516
548
|
* When set, each returned item gains a `seller_country_code` and the response
|
|
517
549
|
* gains a top-level `seller_country` echo.
|
|
518
550
|
*
|
|
519
|
-
* Billing:
|
|
551
|
+
* Billing: a search is a flat 5 credits whatever filters you pass; seller
|
|
552
|
+
* lookups are not billed on top.
|
|
520
553
|
*/
|
|
521
554
|
seller_country?: string;
|
|
522
555
|
}
|
|
@@ -575,8 +608,16 @@ declare class SearchClient$b {
|
|
|
575
608
|
*
|
|
576
609
|
* @example
|
|
577
610
|
* ```typescript
|
|
611
|
+
* // Restrict to a Vinted category (women's T-shirts on vinted.fr).
|
|
612
|
+
* const tshirts = await client.vinted.search.search({
|
|
613
|
+
* query: "nike",
|
|
614
|
+
* catalog_ids: "221",
|
|
615
|
+
* });
|
|
616
|
+
* ```
|
|
617
|
+
*
|
|
618
|
+
* @example
|
|
619
|
+
* ```typescript
|
|
578
620
|
* // Filter results to sellers physically located in France or Belgium.
|
|
579
|
-
* // Billing: 1 base credit + 1 credit per uncached seller looked up.
|
|
580
621
|
* const local = await client.vinted.search.search({
|
|
581
622
|
* query: "vintage jacket",
|
|
582
623
|
* seller_country: "fr,be",
|
|
@@ -1647,8 +1688,10 @@ declare class JobsClient {
|
|
|
1647
1688
|
* Client for Google Lens visual search by image URL.
|
|
1648
1689
|
*
|
|
1649
1690
|
* Response carries `lens_results` (Scrapingdog-parity alias) with
|
|
1650
|
-
* `title`, `source`, `source_favicon`, `thumbnail`,
|
|
1651
|
-
*
|
|
1691
|
+
* `title`, `source`, `source_favicon`, `thumbnail`, `rating`,
|
|
1692
|
+
* `reviews` and `in_stock`. Shoppable matches also carry `price`
|
|
1693
|
+
* (`{value, currency, extracted}`) plus the raw `tag` chip it is
|
|
1694
|
+
* parsed from. `related_searches` chips come alongside. Legacy
|
|
1652
1695
|
* `results` alias retained for backwards compat.
|
|
1653
1696
|
*
|
|
1654
1697
|
* @example
|
|
@@ -1658,7 +1701,7 @@ declare class JobsClient {
|
|
|
1658
1701
|
* product: true, // bias towards shoppable matches
|
|
1659
1702
|
* });
|
|
1660
1703
|
* for (const match of out.lens_results) {
|
|
1661
|
-
* console.log(match.title, match.
|
|
1704
|
+
* console.log(match.title, match.price?.value, match.price?.currency);
|
|
1662
1705
|
* }
|
|
1663
1706
|
* ```
|
|
1664
1707
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -243,10 +243,22 @@ interface VintedItemSummary {
|
|
|
243
243
|
brand_title: string;
|
|
244
244
|
/** Size label */
|
|
245
245
|
size_title: string;
|
|
246
|
-
/** Item condition status */
|
|
246
|
+
/** Item condition status, localized to the market */
|
|
247
247
|
status: string;
|
|
248
248
|
/** Item URL on Vinted */
|
|
249
249
|
url: string;
|
|
250
|
+
/** Path portion of the item URL */
|
|
251
|
+
path: string | null;
|
|
252
|
+
/** Buyer-protection fee as a decimal string, in `price.currency_code` */
|
|
253
|
+
service_fee: string | null;
|
|
254
|
+
/** Price + buyer protection as a decimal string, in `price.currency_code` */
|
|
255
|
+
total_item_price: string | null;
|
|
256
|
+
/** Whether the listing is publicly visible */
|
|
257
|
+
is_visible: boolean;
|
|
258
|
+
/** Whether the listing is a promoted/bumped placement */
|
|
259
|
+
promoted: boolean;
|
|
260
|
+
/** Vinted's own label for where the result came from (e.g. "search") */
|
|
261
|
+
content_source: string | null;
|
|
250
262
|
/** Number of users who favorited this item */
|
|
251
263
|
favourite_count: number;
|
|
252
264
|
/** Number of views */
|
|
@@ -269,20 +281,31 @@ interface VintedItemSummary {
|
|
|
269
281
|
interface VintedItemDetail extends VintedItemSummary {
|
|
270
282
|
/** Item description */
|
|
271
283
|
description: string;
|
|
272
|
-
/** Catalog category identifier */
|
|
284
|
+
/** Catalog category identifier — the value to pass as `catalog_ids` when searching */
|
|
273
285
|
catalog_id: number;
|
|
274
|
-
/** Primary color */
|
|
286
|
+
/** Primary color, localized. May list several, comma-separated */
|
|
275
287
|
color1: string;
|
|
288
|
+
/** Secondary color */
|
|
289
|
+
color2: string | null;
|
|
276
290
|
/** Seller details */
|
|
277
291
|
seller: VintedSellerSummary;
|
|
278
|
-
/** Category
|
|
279
|
-
category: string;
|
|
280
|
-
/**
|
|
292
|
+
/** Category breadcrumb, root first, localized to the market */
|
|
293
|
+
category: string[];
|
|
294
|
+
/**
|
|
295
|
+
* Vinted's relative "listed" label, localized (e.g. "Il y a une semaine").
|
|
296
|
+
* Not an ISO timestamp.
|
|
297
|
+
*/
|
|
281
298
|
upload_date: string;
|
|
282
299
|
/** Whether the item can be purchased */
|
|
283
300
|
can_buy: boolean;
|
|
284
301
|
/** Whether instant buy is enabled */
|
|
285
302
|
instant_buy: boolean;
|
|
303
|
+
/** Whether the seller accepts bundles */
|
|
304
|
+
can_bundle: boolean;
|
|
305
|
+
/** Whether the item can be reserved */
|
|
306
|
+
can_reserve: boolean;
|
|
307
|
+
/** Whether the item is favourited */
|
|
308
|
+
is_favourite: boolean;
|
|
286
309
|
/** Whether the listing is closed */
|
|
287
310
|
is_closed: boolean;
|
|
288
311
|
/** Whether the item is reserved */
|
|
@@ -501,6 +524,15 @@ interface VintedSearchParams {
|
|
|
501
524
|
price_to?: number;
|
|
502
525
|
/** Comma-separated brand IDs */
|
|
503
526
|
brand_ids?: string;
|
|
527
|
+
/**
|
|
528
|
+
* Comma-separated Vinted catalog (category) IDs to restrict the search to
|
|
529
|
+
* (e.g. "221" or "221,1242"). Vinted applies this before the search runs,
|
|
530
|
+
* and sub-categories are included.
|
|
531
|
+
*
|
|
532
|
+
* A catalog ID is the `catalog[]` value in a Vinted category URL
|
|
533
|
+
* (vinted.fr/catalog?catalog[]=221). IDs are per market.
|
|
534
|
+
*/
|
|
535
|
+
catalog_ids?: string;
|
|
504
536
|
/** Comma-separated color IDs */
|
|
505
537
|
color_ids?: string;
|
|
506
538
|
/** Comma-separated status IDs */
|
|
@@ -516,7 +548,8 @@ interface VintedSearchParams {
|
|
|
516
548
|
* When set, each returned item gains a `seller_country_code` and the response
|
|
517
549
|
* gains a top-level `seller_country` echo.
|
|
518
550
|
*
|
|
519
|
-
* Billing:
|
|
551
|
+
* Billing: a search is a flat 5 credits whatever filters you pass; seller
|
|
552
|
+
* lookups are not billed on top.
|
|
520
553
|
*/
|
|
521
554
|
seller_country?: string;
|
|
522
555
|
}
|
|
@@ -575,8 +608,16 @@ declare class SearchClient$b {
|
|
|
575
608
|
*
|
|
576
609
|
* @example
|
|
577
610
|
* ```typescript
|
|
611
|
+
* // Restrict to a Vinted category (women's T-shirts on vinted.fr).
|
|
612
|
+
* const tshirts = await client.vinted.search.search({
|
|
613
|
+
* query: "nike",
|
|
614
|
+
* catalog_ids: "221",
|
|
615
|
+
* });
|
|
616
|
+
* ```
|
|
617
|
+
*
|
|
618
|
+
* @example
|
|
619
|
+
* ```typescript
|
|
578
620
|
* // Filter results to sellers physically located in France or Belgium.
|
|
579
|
-
* // Billing: 1 base credit + 1 credit per uncached seller looked up.
|
|
580
621
|
* const local = await client.vinted.search.search({
|
|
581
622
|
* query: "vintage jacket",
|
|
582
623
|
* seller_country: "fr,be",
|
|
@@ -1647,8 +1688,10 @@ declare class JobsClient {
|
|
|
1647
1688
|
* Client for Google Lens visual search by image URL.
|
|
1648
1689
|
*
|
|
1649
1690
|
* Response carries `lens_results` (Scrapingdog-parity alias) with
|
|
1650
|
-
* `title`, `source`, `source_favicon`, `thumbnail`,
|
|
1651
|
-
*
|
|
1691
|
+
* `title`, `source`, `source_favicon`, `thumbnail`, `rating`,
|
|
1692
|
+
* `reviews` and `in_stock`. Shoppable matches also carry `price`
|
|
1693
|
+
* (`{value, currency, extracted}`) plus the raw `tag` chip it is
|
|
1694
|
+
* parsed from. `related_searches` chips come alongside. Legacy
|
|
1652
1695
|
* `results` alias retained for backwards compat.
|
|
1653
1696
|
*
|
|
1654
1697
|
* @example
|
|
@@ -1658,7 +1701,7 @@ declare class JobsClient {
|
|
|
1658
1701
|
* product: true, // bias towards shoppable matches
|
|
1659
1702
|
* });
|
|
1660
1703
|
* for (const match of out.lens_results) {
|
|
1661
|
-
* console.log(match.title, match.
|
|
1704
|
+
* console.log(match.title, match.price?.value, match.price?.currency);
|
|
1662
1705
|
* }
|
|
1663
1706
|
* ```
|
|
1664
1707
|
*/
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
var WebSocket__default = /*#__PURE__*/_interopDefault(WebSocket);
|
|
10
10
|
|
|
11
11
|
// src/internal/version.ts
|
|
12
|
-
var SDK_VERSION = "0.
|
|
12
|
+
var SDK_VERSION = "0.24.1";
|
|
13
13
|
|
|
14
14
|
// src/internal/exceptions.ts
|
|
15
15
|
var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
|
|
@@ -2534,8 +2534,16 @@ var SearchClient = class {
|
|
|
2534
2534
|
*
|
|
2535
2535
|
* @example
|
|
2536
2536
|
* ```typescript
|
|
2537
|
+
* // Restrict to a Vinted category (women's T-shirts on vinted.fr).
|
|
2538
|
+
* const tshirts = await client.vinted.search.search({
|
|
2539
|
+
* query: "nike",
|
|
2540
|
+
* catalog_ids: "221",
|
|
2541
|
+
* });
|
|
2542
|
+
* ```
|
|
2543
|
+
*
|
|
2544
|
+
* @example
|
|
2545
|
+
* ```typescript
|
|
2537
2546
|
* // Filter results to sellers physically located in France or Belgium.
|
|
2538
|
-
* // Billing: 1 base credit + 1 credit per uncached seller looked up.
|
|
2539
2547
|
* const local = await client.vinted.search.search({
|
|
2540
2548
|
* query: "vintage jacket",
|
|
2541
2549
|
* seller_country: "fr,be",
|
|
@@ -2555,6 +2563,7 @@ var SearchClient = class {
|
|
|
2555
2563
|
price_from: params.price_from,
|
|
2556
2564
|
price_to: params.price_to,
|
|
2557
2565
|
brand_ids: params.brand_ids,
|
|
2566
|
+
catalog_ids: params.catalog_ids,
|
|
2558
2567
|
color_ids: params.color_ids,
|
|
2559
2568
|
status_ids: params.status_ids,
|
|
2560
2569
|
order: params.order,
|