scavio 0.28.1 → 0.29.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 +82 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +126 -5
- package/dist/index.d.ts +126 -5
- package/dist/index.js +82 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -237,7 +237,7 @@ function parseRetryAfter(header) {
|
|
|
237
237
|
var BASE_URL = "https://api.scavio.dev";
|
|
238
238
|
var DEFAULT_TIMEOUT = 3e4;
|
|
239
239
|
var DEFAULT_MAX_RETRIES = 2;
|
|
240
|
-
var SDK_VERSION = true ? "0.
|
|
240
|
+
var SDK_VERSION = true ? "0.29.0" : "0.0.0";
|
|
241
241
|
var USER_AGENT = `scavio-js/${SDK_VERSION}`;
|
|
242
242
|
function isServerRuntime() {
|
|
243
243
|
const g = globalThis;
|
|
@@ -2767,7 +2767,7 @@ var HebNamespace = class {
|
|
|
2767
2767
|
/**
|
|
2768
2768
|
* Search HEB grocery products by keyword: price (cents), sale status, unit
|
|
2769
2769
|
* price, size, UPC, stock, EBT/SNAP eligibility, aisle location and product
|
|
2770
|
-
* URL.
|
|
2770
|
+
* URL. Pass store_id for one store's prices, stock and assortment.
|
|
2771
2771
|
*
|
|
2772
2772
|
* Costs 2 credits.
|
|
2773
2773
|
*/
|
|
@@ -2777,7 +2777,8 @@ var HebNamespace = class {
|
|
|
2777
2777
|
/**
|
|
2778
2778
|
* Full HEB product detail: nutrition facts, ingredients, description, images,
|
|
2779
2779
|
* similar products, coupons, EBT/SNAP eligibility and breadcrumbs. Pass
|
|
2780
|
-
* product_url (from search()) or slug + product_id
|
|
2780
|
+
* product_url (from search()) or slug + product_id, or product_id alone
|
|
2781
|
+
* with store_id.
|
|
2781
2782
|
*
|
|
2782
2783
|
* Costs 2 credits.
|
|
2783
2784
|
*/
|
|
@@ -2854,6 +2855,80 @@ var DecathlonNamespace = class {
|
|
|
2854
2855
|
}
|
|
2855
2856
|
};
|
|
2856
2857
|
|
|
2858
|
+
// src/namespaces/totalwine.ts
|
|
2859
|
+
var TotalWineNamespace = class {
|
|
2860
|
+
constructor(client) {
|
|
2861
|
+
this.client = client;
|
|
2862
|
+
}
|
|
2863
|
+
client;
|
|
2864
|
+
/**
|
|
2865
|
+
* Search Total Wine at one store: that store's price (cents), units in
|
|
2866
|
+
* stock, purchase limit, aisle, size, rating and pickup/delivery/shipping
|
|
2867
|
+
* availability. When the store carries none of the matches, products is
|
|
2868
|
+
* empty and searched_all_stores is true.
|
|
2869
|
+
*
|
|
2870
|
+
* Costs 2 credits.
|
|
2871
|
+
*/
|
|
2872
|
+
async search(options) {
|
|
2873
|
+
return this.client._post("/api/v1/totalwine/search", options);
|
|
2874
|
+
}
|
|
2875
|
+
/**
|
|
2876
|
+
* One Total Wine product at one store: price (cents), units in stock, aisle,
|
|
2877
|
+
* bay, shelf, last restock date, ABV, taste profile, characteristics and
|
|
2878
|
+
* breadcrumbs. Pass product_id or product_url.
|
|
2879
|
+
*
|
|
2880
|
+
* Costs 2 credits.
|
|
2881
|
+
*/
|
|
2882
|
+
async product(options) {
|
|
2883
|
+
return this.client._post("/api/v1/totalwine/product", options);
|
|
2884
|
+
}
|
|
2885
|
+
/**
|
|
2886
|
+
* Total Wine stores near a ZIP code or city, nearest first: store_id,
|
|
2887
|
+
* address, phone, coordinates, distance in miles and delivery availability.
|
|
2888
|
+
*
|
|
2889
|
+
* Costs 2 credits.
|
|
2890
|
+
*/
|
|
2891
|
+
async stores(options) {
|
|
2892
|
+
return this.client._post("/api/v1/totalwine/stores", options);
|
|
2893
|
+
}
|
|
2894
|
+
};
|
|
2895
|
+
|
|
2896
|
+
// src/namespaces/specs.ts
|
|
2897
|
+
var SpecsNamespace = class {
|
|
2898
|
+
constructor(client) {
|
|
2899
|
+
this.client = client;
|
|
2900
|
+
}
|
|
2901
|
+
client;
|
|
2902
|
+
/**
|
|
2903
|
+
* Search Spec's: online price (cents), case price and quantity, promo and
|
|
2904
|
+
* Keyclub flags, stock, size, SKU, UPC and slug.
|
|
2905
|
+
*
|
|
2906
|
+
* Costs 1 credit.
|
|
2907
|
+
*/
|
|
2908
|
+
async search(options) {
|
|
2909
|
+
return this.client._post("/api/v1/specs/search", options);
|
|
2910
|
+
}
|
|
2911
|
+
/**
|
|
2912
|
+
* One Spec's product with every store's price and stock in store_prices,
|
|
2913
|
+
* the online price, and ABV, origin, region, vintage and tasting notes.
|
|
2914
|
+
* Pass slug or product_url.
|
|
2915
|
+
*
|
|
2916
|
+
* Costs 1 credit.
|
|
2917
|
+
*/
|
|
2918
|
+
async product(options) {
|
|
2919
|
+
return this.client._post("/api/v1/specs/product", options);
|
|
2920
|
+
}
|
|
2921
|
+
/**
|
|
2922
|
+
* Spec's stores in a Texas region: store_id, name, status, address, phone,
|
|
2923
|
+
* coordinates and opening hours.
|
|
2924
|
+
*
|
|
2925
|
+
* Costs 1 credit.
|
|
2926
|
+
*/
|
|
2927
|
+
async stores(options) {
|
|
2928
|
+
return this.client._post("/api/v1/specs/stores", options);
|
|
2929
|
+
}
|
|
2930
|
+
};
|
|
2931
|
+
|
|
2857
2932
|
// src/namespaces/trustpilot.ts
|
|
2858
2933
|
var TrustpilotNamespace = class {
|
|
2859
2934
|
constructor(client) {
|
|
@@ -3368,6 +3443,8 @@ var Scavio = class extends ScavioCore {
|
|
|
3368
3443
|
heb;
|
|
3369
3444
|
kroger;
|
|
3370
3445
|
decathlon;
|
|
3446
|
+
totalwine;
|
|
3447
|
+
specs;
|
|
3371
3448
|
trustpilot;
|
|
3372
3449
|
chatgpt;
|
|
3373
3450
|
gemini;
|
|
@@ -3430,6 +3507,8 @@ var Scavio = class extends ScavioCore {
|
|
|
3430
3507
|
this.heb = new HebNamespace(this);
|
|
3431
3508
|
this.kroger = new KrogerNamespace(this);
|
|
3432
3509
|
this.decathlon = new DecathlonNamespace(this);
|
|
3510
|
+
this.totalwine = new TotalWineNamespace(this);
|
|
3511
|
+
this.specs = new SpecsNamespace(this);
|
|
3433
3512
|
this.trustpilot = new TrustpilotNamespace(this);
|
|
3434
3513
|
this.chatgpt = new ChatgptNamespace(this);
|
|
3435
3514
|
this.gemini = new GeminiNamespace(this);
|