house-types 2.11.2 → 2.12.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/schemas.d.ts +14 -2
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +28 -41
- package/package.json +1 -1
package/dist/schemas.d.ts
CHANGED
|
@@ -174,8 +174,9 @@ export declare const ParsedHouseSchema: z.ZodObject<{
|
|
|
174
174
|
}>;
|
|
175
175
|
export type ParsedHouse = z.infer<typeof ParsedHouseSchema>;
|
|
176
176
|
export declare const TransformedHouseSchema: z.ZodUnion<[z.ZodObject<{
|
|
177
|
-
city: z.ZodString;
|
|
178
177
|
postalCode: z.ZodString;
|
|
178
|
+
id: z.ZodString;
|
|
179
|
+
city: z.ZodString;
|
|
179
180
|
address: z.ZodNullable<z.ZodString>;
|
|
180
181
|
price: z.ZodNumber;
|
|
181
182
|
availability: z.ZodNullable<z.ZodString>;
|
|
@@ -195,10 +196,13 @@ export declare const TransformedHouseSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
195
196
|
pets: z.ZodNullable<z.ZodBoolean>;
|
|
196
197
|
garage: z.ZodNullable<z.ZodBoolean>;
|
|
197
198
|
gym: z.ZodNullable<z.ZodBoolean>;
|
|
199
|
+
createdAt: z.ZodString;
|
|
198
200
|
}, "strip", z.ZodTypeAny, {
|
|
201
|
+
id: string;
|
|
199
202
|
city: string;
|
|
200
203
|
flatmatesGender: "Male" | "Female" | "Mixed" | null;
|
|
201
204
|
gender: "Male" | "Female" | "Other" | null;
|
|
205
|
+
createdAt: string;
|
|
202
206
|
postalCode: string;
|
|
203
207
|
price: number;
|
|
204
208
|
propertyType: "House" | "Apartment" | "Studio" | "Room";
|
|
@@ -218,9 +222,11 @@ export declare const TransformedHouseSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
218
222
|
availability: string | null;
|
|
219
223
|
flatmates: number | null;
|
|
220
224
|
}, {
|
|
225
|
+
id: string;
|
|
221
226
|
city: string;
|
|
222
227
|
flatmatesGender: "Male" | "Female" | "Mixed" | null;
|
|
223
228
|
gender: "Male" | "Female" | "Other" | null;
|
|
229
|
+
createdAt: string;
|
|
224
230
|
postalCode: string;
|
|
225
231
|
price: number;
|
|
226
232
|
propertyType: "House" | "Apartment" | "Studio" | "Room";
|
|
@@ -240,9 +246,10 @@ export declare const TransformedHouseSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
240
246
|
availability: string | null;
|
|
241
247
|
flatmates: number | null;
|
|
242
248
|
}>, z.ZodObject<{
|
|
249
|
+
address: z.ZodString;
|
|
250
|
+
id: z.ZodString;
|
|
243
251
|
city: z.ZodString;
|
|
244
252
|
postalCode: z.ZodNullable<z.ZodString>;
|
|
245
|
-
address: z.ZodString;
|
|
246
253
|
price: z.ZodNumber;
|
|
247
254
|
availability: z.ZodNullable<z.ZodString>;
|
|
248
255
|
propertyType: z.ZodEnum<["House", "Apartment", "Studio", "Room"]>;
|
|
@@ -261,10 +268,13 @@ export declare const TransformedHouseSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
261
268
|
pets: z.ZodNullable<z.ZodBoolean>;
|
|
262
269
|
garage: z.ZodNullable<z.ZodBoolean>;
|
|
263
270
|
gym: z.ZodNullable<z.ZodBoolean>;
|
|
271
|
+
createdAt: z.ZodString;
|
|
264
272
|
}, "strip", z.ZodTypeAny, {
|
|
273
|
+
id: string;
|
|
265
274
|
city: string;
|
|
266
275
|
flatmatesGender: "Male" | "Female" | "Mixed" | null;
|
|
267
276
|
gender: "Male" | "Female" | "Other" | null;
|
|
277
|
+
createdAt: string;
|
|
268
278
|
postalCode: string | null;
|
|
269
279
|
price: number;
|
|
270
280
|
propertyType: "House" | "Apartment" | "Studio" | "Room";
|
|
@@ -284,9 +294,11 @@ export declare const TransformedHouseSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
284
294
|
availability: string | null;
|
|
285
295
|
flatmates: number | null;
|
|
286
296
|
}, {
|
|
297
|
+
id: string;
|
|
287
298
|
city: string;
|
|
288
299
|
flatmatesGender: "Male" | "Female" | "Mixed" | null;
|
|
289
300
|
gender: "Male" | "Female" | "Other" | null;
|
|
301
|
+
createdAt: string;
|
|
290
302
|
postalCode: string | null;
|
|
291
303
|
price: number;
|
|
292
304
|
propertyType: "House" | "Apartment" | "Studio" | "Room";
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAW,MAAM,KAAK,CAAC;AAkCjC,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;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAW,MAAM,KAAK,CAAC;AAkCjC,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;AA4B5D,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
package/dist/schemas.js
CHANGED
|
@@ -60,51 +60,38 @@ export const ParsedHouseSchema = z.object({
|
|
|
60
60
|
garage: z.boolean().nullable(),
|
|
61
61
|
gym: z.boolean().nullable(),
|
|
62
62
|
});
|
|
63
|
+
const transformedHouseSchema = {
|
|
64
|
+
id: z.string().nonempty(),
|
|
65
|
+
city: z.string().nonempty(),
|
|
66
|
+
postalCode: z.string().nonempty().nullable(),
|
|
67
|
+
address: z.string().nullable(),
|
|
68
|
+
price: z.number(),
|
|
69
|
+
availability: z.string().datetime().nullable(),
|
|
70
|
+
propertyType: z.enum(PROPERTY_TYPES),
|
|
71
|
+
bedrooms: z.number().nullable(),
|
|
72
|
+
flatmates: z.number().nullable(),
|
|
73
|
+
gender: z.enum(GENDERS).nullable(),
|
|
74
|
+
flatmatesGender: z.enum(FLATMATES_GENDERS).nullable(),
|
|
75
|
+
bathrooms: z.number().nullable(),
|
|
76
|
+
furnishing: z.enum(["Uncarpeted", "Unfurnished", "Furnished"]).nullable(),
|
|
77
|
+
surface: z.number().nullable(),
|
|
78
|
+
seniorsOnly: z.boolean().nullable(),
|
|
79
|
+
studentsOnly: z.boolean().nullable(),
|
|
80
|
+
bathtub: z.boolean().nullable(),
|
|
81
|
+
garden: z.boolean().nullable(),
|
|
82
|
+
floorNumber: z.number().nullable(),
|
|
83
|
+
pets: z.boolean().nullable(),
|
|
84
|
+
garage: z.boolean().nullable(),
|
|
85
|
+
gym: z.boolean().nullable(),
|
|
86
|
+
createdAt: z.string().datetime(),
|
|
87
|
+
};
|
|
63
88
|
export const TransformedHouseSchema = z.union([
|
|
64
89
|
z.object({
|
|
65
|
-
|
|
90
|
+
...transformedHouseSchema,
|
|
66
91
|
postalCode: z.string().nonempty(),
|
|
67
|
-
address: z.string().nullable(),
|
|
68
|
-
price: z.number(),
|
|
69
|
-
availability: z.string().datetime().nullable(),
|
|
70
|
-
propertyType: z.enum(PROPERTY_TYPES),
|
|
71
|
-
bedrooms: z.number().nullable(),
|
|
72
|
-
flatmates: z.number().nullable(),
|
|
73
|
-
gender: z.enum(GENDERS).nullable(),
|
|
74
|
-
flatmatesGender: z.enum(FLATMATES_GENDERS).nullable(),
|
|
75
|
-
bathrooms: z.number().nullable(),
|
|
76
|
-
furnishing: z.enum(["Uncarpeted", "Unfurnished", "Furnished"]).nullable(),
|
|
77
|
-
surface: z.number().nullable(),
|
|
78
|
-
seniorsOnly: z.boolean().nullable(),
|
|
79
|
-
studentsOnly: z.boolean().nullable(),
|
|
80
|
-
bathtub: z.boolean().nullable(),
|
|
81
|
-
garden: z.boolean().nullable(),
|
|
82
|
-
floorNumber: z.number().nullable(),
|
|
83
|
-
pets: z.boolean().nullable(),
|
|
84
|
-
garage: z.boolean().nullable(),
|
|
85
|
-
gym: z.boolean().nullable(),
|
|
86
92
|
}),
|
|
87
93
|
z.object({
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
address: z.string(),
|
|
91
|
-
price: z.number(),
|
|
92
|
-
availability: z.string().datetime().nullable(),
|
|
93
|
-
propertyType: z.enum(PROPERTY_TYPES),
|
|
94
|
-
bedrooms: z.number().nullable(),
|
|
95
|
-
flatmates: z.number().nullable(),
|
|
96
|
-
gender: z.enum(GENDERS).nullable(),
|
|
97
|
-
flatmatesGender: z.enum(FLATMATES_GENDERS).nullable(),
|
|
98
|
-
bathrooms: z.number().nullable(),
|
|
99
|
-
furnishing: z.enum(["Uncarpeted", "Unfurnished", "Furnished"]).nullable(),
|
|
100
|
-
surface: z.number().nullable(),
|
|
101
|
-
seniorsOnly: z.boolean().nullable(),
|
|
102
|
-
studentsOnly: z.boolean().nullable(),
|
|
103
|
-
bathtub: z.boolean().nullable(),
|
|
104
|
-
garden: z.boolean().nullable(),
|
|
105
|
-
floorNumber: z.number().nullable(),
|
|
106
|
-
pets: z.boolean().nullable(),
|
|
107
|
-
garage: z.boolean().nullable(),
|
|
108
|
-
gym: z.boolean().nullable(),
|
|
94
|
+
...transformedHouseSchema,
|
|
95
|
+
address: z.string().nonempty(),
|
|
109
96
|
}),
|
|
110
97
|
]);
|