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.
@@ -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";
@@ -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,5 @@
1
+ import { z } from "zod";
2
+ export declare const updateClientInformationSchema: z.ZodObject<{
3
+ phoneNumber: z.ZodOptional<z.ZodString>;
4
+ }, z.core.$strip>;
5
+ export type UpdateClientInformationDto = z.infer<typeof updateClientInformationSchema>;
@@ -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,7 @@
1
+ import { z } from "zod";
2
+ export declare const updatePasswordSchema: z.ZodObject<{
3
+ oldPassword: z.ZodString;
4
+ newPassword: z.ZodString;
5
+ confirmPassword: z.ZodString;
6
+ }, z.core.$strip>;
7
+ export type UpdatePasswordDto = z.infer<typeof updatePasswordSchema>;
@@ -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
+ });
@@ -0,0 +1,5 @@
1
+ import { z } from "zod";
2
+ export declare const updateUserProfileSchema: z.ZodObject<{
3
+ fullName: z.ZodOptional<z.ZodString>;
4
+ }, z.core.$strip>;
5
+ export type UpdateUserProfileDto = z.infer<typeof updateUserProfileSchema>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateUserProfileSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.updateUserProfileSchema = zod_1.z.object({
6
+ fullName: zod_1.z.string().optional(),
7
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chopme-frontend-common",
3
- "version": "1.0.46",
3
+ "version": "1.0.48",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",