chopme-frontend-common 1.0.46 → 1.0.48
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/index.d.ts +3 -0
- package/build/dto/index.js +3 -0
- package/build/dto/update-client-information.dto.d.ts +5 -0
- package/build/dto/update-client-information.dto.js +10 -0
- package/build/dto/update-password.dto.d.ts +7 -0
- package/build/dto/update-password.dto.js +17 -0
- package/build/dto/update-user-profile.dto.d.ts +5 -0
- package/build/dto/update-user-profile.dto.js +7 -0
- package/package.json +1 -1
package/build/dto/index.d.ts
CHANGED
|
@@ -4,3 +4,6 @@ export * from "./email-password-login.dto";
|
|
|
4
4
|
export * from "./update-address.dto";
|
|
5
5
|
export * from "./find-restaurant.dto";
|
|
6
6
|
export * from "./create-rating.dto";
|
|
7
|
+
export * from "./update-user-profile.dto";
|
|
8
|
+
export * from "./update-password.dto";
|
|
9
|
+
export * from "./update-client-information.dto";
|
package/build/dto/index.js
CHANGED
|
@@ -20,3 +20,6 @@ __exportStar(require("./email-password-login.dto"), exports);
|
|
|
20
20
|
__exportStar(require("./update-address.dto"), exports);
|
|
21
21
|
__exportStar(require("./find-restaurant.dto"), exports);
|
|
22
22
|
__exportStar(require("./create-rating.dto"), exports);
|
|
23
|
+
__exportStar(require("./update-user-profile.dto"), exports);
|
|
24
|
+
__exportStar(require("./update-password.dto"), exports);
|
|
25
|
+
__exportStar(require("./update-client-information.dto"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateClientInformationSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.updateClientInformationSchema = zod_1.z.object({
|
|
6
|
+
phoneNumber: zod_1.z
|
|
7
|
+
.string()
|
|
8
|
+
.regex(/^\+2376\d{8}$/, "Phone number must be a valid Cameroonian number in the format +237620487789")
|
|
9
|
+
.optional(),
|
|
10
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updatePasswordSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.updatePasswordSchema = zod_1.z
|
|
6
|
+
.object({
|
|
7
|
+
oldPassword: zod_1.z.string().min(1, "Current password is required"),
|
|
8
|
+
newPassword: zod_1.z
|
|
9
|
+
.string()
|
|
10
|
+
.min(8, "Password must be at least 8 characters long")
|
|
11
|
+
.regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\w\s]).+$/, "Password must contain uppercase, lowercase, number and special character"),
|
|
12
|
+
confirmPassword: zod_1.z.string().min(1, "Please confirm your new password"),
|
|
13
|
+
})
|
|
14
|
+
.refine((data) => data.newPassword === data.confirmPassword, {
|
|
15
|
+
message: "Passwords do not match",
|
|
16
|
+
path: ["confirmPassword"],
|
|
17
|
+
});
|