scavio 0.34.2 → 0.36.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/README.md +63 -2
- package/dist/index.cjs +123 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +182 -1
- package/dist/index.d.ts +182 -1
- package/dist/index.js +121 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -145,7 +145,7 @@ function parseRetryAfter(header) {
|
|
|
145
145
|
var BASE_URL = "https://api.scavio.dev";
|
|
146
146
|
var DEFAULT_TIMEOUT = 3e4;
|
|
147
147
|
var DEFAULT_MAX_RETRIES = 2;
|
|
148
|
-
var SDK_VERSION = true ? "0.
|
|
148
|
+
var SDK_VERSION = true ? "0.36.0" : "0.0.0";
|
|
149
149
|
var USER_AGENT = `scavio-js/${SDK_VERSION}`;
|
|
150
150
|
function isServerRuntime() {
|
|
151
151
|
const g = globalThis;
|
|
@@ -3788,6 +3788,122 @@ var MenardsNamespace = class {
|
|
|
3788
3788
|
}
|
|
3789
3789
|
};
|
|
3790
3790
|
|
|
3791
|
+
// src/namespaces/nordstrom.ts
|
|
3792
|
+
var NORDSTROM_TIMEOUT = 12e4;
|
|
3793
|
+
var NordstromNamespace = class {
|
|
3794
|
+
constructor(client) {
|
|
3795
|
+
this.client = client;
|
|
3796
|
+
}
|
|
3797
|
+
client;
|
|
3798
|
+
/**
|
|
3799
|
+
* Search nordstrom.com (US) products, 24 per page, sorted by relevance,
|
|
3800
|
+
* rating, price, newest or percent off. Each result has style id, URL,
|
|
3801
|
+
* name, brand, image, current price and price range in dollars, original
|
|
3802
|
+
* price range, percent off and on-sale flag, rating, review count, badges
|
|
3803
|
+
* such as new or new_markdown, a low-inventory flag, whether it is sold by a
|
|
3804
|
+
* marketplace seller (and the seller's name), and every color with its color
|
|
3805
|
+
* family and image. Also returns the total result count and page count. Use
|
|
3806
|
+
* a result's url or style_id with product().
|
|
3807
|
+
*
|
|
3808
|
+
* Costs 5 credits.
|
|
3809
|
+
*/
|
|
3810
|
+
async search(options) {
|
|
3811
|
+
return this.client._post("/api/v1/nordstrom/search", options, void 0, NORDSTROM_TIMEOUT);
|
|
3812
|
+
}
|
|
3813
|
+
/**
|
|
3814
|
+
* One nordstrom.com (US) product by URL or style id: name, brand,
|
|
3815
|
+
* description, feature bullets, fit notes, final-sale flag, current,
|
|
3816
|
+
* original and clearance price ranges, percent off, rating, review count,
|
|
3817
|
+
* the star histogram, the size-fit distribution (too small to too big), the
|
|
3818
|
+
* AI review summary when the site shows one, the most mentioned praised and
|
|
3819
|
+
* criticized features with a quote each, breadcrumbs and images. Every color
|
|
3820
|
+
* lists its images and every size as a sku with sku id, size, size type,
|
|
3821
|
+
* UPC, price, original price, percent off, price type (regular, clearance,
|
|
3822
|
+
* promotion), in_stock and the quantity available to ship. in_stock is true
|
|
3823
|
+
* when the sku can be shipped or picked up in a store, so a sku held only in
|
|
3824
|
+
* a store reads in stock with quantity 0 (availability() lists its pickup
|
|
3825
|
+
* stores). Includes the reviews shown on the product page (up to about 13),
|
|
3826
|
+
* with the total review count; each review has title, text, rating, size
|
|
3827
|
+
* rating, author, date, helpful votes and verified-purchase flag. Pass url
|
|
3828
|
+
* or style_id. An unknown style id is a 404.
|
|
3829
|
+
*
|
|
3830
|
+
* Costs 5 credits.
|
|
3831
|
+
*/
|
|
3832
|
+
async product(options) {
|
|
3833
|
+
return this.client._post("/api/v1/nordstrom/product", options, void 0, NORDSTROM_TIMEOUT);
|
|
3834
|
+
}
|
|
3835
|
+
/**
|
|
3836
|
+
* Browse a nordstrom.com (US) category page, 24 products per page, sorted
|
|
3837
|
+
* by relevance, rating, price, newest or percent off. Works on any /browse
|
|
3838
|
+
* category, including sale (sale/women), new arrivals (/browse/new) and
|
|
3839
|
+
* top-level departments (/browse/women). Returns the category's name, page
|
|
3840
|
+
* title, path, URL, breadcrumbs and subcategories (name and path, for
|
|
3841
|
+
* drilling down). Each product has the same fields as a search result. Also
|
|
3842
|
+
* returns the total result count, page count, and the filter sidebar: each
|
|
3843
|
+
* filter group with its options and product counts (groups with more than
|
|
3844
|
+
* 100 options list the 100 with the most products and give the full
|
|
3845
|
+
* option_count). An unknown category is a 404.
|
|
3846
|
+
*
|
|
3847
|
+
* Costs 5 credits.
|
|
3848
|
+
*/
|
|
3849
|
+
async category(options) {
|
|
3850
|
+
return this.client._post("/api/v1/nordstrom/category", options, void 0, NORDSTROM_TIMEOUT);
|
|
3851
|
+
}
|
|
3852
|
+
/**
|
|
3853
|
+
* List a brand's products on nordstrom.com (US) from its brand page, 24 per
|
|
3854
|
+
* page, sorted by relevance, rating, price, newest or percent off. Returns
|
|
3855
|
+
* the brand's name, path, URL, breadcrumbs and sub-pages (Women, Men,
|
|
3856
|
+
* Kids...), products with the same fields as a search result, the total
|
|
3857
|
+
* result count, page count and the filter sidebar with option counts. An
|
|
3858
|
+
* unknown brand is a 404.
|
|
3859
|
+
*
|
|
3860
|
+
* Costs 5 credits.
|
|
3861
|
+
*/
|
|
3862
|
+
async brand(options) {
|
|
3863
|
+
return this.client._post("/api/v1/nordstrom/brand", options, void 0, NORDSTROM_TIMEOUT);
|
|
3864
|
+
}
|
|
3865
|
+
/**
|
|
3866
|
+
* Find Nordstrom stores (full-line stores and Nordstrom Local) near a US ZIP
|
|
3867
|
+
* code or latitude/longitude within up to 100 miles, nearest first, or look
|
|
3868
|
+
* stores up by store number. Each store has store number, name, type
|
|
3869
|
+
* (full_line or local), address, phone, weekly hours, holiday hours when
|
|
3870
|
+
* posted, open and close times for the next 8 days, time zone, distance in
|
|
3871
|
+
* miles, coordinates, whether it offers buy-online pickup and curbside
|
|
3872
|
+
* pickup, its amenities and its store page URL. A ZIP with no store in range
|
|
3873
|
+
* returns an empty list.
|
|
3874
|
+
*
|
|
3875
|
+
* Costs 5 credits.
|
|
3876
|
+
*/
|
|
3877
|
+
async stores(options) {
|
|
3878
|
+
return this.client._post("/api/v1/nordstrom/stores", options, void 0, NORDSTROM_TIMEOUT);
|
|
3879
|
+
}
|
|
3880
|
+
/**
|
|
3881
|
+
* Online and store-pickup availability for every size and color of one
|
|
3882
|
+
* nordstrom.com (US) product, by URL or style id, optionally one sku. Each
|
|
3883
|
+
* sku has sku id, size, color, UPC, in_stock, whether it ships and the
|
|
3884
|
+
* quantity available to ship, the quantity available for pickup, and the
|
|
3885
|
+
* stores where it can be picked up (store number, name, address, city,
|
|
3886
|
+
* state, ZIP, phone). Quantities are chain-wide: per store Nordstrom only
|
|
3887
|
+
* says whether pickup is available, not how many. An unknown style id or sku
|
|
3888
|
+
* id is a 404.
|
|
3889
|
+
*
|
|
3890
|
+
* Costs 10 credits (the product page plus the store lookup).
|
|
3891
|
+
*/
|
|
3892
|
+
async availability(options) {
|
|
3893
|
+
return this.client._post("/api/v1/nordstrom/availability", options, void 0, NORDSTROM_TIMEOUT);
|
|
3894
|
+
}
|
|
3895
|
+
/**
|
|
3896
|
+
* The search-box autocomplete of nordstrom.com: the queries Nordstrom
|
|
3897
|
+
* suggests for a partial search term, most likely first. Useful for keyword
|
|
3898
|
+
* research and for building queries for search().
|
|
3899
|
+
*
|
|
3900
|
+
* Costs 5 credits.
|
|
3901
|
+
*/
|
|
3902
|
+
async suggestions(options) {
|
|
3903
|
+
return this.client._post("/api/v1/nordstrom/suggestions", options, void 0, NORDSTROM_TIMEOUT);
|
|
3904
|
+
}
|
|
3905
|
+
};
|
|
3906
|
+
|
|
3791
3907
|
// src/namespaces/trustpilot.ts
|
|
3792
3908
|
var TrustpilotNamespace = class {
|
|
3793
3909
|
constructor(client) {
|
|
@@ -4320,6 +4436,7 @@ var Scavio = class extends ScavioCore {
|
|
|
4320
4436
|
iherb;
|
|
4321
4437
|
chewy;
|
|
4322
4438
|
menards;
|
|
4439
|
+
nordstrom;
|
|
4323
4440
|
trustpilot;
|
|
4324
4441
|
chatgpt;
|
|
4325
4442
|
gemini;
|
|
@@ -4400,6 +4517,7 @@ var Scavio = class extends ScavioCore {
|
|
|
4400
4517
|
this.iherb = new IherbNamespace(this);
|
|
4401
4518
|
this.chewy = new ChewyNamespace(this);
|
|
4402
4519
|
this.menards = new MenardsNamespace(this);
|
|
4520
|
+
this.nordstrom = new NordstromNamespace(this);
|
|
4403
4521
|
this.trustpilot = new TrustpilotNamespace(this);
|
|
4404
4522
|
this.chatgpt = new ChatgptNamespace(this);
|
|
4405
4523
|
this.gemini = new GeminiNamespace(this);
|
|
@@ -4554,6 +4672,8 @@ export {
|
|
|
4554
4672
|
MetaAdsNamespace,
|
|
4555
4673
|
MicroCenterNamespace,
|
|
4556
4674
|
MissingAPIKeyError,
|
|
4675
|
+
NORDSTROM_TIMEOUT,
|
|
4676
|
+
NordstromNamespace,
|
|
4557
4677
|
NotFoundError,
|
|
4558
4678
|
PETCO_SLOW_TIMEOUT,
|
|
4559
4679
|
PetcoNamespace,
|