0.0.4 • Published 1 year ago

admin-utils-project-settings v0.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

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

  1. firstName: String.
  2. lastName: String.
  3. preferredName: String defaulted to firstName, if none provided.
  4. username: String.
  5. email: String.
  6. gender: String.
  7. picture: String.
  8. Return Promise, resolve to String representing the uuid of the new created user.
  9. Error - reject.
  1. uuid: String.
  2. newUserProperties: Object. valid fields are: firstName, lastName, preferredName, gender, picture, all String
  3. Returns Promise, resolved to an http status code.
  4. Error - reject.
  1. uuid: String.
  2. Returns Promise, resolved to an http status code.
  3. Error - reject.

Note

server-utils API can be found here

0.0.4

1 year ago

0.0.3

1 year ago