Cozy Contacts doctype¶
io.cozy.contacts¶
The io.cozy.contacts doctype is loosely based on the vCard RFC, in that some of the attributes have been renamed for clarity. The attributes with a ? are optional.
indexes: {object} Used to sort contacts in different waysbyFamilyNameGivenNameEmailCozyUrl: {string}displayName: {string} Displayed name in cozy applicationsfullname?: {string} Unstructured representation of the name (example:"Dr. Gregory House, M.D.")name?: {object} Optional structured representation of the name, with the following possible attributes:familyName?: {string} (example:"House")givenName?: {string} (example:"Gregory")additionalName?: {string} (example:"J.")namePrefix?: {string} (example:"Dr.")nameSuffix?: {string} (example:"III")birthday?: {date} (example:"1959-05-15")note?: {string}email?: {array} An array of email addresses objects with the following attributes:address: {string} Email addresstype?: {string} Programmatic type of email ("work","home","other")label?: {string} A user-provided localized type of email (example:"Work")primary?: {boolean} Indicates a preferred-use addressaddress?: {array} An array of postal addresses objects with the following attributes:street?: {string}pobox?: {string}city?: {string}region?: {string}postcode?: {string}country?: {string}type?: {string} Programmatic type of address ("work","home","other")primary?: {boolean} Indicates a preferred-use addresslabel?: {string}formattedAddress?: {string} Unstructured version of the addressphone?: {array} An array of phone number objects with the following attributes:number: {string}type?: {string} Programmatic type of phone number ("work","home","mobile","fax","other")label?: {string} A user-provided localized type of phone number (example:"Work")primary?: {boolean} Indicates a preferred-use numbercozy?: {array} An array of cozy instances with the following attributes:url: {string}label?: {string} A user-provided localized type of instanceprimary?: {boolean} Indicates a preferred-use instancecompany: {string} CompanyjobTitle: {string} Job titlerelationships: {object} links between documentsgroups: {object} groups the contact belongs todata: {array} list of groups_id: {string} id of the io.cozy.contacts.groups document_type: {string} doctype “io.cozy.contacts.groups”
accounts: {object}data: {array} list of accounts_id: {string} id of the io.cozy.contacts.accounts document_type: {string} doctype “io.cozy.contacts.accounts”
trashed?: {boolean} istrueif the contact is marked for removal and will be deleted soon (e.g. after remote deletion is confirmed)me: {boolean} whether the contact matches the cozy owner (defaults tofalse)nationalities?: {array} 2-letter iso3166 country codes (can be set in io.cozy.identities for legal reasons in Banks)birthcity?: {string} City of birth of a contact (can be set in io.cozy.identities for legal reasons in Banks)birthcountry?: {string} Country of birth of a contact (can be set in io.cozy.identities for legal reasons in Banks)metadata: {object} previous metadata information.cozy: {boolean} whether the contact has been created by cozygoogle: {object} Google metadataversion: {integer} used for migrations. Current version is 1cozyMetaData: {object}- …
cozyMetadata: Document metadata sync: {object}ded4265b38c54b0683408c76d9ebd: {object} id of the sourceContactsAccountkonnector: {string} example :"google"lastSync: {date} (example:"2018-10-19T10:58:37.025688+02:00") Last time a sync task updated this contactcontactsAccountsId: {string} id of the io.cozy.contacts.accounts objectid: {string} id of the remote objectremoteRev: {string} latest rev of the remote object
io.cozy.contacts.groups¶
Used to group contacts together. A group can obviously have multiple contacts, but contacts can also be part of multiple groups.
name: {string} is the group’s public nametrashed?: {boolean} istrueif the group is marked for removal and will be deleted soonmetadata: {object}version: {integer} Used for migrations. Current version is 1-
relationships: {object} links between documents -
accounts: {object}data: {array} list of accounts_id: {string} id of the io.cozy.contacts.accounts document_type: {string} doctype “io.cozy.contacts.accounts”
-
cozyMetaData: {object} -
…
cozyMetadata: Document metadata -
sync: {object}-
ded4265b38c54b0683408c76d9ebd: {object} id of the io.cozy.contacts.accounts object -
konnector: {string} example :"google" lastSync: {date} (example:"2018-10-19T10:58:37.025688+02:00")contactsAccountsId: {string} id of the io.cozy.contacts.accounts objectid: {string} id of the remote objectremoteRev: {string} latest rev of the remote object
-
io.cozy.contacts.accounts¶
Used to know which accounts (Google, Apple, etc) a contact is related to.
id: {id} id of the io.cozy.contacts.account objectname: {string} name of the account (example:"toto@gmail.com")type: {string} konnector type (example:"konnector-google")canLinkContacts: {boolean} whether contacts can be linked or unlinked to this sourceshouldSyncOrphan: {boolean} whether we should sync orphans with this account or notsourceAccount: {string} id of the related io.cozy.accountslastSync: {date} last remote sync (example:"2018-10-19T10:58:37.025688+02:00")lastLocalSync: {date} last local sync (example:"2018-10-19T10:58:37.025688+02:00")syncToken: {string} used to only retrieve what have been edited since last sync (See request sync token)version: {integer}