@openim/client-sdk
Version:
JavaScript/TypeScript Client SDK for OpenIM
50 lines (49 loc) • 4.55 kB
TypeScript
import type { AccessGroupParams, ChangeGroupMemberMuteParams, ChangeGroupMuteParams, CreateGroupParams, GetGroupMemberParams, JoinGroupParams, OffsetParams, OpreateGroupParams, SetGroupInfoParams, TransferGroupParams, UpdateMemberInfoParams, getGroupMembersInfoParams } from '../../types/params';
import { MixinApiService } from '..';
import type { GroupApplicationItem, GroupItem, GroupMemberItem, ApiResponse } from '../../types/entity';
export declare function setupGroup(apiService: MixinApiService): {
createGroup: (params: CreateGroupParams, operationID: string) => Promise<ApiResponse<any>>;
joinGroup: (params: JoinGroupParams, operationID: string) => Promise<ApiResponse<any>>;
inviteUserToGroup: (params: OpreateGroupParams, operationID: string) => Promise<ApiResponse<any>>;
getJoinedGroupListPage: (params: OffsetParams, operationID: string) => Promise<ApiResponse<any>>;
getSpecifiedGroupsInfo: (params: string[], operationID: string) => Promise<ApiResponse<any>>;
setGroupInfo: (params: SetGroupInfoParams, operationID: string) => Promise<ApiResponse<any>>;
acceptGroupApplication: (params: AccessGroupParams, operationID: string) => Promise<ApiResponse<any>>;
refuseGroupApplication: (params: AccessGroupParams, operationID: string) => Promise<ApiResponse<any>>;
getGroupMemberList: (params: GetGroupMemberParams, operationID: string) => Promise<ApiResponse<any>>;
getSpecifiedGroupMembersInfo: (params: getGroupMembersInfoParams, operationID: string) => Promise<ApiResponse<any>>;
setGroupMemberInfo: (params: UpdateMemberInfoParams, operationID: string) => Promise<ApiResponse<any>>;
kickGroupMember: (params: OpreateGroupParams, operationID: string) => Promise<ApiResponse<any>>;
changeGroupMemberMute: (params: ChangeGroupMemberMuteParams, operationID: string) => Promise<ApiResponse<any>>;
changeGroupMute: (params: ChangeGroupMuteParams, operationID: string) => Promise<ApiResponse<any>>;
transferGroupOwner: (params: TransferGroupParams, operationID: string) => Promise<ApiResponse<any>>;
dismissGroup: (params: string, operationID: string) => Promise<ApiResponse<any>>;
quitGroup: (params: string, operationID: string) => Promise<ApiResponse<any>>;
getGroupApplicationListAsRecipient: (params: OffsetParams, operationID: string) => Promise<ApiResponse<any>>;
getGroupApplicationListAsApplicant: (params: OffsetParams, operationID: string) => Promise<ApiResponse<any>>;
getUsersInGroup: (params: getGroupMembersInfoParams, operationID: string) => Promise<ApiResponse<any>>;
isJoinGroup: (params: string, operationID: string) => Promise<ApiResponse<any>>;
};
export interface GroupApi {
createGroup: (params: CreateGroupParams) => Promise<ApiResponse<GroupItem>>;
joinGroup: (params: JoinGroupParams) => Promise<ApiResponse<unknown>>;
inviteUserToGroup: (params: OpreateGroupParams) => Promise<ApiResponse<unknown>>;
getJoinedGroupListPage: (params: OffsetParams) => Promise<ApiResponse<GroupItem[]>>;
getSpecifiedGroupsInfo: (params: string[]) => Promise<ApiResponse<GroupItem[]>>;
setGroupInfo: (params: SetGroupInfoParams) => Promise<ApiResponse<unknown>>;
getGroupApplicationListAsRecipient: (params: OffsetParams) => Promise<ApiResponse<GroupApplicationItem[]>>;
getGroupApplicationListAsApplicant: (params: OffsetParams) => Promise<ApiResponse<GroupApplicationItem[]>>;
acceptGroupApplication: (params: AccessGroupParams) => Promise<ApiResponse<unknown>>;
refuseGroupApplication: (params: AccessGroupParams) => Promise<ApiResponse<unknown>>;
getGroupMemberList: (params: GetGroupMemberParams) => Promise<ApiResponse<GroupMemberItem[]>>;
getSpecifiedGroupMembersInfo: (params: getGroupMembersInfoParams) => Promise<ApiResponse<GroupMemberItem[]>>;
setGroupMemberInfo: (params: UpdateMemberInfoParams) => Promise<ApiResponse<unknown>>;
kickGroupMember: (params: OpreateGroupParams) => Promise<ApiResponse<unknown>>;
changeGroupMemberMute: (params: ChangeGroupMemberMuteParams) => Promise<ApiResponse<unknown>>;
changeGroupMute: (params: ChangeGroupMuteParams) => Promise<ApiResponse<unknown>>;
transferGroupOwner: (params: TransferGroupParams) => Promise<ApiResponse<unknown>>;
dismissGroup: (params: string) => Promise<ApiResponse<unknown>>;
quitGroup: (params: string) => Promise<ApiResponse<unknown>>;
getUsersInGroup: (params: getGroupMembersInfoParams) => Promise<ApiResponse<string[]>>;
isJoinGroup: (params: string) => Promise<ApiResponse<boolean>>;
}