house-types 1.0.0 → 1.0.2
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 +72 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/package.json +14 -4
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const UserSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
location: z.ZodOptional<z.ZodString>;
|
|
5
|
+
maxPrice: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
minBedrooms: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
furnishedOnly: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
propertyType: z.ZodOptional<z.ZodArray<z.ZodEnum<["house", "apartment", "studio", "shared-room"]>, "many">>;
|
|
9
|
+
notificationsEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
10
|
+
frequency: z.ZodEnum<["5", "15", "60", "180", "360", "1440"]>;
|
|
11
|
+
email: z.ZodString;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
id: string;
|
|
14
|
+
notificationsEnabled: boolean;
|
|
15
|
+
frequency: "5" | "15" | "60" | "180" | "360" | "1440";
|
|
16
|
+
email: string;
|
|
17
|
+
location?: string | undefined;
|
|
18
|
+
maxPrice?: number | undefined;
|
|
19
|
+
minBedrooms?: number | undefined;
|
|
20
|
+
furnishedOnly?: boolean | undefined;
|
|
21
|
+
propertyType?: ("house" | "apartment" | "studio" | "shared-room")[] | undefined;
|
|
22
|
+
}, {
|
|
23
|
+
id: string;
|
|
24
|
+
frequency: "5" | "15" | "60" | "180" | "360" | "1440";
|
|
25
|
+
email: string;
|
|
26
|
+
location?: string | undefined;
|
|
27
|
+
maxPrice?: number | undefined;
|
|
28
|
+
minBedrooms?: number | undefined;
|
|
29
|
+
furnishedOnly?: boolean | undefined;
|
|
30
|
+
propertyType?: ("house" | "apartment" | "studio" | "shared-room")[] | undefined;
|
|
31
|
+
notificationsEnabled?: boolean | undefined;
|
|
32
|
+
}>;
|
|
33
|
+
export type User = z.infer<typeof UserSchema>;
|
|
34
|
+
export declare const HouseSchema: z.ZodObject<{
|
|
35
|
+
id: z.ZodString;
|
|
36
|
+
city: z.ZodString;
|
|
37
|
+
price: z.ZodNumber;
|
|
38
|
+
availabilityDate: z.ZodOptional<z.ZodString>;
|
|
39
|
+
propertyType: z.ZodEnum<["house", "apartment", "studio", "shared-room"]>;
|
|
40
|
+
bedrooms: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
roommates: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
gender: z.ZodOptional<z.ZodEnum<["m", "f", "any"]>>;
|
|
43
|
+
propertyGender: z.ZodOptional<z.ZodEnum<["m", "f", "mixed"]>>;
|
|
44
|
+
bathrooms: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
furnished: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
id: string;
|
|
48
|
+
propertyType: "house" | "apartment" | "studio" | "shared-room";
|
|
49
|
+
city: string;
|
|
50
|
+
price: number;
|
|
51
|
+
availabilityDate?: string | undefined;
|
|
52
|
+
bedrooms?: number | undefined;
|
|
53
|
+
roommates?: number | undefined;
|
|
54
|
+
gender?: "m" | "f" | "any" | undefined;
|
|
55
|
+
propertyGender?: "m" | "f" | "mixed" | undefined;
|
|
56
|
+
bathrooms?: number | undefined;
|
|
57
|
+
furnished?: boolean | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
id: string;
|
|
60
|
+
propertyType: "house" | "apartment" | "studio" | "shared-room";
|
|
61
|
+
city: string;
|
|
62
|
+
price: number;
|
|
63
|
+
availabilityDate?: string | undefined;
|
|
64
|
+
bedrooms?: number | undefined;
|
|
65
|
+
roommates?: number | undefined;
|
|
66
|
+
gender?: "m" | "f" | "any" | undefined;
|
|
67
|
+
propertyGender?: "m" | "f" | "mixed" | undefined;
|
|
68
|
+
bathrooms?: number | undefined;
|
|
69
|
+
furnished?: boolean | undefined;
|
|
70
|
+
}>;
|
|
71
|
+
export type House = z.infer<typeof HouseSchema>;
|
|
72
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUrB,CAAC;AAEH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAE9C,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYtB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const UserSchema = z.object({
|
|
3
|
+
id: z.string(),
|
|
4
|
+
location: z.string().optional(),
|
|
5
|
+
maxPrice: z.number().min(0).optional(),
|
|
6
|
+
minBedrooms: z.number().min(0).optional(),
|
|
7
|
+
furnishedOnly: z.boolean().optional(),
|
|
8
|
+
propertyType: z.array(z.enum(["house", "apartment", "studio", "shared-room"])).optional(),
|
|
9
|
+
notificationsEnabled: z.boolean().default(true),
|
|
10
|
+
frequency: z.enum(["5", "15", "60", "180", "360", "1440"]),
|
|
11
|
+
email: z.string().email(),
|
|
12
|
+
});
|
|
13
|
+
export const HouseSchema = z.object({
|
|
14
|
+
id: z.string(),
|
|
15
|
+
city: z.string(),
|
|
16
|
+
price: z.number().min(0),
|
|
17
|
+
availabilityDate: z.string().optional(),
|
|
18
|
+
propertyType: z.enum(["house", "apartment", "studio", "shared-room"]),
|
|
19
|
+
bedrooms: z.number().min(0).optional(),
|
|
20
|
+
roommates: z.number().min(0).optional(),
|
|
21
|
+
gender: z.enum(['m', 'f', 'any']).optional(),
|
|
22
|
+
propertyGender: z.enum(['m', 'f', 'mixed']).optional(),
|
|
23
|
+
bathrooms: z.number().min(0).optional(),
|
|
24
|
+
furnished: z.boolean().optional(),
|
|
25
|
+
});
|
package/package.json
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "house-types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
6
10
|
"scripts": {
|
|
7
|
-
"
|
|
11
|
+
"build": "tsc"
|
|
8
12
|
},
|
|
9
13
|
"author": "",
|
|
10
|
-
"license": "ISC"
|
|
14
|
+
"license": "ISC",
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"typescript": "^5.8.2"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"zod": "^3.24.2"
|
|
20
|
+
}
|
|
11
21
|
}
|