scrapebadger 0.39.0 → 0.40.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.d.cts +17 -8
- package/dist/index.d.ts +17 -8
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1229,14 +1229,21 @@ interface ShoppingClickParams {
|
|
|
1229
1229
|
product_id?: string;
|
|
1230
1230
|
}
|
|
1231
1231
|
/**
|
|
1232
|
-
* Params for `/v1/google/shopping/offers` —
|
|
1233
|
-
* (GTIN-8/UPC-A/EAN-13/GTIN-14
|
|
1234
|
-
*
|
|
1235
|
-
*
|
|
1232
|
+
* Params for `/v1/google/shopping/offers` — multi-seller Google Shopping
|
|
1233
|
+
* offers for a product identified by `barcode` (GTIN-8/UPC-A/EAN-13/GTIN-14,
|
|
1234
|
+
* resolved via Google web search first) OR by its Google Shopping
|
|
1235
|
+
* `catalog_id` (sellers read straight off Google's product page). Exactly
|
|
1236
|
+
* one of the two is required (400 otherwise); 422 for an invalid/
|
|
1237
|
+
* checksum-failing barcode, 404 when nothing resolves.
|
|
1236
1238
|
*/
|
|
1237
1239
|
interface ShoppingOffersParams {
|
|
1238
1240
|
/** Product barcode: a GTIN-8, UPC-A, EAN-13, or GTIN-14. */
|
|
1239
|
-
barcode
|
|
1241
|
+
barcode?: string;
|
|
1242
|
+
/**
|
|
1243
|
+
* Google Shopping `catalogid` — the `catalog_id` on `shopping.search`
|
|
1244
|
+
* tiles, or `prds=catalogid:…` in a Google Shopping URL.
|
|
1245
|
+
*/
|
|
1246
|
+
catalog_id?: string;
|
|
1240
1247
|
/** ISO-3166 alpha-2 country code (e.g. `us`). */
|
|
1241
1248
|
gl?: string;
|
|
1242
1249
|
/** UI/results language (e.g. `en`). Defaults to `en`. */
|
|
@@ -2015,9 +2022,11 @@ declare class ShoppingClient {
|
|
|
2015
2022
|
*/
|
|
2016
2023
|
click(params: ShoppingClickParams): Promise<GoogleResponse>;
|
|
2017
2024
|
/**
|
|
2018
|
-
*
|
|
2019
|
-
*
|
|
2020
|
-
*
|
|
2025
|
+
* Multi-seller Google Shopping offers for a product, by `barcode`
|
|
2026
|
+
* (GTIN-8/UPC-A/EAN-13/GTIN-14, resolved via Google web search first) or
|
|
2027
|
+
* by Google Shopping `catalog_id` (sellers read off Google's product page).
|
|
2028
|
+
* Throws on 400 (not exactly one identifier), 422 (invalid barcode) or 404
|
|
2029
|
+
* (nothing resolves).
|
|
2021
2030
|
*/
|
|
2022
2031
|
offers(params: ShoppingOffersParams): Promise<GoogleResponse>;
|
|
2023
2032
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1229,14 +1229,21 @@ interface ShoppingClickParams {
|
|
|
1229
1229
|
product_id?: string;
|
|
1230
1230
|
}
|
|
1231
1231
|
/**
|
|
1232
|
-
* Params for `/v1/google/shopping/offers` —
|
|
1233
|
-
* (GTIN-8/UPC-A/EAN-13/GTIN-14
|
|
1234
|
-
*
|
|
1235
|
-
*
|
|
1232
|
+
* Params for `/v1/google/shopping/offers` — multi-seller Google Shopping
|
|
1233
|
+
* offers for a product identified by `barcode` (GTIN-8/UPC-A/EAN-13/GTIN-14,
|
|
1234
|
+
* resolved via Google web search first) OR by its Google Shopping
|
|
1235
|
+
* `catalog_id` (sellers read straight off Google's product page). Exactly
|
|
1236
|
+
* one of the two is required (400 otherwise); 422 for an invalid/
|
|
1237
|
+
* checksum-failing barcode, 404 when nothing resolves.
|
|
1236
1238
|
*/
|
|
1237
1239
|
interface ShoppingOffersParams {
|
|
1238
1240
|
/** Product barcode: a GTIN-8, UPC-A, EAN-13, or GTIN-14. */
|
|
1239
|
-
barcode
|
|
1241
|
+
barcode?: string;
|
|
1242
|
+
/**
|
|
1243
|
+
* Google Shopping `catalogid` — the `catalog_id` on `shopping.search`
|
|
1244
|
+
* tiles, or `prds=catalogid:…` in a Google Shopping URL.
|
|
1245
|
+
*/
|
|
1246
|
+
catalog_id?: string;
|
|
1240
1247
|
/** ISO-3166 alpha-2 country code (e.g. `us`). */
|
|
1241
1248
|
gl?: string;
|
|
1242
1249
|
/** UI/results language (e.g. `en`). Defaults to `en`. */
|
|
@@ -2015,9 +2022,11 @@ declare class ShoppingClient {
|
|
|
2015
2022
|
*/
|
|
2016
2023
|
click(params: ShoppingClickParams): Promise<GoogleResponse>;
|
|
2017
2024
|
/**
|
|
2018
|
-
*
|
|
2019
|
-
*
|
|
2020
|
-
*
|
|
2025
|
+
* Multi-seller Google Shopping offers for a product, by `barcode`
|
|
2026
|
+
* (GTIN-8/UPC-A/EAN-13/GTIN-14, resolved via Google web search first) or
|
|
2027
|
+
* by Google Shopping `catalog_id` (sellers read off Google's product page).
|
|
2028
|
+
* Throws on 400 (not exactly one identifier), 422 (invalid barcode) or 404
|
|
2029
|
+
* (nothing resolves).
|
|
2021
2030
|
*/
|
|
2022
2031
|
offers(params: ShoppingOffersParams): Promise<GoogleResponse>;
|
|
2023
2032
|
}
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
var WebSocket__default = /*#__PURE__*/_interopDefault(WebSocket);
|
|
10
10
|
|
|
11
11
|
// src/internal/version.ts
|
|
12
|
-
var SDK_VERSION = "0.
|
|
12
|
+
var SDK_VERSION = "0.40.0";
|
|
13
13
|
|
|
14
14
|
// src/internal/exceptions.ts
|
|
15
15
|
var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
|
|
@@ -3336,9 +3336,11 @@ var ShoppingClient = class {
|
|
|
3336
3336
|
});
|
|
3337
3337
|
}
|
|
3338
3338
|
/**
|
|
3339
|
-
*
|
|
3340
|
-
*
|
|
3341
|
-
*
|
|
3339
|
+
* Multi-seller Google Shopping offers for a product, by `barcode`
|
|
3340
|
+
* (GTIN-8/UPC-A/EAN-13/GTIN-14, resolved via Google web search first) or
|
|
3341
|
+
* by Google Shopping `catalog_id` (sellers read off Google's product page).
|
|
3342
|
+
* Throws on 400 (not exactly one identifier), 422 (invalid barcode) or 404
|
|
3343
|
+
* (nothing resolves).
|
|
3342
3344
|
*/
|
|
3343
3345
|
async offers(params) {
|
|
3344
3346
|
return this.client.request("/v1/google/shopping/offers", {
|