mirror of
https://github.com/vercel/commerce.git
synced 2025-05-16 14:36:59 +00:00
normalize customer
This commit is contained in:
parent
456568e942
commit
f92d823d1e
8
packages/sylius/src/types/customer.ts
Normal file
8
packages/sylius/src/types/customer.ts
Normal file
@ -0,0 +1,8 @@
|
||||
export interface SyliusCustomer {
|
||||
id: number
|
||||
email: string
|
||||
firstName: string
|
||||
lastName: string
|
||||
gender: string
|
||||
fullName: string
|
||||
}
|
10
packages/sylius/src/utils/normalize/normalize-customer.ts
Normal file
10
packages/sylius/src/utils/normalize/normalize-customer.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { Customer } from '@vercel/commerce/types/customer'
|
||||
import { SyliusCustomer } from '../../types/customer'
|
||||
|
||||
export const normalizeCustomer = (syliusCustomer: SyliusCustomer): Customer => {
|
||||
return {
|
||||
firstName: syliusCustomer.firstName,
|
||||
lastName: syliusCustomer.lastName,
|
||||
email: syliusCustomer.email,
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user