UNPKG

zcatalyst-integ-cliq

Version:

Node.js SDK for integrating Zoho Catalyst with Zoho Cliq

69 lines (68 loc) 2.44 kB
import { envOverride } from './util.js'; export default Object.freeze({ USER_AGENT: 'zcatalyst-integ-node/' + '0.0.1', CONFIGJSON: 'catalyst-config.json', CLIQ: 'ZohoCliq', BOT: 'bot', COMMAND: 'command', MESSAGEACTION: 'messageaction', WIDGET: 'widget', FUNCTION: 'function', EXTENSION: 'extension', LINKPREVIEW: 'link_preview', HANDLERS: { bot_handler: { WELCOME_HANDLER: 'welcome_handler', MESSAGE_HANDLER: 'message_handler', CONTEXT_HANDLER: 'context_handler', MENTION_HANDLER: 'mention_handler', ACTION_HANDLER: 'action_handler', INCOMING_WEBHOOK_HANDLER: 'incomingwebhook_handler', PARTICIPATION_HANDLER: 'participation_handler', ALERT_HANDLER: 'alert_handler' }, command_handler: { EXECUTION_HANDLER: 'execution_handler', SUGGESTION_HANDLER: 'suggestion_handler' }, messageaction_handler: { EXECUTION_HANDLER: 'execution_handler' }, widget_handler: { VIEW_HANDLER: 'view_handler', CHANNEL_TAB_HANDLER: 'channel_tab_handler' }, function_handler: { BUTTON_HANDLER: 'button_handler', FORM_HANDLER: 'form_handler', FORM_CHANGE_HANDLER: 'form_change_handler', FORM_VALUES_HANDLER: 'form_values_handler', FORM_VIEW_HANDLER: 'form_view_handler', WIDGET_FUNCTION_HANDLER: 'applet_button_handler' }, extension_handler: { installation_handler: 'installation_handler', installation_validator: 'installation_validator', uninstallation_handler: 'uninstallation_handler' }, link_preview_handler: { preview_handler: 'unfurl_handler', action_handler: 'unfurl_button_action_handler', menu_handler: 'unfurl_dynamic_action_handler', after_send_handler: 'unfurl_post_message_handler' } }, API_CONSTANTS: { DOMAIN: envOverride('INTEG_CLIQ_DOMAIN', 'https://cliq.zoho.com'), VERSION: '/v2', API: '/api', MESSAGE: '/message', FILES: '/files', OAUTH_PREFIX: 'Zoho-oauthtoken ', URL_CONSTANTS: { BOT_UNIQUE_NAME: 'bot_unique_name', BROADCAST: 'broadcast', USERIDS: 'userids' } } });