mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-21 06:29:29 -05:00
20 lines
507 B
TypeScript
20 lines
507 B
TypeScript
import * as z from "zod";
|
|
|
|
export const SUGGESTION_DESCRIPTION_LIMIT = 500;
|
|
export const SUGGESTION_DESCRIPTION_MIN = 5;
|
|
|
|
const suggestionRootSchema = z.object({
|
|
description: z
|
|
.string()
|
|
.max(SUGGESTION_DESCRIPTION_LIMIT)
|
|
.min(SUGGESTION_DESCRIPTION_MIN),
|
|
});
|
|
|
|
export const suggestionFullSchema = suggestionRootSchema.extend({
|
|
suggestedId: z.number().int(),
|
|
tier: z.number().int().min(1).max(3),
|
|
region: z.enum(["NA", "EU"]),
|
|
});
|
|
|
|
export const resuggestionSchema = suggestionRootSchema;
|