scavio 0.28.0 → 0.28.2

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.d.cts CHANGED
@@ -4873,8 +4873,14 @@ interface HebSearchOptions {
4873
4873
  query: string;
4874
4874
  /** Results page, 1-based (1-100). */
4875
4875
  page?: number;
4876
- /** Results per page (1-60; server default 30). */
4876
+ /** Results per page (1-60; server default 60). */
4877
4877
  page_size?: number;
4878
+ /**
4879
+ * HEB store number from stores() (field store_number), e.g. "441". Prices,
4880
+ * stock, aisle location and assortment come from that store, echoed in
4881
+ * data.store. US only. Omit for HEB's default store.
4882
+ */
4883
+ store_id?: string | number;
4878
4884
  [key: string]: unknown;
4879
4885
  }
4880
4886
  interface HebProductOptions {
@@ -4884,10 +4890,19 @@ interface HebProductOptions {
4884
4890
  * Preferred over slug + product_id.
4885
4891
  */
4886
4892
  product_url?: string;
4887
- /** HEB product id (numeric id at the end of a product URL). Requires slug. */
4893
+ /**
4894
+ * HEB product id (numeric id at the end of a product URL). Requires slug,
4895
+ * unless store_id is set.
4896
+ */
4888
4897
  product_id?: string;
4889
- /** Product slug (readable part of the URL). Required with product_id. */
4898
+ /** Product slug (readable part of the URL). Required with product_id, unless store_id is set. */
4890
4899
  slug?: string;
4900
+ /**
4901
+ * HEB store number from stores() (field store_number), e.g. "441". Price,
4902
+ * stock and aisle location come from that store, echoed in data.store. US
4903
+ * only. Omit for HEB's default store.
4904
+ */
4905
+ store_id?: string | number;
4891
4906
  [key: string]: unknown;
4892
4907
  }
4893
4908
  interface HebStoresOptions {
@@ -4903,7 +4918,7 @@ declare class HebNamespace {
4903
4918
  /**
4904
4919
  * Search HEB grocery products by keyword: price (cents), sale status, unit
4905
4920
  * price, size, UPC, stock, EBT/SNAP eligibility, aisle location and product
4906
- * URL.
4921
+ * URL. Pass store_id for one store's prices, stock and assortment.
4907
4922
  *
4908
4923
  * Costs 2 credits.
4909
4924
  */
@@ -4911,7 +4926,8 @@ declare class HebNamespace {
4911
4926
  /**
4912
4927
  * Full HEB product detail: nutrition facts, ingredients, description, images,
4913
4928
  * similar products, coupons, EBT/SNAP eligibility and breadcrumbs. Pass
4914
- * product_url (from search()) or slug + product_id.
4929
+ * product_url (from search()) or slug + product_id, or product_id alone
4930
+ * with store_id.
4915
4931
  *
4916
4932
  * Costs 2 credits.
4917
4933
  */
@@ -4967,6 +4983,50 @@ declare class KrogerNamespace {
4967
4983
  product(options: KrogerProductOptions): Promise<Record<string, unknown>>;
4968
4984
  }
4969
4985
 
4986
+ type DecathlonCountry = "fr" | "es" | "it" | "in" | "uk" | "pt" | "net";
4987
+ interface DecathlonSearchOptions {
4988
+ /** Search keywords (1-200 characters). */
4989
+ query: string;
4990
+ /** Country domain. */
4991
+ country: DecathlonCountry;
4992
+ /** Results page, 1-based (1-50). */
4993
+ page?: number;
4994
+ [key: string]: unknown;
4995
+ }
4996
+ interface DecathlonProductOptions {
4997
+ /**
4998
+ * Full or relative product URL from any Decathlon domain (e.g.
4999
+ * "/p/mens-running-shoes/123456/..."). Preferred.
5000
+ */
5001
+ product_url?: string;
5002
+ /** Decathlon numeric product ID (from the /p/{slug}/{id}/... URL pattern). */
5003
+ product_id?: string;
5004
+ /** Country domain. */
5005
+ country: DecathlonCountry;
5006
+ [key: string]: unknown;
5007
+ }
5008
+ declare class DecathlonNamespace {
5009
+ private client;
5010
+ constructor(client: Scavio);
5011
+ /**
5012
+ * Search Decathlon products by keyword across 7 country domains (FR, ES, IT,
5013
+ * IN, UK, PT, NET). Returns product name, brand, price (cents), currency,
5014
+ * availability, rating, review count and image.
5015
+ *
5016
+ * Costs 2 credits.
5017
+ */
5018
+ search(options: DecathlonSearchOptions): Promise<Record<string, unknown>>;
5019
+ /**
5020
+ * Full Decathlon product detail by URL or product ID: description, images,
5021
+ * SKU, GTIN, color, price (cents), list price, availability, offers/variants,
5022
+ * rating, review count, category and breadcrumbs. Supports all 7 country
5023
+ * domains.
5024
+ *
5025
+ * Costs 2 credits.
5026
+ */
5027
+ product(options: DecathlonProductOptions): Promise<Record<string, unknown>>;
5028
+ }
5029
+
4970
5030
  type TrustpilotReviewsDateRange = "last30days" | "last3months" | "last6months" | "last12months";
4971
5031
  type TrustpilotReviewsSort = "recency" | "relevance";
4972
5032
  type TrustpilotCategorySort = "most_relevant" | "reviews_count" | "latest_review";
@@ -6086,6 +6146,7 @@ declare class Scavio extends ScavioCore {
6086
6146
  readonly costco: CostcoNamespace;
6087
6147
  readonly heb: HebNamespace;
6088
6148
  readonly kroger: KrogerNamespace;
6149
+ readonly decathlon: DecathlonNamespace;
6089
6150
  readonly trustpilot: TrustpilotNamespace;
6090
6151
  readonly chatgpt: ChatgptNamespace;
6091
6152
  readonly gemini: GeminiNamespace;
package/dist/index.d.ts CHANGED
@@ -4873,8 +4873,14 @@ interface HebSearchOptions {
4873
4873
  query: string;
4874
4874
  /** Results page, 1-based (1-100). */
4875
4875
  page?: number;
4876
- /** Results per page (1-60; server default 30). */
4876
+ /** Results per page (1-60; server default 60). */
4877
4877
  page_size?: number;
4878
+ /**
4879
+ * HEB store number from stores() (field store_number), e.g. "441". Prices,
4880
+ * stock, aisle location and assortment come from that store, echoed in
4881
+ * data.store. US only. Omit for HEB's default store.
4882
+ */
4883
+ store_id?: string | number;
4878
4884
  [key: string]: unknown;
4879
4885
  }
4880
4886
  interface HebProductOptions {
@@ -4884,10 +4890,19 @@ interface HebProductOptions {
4884
4890
  * Preferred over slug + product_id.
4885
4891
  */
4886
4892
  product_url?: string;
4887
- /** HEB product id (numeric id at the end of a product URL). Requires slug. */
4893
+ /**
4894
+ * HEB product id (numeric id at the end of a product URL). Requires slug,
4895
+ * unless store_id is set.
4896
+ */
4888
4897
  product_id?: string;
4889
- /** Product slug (readable part of the URL). Required with product_id. */
4898
+ /** Product slug (readable part of the URL). Required with product_id, unless store_id is set. */
4890
4899
  slug?: string;
4900
+ /**
4901
+ * HEB store number from stores() (field store_number), e.g. "441". Price,
4902
+ * stock and aisle location come from that store, echoed in data.store. US
4903
+ * only. Omit for HEB's default store.
4904
+ */
4905
+ store_id?: string | number;
4891
4906
  [key: string]: unknown;
4892
4907
  }
4893
4908
  interface HebStoresOptions {
@@ -4903,7 +4918,7 @@ declare class HebNamespace {
4903
4918
  /**
4904
4919
  * Search HEB grocery products by keyword: price (cents), sale status, unit
4905
4920
  * price, size, UPC, stock, EBT/SNAP eligibility, aisle location and product
4906
- * URL.
4921
+ * URL. Pass store_id for one store's prices, stock and assortment.
4907
4922
  *
4908
4923
  * Costs 2 credits.
4909
4924
  */
@@ -4911,7 +4926,8 @@ declare class HebNamespace {
4911
4926
  /**
4912
4927
  * Full HEB product detail: nutrition facts, ingredients, description, images,
4913
4928
  * similar products, coupons, EBT/SNAP eligibility and breadcrumbs. Pass
4914
- * product_url (from search()) or slug + product_id.
4929
+ * product_url (from search()) or slug + product_id, or product_id alone
4930
+ * with store_id.
4915
4931
  *
4916
4932
  * Costs 2 credits.
4917
4933
  */
@@ -4967,6 +4983,50 @@ declare class KrogerNamespace {
4967
4983
  product(options: KrogerProductOptions): Promise<Record<string, unknown>>;
4968
4984
  }
4969
4985
 
4986
+ type DecathlonCountry = "fr" | "es" | "it" | "in" | "uk" | "pt" | "net";
4987
+ interface DecathlonSearchOptions {
4988
+ /** Search keywords (1-200 characters). */
4989
+ query: string;
4990
+ /** Country domain. */
4991
+ country: DecathlonCountry;
4992
+ /** Results page, 1-based (1-50). */
4993
+ page?: number;
4994
+ [key: string]: unknown;
4995
+ }
4996
+ interface DecathlonProductOptions {
4997
+ /**
4998
+ * Full or relative product URL from any Decathlon domain (e.g.
4999
+ * "/p/mens-running-shoes/123456/..."). Preferred.
5000
+ */
5001
+ product_url?: string;
5002
+ /** Decathlon numeric product ID (from the /p/{slug}/{id}/... URL pattern). */
5003
+ product_id?: string;
5004
+ /** Country domain. */
5005
+ country: DecathlonCountry;
5006
+ [key: string]: unknown;
5007
+ }
5008
+ declare class DecathlonNamespace {
5009
+ private client;
5010
+ constructor(client: Scavio);
5011
+ /**
5012
+ * Search Decathlon products by keyword across 7 country domains (FR, ES, IT,
5013
+ * IN, UK, PT, NET). Returns product name, brand, price (cents), currency,
5014
+ * availability, rating, review count and image.
5015
+ *
5016
+ * Costs 2 credits.
5017
+ */
5018
+ search(options: DecathlonSearchOptions): Promise<Record<string, unknown>>;
5019
+ /**
5020
+ * Full Decathlon product detail by URL or product ID: description, images,
5021
+ * SKU, GTIN, color, price (cents), list price, availability, offers/variants,
5022
+ * rating, review count, category and breadcrumbs. Supports all 7 country
5023
+ * domains.
5024
+ *
5025
+ * Costs 2 credits.
5026
+ */
5027
+ product(options: DecathlonProductOptions): Promise<Record<string, unknown>>;
5028
+ }
5029
+
4970
5030
  type TrustpilotReviewsDateRange = "last30days" | "last3months" | "last6months" | "last12months";
4971
5031
  type TrustpilotReviewsSort = "recency" | "relevance";
4972
5032
  type TrustpilotCategorySort = "most_relevant" | "reviews_count" | "latest_review";
@@ -6086,6 +6146,7 @@ declare class Scavio extends ScavioCore {
6086
6146
  readonly costco: CostcoNamespace;
6087
6147
  readonly heb: HebNamespace;
6088
6148
  readonly kroger: KrogerNamespace;
6149
+ readonly decathlon: DecathlonNamespace;
6089
6150
  readonly trustpilot: TrustpilotNamespace;
6090
6151
  readonly chatgpt: ChatgptNamespace;
6091
6152
  readonly gemini: GeminiNamespace;
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.28.0" : "0.0.0";
148
+ var SDK_VERSION = true ? "0.28.2" : "0.0.0";
149
149
  var USER_AGENT = `scavio-js/${SDK_VERSION}`;
150
150
  function isServerRuntime() {
151
151
  const g = globalThis;
@@ -2675,7 +2675,7 @@ var HebNamespace = class {
2675
2675
  /**
2676
2676
  * Search HEB grocery products by keyword: price (cents), sale status, unit
2677
2677
  * price, size, UPC, stock, EBT/SNAP eligibility, aisle location and product
2678
- * URL.
2678
+ * URL. Pass store_id for one store's prices, stock and assortment.
2679
2679
  *
2680
2680
  * Costs 2 credits.
2681
2681
  */
@@ -2685,7 +2685,8 @@ var HebNamespace = class {
2685
2685
  /**
2686
2686
  * Full HEB product detail: nutrition facts, ingredients, description, images,
2687
2687
  * similar products, coupons, EBT/SNAP eligibility and breadcrumbs. Pass
2688
- * product_url (from search()) or slug + product_id.
2688
+ * product_url (from search()) or slug + product_id, or product_id alone
2689
+ * with store_id.
2689
2690
  *
2690
2691
  * Costs 2 credits.
2691
2692
  */
@@ -2733,6 +2734,35 @@ var KrogerNamespace = class {
2733
2734
  }
2734
2735
  };
2735
2736
 
2737
+ // src/namespaces/decathlon.ts
2738
+ var DecathlonNamespace = class {
2739
+ constructor(client) {
2740
+ this.client = client;
2741
+ }
2742
+ client;
2743
+ /**
2744
+ * Search Decathlon products by keyword across 7 country domains (FR, ES, IT,
2745
+ * IN, UK, PT, NET). Returns product name, brand, price (cents), currency,
2746
+ * availability, rating, review count and image.
2747
+ *
2748
+ * Costs 2 credits.
2749
+ */
2750
+ async search(options) {
2751
+ return this.client._post("/api/v1/decathlon/search", options);
2752
+ }
2753
+ /**
2754
+ * Full Decathlon product detail by URL or product ID: description, images,
2755
+ * SKU, GTIN, color, price (cents), list price, availability, offers/variants,
2756
+ * rating, review count, category and breadcrumbs. Supports all 7 country
2757
+ * domains.
2758
+ *
2759
+ * Costs 2 credits.
2760
+ */
2761
+ async product(options) {
2762
+ return this.client._post("/api/v1/decathlon/product", options);
2763
+ }
2764
+ };
2765
+
2736
2766
  // src/namespaces/trustpilot.ts
2737
2767
  var TrustpilotNamespace = class {
2738
2768
  constructor(client) {
@@ -3246,6 +3276,7 @@ var Scavio = class extends ScavioCore {
3246
3276
  costco;
3247
3277
  heb;
3248
3278
  kroger;
3279
+ decathlon;
3249
3280
  trustpilot;
3250
3281
  chatgpt;
3251
3282
  gemini;
@@ -3307,6 +3338,7 @@ var Scavio = class extends ScavioCore {
3307
3338
  this.costco = new CostcoNamespace(this);
3308
3339
  this.heb = new HebNamespace(this);
3309
3340
  this.kroger = new KrogerNamespace(this);
3341
+ this.decathlon = new DecathlonNamespace(this);
3310
3342
  this.trustpilot = new TrustpilotNamespace(this);
3311
3343
  this.chatgpt = new ChatgptNamespace(this);
3312
3344
  this.gemini = new GeminiNamespace(this);