/** * Wechaty - https://github.com/chatie/wechaty * * @copyright 2016-2018 Huan LI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ import { ContactGender, FriendshipType } from 'wechaty-puppet'; import { GrpcVoiceFormat, PadproEmojiType, PadproMessageStatus, PadproMessageType, WechatAppMessageType } from './padpro-enums'; /** * There are two functions to generate PadproContactPayload * @interface PadproContactPayload */ export interface PadproContactPayload { alias: string; contactType: number; labelLists: string; bigHeadUrl: string; city: string; country: string; nickName: string; province: string; remark: string; sex: ContactGender; signature: string; smallHeadUrl: string; stranger: string; ticket: string; userName: string; } export interface PadproMessagePayload { content: string; data?: string | null; fromUser: string; messageId: string; messageSource: string; messageType: PadproMessageType; status: PadproMessageStatus; timestamp: number; toUser: string; } /** * from Message */ export interface PadproRoomMemberPayload { contactId: string; nickName: string; displayName: string; bigHeadUrl: string; smallHeadUrl: string; inviterId: string; } export interface PadproMemberBrief { userName: string; nickName?: string; } /** * @interface PadproRoomPayload */ export interface PadproRoomPayload { alias: string; bigHeadUrl: string; chatRoomOwner: string; chatroomVersion: number; contactType: number; stranger: string; members: PadproMemberBrief[]; labelLists: string; nickName: string; smallHeadUrl: string; ticket: string; chatroomId: string; memberCount: number; } export interface PadproRoomMemberListPayload { chatroomId: number; count: number; member: PadproRoomMemberPayload[]; message: string; contactId: string; } export interface PadproRoomInvitationPayload { id: string; fromUser: string; roomName: string; timestamp: number; url: string; } export interface PadproAppMessagePayload { des?: string; thumburl?: string; title: string; url: string; appattach?: PadproAppAttachPayload; type: WechatAppMessageType; md5?: string; fromusername?: string; recorditem?: string; } export interface PadproAppAttachPayload { totallen?: number; attachid?: string; emoticonmd5?: string; fileext?: string; cdnattachurl?: string; aeskey?: string; cdnthumbaeskey?: string; encryver?: number; islargefilemsg: number; } export interface PadproEmojiMessagePayload { cdnurl: string; type: PadproEmojiType; len: number; width: number; height: number; } export interface PadproImageMessagePayload { aesKey: string; encryVer: number; cdnThumbAesKey: string; cdnThumbUrl: string; cdnThumbLength: number; cdnThumbHeight: number; cdnThumbWidth: number; cdnMidHeight: number; cdnMidWidth: number; cdnHdHeight: number; cdnHdWidth: number; cdnMidImgUrl: string; length?: number; cdnBigImgUrl?: string; hdLength?: number; md5: string; } export interface PadproRecalledMessagePayload { session: string; msgId: string; newMsgId: string; replaceMsg: string; } export interface PadproVoiceMessagePayload { endFlag: number; length: number; voiceLength: number; clientMsgId: string; fromUsername: string; downCount: number; cancelFlag: number; voiceFormat: GrpcVoiceFormat; forwardFlag: number; bufId: number; } export interface PadproLocationMessagePayload { x: number; y: number; scale: number; mapType: string; label: string; poiId: string; poiName: string; fromUsername: string; } export interface PadproVideoMessagePayload { aesKey: string; cdnThumbAesKey: string; cdnVideoUrl: string; cdnThumbUrl: string; length: number; playLength: number; cdnThumbLength: number; cdnThumbWidth: number; cdnThumbHeight: number; fromUsername: string; md5: string; newMd5: string; isAd: boolean; } export interface PadproFriendshipPayload { fromusername: string; encryptusername: string; content: string; ticket: string; } export interface PadproRequestTokenPayload { full_url: string; info: string; message: string; share_url: string; status: number; } export interface PadproRoomInviteEvent { fromUser: string; msgId: string; roomName: string; timestamp: number; url: string; } export interface FriendshipPayloadBase { id: string; contactId: string; hello?: string; } export declare type FriendshipPayloadConfirm = FriendshipPayloadBase & { type: FriendshipType.Confirm; }; export declare type FriendshipPayloadReceive = FriendshipPayloadBase & { stranger?: string; ticket: string; type: FriendshipType.Receive; }; export declare type FriendshipPayloadVerify = FriendshipPayloadBase & { type: FriendshipType.Verify; }; export declare type FriendshipPayload = FriendshipPayloadConfirm | FriendshipPayloadReceive | FriendshipPayloadVerify; export interface PadproMessageSource { silence?: boolean; memberCount?: number; imageFileName?: string; atUserList?: string[]; } //# sourceMappingURL=padpro-schemas.d.ts.map