scavio 0.35.0 → 0.37.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.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.35.0" : "0.0.0";
148
+ var SDK_VERSION = true ? "0.37.0" : "0.0.0";
149
149
  var USER_AGENT = `scavio-js/${SDK_VERSION}`;
150
150
  function isServerRuntime() {
151
151
  const g = globalThis;
@@ -3790,6 +3790,7 @@ var MenardsNamespace = class {
3790
3790
 
3791
3791
  // src/namespaces/nordstrom.ts
3792
3792
  var NORDSTROM_TIMEOUT = 12e4;
3793
+ var NORDSTROM_REVIEWS_TIMEOUT = 15e4;
3793
3794
  var NordstromNamespace = class {
3794
3795
  constructor(client) {
3795
3796
  this.client = client;
@@ -3819,16 +3820,116 @@ var NordstromNamespace = class {
3819
3820
  * criticized features with a quote each, breadcrumbs and images. Every color
3820
3821
  * lists its images and every size as a sku with sku id, size, size type,
3821
3822
  * UPC, price, original price, percent off, price type (regular, clearance,
3822
- * promotion), in_stock and the quantity available to ship. Includes the
3823
- * 12-13 reviews shown on the product page, with title, text, rating, size
3824
- * rating, author, date, helpful votes and verified-purchase flag. Pass url
3825
- * or style_id. An unknown style id is a 404.
3823
+ * promotion), in_stock and the quantity available to ship. in_stock is true
3824
+ * when the sku can be shipped or picked up in a store, so a sku held only in
3825
+ * a store reads in stock with quantity 0 (availability() lists its pickup
3826
+ * stores). Includes the reviews shown on the product page (up to about 13),
3827
+ * with the total review count; each review has title, text, rating, size
3828
+ * rating, author, date, helpful votes and verified-purchase flag
3829
+ * (reviews() pages the full review history). Pass url or style_id. An
3830
+ * unknown style id is a 404.
3826
3831
  *
3827
3832
  * Costs 5 credits.
3828
3833
  */
3829
3834
  async product(options) {
3830
3835
  return this.client._post("/api/v1/nordstrom/product", options, void 0, NORDSTROM_TIMEOUT);
3831
3836
  }
3837
+ /**
3838
+ * Browse a nordstrom.com (US) category page, 24 products per page, sorted
3839
+ * by relevance, rating, price, newest or percent off. Works on any /browse
3840
+ * category, including sale (sale/women), new arrivals (/browse/new) and
3841
+ * top-level departments (/browse/women). Returns the category's name, page
3842
+ * title, path, URL, breadcrumbs and subcategories (name and path, for
3843
+ * drilling down). Each product has the same fields as a search result. Also
3844
+ * returns the total result count, page count, and the filter sidebar: each
3845
+ * filter group with its options and product counts (groups with more than
3846
+ * 100 options list the 100 with the most products and give the full
3847
+ * option_count). An unknown category is a 404.
3848
+ *
3849
+ * Costs 5 credits.
3850
+ */
3851
+ async category(options) {
3852
+ return this.client._post("/api/v1/nordstrom/category", options, void 0, NORDSTROM_TIMEOUT);
3853
+ }
3854
+ /**
3855
+ * List a brand's products on nordstrom.com (US) from its brand page, 24 per
3856
+ * page, sorted by relevance, rating, price, newest or percent off. Returns
3857
+ * the brand's name, path, URL, breadcrumbs and sub-pages (Women, Men,
3858
+ * Kids...), products with the same fields as a search result, the total
3859
+ * result count, page count and the filter sidebar with option counts. An
3860
+ * unknown brand is a 404.
3861
+ *
3862
+ * Costs 5 credits.
3863
+ */
3864
+ async brand(options) {
3865
+ return this.client._post("/api/v1/nordstrom/brand", options, void 0, NORDSTROM_TIMEOUT);
3866
+ }
3867
+ /**
3868
+ * Find Nordstrom stores (full-line stores and Nordstrom Local) near a US ZIP
3869
+ * code or latitude/longitude within up to 100 miles, nearest first, or look
3870
+ * stores up by store number. Each store has store number, name, type
3871
+ * (full_line or local), address, phone, weekly hours, holiday hours when
3872
+ * posted, open and close times for the next 8 days, time zone, distance in
3873
+ * miles, coordinates, whether it offers buy-online pickup and curbside
3874
+ * pickup, its amenities and its store page URL. A ZIP with no store in range
3875
+ * returns an empty list.
3876
+ *
3877
+ * Costs 5 credits.
3878
+ */
3879
+ async stores(options) {
3880
+ return this.client._post("/api/v1/nordstrom/stores", options, void 0, NORDSTROM_TIMEOUT);
3881
+ }
3882
+ /**
3883
+ * Online and store-pickup availability for every size and color of one
3884
+ * nordstrom.com (US) product, by URL or style id, optionally one sku. Each
3885
+ * sku has sku id, size, color, UPC, in_stock, whether it ships and the
3886
+ * quantity available to ship, the quantity available for pickup, and the
3887
+ * stores where it can be picked up (store number, name, address, city,
3888
+ * state, ZIP, phone). Quantities are chain-wide: per store Nordstrom only
3889
+ * says whether pickup is available, not how many. An unknown style id or sku
3890
+ * id is a 404.
3891
+ *
3892
+ * Costs 10 credits (the product page plus the store lookup).
3893
+ */
3894
+ async availability(options) {
3895
+ return this.client._post("/api/v1/nordstrom/availability", options, void 0, NORDSTROM_TIMEOUT);
3896
+ }
3897
+ /**
3898
+ * The search-box autocomplete of nordstrom.com: the queries Nordstrom
3899
+ * suggests for a partial search term, most likely first. Useful for keyword
3900
+ * research and for building queries for search().
3901
+ *
3902
+ * Costs 5 credits.
3903
+ */
3904
+ async suggestions(options) {
3905
+ return this.client._post("/api/v1/nordstrom/suggestions", options, void 0, NORDSTROM_TIMEOUT);
3906
+ }
3907
+ /**
3908
+ * Customer reviews of one nordstrom.com (US) product by URL or style id, up
3909
+ * to 200 per call (default 60), sorted most helpful (default), most recent,
3910
+ * highest rated or lowest rated, optionally filtered to star ratings,
3911
+ * verified purchases, reviews with photos, or a text search. Returns the
3912
+ * product's review summary (average rating, total reviews, star histogram,
3913
+ * size rating 1 runs small to 5 runs big, width rating where the site has
3914
+ * one, the most mentioned praised and criticized features with a quote each,
3915
+ * and the count of rating-only reviews), the AI review summary when the site
3916
+ * shows one, the number of reviews matching the filters (total_results),
3917
+ * returned and has_more. Each review has id, title, text, star rating, size
3918
+ * rating, author, date, helpful votes, verified-purchase flag, reviewer
3919
+ * badges (verified_purchaser, top_250, top_1000), size and color purchased,
3920
+ * the reviewer's height, weight, body type and usual sizes when given,
3921
+ * secondary ratings (Size, with its scale), the site it was syndicated from
3922
+ * (e.g. nordstromrack.com) and photos with thumbnails. Rating-only reviews
3923
+ * are included with title and text null. Takes 20-60s, up to about 100s at
3924
+ * max_reviews 200, so the request timeout is raised to
3925
+ * NORDSTROM_REVIEWS_TIMEOUT. A product with no reviews returns an empty
3926
+ * list; an unknown style id is a 404.
3927
+ *
3928
+ * Costs 10 credits.
3929
+ */
3930
+ async reviews(options) {
3931
+ return this.client._post("/api/v1/nordstrom/reviews", options, void 0, NORDSTROM_REVIEWS_TIMEOUT);
3932
+ }
3832
3933
  };
3833
3934
 
3834
3935
  // src/namespaces/trustpilot.ts
@@ -4599,6 +4700,7 @@ export {
4599
4700
  MetaAdsNamespace,
4600
4701
  MicroCenterNamespace,
4601
4702
  MissingAPIKeyError,
4703
+ NORDSTROM_REVIEWS_TIMEOUT,
4602
4704
  NORDSTROM_TIMEOUT,
4603
4705
  NordstromNamespace,
4604
4706
  NotFoundError,