vr-commons 1.0.25 → 1.0.27

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.
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- export declare const userLoginSchema: z.ZodObject<{
2
+ export declare const riderLoginSchema: z.ZodObject<{
3
3
  body: z.ZodObject<{
4
4
  phoneNumber: z.ZodString;
5
5
  nationalId: z.ZodString;
@@ -18,15 +18,54 @@ export declare const userLoginSchema: z.ZodObject<{
18
18
  phoneNumber: string;
19
19
  nationalId: string;
20
20
  };
21
- query?: {} | undefined;
22
21
  params?: {} | undefined;
22
+ query?: {} | undefined;
23
23
  headers?: {} | undefined;
24
24
  }, {
25
25
  body: {
26
26
  phoneNumber: string;
27
27
  nationalId: string;
28
28
  };
29
- query?: {} | undefined;
30
29
  params?: {} | undefined;
30
+ query?: {} | undefined;
31
31
  headers?: {} | undefined;
32
32
  }>;
33
+ export declare const passengerLoginSchema: z.ZodObject<{
34
+ body: z.ZodObject<{
35
+ email: z.ZodString;
36
+ password: z.ZodString;
37
+ }, "strip", z.ZodTypeAny, {
38
+ email: string;
39
+ password: string;
40
+ }, {
41
+ email: string;
42
+ password: string;
43
+ }>;
44
+ }, "strip", z.ZodTypeAny, {
45
+ body: {
46
+ email: string;
47
+ password: string;
48
+ };
49
+ }, {
50
+ body: {
51
+ email: string;
52
+ password: string;
53
+ };
54
+ }>;
55
+ export declare const passengerForgotSchema: z.ZodObject<{
56
+ body: z.ZodObject<{
57
+ email: z.ZodString;
58
+ }, "strip", z.ZodTypeAny, {
59
+ email: string;
60
+ }, {
61
+ email: string;
62
+ }>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ body: {
65
+ email: string;
66
+ };
67
+ }, {
68
+ body: {
69
+ email: string;
70
+ };
71
+ }>;
@@ -1,17 +1,28 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.userLoginSchema = void 0;
3
+ exports.passengerForgotSchema = exports.passengerLoginSchema = exports.riderLoginSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- exports.userLoginSchema = zod_1.z.object({
5
+ exports.riderLoginSchema = zod_1.z.object({
6
6
  body: zod_1.z.object({
7
7
  phoneNumber: zod_1.z
8
8
  .string()
9
9
  .trim()
10
10
  .min(10, "Phone number must be at least 10 digits")
11
11
  .max(15, "Phone number must be at most 15 digits"),
12
- nationalId: zod_1.z.string().min(16, "National ID must be atleast 16 digits")
12
+ nationalId: zod_1.z.string().min(16, "National ID must be atleast 16 digits"),
13
13
  }),
14
14
  query: zod_1.z.object({}).optional(),
15
15
  params: zod_1.z.object({}).optional(),
16
- headers: zod_1.z.object({}).optional()
16
+ headers: zod_1.z.object({}).optional(),
17
+ });
18
+ exports.passengerLoginSchema = zod_1.z.object({
19
+ body: zod_1.z.object({
20
+ email: zod_1.z.string().email(),
21
+ password: zod_1.z.string().min(6),
22
+ }),
23
+ });
24
+ exports.passengerForgotSchema = zod_1.z.object({
25
+ body: zod_1.z.object({
26
+ email: zod_1.z.string().email(),
27
+ }),
17
28
  });
@@ -1,3 +1,3 @@
1
1
  export { validate } from "./validate.validations";
2
- export { userLoginSchema } from "./auth.validations";
2
+ export { riderLoginSchema, passengerForgotSchema, passengerLoginSchema, } from "./auth.validations";
3
3
  export { createUserSchema, getUserByIdSchema, updateUserProfileSchema, getAllUsersSchema, viewProfileSchema, passengerSignupSchema, updatePassengerProfileSchema, getRiderProfileSchema, changePasswordSchema, deactivateAccountSchema, deleteAccountSchema, } from "./profiles.validations";
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteAccountSchema = exports.deactivateAccountSchema = exports.changePasswordSchema = exports.getRiderProfileSchema = exports.updatePassengerProfileSchema = exports.passengerSignupSchema = exports.viewProfileSchema = exports.getAllUsersSchema = exports.updateUserProfileSchema = exports.getUserByIdSchema = exports.createUserSchema = exports.userLoginSchema = exports.validate = void 0;
3
+ exports.deleteAccountSchema = exports.deactivateAccountSchema = exports.changePasswordSchema = exports.getRiderProfileSchema = exports.updatePassengerProfileSchema = exports.passengerSignupSchema = exports.viewProfileSchema = exports.getAllUsersSchema = exports.updateUserProfileSchema = exports.getUserByIdSchema = exports.createUserSchema = exports.passengerLoginSchema = exports.passengerForgotSchema = exports.riderLoginSchema = exports.validate = void 0;
4
4
  var validate_validations_1 = require("./validate.validations");
5
5
  Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return validate_validations_1.validate; } });
6
6
  var auth_validations_1 = require("./auth.validations");
7
- Object.defineProperty(exports, "userLoginSchema", { enumerable: true, get: function () { return auth_validations_1.userLoginSchema; } });
7
+ Object.defineProperty(exports, "riderLoginSchema", { enumerable: true, get: function () { return auth_validations_1.riderLoginSchema; } });
8
+ Object.defineProperty(exports, "passengerForgotSchema", { enumerable: true, get: function () { return auth_validations_1.passengerForgotSchema; } });
9
+ Object.defineProperty(exports, "passengerLoginSchema", { enumerable: true, get: function () { return auth_validations_1.passengerLoginSchema; } });
8
10
  var profiles_validations_1 = require("./profiles.validations");
9
11
  // Admin/Super Admin Schemas
10
12
  Object.defineProperty(exports, "createUserSchema", { enumerable: true, get: function () { return profiles_validations_1.createUserSchema; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vr-commons",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "description": "Shared functions package",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,10 +8,20 @@
8
8
  "dist/**/*"
9
9
  ],
10
10
  "exports": {
11
+ "./middlewares": {
12
+ "types": "./dist/middlewares/index.d.ts",
13
+ "require": "./dist/middlewares/index.js",
14
+ "import": "./dist/middlewares/index.js"
15
+ },
11
16
  "./validations": {
12
17
  "types": "./dist/validations/index.d.ts",
13
18
  "require": "./dist/validations/index.js",
14
19
  "import": "./dist/validations/index.js"
20
+ },
21
+ "./utils": {
22
+ "types": "./dist/utils/index.d.ts",
23
+ "require": "./dist/utils/index.js",
24
+ "import": "./dist/utils/index.js"
15
25
  }
16
26
  },
17
27
  "scripts": {