house-types 2.14.2 → 2.15.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.ts CHANGED
@@ -540,123 +540,299 @@ export declare const SURFACES: readonly ["5", "10", "15", "20", "30", "40", "50"
540
540
  export declare const BEDROOMS: readonly ["1", "2", "3", "4", "5", "6", "7"];
541
541
  export declare const FLATMATES: readonly ["1", "2", "3", "4", "5", "6", "7"];
542
542
  export declare const stringifiedParserHouseType = "{\n city: string;\n price: number;\n propertyType: \"House\" | \"Apartment\" | \"Studio\" | \"Room\";\n furnishing: \"Uncarpeted\" | \"Unfurnished\" | \"Furnished\";\n flatmatesGender: \"Male\" | \"Female\" | \"Mixed\" | null;\n postalCode: string | null;\n bedrooms: number | null;\n bathrooms: number | null;\n surface: number | null;\n addressWithoutCity: string | null;\n immediatelyAvailable: boolean;\n startDateIfNotImmediatelyAvailableISO8601: string | null;\n flatmatesIfShared: number | null;\n listingRequiredGender: \"Male\" | \"Female\" | \"Other\" | null;\n seniorsOnly: boolean | null;\n studentsOnly: boolean | null;\n bathtub: boolean | null;\n garden: boolean | null;\n floorNumber: number | null,\n pets: boolean | null;\n garage: boolean | null;\n gym: boolean | null;\n}";
543
- export declare const Id: z.ZodString;
543
+ export declare const Id: z.ZodUUID;
544
544
  export declare const AlertSchema: z.ZodObject<{
545
- id: z.ZodString;
546
- email: z.ZodString;
547
- city: z.ZodEnum<["Alkmaar", "Almere", "Alphen aan den Rijn", "Amsterdam", "Apeldoorn", "Arnhem", "Beverwijk", "Bilthoven", "Bloemendaal", "Breda", "Bussum", "Capelle Aan Den Ijssel", "Castricum", "De Meern", "Delft", "Den Bosch", "Deventer", "Diemen", "Doorn", "Dordrecht", "Driebergen-rijsenburg", "Duivendrecht", "Ede", "Eindhoven", "Enschede", "Groningen", "Haarlem", "Heemskerk", "Hengelo", "Hoogezand", "Hoorn", "Ijsselstein", "Leende", "Leeuwarden", "Leiden", "Leidschendam", "Lelystad", "Maastricht", "Nieuwegein", "Nijkerk", "Nijmegen", "Noordwijk", "Oosterhout", "Purmerend", "Ridderkerk", "Roosendaal", "Rosmalen", "Rotterdam", "Schiedam", "Sint-Oedenrode", "Soesterberg", "Staphorst", "The Hague", "Tilburg", "Utrecht", "Velp-Rheden", "Venlo", "Volendam", "Voorschoten", "Vught", "Werkhoven", "Zaandam", "Zandvoort", "Zoetermeer", "Zutphen", "Zwolle"]>;
548
- radius: z.ZodEffects<z.ZodEnum<["2", "5", "10", "20"]>, number, "5" | "2" | "10" | "20">;
549
- propertyTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["House", "Apartment", "Studio", "Room"]>, "many">>;
550
- maxPrice: z.ZodEffects<z.ZodEnum<["250", "300", "350", "400", "450", "500", "550", "600", "650", "700", "750", "800", "850", "900", "950", "1000", "1050", "1100", "1150", "1200", "1250", "1300", "1350", "1400", "1450", "1500", "1550", "1600", "1650", "1700", "1750", "1800", "1850", "1900", "1950", "2000", "2050", "2100", "2150", "2200", "2250", "2300", "2350", "2400", "2450", "2500", "2550", "2600", "2650", "2700", "2750", "2800", "2850", "2900", "2950", "3000", "3050", "3100", "3150", "3200", "3250", "3300", "3350", "3400", "3450", "3500", "3550", "3600", "3650", "3700", "3750", "3800", "3850", "3900", "3950", "4000", "4050", "4100", "4150", "4200", "4250", "4300", "4350", "4400", "4450", "4500", "4550", "4600", "4650", "4700", "4750", "4800", "4850", "4900", "4950", "5000", "5050", "5100", "5150", "5200"]>, number, "250" | "300" | "350" | "400" | "450" | "500" | "550" | "600" | "650" | "700" | "750" | "800" | "850" | "900" | "950" | "1000" | "1050" | "1100" | "1150" | "1200" | "1250" | "1300" | "1350" | "1400" | "1450" | "1500" | "1550" | "1600" | "1650" | "1700" | "1750" | "1800" | "1850" | "1900" | "1950" | "2000" | "2050" | "2100" | "2150" | "2200" | "2250" | "2300" | "2350" | "2400" | "2450" | "2500" | "2550" | "2600" | "2650" | "2700" | "2750" | "2800" | "2850" | "2900" | "2950" | "3000" | "3050" | "3100" | "3150" | "3200" | "3250" | "3300" | "3350" | "3400" | "3450" | "3500" | "3550" | "3600" | "3650" | "3700" | "3750" | "3800" | "3850" | "3900" | "3950" | "4000" | "4050" | "4100" | "4150" | "4200" | "4250" | "4300" | "4350" | "4400" | "4450" | "4500" | "4550" | "4600" | "4650" | "4700" | "4750" | "4800" | "4850" | "4900" | "4950" | "5000" | "5050" | "5100" | "5150" | "5200">;
551
- minSurface: z.ZodOptional<z.ZodEffects<z.ZodEnum<["5", "10", "15", "20", "30", "40", "50", "75", "100", "125", "150"]>, number, "5" | "15" | "10" | "20" | "30" | "40" | "50" | "75" | "100" | "125" | "150">>;
552
- minBedrooms: z.ZodOptional<z.ZodEffects<z.ZodEnum<["1", "2", "3", "4", "5", "6", "7"]>, number, "5" | "2" | "1" | "3" | "4" | "6" | "7">>;
545
+ id: z.ZodUUID;
546
+ email: z.ZodEmail;
547
+ city: z.ZodEnum<{
548
+ Alkmaar: "Alkmaar";
549
+ Almere: "Almere";
550
+ "Alphen aan den Rijn": "Alphen aan den Rijn";
551
+ Amsterdam: "Amsterdam";
552
+ Apeldoorn: "Apeldoorn";
553
+ Arnhem: "Arnhem";
554
+ Beverwijk: "Beverwijk";
555
+ Bilthoven: "Bilthoven";
556
+ Bloemendaal: "Bloemendaal";
557
+ Breda: "Breda";
558
+ Bussum: "Bussum";
559
+ "Capelle Aan Den Ijssel": "Capelle Aan Den Ijssel";
560
+ Castricum: "Castricum";
561
+ "De Meern": "De Meern";
562
+ Delft: "Delft";
563
+ "Den Bosch": "Den Bosch";
564
+ Deventer: "Deventer";
565
+ Diemen: "Diemen";
566
+ Doorn: "Doorn";
567
+ Dordrecht: "Dordrecht";
568
+ "Driebergen-rijsenburg": "Driebergen-rijsenburg";
569
+ Duivendrecht: "Duivendrecht";
570
+ Ede: "Ede";
571
+ Eindhoven: "Eindhoven";
572
+ Enschede: "Enschede";
573
+ Groningen: "Groningen";
574
+ Haarlem: "Haarlem";
575
+ Heemskerk: "Heemskerk";
576
+ Hengelo: "Hengelo";
577
+ Hoogezand: "Hoogezand";
578
+ Hoorn: "Hoorn";
579
+ Ijsselstein: "Ijsselstein";
580
+ Leende: "Leende";
581
+ Leeuwarden: "Leeuwarden";
582
+ Leiden: "Leiden";
583
+ Leidschendam: "Leidschendam";
584
+ Lelystad: "Lelystad";
585
+ Maastricht: "Maastricht";
586
+ Nieuwegein: "Nieuwegein";
587
+ Nijkerk: "Nijkerk";
588
+ Nijmegen: "Nijmegen";
589
+ Noordwijk: "Noordwijk";
590
+ Oosterhout: "Oosterhout";
591
+ Purmerend: "Purmerend";
592
+ Ridderkerk: "Ridderkerk";
593
+ Roosendaal: "Roosendaal";
594
+ Rosmalen: "Rosmalen";
595
+ Rotterdam: "Rotterdam";
596
+ Schiedam: "Schiedam";
597
+ "Sint-Oedenrode": "Sint-Oedenrode";
598
+ Soesterberg: "Soesterberg";
599
+ Staphorst: "Staphorst";
600
+ "The Hague": "The Hague";
601
+ Tilburg: "Tilburg";
602
+ Utrecht: "Utrecht";
603
+ "Velp-Rheden": "Velp-Rheden";
604
+ Venlo: "Venlo";
605
+ Volendam: "Volendam";
606
+ Voorschoten: "Voorschoten";
607
+ Vught: "Vught";
608
+ Werkhoven: "Werkhoven";
609
+ Zaandam: "Zaandam";
610
+ Zandvoort: "Zandvoort";
611
+ Zoetermeer: "Zoetermeer";
612
+ Zutphen: "Zutphen";
613
+ Zwolle: "Zwolle";
614
+ }>;
615
+ radius: z.ZodPipe<z.ZodEnum<{
616
+ 5: "5";
617
+ 2: "2";
618
+ 10: "10";
619
+ 20: "20";
620
+ }>, z.ZodTransform<number, "5" | "2" | "10" | "20">>;
621
+ propertyTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
622
+ House: "House";
623
+ Apartment: "Apartment";
624
+ Studio: "Studio";
625
+ Room: "Room";
626
+ }>>>;
627
+ maxPrice: z.ZodPipe<z.ZodEnum<{
628
+ 250: "250";
629
+ 300: "300";
630
+ 350: "350";
631
+ 400: "400";
632
+ 450: "450";
633
+ 500: "500";
634
+ 550: "550";
635
+ 600: "600";
636
+ 650: "650";
637
+ 700: "700";
638
+ 750: "750";
639
+ 800: "800";
640
+ 850: "850";
641
+ 900: "900";
642
+ 950: "950";
643
+ 1000: "1000";
644
+ 1050: "1050";
645
+ 1100: "1100";
646
+ 1150: "1150";
647
+ 1200: "1200";
648
+ 1250: "1250";
649
+ 1300: "1300";
650
+ 1350: "1350";
651
+ 1400: "1400";
652
+ 1450: "1450";
653
+ 1500: "1500";
654
+ 1550: "1550";
655
+ 1600: "1600";
656
+ 1650: "1650";
657
+ 1700: "1700";
658
+ 1750: "1750";
659
+ 1800: "1800";
660
+ 1850: "1850";
661
+ 1900: "1900";
662
+ 1950: "1950";
663
+ 2000: "2000";
664
+ 2050: "2050";
665
+ 2100: "2100";
666
+ 2150: "2150";
667
+ 2200: "2200";
668
+ 2250: "2250";
669
+ 2300: "2300";
670
+ 2350: "2350";
671
+ 2400: "2400";
672
+ 2450: "2450";
673
+ 2500: "2500";
674
+ 2550: "2550";
675
+ 2600: "2600";
676
+ 2650: "2650";
677
+ 2700: "2700";
678
+ 2750: "2750";
679
+ 2800: "2800";
680
+ 2850: "2850";
681
+ 2900: "2900";
682
+ 2950: "2950";
683
+ 3000: "3000";
684
+ 3050: "3050";
685
+ 3100: "3100";
686
+ 3150: "3150";
687
+ 3200: "3200";
688
+ 3250: "3250";
689
+ 3300: "3300";
690
+ 3350: "3350";
691
+ 3400: "3400";
692
+ 3450: "3450";
693
+ 3500: "3500";
694
+ 3550: "3550";
695
+ 3600: "3600";
696
+ 3650: "3650";
697
+ 3700: "3700";
698
+ 3750: "3750";
699
+ 3800: "3800";
700
+ 3850: "3850";
701
+ 3900: "3900";
702
+ 3950: "3950";
703
+ 4000: "4000";
704
+ 4050: "4050";
705
+ 4100: "4100";
706
+ 4150: "4150";
707
+ 4200: "4200";
708
+ 4250: "4250";
709
+ 4300: "4300";
710
+ 4350: "4350";
711
+ 4400: "4400";
712
+ 4450: "4450";
713
+ 4500: "4500";
714
+ 4550: "4550";
715
+ 4600: "4600";
716
+ 4650: "4650";
717
+ 4700: "4700";
718
+ 4750: "4750";
719
+ 4800: "4800";
720
+ 4850: "4850";
721
+ 4900: "4900";
722
+ 4950: "4950";
723
+ 5000: "5000";
724
+ 5050: "5050";
725
+ 5100: "5100";
726
+ 5150: "5150";
727
+ 5200: "5200";
728
+ }>, z.ZodTransform<number, "250" | "300" | "350" | "400" | "450" | "500" | "550" | "600" | "650" | "700" | "750" | "800" | "850" | "900" | "950" | "1000" | "1050" | "1100" | "1150" | "1200" | "1250" | "1300" | "1350" | "1400" | "1450" | "1500" | "1550" | "1600" | "1650" | "1700" | "1750" | "1800" | "1850" | "1900" | "1950" | "2000" | "2050" | "2100" | "2150" | "2200" | "2250" | "2300" | "2350" | "2400" | "2450" | "2500" | "2550" | "2600" | "2650" | "2700" | "2750" | "2800" | "2850" | "2900" | "2950" | "3000" | "3050" | "3100" | "3150" | "3200" | "3250" | "3300" | "3350" | "3400" | "3450" | "3500" | "3550" | "3600" | "3650" | "3700" | "3750" | "3800" | "3850" | "3900" | "3950" | "4000" | "4050" | "4100" | "4150" | "4200" | "4250" | "4300" | "4350" | "4400" | "4450" | "4500" | "4550" | "4600" | "4650" | "4700" | "4750" | "4800" | "4850" | "4900" | "4950" | "5000" | "5050" | "5100" | "5150" | "5200">>;
729
+ minSurface: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
730
+ 5: "5";
731
+ 15: "15";
732
+ 10: "10";
733
+ 20: "20";
734
+ 30: "30";
735
+ 40: "40";
736
+ 50: "50";
737
+ 75: "75";
738
+ 100: "100";
739
+ 125: "125";
740
+ 150: "150";
741
+ }>, z.ZodTransform<number, "5" | "15" | "10" | "20" | "30" | "40" | "50" | "75" | "100" | "125" | "150">>>;
742
+ minBedrooms: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
743
+ 5: "5";
744
+ 2: "2";
745
+ 1: "1";
746
+ 3: "3";
747
+ 4: "4";
748
+ 6: "6";
749
+ 7: "7";
750
+ }>, z.ZodTransform<number, "5" | "2" | "1" | "3" | "4" | "6" | "7">>>;
553
751
  furnished: z.ZodOptional<z.ZodBoolean>;
