@factorypure/client-helpers 1.1.27 → 1.1.28
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 +3 -0
- package/dist/index.js +6 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -385,6 +385,7 @@ export declare const scrapeResultsSchema: z.ZodObject<{
|
|
|
385
385
|
parsed_results: z.ZodOptional<z.ZodNull>;
|
|
386
386
|
lowest_price: z.ZodOptional<z.ZodNull>;
|
|
387
387
|
highest_price: z.ZodOptional<z.ZodNull>;
|
|
388
|
+
listing_hash: z.ZodOptional<z.ZodNull>;
|
|
388
389
|
latest_source_count: z.ZodOptional<z.ZodNull>;
|
|
389
390
|
largest_source_count: z.ZodOptional<z.ZodNull>;
|
|
390
391
|
is_immersive: z.ZodOptional<z.ZodNull>;
|
|
@@ -575,6 +576,8 @@ export declare const variantScrapeOptionsSchema: z.ZodObject<{
|
|
|
575
576
|
key_parts: z.ZodString;
|
|
576
577
|
}, z.core.$strip>>>;
|
|
577
578
|
day_window: z.ZodNullable<z.ZodString>;
|
|
579
|
+
latest_margin_email_sent_at: z.ZodNullable<z.ZodString>;
|
|
580
|
+
latest_map_email_sent_at: z.ZodNullable<z.ZodString>;
|
|
578
581
|
}, z.core.$strip>;
|
|
579
582
|
export type VariantScrapeOptionsType = z.infer<typeof variantScrapeOptionsSchema>;
|
|
580
583
|
declare const matchConfirmationSchema: z.ZodObject<{
|
package/dist/index.js
CHANGED
|
@@ -279,6 +279,7 @@ export const scrapeResultsSchema = z.object({
|
|
|
279
279
|
parsed_results: z.null().optional(),
|
|
280
280
|
lowest_price: z.null().optional(),
|
|
281
281
|
highest_price: z.null().optional(),
|
|
282
|
+
listing_hash: z.null().optional(),
|
|
282
283
|
latest_source_count: z.null().optional(),
|
|
283
284
|
largest_source_count: z.null().optional(),
|
|
284
285
|
is_immersive: z.null().optional(),
|
|
@@ -380,6 +381,8 @@ export const variantScrapeOptionsSchema = z.object({
|
|
|
380
381
|
found_product_ids: z.array(z.string()),
|
|
381
382
|
result_ignore_keys: z.array(ResultIgnoreSchema).nullable(),
|
|
382
383
|
day_window: z.string().nullable(),
|
|
384
|
+
latest_margin_email_sent_at: z.string().nullable(),
|
|
385
|
+
latest_map_email_sent_at: z.string().nullable(),
|
|
383
386
|
});
|
|
384
387
|
const matchConfirmationSchema = z.object({
|
|
385
388
|
confirmation_source: z.string(),
|
|
@@ -1644,8 +1647,10 @@ export const filterScrapeResultsV2 = ({ scrapeResults, variant, variantScrapeOpt
|
|
|
1644
1647
|
function handleDuplicatesV2(results) {
|
|
1645
1648
|
const filteredUniqueResultsMap = {};
|
|
1646
1649
|
results.forEach((item) => {
|
|
1647
|
-
// @ts-ignore
|
|
1648
1650
|
const key = item.listing_hash;
|
|
1651
|
+
if (!key) {
|
|
1652
|
+
return;
|
|
1653
|
+
}
|
|
1649
1654
|
if (!filteredUniqueResultsMap[key]) {
|
|
1650
1655
|
filteredUniqueResultsMap[key] = item;
|
|
1651
1656
|
}
|