UNPKG

polyv-live-cli

Version:

CLI tool for managing PolyV live streaming services.

224 lines 6.92 kB
import type { ChatHistoryPageResponse, SendAdminMsgResponse, UpdateBannedUserResponse, UpdateBannedViewerResponse, ForbidChannelKickUsersResponse, GetChannelBannedUserListResponse, GetChannelBannedListResponse, GetChannelKickedUserListResponse } from 'polyv-live-api-sdk'; import { AuthConfig } from '../types/auth'; import { ChatServiceConfig, ChatSendOptions, ChatListOptions, ChatDeleteOptions } from '../types/chat'; export declare class ChatServiceSdk { private readonly config; private readonly authConfig; constructor(authConfig: AuthConfig, serviceConfig: ChatServiceConfig); sendAdminMessage(options: ChatSendOptions): Promise<SendAdminMsgResponse>; listMessages(options: ChatListOptions): Promise<ChatHistoryPageResponse>; deleteMessage(options: ChatDeleteOptions): Promise<void>; updateBannedUser(options: { channelId: string; userIds: string; toBanned: 'Y' | 'N'; }): Promise<UpdateBannedUserResponse>; updateBannedViewer(options: { viewerIds: string[]; banned: 'Y' | 'N'; }): Promise<UpdateBannedViewerResponse>; forbidChannelKickUsers(options: { channelId: string; viewerIds: string[]; nickNames: string[]; }): Promise<ForbidChannelKickUsersResponse>; forbidKickUsers(options: { viewerIds: string[]; nickNames: string[]; }): Promise<ForbidChannelKickUsersResponse>; forbidChannelUnkickUsers(options: { channelId: string; viewerIds: string[]; nickNames: string[]; }): Promise<ForbidChannelKickUsersResponse>; forbidUnkickUsers(options: { viewerIds: string[]; nickNames: string[]; }): Promise<ForbidChannelKickUsersResponse>; getChannelBannedUserList(options: { channelId: string; type: 'userId' | 'ip'; }): Promise<GetChannelBannedUserListResponse>; getChannelBannedList(options: { channelId: string; type?: 'badword' | 'ip'; }): Promise<GetChannelBannedListResponse>; getChannelKickedUserList(options: { channelId: string; }): Promise<GetChannelKickedUserListResponse>; getGroupLoginTimes(options: { channelId: string; }): Promise<any>; sendChat(options: { channelId: string; userId: string; content?: string; imgUrl?: string; }): Promise<any>; sendHiddenByAdmin(options: { channelId: string; content: string; role: string; }): Promise<any>; countOnlineUser(options: { channelId: string; }): Promise<any>; getChatOnlineCount(channelId: string): Promise<any>; removeChatContents(options: { channelId: string; ids: string[]; }): Promise<any>; getSpeakList(options: { startTime?: number; endTime?: number; cursor?: string; size?: number; }): Promise<any>; alertToSpecial(options: { channelId: string; title: string; message: string; }): Promise<any>; messageAudit(options: { channelId: string; messages: any[]; }): Promise<any>; sendCustomMessage(options: { channelId: string; content?: string; imgUrl?: string; joinHistoryList?: boolean; watchType?: string; important?: boolean; }): Promise<any>; sendCustomMessageEncode(options: { channelId: string; content?: string; imgUrl?: string; joinHistoryList?: 0 | 1; watchType?: string; }): Promise<any>; emitByUserId(options: { roomId: string; userIds: string[]; payload: string; }): Promise<any>; getUserBadwordList(): Promise<any>; addBadwords(options: { userId: string; words: string[]; channelId?: string; }): Promise<any>; deleteUserBadword(options: { words: string; }): Promise<any>; addBannedIp(options: { channelId: string; ip: string; }): Promise<any>; getUserBannedList(options: { page?: number; size?: number; }): Promise<any>; getForbidUserList(options: { viewerId?: string; nickName?: string; pageNumber?: number; pageSize?: number; }): Promise<any>; deleteChannelBanned(options: { channelId: string; type: 'ip' | 'badword'; content: string; }): Promise<any>; listBulletins(options: { channelId: string; pageNumber: number; pageSize: number; sort?: string; }): Promise<any>; addBulletin(options: { channelId: string; content: string; isTop?: 'Y' | 'N'; isPop?: 'Y' | 'N'; }): Promise<any>; cleanNotices(options: { channelId: string; }): Promise<any>; listQa(options: { channelId: string; pageNumber: number; pageSize: number; }): Promise<any>; updateCensorEnabled(options: { channelId: string; enabled?: 'Y' | 'N'; }): Promise<any>; getAdminInfo(options: { channelId: string; }): Promise<any>; updateAdminInfo(options: { channelId: string; nickname: string; actor: string; avatar: string; }): Promise<any>; getTeacherInfo(options: { channelId: string; }): Promise<any>; updateTeacherInfo(options: { channelId: string; nickname?: string; actor?: string; passwd?: string; avatar?: string; }): Promise<any>; getUserList(options: { roomId: string; page?: number; len?: number; toGetSubRooms?: boolean; }): Promise<any>; getRobotSetting(options: { channelId: string; }): Promise<any>; getRobotStats(options: { channelId: string; }): Promise<any>; updateRobotSetting(options: { channelId: string; robotNumber: number; addRobotModel: 'timely' | 'fixed_time'; changeTime?: number; virtualBookingNumber?: number; }): Promise<any>; updateRobotListSetting(options: { channelId: string; robotNumber: number; addRobotModel: 'timely' | 'fixed_time'; changeTime?: number; virtualBookingNumber?: number; robotList?: Array<{ name: string; avatar: string; }>; robotRandomMemberEnabled?: 'Y' | 'N'; }): Promise<any>; pauseRobot(options: { channelId: string; }): Promise<any>; batchUpdateChatEnabled(options: { channelIds: string[]; chatEnabled: 'Y' | 'N'; }): Promise<any>; logoutWatchViewer(options: { channelId: string; token?: string; }): Promise<any>; private validateSendOptions; private validateListOptions; private validateDeleteOptions; private readFile; } //# sourceMappingURL=chat.service.sdk.d.ts.map