sceyt-chat-react-uikit 1.7.5-beta.1 → 1.7.5-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sceyt-chat-react-uikit",
3
- "version": "1.7.5-beta.1",
3
+ "version": "1.7.5-beta.11",
4
4
  "description": "Interactive React UI Components for Sceyt Chat.",
5
5
  "author": "Sceyt",
6
6
  "license": "MIT",
package/types/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export interface IAction {
5
5
  }
6
6
  export interface IUser {
7
7
  id: string;
8
+ avatar?: string;
8
9
  firstName: string;
9
10
  lastName: string;
10
11
  avatarUrl?: string;
@@ -80,6 +81,61 @@ export interface IMarker {
80
81
  createdAt: Date;
81
82
  user: IUser | null;
82
83
  }
84
+ export interface IPollOption {
85
+ id: string;
86
+ name: string;
87
+ }
88
+ export interface IPollVote {
89
+ optionId: string;
90
+ createdAt: number;
91
+ user: {
92
+ id: string;
93
+ presence: {
94
+ status: string;
95
+ };
96
+ profile: {
97
+ avatar: string;
98
+ firstName: string;
99
+ lastName: string;
100
+ metadata: string;
101
+ metadataMap: {
102
+ [key: string]: string;
103
+ };
104
+ updatedAt: number;
105
+ username: string;
106
+ createdAt: number;
107
+ };
108
+ createdAt: number;
109
+ };
110
+ }
111
+ export interface IPollDetails {
112
+ id: string;
113
+ name: string;
114
+ description: string;
115
+ options: IPollOption[];
116
+ anonymous: boolean;
117
+ allowMultipleVotes: boolean;
118
+ allowVoteRetract: boolean;
119
+ votesPerOption: {
120
+ [key: string]: number;
121
+ };
122
+ votes: IPollVote[];
123
+ ownVotes: IPollVote[];
124
+ createdAt: number;
125
+ updatedAt: number;
126
+ closedAt: number;
127
+ closed: boolean;
128
+ }
129
+ export interface IPollVoteParams {
130
+ channelId: string;
131
+ messageId: string;
132
+ pollId: string;
133
+ optionId: string[];
134
+ }
135
+ export interface IPollUpdateParams {
136
+ channelId: string;
137
+ pollId: string;
138
+ }
83
139
  export interface IMessage {
84
140
  id: string;
85
141
  tid?: string;
@@ -120,6 +176,7 @@ export interface IMessage {
120
176
  messageId: string;
121
177
  user: IUser;
122
178
  };
179
+ pollDetails?: IPollDetails;
123
180
  }
124
181
  export interface IMember extends IUser {
125
182
  role: string;