import { ElementType, MessageElement, NTGrayTipElementSubTypeV2, PicSubType, PicType, TipAioOpGrayTipElement, TipGroupElement, NTVideoType, FaceType, Peer } from './msg'; type ElementFullBase = Omit; export interface SendElementBase { elementType: ET; elementId: string; extBufForUI?: string; } type ElementBase | Array>; }> = object> = { [P in K]: S[P] extends Array ? Pick, U & keyof NonNullable> : S[P] extends keyof NonNullable ? Pick, S[P]> : NonNullable; }; export interface TextElement { content: string; atType: number; atUid: string; atTinyId: string; atNtUid: string; } export interface FaceElement { pokeType?: number; faceIndex: number; faceType: FaceType; faceText?: string; packId?: string; stickerId?: string; sourceType?: number; stickerType?: number; resultId?: string; surpriseId?: string; randomType?: number; chainCount?: number; } export interface GrayTipRovokeElement { operatorRole: string; operatorUid: string; operatorNick: string; operatorRemark: string; isSelfOperate: boolean; operatorMemRemark?: string; wording: string; } export interface XmlToJsonParam { busiType: string; busiId: string; c2cType: number; serviceType: number; ctrlFlag: number; content: string; templId: string; seqId: string; templParam: Map; pbReserv: null | string; members: Map; } export interface GrayTipElement { subElementType: NTGrayTipElementSubTypeV2; revokeElement: GrayTipRovokeElement; aioOpGrayTipElement: TipAioOpGrayTipElement; groupElement: TipGroupElement; xmlElement: { busiId: string; content: string; templId: string; }; jsonGrayTipElement: { busiId: string; jsonStr: string; recentAbstract?: string; isServer?: boolean; xmlToJsonParam?: XmlToJsonParam; }; } export interface ArkElement { bytesData: string; linkInfo: null; subElementType: null; } export interface MarketFaceElement { emojiPackageId: number; faceName: string; emojiId: string; key: string; } export interface VideoElement { filePath: string; fileName: string; videoMd5?: string; thumbMd5?: string; fileTime?: number; thumbSize?: number; fileFormat?: NTVideoType; fileSize?: string; thumbWidth?: number; thumbHeight?: number; busiType?: 0; subBusiType?: 0; thumbPath?: Map; transferStatus?: 0; progress?: 0; invalidState?: 0; fileUuid?: string; fileSubId?: string; fileBizId?: null; originVideoMd5?: string; import_rich_media_context?: null; sourceVideoCodecFormat?: number; } export interface PicElement { md5HexStr?: string; filePath?: string; fileSize: number | string; picWidth: number; picHeight: number; fileName: string; sourcePath: string; original: boolean; picType: PicType; picSubType?: PicSubType; fileUuid: string; fileSubId: string; thumbFileSize: number; summary: string; thumbPath: Map; originImageMd5?: string; originImageUrl?: string; } export interface InlineKeyboardButton { id: string; label: string; visitedLabel: string; unsupportTips: string; data: string; specifyRoleIds: string[]; specifyTinyids: string[]; style: number; type: number; clickLimit: number; atBotShowChannelList: boolean; permissionType: number; } interface InlineKeyboardRow { buttons: InlineKeyboardButton[]; } interface TofuElementContent { color: string; tittle: string; } export interface ActionBarElement { rows: InlineKeyboardRow[]; botAppid: string; } export interface RecommendedMsgElement { rows: InlineKeyboardRow[]; botAppid: string; } export interface TofuRecordElement { type: number; busiid: string; busiuuid: string; descriptionContent: string; contentlist: TofuElementContent[]; background: string; icon: string; uinlist: string[]; uidlist: string[]; busiExtra: string; updateTime: string; dependedmsgid: string; msgtime: string; onscreennotify: boolean; } export interface FileElement { fileMd5?: string; fileName: string; filePath: string; fileSize: string; picHeight?: number; picWidth?: number; folderId?: string; picThumbPath?: Map; file10MMd5?: string; fileSha?: string; fileSha3?: string; fileUuid?: string; fileSubId?: string; thumbFileSize?: number; fileBizId?: number; } export interface ShareLocationElement { text: string; ext: string; } export interface StructLongMsgElement { xmlContent: string; resId: string; } export interface ReplyElement { sourceMsgIdInRecords?: string; replayMsgSeq: string; replayMsgId: string; senderUin: string; senderUidStr?: string; replyMsgTime?: string; replyMsgClientSeq?: string; _replyMsgPeer?: Peer; } export interface CalendarElement { summary: string; msg: string; expireTimeMs: string; schemaType: number; schema: string; } export interface GiphyElement { id: string; isClip: boolean; width: number; height: number; } export interface AvRecordElement { type: number; time: string; text: string; mainType: number; hasRead: boolean; extraType: number; } interface YoloUserInfo { uid: string; result: number; rank: number; bizId: string; } export interface YoloGameResultElement { UserInfo: YoloUserInfo[]; } export interface FaceBubbleElement { faceCount: number; faceSummary: string; faceFlag: number; content: string; oldVersionStr: string; faceType: FaceType; others: string; yellowFaceInfo: { index: number; buf: string; compatibleText: string; text: string; }; } export interface TaskTopMsgElement { msgTitle: string; msgSummary: string; iconUrl: string; topMsgType: number; } export interface PttElement { canConvert2Text: boolean; duration: number; fileBizId: null; fileId: number; fileName: string; filePath: string; fileSize: string; fileSubId: string; fileUuid: string; formatType: number; invalidState: number; md5HexStr: string; playState: number; progress: number; text: string; transferStatus: number; translateStatus: number; voiceChangeType: number; voiceType: number; waveAmplitudes: number[]; autoConvertText: number; storeID: number; otherBusinessInfo: { aiVoiceType: number; }; } export type SendRecommendedMsgElement = SendElementBase & ElementBase<'recommendedMsgElement'>; export type SendTaskTopMsgElement = SendElementBase & ElementBase<'taskTopMsgElement'>; export type SendTofuRecordElement = SendElementBase & ElementBase<'tofuRecordElement'>; export type SendFaceBubbleElement = SendElementBase & ElementBase<'faceBubbleElement'>; export type SendAvRecordElement = SendElementBase & ElementBase<'avRecordElement'>; export type SendInlineKeyboardElement = SendElementBase & ElementBase<'inlineKeyboardElement'>; export type SendYoloGameResultElement = SendElementBase & ElementBase<'yoloGameResultElement'>; export type SendGiphyElement = SendElementBase & ElementBase<'giphyElement'>; export type SendWalletElement = SendElementBase & ElementBase<'walletElement'>; export type SendCalendarElement = SendElementBase & ElementBase<'calendarElement'>; export type SendLiveGiftElement = SendElementBase & ElementBase<'liveGiftElement'>; export type SendTextElement = SendElementBase & ElementBase<'textElement'>; export type SendReplyElement = SendElementBase & ElementBase<'replyElement'>; export type SendFaceElement = SendElementBase & ElementBase<'faceElement'>; export type SendMarketFaceElement = SendElementBase & ElementBase<'marketFaceElement'>; export type SendStructLongMsgElement = SendElementBase & ElementBase<'structLongMsgElement'>; export type SendPicElement = SendElementBase & ElementBase<'picElement'>; export type SendPttElement = SendElementBase & ElementBase<'pttElement', { pttElement: [ 'fileName', 'filePath', 'md5HexStr', 'fileSize', 'duration', 'formatType', 'voiceType', 'voiceChangeType', 'canConvert2Text', 'waveAmplitudes', 'fileSubId', 'playState', 'autoConvertText', 'storeID', 'otherBusinessInfo' ]; }>; export type SendFileElement = SendElementBase & ElementBase<'fileElement'>; export type SendVideoElement = SendElementBase & ElementBase<'videoElement'>; export type SendArkElement = SendElementBase & ElementBase<'arkElement'>; export type SendMarkdownElement = SendElementBase & ElementBase<'markdownElement'>; export type SendShareLocationElement = SendElementBase & ElementBase<'shareLocationElement'>; export type SendMultiForwardMsgElement = SendElementBase & ElementBase<'multiForwardMsgElement'>; export type SendMessageElement = SendTextElement | SendPttElement | SendPicElement | SendReplyElement | SendFaceElement | SendMarketFaceElement | SendFileElement | SendVideoElement | SendArkElement | SendMarkdownElement | SendShareLocationElement; export {};