feat(WEB-169): get profile data from API
This commit is contained in:
@@ -1,27 +1,24 @@
|
||||
import { countriesMap } from "@/components/TempDesignSystem/Form/Country/countries"
|
||||
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(),
|
||||
city: z.string().optional(),
|
||||
country: z.nativeEnum(countriesMap),
|
||||
streetAddress: z.string().optional(),
|
||||
zipCode: z.string(),
|
||||
}),
|
||||
email: z.string().email(),
|
||||
id: z.number(),
|
||||
gender: z.string(),
|
||||
name: z.string(),
|
||||
phone: z.string(),
|
||||
username: z.string(),
|
||||
website: z.string(),
|
||||
language: z.string(),
|
||||
lastName: z.string(),
|
||||
membership: z.object({
|
||||
currentPoints: z.number(),
|
||||
expirationDate: z.string(),
|
||||
membershipNumber: z.string(),
|
||||
memberSince: z.string(),
|
||||
}),
|
||||
phoneNumber: z.string(),
|
||||
profileId: z.string(),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user