The OMS API package comes with prebuilt methods that helps communicate with HotWax Commerce OMS using Rest API
- Download the package from release page and extract it.
- Go to the package directory.
- Run following command to download dependencies
npm i
- Build the package using
npm run build
- Open a Terminal window.
- Clone package using the command:
git clone https://github.com/hotwax/oms-api.git <repository-name>
- Go to the directory using command:
cd <repository-name>
- Run following command to download dependencies
npm i
- Build the package using
npm run build
- Install OMS API package in the application using npm
npm i @hotwax/oms-api
- Define
init
method on app load that will be used to set the initial configuration for the package.Note: In case of vue project, you can define it inside mounted hook in
App.vue
file
import { init } from '@hotwax/oms-api'
...
...
init(token, instanceURL, cacheAge)
- Add following method calls to clear the token and instance url when app unmounts. Also, you can use the same method whenever user logout from the app.
Note: In case of vue project, you can define it inside unmounted hook in
App.vue
file
import { resetConfig } from '@hotwax/oms-api'
...
...
resetConfig()
- Update the token or instance URL whenever needed by using the following methods:
updateToken
: For updating the token valueupdateInstanceUrl
: For updating the instanceURL / backendURL.
- Now you can use any method from the package by directly importing it from
@hotwax/oms-api
- Fork the repository and clone it locally from the
main
branch. Before starting your work make sure it's up to date with currentmain
branch. - Pick an issue from here. Write in the issue comment that you want to pick it, if you can't assign yourself. Please stay assigned to one issue at a time to not block others.
- Create a branch for your edits. Use the following branch naming conventions: oms-api/issue-number.
- Please add issue number to your commit message.
- Propose a Pull Request to
main
branch containing issue number and issue title. - Use Pull Request template (it's automatically added to each PR) and fill as much fields as possible to describe your solution.
- Reference any relevant issues or other information in your PR.
- Wait for review and adjust your PR according to it.
- Congrats! Your PR should now be merged in!
If you can't handle some parts of the issue then please ask for help in the comment. If you have any problems during the implementation of some complex issue, feel free to implement just a part of it.
Always define the type of issue:
- Bug report
- Feature request
While writing issues, please be as specific as possible. All requests regarding support with implementation or application setup should be sent to.
If you have any questions or ideas feel free to join our Discord channel
Oms-api is completely free and released under the Apache v2.0 License. Check LICENSE for more details.