Skip to content

Commit aff41a2

Browse files
Release - 4.11.1
1 parent 24419a6 commit aff41a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+10244
-388
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v4.11.1 (Mar 07, 2024)
4+
### **Improvement**
5+
- Fixed a bug that `markAsRead()` with messages wrongly signals updating messages in `NotificationCollection`
6+
- Improvement stability
37
## v4.11.0 (Feb 28, 2024)
48
### **Features**
59
### MessageTemplate

cjs/feedChannel.cjs

+1
Large diffs are not rendered by default.

cjs/feedChannel.d.cts

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
export {
2+
FeedChannel,
3+
FeedChannelChangelogs,
4+
FeedChannelChangeLogsParams,
5+
FeedChannelEventContext,
6+
FeedChannelHandler,
7+
FeedChannelListQuery,
8+
FeedChannelListQueryParams,
9+
FeedChannelModule,
10+
GlobalNotificationChannelSetting,
11+
NotificationCategory,
12+
NotificationCollection,
13+
NotificationCollectionEventHandler,
14+
NotificationCollectionParams,
15+
NotificationData,
16+
NotificationEventContext,
17+
NotificationMessage,
18+
NotificationMessageStatus,
19+
NotificationTemplate,
20+
NotificationTemplateList,
21+
NotificationTemplateListParams,
22+
SendbirdFeedChat,
23+
} from './lib/__definition.cjs';

cjs/feedChannel.js

-1
This file was deleted.

cjs/groupChannel.cjs

+1
Large diffs are not rendered by default.

cjs/groupChannel.d.cts

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
export {
2+
CountPreference,
3+
DeliveryStatus,
4+
GroupChannel,
5+
GroupChannelChangelogs,
6+
GroupChannelChangeLogsParams,
7+
GroupChannelCollection,
8+
GroupChannelCollectionEventHandler,
9+
GroupChannelCollectionParams,
10+
GroupChannelCountParams,
11+
GroupChannelCreateParams,
12+
GroupChannelEventContext,
13+
GroupChannelEventSource,
14+
GroupChannelFilter,
15+
GroupChannelFilterParams,
16+
GroupChannelHandler,
17+
GroupChannelHideParams,
18+
GroupChannelListOrder,
19+
GroupChannelListQuery,
20+
GroupChannelListQueryParams,
21+
GroupChannelModule,
22+
GroupChannelSearchField,
23+
GroupChannelSearchFilter,
24+
GroupChannelUpdateParams,
25+
GroupChannelUserIdsFilter,
26+
HiddenChannelFilter,
27+
HiddenState,
28+
Member,
29+
MemberListOrder,
30+
MemberListQuery,
31+
MemberListQueryParams,
32+
MembershipFilter,
33+
MemberState,
34+
MemberStateFilter,
35+
MessageCollection,
36+
MessageCollectionEventHandler,
37+
MessageCollectionInitHandler,
38+
MessageCollectionInitPolicy,
39+
MessageCollectionInitResultHandler,
40+
MessageCollectionParams,
41+
MessageEventContext,
42+
MessageEventSource,
43+
MessageFilter,
44+
MessageFilterParams,
45+
MutedMemberFilter,
46+
MutedState,
47+
MyMemberStateFilter,
48+
OperatorFilter,
49+
PinnedMessage,
50+
PinnedMessageListQuery,
51+
PinnedMessageListQueryParams,
52+
PublicChannelFilter,
53+
PublicGroupChannelListOrder,
54+
PublicGroupChannelListQuery,
55+
PublicGroupChannelListQueryParams,
56+
QueryType,
57+
ReadStatus,
58+
ScheduledFileMessageCreateParams,
59+
ScheduledFileMessageUpdateParams,
60+
ScheduledMessageListOrder,
61+
ScheduledMessageListQuery,
62+
ScheduledMessageListQueryParams,
63+
ScheduledStatus,
64+
ScheduledUserMessageCreateParams,
65+
ScheduledUserMessageUpdateParams,
66+
SendbirdGroupChat,
67+
SuperChannelFilter,
68+
TotalScheduledMessageCountParams,
69+
TotalUnreadMessageCountParams,
70+
UnreadChannelFilter,
71+
UnreadItemCount,
72+
UnreadItemCountParams,
73+
UnreadItemKey,
74+
UnreadMessageCount,
75+
} from './lib/__definition.cjs';

cjs/groupChannel.js

-1
This file was deleted.

cjs/index.cjs

