diff --git a/package.json b/package.json index 310b99f..d1355e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chatwoot/utils", - "version": "0.0.51", + "version": "0.0.52", "description": "Chatwoot utils", "private": false, "license": "MIT", diff --git a/src/fileUploadRules.ts b/src/fileUploadRules.ts index baa9d8a..5d887cf 100644 --- a/src/fileUploadRules.ts +++ b/src/fileUploadRules.ts @@ -49,6 +49,7 @@ export const INBOX_TYPES = { LINE: 'Channel::Line', SMS: 'Channel::Sms', INSTAGRAM: 'Channel::Instagram', + TIKTOK: 'Channel::Tiktok', VOICE: 'Channel::Voice', } as const; @@ -67,6 +68,7 @@ type ChannelConfigs = Partial> & { * WHATSAPP CLOUD: https://developers.facebook.com/docs/whatsapp/cloud-api/reference/media#supported-media-types * TWILIO WHATSAPP: https://www.twilio.com/docs/whatsapp/guidance-whatsapp-media-messages * TWILIO SMS: https://www.twilio.com/docs/messaging/guides/accepted-mime-types + * TIKTOK: https://business-api.tiktok.com/portal/docs?id=1832184403754242 */ // ---------- Central config ---------- @@ -177,6 +179,15 @@ const CHANNEL_CONFIGS: ChannelConfigs = { }, }, + [INBOX_TYPES.TIKTOK]: { + '*': { + mimeGroups: { + image: ['jpeg', 'png'], + }, + maxByCategory: { image: 3 }, + }, + }, + [INBOX_TYPES.TWILIO]: { sms: { max: 5 }, whatsapp: {