554
- maxFlatmates: z.ZodOptional<z.ZodEffects<z.ZodEnum<["1", "2", "3", "4", "5", "6", "7"]>, number, "5" | "2" | "1" | "3" | "4" | "6" | "7">>;
555
- flatmatesGender: z.ZodOptional<z.ZodEnum<["Male", "Female", "Mixed"]>>;
556
- gender: z.ZodOptional<z.ZodEnum<["Male", "Female", "Other"]>>;
557
- frequency: z.ZodEffects<z.ZodEnum<["5", "15", "60", "180", "360", "1440", "4320", "10080"]>, number, "5" | "15" | "60" | "180" | "360" | "1440" | "4320" | "10080">;
558
- createdAt: z.ZodString;
559
- }, "strip", z.ZodTypeAny, {
560
- id: string;
561
- email: string;
562
- city: "Alkmaar" | "Almere" | "Alphen aan den Rijn" | "Amsterdam" | "Apeldoorn" | "Arnhem" | "Beverwijk" | "Bilthoven" | "Bloemendaal" | "Breda" | "Bussum" | "Capelle Aan Den Ijssel" | "Castricum" | "De Meern" | "Delft" | "Den Bosch" | "Deventer" | "Diemen" | "Doorn" | "Dordrecht" | "Driebergen-rijsenburg" | "Duivendrecht" | "Ede" | "Eindhoven" | "Enschede" | "Groningen" | "Haarlem" | "Heemskerk" | "Hengelo" | "Hoogezand" | "Hoorn" | "Ijsselstein" | "Leende" | "Leeuwarden" | "Leiden" | "Leidschendam" | "Lelystad" | "Maastricht" | "Nieuwegein" | "Nijkerk" | "Nijmegen" | "Noordwijk" | "Oosterhout" | "Purmerend" | "Ridderkerk" | "Roosendaal" | "Rosmalen" | "Rotterdam" | "Schiedam" | "Sint-Oedenrode" | "Soesterberg" | "Staphorst" | "The Hague" | "Tilburg" | "Utrecht" | "Velp-Rheden" | "Venlo" | "Volendam" | "Voorschoten" | "Vught" | "Werkhoven" | "Zaandam" | "Zandvoort" | "Zoetermeer" | "Zutphen" | "Zwolle";
563
- radius: number;
564
- maxPrice: number;
565
- frequency: number;
566
- createdAt: string;
567
- propertyTypes?: ("House" | "Apartment" | "Studio" | "Room")[] | undefined;
568
- minSurface?: number | undefined;
569
- minBedrooms?: number | undefined;
570
- furnished?: boolean | undefined;
571
- maxFlatmates?: number | undefined;
572
- flatmatesGender?: "Male" | "Female" | "Mixed" | undefined;
573
- gender?: "Male" | "Female" | "Other" | undefined;
574
- }, {
575
- id: string;
576
- email: string;
577
- city: "Alkmaar" | "Almere" | "Alphen aan den Rijn" | "Amsterdam" | "Apeldoorn" | "Arnhem" | "Beverwijk" | "Bilthoven" | "Bloemendaal" | "Breda" | "Bussum" | "Capelle Aan Den Ijssel" | "Castricum" | "De Meern" | "Delft" | "Den Bosch" | "Deventer" | "Diemen" | "Doorn" | "Dordrecht" | "Driebergen-rijsenburg" | "Duivendrecht" | "Ede" | "Eindhoven" | "Enschede" | "Groningen" | "Haarlem" | "Heemskerk" | "Hengelo" | "Hoogezand" | "Hoorn" | "Ijsselstein" | "Leende" | "Leeuwarden" | "Leiden" | "Leidschendam" | "Lelystad" | "Maastricht" | "Nieuwegein" | "Nijkerk" | "Nijmegen" | "Noordwijk" | "Oosterhout" | "Purmerend" | "Ridderkerk" | "Roosendaal" | "Rosmalen" | "Rotterdam" | "Schiedam" | "Sint-Oedenrode" | "Soesterberg" | "Staphorst" | "The Hague" | "Tilburg" | "Utrecht" | "Velp-Rheden" | "Venlo" | "Volendam" | "Voorschoten" | "Vught" | "Werkhoven" | "Zaandam" | "Zandvoort" | "Zoetermeer" | "Zutphen" | "Zwolle";
578
- radius: "5" | "2" | "10" | "20";
579
- maxPrice: "250" | "300" | "350" | "400" | "450" | "500" | "550" | "600" | "650" | "700" | "750" | "800" | "850" | "900" | "950" | "1000" | "1050" | "1100" | "1150" | "1200" | "1250" | "1300" | "1350" | "1400" | "1450" | "1500" | "1550" | "1600" | "1650" | "1700" | "1750" | "1800" | "1850" | "1900" | "1950" | "2000" | "2050" | "2100" | "2150" | "2200" | "2250" | "2300" | "2350" | "2400" | "2450" | "2500" | "2550" | "2600" | "2650" | "2700" | "2750" | "2800" | "2850" | "2900" | "2950" | "3000" | "3050" | "3100" | "3150" | "3200" | "3250" | "3300" | "3350" | "3400" | "3450" | "3500" | "3550" | "3600" | "3650" | "3700" | "3750" | "3800" | "3850" | "3900" | "3950" | "4000" | "4050" | "4100" | "4150" | "4200" | "4250" | "4300" | "4350" | "4400" | "4450" | "4500" | "4550" | "4600" | "4650" | "4700" | "4750" | "4800" | "4850" | "4900" | "4950" | "5000" | "5050" | "5100" | "5150" | "5200";
580
- frequency: "5" | "15" | "60" | "180" | "360" | "1440" | "4320" | "10080";
581
- createdAt: string;
582
- propertyTypes?: ("House" | "Apartment" | "Studio" | "Room")[] | undefined;
583
- minSurface?: "5" | "15" | "10" | "20" | "30" | "40" | "50" | "75" | "100" | "125" | "150" | undefined;
584
- minBedrooms?: "5" | "2" | "1" | "3" | "4" | "6" | "7" | undefined;
585
- furnished?: boolean | undefined;
586
- maxFlatmates?: "5" | "2" | "1" | "3" | "4" | "6" | "7" | undefined;
587
- flatmatesGender?: "Male" | "Female" | "Mixed" | undefined;
588
- gender?: "Male" | "Female" | "Other" | undefined;
589
- }>;
752
+ maxFlatmates: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
753
+ 5: "5";
754
+ 2: "2";
755
+ 1: "1";
756
+ 3: "3";
757
+ 4: "4";
758
+ 6: "6";
759
+ 7: "7";
760
+ }>, z.ZodTransform<number, "5" | "2" | "1" | "3" | "4" | "6" | "7">>>;
761
+ flatmatesGender: z.ZodOptional<z.ZodEnum<{
762
+ Male: "Male";
763
+ Female: "Female";
764
+ Mixed: "Mixed";
765
+ }>>;
766
+ gender: z.ZodOptional<z.ZodEnum<{
767
+ Male: "Male";
768
+ Female: "Female";
769
+ Other: "Other";
770
+ }>>;
771
+ frequency: z.ZodPipe<z.ZodEnum<{
772
+ 5: "5";
773
+ 15: "15";
774
+ 60: "60";
775
+ 180: "180";
776
+ 360: "360";
777
+ 1440: "1440";
778
+ 4320: "4320";
779
+ 10080: "10080";
780
+ }>, z.ZodTransform<number, "5" | "15" | "60" | "180" | "360" | "1440" | "4320" | "10080">>;
781
+ createdAt: z.ZodISODateTime;
782
+ }, z.core.$strip>;
590
783
  export declare const AlertClientSchema: z.ZodObject<{
591
- id: z.ZodOptional<z.ZodString>;
784
+ id: z.ZodOptional<z.ZodUUID>;
592
785
  city: z.ZodString;
593
- radius: z.ZodEffects<z.ZodNumber, string, number>;
594
- propertyTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
595
- maxPrice: z.ZodEffects<z.ZodNumber, string, number>;
596
- minSurface: z.ZodOptional<z.ZodEffects<z.ZodNumber, string, number>>;
597
- minBedrooms: z.ZodOptional<z.ZodEffects<z.ZodNumber, string, number>>;
786
+ radius: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodTransform<string, number>>;
787
+ propertyTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
788
+ maxPrice: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodTransform<string, number>>;
789
+ minSurface: z.ZodOptional<z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodTransform<string, number>>>;
790
+ minBedrooms: z.ZodOptional<z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodTransform<string, number>>>;
598
791
  furnished: z.ZodOptional<z.ZodBoolean>;
599
792
  maxFlatmates: z.ZodOptional<z.ZodString>;
600
793
  flatmatesGender: z.ZodOptional<z.ZodString>;
601
794
  gender: z.ZodOptional<z.ZodString>;
602
- frequency: z.ZodEffects<z.ZodNumber, string, number>;
603
- }, "strip", z.ZodTypeAny, {
604
- city: string;
605
- radius: string;
606
- maxPrice: string;
607
- frequency: string;
608
- id?: string | undefined;
609
- propertyTypes?: string[] | undefined;
610
- minSurface?: string | undefined;
611
- minBedrooms?: string | undefined;
612
- furnished?: boolean | undefined;
613
- maxFlatmates?: string | undefined;
614
- flatmatesGender?: string | undefined;
615
- gender?: string | undefined;
616
- }, {
617
- city: string;
618
- radius: number;
619
- maxPrice: number;
620
- frequency: number;
621
- id?: string | undefined;
622
- propertyTypes?: string[] | undefined;
623
- minSurface?: number | undefined;
624
- minBedrooms?: number | undefined;
625
- furnished?: boolean | undefined;
626
- maxFlatmates?: string | undefined;
627
- flatmatesGender?: string | undefined;
628
- gender?: string | undefined;
629
- }>;
795
+ frequency: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodTransform<string, number>>;
796
+ }, z.core.$strip>;
630
797
  export type Alert = z.infer<typeof AlertSchema>;