+1
Large diffs are not rendered by default.

cjs/index.d.cts

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import './message.d.cts';
2+
import './groupChannel.d.cts';
3+
import './openChannel.d.cts';
4+
import './poll.d.cts';
5+
import './feedChannel.d.cts';
6+
7+
export {
8+
AppInfo,
9+
ApplicationUserListQuery,
10+
ApplicationUserListQueryParams,
11+
BannedUserListQuery,
12+
BannedUserListQueryParams,
13+
BaseChannel,
14+
BlockedUserListQuery,
15+
BlockedUserListQueryParams,
16+
CachedChannelInfo,
17+
CachedDataClearOrder,
18+
ChannelType,
19+
CollectionEventSource,
20+
ConnectionHandler,
21+
ConnectionState,
22+
DeviceOsInfo,
23+
DeviceOsPlatform,
24+
DoNotDisturbPreference,
25+
Emoji,
26+
EmojiCategory,
27+
EmojiContainer,
28+
Encryption,
29+
FileCompat,
30+
FileUploadParams,
31+
FileUploadResult,
32+
FriendChangelogs,
33+
FriendDiscovery,
34+
FriendListQuery,
35+
FriendListQueryParams,
36+
InvitationPreference,
37+
LocalCacheConfig,
38+
LocalCacheConfigParams,
39+
LogLevel,
40+
MemoryStore,
41+
MemoryStoreParams,
42+
MetaCounter,
43+
MetaData,
44+
MutedInfo,
45+
MutedUserListQuery,
46+
MutedUserListQueryParams,
47+
NotificationInfo,
48+
OnlineDetectorListener,
49+
OperatorListQuery,
50+
OperatorListQueryParams,
51+
Participant,
52+
Plugin,
53+
PushTemplate,
54+
PushTokenRegistrationState,
55+
PushTokens,
56+
PushTokenType,
57+
PushTriggerOption,
58+
ReportCategory,
59+
RestrictedUser,
60+
RestrictionInfo,
61+
RestrictionType,
62+
Role,
63+
SendbirdChatOptions,
64+
SendbirdChatParams,
65+
SendbirdChatWith,
66+
SendbirdError,
67+
SendbirdPlatform,
68+
SendbirdProduct,
69+
SendbirdSdkInfo,
70+
SessionHandler,
71+
SnoozePeriod,
72+
StoreItem,
73+
UIKitConfigInfo,
74+
UploadProgressHandler,
75+
UploadStartedHandler,
76+
User,
77+
UserEventHandler,
78+
UserOnlineState,
79+
UserUpdateParams,
80+
} from './lib/__definition.cjs';
81+
82+
import { SendbirdChat } from './lib/__definition.cjs';
83+
export default SendbirdChat;

cjs/index.js

-1
This file was deleted.

cjs/lib/__bundle-02a3b687.js

-2
This file was deleted.

cjs/lib/__bundle-0946b84e.cjs

+1
Large diffs are not rendered by default.

cjs/lib/__bundle-096583f5.js

-1
This file was deleted.

