@heseya/advanced-ui-modules-sdk
v1.4.4
Published
## Instalation
Downloads
368
Keywords
Readme
UI Modules SDK
Instalation
$ yarn add @heseya/advanced-ui-modules-sdk
# or
$ npm i @heseya/advanced-ui-modules-sdk
Development
# Install dependencies
$ yarn
# Build in watch mode
$ yarn dev
# Build npm package
$ yarn build
# Run tests
$ yarn test
# Publish package to npm
$ yarn publish
Initialization
You can initialize the API Service by calling the createAdvancedUiModulesApiService
function. It is important to pass the axios
instance to the function.
Axios instance needs to be configured to use the URL of the UI Modules API. Without it the SDK will not be able to make requests to the API.
Remember to enhance axios instance with proper headers (X-Core-Url
) and Identity Token
based authentication.
import axios from 'axios'
import { createHeseyaApiService, HeseyaApiService } from '@heseya/store-core'
const axiosInstance = axios.create({ baseURL: 'https://api.example.com' })
const heseya: HeseyaApiService = createHeseyaApiService(axiosInstance)