house-types 2.5.2 → 2.5.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 +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -91,7 +91,7 @@ export declare const HouseSchema: z.ZodObject<{
|
|
|
91
91
|
city: z.ZodString;
|
|
92
92
|
price: z.ZodEffects<z.ZodString, number, string>;
|
|
93
93
|
availabilityDate: z.ZodOptional<z.ZodString>;
|
|
94
|
-
propertyType: z.ZodEnum<["house", "apartment", "studio", "
|
|
94
|
+
propertyType: z.ZodEnum<["house", "apartment", "studio", "room"]>;
|
|
95
95
|
bedrooms: z.ZodEffects<z.ZodString, number, string>;
|
|
96
96
|
roommates: z.ZodEffects<z.ZodString, number, string>;
|
|
97
97
|
gender: z.ZodOptional<z.ZodEnum<["m", "f", "any"]>>;
|
|
@@ -102,7 +102,7 @@ export declare const HouseSchema: z.ZodObject<{
|
|
|
102
102
|
createdAt: z.ZodString;
|
|
103
103
|
}, "strip", z.ZodTypeAny, {
|
|
104
104
|
city: string;
|
|
105
|
-
propertyType: "house" | "apartment" | "studio" | "
|
|
105
|
+
propertyType: "house" | "apartment" | "studio" | "room";
|
|
106
106
|
id: string;
|
|
107
107
|
price: number;
|
|
108
108
|
bedrooms: number;
|
|
@@ -116,7 +116,7 @@ export declare const HouseSchema: z.ZodObject<{
|
|
|
116
116
|
furnished?: boolean | undefined;
|
|
117
117
|
}, {
|
|
118
118
|
city: string;
|
|
119
|
-
propertyType: "house" | "apartment" | "studio" | "
|
|
119
|
+
propertyType: "house" | "apartment" | "studio" | "room";
|
|
120
120
|
id: string;
|
|
121
121
|
price: string;
|
|
122
122
|
bedrooms: string;
|
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,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;EAMtB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEhD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQrB,CAAC;AAEH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAE9C,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAKzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EActB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
const propertyType = z.enum(["house", "apartment", "studio", "room"]);
|
|
2
3
|
export const AlertSchema = z.object({
|
|
3
4
|
city: z.string(),
|
|
4
5
|
maxPrice: z.string().regex(/^\d+$/).transform(Number),
|
|
5
6
|
minBedrooms: z.string().regex(/^\d+$/).transform(Number).optional(),
|
|
6
7
|
furnishedOnly: z.boolean().optional(),
|
|
7
|
-
propertyType: z
|
|
8
|
-
.array(z.enum(["house", "apartment", "studio", "room"]))
|
|
9
|
-
.optional(),
|
|
8
|
+
propertyType: z.array(propertyType).optional(),
|
|
10
9
|
});
|
|
11
10
|
export const UserSchema = z.object({
|
|
12
11
|
notificationsEnabled: z.boolean().default(true),
|
|
@@ -28,7 +27,7 @@ export const HouseSchema = z.object({
|
|
|
28
27
|
city: z.string(),
|
|
29
28
|
price: z.string().regex(/^\d+$/).transform(Number),
|
|
30
29
|
availabilityDate: z.string().datetime().optional(),
|
|
31
|
-
propertyType
|
|
30
|
+
propertyType,
|
|
32
31
|
bedrooms: z.string().regex(/^\d+$/).transform(Number),
|
|
33
32
|
roommates: z.string().regex(/^\d+$/).transform(Number),
|
|
34
33
|
gender: z.enum(["m", "f", "any"]).optional(),
|