UI Modules SDK
Instalation
$ yarn add @heseya/advanced-ui-modules-sdk
$ npm i @heseya/advanced-ui-modules-sdk
Development
$ yarn
$ yarn dev
$ yarn build
$ yarn test
$ 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)