zcatalyst-integ-cliq
Version:
Node.js SDK for integrating Zoho Catalyst with Zoho Cliq
59 lines (58 loc) • 1.46 kB
JavaScript
import ButtonObject from './button-object.js';
import CardDetails from './card-details.js';
import Context from './context.js';
import Slide from './slide.js';
import SuggestionList from './suggestion.js';
export class Message {
newMention() {
return {};
}
addMentions(...mention) {
if (this.mentions === undefined) {
this.mentions = mention;
return this.mentions.length;
}
return this.mentions.push(...mention);
}
newBotDetails(name, image) {
return {
name,
image
};
}
newContext() {
return new Context();
}
newMessageStyles(highlight) {
return { highlight };
}
newSuggestionList() {
return new SuggestionList();
}
newSlide() {
return new Slide();
}
addSlide(...slide) {
if (this.slides === undefined) {
this.slides = slide;
return this.slides.length;
}
return this.slides.push(...slide);
}
newButton() {
return new ButtonObject();
}
newButtonForReference(buttonObject) {
return { type: 'button', object: buttonObject };
}
addButton(...button) {
if (this.buttons === undefined) {
this.buttons = button;
return this.buttons.length;
}
return this.buttons.push(...button);
}
newCard() {
return new CardDetails();
}
}