futbol-in-core 1.0.23 → 1.0.25

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.
@@ -7,12 +7,14 @@ export const agregarFutbolinSchema = z.object({
7
7
  .string("El campo 'direccion' es requerido.")
8
8
  .nonempty("El campo 'direccion' no puede estar vacío."),
9
9
  coordinates: z
10
- .array(z.number("Se requieren 2 valores en 'coordinates' (lng, lat)."))
11
- .length(2, "Se requieren 2 valores en 'coordinates' (lng, lat)."),
10
+ .array(z.number("Las coordenadas deben ser números"), "El campo coordenadas es obligatorio")
11
+ .length(2, "El campo coordenadas debe tener dos elementos"),
12
12
  googlePlaceId: z
13
13
  .string("El campo 'googlePlaceId' es requerido.")
14
14
  .nonempty("El campo 'googlePlaceId' no puede estar vacío."),
15
- ciudad: z.string().nonempty("El campo 'ciudad' es requerido."),
15
+ ciudad: z
16
+ .string("El campo 'ciudad es requerido.'")
17
+ .nonempty("El campo 'ciudad' no puede estar vacío."),
16
18
  tipoLugar: z
17
19
  .string("El campo 'tipoLugar' es requerido.")
18
20
  .nonempty("El campo 'tipoLugar' no puede estar vacío."),
@@ -0,0 +1,17 @@
1
+ import { z } from "zod";
2
+ export declare const mongoId: z.ZodString;
3
+ export declare const crearIncidenciaSchema: z.ZodObject<{
4
+ spotId: z.ZodString;
5
+ texto: z.ZodDefault<z.ZodOptional<z.ZodString>>;
6
+ }, z.core.$strip>;
7
+ export type CrearIncidencia = z.infer<typeof crearIncidenciaSchema>;
8
+ export declare const incidenciaIdParamsSchema: z.ZodObject<{
9
+ id: z.ZodString;
10
+ }, z.core.$strip>;
11
+ export declare const spotIdParamsSchema: z.ZodObject<{
12
+ spotId: z.ZodString;
13
+ }, z.core.$strip>;
14
+ export declare const resolverIncidenciaSchema: z.ZodObject<{
15
+ resuelto: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
16
+ }, z.core.$strip>;
17
+ export type ResolverIncidencia = z.infer<typeof resolverIncidenciaSchema>;
@@ -0,0 +1,13 @@
1
+ import { z } from "zod";
2
+ export const mongoId = z
3
+ .string()
4
+ .regex(/^[0-9a-fA-F]{24}$/, "ObjectId inválido");
5
+ export const crearIncidenciaSchema = z.object({
6
+ spotId: mongoId,
7
+ texto: z.string().max(1000).optional().default(""),
8
+ });
9
+ export const incidenciaIdParamsSchema = z.object({ id: mongoId });
10
+ export const spotIdParamsSchema = z.object({ spotId: mongoId });
11
+ export const resolverIncidenciaSchema = z.object({
12
+ resuelto: z.boolean().optional().default(true),
13
+ });
@@ -2,3 +2,4 @@ export * from './auth/login.validation.js';
2
2
  export * from './ranking/getRanking.validation.js';
3
3
  export * from './user/getFullUser.validation.js';
4
4
  export * from './futbolines/agregarFutbolin.validation.js';
5
+ export * from './incidencias/incidencias.validation.js';
@@ -2,3 +2,4 @@ export * from './auth/login.validation.js';
2
2
  export * from './ranking/getRanking.validation.js';
3
3
  export * from './user/getFullUser.validation.js';
4
4
  export * from './futbolines/agregarFutbolin.validation.js';
5
+ export * from './incidencias/incidencias.validation.js';
@@ -21,4 +21,6 @@ export interface SpotDTO {
21
21
  up: string[];
22
22
  down: string[];
23
23
  };
24
+ createdAt?: Date;
25
+ updatedAt?: Date;
24
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "futbol-in-core",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",