futbol-in-core 1.0.19 → 1.0.20

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.
@@ -0,0 +1,6 @@
1
+ import { z } from "zod";
2
+ export declare const loginSchema: z.ZodObject<{
3
+ email: z.ZodEmail;
4
+ password: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export type LoginBody = z.infer<typeof loginSchema>;
@@ -0,0 +1,7 @@
1
+ import { z } from "zod";
2
+ export const loginSchema = z.object({
3
+ email: z.email("Email inválido"),
4
+ password: z
5
+ .string("El campo 'contraseña' es requerido.")
6
+ .min(6, "La contraseña debe tener al menos 6 caracteres"),
7
+ });
@@ -0,0 +1,3 @@
1
+ export * from './auth/login.validation.js';
2
+ export * from './ranking/getRanking.validation.js';
3
+ export * from './user/getFullUser.validation.js';
@@ -0,0 +1,3 @@
1
+ export * from './auth/login.validation.js';
2
+ export * from './ranking/getRanking.validation.js';
3
+ export * from './user/getFullUser.validation.js';
@@ -0,0 +1,5 @@
1
+ import { z } from "zod";
2
+ export declare const rankingQuerySchema: z.ZodObject<{
3
+ limit: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
4
+ }, z.core.$strip>;
5
+ export type RankingQuery = z.infer<typeof rankingQuerySchema>;
@@ -0,0 +1,8 @@
1
+ import { z } from "zod";
2
+ export const rankingQuerySchema = z.object({
3
+ limit: z
4
+ .string()
5
+ .transform((v) => Number(v))
6
+ .refine((n) => !Number.isNaN(n) && n > 0, "limit debe ser un número > 0")
7
+ .optional(),
8
+ });
@@ -0,0 +1,5 @@
1
+ import { z } from "zod";
2
+ export declare const getFullUserQuerySchema: z.ZodObject<{
3
+ userId: z.ZodString;
4
+ }, z.core.$strip>;
5
+ export type GetFullUserQuery = z.infer<typeof getFullUserQuerySchema>;
@@ -0,0 +1,4 @@
1
+ import { z } from "zod";
2
+ export const getFullUserQuerySchema = z.object({
3
+ userId: z.string().min(1, "userId es obligatorio")
4
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "futbol-in-core",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -32,6 +32,10 @@
32
32
  "./helpers": {
33
33
  "import": "./dist/helpers/index.js",
34
34
  "types": "./dist/helpers/index.d.ts"
35
+ },
36
+ "./schemas": {
37
+ "import": "./dist/schemas/index.js",
38
+ "types": "./dist/schemas/index.d.ts"
35
39
  }
36
40
  },
37
41
  "typesVersions": {
@@ -47,6 +51,9 @@
47
51
  ],
48
52
  "helpers": [
49
53
  "dist/helpers/*"
54
+ ],
55
+ "schemas": [
56
+ "dist/schemas/*"
50
57
  ]
51
58
  }
52
59
  },
@@ -60,6 +67,7 @@
60
67
  "license": "ISC",
61
68
  "devDependencies": {
62
69
  "mongoose": "^8.16.3",
63
- "typescript": "^5.8.3"
70
+ "typescript": "^5.8.3",
71
+ "zod": "^4.0.5"
64
72
  }
65
73
  }