Attachments sdk
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);
const res = await AttachmentCore.
# example - get customer attachments
const customerAttachments = await AttachmentCore.attachment.listAttachmentsForCustomer({
customer_id: customer_id,
});
API_HOST in generate-api-client.sh with attachments service host