@factorypure/client-helpers 1.0.21 → 1.0.23

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +4 -221
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -311,7 +311,7 @@ export type ScrapeFiltersType = {
311
311
  skip_vendors: string[];
312
312
  vendor_search_exclusions: string[];
313
313
  search_exclusions: string[];
314
- result_ignore_keys: ResultIgnoreType[];
314
+ result_ignore_keys: ResultIgnoreType[] | null;
315
315
  brand_name_alternates: string[];
316
316
  dayWindow: number | null;
317
317
  };
@@ -365,8 +365,8 @@ export declare const HIDE_OVERRIDE_REASONS: {
365
365
  };
366
366
  export declare const TOO_CHEAP_MULTIPLIER = 0.75;
367
367
  export declare const TOO_EXPENSIVE_MULTIPLIER = 1.15;
368
- export declare const filterScrapeResults: ({ scrapeResults, variant, filters, globalScrapeOptions, }: {
369
- scrapeResults: ScrapeResultsType[] | ImmersiveScrapeResultsType[];
368
+ export declare const filterScrapeResults: <T extends ScrapeResultsType | ImmersiveScrapeResultsType>({ scrapeResults, variant, filters, globalScrapeOptions, }: {
369
+ scrapeResults: T[];
370
370
  variant: {
371
371
  id: number;
372
372
  title: string;
@@ -376,224 +376,7 @@ export declare const filterScrapeResults: ({ scrapeResults, variant, filters, gl
376
376
  };
377
377
  filters: ScrapeFiltersType;
378
378
  globalScrapeOptions?: any;
379
- }) => {
380
- id: number;
381
- scrape_id: number;
382
- variant_id: number;
383
- type: string;
384
- format: any;
385
- position: number;
386
- title: string;
387
- found_product_id: string;
388
- product_link: string;
389
- inline_link: any;
390
- immersive_product_page_token: string;
391
- serpapi_immersive_product_api: string;
392
- source: string;
393
- source_icon: string;
394
- multiple_sources: number;
395
- price: string;
396
- extracted_price: number;
397
- old_price: any;
398
- extracted_old_price: any;
399
- rating: any;
400
- reviews: any;
401
- snippet: any;
402
- thumbnail: string;
403
- serpapi_thumbnail: string;
404
- tag: any;
405
- extensions: any;
406
- delivery: any;
407
- created_at: string;
408
- store_id: number;
409
- match_score: number | null;
410
- ignore_result: boolean;
411
- ignore_reasons: string[];
412
- hide_reasons: string[];
413
- hide_override_reasons: string[];
414
- regexUnitResults: {
415
- inch: {
416
- value: string;
417
- source: string;
418
- normalized: string;
419
- }[];
420
- cm: {
421
- value: string;
422
- source: string;
423
- normalized: string;
424
- }[];
425
- hp: {
426
- value: string;
427
- source: string;
428
- normalized: string;
429
- }[];
430
- cc: {
431
- value: string;
432
- source: string;
433
- normalized: string;
434
- }[];
435
- ton: {
436
- value: string;
437
- source: string;
438
- normalized: string;
439
- }[];
440
- lbs: {
441
- value: string;
442
- source: string;
443
- normalized: string;
444
- }[];
445
- volts: {
446
- value: string;
447
- source: string;
448
- normalized: string;
449
- }[];
450
- amp: {
451
- value: string;
452
- source: string;
453
- normalized: string;
454
- }[];
455
- watt: {
456
- value: string;
457
- source: string;
458
- normalized: string;
459
- }[];
460
- mph: {
461
- value: string;
462
- source: string;
463
- normalized: string;
464
- }[];
465
- mile: {
466
- value: string;
467
- source: string;
468
- normalized: string;
469
- }[];
470
- ah: {
471
- value: string;
472
- source: string;
473
- normalized: string;
474
- }[];
475
- } | null;
476
- google_product_link?: null | undefined;
477
- calculated_sku?: null | undefined;
478
- calculated_sku_count?: null | undefined;
479
- raw_sku_results?: null | undefined;
480
- details_and_offers?: null | undefined;
481
- parsed_results?: null | undefined;
482
- lowest_price?: null | undefined;
483
- highest_price?: null | undefined;
484
- latest_source_count?: null | undefined;
485
- largest_source_count?: null | undefined;
486
- is_immersive?: null | undefined;
487
- brand?: null | undefined;
488
- company_id?: null | undefined;
489
- }[] | {
490
- id: number;
491
- scrape_id: number;
492
- variant_id: number;
493
- position: number;
494
- title: string;
495
- found_product_id: string;
496
- product_link: string;
497
- immersive_product_page_token: string;
498
- source: string;
499
- source_icon: string;
500
- price: string;
501
- extracted_price: number;
502
- old_price: any;
503
- extracted_old_price: any;
504
- total: any;
505
- extracted_total: any;
506
- rating: any;
507
- reviews: any;
508
- details_and_offers: string[] | null;
509
- tag: any;
510
- discount: any;
511
- extensions: any;
512
- delivery: any;
513
- delivery_extracted: any;
514
- created_at: string;
515
- store_id: number;
516
- serpapi_thumbnail: string;
517
- google_product_link: string;
518
- calculated_sku: string | null;
519
- calculated_sku_count: number | null;
520
- raw_sku_results: any;
521
- parsed_results: string | null;
522
- lowest_price: number | null;
523
- highest_price: number | null;
524
- latest_source_count: number | null;
525
- largest_source_count: number | null;
526
- is_immersive: boolean;
527
- score: number | null;
528
- ignore_result: boolean;
529
- ignore_reasons: string[];
530
- hide_reasons: string[];
531
- hide_override_reasons: string[];
532
- brand: string | null;
533
- company_id: number | null;
534
- regexUnitResults: {
535
- inch: {
536
- value: string;
537
- source: string;
538
- normalized: string;
539
- }[];
540
- cm: {
541
- value: string;
542
- source: string;
543
- normalized: string;
544
- }[];
545
- hp: {
546
- value: string;
547
- source: string;
548
- normalized: string;
549
- }[];
550
- cc: {
551
- value: string;
552
- source: string;
553
- normalized: string;
554
- }[];
555
- ton: {
556
- value: string;
557
- source: string;
558
- normalized: string;
559
- }[];
560
- lbs: {
561
- value: string;
562
- source: string;
563
- normalized: string;
564
- }[];
565
- volts: {
566
- value: string;
567
- source: string;
568
- normalized: string;
569
- }[];
570
- amp: {
571
- value: string;
572
- source: string;
573
- normalized: string;
574
- }[];
575
- watt: {
576
- value: string;
577
- source: string;
578
- normalized: string;
579
- }[];
580
- mph: {
581
- value: string;
582
- source: string;
583
- normalized: string;
584
- }[];
585
- mile: {
586
- value: string;
587
- source: string;
588
- normalized: string;
589
- }[];
590
- ah: {
591
- value: string;
592
- source: string;
593
- normalized: string;
594
- }[];
595
- } | null;
596
- }[];
379
+ }) => T[];
597
380
  export declare const getRefurbishedKeywords: (variant: {
598
381
  sku?: string;
599
382
  }) => string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorypure/client-helpers",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",