UNPKG

zcatalyst-integ-cliq

Version:

Node.js SDK for integrating Zoho Catalyst with Zoho Cliq

116 lines (115 loc) 3.47 kB
import { ACTION_TYPE, PREVIEW_TYPE, SYSTEM_API_ACTION, WIDGET_BUTTON_EMOTION, WIDGET_ELEMENT_TYPE, WIDGET_TYPE, User, ALIGNMENT, WIDGET_DATA_TYPE, TICKER_TYPE, TICKER_COLOR, BANNER_STATUS, WIDGET_STYLE_VIEW, WIDGET_STYLE_SIZE, WIDGET_STYLE_PREVIEW, Confirm } from '../common.js'; import ButtonObject from './button-object.js'; import Form from './form.js'; export default class WidgetResponse { type: WIDGET_TYPE; tabs?: Array<WidgetTab>; active_tab?: string; data_type?: WIDGET_DATA_TYPE; sections?: Array<WidgetSection>; info?: WidgetInfo; form?: Form; map?: WidgetMap; web_view?: WidgetWebView; newWidgetTab(id?: string, label?: string): WidgetTab; addTab(...tab: Array<WidgetTab>): number; newWidgetSection(): WidgetSection; addSection(...WidgetSection: Array<WidgetSection>): number; newWidgetInfo(): WidgetInfo; newWidgetForm(): Form; newWidgetMap(): WidgetMap; newWidgetWebView(url: string): WidgetWebView; } declare class WidgetElement { type?: WIDGET_ELEMENT_TYPE; text?: string; description?: string; image_url?: string; buttons?: Array<WidgetButton>; button_references?: Record<string, WidgetButton>; preview_type?: PREVIEW_TYPE; user?: User; headers?: Array<string>; rows?: Array<Record<string, string>>; style?: WidgetElementStyle; styles?: WidgetElementStyle; data?: Array<Record<string, unknown>>; newWidgetButton(): WidgetButton; addWidgetButton(...button: Array<WidgetButton>): number; newButtonObject(): ButtonObject; addButtonReference(name: string, button: WidgetButton): void; newWidgetElementStyle(): WidgetElementStyle; } declare class WidgetSection { id?: string; elements?: Array<WidgetElement>; type?: string; status?: WidgetSectionStatus; newWidgetElement(): WidgetElement; addElement(...element: Array<WidgetElement>): number; } declare class WidgetSectionStatus { text?: string; type?: BANNER_STATUS; } declare class WidgetTab { id?: string; label?: string; constructor(id?: string, label?: string); } declare class WidgetButton { label?: string; emotion?: WIDGET_BUTTON_EMOTION; disabled?: boolean; type?: ACTION_TYPE; name?: string; url?: string; api?: string; id?: string; confirm?: Confirm; setApi(api: SYSTEM_API_ACTION, id: string): void; } declare class AxisInfo { title: string; constructor(title: string); } declare class WidgetElementStyle { width?: Array<string>; align?: Array<ALIGNMENT>; short?: boolean; view?: WIDGET_STYLE_VIEW; size?: WIDGET_STYLE_SIZE; preview?: WIDGET_STYLE_PREVIEW; x_axis?: AxisInfo; y_axis?: AxisInfo; addWidth(...width: Array<string>): number; addAlignment(...alignment: Array<ALIGNMENT>): number; newAxisInfo(title: string): AxisInfo; } declare class WidgetInfo { title?: string; image_url?: string; description?: string; button?: WidgetButton; newWidgetButton(): WidgetButton; } declare class WidgetWebView { url: string; constructor(url: string); } declare class WidgetMap { title?: string; id?: string; tickers?: Record<string, MapTicker>; newMapTicker(): MapTicker; } declare class MapTicker { title?: string; type?: TICKER_TYPE; color?: TICKER_COLOR; info?: string; latitude?: number; longitude?: number; last_modified_time?: number; } export {};