@tactfulai/erp-sdk
v4.6.13
Published
ERP sdk
Readme
Tactful.ai ERP SDK
Installation
npm i --save @tactfulai/erp-sdk
How To Use In Your Project
import { Configuration as ERPConfig, initializeTactful as ERPInit } from "@tactfulai/erp-sdk";
export const erpApiConfig = new ERPConfig({
basePath: config.ERP_API_HOST_URL,
apiKey: `Bearer ${erpToken?.access_token}`,
options: {
mode: 'cors',
}
});
export const ERPCore = ERPInit(erpApiConfig);APIs Calls
https://erp.qa.dev.tactful.ai/
const res = await ERPCore.<namespace>.<operation>(<payload>,<options>);
# example - get customer
const customer = await ERPCore.customers.showCustomer({customer:this.CustomerId});Generate and Publish
- Edit
API_HOSTingenerate-api-client.shwith erp service host ./generate-api-client.sh auth
cd erp/typescript
- Change sdk version in package.json
npm run login
npm run build
npm version < major | minor | patch >
npm publish
