+# TODO: client api -- get rid of any reference to consistency and objectify
+
+
+
 winston = require('winston')
 winston.remove(winston.transports.Console)
 winston.add(winston.transports.Console, {level: 'debug', timestamp:true, colorize:true})

            group      : required  # see PROJECT_GROUPS above
            cb         : required  # cb(err)

    remove_user_from_project: (opts) =>
        opts = defaults opts,
            project_id : required

        if opts.start? or opts.end?
            query = query.between(opts.start, opts.end, {index:'timestamp'})
        query.run(opts.cb)

    #############
    # Projects
    ############
    # TODO-CLIENT: api change -- we now generate and return the project_id, rather than passing it in; this is the same as create_account. also, removed public option, since there is no such thing as a public project.
    create_project: (opts) =>
        opts = defaults opts,
            account_id  : required  # owner
            title       : undefined
            description : undefined
            cb          : required    # cb(err, project_id)
        project =
            title       : opts.title
            description : opts.description
            created     : new Date()
            last_edited : new Date()
            owner       : [opts.account_id]
        @db.table('projects').insert(project).run (err, x) =>
            if err
                opts.cb(err)
            else
                opts.cb(undefined, x.id)


    get_project_data: (opts) =>
        opts = defaults opts,
            project_id  : required
            columns     : PROJECT_COLUMNS
            cb          : required
        @db.table('projects').get(opts.project_id).pluck(opts.columns...).run(opts.cb)

    # TODO: api change -- now it's a map path--> description rather than a
    # list of {path:?, description:?}
    get_public_paths: (opts) =>
        opts = defaults opts,
            project_id  : required
            cb          : required
        @db.table('projects').get(opts.project_id).pluck('public_paths').run (err, x) =>
            opts.cb(err, x?.public_paths)   # map {path:description}

    publish_path: (opts) =>
        opts = defaults opts,
