house-types 2.9.49 → 2.9.51
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 +92 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +56 -9
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -695,6 +695,98 @@ export declare const ParsedHouseSchema: z.ZodObject<{
|
|
|
695
695
|
image?: string | undefined;
|
|
696
696
|
}>;
|
|
697
697
|
export type ParsedHouse = z.infer<typeof ParsedHouseSchema>;
|
|
698
|
+
export declare const parserHouseSchema: {
|
|
699
|
+
city: z.ZodString;
|
|
700
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
701
|
+
addressWithoutCity: z.ZodOptional<z.ZodString>;
|
|
702
|
+
price: z.ZodNumber;
|
|
703
|
+
availabilityDateIfNotImmediately: z.ZodOptional<z.ZodString>;
|
|
704
|
+
propertyType: z.ZodEnum<["House", "Apartment", "Studio", "Room"]>;
|
|
705
|
+
bedrooms: z.ZodOptional<z.ZodNumber>;
|
|
706
|
+
flatmatesIfShared: z.ZodOptional<z.ZodNumber>;
|
|
707
|
+
listingRequiredGender: z.ZodOptional<z.ZodEnum<["Male", "Female", "Other"]>>;
|
|
708
|
+
flatmatesGender: z.ZodOptional<z.ZodEnum<["Male", "Female", "Mixed"]>>;
|
|
709
|
+
bathrooms: z.ZodOptional<z.ZodNumber>;
|
|
710
|
+
furnished: z.ZodOptional<z.ZodBoolean>;
|
|
711
|
+
surface: z.ZodOptional<z.ZodNumber>;
|
|
712
|
+
seniorsOnly: z.ZodOptional<z.ZodBoolean>;
|
|
713
|
+
studentsOnly: z.ZodOptional<z.ZodBoolean>;
|
|
714
|
+
bathtub: z.ZodOptional<z.ZodBoolean>;
|
|
715
|
+
garden: z.ZodOptional<z.ZodBoolean>;
|
|
716
|
+
floorIfBuilding: z.ZodOptional<z.ZodNumber>;
|
|
717
|
+
pets: z.ZodOptional<z.ZodBoolean>;
|
|
718
|
+
garage: z.ZodOptional<z.ZodBoolean>;
|
|
719
|
+
gym: z.ZodOptional<z.ZodBoolean>;
|
|
720
|
+
};
|
|
721
|
+
export declare const ParserHouseSchema: z.ZodObject<{
|
|
722
|
+
city: z.ZodString;
|
|
723
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
724
|
+
addressWithoutCity: z.ZodOptional<z.ZodString>;
|
|
725
|
+
price: z.ZodNumber;
|
|
726
|
+
availabilityDateIfNotImmediately: z.ZodOptional<z.ZodString>;
|
|
727
|
+
propertyType: z.ZodEnum<["House", "Apartment", "Studio", "Room"]>;
|
|
728
|
+
bedrooms: z.ZodOptional<z.ZodNumber>;
|
|
729
|
+
flatmatesIfShared: z.ZodOptional<z.ZodNumber>;
|
|
730
|
+
listingRequiredGender: z.ZodOptional<z.ZodEnum<["Male", "Female", "Other"]>>;
|
|
731
|
+
flatmatesGender: z.ZodOptional<z.ZodEnum<["Male", "Female", "Mixed"]>>;
|
|
732
|
+
bathrooms: z.ZodOptional<z.ZodNumber>;
|
|
733
|
+
furnished: z.ZodOptional<z.ZodBoolean>;
|
|
734
|
+
surface: z.ZodOptional<z.ZodNumber>;
|
|
735
|
+
seniorsOnly: z.ZodOptional<z.ZodBoolean>;
|
|
736
|
+
studentsOnly: z.ZodOptional<z.ZodBoolean>;
|
|
737
|
+
bathtub: z.ZodOptional<z.ZodBoolean>;
|
|
738
|
+
garden: z.ZodOptional<z.ZodBoolean>;
|
|
739
|
+
floorIfBuilding: z.ZodOptional<z.ZodNumber>;
|
|
740
|
+
pets: z.ZodOptional<z.ZodBoolean>;
|
|
741
|
+
garage: z.ZodOptional<z.ZodBoolean>;
|
|
742
|
+
gym: z.ZodOptional<z.ZodBoolean>;
|
|
743
|
+
}, "strip", z.ZodTypeAny, {
|
|
744
|
+
city: string;
|
|
745
|
+
price: number;
|
|
746
|
+
propertyType: "House" | "Apartment" | "Studio" | "Room";
|
|
747
|
+
furnished?: boolean | undefined;
|
|
748
|
+
flatmatesGender?: "Male" | "Female" | "Mixed" | undefined;
|
|
749
|
+
postalCode?: string | undefined;
|
|
750
|
+
bedrooms?: number | undefined;
|
|
751
|
+
bathrooms?: number | undefined;
|
|
752
|
+
surface?: number | undefined;
|
|
753
|
+
addressWithoutCity?: string | undefined;
|
|
754
|
+
availabilityDateIfNotImmediately?: string | undefined;
|
|
755
|
+
flatmatesIfShared?: number | undefined;
|
|
756
|
+
listingRequiredGender?: "Male" | "Female" | "Other" | undefined;
|
|
757
|
+
seniorsOnly?: boolean | undefined;
|
|
758
|
+
studentsOnly?: boolean | undefined;
|
|
759
|
+
bathtub?: boolean | undefined;
|
|
760
|
+
garden?: boolean | undefined;
|
|
761
|
+
floorIfBuilding?: number | undefined;
|
|
762
|
+
pets?: boolean | undefined;
|
|
763
|
+
garage?: boolean | undefined;
|
|
764
|
+
gym?: boolean | undefined;
|
|
765
|
+
}, {
|
|
766
|
+
city: string;
|
|
767
|
+
price: number;
|
|
768
|
+
propertyType: "House" | "Apartment" | "Studio" | "Room";
|
|
769
|
+
furnished?: boolean | undefined;
|
|
770
|
+
flatmatesGender?: "Male" | "Female" | "Mixed" | undefined;
|
|
771
|
+
postalCode?: string | undefined;
|
|
772
|
+
bedrooms?: number | undefined;
|
|
773
|
+
bathrooms?: number | undefined;
|
|
774
|
+
surface?: number | undefined;
|
|
775
|
+
addressWithoutCity?: string | undefined;
|
|
776
|
+
availabilityDateIfNotImmediately?: string | undefined;
|
|
777
|
+
flatmatesIfShared?: number | undefined;
|
|
778
|
+
listingRequiredGender?: "Male" | "Female" | "Other" | undefined;
|
|
779
|
+
seniorsOnly?: boolean | undefined;
|
|
780
|
+
studentsOnly?: boolean | undefined;
|
|
781
|
+
bathtub?: boolean | undefined;
|
|
782
|
+
garden?: boolean | undefined;
|
|
783
|
+
floorIfBuilding?: number | undefined;
|
|
784
|
+
pets?: boolean | undefined;
|
|
785
|
+
garage?: boolean | undefined;
|
|
786
|
+
gym?: boolean | undefined;
|
|
787
|
+
}>;
|
|
788
|
+
export type ParserHouse = z.infer<typeof ParserHouseSchema>;
|
|
789
|
+
export declare const stringifiedParserHouseType = "{\n city: string;\n price: number;\n propertyType: \"House\" | \"Apartment\" | \"Studio\" | \"Room\";\n furnished?: boolean | undefined;\n flatmatesGender?: \"Male\" | \"Female\" | \"Mixed\" | undefined;\n postalCode?: string | undefined;\n bedrooms?: number | undefined;\n bathrooms?: number | undefined;\n surface?: number | undefined;\n addressWithoutCity?: string | undefined;\n availabilityDateIfNotImmediately?: string | undefined;\n flatmatesIfShared?: number | undefined;\n listingRequiredGender?: \"Male\" | \"Female\" | \"Other\" | undefined;\n seniorsOnly?: boolean | undefined;\n studentsOnly?: boolean | undefined;\n bathtub?: boolean | undefined;\n garden?: boolean | undefined;\n floorNumber?: number ? undefined,\n pets?: boolean | undefined;\n garage?: boolean | undefined;\n gym?: boolean | undefined;\n}";
|
|
698
790
|
export declare const TransformedHouseSchema: z.ZodObject<{
|
|
699
791
|
price: z.ZodEffects<z.ZodString, number, string>;
|
|
700
792
|
propertyType: z.ZodEnum<["House", "Apartment", "Studio", "Room"]>;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,mDAAoD,CAAC;AAEhF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmErB,CAAC;AAEX,eAAO,MAAM,MAAM,y1BAmET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;;;;;;;;;;;;;;;;;;;;;;;;EAAqC,CAAC;AAEpE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,0BAA0B,03BAsBrC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,9 +3,9 @@ export const CITIES_WITH_COORDS = [
|
|
|
3
3
|
{ name: "Alkmaar", lat: 52.6317, lng: 4.7485 },
|
|
4
4
|
{ name: "Almere", lat: 52.3507, lng: 5.2647 },
|
|
5
5
|
{ name: "Alphen aan den Rijn", lat: 52.1306, lng: 4.6581 },
|
|
6
|
-
{ name: "Amsterdam", lat: 52.3738, lng: 4.
|
|
6
|
+
{ name: "Amsterdam", lat: 52.3738, lng: 4.891 },
|
|
7
7
|
{ name: "Apeldoorn", lat: 52.2112, lng: 5.9699 },
|
|
8
|
-
{ name: "Arnhem", lat: 51.
|
|
8
|
+
{ name: "Arnhem", lat: 51.98, lng: 5.911 },
|
|
9
9
|
{ name: "Beverwijk", lat: 52.4831, lng: 4.6564 },
|
|
10
10
|
{ name: "Bilthoven", lat: 52.1347, lng: 5.2042 },
|
|
11
11
|
{ name: "Bloemendaal", lat: 52.4081, lng: 4.6175 },
|
|
@@ -19,7 +19,7 @@ export const CITIES_WITH_COORDS = [
|
|
|
19
19
|
{ name: "Deventer", lat: 52.2551, lng: 6.1639 },
|
|
20
20
|
{ name: "Diemen", lat: 52.3394, lng: 4.9631 },
|
|
21
21
|
{ name: "Doorn", lat: 52.0342, lng: 5.3439 },
|
|
22
|
-
{ name: "Dordrecht", lat: 51.8133, lng: 4.
|
|
22
|
+
{ name: "Dordrecht", lat: 51.8133, lng: 4.69 },
|
|
23
23
|
{ name: "Driebergen-rijsenburg", lat: 52.0522, lng: 5.2803 },
|
|
24
24
|
{ name: "Duivendrecht", lat: 52.3267, lng: 4.9361 },
|
|
25
25
|
{ name: "Ede", lat: 52.0481, lng: 5.6575 },
|
|
@@ -32,10 +32,10 @@ export const CITIES_WITH_COORDS = [
|
|
|
32
32
|
{ name: "Hoogezand", lat: 53.1644, lng: 6.7583 },
|
|
33
33
|
{ name: "Hoorn", lat: 52.6431, lng: 5.0597 },
|
|
34
34
|
{ name: "Ijsselstein", lat: 52.0203, lng: 5.0428 },
|
|
35
|
-
{ name: "Leende", lat: 51.
|
|
35
|
+
{ name: "Leende", lat: 51.35, lng: 5.5539 },
|
|
36
36
|
{ name: "Leeuwarden", lat: 53.2012, lng: 5.8086 },
|
|
37
|
-
{ name: "Leiden", lat: 52.1601, lng: 4.
|
|
38
|
-
{ name: "Leidschendam", lat: 52.0869, lng: 4.
|
|
37
|
+
{ name: "Leiden", lat: 52.1601, lng: 4.497 },
|
|
38
|
+
{ name: "Leidschendam", lat: 52.0869, lng: 4.39 },
|
|
39
39
|
{ name: "Lelystad", lat: 52.5184, lng: 5.4714 },
|
|
40
40
|
{ name: "Maastricht", lat: 50.8514, lng: 5.6913 },
|
|
41
41
|
{ name: "Nieuwegein", lat: 52.0289, lng: 5.0806 },
|
|
@@ -55,7 +55,7 @@ export const CITIES_WITH_COORDS = [
|
|
|
55
55
|
{ name: "The Hague", lat: 52.0705, lng: 4.3007 },
|
|
56
56
|
{ name: "Tilburg", lat: 51.5656, lng: 5.0913 },
|
|
57
57
|
{ name: "Utrecht", lat: 52.0907, lng: 5.1214 },
|
|
58
|
-
{ name: "Velp-Rheden", lat: 52.
|
|
58
|
+
{ name: "Velp-Rheden", lat: 52.0, lng: 5.9731 },
|
|
59
59
|
{ name: "Venlo", lat: 51.3703, lng: 6.1725 },
|
|
60
60
|
{ name: "Volendam", lat: 52.4958, lng: 5.0714 },
|
|
61
61
|
{ name: "Voorschoten", lat: 52.1242, lng: 4.4458 },
|
|
@@ -65,7 +65,7 @@ export const CITIES_WITH_COORDS = [
|
|
|
65
65
|
{ name: "Zandvoort", lat: 52.3675, lng: 4.5339 },
|
|
66
66
|
{ name: "Zoetermeer", lat: 52.0575, lng: 4.4939 },
|
|
67
67
|
{ name: "Zutphen", lat: 52.1381, lng: 6.2014 },
|
|
68
|
-
{ name: "Zwolle", lat: 52.5168, lng: 6.
|
|
68
|
+
{ name: "Zwolle", lat: 52.5168, lng: 6.083 },
|
|
69
69
|
];
|
|
70
70
|
export const CITIES = [
|
|
71
71
|
"Alkmaar",
|
|
@@ -136,7 +136,7 @@ export const CITIES = [
|
|
|
136
136
|
"Zwolle",
|
|
137
137
|
];
|
|
138
138
|
export const getCityCoordinates = (cityName) => {
|
|
139
|
-
return CITIES_WITH_COORDS.find(city => city.name === cityName);
|
|
139
|
+
return CITIES_WITH_COORDS.find((city) => city.name === cityName);
|
|
140
140
|
};
|
|
141
141
|
const MF = ["Male", "Female"];
|
|
142
142
|
export const GENDERS = [...MF, "Other"];
|
|
@@ -327,6 +327,53 @@ const parsedHouseSchema = {
|
|
|
327
327
|
export const ParsedHouseSchema = z.object({
|
|
328
328
|
...parsedHouseSchema,
|
|
329
329
|
});
|
|
330
|
+
export const parserHouseSchema = {
|
|
331
|
+
city: z.string().nonempty(),
|
|
332
|
+
postalCode: z.string().nonempty().optional(),
|
|
333
|
+
addressWithoutCity: z.string().optional(),
|
|
334
|
+
price: z.number(),
|
|
335
|
+
availabilityDateIfNotImmediately: z.string().datetime().optional(),
|
|
336
|
+
propertyType: z.enum(PROPERTY_TYPES),
|
|
337
|
+
bedrooms: z.number().optional(),
|
|
338
|
+
flatmatesIfShared: z.number().optional(),
|
|
339
|
+
listingRequiredGender: z.enum(GENDERS).optional(),
|
|
340
|
+
flatmatesGender: z.enum(FLATMATES_GENDERS).optional(),
|
|
341
|
+
bathrooms: z.number().optional(),
|
|
342
|
+
furnished: z.boolean().optional(),
|
|
343
|
+
surface: z.number().optional(),
|
|
344
|
+
seniorsOnly: z.boolean().optional(),
|
|
345
|
+
studentsOnly: z.boolean().optional(),
|
|
346
|
+
bathtub: z.boolean().optional(),
|
|
347
|
+
garden: z.boolean().optional(),
|
|
348
|
+
floorIfBuilding: z.number().optional(),
|
|
349
|
+
pets: z.boolean().optional(),
|
|
350
|
+
garage: z.boolean().optional(),
|
|
351
|
+
gym: z.boolean().optional(),
|
|
352
|
+
};
|
|
353
|
+
export const ParserHouseSchema = z.object({ ...parserHouseSchema });
|
|
354
|
+
export const stringifiedParserHouseType = `{
|
|
355
|
+
city: string;
|
|
356
|
+
price: number;
|
|
357
|
+
propertyType: "House" | "Apartment" | "Studio" | "Room";
|
|
358
|
+
furnished?: boolean | undefined;
|
|
359
|
+
flatmatesGender?: "Male" | "Female" | "Mixed" | undefined;
|
|
360
|
+
postalCode?: string | undefined;
|
|
361
|
+
bedrooms?: number | undefined;
|
|
362
|
+
bathrooms?: number | undefined;
|
|
363
|
+
surface?: number | undefined;
|
|
364
|
+
addressWithoutCity?: string | undefined;
|
|
365
|
+
availabilityDateIfNotImmediately?: string | undefined;
|
|
366
|
+
flatmatesIfShared?: number | undefined;
|
|
367
|
+
listingRequiredGender?: "Male" | "Female" | "Other" | undefined;
|
|
368
|
+
seniorsOnly?: boolean | undefined;
|
|
369
|
+
studentsOnly?: boolean | undefined;
|
|
370
|
+
bathtub?: boolean | undefined;
|
|
371
|
+
garden?: boolean | undefined;
|
|
372
|
+
floorNumber?: number ? undefined,
|
|
373
|
+
pets?: boolean | undefined;
|
|
374
|
+
garage?: boolean | undefined;
|
|
375
|
+
gym?: boolean | undefined;
|
|
376
|
+
}`;
|
|
330
377
|
export const TransformedHouseSchema = z.object({
|
|
331
378
|
...parsedHouseSchema,
|
|
332
379
|
price: z.string().transform(Number),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "house-types",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.51",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"typescript": "^5.8.2"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"zod": "^3.24.2"
|
|
20
|
+
"zod": "^3.24.2",
|
|
21
|
+
"zod-to-ts": "^2.0.0"
|
|
21
22
|
},
|
|
22
23
|
"type": "module"
|
|
23
|
-
|
|
24
24
|
}
|