11import Google from '../Google'
2- import { Contact , ProfilePicture , Media } from '../../../../../types/schemas'
2+ import { Contact } from '../../../../../types/schemas'
33import { MediaType } from '../../../../../types/schemas/Media'
44import withAutoParser from '../../../../../modules/Standardizer/withAutoParser'
55
@@ -11,19 +11,19 @@ Google.prototype.getContacts = withAutoParser(async parser => {
1111 const rawContacts = await parser . parseAsCSV ( CONTACT_FILE_CSV )
1212 const contacts : Contact [ ] = rawContacts . data . map ( ( contact ) : Contact => ( {
1313 displayName : contact ?. Name ,
14- firstName : contact [ 'Given Name' ] ,
15- lastName : contact [ 'Family Name' ] ,
14+ firstName : contact ?. [ 'Given Name' ] ,
15+ lastName : contact ?. [ 'Family Name' ] ,
1616 nickname : contact ?. Nickname ,
1717 gender : contact ?. Gender ,
1818 birthday : contact ?. Birthday ? new Date ( contact . Birthday ) : undefined ,
19- phoneNumbers : contact [ 'Phone 1 - Value' ] ,
20- mails : contact [ 'E-mail 1 - Value' ] ,
19+ phoneNumbers : contact ?. [ 'Phone 1 - Value' ] ,
20+ mails : contact ?. [ 'E-mail 1 - Value' ] ,
2121 profilePicture : {
2222 current : {
2323 url : contact ?. Photo ,
2424 type : MediaType . IMAGE ,
25- } as Media ,
26- } as ProfilePicture ,
25+ } ,
26+ } ,
2727 } ) )
2828 return contacts
2929 }
0 commit comments