house-types 2.14.0 → 2.14.2

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
@@ -653,10 +653,10 @@ export declare const ParsedHouseSchema: z.ZodObject<{
653
653
  propertyType: z.ZodEnum<["House", "Apartment", "Studio", "Room"]>;
654
654
  bedrooms: z.ZodNullable<z.ZodNumber>;
655
655
  flatmatesIfShared: z.ZodNullable<z.ZodNumber>;
656
- listingRequiredGender: z.ZodNullable<z.ZodEnum<["Male", "Female", "Other"]>>;
657
- flatmatesGender: z.ZodNullable<z.ZodEnum<["Male", "Female", "Mixed"]>>;
656
+ listingRequiredGender: z.ZodOptional<z.ZodEnum<["Male", "Female", "Other"]>>;
657
+ flatmatesGender: z.ZodOptional<z.ZodEnum<["Male", "Female", "Mixed"]>>;
658
658
  bathrooms: z.ZodNullable<z.ZodNumber>;
659
- furnishing: z.ZodNullable<z.ZodEnum<["Uncarpeted", "Unfurnished", "Furnished"]>>;
659
+ furnishing: z.ZodOptional<z.ZodEnum<["Uncarpeted", "Unfurnished", "Furnished"]>>;
660
660
  surface: z.ZodNullable<z.ZodNumber>;
661
661
  seniorsOnly: z.ZodNullable<z.ZodBoolean>;
662
662
  studentsOnly: z.ZodNullable<z.ZodBoolean>;
@@ -668,7 +668,6 @@ export declare const ParsedHouseSchema: z.ZodObject<{
668
668
  gym: z.ZodNullable<z.ZodBoolean>;
669
669
  }, "strip", z.ZodTypeAny, {
670
670
  city: string;
671
- flatmatesGender: "Male" | "Female" | "Mixed" | null;
672
671
  postalCode: string | null;
673
672
  addressWithoutCity: string | null;
674
673
  price: number;
@@ -677,9 +676,7 @@ export declare const ParsedHouseSchema: z.ZodObject<{
677
676
  propertyType: "House" | "Apartment" | "Studio" | "Room";
678
677
  bedrooms: number | null;
679
678
  flatmatesIfShared: number | null;
680
- listingRequiredGender: "Male" | "Female" | "Other" | null;
681
679
  bathrooms: number | null;
682
- furnishing: "Uncarpeted" | "Unfurnished" | "Furnished" | null;
683
680
  surface: number | null;
684
681
  seniorsOnly: boolean | null;
685
682
  studentsOnly: boolean | null;
@@ -689,9 +686,11 @@ export declare const ParsedHouseSchema: z.ZodObject<{
689
686
  pets: boolean | null;
690
687
  garage: boolean | null;
691
688
  gym: boolean | null;
689
+ flatmatesGender?: "Male" | "Female" | "Mixed" | undefined;
690
+ listingRequiredGender?: "Male" | "Female" | "Other" | undefined;
691
+ furnishing?: "Uncarpeted" | "Unfurnished" | "Furnished" | undefined;
692
692
  }, {
693
693
  city: string;
694
- flatmatesGender: "Male" | "Female" | "Mixed" | null;
695
694
  postalCode: string | null;
696
695
  addressWithoutCity: string | null;
697
696
  price: number;
@@ -700,9 +699,7 @@ export declare const ParsedHouseSchema: z.ZodObject<{
700
699
  propertyType: "House" | "Apartment" | "Studio" | "Room";
701
700
  bedrooms: number | null;
702
701
  flatmatesIfShared: number | null;
703
- listingRequiredGender: "Male" | "Female" | "Other" | null;
704
702
  bathrooms: number | null;
705
- furnishing: "Uncarpeted" | "Unfurnished" | "Furnished" | null;
706
703
  surface: number | null;
707
704
  seniorsOnly: boolean | null;
708
705
  studentsOnly: boolean | null;
@@ -712,9 +709,12 @@ export declare const ParsedHouseSchema: z.ZodObject<{
712
709
  pets: boolean | null;
713
710
  garage: boolean | null;
714
711
  gym: boolean | null;
712
+ flatmatesGender?: "Male" | "Female" | "Mixed" | undefined;
713
+ listingRequiredGender?: "Male" | "Female" | "Other" | undefined;
714
+ furnishing?: "Uncarpeted" | "Unfurnished" | "Furnished" | undefined;
715
715
  }>;
716
716
  export type ParsedHouse = z.infer<typeof ParsedHouseSchema>;
717
- export declare const TransformedHouseSchema: z.ZodEffects<z.ZodObject<{
717
+ export declare const TransformedHouseSchema: z.ZodObject<{
718
718
  id: z.ZodString;
719
719
  city: z.ZodString;
720
720
  postalCode: z.ZodNullable<z.ZodString>;
@@ -724,10 +724,10 @@ export declare const TransformedHouseSchema: z.ZodEffects<z.ZodObject<{
724
724
  propertyType: z.ZodEnum<["House", "Apartment", "Studio", "Room"]>;
725
725
  bedrooms: z.ZodNullable<z.ZodNumber>;
726
726
  flatmates: z.ZodNullable<z.ZodNumber>;
727
- gender: z.ZodNullable<z.ZodEnum<["Male", "Female", "Other"]>>;
728
- flatmatesGender: z.ZodNullable<z.ZodEnum<["Male", "Female", "Mixed"]>>;
727
+ gender: z.ZodOptional<z.ZodEnum<["Male", "Female", "Other"]>>;
728
+ flatmatesGender: z.ZodOptional<z.ZodEnum<["Male", "Female", "Mixed"]>>;
729
729
  bathrooms: z.ZodNullable<z.ZodNumber>;
730
- furnishing: z.ZodNullable<z.ZodEnum<["Uncarpeted", "Unfurnished", "Furnished"]>>;
730
+ furnishing: z.ZodOptional<z.ZodEnum<["Uncarpeted", "Unfurnished", "Furnished"]>>;
731
731
  surface: z.ZodNullable<z.ZodNumber>;
732
732
  seniorsOnly: z.ZodNullable<z.ZodBoolean>;
733
733
  studentsOnly: z.ZodNullable<z.ZodBoolean>;
@@ -741,63 +741,12 @@ export declare const TransformedHouseSchema: z.ZodEffects<z.ZodObject<{
741
741
  }, "strip", z.ZodTypeAny, {
742
742
  id: string;
743
743
  city: string;
744
- flatmatesGender: "Male" | "Female" | "Mixed" | null;
745
- gender: "Male" | "Female" | "Other" | null;
746
- createdAt: string;
747
- postalCode: string | null;
748
- price: number;
749
- propertyType: "House" | "Apartment" | "Studio" | "Room";
750
- bedrooms: number | null;
751
- bathrooms: number | null;
752
- furnishing: "Uncarpeted" | "Unfurnished" | "Furnished" | null;
753
- surface: number | null;
754
- seniorsOnly: boolean | null;
755
- studentsOnly: boolean | null;
756
- bathtub: boolean | null;
757
- garden: boolean | null;
758
- floorNumber: number | null;
759
- pets: boolean | null;
760
- garage: boolean | null;
761
- gym: boolean | null;
762
- address: string | null;
763
- availability: string | null;
764
- flatmates: number | null;
765
- }, {
766
- id: string;
767
- city: string;
768
- flatmatesGender: "Male" | "Female" | "Mixed" | null;
769
- gender: "Male" | "Female" | "Other" | null;
770
744
  createdAt: string;
771
745
  postalCode: string | null;
772
746
  price: number;
773
747
  propertyType: "House" | "Apartment" | "Studio" | "Room";
774
748
  bedrooms: number | null;
775
749
  bathrooms: number | null;
776
- furnishing: "Uncarpeted" | "Unfurnished" | "Furnished" | null;
777
- surface: number | null;
778
- seniorsOnly: boolean | null;
779
- studentsOnly: boolean | null;
780
- bathtub: boolean | null;
781
- garden: boolean | null;
782
- floorNumber: number | null;
783
- pets: boolean | null;
784
- garage: boolean | null;
785
- gym: boolean | null;
786
- address: string | null;
787
- availability: string | null;
788
- flatmates: number | null;
789
- }>, {
790
- id: string;
791
- city: string;
792
- flatmatesGender: "Male" | "Female" | "Mixed" | null;
793
- gender: "Male" | "Female" | "Other" | null;
794
- createdAt: string;
795
- postalCode: string | null;
796
- price: number;
797
- propertyType: "House" | "Apartment" | "Studio" | "Room";
798
- bedrooms: number | null;
799
- bathrooms: number | null;
800
- furnishing: "Uncarpeted" | "Unfurnished" | "Furnished" | null;
801
750
  surface: number | null;
802
751
  seniorsOnly: boolean | null;
803
752
  studentsOnly: boolean | null;
@@ -810,18 +759,18 @@ export declare const TransformedHouseSchema: z.ZodEffects<z.ZodObject<{
810
759
  address: string | null;
811
760
  availability: string | null;
812
761
  flatmates: number | null;
762
+ flatmatesGender?: "Male" | "Female" | "Mixed" | undefined;
763
+ gender?: "Male" | "Female" | "Other" | undefined;
764
+ furnishing?: "Uncarpeted" | "Unfurnished" | "Furnished" | undefined;
813
765
  }, {
814
766
  id: string;
815
767
  city: string;
816
- flatmatesGender: "Male" | "Female" | "Mixed" | null;
817
- gender: "Male" | "Female" | "Other" | null;
818
768
  createdAt: string;
819
769
  postalCode: string | null;
820
770
  price: number;
821
771
  propertyType: "House" | "Apartment" | "Studio" | "Room";
822
772
  bedrooms: number | null;
823
773
  bathrooms: number | null;
824
- furnishing: "Uncarpeted" | "Unfurnished" | "Furnished" | null;
825
774
  surface: number | null;
826
775
  seniorsOnly: boolean | null;
827
776
  studentsOnly: boolean | null;
@@ -834,6 +783,9 @@ export declare const TransformedHouseSchema: z.ZodEffects<z.ZodObject<{
834
783
  address: string | null;
835
784
  availability: string | null;
836
785
  flatmates: number | null;
786
+ flatmatesGender?: "Male" | "Female" | "Mixed" | undefined;
787
+ gender?: "Male" | "Female" | "Other" | undefined;
788
+ furnishing?: "Uncarpeted" | "Unfurnished" | "Furnished" | undefined;
837
789
  }>;
838
790
  export type TransformedHouse = z.infer<typeof TransformedHouseSchema>;
839
791
  //# 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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O,MAAM,MAAM,4xBAqGT,CAAC;AAEX,eAAO,MAAM,QAAQ,+EAYX,CAAC;AAEX,eAAO,MAAM,QAAQ,8CAA+C,CAAC;AAErE,eAAO,MAAM,SAAS,8CAA+C,CAAC;AAEtE,eAAO,MAAM,0BAA0B,81BAuBrC,CAAC;AAuBH,eAAO,MAAM,EAAE,aAAoB,CAAC;AAEpC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBF,CAAC;AAEvB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBR,CAAC;AAEvB,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAChD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,UAAU;;;;;;;;;;;;EAIrB,CAAC;AAEH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAE9C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuB5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
package/dist/index.js CHANGED
@@ -332,8 +332,8 @@ export const UserSchema = z.object({
332
332
  lastNotified: z.string().datetime().optional(),
333
333
  });
334
334
  export const ParsedHouseSchema = z.object({
335
- city: z.string().nonempty(),
336
- postalCode: z.string().nonempty().nullable(),
335
+ city: z.string().min(1),
336
+ postalCode: z.string().nullable(),
337
337
  addressWithoutCity: z.string().nullable(),
338
338
  price: z.number(),
339
339
  immediatelyAvailable: z.boolean(),
@@ -341,10 +341,10 @@ export const ParsedHouseSchema = z.object({
341
341
  propertyType: z.enum(PROPERTY_TYPES),
342
342
  bedrooms: z.number().nullable(),
343
343
  flatmatesIfShared: z.number().nullable(),
344
- listingRequiredGender: z.enum(GENDERS).nullable(),
345
- flatmatesGender: z.enum(FLATMATES_GENDERS).nullable(),
344
+ listingRequiredGender: z.enum(GENDERS).optional(),
345
+ flatmatesGender: z.enum(FLATMATES_GENDERS).optional(),
346
346
  bathrooms: z.number().nullable(),
347
- furnishing: z.enum(["Uncarpeted", "Unfurnished", "Furnished"]).nullable(),
347
+ furnishing: z.enum(["Uncarpeted", "Unfurnished", "Furnished"]).optional(),
348
348
  surface: z.number().nullable(),
349
349
  seniorsOnly: z.boolean().nullable(),
350
350
  studentsOnly: z.boolean().nullable(),
@@ -355,10 +355,9 @@ export const ParsedHouseSchema = z.object({
355
355
  garage: z.boolean().nullable(),
356
356
  gym: z.boolean().nullable(),
357
357
  });
358
- export const TransformedHouseSchema = z
359
- .object({
360
- id: z.string().nonempty(),
361
- city: z.string().nonempty(),
358
+ export const TransformedHouseSchema = z.object({
359
+ id: z.string().min(1),
360
+ city: z.string().min(1),
362
361
  postalCode: z.string().nullable(),
363
362
  address: z.string().nullable(),
364
363
  price: z.number(),
@@ -366,10 +365,10 @@ export const TransformedHouseSchema = z
366
365
  propertyType: z.enum(PROPERTY_TYPES),
367
366
  bedrooms: z.number().nullable(),
368
367
  flatmates: z.number().nullable(),
369
- gender: z.enum(GENDERS).nullable(),
370
- flatmatesGender: z.enum(FLATMATES_GENDERS).nullable(),
368
+ gender: z.enum(GENDERS).optional(),
369
+ flatmatesGender: z.enum(FLATMATES_GENDERS).optional(),
371
370
  bathrooms: z.number().nullable(),
372
- furnishing: z.enum(["Uncarpeted", "Unfurnished", "Furnished"]).nullable(),
371
+ furnishing: z.enum(["Uncarpeted", "Unfurnished", "Furnished"]).optional(),
373
372
  surface: z.number().nullable(),
374
373
  seniorsOnly: z.boolean().nullable(),
375
374
  studentsOnly: z.boolean().nullable(),
@@ -380,6 +379,4 @@ export const TransformedHouseSchema = z
380
379
  garage: z.boolean().nullable(),
381
380
  gym: z.boolean().nullable(),
382
381
  createdAt: z.string().datetime(),
383
- })
384
- .refine((data) => (data.postalCode !== null && data.postalCode !== "") ||
385
- (data.address !== null && data.address !== ""));
382
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "house-types",
3
- "version": "2.14.0",
3
+ "version": "2.14.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",