@factorypure/client-helpers 1.0.24 → 1.0.26

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.ts CHANGED
@@ -172,6 +172,10 @@ export declare const scrapeResultsSchema: z.ZodObject<{
172
172
  calculated_sku_count: z.ZodOptional<z.ZodNull>;
173
173
  raw_sku_results: z.ZodOptional<z.ZodNull>;
174
174
  details_and_offers: z.ZodOptional<z.ZodNull>;
175
+ total: z.ZodOptional<z.ZodNull>;
176
+ extracted_total: z.ZodOptional<z.ZodNull>;
177
+ shipping: z.ZodOptional<z.ZodNull>;
178
+ extracted_shipping: z.ZodOptional<z.ZodNull>;
175
179
  parsed_results: z.ZodOptional<z.ZodNull>;
176
180
  lowest_price: z.ZodOptional<z.ZodNull>;
177
181
  highest_price: z.ZodOptional<z.ZodNull>;
@@ -198,14 +202,14 @@ export declare const immersiveScrapeResultsSchema: z.ZodObject<{
198
202
  extracted_old_price: z.ZodNullable<z.ZodAny>;
199
203
  total: z.ZodNullable<z.ZodAny>;
200
204
  extracted_total: z.ZodNullable<z.ZodAny>;
205
+ shipping: z.ZodNullable<z.ZodAny>;
206
+ extracted_shipping: z.ZodNullable<z.ZodAny>;
201
207
  rating: z.ZodNullable<z.ZodAny>;
202
208
  reviews: z.ZodNullable<z.ZodAny>;
203
209
  details_and_offers: z.ZodNullable<z.ZodArray<z.ZodString>>;
204
210
  tag: z.ZodNullable<z.ZodAny>;
205
211
  discount: z.ZodNullable<z.ZodAny>;
206
212
  extensions: z.ZodNullable<z.ZodAny>;
207
- delivery: z.ZodNullable<z.ZodAny>;
208
- delivery_extracted: z.ZodNullable<z.ZodAny>;
209
213
  created_at: z.ZodString;
210
214
  store_id: z.ZodNumber;
211
215
  serpapi_thumbnail: z.ZodString;
package/dist/index.js CHANGED
@@ -64,6 +64,10 @@ export const scrapeResultsSchema = z.object({
64
64
  calculated_sku_count: z.null().optional(),
65
65
  raw_sku_results: z.null().optional(),
66
66
  details_and_offers: z.null().optional(),
67
+ total: z.null().optional(),
68
+ extracted_total: z.null().optional(),
69
+ shipping: z.null().optional(),
70
+ extracted_shipping: z.null().optional(),
67
71
  parsed_results: z.null().optional(),
68
72
  lowest_price: z.null().optional(),
69
73
  highest_price: z.null().optional(),
@@ -90,14 +94,14 @@ export const immersiveScrapeResultsSchema = z.object({
90
94
  extracted_old_price: z.nullable(z.any()),
91
95
  total: z.nullable(z.any()),
92
96
  extracted_total: z.nullable(z.any()),
97
+ shipping: z.nullable(z.any()),
98
+ extracted_shipping: z.nullable(z.any()),
93
99
  rating: z.nullable(z.any()),
94
100
  reviews: z.nullable(z.any()),
95
101
  details_and_offers: z.array(z.string()).nullable(),
96
102
  tag: z.nullable(z.any()),
97
103
  discount: z.nullable(z.any()),
98
104
  extensions: z.nullable(z.any()),
99
- delivery: z.nullable(z.any()),
100
- delivery_extracted: z.nullable(z.any()),
101
105
  created_at: z.string(),
102
106
  store_id: z.number(),
103
107
  serpapi_thumbnail: z.string(),
@@ -601,7 +605,8 @@ export const calculateHideReasons = (result, variant, variantScrapeOptions) => {
601
605
  export const calculateHideOverrideReasons = (result, variant) => {
602
606
  const hide_override_reasons = [];
603
607
  // Match SKU as a whole word or inside parentheses/brackets
604
- const skuRegex = new RegExp(`(?:\\b|[\\(\\[\\{])${variant.sku}(?:\\b|[\\)\\]\\}])`, 'gi');
608
+ const escapedSku = variant.sku.replace(/\+/g, '\\+');
609
+ const skuRegex = new RegExp(`(?:\\b|[\\(\\[\\{])${escapedSku}(?:\\b|[\\)\\]\\}])`, 'gi');
605
610
  if (skuRegex.test(result.title)) {
606
611
  hide_override_reasons.push('SKU Match');
607
612
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorypure/client-helpers",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",