feat(18-01): add Zod schemas, types, and global items seed data
- Add searchGlobalItemsSchema, linkItemSchema, updateProfileSchema to schemas.ts - Add isPublic field to createSetupSchema and updateSetupSchema - Add GlobalItem, ItemGlobalLink, SearchGlobalItems, LinkItem, UpdateProfile types - Create global-items-seed.json with 18 bikepacking gear items across 7 categories - Format fix in schema.ts (pre-existing biome formatting)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import type { z } from "zod";
|
||||
import type {
|
||||
categories,
|
||||
globalItems,
|
||||
itemGlobalLinks,
|
||||
items,
|
||||
setupItems,
|
||||
setups,
|
||||
@@ -13,13 +15,16 @@ import type {
|
||||
createItemSchema,
|
||||
createSetupSchema,
|
||||
createThreadSchema,
|
||||
linkItemSchema,
|
||||
reorderCandidatesSchema,
|
||||
resolveThreadSchema,
|
||||
searchGlobalItemsSchema,
|
||||
syncSetupItemsSchema,
|
||||
updateCandidateSchema,
|
||||
updateCategorySchema,
|
||||
updateClassificationSchema,
|
||||
updateItemSchema,
|
||||
updateProfileSchema,
|
||||
updateSetupSchema,
|
||||
updateThreadSchema,
|
||||
} from "./schemas.ts";
|
||||
@@ -42,6 +47,11 @@ export type UpdateSetup = z.infer<typeof updateSetupSchema>;
|
||||
export type SyncSetupItems = z.infer<typeof syncSetupItemsSchema>;
|
||||
export type UpdateClassification = z.infer<typeof updateClassificationSchema>;
|
||||
|
||||
// Global item types
|
||||
export type SearchGlobalItems = z.infer<typeof searchGlobalItemsSchema>;
|
||||
export type LinkItem = z.infer<typeof linkItemSchema>;
|
||||
export type UpdateProfile = z.infer<typeof updateProfileSchema>;
|
||||
|
||||
// Types inferred from Drizzle schema
|
||||
export type Item = typeof items.$inferSelect;
|
||||
export type Category = typeof categories.$inferSelect;
|
||||
@@ -49,3 +59,5 @@ export type Thread = typeof threads.$inferSelect;
|
||||
export type ThreadCandidate = typeof threadCandidates.$inferSelect;
|
||||
export type Setup = typeof setups.$inferSelect;
|
||||
export type SetupItem = typeof setupItems.$inferSelect;
|
||||
export type GlobalItem = typeof globalItems.$inferSelect;
|
||||
export type ItemGlobalLink = typeof itemGlobalLinks.$inferSelect;
|
||||
|
||||
Reference in New Issue
Block a user