cjs/lib/__bundle-0eda27c3.cjs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var e,t=require("./__bundle-99f1d30a.cjs"),n=require("./__bundle-0946b84e.cjs"),s=require("./__bundle-dae7bdf2.cjs");exports.ChannelEventCategory=void 0,(e=exports.ChannelEventCategory||(exports.ChannelEventCategory={}))[e.NONE=0]="NONE",e[e.CHANNEL_ENTER=10102]="CHANNEL_ENTER",e[e.CHANNEL_EXIT=10103]="CHANNEL_EXIT",e[e.USER_CHANNEL_MUTE=10201]="USER_CHANNEL_MUTE",e[e.USER_CHANNEL_UNMUTE=10200]="USER_CHANNEL_UNMUTE",e[e.USER_CHANNEL_BAN=10601]="USER_CHANNEL_BAN",e[e.USER_CHANNEL_UNBAN=10600]="USER_CHANNEL_UNBAN",e[e.CHANNEL_FREEZE=10701]="CHANNEL_FREEZE",e[e.CHANNEL_UNFREEZE=10700]="CHANNEL_UNFREEZE",e[e.TYPING_START=10900]="TYPING_START",e[e.TYPING_END=10901]="TYPING_END",e[e.CHANNEL_JOIN=1e4]="CHANNEL_JOIN",e[e.CHANNEL_LEAVE=10001]="CHANNEL_LEAVE",e[e.CHANNEL_OPERATOR_UPDATE=10002]="CHANNEL_OPERATOR_UPDATE",e[e.CHANNEL_INVITE=10020]="CHANNEL_INVITE",e[e.CHANNEL_ACCEPT_INVITE=10021]="CHANNEL_ACCEPT_INVITE",e[e.CHANNEL_DECLINE_INVITE=10022]="CHANNEL_DECLINE_INVITE",e[e.CHANNEL_PROP_CHANGED=11e3]="CHANNEL_PROP_CHANGED",e[e.CHANNEL_DELETED=12e3]="CHANNEL_DELETED",e[e.CHANNEL_META_DATA_CHANGED=11100]="CHANNEL_META_DATA_CHANGED",e[e.CHANNEL_META_COUNTERS_CHANGED=11200]="CHANNEL_META_COUNTERS_CHANGED",e[e.CHANNEL_HIDE=13e3]="CHANNEL_HIDE",e[e.CHANNEL_UNHIDE=13001]="CHANNEL_UNHIDE",e[e.PINNED_MESSAGE_CHANGED=11300]="PINNED_MESSAGE_CHANGED";class a{constructor(e){var t;this.channelUrl=e.channel_url,this.channelType=e.channel_type,this.category=e.cat,this.data=null!==(t=e.data)&&void 0!==t?t:{},this.ts=e.ts}get isGroupChannelEvent(){return this.channelType===t.ChannelType.GROUP}get isOpenChannelEvent(){return this.channelType===t.ChannelType.OPEN}}class o extends t.WebSocketEventCommand{constructor(e,t,n){super(e,"SYEV",n),this.event=new a(n)}}class r extends t.InstancedObject{get _messageBroadcast(){return n.MessageBroadcast.of(this._iid)}constructor(e,t){super(e),this._logger=t.logger,this._sdkState=t.sdkState,this._sessionManager=t.sessionManager,this._requestQueue=t.requestQueue,this._dispatcher=t.dispatcher,this._cacheContext=t.cacheContext,this._channelType=t.channelType}subscribeMessageEvent(e,t){this._messageBroadcast.subscribe(e,t)}unsubscribeMessageEvent(e){this._messageBroadcast.unsubscribe(e)}getMessageFromCache(e){return t.__awaiter(this,void 0,void 0,(function*(){return null}))}getExactlyMatchingMessagesForTokenFromCache(e,n,s){return t.__awaiter(this,void 0,void 0,(function*(){return[]}))}getMessagesFromCache(e,n,s,a,o,r){return t.__awaiter(this,void 0,void 0,(function*(){return[]}))}getPollMessagesFromCache(e,n,s,a){return t.__awaiter(this,void 0,void 0,(function*(){return[]}))}getCachedMessageCountBetween(e,n,s,a){return t.__awaiter(this,void 0,void 0,(function*(){return 0}))}getUnsentMessagesFromCache(e,n){return t.__awaiter(this,void 0,void 0,(function*(){return[]}))}removeFailedMessageFromCache(e){return t.__awaiter(this,void 0,void 0,(function*(){}))}}class E extends t.WebSocketEventCommand{constructor(e,s,a){var o,r,E,i;super(e,"ADMM",a),this.message=new n.AdminMessage(e,a);const{sdkState:N}=t.Vault.of(e);this.isMentioned=t.checkIfMentioned(this.message.mentionType,null!==(E=null!==(o=this.message.mentionedUserIds)&&void 0!==o?o:null===(r=this.message.mentionedUsers)||void 0===r?void 0:r.map((e=>e.userId)))&&void 0!==E?E:[],N.userId),this.forceUpdateLastMessage=null!==(i=a.force_update_last_message)&&void 0!==i&&i}}class i extends t.WebSocketEventCommand{constructor(e,s,a){var o,r,E,i,N;super(e,"AEDI",a),this.message=new n.AdminMessage(e,a);const{sdkState:_}=t.Vault.of(e);this.mentionCountChange=t.calculateMentionCountChange({mentionType:null===(o=a.old_values)||void 0===o?void 0:o.mention_type,mentionedUserIds:null!==(E=null===(r=a.old_values)||void 0===r?void 0:r.mentioned_user_ids)&&void 0!==E?E:[]},t.undefineNullProps({mentionType:this.message.mentionType,mentionedUserIds:null!==(i=this.message.mentionedUserIds)&&void 0!==i?i:null===(N=this.message.mentionedUsers)||void 0===N?void 0:N.map((e=>e.userId))}),_.userId)}}class N extends t.WebSocketEventCommand{constructor(e,t,s){super(e,"MRCT",s),this.channelUrl=s.channel_url,this.channelType=s.channel_type,this.event=new n.ReactionEvent(s)}}class _ extends t.WebSocketEventCommand{constructor(e,t,s){super(e,"MTHD",s),this.event=new n.ThreadInfoUpdateEvent(e,s)}}class d extends t.WebSocketEventCommand{constructor(e,t,n){super(e,"MCNT",n),this.groupChannelMemberCounts=n.group_channels.map((e=>({channelUrl:e.channel_url,memberCount:e.member_count,joinedMemberCount:e.joined_member_count,updatedAt:e.ts}))),this.openChannelMemberCounts=n.open_channels.map((e=>({channelUrl:e.channel_url,participantCount:e.participant_count,updatedAt:e.ts})))}}class c extends t.WebSocketEventCommand{constructor(e,n,a){super(e,"PEDI",a),this.event=new s.PollUpdateEvent(e,a),this.status=t.parsePollStatusPayload(a.poll.status)||a.poll.status,this.channelUrl=a.channel_url,this.channelType=a.channel_type}}exports.AdminMessageEventCommand=E,exports.BaseChannelManager=r,exports.ChannelEventCommand=o,exports.MemberCountUpdateEventCommand=d,exports.OperatorUpdateEventCommand=class extends o{constructor(e,n,s){super(e,n,s);const{operators:a=[]}=s.data;this.operators=a.map((e=>new t.User(this._iid,e)))}},exports.PollUpdateEventCommand=c,exports.ReactionEventCommand=N,exports.ThreadInfoUpdateEventCommand=_,exports.UpdateAdminMessageEventCommand=i;

