scrapebadger 0.13.1 → 0.14.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 +35 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -257,6 +257,11 @@ interface VintedItemSummary {
|
|
|
257
257
|
photo: VintedPhoto;
|
|
258
258
|
/** All photos */
|
|
259
259
|
photos: VintedPhoto[];
|
|
260
|
+
/**
|
|
261
|
+
* Physical country of the seller as an upper-case ISO-2 code (e.g. "FR"),
|
|
262
|
+
* or null. Populated only when the `seller_country` search filter is used.
|
|
263
|
+
*/
|
|
264
|
+
seller_country_code: string | null;
|
|
260
265
|
}
|
|
261
266
|
/**
|
|
262
267
|
* Full item detail with all metadata.
|
|
@@ -413,6 +418,11 @@ interface SearchResponse$1 {
|
|
|
413
418
|
pagination: VintedPagination;
|
|
414
419
|
/** Market code used for this search */
|
|
415
420
|
market: string;
|
|
421
|
+
/**
|
|
422
|
+
* Echo of the normalized `seller_country` filter applied to this search
|
|
423
|
+
* (comma-separated ISO-2 codes, e.g. "fr,be"), or null when no filter was used.
|
|
424
|
+
*/
|
|
425
|
+
seller_country: string | null;
|
|
416
426
|
}
|
|
417
427
|
/**
|
|
418
428
|
* Response from the item detail endpoint.
|
|
@@ -497,6 +507,18 @@ interface VintedSearchParams {
|
|
|
497
507
|
status_ids?: string;
|
|
498
508
|
/** Sort order */
|
|
499
509
|
order?: "relevance" | "newest_first" | "price_low_to_high" | "price_high_to_low";
|
|
510
|
+
/**
|
|
511
|
+
* Filter results to items whose seller is physically located in one of the
|
|
512
|
+
* given countries. A comma-separated list of ISO-2 country codes (e.g. "fr"
|
|
513
|
+
* or "fr,be"). Vinted federates cross-border EU listings into each market
|
|
514
|
+
* domain and has no native country filter, so this is applied by ScrapeBadger.
|
|
515
|
+
*
|
|
516
|
+
* When set, each returned item gains a `seller_country_code` and the response
|
|
517
|
+
* gains a top-level `seller_country` echo.
|
|
518
|
+
*
|
|
519
|
+
* Billing: 1 base credit + 1 credit per uncached seller looked up.
|
|
520
|
+
*/
|
|
521
|
+
seller_country?: string;
|
|
500
522
|
}
|
|
501
523
|
|
|
502
524
|
/**
|
|
@@ -550,6 +572,19 @@ declare class SearchClient$5 {
|
|
|
550
572
|
* });
|
|
551
573
|
* console.log(`Found ${results.pagination.total_entries} items`);
|
|
552
574
|
* ```
|
|
575
|
+
*
|
|
576
|
+
* @example
|
|
577
|
+
* ```typescript
|
|
578
|
+
* // Filter results to sellers physically located in France or Belgium.
|
|
579
|
+
* // Billing: 1 base credit + 1 credit per uncached seller looked up.
|
|
580
|
+
* const local = await client.vinted.search.search({
|
|
581
|
+
* query: "vintage jacket",
|
|
582
|
+
* seller_country: "fr,be",
|
|
583
|
+
* });
|
|
584
|
+
* for (const item of local.items) {
|
|
585
|
+
* console.log(`${item.title} — seller in ${item.seller_country_code}`);
|
|
586
|
+
* }
|
|
587
|
+
* ```
|
|
553
588
|
*/
|
|
554
589
|
search(params: VintedSearchParams): Promise<SearchResponse$1>;
|
|
555
590
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -257,6 +257,11 @@ interface VintedItemSummary {
|
|
|
257
257
|
photo: VintedPhoto;
|
|
258
258
|
/** All photos */
|
|
259
259
|
photos: VintedPhoto[];
|
|
260
|
+
/**
|
|
261
|
+
* Physical country of the seller as an upper-case ISO-2 code (e.g. "FR"),
|
|
262
|
+
* or null. Populated only when the `seller_country` search filter is used.
|
|
263
|
+
*/
|
|
264
|
+
seller_country_code: string | null;
|
|
260
265
|
}
|
|
261
266
|
/**
|
|
262
267
|
* Full item detail with all metadata.
|
|
@@ -413,6 +418,11 @@ interface SearchResponse$1 {
|
|
|
413
418
|
pagination: VintedPagination;
|
|
414
419
|
/** Market code used for this search */
|
|
415
420
|
market: string;
|
|
421
|
+
/**
|
|
422
|
+
* Echo of the normalized `seller_country` filter applied to this search
|
|
423
|
+
* (comma-separated ISO-2 codes, e.g. "fr,be"), or null when no filter was used.
|
|
424
|
+
*/
|
|
425
|
+
seller_country: string | null;
|
|
416
426
|
}
|
|
417
427
|
/**
|
|
418
428
|
* Response from the item detail endpoint.
|
|
@@ -497,6 +507,18 @@ interface VintedSearchParams {
|
|
|
497
507
|
status_ids?: string;
|
|
498
508
|
/** Sort order */
|
|
499
509
|
order?: "relevance" | "newest_first" | "price_low_to_high" | "price_high_to_low";
|
|
510
|
+
/**
|
|
511
|
+
* Filter results to items whose seller is physically located in one of the
|
|
512
|
+
* given countries. A comma-separated list of ISO-2 country codes (e.g. "fr"
|
|
513
|
+
* or "fr,be"). Vinted federates cross-border EU listings into each market
|
|
514
|
+
* domain and has no native country filter, so this is applied by ScrapeBadger.
|
|
515
|
+
*
|
|
516
|
+
* When set, each returned item gains a `seller_country_code` and the response
|
|
517
|
+
* gains a top-level `seller_country` echo.
|
|
518
|
+
*
|
|
519
|
+
* Billing: 1 base credit + 1 credit per uncached seller looked up.
|
|
520
|
+
*/
|
|
521
|
+
seller_country?: string;
|
|
500
522
|
}
|
|
501
523
|
|
|
502
524
|
/**
|
|
@@ -550,6 +572,19 @@ declare class SearchClient$5 {
|
|
|
550
572
|
* });
|
|
551
573
|
* console.log(`Found ${results.pagination.total_entries} items`);
|
|
552
574
|
* ```
|
|
575
|
+
*
|
|
576
|
+
* @example
|
|
577
|
+
* ```typescript
|
|
578
|
+
* // Filter results to sellers physically located in France or Belgium.
|
|
579
|
+
* // Billing: 1 base credit + 1 credit per uncached seller looked up.
|
|
580
|
+
* const local = await client.vinted.search.search({
|
|
581
|
+
* query: "vintage jacket",
|
|
582
|
+
* seller_country: "fr,be",
|
|
583
|
+
* });
|
|
584
|
+
* for (const item of local.items) {
|
|
585
|
+
* console.log(`${item.title} — seller in ${item.seller_country_code}`);
|
|
586
|
+
* }
|
|
587
|
+
* ```
|
|
553
588
|
*/
|
|
554
589
|
search(params: VintedSearchParams): Promise<SearchResponse$1>;
|
|
555
590
|
}
|
package/dist/index.js
CHANGED
|
@@ -2531,6 +2531,19 @@ var SearchClient = class {
|
|
|
2531
2531
|
* });
|
|
2532
2532
|
* console.log(`Found ${results.pagination.total_entries} items`);
|
|
2533
2533
|
* ```
|
|
2534
|
+
*
|
|
2535
|
+
* @example
|
|
2536
|
+
* ```typescript
|
|
2537
|
+
* // Filter results to sellers physically located in France or Belgium.
|
|
2538
|
+
* // Billing: 1 base credit + 1 credit per uncached seller looked up.
|
|
2539
|
+
* const local = await client.vinted.search.search({
|
|
2540
|
+
* query: "vintage jacket",
|
|
2541
|
+
* seller_country: "fr,be",
|
|
2542
|
+
* });
|
|
2543
|
+
* for (const item of local.items) {
|
|
2544
|
+
* console.log(`${item.title} — seller in ${item.seller_country_code}`);
|
|
2545
|
+
* }
|
|
2546
|
+
* ```
|
|
2534
2547
|
*/
|
|
2535
2548
|
async search(params) {
|
|
2536
2549
|
return this.client.request("/v1/vinted/search", {
|
|
@@ -2544,7 +2557,8 @@ var SearchClient = class {
|
|
|
2544
2557
|
brand_ids: params.brand_ids,
|
|
2545
2558
|
color_ids: params.color_ids,
|
|
2546
2559
|
status_ids: params.status_ids,
|
|
2547
|
-
order: params.order
|
|
2560
|
+
order: params.order,
|
|
2561
|
+
seller_country: params.seller_country
|
|
2548
2562
|
}
|
|
2549
2563
|
});
|
|
2550
2564
|
}
|