2018-01-10 20:45:25 +00:00
|
|
|
import { Slackme } from './slackme.classes.slackme';
|
2017-09-17 13:25:00 +00:00
|
|
|
export interface IAttachmentField {
|
|
|
|
title: string;
|
|
|
|
value: string;
|
|
|
|
short?: boolean;
|
|
|
|
}
|
2017-09-17 12:53:00 +00:00
|
|
|
export interface IMessageOptions {
|
|
|
|
/**
|
|
|
|
* "Required plain-text summary of the attachment."
|
|
|
|
*/
|
|
|
|
fallback?: string;
|
|
|
|
/**
|
|
|
|
* a side color
|
|
|
|
*/
|
|
|
|
color?: string;
|
|
|
|
/**
|
|
|
|
* a message to show above
|
|
|
|
*/
|
|
|
|
pretext?: string;
|
2017-09-17 13:25:00 +00:00
|
|
|
/**
|
|
|
|
* author name of the attachment
|
|
|
|
*/
|
|
|
|
author_name?: string;
|
|
|
|
/**
|
|
|
|
* a link to the author
|
|
|
|
*/
|
|
|
|
author_link?: string;
|
|
|
|
/**
|
|
|
|
* a string to the author
|
|
|
|
*/
|
|
|
|
author_icon?: string;
|
|
|
|
/**
|
|
|
|
* a title for the attachment
|
|
|
|
*/
|
|
|
|
title?: string;
|
|
|
|
/**
|
|
|
|
* a link for the title
|
|
|
|
*/
|
|
|
|
title_link?: string;
|
2017-09-17 12:53:00 +00:00
|
|
|
/**
|
|
|
|
* the main text of the message
|
|
|
|
*/
|
|
|
|
text?: string;
|
2017-09-17 13:25:00 +00:00
|
|
|
fields?: IAttachmentField[];
|
|
|
|
image_url?: string;
|
|
|
|
thumb_url?: string;
|
|
|
|
footer?: string;
|
|
|
|
footer_icon?: string;
|
2017-09-17 12:53:00 +00:00
|
|
|
/**
|
|
|
|
* timestamp as epoch time
|
|
|
|
*/
|
|
|
|
ts?: number;
|
|
|
|
}
|
|
|
|
export declare class SlackMessage {
|
2018-01-10 20:45:25 +00:00
|
|
|
slackmeRef: Slackme;
|
2017-09-17 12:53:00 +00:00
|
|
|
messageOptions: IMessageOptions;
|
2018-01-10 20:45:25 +00:00
|
|
|
constructor(messageOptionsArg: IMessageOptions, slackmeArg?: Slackme);
|
|
|
|
sendToRoom(roomNameArg: string): void;
|
2017-09-17 12:53:00 +00:00
|
|
|
}
|