# Copyright 2009 Canonical Ltd.
#
# This file is part of desktopcouch-contacts.
#
#  desktopcouch is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# as published by the Free Software Foundation.
#
# desktopcouch is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with desktopcouch.  If not, see <http://www.gnu.org/licenses/>.

Schema

The proposed CouchDB contact schema is as follows:

Core fields

    * record_type 'http://www.freedesktop.org/wiki/Specifications/desktopcouch/contact'
    * first_name (string)
    * last_name (string)
    * birth_date (string, "YYYY-MM-DD")
    * addresses (MergeableList of "address" dictionaries)
          o city (string)
          o address1 (string)
          o address2 (string)
          o pobox (string)
          o state (string)
          o country (string)
          o postalcode (string)
          o description (string, e.g., "Home")
    * email_addresses (MergeableList of "emailaddress" dictionaries)
          o address (string),
          o description (string)
    * phone_numbers (MergeableList of "phone number" dictionaries)
          o number (string)
          o description (string)
    * application_annotations Everything else, organized per application.

Note: None of the core fields are mandatory, but applications should
not add any other fields at the top level of the record. Any fields
needed not defined here should be put under application_annotations in
the namespace of the application there. So for Ubuntu One:

    "application_annotations": {
        "Ubuntu One": {<Ubuntu One specific fields here>}}
