chopme-frontend-common 1.0.60 → 1.0.62
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/build/dto/create-restaurant.dto.d.ts +2 -2
- package/build/dto/create-restaurant.dto.js +9 -3
- package/build/dto/index.d.ts +1 -0
- package/build/dto/index.js +1 -0
- package/build/dto/restaurant-wallet.dto.d.ts +16 -0
- package/build/dto/restaurant-wallet.dto.js +16 -0
- package/build/dto/update-restaurant.dto.d.ts +2 -2
- package/build/dto/update-restaurant.dto.js +9 -3
- package/package.json +1 -1
|
@@ -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
|
-
.
|
|
39
|
-
.
|
|
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,
|
package/build/dto/index.d.ts
CHANGED
package/build/dto/index.js
CHANGED
|
@@ -28,3 +28,4 @@ __exportStar(require("./create-rating.dto"), exports);
|
|
|
28
28
|
__exportStar(require("./update-user-profile.dto"), exports);
|
|
29
29
|
__exportStar(require("./update-password.dto"), exports);
|
|
30
30
|
__exportStar(require("./update-client-information.dto"), exports);
|
|
31
|
+
__exportStar(require("./restaurant-wallet.dto"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { EnumNetwork } from "../enums/networks";
|
|
3
|
+
import { EnumWalletTypes } from "../enums/wallet-types";
|
|
4
|
+
export declare const mobileWalletDataInputSchema: z.ZodObject<{
|
|
5
|
+
network: z.ZodEnum<typeof EnumNetwork>;
|
|
6
|
+
number: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export declare const addRestaurantWalletSchema: z.ZodObject<{
|
|
9
|
+
type: z.ZodEnum<typeof EnumWalletTypes>;
|
|
10
|
+
mobileData: z.ZodOptional<z.ZodObject<{
|
|
11
|
+
network: z.ZodEnum<typeof EnumNetwork>;
|
|
12
|
+
number: z.ZodString;
|
|
13
|
+
}, z.core.$strip>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type MobileWalletDataInputDto = z.infer<typeof mobileWalletDataInputSchema>;
|
|
16
|
+
export type AddRestaurantWalletDto = z.infer<typeof addRestaurantWalletSchema>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addRestaurantWalletSchema = exports.mobileWalletDataInputSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const networks_1 = require("../enums/networks");
|
|
6
|
+
const wallet_types_1 = require("../enums/wallet-types");
|
|
7
|
+
exports.mobileWalletDataInputSchema = zod_1.z.object({
|
|
8
|
+
network: zod_1.z.nativeEnum(networks_1.EnumNetwork),
|
|
9
|
+
number: zod_1.z
|
|
10
|
+
.string()
|
|
11
|
+
.regex(/^\+2376\d{8}$/, "Phone number must be a valid Cameroonian number in the format +237620487789"),
|
|
12
|
+
});
|
|
13
|
+
exports.addRestaurantWalletSchema = zod_1.z.object({
|
|
14
|
+
type: zod_1.z.nativeEnum(wallet_types_1.EnumWalletTypes),
|
|
15
|
+
mobileData: exports.mobileWalletDataInputSchema.optional(),
|
|
16
|
+
});
|
|
@@ -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
|
-
.
|
|
12
|
-
.
|
|
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(),
|