feat(WEB-127): add trpc to handle requests both serverside and clientside
This commit is contained in:
27
server/routers/user/output.ts
Normal file
27
server/routers/user/output.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { z } from "zod"
|
||||
|
||||
/**
|
||||
* Return value from jsonplaceholder.com/users/1
|
||||
* Add proper user object expectation when fetching
|
||||
* from Scandic API
|
||||
*/
|
||||
export const getUserSchema = z.object({
|
||||
address: z.object({
|
||||
city: z.string(),
|
||||
geo: z.object({}),
|
||||
street: z.string(),
|
||||
suite: z.string(),
|
||||
zipcode: z.string(),
|
||||
}),
|
||||
company: z.object({
|
||||
bs: z.string(),
|
||||
catchPhrase: z.string(),
|
||||
name: z.string(),
|
||||
}),
|
||||
email: z.string().email(),
|
||||
id: z.number(),
|
||||
name: z.string(),
|
||||
phone: z.string(),
|
||||
username: z.string(),
|
||||
website: z.string(),
|
||||
})
|
||||
Reference in New Issue
Block a user