Skip to content

Commit

Permalink
Add ChatRoom and SendChatMessage in Typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
symphony-jean-michael committed Aug 8, 2022
1 parent 44c2d61 commit bc31906
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/context/ContextType.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export enum ContextTypes {
Chart = 'fdc3.chart',
ChatInitSettings = 'fdc3.chat.initSettings',
ChatRoom = 'fdc3.chat.room',
Contact = 'fdc3.contact',
ContactList = 'fdc3.contactList',
Country = 'fdc3.country',
Expand Down
14 changes: 14 additions & 0 deletions src/context/ContextTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,20 @@ export interface ChatInitSettings {
type: any;
}

export interface ChatRoom {
id: { [key: string]: string };
name?: string;
providerName: string;
type: string;
uri?: string;
}

export interface ChatMessage {
chatRoom: ChatRoom;
message: string; // TODO: Replace 'string' by 'Message' after the merge of the PR https://github.com/finos/FDC3/pull/779
type: string;
}

export interface ContactList {
contacts: Contact[];
type: string;
Expand Down
1 change: 1 addition & 0 deletions src/intents/Intents.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export enum Intents {
SendChatMessage = 'SendChatMessage',
StartCall = 'StartCall',
StartChat = 'StartChat',
StartEmail = 'StartEmail',
Expand Down

0 comments on commit bc31906

Please sign in to comment.