mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
✨ Add Google Chat node (#2795)
* Adding Google Chat node * refactoring * More refactoring after feedback * Fixing linter issues * Fixing missed linter issue (credentialTest) * Fixing warnings * 👕 Fix lint issue * ⚡ Improvements * ⚡ Improvements * ⚡ Make it also work with credentials that contain \n * ⚡ Comment out unneeded imports Co-authored-by: Valentina <valentina.lilova98@gmail.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
This commit is contained in:
108
packages/nodes-base/nodes/Google/Chat/MessageInterface.ts
Normal file
108
packages/nodes-base/nodes/Google/Chat/MessageInterface.ts
Normal file
@@ -0,0 +1,108 @@
|
||||
import { 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;
|
||||
}
|
||||
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
|
||||
// }
|
||||
Reference in New Issue
Block a user