mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 17:14:05 -08:00
6a35812f92
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
Benchmark Docker Image CI / build (push) Waiting to run
Co-authored-by: Tomi Turtiainen <10324676+tomi@users.noreply.github.com>
109 lines
1.8 KiB
TypeScript
109 lines
1.8 KiB
TypeScript
import type { IDataObject } from 'n8n-workflow';
|
|
|
|
export interface IMessage {
|
|
name?: string;
|
|
sender?: IUser;
|
|
createTime?: string;
|
|
text?: string;
|
|
cards?: IDataObject[];
|
|
previewText?: string;
|
|
annotations?: IDataObject[];
|
|
thread?: IDataObject[];
|
|
space?: IDataObject;
|
|
fallbackText?: string;
|
|
actionResponse?: IDataObject;
|
|
argumentText?: string;
|
|
slashCommand?: IDataObject;
|
|
attachment?: IDataObject[];
|
|
}
|
|
|
|
export interface IMessageUi {
|
|
text?: string;
|
|
cards?: {
|
|
metadata: IDataObject[];
|
|
};
|
|
}
|
|
|
|
export interface IUser {
|
|
name?: string;
|
|
displayName?: string;
|
|
domainId?: string;
|
|
type?: Type;
|
|
isAnonymous?: boolean;
|
|
}
|
|
const enum Type {
|
|
TYPE_UNSPECIFIED,
|
|
HUMAN,
|
|
BOT,
|
|
}
|
|
|
|
// // TODO: define other interfaces
|
|
//
|
|
// export interface IMessage {s
|
|
// name?: string;
|
|
// sender?: IUser;
|
|
// createTime?: string;
|
|
// text?: string;
|
|
// cards?: ICard[];
|
|
// previewText?: string;
|
|
// annotations?: IAnnotation[];
|
|
// thread?: IThread[];
|
|
// space?: ISpace;
|
|
// fallbackText?: string;
|
|
// actionResponse?: IActionResponse;
|
|
// argumentText?: string;
|
|
// slashCommand?: ISlashCommand;
|
|
// attachment?: IAttachment[];
|
|
// }
|
|
//
|
|
// export interface ICard {
|
|
// header?: ICardHeader;
|
|
// sections?: ISection[];
|
|
// cardActions?: ICardAction[];
|
|
// name?: string;
|
|
// }
|
|
//
|
|
// export interface ICardHeader {
|
|
// title: string;
|
|
// subtitle: string;
|
|
// imageStyle: ImageStyleType;
|
|
// imageUrl: string;
|
|
// }
|
|
// enum ImageStyleType {
|
|
// 'IMAGE_STYLE_UNSPECIFIED',
|
|
// 'IMAGE',
|
|
// 'AVATAR',
|
|
// }
|
|
//
|
|
// export interface ISection {
|
|
//
|
|
// }
|
|
//
|
|
// export interface ICardAction {
|
|
//
|
|
// }
|
|
//
|
|
// export interface IAnnotation {
|
|
//
|
|
// }
|
|
//
|
|
// export interface IThread {
|
|
//
|
|
// }
|
|
//
|
|
// export interface ISpace {
|
|
//
|
|
// }
|
|
//
|
|
// export interface IActionResponse {
|
|
//
|
|
// }
|
|
//
|
|
// export interface ISlashCommand {
|
|
//
|
|
// }
|
|
//
|
|
// export interface IAttachment {
|
|
// // attachments are not available for bots
|
|
// }
|