Files
web/server/routers/user/output.ts

28 lines
579 B
TypeScript

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(),
})