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,
|
||
|
|
};
|