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.
29 lines
815 B
JavaScript
29 lines
815 B
JavaScript
import { z } from "zod";
|
|
const create_support = z.object({
|
|
issueName: z.string().min(1, "issueName is required"),
|
|
description: z.string().min(1, "description is required"),
|
|
type: z.enum([
|
|
"TECHNICAL",
|
|
"BILLING",
|
|
"DOMAIN",
|
|
"TEMPLATE",
|
|
"PAYMENT",
|
|
"ACCOUNT",
|
|
"FEATURE_REQUEST",
|
|
"BUG",
|
|
"OTHER",
|
|
]),
|
|
});
|
|
const update_support = z.object({
|
|
issueName: z.string().optional(),
|
|
description: z.string().optional(),
|
|
type: z.enum(["BUG", "PAYMENT", "ACCOUNT", "OTHER"]).optional(),
|
|
status: z.enum(["OPEN", "IN_PROGRESS", "RESOLVED", "REJECTED"]).optional(),
|
|
resolvedBy: z.string().optional(),
|
|
resolvedAt: z.coerce.date().optional(),
|
|
});
|
|
export const support_validations = {
|
|
create_support,
|
|
update_support,
|
|
};
|