function WebsitePeople(crisp) {
  /**
   * Find people profile by email
   * @memberof WebsitePeopleProfile
   * @method findByEmail
   * @param {string} websiteId
   * @param {string} email
   * @return Promise
   */
  this.findByEmail = function(websiteId, email) {
    return crisp.get(crisp._prepareRestUrl(
      ["website", websiteId, "people", "profile", email]), {}, {});
  };


  /**
   * Find people profiles by segments
   * @memberof WebsitePeopleProfile
   * @method findBySegments
   * @param {string} websiteId
   * @param {Object} segments
   * @return Promise
   */
  this.findBySegments = function(websiteId, segments) {
    var searchFilter = [];
    var query = {};
    segments.forEach(function(segment) {
      var searchCriteria = {"model":"people","criterion":"segments","operator":"eq","query":[segment]};
      searchFilter.push(searchCriteria);
    });

    query = {
      search_filter: JSON.stringify(searchFilter),
      search_operator: "and"
    };

    return crisp.get(crisp._prepareRestUrl(
      ["website", websiteId, "people", "profiles"]), query, {});
  };

  /**
   * Create an new profile
   * @memberof WebsitePeople
   * @method post
   * @param {string} websiteId
   * @param {object} params
   * @return Promise
   */
  this.createNewPeopleProfile = function(websiteId, params) {
    return crisp.post(crisp._prepareRestUrl(["website", websiteId, "people", "profile"]), {}, params);
  };

  /**
   * Check if a profile exists
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @return Promise
   */
  this.checkPeopleProfileExists = function(websiteId, peopleId) {
    return crisp.head(crisp._prepareRestUrl(["website", websiteId, "people", "profile", peopleId]), {}, {});
  };

  /**
   * Get a profile
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @return Promise
   */
  this.getPeopleProfile = function(websiteId, peopleId) {
    return crisp.get(crisp._prepareRestUrl(["website", websiteId, "people", "profile", peopleId]), {}, {});
  };

  /**
   * list people profiles
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @return Promise
   */
  this.listPeopleProfiles = function(websiteId, page) {
    return crisp.get(crisp._prepareRestUrl(["website", websiteId, "people", "profiles", page]), {}, {});
  };

  /**
   * Removes a profile
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @return Promise
   */
  this.removePeopleProfile = function(websiteId, peopleId) {
    return crisp.delete(crisp._prepareRestUrl(["website", websiteId, "people", "profile", peopleId]), {}, {});
  };

  /**
   * Saves a profile
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @param {object} data
   * @return Promise
   */
  this.savePeopleProfile = function(websiteId, peopleId, data) {
    return crisp.put(crisp._prepareRestUrl(["website", websiteId, "people", "profile", peopleId]), {}, data);
  };

  /**
   * Updates a profile
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @param {object} data
   * @return Promise
   */
  this.updatePeopleProfile = function(websiteId, peopleId, data) {
   return crisp.patch(crisp._prepareRestUrl(["website", websiteId, "people", "profile", peopleId]), {}, data);
  };

  /**
   * List people segments
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @param {number} page
   * @return Promise
   */
  this.listPeopleSegments = function(websiteId, page) {
    return crisp.get(crisp._prepareRestUrl(["website", websiteId, "people", "segments", page]), {}, {});
  };

  /**
   * List people conversations
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @param {number} page
   * @return Promise
   */
  this.listPeopleConversations = function(websiteId, peopleId, page) {
    return crisp.get(crisp._prepareRestUrl(["website", websiteId, "people", "conversations", peopleId, "list", page]), {}, {});
  };

  /**
   * Add an event
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @param {object} event
   * @return Promise
   */
  this.addPeopleEvent = function(websiteId, peopleId, event) {
    return crisp.post(crisp._prepareRestUrl(["website", websiteId, "people", "events", peopleId]), {}, event);
  };

  /**
   * List people events
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @param {number} page
   * @return Promise
   */
  this.listPeopleEvent = function(websiteId, peopleId, page) {
    return crisp.get(crisp._prepareRestUrl(["website", websiteId, "people", "events", peopleId, "list", page]), {}, {});
  };

  /**
   * Get people data
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @return Promise
   */
  this.getPeopleData = function(websiteId, peopleId) {
    return crisp.get(crisp._prepareRestUrl(["website", websiteId, "people", "data", peopleId]), {}, {});
  };

  /**
   * Update people data
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @return Promise
   */
  this.updatePeopleData = function(websiteId, peopleId, data) {
    return crisp.put(crisp._prepareRestUrl(["website", websiteId, "people", "data", peopleId]), {}, data);
  };

  /**
   * Get people subscription status
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @return Promise
   */
  this.getPeopleSubscriptionStatus = function(websiteId, peopleId) {
    return crisp.get(crisp._prepareRestUrl(["website", websiteId, "people", "subscription", peopleId]), {}, {});
  }

  /**
   * Update people subscription status
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @param {object} data
   * @return Promise
   */
  this.updatePeopleSubscriptionStatus = function(websiteId, peopleId, data) {
    return crisp.patch(crisp._prepareRestUrl(["website", websiteId, "people", "subscription", peopleId]), {}, data);
  }
}
/**
 * Crisp WebsitePeople Ressource
 * @class
 * @classdesc This is the Crisp Website People Ressource
 */
