11/**
2- * Type Definitions for Sendbird SDK v3.1.27
2+ * Type Definitions for Sendbird SDK v3.1.28
33 * homepage: https://sendbird.com/
44 * git: https://github.com/sendbird/Sendbird-SDK-JavaScript
55 */
@@ -187,12 +187,6 @@ declare namespace SendBird {
187187 ADMIN : 'ADMM'
188188 } ;
189189
190- type PollStatus = {
191- OPEN : 'open' ,
192- CLOSED : 'closed' ,
193- REMOVED : 'removed'
194- } ;
195-
196190 type ReplyType = {
197191 ALL : 'all' ,
198192 NONE : 'none' ,
@@ -246,9 +240,6 @@ declare namespace SendBird {
246240 MessageMetaArray : MessageMetaArray ;
247241 Options : Options ;
248242
249- Poll : PollStatic ;
250- PollOption : PollOptionStatic ;
251-
252243 SessionHandler : SessionHandlerStatic ;
253244 UserEventHandler : UserEventHandlerStatic ;
254245 ChannelHandler : ChannelHandlerStatic ;
@@ -267,11 +258,6 @@ declare namespace SendBird {
267258 MessageListParams : MessageListParams ;
268259 ThreadedMessageListParams : ThreadedMessageListParams ;
269260 MessageChangeLogsParams : MessageChangeLogsParams ;
270- PollParams : PollParams ;
271- PollRetrievalParams : PollRetrievalParams ;
272-
273- PollListQuery : PollListQuery ;
274- PollVoterListQuery : PollVoterListQuery ;
275261
276262 CollectionEventSource : typeof CollectionEventSource ;
277263
@@ -475,7 +461,6 @@ declare namespace SendBird {
475461 useMemberAsMessageSender : boolean ;
476462 typingIndicatorThrottle : number ;
477463 websocketResponseTimeout : number ;
478- includePollDetails : boolean ;
479464 }
480465 interface AppInfo {
481466 uploadSizeLimit : number ;
@@ -568,8 +553,6 @@ declare namespace SendBird {
568553 onThreadInfoUpdated ( channel : OpenChannel | GroupChannel , event : ThreadInfoUpdateEvent ) : void ;
569554 onChannelMemberCountChanged ( channels : Array < GroupChannel > ) : void ;
570555 onChannelParticipantCountChanged ( channels : Array < OpenChannel > ) : void ;
571- onPollUpdated ( event : PollUpdateEvent ) : void ;
572- onPollVoted ( event : PollVoteEvent ) : void ;
573556 }
574557
575558 interface ConnectionHandlerStatic {
@@ -717,7 +700,6 @@ declare namespace SendBird {
717700 */
718701 targetLanguages : Array < string > ;
719702 translationTargetLanguages : Array < string > ;
720- pollId : number ;
721703 }
722704 interface UserMessage extends BaseMessageInstance {
723705 messageType : 'user' ;
@@ -733,13 +715,9 @@ declare namespace SendBird {
733715 errorCode : number ;
734716 messageSurvivalSeconds : number ;
735717 plugins : Array < Plugin > ;
736- poll : Poll | null ;
737718
738719 readonly messageParams : UserMessageParams | null ;
739720
740- applyPollUpdateEvent ( event : PollUpdateEvent ) : boolean ;
741- applyPollVoteEvent ( event : PollVoteEvent ) : boolean ;
742-
743721 isResendable ( ) : boolean ;
744722 serialize ( ) : Object ;
745723 }
@@ -798,7 +776,6 @@ declare namespace SendBird {
798776 includeParentMessageText : boolean ;
799777 includeThreadInfo : boolean ;
800778 includeParentMessageInfo : boolean ;
801- includePollDetails : boolean ;
802779 }
803780 interface MessageListParams {
804781 new ( ) : MessageListParams ;
@@ -831,7 +808,6 @@ declare namespace SendBird {
831808 showSubchannelMessagesOnly : boolean ;
832809 replyType : ReplyType [ keyof ReplyType ] ;
833810 includeParentMessageInfo : boolean ;
834- includePollDetails : boolean ;
835811
836812 belongsTo ( messageParams : UserMessageParams | FileMessageParams ) : boolean ;
837813 }
@@ -859,7 +835,6 @@ declare namespace SendBird {
859835 */
860836 includeParentMessageText : boolean ;
861837 includeParentMessageInfo : boolean ;
862- includePollDetails : boolean ;
863838 }
864839 interface MessageChangeLogsParams {
865840 new ( ) : MessageChangeLogsParams ;
@@ -880,7 +855,6 @@ declare namespace SendBird {
880855 includeThreadInfo : boolean ;
881856 replyType : ReplyType [ keyof ReplyType ] ;
882857 includeParentMessageInfo : boolean ;
883- includePollDetails : boolean ;
884858 }
885859
886860 interface ThumbnailObject {
@@ -1067,9 +1041,6 @@ declare namespace SendBird {
10671041 createMessageListQuery ( ) : MessageListQuery ;
10681042 createPreviousMessageListQuery ( ) : PreviousMessageListQuery ;
10691043
1070- createPollListQuery ( ) : PollListQuery ;
1071- createPollVoterListQuery ( pollId : number , optionId : number ) : PollVoterListQuery ;
1072-
10731044 /**
10741045 * @deprecated since version v3.0.123, please use {@link getMessagesByTimestamp()} instead
10751046 */
@@ -1799,7 +1770,6 @@ declare namespace SendBird {
17991770 showSubchannelMessagesOnly : boolean ;
18001771 replyType : ReplyType [ keyof ReplyType ] ;
18011772 includeParentMessageInfo : boolean ;
1802- includePollDetails : boolean ;
18031773
18041774 load ( limit : number , reverse : boolean , messageType ?: number | string , callback ?: messageListCallback ) : Promise < Array < UserMessage | FileMessage | AdminMessage > > ;
18051775 load ( callback ?: messageListCallback ) : Promise < Array < UserMessage | FileMessage | AdminMessage > > ;
@@ -2174,125 +2144,6 @@ declare namespace SendBird {
21742144 serialize ( ) : Object ;
21752145 }
21762146
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-
22962147 type groupChannelCallback = ( groupChannel : GroupChannel , error : SendBirdError ) => void ;
22972148 type distinctGroupChannelCallback = ( response : DistinctGroupChannelResponse , error : SendBirdError ) => void ;
22982149 type getPushPreferenceCallback = ( isPushOn : boolean , error : SendBirdError ) => void ;
0 commit comments