zcatalyst-integ-cliq
Version:
Node.js SDK for integrating Zoho Catalyst with Zoho Cliq
24 lines (23 loc) • 970 B
JavaScript
import { Handler } from '../../handler.js';
import CONSTANTS from '../../constants.js';
import InstallationResponse from '../response-objects/installation-response.js';
import VoidResponse from '../response-objects/void-response.js';
const { EXTENSION } = CONSTANTS;
const { extension_handler } = CONSTANTS.HANDLERS;
export default class ExtensionHandler {
handleInstallation(handler) {
Handler.registerHandler(EXTENSION, extension_handler.installation_handler, handler, InstallationResponse);
}
validateInstallation(handler) {
Handler.registerHandler(EXTENSION, extension_handler.installation_validator, handler, InstallationResponse);
}
handleUninstallation(handler) {
Handler.registerHandler(EXTENSION, extension_handler.uninstallation_handler, handler, VoidResponse);
}
newInstallationResponse() {
return new InstallationResponse();
}
newVoidResponse() {
return new VoidResponse();
}
}