@unaffi/schema
v1.1.3
Published
This reflects what the API returns, and not what the DB Schema looks like in MongoDB. Can be imported into any repo and be used by both TS and JS (JSDocs) code.
Readme
UNAFFI Schema
This reflects what the API returns, not what the DB Schema looks like in MongoDB.
Can be imported into any repo and be used by both TS and JS (JSDocs) code.
Installation
npm i --save-dev @unaffi/schemaUsage
Example:
/** @type {import('@unaffi/schema').Profile} */
const profile = await getProfile();or define it at the top of the page to use the type throughout the file:
/** @typedef {import('@unaffi/schema').Profile} Profile */
/** @type {Profile} */
const profile = await getProfile();Updating the Schema
- Bump the version in the
package.json:
{
// …
"version": "1.0.0", // to "1.0.1" | Always update 3rd number, unless it is a large update (such as an extra table added). Never update 1st number unless we restart unaffi's schema entirely.
// …
} - Update Github:
git add .
git commit -m "Your commit message"
git push- Update npm:
npm login
npm publish --access public