631
798
  export type AlertClient = z.infer<typeof AlertClientSchema>;
632
799
  export declare const UserSchema: z.ZodObject<{
633
800
  notificationsEnabled: z.ZodDefault<z.ZodBoolean>;
634
- email: z.ZodString;
635
- lastNotified: z.ZodOptional<z.ZodString>;
636
- }, "strip", z.ZodTypeAny, {
637
- email: string;
638
- notificationsEnabled: boolean;
639
- lastNotified?: string | undefined;
640
- }, {
641
- email: string;
642
- notificationsEnabled?: boolean | undefined;
643
- lastNotified?: string | undefined;
644
- }>;
801
+ email: z.ZodEmail;
802
+ lastNotified: z.ZodOptional<z.ZodISODateTime>;
803
+ }, z.core.$strip>;
645
804
  export type User = z.infer<typeof UserSchema>;
646
- export declare const ParsedHouseSchema: z.ZodObject<{
805
+ export declare const ParsedHouseSchema2: z.ZodObject<{
647
806
  city: z.ZodString;
648
807
  postalCode: z.ZodNullable<z.ZodString>;
649
808
  addressWithoutCity: z.ZodNullable<z.ZodString>;
650
809
  price: z.ZodNumber;
651
810
  immediatelyAvailable: z.ZodBoolean;
652
- startDateIfNotImmediatelyAvailableISO8601: z.ZodNullable<z.ZodString>;
653
- propertyType: z.ZodEnum<["House", "Apartment", "Studio", "Room"]>;
811
+ startDateIfNotImmediatelyAvailableISO8601: z.ZodNullable<z.ZodISODateTime>;
812
+ propertyType: z.ZodEnum<{
813
+ House: "House";
814
+ Apartment: "Apartment";
815
+ Studio: "Studio";
816
+ Room: "Room";
817
+ }>;
654
818
  bedrooms: z.ZodNullable<z.ZodNumber>;
655
819
  flatmatesIfShared: z.ZodNullable<z.ZodNumber>;
656
- listingRequiredGender: z.ZodOptional<z.ZodEnum<["Male", "Female", "Other"]>>;
657
- flatmatesGender: z.ZodOptional<z.ZodEnum<["Male", "Female", "Mixed"]>>;
820
+ listingRequiredGender: z.ZodNullable<z.ZodEnum<{
821
+ Male: "Male";
822
+ Female: "Female";
823
+ Other: "Other";
824
+ }>>;
825
+ flatmatesGender: z.ZodNullable<z.ZodEnum<{
826
+ Male: "Male";
827
+ Female: "Female";
828
+ Mixed: "Mixed";
829
+ }>>;
658
830
  bathrooms: z.ZodNullable<z.ZodNumber>;
659
- furnishing: z.ZodOptional<z.ZodEnum<["Uncarpeted", "Unfurnished", "Furnished"]>>;
831
+ furnishing: z.ZodNullable<z.ZodEnum<{
832
+ Uncarpeted: "Uncarpeted";
833
+ Unfurnished: "Unfurnished";
834
+ Furnished: "Furnished";
835
+ }>>;
660
836
  surface: z.ZodNullable<z.ZodNumber>;
661
837
  seniorsOnly: z.ZodNullable<z.ZodBoolean>;
662
838
  studentsOnly: z.ZodNullable<z.ZodBoolean>;
@@ -666,68 +842,80 @@ export declare const ParsedHouseSchema: z.ZodObject<{
666
842
  pets: z.ZodNullable<z.ZodBoolean>;
667
843
  garage: z.ZodNullable<z.ZodBoolean>;
668
844
  gym: z.ZodNullable<z.ZodBoolean>;
669
- }, "strip", z.ZodTypeAny, {
670
- city: string;
671
- postalCode: string | null;
672
- addressWithoutCity: string | null;
673
- price: number;
674
- immediatelyAvailable: boolean;
675
- startDateIfNotImmediatelyAvailableISO8601: string | null;
676
- propertyType: "House" | "Apartment" | "Studio" | "Room";
677
- bedrooms: number | null;
678
- flatmatesIfShared: number | null;
679
- bathrooms: number | null;
680
- surface: number | null;
681
- seniorsOnly: boolean | null;
682
- studentsOnly: boolean | null;
683
- bathtub: boolean | null;
684
- garden: boolean | null;
685
- floorNumber: number | null;
686
- pets: boolean | null;
687
- garage: boolean | null;
688
- gym: boolean | null;
689
- flatmatesGender?: "Male" | "Female" | "Mixed" | undefined;
690
- listingRequiredGender?: "Male" | "Female" | "Other" | undefined;
691
- furnishing?: "Uncarpeted" | "Unfurnished" | "Furnished" | undefined;
692
- }, {
693
- city: string;
694
- postalCode: string | null;
695
- addressWithoutCity: string | null;
696
- price: number;
697
- immediatelyAvailable: boolean;
698
- startDateIfNotImmediatelyAvailableISO8601: string | null;
699
- propertyType: "House" | "Apartment" | "Studio" | "Room";
700
- bedrooms: number | null;
701
- flatmatesIfShared: number | null;
702
- bathrooms: number | null;
703
- surface: number | null;
704
- seniorsOnly: boolean | null;
705
- studentsOnly: boolean | null;
706
- bathtub: boolean | null;
707
- garden: boolean | null;
708
- floorNumber: number | null;
709
- pets: boolean | null;
710
- garage: boolean | null;
711
- gym: boolean | null;
712
- flatmatesGender?: "Male" | "Female" | "Mixed" | undefined;
713
- listingRequiredGender?: "Male" | "Female" | "Other" | undefined;
714
- furnishing?: "Uncarpeted" | "Unfurnished" | "Furnished" | undefined;
715
- }>;
716
- export type ParsedHouse = z.infer<typeof ParsedHouseSchema>;
717
- export declare const TransformedHouseSchema: z.ZodObject<{
845
+ }, z.core.$strip>;
846
+ export type ParsedHouse2 = z.infer<typeof ParsedHouseSchema2>;
847
+ export declare const TransformedHouseSchema2: z.ZodUnion<readonly [z.ZodObject<{
848
+ postalCode: z.ZodString;
718
849
  id: z.ZodString;
719
850
  city: z.ZodString;
720
- postalCode: z.ZodNullable<z.ZodString>;
721
851
  address: z.ZodNullable<z.ZodString>;
722
852
  price: z.ZodNumber;
723
- availability: z.ZodNullable<z.ZodString>;
724
- propertyType: z.ZodEnum<["House", "Apartment", "Studio", "Room"]>;
853
+ availability: z.ZodNullable<z.ZodISODateTime>;
854
+ propertyType: z.ZodEnum<{
855
+ House: "House";
856
+ Apartment: "Apartment";
857
+ Studio: "Studio";
858
+ Room: "Room";
859
+ }>;
860
+ bedrooms: z.ZodNullable<z.ZodNumber>;
861
+ flatmates: z.ZodNullable<z.ZodNumber>;
862
+ gender: z.ZodNullable<z.ZodEnum<{
863
+ Male: "Male";
864
+ Female: "Female";
865
+ Other: "Other";
866
+ }>>;
867
+ flatmatesGender: z.ZodNullable<z.ZodEnum<{
868
+ Male: "Male";
869
+ Female: "Female";
870
+ Mixed: "Mixed";
871
+ }>>;
872
+ bathrooms: z.ZodNullable<z.ZodNumber>;
873
+ furnishing: z.ZodNullable<z.ZodEnum<{
874
+ Uncarpeted: "Uncarpeted";
875
+ Unfurnished: "Unfurnished";
876
+ Furnished: "Furnished";
877
+ }>>;
878
+ surface: z.ZodNullable<z.ZodNumber>;
879
+ seniorsOnly: z.ZodNullable<z.ZodBoolean>;
880
+ studentsOnly: z.ZodNullable<z.ZodBoolean>;
881
+ bathtub: z.ZodNullable<z.ZodBoolean>;
882
+ garden: z.ZodNullable<z.ZodBoolean>;
883
+ floorNumber: z.ZodNullable<z.ZodNumber>;
884
+ pets: z.ZodNullable<z.ZodBoolean>;
885
+ garage: z.ZodNullable<z.ZodBoolean>;
886
+ gym: z.ZodNullable<z.ZodBoolean>;
887
+ createdAt: z.ZodISODateTime;
888
+ }, z.core.$strip>, z.ZodObject<{
889
+ address: z.ZodString;
890
+ id: z.ZodString;
891
+ city: z.ZodString;
892
+ postalCode: z.ZodNullable<z.ZodString>;
893
+ price: z.ZodNumber;
894
+ availability: z.ZodNullable<z.ZodISODateTime>;
895
+ propertyType: z.ZodEnum<{
896
+ House: "House";
897
+ Apartment: "Apartment";
898
+ Studio: "Studio";
899
+ Room: "Room";
900
+ }>;
725
901
  bedrooms: z.ZodNullable<z.ZodNumber>;
726
902
  flatmates: z.ZodNullable<z.ZodNumber>;
727
- gender: z.ZodOptional<z.ZodEnum<["Male", "Female", "Other"]>>;
728
- flatmatesGender: z.ZodOptional<z.ZodEnum<["Male", "Female", "Mixed"]>>;
903
+ gender: z.ZodNullable<z.ZodEnum<{
904
+ Male: "Male";
905
+ Female: "Female";
906
+ Other: "Other";
907
+ }>>;
908
+ flatmatesGender: z.ZodNullable<z.ZodEnum<{
909
+ Male: "Male";
910
+ Female: "Female";
911
+ Mixed: "Mixed";
912
+ }>>;
729
913
  bathrooms: z.ZodNullable<z.ZodNumber>;
730
- furnishing: z.ZodOptional<z.ZodEnum<["Uncarpeted", "Unfurnished", "Furnished"]>>;
914
+ furnishing: z.ZodNullable<z.ZodEnum<{
915
+ Uncarpeted: "Uncarpeted";
916
+ Unfurnished: "Unfurnished";
917
+ Furnished: "Furnished";
918
+ }>>;
731
919
  surface: z.ZodNullable<z.ZodNumber>;
732
920
  seniorsOnly: z.ZodNullable<z.ZodBoolean>;
733
921
  studentsOnly: z.ZodNullable<z.ZodBoolean>;
@@ -737,55 +925,7 @@ export declare const TransformedHouseSchema: z.ZodObject<{
737
925
  pets: z.ZodNullable<z.ZodBoolean>;
738
926
  garage: z.ZodNullable<z.ZodBoolean>;
739
927
  gym: z.ZodNullable<z.ZodBoolean>;
740
- createdAt: z.ZodString;
741
- }, "strip", z.ZodTypeAny, {
742
- id: string;
743
- city: string;
744
- createdAt: string;
745
- postalCode: string | null;
746
- price: number;
747
- propertyType: "House" | "Apartment" | "Studio" | "Room";
748
- bedrooms: number | null;
749
- bathrooms: number | null;
750
- surface: number | null;
751
- seniorsOnly: boolean | null;
752
- studentsOnly: boolean | null;
753
- bathtub: boolean | null;
754
- garden: boolean | null;
755
- floorNumber: number | null;
756
- pets: boolean | null;
757
- garage: boolean | null;
758
- gym: boolean | null;
759
- address: string | null;
760
- availability: string | null;
761
- flatmates: number | null;
762
- flatmatesGender?: "Male" | "Female" | "Mixed" | undefined;
763
- gender?: "Male" | "Female" | "Other" | undefined;
764
- furnishing?: "Uncarpeted" | "Unfurnished" | "Furnished" | undefined;
765
- }, {
766
- id: string;
767
- city: string;
768
- createdAt: string;
769
- postalCode: string | null;
770
- price: number;
771
- propertyType: "House" | "Apartment" | "Studio" | "Room";
772
- bedrooms: number | null;
773
- bathrooms: number | null;
774
- surface: number | null;
775
- seniorsOnly: boolean | null;
776
- studentsOnly: boolean | null;
777
- bathtub: boolean | null;
778
- garden: boolean | null;
779
- floorNumber: number | null;
780
- pets: boolean | null;
781
- garage: boolean | null;
782
- gym: boolean | null;
783
- address: string | null;
784
- availability: string | null;
785
- flatmates: number | null;
786
- flatmatesGender?: "Male" | "Female" | "Mixed" | undefined;
787
- gender?: "Male" | "Female" | "Other" | undefined;
788
- furnishing?: "Uncarpeted" | "Unfurnished" | "Furnished" | undefined;
789
- }>;
790
- export type TransformedHouse = z.infer<typeof TransformedHouseSchema>;
928
+ createdAt: z.ZodISODateTime;
929
+ }, z.core.$strip>]>;
930
+ export type TransformedHouse2 = z.infer<typeof TransformedHouseSchema2>;
791
931
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAW,MAAM,KAAK,CAAC;AAGjC,eAAO,MAAM,cAAc,mDAAoD,CAAC;AAEhF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmErB,CAAC;AAEX,eAAO,MAAM,MAAM,y1BAmET,CAAC;AAEX,eAAO,MAAM,kBAAkB,GAAI,UAAU,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBASlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
- // CONSTANTS
3
2
  export const PROPERTY_TYPES = ["House", "Apartment", "Studio", "Room"];
4
3
  export const CITIES_WITH_COORDS = [
5
4
  { name: "Alkmaar", lat: 52.6317, lng: 4.7485 },
@@ -295,10 +294,10 @@ export const stringifiedParserHouseType = `{
295
294
  garage: boolean | null;
296
295
  gym: boolean | null;
297
296
  }`;
298
- export const Id = z.string().uuid();
297
+ export const Id = z.uuid();
299
298
  export const AlertSchema = z.object({
300
- id: z.string().uuid(),
301
- email: z.string().email(),
299
+ id: z.uuid(),
300
+ email: z.email(),
302
301
  city: z.enum(CITIES),
303
302
  radius: z.enum(RADIUSES).transform(Number),
304
303
  propertyTypes: z.array(z.enum(PROPERTY_TYPES)).optional(),
@@ -310,10 +309,10 @@ export const AlertSchema = z.object({
310
309
  flatmatesGender: z.enum(FLATMATES_GENDERS).optional(),
311
310
  gender: z.enum(GENDERS).optional(),
312
311
  frequency: z.enum(FREQUENCIES).transform(Number),
313
- createdAt: z.string().datetime(),
312
+ createdAt: z.iso.datetime(),
314
313
  });
315
314
  export const AlertClientSchema = z.object({
316
- id: z.string().uuid().optional(),
315
+ id: z.uuid().optional(),
317
316
  city: z.string(),
318
317
  radius: z.coerce.number().transform(String),
319
318
  propertyTypes: z.array(z.string()).optional(),
@@ -328,23 +327,23 @@ export const AlertClientSchema = z.object({
328
327
  });
329
328
  export const UserSchema = z.object({
330
329
  notificationsEnabled: z.boolean().default(true),
331
- email: z.string().email(),
332
- lastNotified: z.string().datetime().optional(),
330
+ email: z.email(),
331
+ lastNotified: z.iso.datetime().optional(),
333
332
  });
334
- export const ParsedHouseSchema = z.object({
335
- city: z.string().min(1),
336
- postalCode: z.string().nullable(),
333
+ export const ParsedHouseSchema2 = z.object({
334
+ city: z.string().nonempty(),
335
+ postalCode: z.string().nonempty().nullable(),
337
336
  addressWithoutCity: z.string().nullable(),
338
337
  price: z.number(),
339
338
  immediatelyAvailable: z.boolean(),
340
- startDateIfNotImmediatelyAvailableISO8601: z.string().datetime().nullable(),
339
+ startDateIfNotImmediatelyAvailableISO8601: z.iso.datetime().nullable(),
341
340
  propertyType: z.enum(PROPERTY_TYPES),
342
341
  bedrooms: z.number().nullable(),
343
342
  flatmatesIfShared: z.number().nullable(),
344
- listingRequiredGender: z.enum(GENDERS).optional(),
345
- flatmatesGender: z.enum(FLATMATES_GENDERS).optional(),
343
+ listingRequiredGender: z.enum(GENDERS).nullable(),
344
+ flatmatesGender: z.enum(FLATMATES_GENDERS).nullable(),
346
345
  bathrooms: z.number().nullable(),
347
- furnishing: z.enum(["Uncarpeted", "Unfurnished", "Furnished"]).optional(),
346
+ furnishing: z.enum(["Uncarpeted", "Unfurnished", "Furnished"]).nullable(),
348
347
  surface: z.number().nullable(),
349
348
  seniorsOnly: z.boolean().nullable(),
350
349
  studentsOnly: z.boolean().nullable(),
@@ -355,20 +354,20 @@ export const ParsedHouseSchema = z.object({
355
354
  garage: z.boolean().nullable(),
356
355
  gym: z.boolean().nullable(),
357
356
  });
358
- export const TransformedHouseSchema = z.object({
359
- id: z.string().min(1),
360
- city: z.string().min(1),
361
- postalCode: z.string().nullable(),
357
+ const transformedHouseSchema2 = {
358
+ id: z.string().nonempty(),
359
+ city: z.string().nonempty(),
360
+ postalCode: z.string().nonempty().nullable(),
362
361
  address: z.string().nullable(),
363
362
  price: z.number(),
364
- availability: z.string().datetime().nullable(),
363
+ availability: z.iso.datetime().nullable(),
365
364
  propertyType: z.enum(PROPERTY_TYPES),
366
365
  bedrooms: z.number().nullable(),
367
366
  flatmates: z.number().nullable(),
368
- gender: z.enum(GENDERS).optional(),
369
- flatmatesGender: z.enum(FLATMATES_GENDERS).optional(),
367
+ gender: z.enum(GENDERS).nullable(),
368
+ flatmatesGender: z.enum(FLATMATES_GENDERS).nullable(),
370
369
  bathrooms: z.number().nullable(),
371
- furnishing: z.enum(["Uncarpeted", "Unfurnished", "Furnished"]).optional(),
370
+ furnishing: z.enum(["Uncarpeted", "Unfurnished", "Furnished"]).nullable(),
372
371
  surface: z.number().nullable(),
373
372
  seniorsOnly: z.boolean().nullable(),
374
373
  studentsOnly: z.boolean().nullable(),
@@ -378,5 +377,15 @@ export const TransformedHouseSchema = z.object({
378
377
  pets: z.boolean().nullable(),
379
378
  garage: z.boolean().nullable(),
380
379
  gym: z.boolean().nullable(),
381
- createdAt: z.string().datetime(),
382
- });
380
+ createdAt: z.iso.datetime()
381
+ };
382
+ export const TransformedHouseSchema2 = z.union([
383
+ z.object({
384
+ ...transformedHouseSchema2,
385
+ postalCode: z.string().nonempty(),
386
+ }),
387
+ z.object({
388
+ ...transformedHouseSchema2,
389
+ address: z.string().nonempty(),
390
+ }),
391
+ ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "house-types",
3
- "version": "2.14.2",
3
+ "version": "2.15.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,11 +13,11 @@
13
13
  },
14
14
  "author": "",
15
15
  "license": "ISC",
16
+ "type": "module",
16
17
  "devDependencies": {
17
- "typescript": "^5.8.2"
18
+ "typescript": "^5.9.3"
18
19
  },
19
20
  "dependencies": {
20
- "zod": "3.24.2"
21
- },
22
- "type": "module"
21
+ "zod": "^4.3.4"
22
+ }
23
23
  }