@mivialabs/mivia-api-nodejs
v0.6.24-dev
Published
``` Status: IN DEVELOPMENT ```
Downloads
6
Readme
Mivia API NodeJS Official Package
Status: IN DEVELOPMENT
https://mivia.net - https://api.mivia.net - https://docs.mivia.net
To get access key to API please register account at https://mivia.net.
Rate limits applies - please read more info about it in documentation.
Install
npm install --save @mivialabs/mivia-api-nodejs
Example
import { MiviaApi, MiviaApiOptions } from "@mivialabs/mivia-api-nodejs";
const apiConfig: MiviaApiOptions = {
api: {
keyPublic: "PUBLIC_KEY",
keySecret: "SECRET_KEY",
},
};
MiviaApi.setConfig(apiConfig);
const res = await MiviaApi.organization.list();
console.log(res);
List of methods
| Name | Description |
| ----------- | ---------------------------- |
| setConfig
| Set Mivia API config options |
Auth
| Name | Description |
| --------------------------- | ------------------------------------------------------- |
| auth.loginByEmail
| Login user by email and password |
| auth.registerByEmail
| Register new account by email and password |
| auth.confirmRegistration
| Confirm registration |
| auth.me.get
| Get info about current USER. |
| auth.me.getSettings
| Get current USER settings. |
| auth.me.updateSettings
| Update current USER settings. |
| auth.method.list
| List current USER authentication methods. |
| auth.method.get
| Get current USER authentiction method details by id. |
| auth.method.create
| Add additional authentication method for current USER. |
| auth.method.activate
| Activate authentication method. |
| auth.method.delete
| Delete authentication method belonging to current USER. |
| auth.requestPasswordReset
| Request password reset. |
| auth.confirmPasswordReset
| Confirm password reset change. |
| API KEYS | |
| auth.api.createAccessKey
| Create api access key assigned to ORGANIZATION or USER |
| auth.api.getAccessKey
| Get API KEY by id |
| auth.api.updateAccessKey
| Update API_KEY details |
| auth.api.deleteAccessKey
| Delete API_KEY |
Organizations
| Name | Description |
| --------------------------------------- | -------------------------------------------------------------------- |
| organization.list
| List all organization to which current USER / API_KEY has access to. |
| organization.create
| Create new ORGANIZATION. |
| organization.get
| Get ORGANIZATION by id |
| organization.update
| Update ORGANIZATION details |
| organization.member.list
| List all members of ORGANIZATION |
| organization.member.get
| Get ORGANIZATION_MEMBER by id |
| organization.member.update
| Update ORGANIZATION_MEMBER details in ORGANIZATION |
| organization.member.delete
| Delete ORGANIZATION_MEMBER from ORGANIZATION |
| organization.requestOwnershipTransfer
| Request ORGANIZATION ownership transfer to another USER |
| organization.confirmOwnershipTransfer
| Confirm ORGANIZATION ownership transfer |
Projects
| Name | Description |
| ---------------- | ---------------------------------------------------------------- |
| project.list
| List all PROJECTS to which current USER / API_KEY has access to. |
| project.get
| Get project details by id |
| project.create
| Create PROJECT assigned to a USER or ORGANIZATION |
| project.update
| Update PROJECT details |
Files
| Name | Description |
| ------------- | ------------------------------------------------------------- |
| file.list
| List all FILES to which current USER / API_KEY has access to. |
| file.get
| Get file details by id |
| file.update
| Update file details |
| file.delete
| Delete file |
Warehouses
| Name | Description |
| ------------------ | ----------------------------------------------- |
| warehouse.create
| Create WAREHOUSE assigned to a PROJECT |
| warehouse.list
| List WAREHOUSE in all PROJECTS or selected ones |
| warehouse.get
| Get WAREHOUSE details |
| warehouse.update
| Update WAREHOUSE details |
| warehouse.delete
| Delete WAREHOUSE |
E-commerce
| Name | Description |
| -------------------------------------- | ------------------------------------------- |
| SETTINGS | |
| ecommerce.settings.get
| Get PROJECT eccommerce settings |
| ecommerce.settings.update
| Update ecommerce settings |
| SUPPLIER | |
| ecommerce.supplier.get
| Get SUPPLIER by id |
| ecommerce.supplier.list
| List all SUPPLIERS assigned to a PROJECT |
| ecommerce.supplier.create
| Create SUPPLIER entry assigned to a PROJECT |
| ecommerce.supplier.update
| Update SUPPLIER details |
| ecommerce.supplier.delete
| Delete SUPPLIER |
| BRAND |
| ecommerce.brand.get
| Get BRAND by id |
| ecommerce.brand.list
| List all BRANDS assigned to a PROJECT |
| ecommerce.brand.create
| Create BRAND entry assigned to a PROJECT |
| ecommerce.brand.update
| Update BRAND details |
| ecommerce.brand.delete
| Delete BRAND |
| PRODUCT | |
| ecommerce.product.create
| Create PRODUCT assigned to a PROJECT |
| ecommerce.product.list
| List all PRODUCTS in a PROJECT |
| ecommerce.product.get
| Get PRODUCT details |
| ecommerce.product.update
| Update PRODUCT |
| PRODUCT VARIANTS | |
| ecommerce.product.variant.list
| List PRODUCT_VARIANTS |
| ecommerce.product.variant.get
| Get PRODUCT_VARIANT details |
| ecommerce.product.variant.update
| Update PRODUCT_VARIANT |
| ecommerce.product.variant.delete
| Update PRODUCT_VARIANT |
| PRODUCT TRANSLATIONS | |
| ecommerce.product.translation.list
| List PRODUCT translations |
| ecommerce.product.translation.update
| Create/Update PRODUCT translation |
| ecommerce.product.translation.delete
| Delete PRODUCT translation |
| ecommerce.product.translation.get
| Get PRODUCT translation |
| PRODUCT PRICES | |
| ecommerce.product.price.list
| List PRODUCT_PRICES |
| ecommerce.product.price.get
| Get PRODUCT_PRICE details |
| ecommerce.product.price.update
| Update PRODUCT_PRICE |
| ecommerce.product.price.delete
| Update PRODUCT_PRICE |
| PRODUCT STOCKS | |
| ecommerce.product.stock.list
| List PRODUCT_STOCKS |
| ecommerce.product.stock.update
| Update PRODUCT_STOCK at WAREHOUSE |