@tactfulai/attachments-sdk
v3.5.11
Published
Attachments sdk
Readme
Tactful.ai Attachments SDK
Installation
npm i --save @tactfulai/attachments-sdk
How To Use In Your Project
import { Configuration as AttachmentConfig, initializeTactful as AttachmentInit } from "@tactfulai/attachments-sdk";
export const attachmentApiConfig = new AttachmentConfig({
basePath: config.ATTACHMENTS_API_HOST_URL,
apiKey: `Bearer ${access_token}`,
options: {
mode: 'cors',
}
});
export const AttachmentCore = AttachmentInit(attachmentApiConfig);APIs Calls
docs : https://attachments.qa.dev.tactful.ai/ swagger : https://attachments.qa.dev.tactful.ai/swagger/attachments
const res = await AttachmentCore.<namespace>.<operation>(<payload>,<options>);
# example - get customer attachments
const customerAttachments = await AttachmentCore.attachment.listAttachmentsForCustomer({
customer_id: customer_id,
});Generate and Publish
- Edit
API_HOSTingenerate-api-client.shwith attachments service host ./generate-api-client.sh auth
cd attachments/typescript
- Change sdk version in package.json
npm run login
npm publish
