scavio 0.27.0 → 0.28.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.cjs +76 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +102 -1
- package/dist/index.d.ts +102 -1
- package/dist/index.js +74 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/dist/index.cjs
CHANGED
|
@@ -49,11 +49,13 @@ __export(index_exports, {
|
|
|
49
49
|
GoogleAdsNamespace: () => GoogleAdsNamespace,
|
|
50
50
|
GoogleNamespace: () => GoogleNamespace,
|
|
51
51
|
GooglePlayNamespace: () => GooglePlayNamespace,
|
|
52
|
+
HebNamespace: () => HebNamespace,
|
|
52
53
|
HomeDepotNamespace: () => HomeDepotNamespace,
|
|
53
54
|
IndeedNamespace: () => IndeedNamespace,
|
|
54
55
|
InstagramNamespace: () => InstagramNamespace,
|
|
55
56
|
InsufficientCreditsError: () => InsufficientCreditsError,
|
|
56
57
|
InvalidAPIKeyError: () => InvalidAPIKeyError,
|
|
58
|
+
KrogerNamespace: () => KrogerNamespace,
|
|
57
59
|
KuaishouNamespace: () => KuaishouNamespace,
|
|
58
60
|
LinkedInNamespace: () => LinkedInNamespace,
|
|
59
61
|
MAX_REQUESTS_PER_SECOND: () => MAX_REQUESTS_PER_SECOND,
|
|
@@ -235,7 +237,7 @@ function parseRetryAfter(header) {
|
|
|
235
237
|
var BASE_URL = "https://api.scavio.dev";
|
|
236
238
|
var DEFAULT_TIMEOUT = 3e4;
|
|
237
239
|
var DEFAULT_MAX_RETRIES = 2;
|
|
238
|
-
var SDK_VERSION = true ? "0.
|
|
240
|
+
var SDK_VERSION = true ? "0.28.0" : "0.0.0";
|
|
239
241
|
var USER_AGENT = `scavio-js/${SDK_VERSION}`;
|
|
240
242
|
function isServerRuntime() {
|
|
241
243
|
const g = globalThis;
|
|
@@ -2756,6 +2758,73 @@ var CostcoNamespace = class {
|
|
|
2756
2758
|
}
|
|
2757
2759
|
};
|
|
2758
2760
|
|
|
2761
|
+
// src/namespaces/heb.ts
|
|
2762
|
+
var HebNamespace = class {
|
|
2763
|
+
constructor(client) {
|
|
2764
|
+
this.client = client;
|
|
2765
|
+
}
|
|
2766
|
+
client;
|
|
2767
|
+
/**
|
|
2768
|
+
* Search HEB grocery products by keyword: price (cents), sale status, unit
|
|
2769
|
+
* price, size, UPC, stock, EBT/SNAP eligibility, aisle location and product
|
|
2770
|
+
* URL.
|
|
2771
|
+
*
|
|
2772
|
+
* Costs 2 credits.
|
|
2773
|
+
*/
|
|
2774
|
+
async search(options) {
|
|
2775
|
+
return this.client._post("/api/v1/heb/search", options);
|
|
2776
|
+
}
|
|
2777
|
+
/**
|
|
2778
|
+
* Full HEB product detail: nutrition facts, ingredients, description, images,
|
|
2779
|
+
* similar products, coupons, EBT/SNAP eligibility and breadcrumbs. Pass
|
|
2780
|
+
* product_url (from search()) or slug + product_id.
|
|
2781
|
+
*
|
|
2782
|
+
* Costs 2 credits.
|
|
2783
|
+
*/
|
|
2784
|
+
async product(options) {
|
|
2785
|
+
return this.client._post("/api/v1/heb/product", options);
|
|
2786
|
+
}
|
|
2787
|
+
/**
|
|
2788
|
+
* HEB stores near a US ZIP code or city: store number, address, phone, hours,
|
|
2789
|
+
* pharmacy availability, fulfillment channels, distance and store URL.
|
|
2790
|
+
*
|
|
2791
|
+
* Costs 2 credits.
|
|
2792
|
+
*/
|
|
2793
|
+
async stores(options) {
|
|
2794
|
+
return this.client._post("/api/v1/heb/stores", options);
|
|
2795
|
+
}
|
|
2796
|
+
};
|
|
2797
|
+
|
|
2798
|
+
// src/namespaces/kroger.ts
|
|
2799
|
+
var KrogerNamespace = class {
|
|
2800
|
+
constructor(client) {
|
|
2801
|
+
this.client = client;
|
|
2802
|
+
}
|
|
2803
|
+
client;
|
|
2804
|
+
/**
|
|
2805
|
+
* Search Kroger grocery products by keyword: price (cents), promo price,
|
|
2806
|
+
* n-for deals, unit price, size, UPC, stock, SNAP eligibility, dietary info,
|
|
2807
|
+
* rating and category. Kroger operates Kroger, Ralphs, Fred Meyer, Harris
|
|
2808
|
+
* Teeter, King Soopers, Fry's and other banners.
|
|
2809
|
+
*
|
|
2810
|
+
* Costs 2 credits.
|
|
2811
|
+
*/
|
|
2812
|
+
async search(options) {
|
|
2813
|
+
return this.client._post("/api/v1/kroger/search", options);
|
|
2814
|
+
}
|
|
2815
|
+
/**
|
|
2816
|
+
* Full Kroger product detail by URL or UPC: nutrition facts (allergens,
|
|
2817
|
+
* ingredients, nutrients with daily values), description, images, rating
|
|
2818
|
+
* distribution, store aisle location, stock level, dietary flags (organic,
|
|
2819
|
+
* non-GMO, gluten-free), SNAP eligibility, dimensions and country of origin.
|
|
2820
|
+
*
|
|
2821
|
+
* Costs 2 credits.
|
|
2822
|
+
*/
|
|
2823
|
+
async product(options) {
|
|
2824
|
+
return this.client._post("/api/v1/kroger/product", options);
|
|
2825
|
+
}
|
|
2826
|
+
};
|
|
2827
|
+
|
|
2759
2828
|
// src/namespaces/trustpilot.ts
|
|
2760
2829
|
var TrustpilotNamespace = class {
|
|
2761
2830
|
constructor(client) {
|
|
@@ -3267,6 +3336,8 @@ var Scavio = class extends ScavioCore {
|
|
|
3267
3336
|
googleAds;
|
|
3268
3337
|
metaAds;
|
|
3269
3338
|
costco;
|
|
3339
|
+
heb;
|
|
3340
|
+
kroger;
|
|
3270
3341
|
trustpilot;
|
|
3271
3342
|
chatgpt;
|
|
3272
3343
|
gemini;
|
|
@@ -3326,6 +3397,8 @@ var Scavio = class extends ScavioCore {
|
|
|
3326
3397
|
this.googleAds = new GoogleAdsNamespace(this);
|
|
3327
3398
|
this.metaAds = new MetaAdsNamespace(this);
|
|
3328
3399
|
this.costco = new CostcoNamespace(this);
|
|
3400
|
+
this.heb = new HebNamespace(this);
|
|
3401
|
+
this.kroger = new KrogerNamespace(this);
|
|
3329
3402
|
this.trustpilot = new TrustpilotNamespace(this);
|
|
3330
3403
|
this.chatgpt = new ChatgptNamespace(this);
|
|
3331
3404
|
this.gemini = new GeminiNamespace(this);
|
|
@@ -3454,11 +3527,13 @@ async function getSubtle() {
|
|
|
3454
3527
|
GoogleAdsNamespace,
|
|
3455
3528
|
GoogleNamespace,
|
|
3456
3529
|
GooglePlayNamespace,
|
|
3530
|
+
HebNamespace,
|
|
3457
3531
|
HomeDepotNamespace,
|
|
3458
3532
|
IndeedNamespace,
|
|
3459
3533
|
InstagramNamespace,
|
|
3460
3534
|
InsufficientCreditsError,
|
|
3461
3535
|
InvalidAPIKeyError,
|
|
3536
|
+
KrogerNamespace,
|
|
3462
3537
|
KuaishouNamespace,
|
|
3463
3538
|
LinkedInNamespace,
|
|
3464
3539
|
MAX_REQUESTS_PER_SECOND,
|