Skip to content

Commit

Permalink
fix: remove un used method & type (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bloomingg authored Sep 27, 2024
1 parent 39bc7f8 commit e809260
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 164 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openim/wasm-client-sdk",
"version": "3.8.2-beta.3",
"version": "3.8.2-beta.4",
"description": "open im sdk for web",
"source": "src/index.ts",
"main": "lib/index.js",
Expand Down
73 changes: 7 additions & 66 deletions src/sdk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
ChangeGroupMemberMuteParams,
ChangeGroupMuteParams,
CreateGroupParams,
CreateMeetingParams,
CustomMsgParams,
CustomSignalParams,
FaceMessageParams,
Expand All @@ -34,7 +33,6 @@ import {
SetConversationRecvOptParams,
JoinGroupParams,
LocationMsgParams,
MeetingOperateStreamParams,
UpdateMemberInfoParams,
MergerMsgParams,
PartialUserItem,
Expand Down Expand Up @@ -62,7 +60,6 @@ import {
SplitConversationParams,
TransferGroupParams,
TypingUpdateParams,
UpdateMeetingParams,
UploadFileParams,
VideoMsgParamsByURL,
SetGroupMemberNickParams,
Expand Down Expand Up @@ -90,7 +87,6 @@ import {
GroupItem,
GroupMemberItem,
IMConfig,
MeetingRecord,
MessageItem,
PublicUserItem,
RtcInviteResults,
Expand Down Expand Up @@ -1585,6 +1581,13 @@ class SDK extends Emitter {
[operationID, roomID]
);
};
getSignalingInvitationInfoStartApp = (operationID = uuidv4()) => {
return this._invoker<RtcInviteResults>(
'getSignalingInvitationInfoStartApp ',
window.getSignalingInvitationInfoStartApp,
[operationID]
);
};
signalingSendCustomSignal = <T>(
data: CustomSignalParams,
operationID = uuidv4()
Expand All @@ -1595,68 +1598,6 @@ class SDK extends Emitter {
[operationID, data.customInfo, data.roomID]
);
};
signalingCreateMeeting = (
data: CreateMeetingParams,
operationID = uuidv4()
) => {
return this._invoker<RtcInviteResults>(
'signalingCreateMeeting ',
window.signalingCreateMeeting,
[operationID, JSON.stringify(data)]
);
};
signalingJoinMeeting = (data: string, operationID = uuidv4()) => {
return this._invoker<RtcInviteResults>(
'signalingJoinMeeting ',
window.signalingJoinMeeting,
[
operationID,
JSON.stringify({
roomID: data,
}),
]
);
};
signalingUpdateMeetingInfo = <T>(
data: Partial<UpdateMeetingParams> & { roomID: string },
operationID = uuidv4()
) => {
return this._invoker<T>(
'signalingUpdateMeetingInfo ',
window.signalingUpdateMeetingInfo,
[operationID, JSON.stringify(data)]
);
};
signalingCloseRoom = <T>(roomID: string, operationID = uuidv4()) => {
return this._invoker<T>('signalingCloseRoom ', window.signalingCloseRoom, [
operationID,
roomID,
]);
};
signalingGetMeetings = (operationID = uuidv4()) => {
return this._invoker<{ meetingInfoList: MeetingRecord[] }>(
'signalingGetMeetings ',
window.signalingGetMeetings,
[operationID]
);
};
signalingOperateStream = <T>(
data: MeetingOperateStreamParams,
operationID = uuidv4()
) => {
return this._invoker<T>(
'signalingOperateStream ',
window.signalingOperateStream,
[
operationID,
data.streamType,
data.roomID,
data.userID,
data.mute,
data.muteAll,
]
);
};
setConversationIsMsgDestruct = <T>(
data: SetConversationMsgDestructParams,
operationID = uuidv4()
Expand Down
73 changes: 23 additions & 50 deletions src/types/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,6 @@ export type FriendApplicationItem = {
toNickname: string;
toUserID: string;
};
export type FullUserItem = {
blackInfo: BlackUserItem | null;
friendInfo: FriendUserItem | null;
publicInfo: PublicUserItem | null;
};
export type FullUserItemWithCache = {
blackInfo: BlackUserItem | null;
friendInfo: FriendUserItem | null;
publicInfo: PublicUserItem | null;
groupMemberInfo: GroupMemberItem | null;
};
export type PublicUserItem = {
nickname: string;
userID: string;
Expand Down Expand Up @@ -210,7 +199,7 @@ export type ConversationItem = {
isPrivateChat: boolean;
isMsgDestruct: boolean;
attachedInfo: string;
ex: string;
ex?: string;
};
export type MessageItem = {
clientMsgID: string;
Expand All @@ -230,27 +219,26 @@ export type MessageItem = {
seq: number;
isRead: boolean;
status: MessageStatus;
isReact: boolean;
isExternalExtensions: boolean;
offlinePush: OfflinePush;
attachedInfo: string;
ex: string;
localEx: string;
textElem: TextElem;
cardElem: CardElem;
pictureElem: PictureElem;
soundElem: SoundElem;
videoElem: VideoElem;
fileElem: FileElem;
mergeElem: MergeElem;
atTextElem: AtTextElem;
faceElem: FaceElem;
locationElem: LocationElem;
customElem: CustomElem;
quoteElem: QuoteElem;
notificationElem: NotificationElem;
advancedTextElem: AdvancedTextElem;
typingElem: TypingElem;
isReact?: boolean;
isExternalExtensions?: boolean;
offlinePush?: OfflinePush;
ex?: string;
localEx?: string;
textElem?: TextElem;
cardElem?: CardElem;
pictureElem?: PictureElem;
soundElem?: SoundElem;
videoElem?: VideoElem;
fileElem?: FileElem;
mergeElem?: MergeElem;
atTextElem?: AtTextElem;
faceElem?: FaceElem;
locationElem?: LocationElem;
customElem?: CustomElem;
quoteElem?: QuoteElem;
notificationElem?: NotificationElem;
advancedTextElem?: AdvancedTextElem;
typingElem?: TypingElem;
attachedInfoElem: AttachedInfoElem;
};
export type TextElem = {
Expand Down Expand Up @@ -326,9 +314,8 @@ export type AttachedInfoElem = {
inEncryptStatus: boolean;
burnDuration: number;
hasReadTime: number;
notSenderNotificationPush: boolean;
messageEntityList: MessageEntity[];
uploadProgress: UploadProgress;
messageEntityList?: MessageEntity[];
uploadProgress?: UploadProgress;
};
export type UploadProgress = {
total: number;
Expand Down Expand Up @@ -483,17 +470,3 @@ export type CallingRoomData = {
invitation?: RtcInvite;
roomID: string;
};

export type MeetingRecord = {
createTime: number;
endTime: number;
hostUserID: string;
joinDisableVideo: boolean;
roomID: string;
meetingName: string;
onlyHostInviteUser: boolean;
participantCanEnableVideo: boolean;
startTime: number;
hostFaceURL?: string;
hostNickname?: string;
};
7 changes: 1 addition & 6 deletions src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -809,13 +809,8 @@ declare global {
signalingHungUp: (...args) => Promise<string>;
signalingGetRoomByGroupID: (...args) => Promise<string>;
signalingGetTokenByRoomID: (...args) => Promise<string>;
getSignalingInvitationInfoStartApp: (...args) => Promise<string>;
signalingSendCustomSignal: (...args) => Promise<string>;
signalingCreateMeeting: (...args) => Promise<string>;
signalingJoinMeeting: (...args) => Promise<string>;
signalingUpdateMeetingInfo: (...args) => Promise<string>;
signalingCloseRoom: (...args) => Promise<string>;
signalingGetMeetings: (operationID: string) => Promise<string>;
signalingOperateStream: (...args) => Promise<string>;
setConversationIsMsgDestruct: (...args) => Promise<string>;
setConversationMsgDestructTime: (...args) => Promise<string>;

Expand Down
41 changes: 0 additions & 41 deletions src/types/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,47 +397,6 @@ export type CustomSignalParams = {
customInfo: string;
};

export type CreateMeetingParams = {
meetingName: string;
meetingHostUserID: string;
startTime: number;
meetingDuration: number;
inviteeUserIDList: string[];
};

export type UpdateMeetingParams = {
roomID: string;
meetingName: string;
startTime: number;
endTime: number;
participantCanUnmuteSelf: boolean;
participantCanEnableVideo: boolean;
onlyHostInviteUser: boolean;
onlyHostShareScreen: boolean;
joinDisableMicrophone: boolean;
joinDisableVideo: boolean;
isMuteAllVideo: boolean;
isMuteAllMicrophone: boolean;
addCanScreenUserIDList: string[];
reduceCanScreenUserIDList: string[];
addDisableMicrophoneUserIDList: string[];
reduceDisableMicrophoneUserIDList: string[];
addDisableVideoUserIDList: string[];
reduceDisableVideoUserIDList: string[];
addPinedUserIDList: string[];
reducePinedUserIDList: string[];
addBeWatchedUserIDList: string[];
reduceBeWatchedUserIDList: string[];
};

export type MeetingOperateStreamParams = {
streamType: string;
roomID: string;
userID?: string;
mute: boolean;
muteAll: boolean;
};

export type SetConversationMsgDestructParams = {
conversationID: string;
isMsgDestruct: boolean;
Expand Down

0 comments on commit e809260

Please sign in to comment.