♻️ refactor(account, order, plan, profile, support, email): restructure application modules and enhance error handling
Updated Docker configuration, refactored middleware for improved error handling, and restructured account, order, plan, profile, and support modules, including their routes, services, and validations. Enhanced email processing queues and utilities for token generation, pagination, and response management to streamline the application architecture and enhance maintainability.
This commit is contained in:
+33
@@ -0,0 +1,33 @@
|
||||
import { z } from "zod";
|
||||
const create_plan = z.object({
|
||||
planName: z.string("Enter the plan name..."),
|
||||
price: z.number("Enter the plan price..."),
|
||||
planType: z.enum(["FREE", "STANDARD", "PRO"]),
|
||||
planDesc: z.string("Enter the plan description..."),
|
||||
planFeatures: z.union([
|
||||
z.string(),
|
||||
z.number(),
|
||||
z.boolean(),
|
||||
z.null(),
|
||||
z.array(z.any()),
|
||||
z.record(z.string(), z.any())
|
||||
])
|
||||
});
|
||||
const update_plan = z.object({
|
||||
planName: z.string(),
|
||||
price: z.number(),
|
||||
planType: z.enum(["FREE", "STANDARD", "PRO"]),
|
||||
planDesc: z.string().optional(),
|
||||
planFeatures: z.union([
|
||||
z.string(),
|
||||
z.number(),
|
||||
z.boolean(),
|
||||
z.null(),
|
||||
z.array(z.any()),
|
||||
z.record(z.string(), z.any())
|
||||
])
|
||||
});
|
||||
export const plan_validations = {
|
||||
create_plan,
|
||||
update_plan,
|
||||
};
|
||||
Reference in New Issue
Block a user