Crisp WebsitePeople Ressource
@class
@classdesc This is the Crisp Website People Ressource
Crisp WebsitePeople Ressource @class @classdesc This is the Crisp Website People Ressource
function WebsitePeople(crisp) {
  this.findByEmail = function(websiteId, email) {
    return crisp.get(crisp._prepareRestUrl(
      ["website", websiteId, "people", "profile", email]), {}, {});
  };
  this.findBySegments = function(websiteId, segments) {
    var searchFilter = [];
    var query = {};
    segments.forEach(function(segment) {
      var searchCriteria = {"model":"people","criterion":"segments","operator":"eq","query":[segment]};
      searchFilter.push(searchCriteria);
    });
    query = {
      search_filter: JSON.stringify(searchFilter),
      search_operator: "and"
    };
    return crisp.get(crisp._prepareRestUrl(
      ["website", websiteId, "people", "profiles"]), query, {});
  };
  this.createNewPeopleProfile = function(websiteId, params) {
    return crisp.post(crisp._prepareRestUrl(["website", websiteId, "people", "profile"]), {}, params);
  };
  this.checkPeopleProfileExists = function(websiteId, peopleId) {
    return crisp.head(crisp._prepareRestUrl(["website", websiteId, "people", "profile", peopleId]), {}, {});
  };
  this.getPeopleProfile = function(websiteId, peopleId) {
    return crisp.get(crisp._prepareRestUrl(["website", websiteId, "people", "profile", peopleId]), {}, {});
  };
  this.listPeopleProfiles = function(websiteId, page) {
    return crisp.get(crisp._prepareRestUrl(["website", websiteId, "people", "profiles", page]), {}, {});
  };
  this.removePeopleProfile = function(websiteId, peopleId) {
    return crisp.delete(crisp._prepareRestUrl(["website", websiteId, "people", "profile", peopleId]), {}, {});
  };
  this.savePeopleProfile = function(websiteId, peopleId, data) {
    return crisp.put(crisp._prepareRestUrl(["website", websiteId, "people", "profile", peopleId]), {}, data);
  };
  this.updatePeopleProfile = function(websiteId, peopleId, data) {
   return crisp.patch(crisp._prepareRestUrl(["website", websiteId, "people", "profile", peopleId]), {}, data);
  };
  this.listPeopleSegments = function(websiteId, page) {
    return crisp.get(crisp._prepareRestUrl(["website", websiteId, "people", "segments", page]), {}, {});
  };
  this.listPeopleConversations = function(websiteId, peopleId, page) {
    return crisp.get(crisp._prepareRestUrl(["website", websiteId, "people", "conversations", peopleId, "list", page]), {}, {});
  };
  this.addPeopleEvent = function(websiteId, peopleId, event) {
    return crisp.post(crisp._prepareRestUrl(["website", websiteId, "people", "events", peopleId]), {}, event);
  };
  this.listPeopleEvent = function(websiteId, peopleId, page) {
    return crisp.get(crisp._prepareRestUrl(["website", websiteId, "people", "events", peopleId, "list", page]), {}, {});
  };
  this.getPeopleData = function(websiteId, peopleId) {
    return crisp.get(crisp._prepareRestUrl(["website", websiteId, "people", "data", peopleId]), {}, {});
  };
  this.updatePeopleData = function(websiteId, peopleId, data) {
    return crisp.put(crisp._prepareRestUrl(["website", websiteId, "people", "data", peopleId]), {}, data);
  };
  this.getPeopleSubscriptionStatus = function(websiteId, peopleId) {
    return crisp.get(crisp._prepareRestUrl(["website", websiteId, "people", "subscription", peopleId]), {}, {});
  }
  this.updatePeopleSubscriptionStatus = function(websiteId, peopleId, data) {
    return crisp.patch(crisp._prepareRestUrl(["website", websiteId, "people", "subscription", peopleId]), {}, data);
  }
}
function WebsitePeople ( crisp ) { this . findByEmail = function ( websiteId , email ) { return crisp . get ( crisp . _prepareRestUrl ( [ "website" , websiteId , "people" , "profile" , email ] ) , { } , { } ) ; } ; this . findBySegments = function ( websiteId , segments ) { var searchFilter = [ ] ; var query = { } ; segments . forEach ( function ( segment ) { var searchCriteria = { "model" : "people" , "criterion" : "segments" , "operator" : "eq" , "query" : [ segment ] } ; searchFilter . push ( searchCriteria ) ; } ) ; query = { search_filter : JSON . stringify ( searchFilter ) , search_operator : "and" } ; return crisp . get ( crisp . _prepareRestUrl ( [ "website" , websiteId , "people" , "profiles" ] ) , query , { } ) ; } ; this . createNewPeopleProfile = function ( websiteId , params ) { return crisp . post ( crisp . _prepareRestUrl ( [ "website" , websiteId , "people" , "profile" ] ) , { } , params ) ; } ; this . checkPeopleProfileExists = function ( websiteId , peopleId ) { return crisp . head ( crisp . _prepareRestUrl ( [ "website" , websiteId , "people" , "profile" , peopleId ] ) , { } , { } ) ; } ; this . getPeopleProfile = function ( websiteId , peopleId ) { return crisp . get ( crisp . _prepareRestUrl ( [ "website" , websiteId , "people" , "profile" , peopleId ] ) , { } , { } ) ; } ; this . listPeopleProfiles = function ( websiteId , page ) { return crisp . get ( crisp . _prepareRestUrl ( [ "website" , websiteId , "people" , "profiles" , page ] ) , { } , { } ) ; } ; this . removePeopleProfile = function ( websiteId , peopleId ) { return crisp . delete ( crisp . _prepareRestUrl ( [ "website" , websiteId , "people" , "profile" , peopleId ] ) , { } , { } ) ; } ; this . savePeopleProfile = function ( websiteId , peopleId , data ) { return crisp . put ( crisp . _prepareRestUrl ( [ "website" , websiteId , "people" , "profile" , peopleId ] ) , { } , data ) ; } ; this . updatePeopleProfile = function ( websiteId , peopleId , data ) { return crisp . patch ( crisp . _prepareRestUrl ( [ "website" , websiteId , "people" , "profile" , peopleId ] ) , { } , data ) ; } ; this . listPeopleSegments = function ( websiteId , page ) { return crisp . get ( crisp . _prepareRestUrl ( [ "website" , websiteId , "people" , "segments" , page ] ) , { } , { } ) ; } ; this . listPeopleConversations = function ( websiteId , peopleId , page ) { return crisp . get ( crisp . _prepareRestUrl ( [ "website" , websiteId , "people" , "conversations" , peopleId , "list" , page ] ) , { } , { } ) ; } ; this . addPeopleEvent = function ( websiteId , peopleId , event ) { return crisp . post ( crisp . _prepareRestUrl ( [ "website" , websiteId , "people" , "events" , peopleId ] ) , { } , event ) ; } ; this . listPeopleEvent = function ( websiteId , peopleId , page ) { return crisp . get ( crisp . _prepareRestUrl ( [ "website" , websiteId , "people" , "events" , peopleId , "list" , page ] ) , { } , { } ) ; } ; this . getPeopleData = function ( websiteId , peopleId ) { return crisp . get ( crisp . _prepareRestUrl ( [ "website" , websiteId , "people" , "data" , peopleId ] ) , { } , { } ) ; } ; this . updatePeopleData = function ( websiteId , peopleId , data ) { return crisp . put ( crisp . _prepareRestUrl ( [ "website" , websiteId , "people" , "data" , peopleId ] ) , { } , data ) ; } ; this . getPeopleSubscriptionStatus = function ( websiteId , peopleId ) { return crisp . get ( crisp . _prepareRestUrl ( [ "website" , websiteId , "people" , "subscription" , peopleId ] ) , { } , { } ) ; } this . updatePeopleSubscriptionStatus = function ( websiteId , peopleId , data ) { return crisp . patch ( crisp . _prepareRestUrl ( [ "website" , websiteId , "people" , "subscription" , peopleId ] ) , { } , data ) ; } }
Crisp WebsitePeople Ressource
 @class
 @classdesc This is the Crisp Website People Ressource
