code: function selectProducts (types, lists) {
    return types.reduce(function (ids, type) {
      if (!lists[type]) {
        return Promise.reject(new Error('Invalid type selected: "' + type + '"'));
      }
      ids.push.apply(ids, lists[type].map(function (app) {
        return app.appid || app.packageid; // product.id
      }));
      return ids;
    }, []);
  }
docs: [filterTypes description]
  
  @param  {[type]} types [description]
  @param  {[type]} lists [description]
  @return {[type]}       [description]