0.0.4 • Published 1 year ago
admin-utils-project-settings v0.0.4
admin-utils
Infinity infrastructure package for admin services. This package extends server-utils package, and adds some extra administration api function for managing users. All of server utils api functions are available in admin-utils package.
How To Install
echo '@werxpace:registry=https://dev.infinitylabs.co.il/api/v4/packages/npm/' >> .npmrc
echo '//dev.infinitylabs.co.il/api/v4/packages/npm/:_authToken=${NPM_TOKEN}' >> .npmrc
- You should commit the
.npmrc
- Then run:
export NPM_TOKEN=<your_npm_token>
npm i @werxpace/admin-utils
How To Update
npx npm-check-updates -u @werxpace/admin-utils && npm i
How To Test
npm test
- tests run with jest.
- adding tests should be done sparingly, checking behaviour and not implementation (this is always a good practice).
API
- firstName:
String
.- lastName:
String
.- preferredName:
String
defaulted to firstName, if none provided.- username:
String
.- email:
String
.- gender:
String
.- picture:
String
.- Return
Promise
, resolve toString
representing the uuid of the new created user.- Error - reject.
- uuid:
String
.- newUserProperties:
Object
. valid fields are: firstName, lastName, preferredName, gender, picture, allString
- Returns
Promise
, resolved to an http status code.- Error - reject.
- uuid:
String
.- Returns
Promise
, resolved to an http status code.- Error - reject.
Note
server-utils API can be found here