chopme-frontend-common 1.0.60 → 1.0.61

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.
@@ -28,8 +28,8 @@ export declare const createRestaurantSchema: z.ZodObject<{
28
28
  name: z.ZodString;
29
29
  slogan: z.ZodOptional<z.ZodString>;
30
30
  description: z.ZodOptional<z.ZodString>;
31
- phone: z.ZodOptional<z.ZodString>;
32
- restaurantEmail: z.ZodOptional<z.ZodString>;
31
+ phone: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>;
32
+ restaurantEmail: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>;
33
33
  type: z.ZodEnum<typeof EnumRestaurantType>;
34
34
  address: z.ZodObject<{
35
35
  country: z.ZodString;
@@ -35,10 +35,16 @@ exports.createRestaurantSchema = zod_1.z.object({
35
35
  slogan: zod_1.z.string().optional(),
36
36
  description: zod_1.z.string().optional(),
37
37
  phone: zod_1.z
38
- .string()
39
- .regex(/^\+2376\d{8}$/, "Phone number must be a valid Cameroonian number in the format +237620487789")
38
+ .union([
39
+ zod_1.z.literal(""),
40
+ zod_1.z
41
+ .string()
42
+ .regex(/^\+2376\d{8}$/, "Phone number must be a valid Cameroonian number in the format +237620487789"),
43
+ ])
44
+ .optional(),
45
+ restaurantEmail: zod_1.z
46
+ .union([zod_1.z.literal(""), zod_1.z.string().email("Enter a valid email address")])
40
47
  .optional(),
41
- restaurantEmail: zod_1.z.string().optional(),
42
48
  type: zod_1.z.nativeEnum(restaurant_types_1.EnumRestaurantType),
43
49
  address: exports.restaurantAddressSchema,
44
50
  location: exports.restaurantLocationSchema,
@@ -3,8 +3,8 @@ import { EnumRestaurantType } from "../enums/restaurant-types";
3
3
  export declare const updateRestaurantSchema: z.ZodObject<{
4
4
  slogan: z.ZodOptional<z.ZodString>;
5
5
  description: z.ZodOptional<z.ZodString>;
6
- phone: z.ZodOptional<z.ZodString>;
7
- restaurantEmail: z.ZodOptional<z.ZodString>;
6
+ phone: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>;
7
+ restaurantEmail: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>;
8
8
  pictures: z.ZodOptional<z.ZodArray<z.ZodString>>;
9
9
  deliveryPricingKm: z.ZodOptional<z.ZodArray<z.ZodObject<{
10
10
  from: z.ZodNumber;
@@ -8,10 +8,16 @@ exports.updateRestaurantSchema = zod_1.z.object({
8
8
  slogan: zod_1.z.string().optional(),
9
9
  description: zod_1.z.string().optional(),
10
10
  phone: zod_1.z
11
- .string()
12
- .regex(/^\+2376\d{8}$/, "Phone number must be a valid Cameroonian number in the format +237620487789")
11
+ .union([
12
+ zod_1.z.literal(""),
13
+ zod_1.z
14
+ .string()
15
+ .regex(/^\+2376\d{8}$/, "Phone number must be a valid Cameroonian number in the format +237620487789"),
16
+ ])
17
+ .optional(),
18
+ restaurantEmail: zod_1.z
19
+ .union([zod_1.z.literal(""), zod_1.z.string().email("Enter a valid email address")])
13
20
  .optional(),
14
- restaurantEmail: zod_1.z.string().optional(),
15
21
  pictures: zod_1.z.array(zod_1.z.string()).optional(),
16
22
  deliveryPricingKm: zod_1.z.array(create_restaurant_dto_1.deliveryPricingKmSchema).optional(),
17
23
  availability: zod_1.z.array(create_restaurant_dto_1.availabilitySchema).optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chopme-frontend-common",
3
- "version": "1.0.60",
3
+ "version": "1.0.61",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",