Crisp WebsitePeople Ressource @class @classdesc This is the Crisp Website People Ressource
/**
   * Find people profile by email
   * @memberof WebsitePeopleProfile
   * @method findByEmail
   * @param {string} websiteId
   * @param {string} email
   * @return Promise
   */ /**
   * Find people profiles by segments
   * @memberof WebsitePeopleProfile
   * @method findBySegments
   * @param {string} websiteId
   * @param {Object} segments
   * @return Promise
   */ /**
   * Create an new profile
   * @memberof WebsitePeople
   * @method post
   * @param {string} websiteId
   * @param {object} params
   * @return Promise
   */ /**
   * Check if a profile exists
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @return Promise
   */ /**
   * Get a profile
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @return Promise
   */ /**
   * list people profiles
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @return Promise
   */ /**
   * Removes a profile
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @return Promise
   */ /**
   * Saves a profile
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @param {object} data
   * @return Promise
   */ /**
   * Updates a profile
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @param {object} data
   * @return Promise
   */ /**
   * List people segments
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @param {number} page
   * @return Promise
   */ /**
   * List people conversations
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @param {number} page
   * @return Promise
   */ /**
   * Add an event
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @param {object} event
   * @return Promise
   */ /**
   * List people events
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @param {number} page
   * @return Promise
   */ /**
   * Get people data
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @return Promise
   */ /**
   * Update people data
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @return Promise
   */ /**
   * Get people subscription status
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @return Promise
   */ /**
   * Update people subscription status
   * @memberof WebsitePeople
   * @method get
   * @param {string} websiteId
   * @param {string} peopleId
   * @param {object} data
   * @return Promise
   */