scavio 0.32.2 → 0.34.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.32.2" : "0.0.0";
148
+ var SDK_VERSION = true ? "0.34.0" : "0.0.0";
149
149
  var USER_AGENT = `scavio-js/${SDK_VERSION}`;
150
150
  function isServerRuntime() {
151
151
  const g = globalThis;
@@ -3333,6 +3333,459 @@ var CvsNamespace = class {
3333
3333
  }
3334
3334
  };
3335
3335
 
3336
+ // src/namespaces/whole-foods.ts
3337
+ var WholeFoodsNamespace = class {
3338
+ constructor(client) {
3339
+ this.client = client;
3340
+ }
3341
+ client;
3342
+ /**
3343
+ * Search Whole Foods Market products at one store, up to 60 per page: ASIN,
3344
+ * slug, name, brand, image, that store's regular_price, sale_price and
3345
+ * prime_price with sale start and end dates (a multi-buy is a total:
3346
+ * sale_price 10 with sale_quantity 2 is 2 for $10; price_unit lb is per
3347
+ * pound), on_sale and is_local flags. Also total_results and facets
3348
+ * (categories, diets). Sorts by relevance or price only.
3349
+ *
3350
+ * Costs 1 credit.
3351
+ */
3352
+ async search(options) {
3353
+ return this.client._post("/api/v1/wholefoods/search", options);
3354
+ }
3355
+ /**
3356
+ * Browse one Whole Foods Market category at one store, with sort, on_sale
3357
+ * and diet filters. Same product fields as search, plus the category
3358
+ * breadcrumb, total_results and facets. An unknown category slug is a 404.
3359
+ *
3360
+ * Costs 1 credit.
3361
+ */
3362
+ async category(options) {
3363
+ return this.client._post("/api/v1/wholefoods/category", options);
3364
+ }
3365
+ /**
3366
+ * Every product on sale at one Whole Foods Market store, store-wide or in
3367
+ * one category, with regular, sale and Prime prices and sale dates.
3368
+ *
3369
+ * Costs 1 credit.
3370
+ */
3371
+ async deals(options = {}) {
3372
+ return this.client._post("/api/v1/wholefoods/deals", options);
3373
+ }
3374
+ /**
3375
+ * One Whole Foods Market product by ASIN, URL or slug: name, brand,
3376
+ * description, ingredients, nutrition facts, diets, SNAP EBT eligibility
3377
+ * and images. With store_id, two separate price blocks: in_store (the
3378
+ * store's shelf regular, sale and Prime price; null when it does not list
3379
+ * the item) and online (delivery/pickup price, list price, savings, Prime
3380
+ * price, unit price, availability; null with no online offer). An unknown
3381
+ * ASIN is a 404.
3382
+ *
3383
+ * Costs 1 credit.
3384
+ */
3385
+ async product(options) {
3386
+ return this.client._post("/api/v1/wholefoods/product", options);
3387
+ }
3388
+ /**
3389
+ * Whole Foods Market stores near a US ZIP code, nearest first (within 15
3390
+ * miles, widening to 50): store_id, name, address, phone, coordinates,
3391
+ * distance in miles, time zone and seven days of in-store and pickup hours.
3392
+ * No store in range is an empty list.
3393
+ *
3394
+ * Costs 1 credit.
3395
+ */
3396
+ async stores(options) {
3397
+ return this.client._post("/api/v1/wholefoods/stores", options);
3398
+ }
3399
+ /**
3400
+ * One Whole Foods Market store by id: name, status, phone, Prime
3401
+ * eligibility, opening date, address, coordinates, time zone, store page and
3402
+ * sales flyer URLs. An unknown store id is a 404.
3403
+ *
3404
+ * Costs 1 credit.
3405
+ */
3406
+ async store(options) {
3407
+ return this.client._post("/api/v1/wholefoods/store", options);
3408
+ }
3409
+ /**
3410
+ * The current weekly sales flyer of one Whole Foods Market store: each
3411
+ * promotion's product name, brand, headline, description, terms, regular,
3412
+ * sale and Prime price as printed (text such as "$3.99/lb" or "44% off"),
3413
+ * start and end dates, image, rank and the ASINs it covers. An unknown
3414
+ * store id is a 404.
3415
+ *
3416
+ * Costs 1 credit.
3417
+ */
3418
+ async salesFlyer(options) {
3419
+ return this.client._post("/api/v1/wholefoods/sales-flyer", options);
3420
+ }
3421
+ };
3422
+
3423
+ // src/namespaces/harbor-freight.ts
3424
+ var HarborFreightNamespace = class {
3425
+ constructor(client) {
3426
+ this.client = client;
3427
+ }
3428
+ client;
3429
+ /**
3430
+ * Search Harbor Freight by keyword and/or category, with brand and
3431
+ * clearance filters: item number, id, title, brand, URL, image, price,
3432
+ * regular price, on_sale and clearance flags, sale (price, end date,
3433
+ * savings), coupon, member_deal, compare_at, badges, rating, review count,
3434
+ * in-store-only / online-only flags and variants. Also total_results,
3435
+ * facets, and redirect when a keyword maps to a category page.
3436
+ *
3437
+ * Costs 1 credit.
3438
+ */
3439
+ async search(options) {
3440
+ return this.client._post("/api/v1/harborfreight/search", options);
3441
+ }
3442
+ /**
3443
+ * Harbor Freight clearance items, optionally narrowed by keyword, category
3444
+ * or brand. Same fields as search; each item's clearance price and end date
3445
+ * are in `sale`.
3446
+ *
3447
+ * Costs 1 credit.
3448
+ */
3449
+ async clearance(options = {}) {
3450
+ return this.client._post("/api/v1/harborfreight/clearance", options);
3451
+ }
3452
+ /**
3453
+ * One product by item number, id or URL: title, brand, UPC, every price
3454
+ * field of search, rating, review count, description, highlights, the full
3455
+ * specification table, warranty, shipping notes, owner's manuals, images
3456
+ * and variants. An unknown item is a 404.
3457
+ *
3458
+ * Costs 1 credit.
3459
+ */
3460
+ async product(options) {
3461
+ return this.client._post("/api/v1/harborfreight/product", options);
3462
+ }
3463
+ /**
3464
+ * Current prices for up to 50 item numbers in one call: price, regular
3465
+ * price, sale, coupon, member_deal and compare_at per item. Unknown item
3466
+ * numbers are listed in not_found.
3467
+ *
3468
+ * Costs 1 credit.
3469
+ */
3470
+ async prices(options) {
3471
+ return this.client._post("/api/v1/harborfreight/prices", options);
3472
+ }
3473
+ /**
3474
+ * Harbor Freight stores near a ZIP code, "City, ST" or coordinates, nearest
3475
+ * first: store_id, name, address, phone, coordinates, distance in miles,
3476
+ * status, opening date and hours.
3477
+ *
3478
+ * Costs 1 credit.
3479
+ */
3480
+ async stores(options) {
3481
+ return this.client._post("/api/v1/harborfreight/stores", options);
3482
+ }
3483
+ /**
3484
+ * In-store stock for up to 20 items at chosen stores, or at the stores
3485
+ * nearest a ZIP code or coordinates. Each store lists every item with
3486
+ * stock_status (in_stock, limited, out_of_stock or not_carried), the aisle
3487
+ * and a nearby store that has it. inventory_updated_at is the time of the
3488
+ * daily stock snapshot. Stock is a status, not a unit count.
3489
+ *
3490
+ * Costs 1 credit.
3491
+ */
3492
+ async availability(options) {
3493
+ return this.client._post("/api/v1/harborfreight/availability", options);
3494
+ }
3495
+ /**
3496
+ * Customer reviews for one item, newest first, with limit/offset paging:
3497
+ * title, text, star rating, author, review and purchase dates, incentivized
3498
+ * flag, helpful votes and the reviewer's answers. Also the average rating
3499
+ * and total review count. An unknown item is a 404.
3500
+ *
3501
+ * Costs 1 credit.
3502
+ */
3503
+ async reviews(options) {
3504
+ return this.client._post("/api/v1/harborfreight/reviews", options);
3505
+ }
3506
+ };
3507
+
3508
+ // src/namespaces/petsmart.ts
3509
+ var PetsmartNamespace = class {
3510
+ constructor(client) {
3511
+ this.client = client;
3512
+ }
3513
+ client;
3514
+ /**
3515
+ * Search PetSmart products, up to 40 per page: SKU, web_style_id, name,
3516
+ * brand, UPC, price, original and sale price, price range across sizes,
3517
+ * rating, review count, image, size, variations, category, pets,
3518
+ * promotions, stores_in_stock (how many stores stock it), pickup and
3519
+ * Autoship eligibility and URL. Prices are national. Pass store_id to list
3520
+ * only products in stock at that store.
3521
+ *
3522
+ * Costs 1 credit.
3523
+ */
3524
+ async search(options) {
3525
+ return this.client._post("/api/v1/petsmart/search", options);
3526
+ }
3527
+ /**
3528
+ * One PetSmart product by web_style_id, SKU or URL, with every variant
3529
+ * (size, flavor): SKU, UPC, price, original price, sale price and end date,
3530
+ * Autoship discount with first-order and recurring price, ship-to-home
3531
+ * stock, pickup and same-day options, images and promotions. Also brand,
3532
+ * rating, review count, categories and description. An unknown id is a 404.
3533
+ *
3534
+ * Costs 1 credit.
3535
+ */
3536
+ async product(options) {
3537
+ return this.client._post("/api/v1/petsmart/product", options);
3538
+ }
3539
+ /**
3540
+ * The 12 PetSmart stores nearest a US ZIP code: store_id, name, address,
3541
+ * phone, coordinates, distance in miles, time zone, the next 7 days of
3542
+ * hours and services (grooming, PetsHotel, veterinary, adoptions). Pass a
3543
+ * sku and each store also carries quantity and in_stock for it.
3544
+ *
3545
+ * Costs 1 credit.
3546
+ */
3547
+ async stores(options) {
3548
+ return this.client._post("/api/v1/petsmart/stores", options);
3549
+ }
3550
+ /**
3551
+ * Stock of up to 20 SKUs at one PetSmart store: units for in-store pickup
3552
+ * at that store, units to ship to home, and a nearby alternate store with
3553
+ * its count when the store has none. Includes the store's address and
3554
+ * pickup options. An unknown store is a 404; an unknown SKU reads 0.
3555
+ *
3556
+ * Costs 1 credit.
3557
+ */
3558
+ async storeStock(options) {
3559
+ return this.client._post("/api/v1/petsmart/store-stock", options);
3560
+ }
3561
+ /**
3562
+ * Unit counts for up to 20 store and SKU pairs in one call, mixing stores
3563
+ * and SKUs freely: quantity and in_stock per pair. Unknown stores or SKUs
3564
+ * read 0.
3565
+ *
3566
+ * Costs 1 credit.
3567
+ */
3568
+ async availability(options) {
3569
+ return this.client._post("/api/v1/petsmart/availability", options);
3570
+ }
3571
+ /**
3572
+ * Products in PetSmart's Sale section, up to 40 per page, in the same shape
3573
+ * as search, plus the current sale events with approximate product counts.
3574
+ * The Sale section also lists points and Autoship promotions, so on_sale
3575
+ * marks the rows whose price is actually reduced.
3576
+ *
3577
+ * Costs 1 credit.
3578
+ */
3579
+ async deals(options = {}) {
3580
+ return this.client._post("/api/v1/petsmart/deals", options);
3581
+ }
3582
+ };
3583
+
3584
+ // src/namespaces/petco.ts
3585
+ var PETCO_SLOW_TIMEOUT = 12e4;
3586
+ var PetcoNamespace = class {
3587
+ constructor(client) {
3588
+ this.client = client;
3589
+ }
3590
+ client;
3591
+ /**
3592
+ * Search Petco products, 48 per page: price, list price and autoship
3593
+ * (Repeat Delivery) price, rating, review count, brand, part_number,
3594
+ * cat_entry_id (for storeInventory), fulfillment flags (pickup, same-day
3595
+ * delivery, autoship, in-store only), deal group ids and every size/flavor
3596
+ * variation with its own prices. Also total_results, facets and the
3597
+ * categories the matches fall into. Prices are national.
3598
+ *
3599
+ * Costs 1 credit.
3600
+ */
3601
+ async search(options) {
3602
+ return this.client._post("/api/v1/petco/search", options, void 0, PETCO_SLOW_TIMEOUT);
3603
+ }
3604
+ /**
3605
+ * Products in a Petco category, e.g. dog/dog-food/dry-dog-food, in the same
3606
+ * shape as search. An unknown category is a 404. Can take 10-30 seconds.
3607
+ *
3608
+ * Costs 1 credit.
3609
+ */
3610
+ async category(options) {
3611
+ return this.client._post("/api/v1/petco/category", options, void 0, PETCO_SLOW_TIMEOUT);
3612
+ }
3613
+ /**
3614
+ * One Petco product by part number or URL, with every variant (size,
3615
+ * flavor): cat_entry_id, part number, SKU, UPC, price, list price, autoship
3616
+ * price, first-autoship promo price, online quantity and status,
3617
+ * fulfillment flags, ingredients, guaranteed analysis, directions,
3618
+ * specifications, dimensions and images. Plus brand, rating, review count
3619
+ * and breadcrumbs. Prices are national. An unknown product is a 404. Can
3620
+ * take 10-30 seconds.
3621
+ *
3622
+ * Costs 1 credit.
3623
+ */
3624
+ async product(options) {
3625
+ return this.client._post("/api/v1/petco/product", options, void 0, PETCO_SLOW_TIMEOUT);
3626
+ }
3627
+ /**
3628
+ * Petco stores nearest a US ZIP code (up to 10): store_id (for
3629
+ * storeInventory), store number, name, address, phone, coordinates,
3630
+ * distance in miles, in-store pickup and opening hours per weekday.
3631
+ *
3632
+ * Costs 1 credit.
3633
+ */
3634
+ async stores(options) {
3635
+ return this.client._post("/api/v1/petco/stores", options, void 0, PETCO_SLOW_TIMEOUT);
3636
+ }
3637
+ /**
3638
+ * Units on hand at one Petco store for up to 10 products: qty_available,
3639
+ * alert_level (GREEN, YELLOW, RED) and in_stock per cat_entry_id. Pass a
3640
+ * store_id, or a zip to use the nearest store.
3641
+ *
3642
+ * Costs 1 credit.
3643
+ */
3644
+ async storeInventory(options) {
3645
+ return this.client._post("/api/v1/petco/store-inventory", options, void 0, PETCO_SLOW_TIMEOUT);
3646
+ }
3647
+ };
3648
+
3649
+ // src/namespaces/iherb.ts
3650
+ var IHERB_SLOW_TIMEOUT = 12e4;
3651
+ var IherbNamespace = class {
3652
+ constructor(client) {
3653
+ this.client = client;
3654
+ }
3655
+ client;
3656
+ /**
3657
+ * Search iHerb (US store, USD), 48 per page: product_id, part_number, name,
3658
+ * brand, brand_code, URL, image, price, list price, original price and
3659
+ * discount_percent when discounted, rating, review count, in_stock, badges
3660
+ * (Best seller, iHerb Brands, New), recent_sales (e.g. "30K+ sold in 30
3661
+ * days") and position. Also total_results and brand_filters for narrowing
3662
+ * with brand_code.
3663
+ *
3664
+ * Costs 2 credits.
3665
+ */
3666
+ async search(options) {
3667
+ return this.client._post("/api/v1/iherb/search", options, void 0, IHERB_SLOW_TIMEOUT);
3668
+ }
3669
+ /**
3670
+ * One iHerb product by id or URL (US store, USD): name, brand, part number,
3671
+ * UPC, price, list price, discount, price per serving or unit, stock status,
3672
+ * discontinued and coming-soon flags, quantity limit, expiration date,
3673
+ * package quantity, weight and dimensions, rating and review count,
3674
+ * breadcrumbs, best-seller rankings, badges, variants, supplement facts,
3675
+ * description, suggested use, ingredients, warnings and images. An unknown
3676
+ * product id is a 404.
3677
+ *
3678
+ * Costs 2 credits.
3679
+ */
3680
+ async product(options) {
3681
+ return this.client._post("/api/v1/iherb/product", options, void 0, IHERB_SLOW_TIMEOUT);
3682
+ }
3683
+ /**
3684
+ * Current price, list price, discount, in-stock flag, rating and review
3685
+ * count for up to 50 iHerb products in one call (US store, USD). One row
3686
+ * per requested id, in request order; unknown ids come back with
3687
+ * found: false and are listed in not_found.
3688
+ *
3689
+ * Costs 2 credits.
3690
+ */
3691
+ async prices(options) {
3692
+ return this.client._post("/api/v1/iherb/prices", options);
3693
+ }
3694
+ /**
3695
+ * The review summary for one iHerb product: average rating, total review
3696
+ * count, star histogram, review counts per language, and the full text of
3697
+ * the top positive and top critical review (rating, title, author, country,
3698
+ * date, verified-purchase flag, helpful votes, images). Not a full review
3699
+ * list.
3700
+ *
3701
+ * Costs 2 credits.
3702
+ */
3703
+ async reviews(options) {
3704
+ return this.client._post("/api/v1/iherb/reviews", options);
3705
+ }
3706
+ };
3707
+
3708
+ // src/namespaces/chewy.ts
3709
+ var ChewyNamespace = class {
3710
+ constructor(client) {
3711
+ this.client = client;
3712
+ }
3713
+ client;
3714
+ /**
3715
+ * Search Chewy by keyword, or browse a category, 36 per page: one-time
3716
+ * price, offer and strike-through price, Autoship price and discount,
3717
+ * first-Autoship price, discount and savings cap, MAP price, per-unit
3718
+ * price, rating, rating count, in-stock flag, deal/new/exclusive/
3719
+ * prescription flags, brand, image and URL. Sponsored listings are removed
3720
+ * (sponsored_removed counts them). `redirect` names the category when
3721
+ * Chewy sends the query to one.
3722
+ *
3723
+ * Costs 10 credits.
3724
+ */
3725
+ async search(options) {
3726
+ return this.client._post("/api/v1/chewy/search", options);
3727
+ }
3728
+ /**
3729
+ * One Chewy product by id or URL: one-time price, offer price, list and
3730
+ * strike-through price with savings, MAP price and whether it is enforced,
3731
+ * Autoship price and discount, first-Autoship price, per-unit price,
3732
+ * in-stock flag, rating, rating count, review count and star distribution,
3733
+ * brand, GTIN, description, key benefits, specifications, breadcrumbs,
3734
+ * images, promotions and every variant (size, flavor) with its own price,
3735
+ * Autoship price and stock. An unknown product id is a 404.
3736
+ *
3737
+ * Costs 10 credits.
3738
+ */
3739
+ async product(options) {
3740
+ return this.client._post("/api/v1/chewy/product", options);
3741
+ }
3742
+ };
3743
+
3744
+ // src/namespaces/menards.ts
3745
+ var MENARDS_PRODUCT_TIMEOUT = 12e4;
3746
+ var MenardsNamespace = class {
3747
+ constructor(client) {
3748
+ this.client = client;
3749
+ }
3750
+ client;
3751
+ /**
3752
+ * Search menards.com at one store, 40 products a page: item_id, sku, name,
3753
+ * url, image, price, everyday_price, sale_price, price_type (regular, sale,
3754
+ * clearance, minimum_advertised), mail-in rebates, final_price after
3755
+ * rebates, and that store's stock_quantity, stock_message, pickup and
3756
+ * delivery flags. Also total_results, total_pages and facets.
3757
+ *
3758
+ * Costs 2 credits.
3759
+ */
3760
+ async search(options) {
3761
+ return this.client._post("/api/v1/menards/search", options);
3762
+ }
3763
+ /**
3764
+ * One Menards product by item id or URL: name, brand, model number, SKU,
3765
+ * description, bullets, specifications, images, videos and documents, with
3766
+ * the full price ladder: everyday price, sale price and end date, mail-in
3767
+ * rebates (text, amount, dates), final price after rebates and you_save.
3768
+ * Also pickup, delivery and ship-to-store flags. With store_id, that store's
3769
+ * stock quantity, stock message, aisle location and not_available_at_store.
3770
+ * An unknown item id or store number is a 404.
3771
+ *
3772
+ * Costs 1 credit, or 2 with store_id.
3773
+ */
3774
+ async product(options) {
3775
+ return this.client._post("/api/v1/menards/product", options, void 0, MENARDS_PRODUCT_TIMEOUT);
3776
+ }
3777
+ /**
3778
+ * Menards stores near a US ZIP code or a city and state, nearest first:
3779
+ * store_id, name, address, coordinates, distance in miles and services
3780
+ * (garden center, grocery, rental center, propane and more).
3781
+ *
3782
+ * Costs 1 credit.
3783
+ */
3784
+ async stores(options) {
3785
+ return this.client._post("/api/v1/menards/stores", options);
3786
+ }
3787
+ };
3788
+
3336
3789
  // src/namespaces/trustpilot.ts
