chopme-frontend-common 1.0.44 → 1.0.47

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,6 @@
1
+ import { z } from "zod";
2
+ export declare const updatePasswordSchema: z.ZodObject<{
3
+ oldPassword: z.ZodString;
4
+ newPassword: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export type UpdatePasswordDto = z.infer<typeof updatePasswordSchema>;
@@ -0,0 +1,11 @@
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.object({
6
+ oldPassword: zod_1.z.string(),
7
+ newPassword: zod_1.z
8
+ .string()
9
+ .min(8, "Password must be at least 8 characters long")
10
+ .regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\w\s]).+$/, "Password must contain uppercase, lowercase, number and special character"),
11
+ });
@@ -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
+ });
@@ -1,9 +1,11 @@
1
+ import { EnumAuthType } from "../enums/auth-types";
1
2
  import { EnumUserRole } from "../enums/user-roles";
2
3
  export interface IUserEntity {
3
4
  id: string;
4
5
  fullName: string;
5
6
  email: string;
6
7
  role: EnumUserRole;
8
+ authType: EnumAuthType;
7
9
  createdAt: Date;
8
10
  updatedAt?: Date;
9
11
  deletedAt?: Date | null;
@@ -0,0 +1,4 @@
1
+ export declare enum EnumAuthType {
2
+ EMAIL_PASSWORD = "EMAIL_PASSWORD",
3
+ GOOGLE = "GOOGLE"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EnumAuthType = void 0;
4
+ var EnumAuthType;
5
+ (function (EnumAuthType) {
6
+ EnumAuthType["EMAIL_PASSWORD"] = "EMAIL_PASSWORD";
7
+ EnumAuthType["GOOGLE"] = "GOOGLE";
8
+ })(EnumAuthType || (exports.EnumAuthType = EnumAuthType = {}));
@@ -10,3 +10,4 @@ export * from "./user-roles";
10
10
  export * from "./wallet-types";
11
11
  export * from "./networks";
12
12
  export * from "./web-socket-events";
13
+ export * from "./auth-types";
@@ -26,3 +26,4 @@ __exportStar(require("./user-roles"), exports);
26
26
  __exportStar(require("./wallet-types"), exports);
27
27
  __exportStar(require("./networks"), exports);
28
28
  __exportStar(require("./web-socket-events"), exports);
29
+ __exportStar(require("./auth-types"), exports);
@@ -1,5 +1,3 @@
1
1
  export declare enum EnumWebSocketEventType {
2
- ORDER_CREATED = "order_created",
3
- ORDER_STATUS_CHANGED = "order_status_changed",
4
- ORDER_CANCELLED = "order_cancelled"
2
+ ORDER_STATUS_CHANGED = "order_status_changed"
5
3
  }
@@ -3,7 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EnumWebSocketEventType = void 0;
4
4
  var EnumWebSocketEventType;
5
5
  (function (EnumWebSocketEventType) {
6
- EnumWebSocketEventType["ORDER_CREATED"] = "order_created";
7
6
  EnumWebSocketEventType["ORDER_STATUS_CHANGED"] = "order_status_changed";
8
- EnumWebSocketEventType["ORDER_CANCELLED"] = "order_cancelled";
9
7
  })(EnumWebSocketEventType || (exports.EnumWebSocketEventType = EnumWebSocketEventType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chopme-frontend-common",
3
- "version": "1.0.44",
3
+ "version": "1.0.47",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",