zs-phone-common 1.0.4 → 1.0.6

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.
@@ -6,7 +6,7 @@ export declare const signupSchema: z.ZodObject<{
6
6
  password: z.ZodString;
7
7
  }, z.core.$strip>;
8
8
  export declare const loginSchema: z.ZodObject<{
9
- email: z.ZodString;
9
+ email: z.ZodEmail;
10
10
  password: z.ZodString;
11
11
  }, z.core.$strip>;
12
12
  export declare const forgotPasswordSchema: z.ZodObject<{
@@ -28,6 +28,7 @@ export type SignupSchema = z.infer<typeof signupSchema>;
28
28
  export type LoginSchema = z.infer<typeof loginSchema>;
29
29
  export type ForgotPasswordSchema = z.infer<typeof forgotPasswordSchema>;
30
30
  export type VerifyOtpSchema = z.infer<typeof verifyOtpSchema>;
31
- export type resetPasswordSchema = z.infer<typeof resetPasswordSchema>;
31
+ export type ResetPasswordSchema = z.infer<typeof resetPasswordSchema>;
32
+ export type ResendOtpSchema = z.infer<typeof resendOtpSchema>;
32
33
  export type EmailJobType = typeof EmailJobType[number];
33
34
  export {};
@@ -7,16 +7,16 @@ exports.resendOtpSchema = exports.verifyOtpSchema = exports.resetPasswordSchema
7
7
  const v4_1 = __importDefault(require("zod/v4"));
8
8
  const EmailJobType = ["verification-email", "forgot-password-email"];
9
9
  exports.signupSchema = v4_1.default.object({
10
- name: v4_1.default.string(),
11
- email: v4_1.default.email("Not a valid email"),
10
+ name: v4_1.default.string().min(2, "Name should be at least 2 character").max(30, "Name should not exceed 30 characters"),
11
+ email: v4_1.default.email("Enter a valid email address"),
12
12
  password: v4_1.default.string().min(6, "Password should be greater than 6 characters")
13
13
  });
14
14
  exports.loginSchema = v4_1.default.object({
15
- email: v4_1.default.string("Enter a valid email address."),
16
- password: v4_1.default.string("Password is required.")
15
+ email: v4_1.default.email("Please enter a valid email address"),
16
+ password: v4_1.default.string().min(1, "Password is required")
17
17
  });
18
18
  exports.forgotPasswordSchema = v4_1.default.object({
19
- email: v4_1.default.email("Not a valid email")
19
+ email: v4_1.default.email("Please enter a valid email address")
20
20
  });
21
21
  exports.resetPasswordSchema = v4_1.default.object({
22
22
  password: v4_1.default.string().min(6, "Password should be greater than 6 characters"),
@@ -26,7 +26,7 @@ exports.resetPasswordSchema = v4_1.default.object({
26
26
  path: ["confirmPassword"],
27
27
  });
28
28
  exports.verifyOtpSchema = v4_1.default.object({
29
- otp: v4_1.default.string()
29
+ otp: v4_1.default.string().min(6, "OTP should be exactly of 6 characters").max(6, "OTP should be exactly of 6 characters")
30
30
  });
31
31
  exports.resendOtpSchema = v4_1.default.object({
32
32
  type: v4_1.default.enum(EmailJobType)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zs-phone-common",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "scripts": {