Skip to content

Latest commit

 

History

History
264 lines (189 loc) · 5.39 KB

users.md

File metadata and controls

264 lines (189 loc) · 5.39 KB

Users

Overview

The resources responsible for creating and managing users

Available Resources

  1. netField.users.create(params, [callback])

  2. netField.users.createselfuser(params, [callback])

  3. netField.users.getAll(organisationId, page, [callback])

  4. netField.users.get(userId, [callback])

  5. netField.users.getverifyuser(email, [callback])

  6. netField.users.suggest(params, [callback])

  7. netField.users.update(userId, params, [callback])

  8. netField.users.verifyuser(params, [callback])

  9. netField.users.delete(userId, [callback])

  10. netField.users.profile.get([callback])

  11. netField.users.profile.update(params, [callback])

  12. netField.users.sensoredge.create(params, [callback])

  13. netField.users.sensoredge.completeRegistration(params, [callback])

  14. netField.users.sensoredge.verify(params, [callback])

  15. netField.users.sensoredge.getverifytempuser(email, [callback])

  16. netField.users.profile.notificationEmails.add(params, [callback])

  17. netField.users.profile.notificationEmails.getAll(page, limit, sortBy, sortOrder, [callback])

  18. netField.users.profile.notificationEmails.delete(notificationEmailId, [callback])

Resource Usage

createuser

Create new user
/**
 * @param {object} params
 * @param {function} callback optional
*/
netField.users.create(params, [callback])

createselfuser

Self registration for user (uses public token)
/**
 * @param {object} params
 * @param {function} callback optional
*/
netField.users.createselfusers(params, [callback])

getusers

Get users by organisationId
/**
 * @param {number} organisationId
 * @param {any} options optional
 * @param {function} callback optional
*/
netField.users.getAll(organisationId, [options], [callback])

getuser

Get user by userId
/**
 * @param {number} userId
 * @param {function} callback optional
*/
netField.users.get(userId, [callback])

suggestuser

Suggest user
/**
 * @param {object} params
 * @param {function} callback optional
*/
netField.users.suggest(params, [callback])

getverifyuser

Resend user verification code to email
/**
 * @param {string} email
 * @param {function} callback optional
*/
netField.users.getverifyuser(email, [callback])

updateuser

Update user
/**
 * @param {number} userId
 * @param {object} params
 * @param {function} callback optional
*/
netField.users.update(userId, params, [callback])

verifyuser

Verify user by code send trough email
/**
 * @param {object} params
 * @param {function} callback optional
*/
netField.users.verifyuser(params, [callback])

deleteuser

Delete User
/**
 * @param {number} userId
 * @param {function} callback optional
*/
netField.users.delete(userId, [callback])

getprofile

Get user profile
/**
 * @param {function} callback optional
*/
netField.users.profile.get([callback])

updateprofile

Update user profile
/**
 * @param {object} params
 * @param {function} callback optional
*/
netField.users.profile.update(params, [callback])

createtempuser

Create new tempUser
/**
 * @param {object} params
 * @param {function} callback optional
*/
netField.users.sensoredge.create(params, [callback])

completeregistration

Generate sensor edge registration access token
/**
 * @param {object} params
 * @param {function} callback optional
*/
netField.users.sensoredge.completeRegistration(params, [callback])

verifytempuser

Verify a user by the code sent through email
/**
 * @param {object} params
 * @param {function} callback optional
*/
netField.users.sensoredge.verify(params, [callback])

getverifytempuser

Resend tempUser verification code to email
/**
 * @param {string} email
 * @param {function} callback optional
*/
netField.users.sensoredge.getverifytempuser(email, [callback])

addnotificationemail

Add notification email to current user profile
/**
 * @param {object} params 
 * @param {function} callback optional
*/
netField.users.profile.notificationEmails.add(params, [callback])

getnotificationemails

Get user profile notification emails
/** 
 * @param {number} page
 * @param {number} limit
 * @param {String} sortBy
 * @param {String} sortOrder asc, desc
 * @param {function} callback optional
 */
netField.users.profile.notificationEmails.getAll(page, limit, sortBy, sortOrder, callback)

deletenotificationemail

Delete notification email
/**
 * @param {number} notificationEmailId
 * @param {function} callback optional
*/
netField.users.profile.notificationEmails.delete(notificationEmailId, [callback])