0f7af70b90
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.
34 lines
865 B
JavaScript
34 lines
865 B
JavaScript
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,
|
|
};
|