feat: Implement a new API routing system by adding dedicated route files for users, transactions, assets, items, quests, and other game entities, and integrating them into the server.
All checks were successful
Deploy to Production / test (push) Successful in 44s
All checks were successful
Deploy to Production / test (push) Successful in 44s
This commit is contained in:
23
shared/modules/quest/quest.types.ts
Normal file
23
shared/modules/quest/quest.types.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const CreateQuestSchema = z.object({
|
||||
name: z.string().min(1),
|
||||
description: z.string().optional(),
|
||||
triggerEvent: z.string().min(1),
|
||||
target: z.coerce.number().min(1),
|
||||
xpReward: z.coerce.number().min(0),
|
||||
balanceReward: z.coerce.number().min(0),
|
||||
});
|
||||
|
||||
export type CreateQuestInput = z.infer<typeof CreateQuestSchema>;
|
||||
|
||||
export const UpdateQuestSchema = z.object({
|
||||
name: z.string().min(1).optional(),
|
||||
description: z.string().optional(),
|
||||
triggerEvent: z.string().min(1).optional(),
|
||||
target: z.coerce.number().min(1).optional(),
|
||||
xpReward: z.coerce.number().min(0).optional(),
|
||||
balanceReward: z.coerce.number().min(0).optional(),
|
||||
});
|
||||
|
||||
export type UpdateQuestInput = z.infer<typeof UpdateQuestSchema>;
|
||||
Reference in New Issue
Block a user