scavio 0.37.0 → 0.38.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.37.0" : "0.0.0";
148
+ var SDK_VERSION = true ? "0.38.0" : "0.0.0";
149
149
  var USER_AGENT = `scavio-js/${SDK_VERSION}`;
150
150
  function isServerRuntime() {
151
151
  const g = globalThis;
@@ -3932,6 +3932,147 @@ var NordstromNamespace = class {
3932
3932
  }
3933
3933
  };
3934
3934
 
3935
+ // src/namespaces/nordstrom-rack.ts
3936
+ var NORDSTROM_RACK_TIMEOUT = 12e4;
3937
+ var NORDSTROM_RACK_REVIEWS_TIMEOUT = 15e4;
3938
+ var NordstromRackNamespace = class {
3939
+ constructor(client) {
3940
+ this.client = client;
3941
+ }
3942
+ client;
3943
+ /**
3944
+ * Search nordstromrack.com (US) products, 24 per page, sorted by relevance,
3945
+ * rating, price, newest or percent off. Each result has style id, URL,
3946
+ * name, brand, image, current price and price range in dollars, the
3947
+ * compare-at price range Rack strikes through (original_price_range),
3948
+ * percent off and on-sale flag, the clearance price range, any promotion on
3949
+ * top (promotion_price_range, and promotion_percent_off: the extra percent
3950
+ * off the clearance price during Clear the Rack, otherwise off Rack's
3951
+ * regular price), rating, review count (Rack's own reviews), badges such as
3952
+ * new_markdown or final_sale, a low-inventory flag, marketplace seller and
3953
+ * every color. Also returns the total result count and page count. Use a
3954
+ * result's url or style_id with product().
3955
+ *
3956
+ * Costs 5 credits.
3957
+ */
3958
+ async search(options) {
3959
+ return this.client._post("/api/v1/nordstromrack/search", options, void 0, NORDSTROM_RACK_TIMEOUT);
3960
+ }
3961
+ /**
3962
+ * One nordstromrack.com (US) product by URL or style id: name, brand, brand
3963
+ * page URL, description, feature bullets, fit notes, final-sale flag,
3964
+ * current, compare-at and clearance price ranges, percent off, any promotion
3965
+ * on top (promotion_price_range and promotion_percent_off, e.g. Clear the
3966
+ * Rack's extra 25% off clearance), rating, review count, the star
3967
+ * histogram, the size-fit distribution, the AI review summary when the site
3968
+ * shows one, praised and criticized features, breadcrumbs and images. Every
3969
+ * color lists every size as a sku with sku id, size, UPC, price, compare-at
3970
+ * price, percent off, price type (regular, clearance, promotion), in_stock
3971
+ * and the quantity available to ship. Includes the reviews shown on the
3972
+ * product page (up to about 13), with the total review count (reviews()
3973
+ * pages the full history). Ratings and reviews are Rack's own, separate
3974
+ * from nordstrom.com's. Pass url or style_id. An unknown style id is a 404.
3975
+ *
3976
+ * Costs 5 credits.
3977
+ */
3978
+ async product(options) {
3979
+ return this.client._post("/api/v1/nordstromrack/product", options, void 0, NORDSTROM_RACK_TIMEOUT);
3980
+ }
3981
+ /**
3982
+ * Browse a nordstromrack.com (US) category page, 24 products per page,
3983
+ * sorted by relevance, rating, price, newest or percent off. Works on every
3984
+ * /shop and /clearance listing: departments (/shop/women), deals
3985
+ * (/shop/deals/black-friday), new arrivals (/shop/new-arrivals), Clear the
3986
+ * Rack (/clearance, /clearance/women/clothing) and flash events: /shop/flash
3987
+ * lists the live events as subcategories (it has no products of its own),
3988
+ * and each event (/shop/flash/event-7) is a listing whose first page shows
3989
+ * the event's featured products first. Returns the category's name, page
3990
+ * title, path, URL, breadcrumbs and subcategories, products with the same
3991
+ * fields as a search result, the total result count, page count and the
3992
+ * filter sidebar with option counts. An unknown category is a 404.
3993
+ *
3994
+ * Costs 5 credits.
3995
+ */
3996
+ async category(options) {
3997
+ return this.client._post("/api/v1/nordstromrack/category", options, void 0, NORDSTROM_RACK_TIMEOUT);
3998
+ }
3999
+ /**
4000
+ * List a brand's products on nordstromrack.com (US) from its brand page
4001
+ * (/brands/adidas), 24 per page, sorted by relevance, rating, price, newest
4002
+ * or percent off. Returns the brand's name, path, URL and breadcrumbs,
4003
+ * products with the same fields as a search result, the total result count,
4004
+ * page count and the filter sidebar with option counts. An unknown brand is
4005
+ * a 404.
4006
+ *
4007
+ * Costs 5 credits.
4008
+ */
4009
+ async brand(options) {
4010
+ return this.client._post("/api/v1/nordstromrack/brand", options, void 0, NORDSTROM_RACK_TIMEOUT);
4011
+ }
4012
+ /**
4013
+ * Find Nordstrom Rack stores near a US ZIP code or latitude/longitude
4014
+ * within up to 100 miles, nearest first, or look Rack stores up by store
4015
+ * number. Each store has store number, name, type (rack), address, phone,
4016
+ * weekly hours, holiday hours when posted, open and close times for the
4017
+ * next 8 days, time zone, distance in miles, coordinates, whether it offers
4018
+ * buy-online pickup and curbside pickup, its amenities and its store page
4019
+ * URL. A ZIP with no store in range returns an empty list.
4020
+ *
4021
+ * Costs 5 credits.
4022
+ */
4023
+ async stores(options) {
4024
+ return this.client._post("/api/v1/nordstromrack/stores", options, void 0, NORDSTROM_RACK_TIMEOUT);
4025
+ }
4026
+ /**
4027
+ * Online and Rack store-pickup availability for every size and color of
4028
+ * one nordstromrack.com (US) product, by URL or style id, optionally one
4029
+ * sku. Each sku has sku id, size, color, UPC, in_stock, whether it ships
4030
+ * and the quantity available to ship, the quantity available for pickup,
4031
+ * and the Rack stores where it can be picked up (store number, name,
4032
+ * address, city, state, ZIP, phone). Quantities are chain-wide: per store
4033
+ * the site only says whether pickup is available, not how many. An unknown
4034
+ * style id or sku id is a 404.
4035
+ *
4036
+ * Costs 10 credits (the product page plus the store lookup).
4037
+ */
4038
+ async availability(options) {
4039
+ return this.client._post("/api/v1/nordstromrack/availability", options, void 0, NORDSTROM_RACK_TIMEOUT);
4040
+ }
4041
+ /**
4042
+ * The search-box autocomplete of nordstromrack.com: the queries Nordstrom
4043
+ * Rack suggests for a partial search term, most likely first. Useful for
4044
+ * keyword research and for building queries for search().
4045
+ *
4046
+ * Costs 5 credits.
4047
+ */
4048
+ async suggestions(options) {
4049
+ return this.client._post("/api/v1/nordstromrack/suggestions", options, void 0, NORDSTROM_RACK_TIMEOUT);
4050
+ }
4051
+ /**
4052
+ * Customer reviews of one nordstromrack.com (US) product by URL or style
4053
+ * id, up to 200 per call (default 60), sorted most helpful (default), most
4054
+ * recent, highest rated or lowest rated, optionally filtered to star
4055
+ * ratings, verified purchases, reviews with photos, or a text search. Rack
4056
+ * has its own review pool, separate from nordstrom.com's. Returns the review
4057
+ * summary (average rating, total reviews, star histogram, size and width
4058
+ * rating, praised and criticized features, rating-only count), the AI
4059
+ * review summary when the site shows one, total_results, returned and
4060
+ * has_more. Each review has id, title, text, star rating, size rating,
4061
+ * author, date, helpful votes, verified-purchase flag, reviewer badges,
4062
+ * size and color purchased, reviewer body details when given, secondary
4063
+ * ratings, the site it was syndicated from and photos. Rating-only reviews
4064
+ * are included with title and text null. Takes 15-60s, up to about 100s at
4065
+ * max_reviews 200, so the request timeout is raised to
4066
+ * NORDSTROM_RACK_REVIEWS_TIMEOUT. A product with no reviews returns an
4067
+ * empty list; an unknown style id is a 404.
4068
+ *
4069
+ * Costs 10 credits.
4070
+ */
4071
+ async reviews(options) {
4072
+ return this.client._post("/api/v1/nordstromrack/reviews", options, void 0, NORDSTROM_RACK_REVIEWS_TIMEOUT);
4073
+ }
4074
+ };
4075
+
3935
4076
  // src/namespaces/trustpilot.ts
