@factorypure/client-helpers 1.0.20 → 1.0.22

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 +5 -129
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -304,8 +304,7 @@ export declare const ResultIgnoreSchema: z.ZodObject<{
304
304
  }, z.core.$strip>;
305
305
  export type ResultIgnoreType = z.infer<typeof ResultIgnoreSchema>;
306
306
  export type ScrapeFiltersType = {
307
- found_id_exclusions: number[] | null;
308
- dayWindow: number | null;
307
+ found_id_exclusions: string[] | null;
309
308
  competitor_exclusions: string[];
310
309
  match_values: string[];
311
310
  skip_skus: string[];
@@ -314,20 +313,7 @@ export type ScrapeFiltersType = {
314
313
  search_exclusions: string[];
315
314
  result_ignore_keys: ResultIgnoreType[];
316
315
  brand_name_alternates: string[];
317
- };
318
- export type FilterOptionsType = {
319
- exclude_linked_variants_enabled?: boolean;
320
- found_id_exclusions_enabled?: boolean;
321
- price_filter_enabled?: boolean;
322
- date_filter_enabled?: boolean;
323
- competitor_filter_enabled?: boolean;
324
- duplicates_filter_enabled?: boolean;
325
- search_index_enabled?: boolean;
326
- skip_skus_enabled?: boolean;
327
- skip_vendors_enabled?: boolean;
328
- wattage_exclusions_enabled?: boolean;
329
- search_exclusions_enabled?: boolean;
330
- exclude_ignored_keys_enabled?: boolean;
316
+ dayWindow: number | null;
331
317
  };
332
318
  export declare const variantScrapeOptionsSchema: z.ZodObject<{
333
319
  search_exclusions: z.ZodArray<z.ZodString>;
@@ -379,8 +365,8 @@ export declare const HIDE_OVERRIDE_REASONS: {
379
365
  };
380
366
  export declare const TOO_CHEAP_MULTIPLIER = 0.75;
381
367
  export declare const TOO_EXPENSIVE_MULTIPLIER = 1.15;
382
- export declare const filterScrapeResults: ({ scrapeResults, variant, filters, globalScrapeOptions, }: {
383
- scrapeResults: ScrapeResultsType[];
368
+ export declare const filterScrapeResults: <T extends ScrapeResultsType | ImmersiveScrapeResultsType>({ scrapeResults, variant, filters, globalScrapeOptions, }: {
369
+ scrapeResults: T[];
384
370
  variant: {
385
371
  id: number;
386
372
  title: string;
@@ -390,117 +376,7 @@ export declare const filterScrapeResults: ({ scrapeResults, variant, filters, gl
390
376
  };
391
377
  filters: ScrapeFiltersType;
392
378
  globalScrapeOptions?: any;
393
- }) => {
394
- id: number;
395
- scrape_id: number;
396
- variant_id: number;
397
- type: string;
398
- format: any;
399
- position: number;
400
- title: string;
401
- found_product_id: string;
402
- product_link: string;
403
- inline_link: any;
404
- immersive_product_page_token: string;
405
- serpapi_immersive_product_api: string;
406
- source: string;
407
- source_icon: string;
408
- multiple_sources: number;
409
- price: string;
410
- extracted_price: number;
411
- old_price: any;
412
- extracted_old_price: any;
413
- rating: any;
414
- reviews: any;
415
- snippet: any;
416
- thumbnail: string;
417
- serpapi_thumbnail: string;
418
- tag: any;
419
- extensions: any;
420
- delivery: any;
421
- created_at: string;
422
- store_id: number;
423
- match_score: number | null;
424
- ignore_result: boolean;
425
- ignore_reasons: string[];
426
- hide_reasons: string[];
427
- hide_override_reasons: string[];
428
- regexUnitResults: {
429
- inch: {
430
- value: string;
431
- source: string;
432
- normalized: string;
433
- }[];
434
- cm: {
435
- value: string;
436
- source: string;
437
- normalized: string;
438
- }[];
439
- hp: {
440
- value: string;
441
- source: string;
442
- normalized: string;
443
- }[];
444
- cc: {
445
- value: string;
446
- source: string;
447
- normalized: string;
448
- }[];
449
- ton: {
450
- value: string;
451
- source: string;
452
- normalized: string;
453
- }[];
454
- lbs: {
455
- value: string;
456
- source: string;
457
- normalized: string;
458
- }[];
459
- volts: {
460
- value: string;
461
- source: string;
462
- normalized: string;
463
- }[];
464
- amp: {
465
- value: string;
466
- source: string;
467
- normalized: string;
468
- }[];
469
- watt: {
470
- value: string;
471
- source: string;
472
- normalized: string;
473
- }[];
474
- mph: {
475
- value: string;
476
- source: string;
477
- normalized: string;
478
- }[];
479
- mile: {
480
- value: string;
481
- source: string;
482
- normalized: string;
483
- }[];
484
- ah: {
485
- value: string;
486
- source: string;
487
- normalized: string;
488
- }[];
489
- } | null;
490
- google_product_link?: null | undefined;
491
- calculated_sku?: null | undefined;
492
- calculated_sku_count?: null | undefined;
493
- raw_sku_results?: null | undefined;
494
- details_and_offers?: null | undefined;
495
- parsed_results?: null | undefined;
496
- lowest_price?: null | undefined;
497
- highest_price?: null | undefined;
498
- latest_source_count?: null | undefined;
499
- largest_source_count?: null | undefined;
500
- is_immersive?: null | undefined;
501
- brand?: null | undefined;
502
- company_id?: null | undefined;
503
- }[];
379
+ }) => T[];
504
380
  export declare const getRefurbishedKeywords: (variant: {
505
381
  sku?: string;
506
382
  }) => string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorypure/client-helpers",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",