cjs/lib/__bundle-0f203f91.js

-1
This file was deleted.

cjs/lib/__bundle-199aea8b.cjs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var e=require("./__bundle-99f1d30a.cjs");class a extends e.BaseCommand{}exports.NotificationCollectionRefreshCommand=a,exports.getFeedChannelIndexBy=e=>["-lastMessageUpdatedAt","-createdAt","syncIndex"];
File renamed without changes.

cjs/lib/__bundle-2edbd46d.js

-1
This file was deleted.

cjs/lib/__bundle-38510d96.cjs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var e=require("./__bundle-99f1d30a.cjs");exports.xmlHttpRequest=(r,t)=>new Promise(((s,n)=>{if("undefined"!=typeof XMLHttpRequest){const{dispatcher:o,logger:d}=e.Vault.of(r),{requestId:a,method:i,url:u,headers:p={},data:c="",uploadProgressHandler:l}=t;let m=!1;const f=new XMLHttpRequest;f.open(i,u);for(const e in p)f.setRequestHeader(e,p[e]);l&&f.upload.addEventListener("progress",(e=>{e.lengthComputable?l(a,e.loaded,e.total):d.debug("Progress computing failed: `Content-Length` header is not given.")})),f.onabort=()=>{n(e.SendbirdError.requestCanceled)},f.onerror=r=>{n(e.SendbirdError.networkError)},f.onreadystatechange=()=>{if(f.readyState===XMLHttpRequest.DONE&&!m)if(0===f.status||f.status>=200&&f.status<400)try{const t=JSON.parse(f.responseText);s(new e.APIResponseCommand(r,t))}catch(r){n(e.SendbirdError.networkError)}else try{const r=JSON.parse(f.responseText);if(r){const t=new e.SendbirdError(r);if(t.isSessionExpiredError){if(o.dispatch(new e.SessionExpiredCommand({reason:t.code})),!(f instanceof e.SessionRefreshAPICommand)){const r=new e.Deferred;return o.dispatch(new e.RequestResendCommand({request:f,deferred:r,error:t})),r.promise}}else t.isSessionInvalidatedError&&o.dispatch(new e.SessionExpiredCommand({reason:t.code}));n(t)}else n(e.SendbirdError.requestFailed)}catch(r){n(e.SendbirdError.requestFailed)}},o.on((r=>{r instanceof e.CancelXMLHttpRequestCommand&&(r.requestId&&r.requestId!==a||(m=!0,f.abort()))})),f.send(c)}else n(e.SendbirdError.xmlHttpRequestNotSupported)}));

cjs/lib/__bundle-56a263f4.js

-1
This file was deleted.

0 commit comments

Comments
 (0)