1
1
/**
2
- * Type Definitions for Sendbird SDK v3.1.27
2
+ * Type Definitions for Sendbird SDK v3.1.28
3
3
* homepage: https://sendbird.com/
4
4
* git: https://github.com/sendbird/Sendbird-SDK-JavaScript
5
5
*/
@@ -187,12 +187,6 @@ declare namespace SendBird {
187
187
ADMIN : 'ADMM'
188
188
} ;
189
189
190
- type PollStatus = {
191
- OPEN : 'open' ,
192
- CLOSED : 'closed' ,
193
- REMOVED : 'removed'
194
- } ;
195
-
196
190
type ReplyType = {
197
191
ALL : 'all' ,
198
192
NONE : 'none' ,
@@ -246,9 +240,6 @@ declare namespace SendBird {
246
240
MessageMetaArray : MessageMetaArray ;
247
241
Options : Options ;
248
242
249
- Poll : PollStatic ;
250
- PollOption : PollOptionStatic ;
251
-
252
243
SessionHandler : SessionHandlerStatic ;
253
244
UserEventHandler : UserEventHandlerStatic ;
254
245
ChannelHandler : ChannelHandlerStatic ;
@@ -267,11 +258,6 @@ declare namespace SendBird {
267
258
MessageListParams : MessageListParams ;
268
259
ThreadedMessageListParams : ThreadedMessageListParams ;
269
260
MessageChangeLogsParams : MessageChangeLogsParams ;
270
- PollParams : PollParams ;
271
- PollRetrievalParams : PollRetrievalParams ;
272
-
273
- PollListQuery : PollListQuery ;
274
- PollVoterListQuery : PollVoterListQuery ;
275
261
276
262
CollectionEventSource : typeof CollectionEventSource ;
277
263
@@ -475,7 +461,6 @@ declare namespace SendBird {
475
461
useMemberAsMessageSender : boolean ;
476
462
typingIndicatorThrottle : number ;
477
463
websocketResponseTimeout : number ;
478
- includePollDetails : boolean ;
479
464
}
480
465
interface AppInfo {
481
466
uploadSizeLimit : number ;
@@ -568,8 +553,6 @@ declare namespace SendBird {
568
553
onThreadInfoUpdated ( channel : OpenChannel | GroupChannel , event : ThreadInfoUpdateEvent ) : void ;
569
554
onChannelMemberCountChanged ( channels : Array < GroupChannel > ) : void ;
570
555
onChannelParticipantCountChanged ( channels : Array < OpenChannel > ) : void ;
571
- onPollUpdated ( event : PollUpdateEvent ) : void ;
572
- onPollVoted ( event : PollVoteEvent ) : void ;
573
556
}
574
557
575
558
interface ConnectionHandlerStatic {
@@ -717,7 +700,6 @@ declare namespace SendBird {
717
700
*/
718
701
targetLanguages : Array < string > ;
719
702
translationTargetLanguages : Array < string > ;
720
- pollId : number ;
721
703
}
722
704
interface UserMessage extends BaseMessageInstance {
723
705
messageType : 'user' ;
@@ -733,13 +715,9 @@ declare namespace SendBird {
733
715
errorCode : number ;
734
716
messageSurvivalSeconds : number ;
735
717
plugins : Array < Plugin > ;
736
- poll : Poll | null ;
737
718
738
719
readonly messageParams : UserMessageParams | null ;
739
720
740
- applyPollUpdateEvent ( event : PollUpdateEvent ) : boolean ;
741
- applyPollVoteEvent ( event : PollVoteEvent ) : boolean ;
742
-
743
721
isResendable ( ) : boolean ;
744
722
serialize ( ) : Object ;
745
723
}
@@ -798,7 +776,6 @@ declare namespace SendBird {
798
776
includeParentMessageText : boolean ;
799
777
includeThreadInfo : boolean ;
800
778
includeParentMessageInfo : boolean ;
801
- includePollDetails : boolean ;
802
779
}
803
780
interface MessageListParams {
804
781
new ( ) : MessageListParams ;
@@ -831,7 +808,6 @@ declare namespace SendBird {
831
808
showSubchannelMessagesOnly : boolean ;
832
809
replyType : ReplyType [ keyof ReplyType ] ;
833
810
includeParentMessageInfo : boolean ;
834
- includePollDetails : boolean ;
835
811
836
812
belongsTo ( messageParams : UserMessageParams | FileMessageParams ) : boolean ;
837
813
}
@@ -859,7 +835,6 @@ declare namespace SendBird {
859
835
*/
860
836
includeParentMessageText : boolean ;
861
837
includeParentMessageInfo : boolean ;
862
- includePollDetails : boolean ;
863
838
}
864
839
interface MessageChangeLogsParams {
865
840
new ( ) : MessageChangeLogsParams ;
@@ -880,7 +855,6 @@ declare namespace SendBird {
880
855
includeThreadInfo : boolean ;
881
856
replyType : ReplyType [ keyof ReplyType ] ;
882
857
includeParentMessageInfo : boolean ;
883
- includePollDetails : boolean ;
884
858
}
885
859
886
860
interface ThumbnailObject {
@@ -1067,9 +1041,6 @@ declare namespace SendBird {
1067
1041
createMessageListQuery ( ) : MessageListQuery ;
1068
1042
createPreviousMessageListQuery ( ) : PreviousMessageListQuery ;
1069
1043
1070
- createPollListQuery ( ) : PollListQuery ;
1071
- createPollVoterListQuery ( pollId : number , optionId : number ) : PollVoterListQuery ;
1072
-
1073
1044
/**
1074
1045
* @deprecated since version v3.0.123, please use {@link getMessagesByTimestamp()} instead
1075
1046
*/
@@ -1799,7 +1770,6 @@ declare namespace SendBird {
1799
1770
showSubchannelMessagesOnly : boolean ;
1800
1771
replyType : ReplyType [ keyof ReplyType ] ;
1801
1772
includeParentMessageInfo : boolean ;
1802
- includePollDetails : boolean ;
1803
1773
1804
1774
load ( limit : number , reverse : boolean , messageType ?: number | string , callback ?: messageListCallback ) : Promise < Array < UserMessage | FileMessage | AdminMessage > > ;
1805
1775
load ( callback ?: messageListCallback ) : Promise < Array < UserMessage | FileMessage | AdminMessage > > ;
@@ -2174,125 +2144,6 @@ declare namespace SendBird {
2174
2144
serialize ( ) : Object ;
2175
2145
}
2176
2146
2177
- /**
2178
- * @deprecated
2179
- */
2180
- type pollErrorLastCallback = ( poll : Poll , error : SendBirdError ) => void ;
2181
- type pollErrorFirstCallback = ( error : SendBirdError , poll : Poll ) => void ;
2182
- type pollCallback = pollErrorFirstCallback | pollErrorLastCallback ;
2183
- /**
2184
- * @deprecated
2185
- */
2186
- type pollOptionErrorLastCallback = ( option : PollOption , error : SendBirdError ) => void ;
2187
- type pollOptionErrorFirstCallback = ( error : SendBirdError , option : PollOption ) => void ;
2188
- type pollOptionCallback = pollOptionErrorFirstCallback | pollOptionErrorLastCallback ;
2189
- /**
2190
- * @deprecated
2191
- */
2192
- type pollListQueryErrorLastCallback = ( polls : Array < Poll > , error : SendBirdError ) => void ;
2193
- type pollListQueryErrorFirstCallback = ( error : SendBirdError , polls : Array < Poll > ) => void ;
2194
- type pollListQueryCallback = pollListQueryErrorFirstCallback | pollListQueryErrorLastCallback ;
2195
-
2196
- interface PollStatic {
2197
- Status : PollStatus ;
2198
-
2199
- get ( params : PollRetrievalParams , callback ?: pollCallback ) : Promise < Poll > ;
2200
- create ( pollParams : PollParams , callback ?: pollCallback ) : Promise < Poll > ;
2201
- }
2202
- interface Poll {
2203
- id : number ;
2204
- title : string ;
2205
- details : PollDetails ;
2206
-
2207
- update ( pollParams : PollParams , callback ?: pollCallback ) : Promise < Poll > ;
2208
- delete ( callback ?: voidCallback ) : Promise < void > ;
2209
- addOption ( channelUrl : string , text : string , callback ?: pollCallback ) : Promise < Poll > ;
2210
- vote ( channelUrl : string , optionIds : Array < number > , callback ?: pollCallback ) : Promise < Poll > ;
2211
- close ( callback ?: pollCallback ) : Promise < Poll > ;
2212
- }
2213
- interface PollDetails {
2214
- options : Array < PollOption > ;
2215
- data : object ;
2216
- isAnonymous : boolean ;
2217
- allowUserSuggestion : boolean ;
2218
- allowMultipleVotes : boolean ;
2219
- closeAt : number ;
2220
- voterCount : number ;
2221
- status : PollStatus [ keyof PollStatus ] ;
2222
- createdBy : string ;
2223
- createdAt : number ;
2224
- updatedAt : number ;
2225
- }
2226
- interface PollOptionStatic {
2227
- get ( channelUrl : string , pollId : number , optionId : number , callback ?: pollOptionCallback ) : Promise < PollOption > ;
2228
- }
2229
- interface PollOption {
2230
- pollId : number ;
2231
- id : number ;
2232
- text : string ;
2233
- voteCount : number ;
2234
- partialVoters : User [ ] ;
2235
- createdBy : string ;
2236
- createdAt : number ;
2237
- updatedAt : number ;
2238
-
2239
- update ( text : string , callback ?: pollCallback ) : Promise < Poll > ;
2240
- delete ( callback ?: voidCallback ) : Promise < void > ;
2241
- }
2242
-
2243
- interface PollParams {
2244
- new ( ) : PollParams ;
2245
-
2246
- title : string ;
2247
- options : Array < string > ;
2248
- data ?: string ;
2249
- isAnonymous ?: boolean ;
2250
- allowUserSuggestion ?: boolean ;
2251
- allowMultipleVotes ?: boolean ;
2252
- closeAt ?: number ;
2253
- }
2254
- interface PollRetrievalParams {
2255
- new ( ) : PollRetrievalParams ;
2256
-
2257
- channelUrl : string ;
2258
- pollId : number ;
2259
- showPartialVoters ?: boolean ;
2260
- }
2261
-
2262
- interface PollListQuery {
2263
- token ?: string ;
2264
- limit ?: number ;
2265
- readonly hasNext : boolean ;
2266
- readonly isLoading : boolean ;
2267
- next ( callback ?: pollListQueryCallback ) : Promise < Array < Poll > > ;
2268
- }
2269
-
2270
- interface PollVoterListQuery {
2271
- pollId : number ;
2272
- optionId : number ;
2273
- token ?: string ;
2274
- limit ?: number ;
2275
- readonly hasNext : boolean ;
2276
- readonly isLoading : boolean ;
2277
- next ( callback ?: userListQueryCallback ) : Promise < Array < User > > ;
2278
- }
2279
-
2280
- interface PollUpdateEvent {
2281
- new ( ) : PollUpdateEvent ;
2282
- poll : Poll ;
2283
- status : PollStatus [ keyof PollStatus ] ;
2284
- }
2285
- interface PollUpdatedVoteCount {
2286
- optionId : number ;
2287
- voteCount : number ;
2288
- }
2289
- interface PollVoteEvent {
2290
- new ( ) : PollVoteEvent ;
2291
- pollId : number ;
2292
- updatedVoteCounts : Array < PollUpdatedVoteCount > ;
2293
- ts : number ;
2294
- }
2295
-
2296
2147
type groupChannelCallback = ( groupChannel : GroupChannel , error : SendBirdError ) => void ;
2297
2148
type distinctGroupChannelCallback = ( response : DistinctGroupChannelResponse , error : SendBirdError ) => void ;
2298
2149
type getPushPreferenceCallback = ( isPushOn : boolean , error : SendBirdError ) => void ;
0 commit comments