feat: add recurring bookings feature with related handlers and services
- Introduced recurring booking groups with the ability to create and cancel them. - Added database migrations for recurring bookings, including new tables and relationships. - Implemented handlers for creating and canceling recurring bookings in the admin booking module. - Enhanced existing booking services to support recurring bookings logic. - Updated API contract to include new schemas for recurring bookings. - Refactored existing code for improved readability and maintainability.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from 'zod';
|
||||
|
||||
export const userProfileSchema = z.object({
|
||||
id: z.string(),
|
||||
@@ -7,30 +7,30 @@ export const userProfileSchema = z.object({
|
||||
role: z.string(),
|
||||
avatarUrl: z.url().nullable(),
|
||||
createdAt: z.string(),
|
||||
})
|
||||
});
|
||||
|
||||
export type UserProfile = z.infer<typeof userProfileSchema>
|
||||
export type UserProfileResponse = UserProfile
|
||||
export type UserProfile = z.infer<typeof userProfileSchema>;
|
||||
export type UserProfileResponse = UserProfile;
|
||||
|
||||
export const passwordResetStartSchema = z.object({
|
||||
email: z.string().email('Ingresá un email válido.'),
|
||||
})
|
||||
});
|
||||
|
||||
export type PasswordResetStartInput = z.infer<typeof passwordResetStartSchema>
|
||||
export type PasswordResetStartInput = z.infer<typeof passwordResetStartSchema>;
|
||||
|
||||
export const passwordResetVerifySchema = z.object({
|
||||
requestId: z.string().uuid('Request ID inválido.'),
|
||||
otp: z.string().length(6, 'El código debe tener 6 dígitos.'),
|
||||
newPassword: z.string().min(6, 'La contraseña debe tener al menos 6 caracteres.'),
|
||||
})
|
||||
});
|
||||
|
||||
export type PasswordResetVerifyInput = z.infer<typeof passwordResetVerifySchema>
|
||||
export type PasswordResetVerifyInput = z.infer<typeof passwordResetVerifySchema>;
|
||||
|
||||
export const passwordResetResendSchema = z.object({
|
||||
requestId: z.string().uuid('Request ID inválido.'),
|
||||
})
|
||||
});
|
||||
|
||||
export type PasswordResetResendInput = z.infer<typeof passwordResetResendSchema>
|
||||
export type PasswordResetResendInput = z.infer<typeof passwordResetResendSchema>;
|
||||
|
||||
export type PasswordResetStartResponse = {
|
||||
message: string;
|
||||
@@ -38,11 +38,11 @@ export type PasswordResetStartResponse = {
|
||||
email: string;
|
||||
expiresAt: string;
|
||||
cooldownSeconds: number;
|
||||
}
|
||||
};
|
||||
|
||||
export type PasswordResetVerifyResponse = {
|
||||
message: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type PasswordResetResendResponse = {
|
||||
message: string;
|
||||
@@ -50,4 +50,4 @@ export type PasswordResetResendResponse = {
|
||||
email: string;
|
||||
expiresAt: string;
|
||||
cooldownSeconds: number;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user