house-types 2.5.5 → 2.6.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 +51 -24
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -14
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -69,34 +69,61 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
69
69
|
lastNotified?: string | undefined;
|
|
70
70
|
}>;
|
|
71
71
|
export type User = z.infer<typeof UserSchema>;
|
|
72
|
-
export declare const
|
|
72
|
+
export declare const ParseHouseSchema: z.ZodObject<{
|
|
73
73
|
id: z.ZodString;
|
|
74
74
|
city: z.ZodString;
|
|
75
|
-
price: z.
|
|
76
|
-
|
|
75
|
+
price: z.ZodString;
|
|
76
|
+
availabilityDate: z.ZodOptional<z.ZodString>;
|
|
77
|
+
propertyType: z.ZodString;
|
|
78
|
+
bedrooms: z.ZodString;
|
|
79
|
+
roommates: z.ZodOptional<z.ZodString>;
|
|
80
|
+
gender: z.ZodOptional<z.ZodString>;
|
|
81
|
+
propertyGender: z.ZodOptional<z.ZodString>;
|
|
82
|
+
bathrooms: z.ZodOptional<z.ZodString>;
|
|
83
|
+
furnished: z.ZodOptional<z.ZodBoolean>;
|
|
84
|
+
image: z.ZodOptional<z.ZodString>;
|
|
85
|
+
createdAt: z.ZodString;
|
|
77
86
|
}, "strip", z.ZodTypeAny, {
|
|
78
87
|
city: string;
|
|
88
|
+
propertyType: string;
|
|
79
89
|
id: string;
|
|
80
|
-
price:
|
|
81
|
-
|
|
90
|
+
price: string;
|
|
91
|
+
bedrooms: string;
|
|
92
|
+
createdAt: string;
|
|
93
|
+
availabilityDate?: string | undefined;
|
|
94
|
+
roommates?: string | undefined;
|
|
95
|
+
gender?: string | undefined;
|
|
96
|
+
propertyGender?: string | undefined;
|
|
97
|
+
bathrooms?: string | undefined;
|
|
98
|
+
furnished?: boolean | undefined;
|
|
99
|
+
image?: string | undefined;
|
|
82
100
|
}, {
|
|
83
101
|
city: string;
|
|
102
|
+
propertyType: string;
|
|
84
103
|
id: string;
|
|
85
104
|
price: string;
|
|
86
|
-
|
|
105
|
+
bedrooms: string;
|
|
106
|
+
createdAt: string;
|
|
107
|
+
availabilityDate?: string | undefined;
|
|
108
|
+
roommates?: string | undefined;
|
|
109
|
+
gender?: string | undefined;
|
|
110
|
+
propertyGender?: string | undefined;
|
|
111
|
+
bathrooms?: string | undefined;
|
|
112
|
+
furnished?: boolean | undefined;
|
|
113
|
+
image?: string | undefined;
|
|
87
114
|
}>;
|
|
88
|
-
export type
|
|
89
|
-
export declare const
|
|
90
|
-
id: z.ZodString;
|
|
91
|
-
city: z.ZodString;
|
|
115
|
+
export type ParseHouseSchema = z.infer<typeof ParseHouseSchema>;
|
|
116
|
+
export declare const TransformedHouseSchema: z.ZodObject<{
|
|
92
117
|
price: z.ZodNumber;
|
|
93
|
-
availabilityDate: z.ZodOptional<z.ZodString>;
|
|
94
118
|
propertyType: z.ZodEnum<["house", "apartment", "studio", "room"]>;
|
|
95
119
|
bedrooms: z.ZodNumber;
|
|
96
|
-
roommates: z.ZodOptional<z.
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
120
|
+
roommates: z.ZodOptional<z.ZodNumber>;
|
|
121
|
+
id: z.ZodString;
|
|
122
|
+
city: z.ZodString;
|
|
123
|
+
availabilityDate: z.ZodOptional<z.ZodString>;
|
|
124
|
+
gender: z.ZodOptional<z.ZodString>;
|
|
125
|
+
propertyGender: z.ZodOptional<z.ZodString>;
|
|
126
|
+
bathrooms: z.ZodOptional<z.ZodString>;
|
|
100
127
|
furnished: z.ZodOptional<z.ZodBoolean>;
|
|
101
128
|
image: z.ZodOptional<z.ZodString>;
|
|
102
129
|
createdAt: z.ZodString;
|
|
@@ -107,13 +134,13 @@ export declare const HouseSchema: z.ZodObject<{
|
|
|
107
134
|
price: number;
|
|
108
135
|
bedrooms: number;
|
|
109
136
|
createdAt: string;
|
|
110
|
-
image?: string | undefined;
|
|
111
137
|
availabilityDate?: string | undefined;
|
|
112
138
|
roommates?: number | undefined;
|
|
113
|
-
gender?:
|
|
114
|
-
propertyGender?:
|
|
115
|
-
bathrooms?:
|
|
139
|
+
gender?: string | undefined;
|
|
140
|
+
propertyGender?: string | undefined;
|
|
141
|
+
bathrooms?: string | undefined;
|
|
116
142
|
furnished?: boolean | undefined;
|
|
143
|
+
image?: string | undefined;
|
|
117
144
|
}, {
|
|
118
145
|
city: string;
|
|
119
146
|
propertyType: "house" | "apartment" | "studio" | "room";
|
|
@@ -121,13 +148,13 @@ export declare const HouseSchema: z.ZodObject<{
|
|
|
121
148
|
price: number;
|
|
122
149
|
bedrooms: number;
|
|
123
150
|
createdAt: string;
|
|
124
|
-
image?: string | undefined;
|
|
125
151
|
availabilityDate?: string | undefined;
|
|
126
|
-
roommates?:
|
|
127
|
-
gender?:
|
|
128
|
-
propertyGender?:
|
|
152
|
+
roommates?: number | undefined;
|
|
153
|
+
gender?: string | undefined;
|
|
154
|
+
propertyGender?: string | undefined;
|
|
129
155
|
bathrooms?: string | undefined;
|
|
130
156
|
furnished?: boolean | undefined;
|
|
157
|
+
image?: string | undefined;
|
|
131
158
|
}>;
|
|
132
|
-
export type
|
|
159
|
+
export type TransformedHouseSchema = z.infer<typeof TransformedHouseSchema>;
|
|
133
160
|
//# 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,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;
|
|
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;AAkB9C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE3B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMjC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -16,24 +16,28 @@ export const UserSchema = z.object({
|
|
|
16
16
|
lastNotified: z.string().datetime().optional(),
|
|
17
17
|
alert: AlertSchema,
|
|
18
18
|
});
|
|
19
|
-
|
|
19
|
+
const parseHouseSchema = {
|
|
20
20
|
id: z.string(),
|
|
21
21
|
city: z.string(),
|
|
22
|
-
price: z.string()
|
|
23
|
-
image: z.string(),
|
|
24
|
-
});
|
|
25
|
-
export const HouseSchema = z.object({
|
|
26
|
-
id: z.string(),
|
|
27
|
-
city: z.string(),
|
|
28
|
-
price: z.number(),
|
|
22
|
+
price: z.string(),
|
|
29
23
|
availabilityDate: z.string().datetime().optional(),
|
|
30
|
-
propertyType,
|
|
31
|
-
bedrooms: z.
|
|
32
|
-
roommates: z.string().
|
|
33
|
-
gender: z.
|
|
34
|
-
propertyGender: z.
|
|
35
|
-
bathrooms: z.string().
|
|
24
|
+
propertyType: z.string(),
|
|
25
|
+
bedrooms: z.string(),
|
|
26
|
+
roommates: z.string().optional(),
|
|
27
|
+
gender: z.string().optional(),
|
|
28
|
+
propertyGender: z.string().optional(),
|
|
29
|
+
bathrooms: z.string().optional(),
|
|
36
30
|
furnished: z.boolean().optional(),
|
|
37
31
|
image: z.string().optional(),
|
|
38
32
|
createdAt: z.string().datetime(),
|
|
33
|
+
};
|
|
34
|
+
export const ParseHouseSchema = z.object({
|
|
35
|
+
...parseHouseSchema
|
|
36
|
+
});
|
|
37
|
+
export const TransformedHouseSchema = z.object({
|
|
38
|
+
...parseHouseSchema,
|
|
39
|
+
price: z.number(),
|
|
40
|
+
propertyType,
|
|
41
|
+
bedrooms: z.number(),
|
|
42
|
+
roommates: z.number().optional(),
|
|
39
43
|
});
|