house-types 2.16.0 → 2.16.3
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 +65 -56
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -67
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -533,13 +533,14 @@ export declare const getCityCoordinates: (cityName: string) => {
|
|
|
533
533
|
} | undefined;
|
|
534
534
|
export declare const GENDERS: readonly ["Male", "Female", "Other"];
|
|
535
535
|
export declare const FLATMATES_GENDERS: readonly ["Male", "Female", "Mixed"];
|
|
536
|
+
export declare const FURNISHING: readonly ["Uncarpeted", "Unfurnished", "Furnished"];
|
|
536
537
|
export declare const FREQUENCIES: readonly ["5", "15", "60", "180", "360", "1440", "4320", "10080"];
|
|
537
538
|
export declare const RADIUSES: readonly ["2", "5", "10", "20"];
|
|
538
539
|
export declare const PRICES: readonly ["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"];
|
|
539
540
|
export declare const SURFACES: readonly ["5", "10", "15", "20", "30", "40", "50", "75", "100", "125", "150"];
|
|
540
541
|
export declare const BEDROOMS: readonly ["1", "2", "3", "4", "5", "6", "7"];
|
|
541
542
|
export declare const FLATMATES: readonly ["1", "2", "3", "4", "5", "6", "7"];
|
|
542
|
-
export declare const
|
|
543
|
+
export declare const IMMEDIATELY: "Immediately";
|
|
543
544
|
export declare const Id: z.ZodUUID;
|
|
544
545
|
export declare const AlertSchema: z.ZodObject<{
|
|
545
546
|
id: z.ZodUUID;
|
|
@@ -804,128 +805,136 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
804
805
|
export type User = z.infer<typeof UserSchema>;
|
|
805
806
|
export declare const ParsedHouseSchema: z.ZodObject<{
|
|
806
807
|
city: z.ZodString;
|
|
807
|
-
postalCode: z.
|
|
808
|
-
addressWithoutCity: z.
|
|
808
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
809
|
+
addressWithoutCity: z.ZodOptional<z.ZodString>;
|
|
809
810
|
price: z.ZodNumber;
|
|
810
|
-
|
|
811
|
-
|
|
811
|
+
startDate: z.ZodUnion<readonly [z.ZodISODate, z.ZodEnum<{
|
|
812
|
+
Immediately: "Immediately";
|
|
813
|
+
}>]>;
|
|
812
814
|
propertyType: z.ZodEnum<{
|
|
813
815
|
House: "House";
|
|
814
816
|
Apartment: "Apartment";
|
|
815
817
|
Studio: "Studio";
|
|
816
818
|
Room: "Room";
|
|
817
819
|
}>;
|
|
818
|
-
bedrooms: z.
|
|
819
|
-
flatmatesIfShared: z.
|
|
820
|
-
listingRequiredGender: z.
|
|
820
|
+
bedrooms: z.ZodOptional<z.ZodNumber>;
|
|
821
|
+
flatmatesIfShared: z.ZodOptional<z.ZodNumber>;
|
|
822
|
+
listingRequiredGender: z.ZodOptional<z.ZodEnum<{
|
|
821
823
|
Male: "Male";
|
|
822
824
|
Female: "Female";
|
|
823
825
|
Other: "Other";
|
|
824
826
|
}>>;
|
|
825
|
-
|
|
827
|
+
flatmatesGenderIfShared: z.ZodOptional<z.ZodEnum<{
|
|
826
828
|
Male: "Male";
|
|
827
829
|
Female: "Female";
|
|
828
830
|
Mixed: "Mixed";
|
|
829
831
|
}>>;
|
|
830
|
-
bathrooms: z.
|
|
831
|
-
furnishing: z.
|
|
832
|
+
bathrooms: z.ZodOptional<z.ZodNumber>;
|
|
833
|
+
furnishing: z.ZodOptional<z.ZodEnum<{
|
|
832
834
|
Uncarpeted: "Uncarpeted";
|
|
833
835
|
Unfurnished: "Unfurnished";
|
|
834
836
|
Furnished: "Furnished";
|
|
835
837
|
}>>;
|
|
836
|
-
surface: z.
|
|
837
|
-
seniorsOnly: z.
|
|
838
|
-
studentsOnly: z.
|
|
839
|
-
bathtub: z.
|
|
840
|
-
garden: z.
|
|
841
|
-
floorNumber: z.
|
|
842
|
-
pets: z.
|
|
843
|
-
garage: z.
|
|
844
|
-
gym: z.
|
|
838
|
+
surface: z.ZodOptional<z.ZodNumber>;
|
|
839
|
+
seniorsOnly: z.ZodOptional<z.ZodBoolean>;
|
|
840
|
+
studentsOnly: z.ZodOptional<z.ZodBoolean>;
|
|
841
|
+
bathtub: z.ZodOptional<z.ZodBoolean>;
|
|
842
|
+
garden: z.ZodOptional<z.ZodBoolean>;
|
|
843
|
+
floorNumber: z.ZodOptional<z.ZodNumber>;
|
|
844
|
+
pets: z.ZodOptional<z.ZodBoolean>;
|
|
845
|
+
garage: z.ZodOptional<z.ZodBoolean>;
|
|
846
|
+
gym: z.ZodOptional<z.ZodBoolean>;
|
|
845
847
|
}, z.core.$strip>;
|
|
846
848
|
export type ParsedHouse = z.infer<typeof ParsedHouseSchema>;
|
|
847
849
|
export declare const TransformedHouseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
848
850
|
postalCode: z.ZodString;
|
|
849
851
|
id: z.ZodString;
|
|
852
|
+
origin: z.ZodString;
|
|
853
|
+
createdAt: z.ZodISODateTime;
|
|
850
854
|
city: z.ZodString;
|
|
851
|
-
|
|
855
|
+
addressWithoutCity: z.ZodOptional<z.ZodString>;
|
|
852
856
|
price: z.ZodNumber;
|
|
853
|
-
|
|
857
|
+
startDate: z.ZodUnion<readonly [z.ZodISODate, z.ZodEnum<{
|
|
858
|
+
Immediately: "Immediately";
|
|
859
|
+
}>]>;
|
|
854
860
|
propertyType: z.ZodEnum<{
|
|
855
861
|
House: "House";
|
|
856
862
|
Apartment: "Apartment";
|
|
857
863
|
Studio: "Studio";
|
|
858
864
|
Room: "Room";
|
|
859
865
|
}>;
|
|
860
|
-
bedrooms: z.
|
|
861
|
-
|
|
862
|
-
|
|
866
|
+
bedrooms: z.ZodOptional<z.ZodNumber>;
|
|
867
|
+
flatmatesIfShared: z.ZodOptional<z.ZodNumber>;
|
|
868
|
+
listingRequiredGender: z.ZodOptional<z.ZodEnum<{
|
|
863
869
|
Male: "Male";
|
|
864
870
|
Female: "Female";
|
|
865
871
|
Other: "Other";
|
|
866
872
|
}>>;
|
|
867
|
-
|
|
873
|
+
flatmatesGenderIfShared: z.ZodOptional<z.ZodEnum<{
|
|
868
874
|
Male: "Male";
|
|
869
875
|
Female: "Female";
|
|
870
876
|
Mixed: "Mixed";
|
|
871
877
|
}>>;
|
|
872
|
-
bathrooms: z.
|
|
873
|
-
furnishing: z.
|
|
878
|
+
bathrooms: z.ZodOptional<z.ZodNumber>;
|
|
879
|
+
furnishing: z.ZodOptional<z.ZodEnum<{
|
|
874
880
|
Uncarpeted: "Uncarpeted";
|
|
875
881
|
Unfurnished: "Unfurnished";
|
|
876
882
|
Furnished: "Furnished";
|
|
877
883
|
}>>;
|
|
878
|
-
surface: z.
|
|
879
|
-
seniorsOnly: z.
|
|
880
|
-
studentsOnly: z.
|
|
881
|
-
bathtub: z.
|
|
882
|
-
garden: z.
|
|
883
|
-
floorNumber: z.
|
|
884
|
-
pets: z.
|
|
885
|
-
garage: z.
|
|
886
|
-
gym: z.
|
|
887
|
-
createdAt: z.ZodISODateTime;
|
|
884
|
+
surface: z.ZodOptional<z.ZodNumber>;
|
|
885
|
+
seniorsOnly: z.ZodOptional<z.ZodBoolean>;
|
|
886
|
+
studentsOnly: z.ZodOptional<z.ZodBoolean>;
|
|
887
|
+
bathtub: z.ZodOptional<z.ZodBoolean>;
|
|
888
|
+
garden: z.ZodOptional<z.ZodBoolean>;
|
|
889
|
+
floorNumber: z.ZodOptional<z.ZodNumber>;
|
|
890
|
+
pets: z.ZodOptional<z.ZodBoolean>;
|
|
891
|
+
garage: z.ZodOptional<z.ZodBoolean>;
|
|
892
|
+
gym: z.ZodOptional<z.ZodBoolean>;
|
|
888
893
|
}, z.core.$strip>, z.ZodObject<{
|
|
889
894
|
address: z.ZodString;
|
|
890
895
|
id: z.ZodString;
|
|
896
|
+
origin: z.ZodString;
|
|
897
|
+
createdAt: z.ZodISODateTime;
|
|
891
898
|
city: z.ZodString;
|
|
892
|
-
postalCode: z.
|
|
899
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
900
|
+
addressWithoutCity: z.ZodOptional<z.ZodString>;
|
|
893
901
|
price: z.ZodNumber;
|
|
894
|
-
|
|
902
|
+
startDate: z.ZodUnion<readonly [z.ZodISODate, z.ZodEnum<{
|
|
903
|
+
Immediately: "Immediately";
|
|
904
|
+
}>]>;
|
|
895
905
|
propertyType: z.ZodEnum<{
|
|
896
906
|
House: "House";
|
|
897
907
|
Apartment: "Apartment";
|
|
898
908
|
Studio: "Studio";
|
|
899
909
|
Room: "Room";
|
|
900
910
|
}>;
|
|
901
|
-
bedrooms: z.
|
|
902
|
-
|
|
903
|
-
|
|
911
|
+
bedrooms: z.ZodOptional<z.ZodNumber>;
|
|
912
|
+
flatmatesIfShared: z.ZodOptional<z.ZodNumber>;
|
|
913
|
+
listingRequiredGender: z.ZodOptional<z.ZodEnum<{
|
|
904
914
|
Male: "Male";
|
|
905
915
|
Female: "Female";
|
|
906
916
|
Other: "Other";
|
|
907
917
|
}>>;
|
|
908
|
-
|
|
918
|
+
flatmatesGenderIfShared: z.ZodOptional<z.ZodEnum<{
|
|
909
919
|
Male: "Male";
|
|
910
920
|
Female: "Female";
|
|
911
921
|
Mixed: "Mixed";
|
|
912
922
|
}>>;
|
|
913
|
-
bathrooms: z.
|
|
914
|
-
furnishing: z.
|
|
923
|
+
bathrooms: z.ZodOptional<z.ZodNumber>;
|
|
924
|
+
furnishing: z.ZodOptional<z.ZodEnum<{
|
|
915
925
|
Uncarpeted: "Uncarpeted";
|
|
916
926
|
Unfurnished: "Unfurnished";
|
|
917
927
|
Furnished: "Furnished";
|
|
918
928
|
}>>;
|
|
919
|
-
surface: z.
|
|
920
|
-
seniorsOnly: z.
|
|
921
|
-
studentsOnly: z.
|
|
922
|
-
bathtub: z.
|
|
923
|
-
garden: z.
|
|
924
|
-
floorNumber: z.
|
|
925
|
-
pets: z.
|
|
926
|
-
garage: z.
|
|
927
|
-
gym: z.
|
|
928
|
-
createdAt: z.ZodISODateTime;
|
|
929
|
+
surface: z.ZodOptional<z.ZodNumber>;
|
|
930
|
+
seniorsOnly: z.ZodOptional<z.ZodBoolean>;
|
|
931
|
+
studentsOnly: z.ZodOptional<z.ZodBoolean>;
|
|
932
|
+
bathtub: z.ZodOptional<z.ZodBoolean>;
|
|
933
|
+
garden: z.ZodOptional<z.ZodBoolean>;
|
|
934
|
+
floorNumber: z.ZodOptional<z.ZodNumber>;
|
|
935
|
+
pets: z.ZodOptional<z.ZodBoolean>;
|
|
936
|
+
garage: z.ZodOptional<z.ZodBoolean>;
|
|
937
|
+
gym: z.ZodOptional<z.ZodBoolean>;
|
|
929
938
|
}, z.core.$strip>]>;
|
|
930
939
|
export type TransformedHouse = z.infer<typeof TransformedHouseSchema>;
|
|
931
940
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAW,MAAM,KAAK,CAAC;AAEjC,eAAO,MAAM,cAAc,mDAAoD,CAAC;AAEhF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmBF,CAAC;AAEvB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;iBAgBR,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;;;;iBAIrB,CAAC;AAEH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AA0B9C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAS5D,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBASjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -142,6 +142,7 @@ export const getCityCoordinates = (cityName) => {
|
|
|
142
142
|
const MF = ["Male", "Female"];
|
|
143
143
|
export const GENDERS = [...MF, "Other"];
|
|
144
144
|
export const FLATMATES_GENDERS = [...MF, "Mixed"];
|
|
145
|
+
export const FURNISHING = ["Uncarpeted", "Unfurnished", "Furnished"];
|
|
145
146
|
export const FREQUENCIES = [
|
|
146
147
|
"5",
|
|
147
148
|
"15",
|
|
@@ -270,30 +271,7 @@ export const SURFACES = [
|
|
|
270
271
|
];
|
|
271
272
|
export const BEDROOMS = ["1", "2", "3", "4", "5", "6", "7"];
|
|
272
273
|
export const FLATMATES = ["1", "2", "3", "4", "5", "6", "7"];
|
|
273
|
-
export const
|
|
274
|
-
city: string;
|
|
275
|
-
price: number;
|
|
276
|
-
propertyType: "House" | "Apartment" | "Studio" | "Room";
|
|
277
|
-
furnishing: "Uncarpeted" | "Unfurnished" | "Furnished";
|
|
278
|
-
flatmatesGender: "Male" | "Female" | "Mixed" | null;
|
|
279
|
-
postalCode: string | null;
|
|
280
|
-
bedrooms: number | null;
|
|
281
|
-
bathrooms: number | null;
|
|
282
|
-
surface: number | null;
|
|
283
|
-
addressWithoutCity: string | null;
|
|
284
|
-
immediatelyAvailable: boolean;
|
|
285
|
-
startDateIfNotImmediatelyAvailableISO8601: string | null;
|
|
286
|
-
flatmatesIfShared: number | null;
|
|
287
|
-
listingRequiredGender: "Male" | "Female" | "Other" | null;
|
|
288
|
-
seniorsOnly: boolean | null;
|
|
289
|
-
studentsOnly: boolean | null;
|
|
290
|
-
bathtub: boolean | null;
|
|
291
|
-
garden: boolean | null;
|
|
292
|
-
floorNumber: number | null,
|
|
293
|
-
pets: boolean | null;
|
|
294
|
-
garage: boolean | null;
|
|
295
|
-
gym: boolean | null;
|
|
296
|
-
}`;
|
|
274
|
+
export const IMMEDIATELY = "Immediately";
|
|
297
275
|
export const Id = z.uuid();
|
|
298
276
|
export const AlertSchema = z.object({
|
|
299
277
|
id: z.uuid(),
|
|
@@ -330,54 +308,37 @@ export const UserSchema = z.object({
|
|
|
330
308
|
email: z.email(),
|
|
331
309
|
lastNotified: z.iso.datetime().optional(),
|
|
332
310
|
});
|
|
333
|
-
|
|
311
|
+
const parsedHouseSchema = {
|
|
334
312
|
city: z.string().nonempty(),
|
|
335
|
-
postalCode: z.string().nonempty().
|
|
336
|
-
addressWithoutCity: z.string().
|
|
313
|
+
postalCode: z.string().nonempty().optional(),
|
|
314
|
+
addressWithoutCity: z.string().optional(),
|
|
337
315
|
price: z.number(),
|
|
338
|
-
|
|
339
|
-
startDateIfNotImmediatelyAvailableISO8601: z.iso.datetime().nullable(),
|
|
316
|
+
startDate: z.union([z.iso.date(), z.enum([IMMEDIATELY])]),
|
|
340
317
|
propertyType: z.enum(PROPERTY_TYPES),
|
|
341
|
-
bedrooms: z.number().
|
|
342
|
-
flatmatesIfShared: z.number().
|
|
343
|
-
listingRequiredGender: z.enum(GENDERS).
|
|
344
|
-
|
|
345
|
-
bathrooms: z.number().
|
|
346
|
-
furnishing: z.enum(
|
|
347
|
-
surface: z.number().
|
|
348
|
-
seniorsOnly: z.boolean().
|
|
349
|
-
studentsOnly: z.boolean().
|
|
350
|
-
bathtub: z.boolean().
|
|
351
|
-
garden: z.boolean().
|
|
352
|
-
floorNumber: z.number().
|
|
353
|
-
pets: z.boolean().
|
|
354
|
-
garage: z.boolean().
|
|
355
|
-
gym: z.boolean().
|
|
318
|
+
bedrooms: z.number().optional(),
|
|
319
|
+
flatmatesIfShared: z.number().optional(),
|
|
320
|
+
listingRequiredGender: z.enum(GENDERS).optional(),
|
|
321
|
+
flatmatesGenderIfShared: z.enum(FLATMATES_GENDERS).optional(),
|
|
322
|
+
bathrooms: z.number().optional(),
|
|
323
|
+
furnishing: z.enum(FURNISHING).optional(),
|
|
324
|
+
surface: z.number().optional(),
|
|
325
|
+
seniorsOnly: z.boolean().optional(),
|
|
326
|
+
studentsOnly: z.boolean().optional(),
|
|
327
|
+
bathtub: z.boolean().optional(),
|
|
328
|
+
garden: z.boolean().optional(),
|
|
329
|
+
floorNumber: z.number().optional(),
|
|
330
|
+
pets: z.boolean().optional(),
|
|
331
|
+
garage: z.boolean().optional(),
|
|
332
|
+
gym: z.boolean().optional(),
|
|
333
|
+
};
|
|
334
|
+
export const ParsedHouseSchema = z.object({
|
|
335
|
+
...parsedHouseSchema,
|
|
356
336
|
});
|
|
357
337
|
const transformedHouseSchema = {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
price: z.number(),
|
|
363
|
-
availability: z.iso.datetime().nullable(),
|
|
364
|
-
propertyType: z.enum(PROPERTY_TYPES),
|
|
365
|
-
bedrooms: z.number().nullable(),
|
|
366
|
-
flatmates: z.number().nullable(),
|
|
367
|
-
gender: z.enum(GENDERS).nullable(),
|
|
368
|
-
flatmatesGender: z.enum(FLATMATES_GENDERS).nullable(),
|
|
369
|
-
bathrooms: z.number().nullable(),
|
|
370
|
-
furnishing: z.enum(["Uncarpeted", "Unfurnished", "Furnished"]).nullable(),
|
|
371
|
-
surface: z.number().nullable(),
|
|
372
|
-
seniorsOnly: z.boolean().nullable(),
|
|
373
|
-
studentsOnly: z.boolean().nullable(),
|
|
374
|
-
bathtub: z.boolean().nullable(),
|
|
375
|
-
garden: z.boolean().nullable(),
|
|
376
|
-
floorNumber: z.number().nullable(),
|
|
377
|
-
pets: z.boolean().nullable(),
|
|
378
|
-
garage: z.boolean().nullable(),
|
|
379
|
-
gym: z.boolean().nullable(),
|
|
380
|
-
createdAt: z.iso.datetime()
|
|
338
|
+
...parsedHouseSchema,
|
|
339
|
+
id: z.string(),
|
|
340
|
+
origin: z.string(),
|
|
341
|
+
createdAt: z.iso.datetime(),
|
|
381
342
|
};
|
|
382
343
|
export const TransformedHouseSchema = z.union([
|
|
383
344
|
z.object({
|