3936
4077
  var TrustpilotNamespace = class {
3937
4078
  constructor(client) {
@@ -4465,6 +4606,7 @@ var Scavio = class extends ScavioCore {
4465
4606
  chewy;
4466
4607
  menards;
4467
4608
  nordstrom;
4609
+ nordstromRack;
4468
4610
  trustpilot;
4469
4611
  chatgpt;
4470
4612
  gemini;
@@ -4546,6 +4688,7 @@ var Scavio = class extends ScavioCore {
4546
4688
  this.chewy = new ChewyNamespace(this);
4547
4689
  this.menards = new MenardsNamespace(this);
4548
4690
  this.nordstrom = new NordstromNamespace(this);
4691
+ this.nordstromRack = new NordstromRackNamespace(this);
4549
4692
  this.trustpilot = new TrustpilotNamespace(this);
4550
4693
  this.chatgpt = new ChatgptNamespace(this);
4551
4694
  this.gemini = new GeminiNamespace(this);
@@ -4700,9 +4843,12 @@ export {
4700
4843
  MetaAdsNamespace,
4701
4844
  MicroCenterNamespace,
4702
4845
  MissingAPIKeyError,
4846
+ NORDSTROM_RACK_REVIEWS_TIMEOUT,
4847
+ NORDSTROM_RACK_TIMEOUT,
4703
4848
  NORDSTROM_REVIEWS_TIMEOUT,
4704
4849
  NORDSTROM_TIMEOUT,
4705
4850
  NordstromNamespace,
4851
+ NordstromRackNamespace,
4706
4852
  NotFoundError,
4707
4853
  PETCO_SLOW_TIMEOUT,
4708
4854
  PetcoNamespace,