3337
3790
  var TrustpilotNamespace = class {
3338
3791
  constructor(client) {
@@ -3858,6 +4311,13 @@ var Scavio = class extends ScavioCore {
3858
4311
  microCenter;
3859
4312
  walgreens;
3860
4313
  cvs;
4314
+ wholeFoods;
4315
+ harborFreight;
4316
+ petsmart;
4317
+ petco;
4318
+ iherb;
4319
+ chewy;
4320
+ menards;
3861
4321
  trustpilot;
3862
4322
  chatgpt;
3863
4323
  gemini;
@@ -3931,6 +4391,13 @@ var Scavio = class extends ScavioCore {
3931
4391
  this.microCenter = new MicroCenterNamespace(this);
3932
4392
  this.walgreens = new WalgreensNamespace(this);
3933
4393
  this.cvs = new CvsNamespace(this);
4394
+ this.wholeFoods = new WholeFoodsNamespace(this);
4395
+ this.harborFreight = new HarborFreightNamespace(this);
4396
+ this.petsmart = new PetsmartNamespace(this);
4397
+ this.petco = new PetcoNamespace(this);
4398
+ this.iherb = new IherbNamespace(this);
4399
+ this.chewy = new ChewyNamespace(this);
4400
+ this.menards = new MenardsNamespace(this);
3934
4401
  this.trustpilot = new TrustpilotNamespace(this);
3935
4402
  this.chatgpt = new ChatgptNamespace(this);
3936
4403
  this.gemini = new GeminiNamespace(this);
@@ -4050,6 +4517,7 @@ export {
4050
4517
  CanadianTireNamespace,
4051
4518
  CapterraNamespace,
4052
4519
  ChatgptNamespace,
4520
+ ChewyNamespace,
4053
4521
  CompaniesHouseNamespace,
4054
4522
  CostcoNamespace,
4055
4523
  CvsNamespace,
@@ -4063,8 +4531,11 @@ export {
4063
4531
  GoogleAdsNamespace,
4064
4532
  GoogleNamespace,
4065
4533
  GooglePlayNamespace,
4534
+ HarborFreightNamespace,
4066
4535
  HebNamespace,
4067
4536
  HomeDepotNamespace,
4537
+ IHERB_SLOW_TIMEOUT,
4538
+ IherbNamespace,
4068
4539
  IndeedNamespace,
4069
4540
  InstagramNamespace,
4070
4541
  InsufficientCreditsError,
@@ -4074,11 +4545,16 @@ export {
4074
4545
  LinkedInNamespace,
4075
4546
  LowesNamespace,
4076
4547
  MAX_REQUESTS_PER_SECOND,
4548
+ MENARDS_PRODUCT_TIMEOUT,
4549
+ MenardsNamespace,
4077
4550
  MercadoLibreNamespace,
4078
4551
  MetaAdsNamespace,
4079
4552
  MicroCenterNamespace,
4080
4553
  MissingAPIKeyError,
4081
4554
  NotFoundError,
4555
+ PETCO_SLOW_TIMEOUT,
4556
+ PetcoNamespace,
4557
+ PetsmartNamespace,
4082
4558
  RateLimitError,
4083
4559
  RealtorNamespace,
4084
4560
  RedditNamespace,
@@ -4102,6 +4578,7 @@ export {
4102
4578
  UltaNamespace,
4103
4579
  WalgreensNamespace,
4104
4580
  WalmartNamespace,
4581
+ WholeFoodsNamespace,
4105
4582
  XNamespace,
4106
4583
  YelpNamespace,
4107
4584
  YouTubeNamespace,