house-types 2.3.0 → 2.4.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 +12 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const AlertSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
3
4
|
city: z.ZodString;
|
|
4
5
|
maxPrice: z.ZodEffects<z.ZodString, number, string>;
|
|
5
6
|
minBedrooms: z.ZodEffects<z.ZodString, number, string>;
|
|
6
7
|
furnishedOnly: z.ZodOptional<z.ZodBoolean>;
|
|
7
8
|
propertyType: z.ZodOptional<z.ZodArray<z.ZodEnum<["house", "apartment", "studio", "shared-room"]>, "many">>;
|
|
8
9
|
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
id: string;
|
|
9
11
|
city: string;
|
|
10
12
|
maxPrice: number;
|
|
11
13
|
minBedrooms: number;
|
|
12
14
|
furnishedOnly?: boolean | undefined;
|
|
13
15
|
propertyType?: ("house" | "apartment" | "studio" | "shared-room")[] | undefined;
|
|
14
16
|
}, {
|
|
17
|
+
id: string;
|
|
15
18
|
city: string;
|
|
16
19
|
maxPrice: string;
|
|
17
20
|
minBedrooms: string;
|
|
@@ -25,18 +28,21 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
25
28
|
email: z.ZodString;
|
|
26
29
|
lastNotified: z.ZodOptional<z.ZodString>;
|
|
27
30
|
alerts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
31
|
+
id: z.ZodString;
|
|
28
32
|
city: z.ZodString;
|
|
29
33
|
maxPrice: z.ZodEffects<z.ZodString, number, string>;
|
|
30
34
|
minBedrooms: z.ZodEffects<z.ZodString, number, string>;
|
|
31
35
|
furnishedOnly: z.ZodOptional<z.ZodBoolean>;
|
|
32
36
|
propertyType: z.ZodOptional<z.ZodArray<z.ZodEnum<["house", "apartment", "studio", "shared-room"]>, "many">>;
|
|
33
37
|
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
id: string;
|
|
34
39
|
city: string;
|
|
35
40
|
maxPrice: number;
|
|
36
41
|
minBedrooms: number;
|
|
37
42
|
furnishedOnly?: boolean | undefined;
|
|
38
43
|
propertyType?: ("house" | "apartment" | "studio" | "shared-room")[] | undefined;
|
|
39
44
|
}, {
|
|
45
|
+
id: string;
|
|
40
46
|
city: string;
|
|
41
47
|
maxPrice: string;
|
|
42
48
|
minBedrooms: string;
|
|
@@ -48,6 +54,7 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
48
54
|
frequency: number;
|
|
49
55
|
email: string;
|
|
50
56
|
alerts: {
|
|
57
|
+
id: string;
|
|
51
58
|
city: string;
|
|
52
59
|
maxPrice: number;
|
|
53
60
|
minBedrooms: number;
|
|
@@ -61,6 +68,7 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
61
68
|
notificationsEnabled?: boolean | undefined;
|
|
62
69
|
lastNotified?: string | undefined;
|
|
63
70
|
alerts?: {
|
|
71
|
+
id: string;
|
|
64
72
|
city: string;
|
|
65
73
|
maxPrice: string;
|
|
66
74
|
minBedrooms: string;
|
|
@@ -75,13 +83,13 @@ export declare const RawHouseSchema: z.ZodObject<{
|
|
|
75
83
|
price: z.ZodEffects<z.ZodString, number, string>;
|
|
76
84
|
image: z.ZodString;
|
|
77
85
|
}, "strip", z.ZodTypeAny, {
|
|
78
|
-
city: string;
|
|
79
86
|
id: string;
|
|
87
|
+
city: string;
|
|
80
88
|
price: number;
|
|
81
89
|
image: string;
|
|
82
90
|
}, {
|
|
83
|
-
city: string;
|
|
84
91
|
id: string;
|
|
92
|
+
city: string;
|
|
85
93
|
price: string;
|
|
86
94
|
image: string;
|
|
87
95
|
}>;
|
|
@@ -101,9 +109,9 @@ export declare const HouseSchema: z.ZodObject<{
|
|
|
101
109
|
image: z.ZodOptional<z.ZodString>;
|
|
102
110
|
createdAt: z.ZodString;
|
|
103
111
|
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
id: string;
|
|
104
113
|
city: string;
|
|
105
114
|
propertyType: "house" | "apartment" | "studio" | "shared-room";
|
|
106
|
-
id: string;
|
|
107
115
|
price: number;
|
|
108
116
|
bedrooms: number;
|
|
109
117
|
roommates: number;
|
|
@@ -115,9 +123,9 @@ export declare const HouseSchema: z.ZodObject<{
|
|
|
115
123
|
propertyGender?: "m" | "f" | "mixed" | undefined;
|
|
116
124
|
furnished?: boolean | undefined;
|
|
117
125
|
}, {
|
|
126
|
+
id: string;
|
|
118
127
|
city: string;
|
|
119
128
|
propertyType: "house" | "apartment" | "studio" | "shared-room";
|
|
120
|
-
id: string;
|
|
121
129
|
price: string;
|
|
122
130
|
bedrooms: string;
|
|
123
131
|
roommates: 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;AAExB,eAAO,MAAM,WAAW
|
|
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,WAAW;;;;;;;;;;;;;;;;;;;;;EAStB,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,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export const AlertSchema = z.object({
|
|
3
|
+
id: z.string(),
|
|
3
4
|
city: z.string(),
|
|
4
5
|
maxPrice: z.string().regex(/^\d+$/).transform(Number),
|
|
5
6
|
minBedrooms: z.string().regex(/^\d+$/).transform(Number),
|
|
@@ -10,7 +11,9 @@ export const AlertSchema = z.object({
|
|
|
10
11
|
});
|
|
11
12
|
export const UserSchema = z.object({
|
|
12
13
|
notificationsEnabled: z.boolean().default(true),
|
|
13
|
-
frequency: z
|
|
14
|
+
frequency: z
|
|
15
|
+
.enum(["5", "15", "60", "180", "360", "1440", "10080"])
|
|
16
|
+
.transform(Number),
|
|
14
17
|
email: z.string().email(),
|
|
15
18
|
lastNotified: z.string().datetime().optional(),
|
|
16
19
|
alerts: z.array(AlertSchema).default([]),
|