house-types 1.0.5 → 1.0.7

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 CHANGED
@@ -1,33 +1,33 @@
1
1
  import { z } from 'zod';
2
2
  export declare const UserSchema: z.ZodObject<{
3
3
  id: z.ZodString;
4
- location: z.ZodOptional<z.ZodString>;
5
- maxPrice: z.ZodOptional<z.ZodNumber>;
6
- minBedrooms: z.ZodOptional<z.ZodNumber>;
4
+ city: z.ZodOptional<z.ZodString>;
5
+ maxPrice: z.ZodEffects<z.ZodString, number, string>;
6
+ minBedrooms: z.ZodEffects<z.ZodString, number, string>;
7
7
  furnishedOnly: z.ZodOptional<z.ZodBoolean>;
8
8
  propertyType: z.ZodOptional<z.ZodArray<z.ZodEnum<["house", "apartment", "studio", "shared-room"]>, "many">>;
9
9
  notificationsEnabled: z.ZodDefault<z.ZodBoolean>;
10
- frequency: z.ZodEnum<["5", "15", "60", "180", "360", "1440"]>;
10
+ frequency: z.ZodEffects<z.ZodEnum<["5", "15", "60", "180", "360", "1440"]>, number, "5" | "15" | "60" | "180" | "360" | "1440">;
11
11
  email: z.ZodString;
12
12
  lastNotified: z.ZodOptional<z.ZodString>;
13
13
  }, "strip", z.ZodTypeAny, {
14
14
  id: string;
15
+ maxPrice: number;
16
+ minBedrooms: number;
15
17
  notificationsEnabled: boolean;
16
- frequency: "5" | "15" | "60" | "180" | "360" | "1440";
18
+ frequency: number;
17
19
  email: string;
18
- location?: string | undefined;
19
- maxPrice?: number | undefined;
20
- minBedrooms?: number | undefined;
20
+ city?: string | undefined;
21
21
  furnishedOnly?: boolean | undefined;
22
22
  propertyType?: ("house" | "apartment" | "studio" | "shared-room")[] | undefined;
23
23
  lastNotified?: string | undefined;
24
24
  }, {
25
25
  id: string;
26
+ maxPrice: string;
27
+ minBedrooms: string;
26
28
  frequency: "5" | "15" | "60" | "180" | "360" | "1440";
27
29
  email: string;
28
- location?: string | undefined;
29
- maxPrice?: number | undefined;
30
- minBedrooms?: number | undefined;
30
+ city?: string | undefined;
31
31
  furnishedOnly?: boolean | undefined;
32
32
  propertyType?: ("house" | "apartment" | "studio" | "shared-room")[] | undefined;
33
33
  notificationsEnabled?: boolean | undefined;
@@ -37,43 +37,43 @@ export type User = z.infer<typeof UserSchema>;
37
37
  export declare const HouseSchema: z.ZodObject<{
38
38
  id: z.ZodString;
39
39
  city: z.ZodString;
40
- price: z.ZodNumber;
40
+ price: z.ZodEffects<z.ZodString, number, string>;
41
41
  availabilityDate: z.ZodOptional<z.ZodString>;
42
42
  propertyType: z.ZodEnum<["house", "apartment", "studio", "shared-room"]>;
43
- bedrooms: z.ZodOptional<z.ZodNumber>;
44
- roommates: z.ZodOptional<z.ZodNumber>;
43
+ bedrooms: z.ZodEffects<z.ZodString, number, string>;
44
+ roommates: z.ZodEffects<z.ZodString, number, string>;
45
45
  gender: z.ZodOptional<z.ZodEnum<["m", "f", "any"]>>;
46
46
  propertyGender: z.ZodOptional<z.ZodEnum<["m", "f", "mixed"]>>;
47
- bathrooms: z.ZodOptional<z.ZodNumber>;
47
+ bathrooms: z.ZodEffects<z.ZodString, number, string>;
48
48
  furnished: z.ZodOptional<z.ZodBoolean>;
49
49
  image: z.ZodOptional<z.ZodString>;
50
50
  createdAt: z.ZodString;
51
51
  }, "strip", z.ZodTypeAny, {
52
52
  id: string;
53
- propertyType: "house" | "apartment" | "studio" | "shared-room";
54
53
  city: string;
54
+ propertyType: "house" | "apartment" | "studio" | "shared-room";
55
55
  price: number;
56
+ bedrooms: number;
57
+ roommates: number;
58
+ bathrooms: number;
56
59
  createdAt: string;
57
60
  availabilityDate?: string | undefined;
58
- bedrooms?: number | undefined;
59
- roommates?: number | undefined;
60
61
  gender?: "m" | "f" | "any" | undefined;
61
62
  propertyGender?: "m" | "f" | "mixed" | undefined;
62
- bathrooms?: number | undefined;
63
63
  furnished?: boolean | undefined;
64
64
  image?: string | undefined;
65
65
  }, {
66
66
  id: string;
67
- propertyType: "house" | "apartment" | "studio" | "shared-room";
68
67
  city: string;
69
- price: number;
68
+ propertyType: "house" | "apartment" | "studio" | "shared-room";
69
+ price: string;
70
+ bedrooms: string;
71
+ roommates: string;
72
+ bathrooms: string;
70
73
  createdAt: string;
71
74
  availabilityDate?: string | undefined;
72
- bedrooms?: number | undefined;
73
- roommates?: number | undefined;
74
75
  gender?: "m" | "f" | "any" | undefined;
75
76
  propertyGender?: "m" | "f" | "mixed" | undefined;
76
- bathrooms?: number | undefined;
77
77
  furnished?: boolean | undefined;
78
78
  image?: string | undefined;
79
79
  }>;
package/dist/index.js CHANGED
@@ -1,28 +1,28 @@
1
1
  import { z } from 'zod';
2
2
  export const UserSchema = z.object({
3
3
  id: z.string(),
4
- location: z.string().optional(),
5
- maxPrice: z.number().min(0).optional(),
6
- minBedrooms: z.number().min(0).optional(),
4
+ city: z.string().optional(),
5
+ maxPrice: z.string().regex(/^\d+$/).transform(Number),
6
+ minBedrooms: z.string().regex(/^\d+$/).transform(Number),
7
7
  furnishedOnly: z.boolean().optional(),
8
- propertyType: z.array(z.enum(["house", "apartment", "studio", "shared-room"])).optional(),
8
+ propertyType: z.array(z.enum(['house', 'apartment', 'studio', 'shared-room'])).optional(),
9
9
  notificationsEnabled: z.boolean().default(true),
10
- frequency: z.enum(["5", "15", "60", "180", "360", "1440"]),
10
+ frequency: z.enum(['5', '15', '60', '180', '360', '1440']).transform(Number),
11
11
  email: z.string().email(),
12
- lastNotified: z.string().datetime().optional()
12
+ lastNotified: z.string().datetime().optional(),
13
13
  });
14
14
  export const HouseSchema = z.object({
15
15
  id: z.string(),
16
16
  city: z.string(),
17
- price: z.number().min(0),
17
+ price: z.string().regex(/^\d+$/).transform(Number),
18
18
  availabilityDate: z.string().datetime().optional(),
19
- propertyType: z.enum(["house", "apartment", "studio", "shared-room"]),
20
- bedrooms: z.number().min(0).optional(),
21
- roommates: z.number().min(0).optional(),
19
+ propertyType: z.enum(['house', 'apartment', 'studio', 'shared-room']),
20
+ bedrooms: z.string().regex(/^\d+$/).transform(Number),
21
+ roommates: z.string().regex(/^\d+$/).transform(Number),
22
22
  gender: z.enum(['m', 'f', 'any']).optional(),
23
23
  propertyGender: z.enum(['m', 'f', 'mixed']).optional(),
24
- bathrooms: z.number().min(0).optional(),
24
+ bathrooms: z.string().regex(/^\d+$/).transform(Number),
25
25
  furnished: z.boolean().optional(),
26
26
  image: z.string().optional(),
27
- createdAt: z.string().datetime()
27
+ createdAt: z.string().datetime(),
28
28
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "house-types",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,7 +8,8 @@
8
8
  "dist"
9
9
  ],
10
10
  "scripts": {
11
- "build": "tsc"
11
+ "build": "tsc",
12
+ "release": "npm run build && npm publish"
12
13
  },
13
14
  "author": "",
14
15
  "license": "ISC",