import { ContactGender } from 'wechaty-puppet'; import { CheckQRCodeStatus, ContactOperationBitVal, ContactOperationCmdId, GrpcSelfAvatarType, PadproMessageStatus, PadproMessageType, PadproRoomMemberFlag } from './padpro-enums'; /** * ****************************************************************************************************************** * ----------------------------------------- Login related interface ------------------------------------------------ * ****************************************************************************************************************** * ****************************************************************************************************************** */ export interface GrpcCheckQRCode { CheckTime?: number; ExpiredTime: number; HeadImgUrl?: string; Nickname?: string; Password?: string; Status: CheckQRCodeStatus; Username?: string; } export interface GrpcGetQRCodeType { qrCode: string; } export interface GrpcQrcodeLoginType { status: number; longHost: string; shortHost: string; userName: string; } export interface GrpcAutoLoginType { longHost: string; shortHost: string; status: number; userName: string; payload?: string; } /** * ****************************************************************************************************************** * ----------------------------------------- Contact related interface ---------------------------------------------- * ****************************************************************************************************************** * ****************************************************************************************************************** */ export interface GrpcContactRawPayload { Alias: string; BigHeadImgUrl: string; City: string; ContactType: number; EncryptUsername: string; LabelLists: string; MsgType: PadproMessageType; NickName: string; Province: string; Remark: string; Sex: ContactGender; Signature: string; SmallHeadImgUrl: string; Ticket: string; UserName: string; VerifyFlag: number; } export interface GrpcWxidItem { Username: string; } /** * ****************************************************************************************************************** * ----------------------------------------- Message related interface ---------------------------------------------- * ****************************************************************************************************************** * ****************************************************************************************************************** */ export interface GrpcMessagePayload { MsgId: number; FromUserName: string; ToUserName: string; MsgType: PadproMessageType; Content: string; Status: PadproMessageStatus; ImgStatus: number; ImgBuf: string | null; CreateTime: number; MsgSource: string; PushContent: string; NewMsgId: number; } export interface GrpcSelfInfoPayload { Alias: string; BindUin: string; MsgType: PadproMessageType; Signature: string; UserName: string; NickName: string; Sex: ContactGender; Province: string; City: string; BindEmail: string; BindMobile: string; } export interface GrpcSelfAvatarPayload { MsgType: PadproMessageType; ImgType: GrpcSelfAvatarType; ImgLen: number; ImgBuf: string; ImgMd5: string; BigHeadImgUrl: string; SmallHeadImgUrl: string; } export interface GrpcDeletedPayload { MsgType: PadproMessageType; Username: string; } export declare type GrpcSyncMessagePayload = GrpcMessagePayload | GrpcContactRawPayload | GrpcRoomRawPayload | GrpcSelfInfoPayload | GrpcSelfAvatarPayload | GrpcDeletedPayload; /** * ****************************************************************************************************************** * ----------------------------------------- Room related interface ------------------------------------------------- * ****************************************************************************************************************** * ****************************************************************************************************************** */ export interface GrpcRoomRawPayload { Alias: string; BigHeadImgUrl: string; ChatRoomOwner: string; ChatroomVersion: number; ContactType: number; EncryptUsername: string; ExtInfo: string; ExtInfoExt: string; LabelLists: string; MsgType: PadproMessageType; NickName: string; SmallHeadImgUrl: string; Ticket: string; UserName: string; VerifyFlag: number; } export interface GrpcRoomMemberRawPayload { ChatroomUsername: string; ServerVersion: number; MemberDetails: GrpcRoomMemberDetail[] | null; } export interface GrpcRoomMemberDetail { Username: string; NickName: string; DisplayName: string; BigHeadImgUrl: string; SmallHeadImgUrl: string; ChatroomMemberFlag: PadproRoomMemberFlag; InviterUserName: string; } export interface GrpcContactOperationOption { cmdid: ContactOperationCmdId; userId: string; bitVal?: ContactOperationBitVal; remark?: string; } export interface GrpcCreateRoomMemberPayload { MemberName: string; MemberStatus: number; } export interface GrpcCreateRoomPayload { Roomeid: string; Members: GrpcCreateRoomMemberPayload[]; } export interface GrpcGetMsgImageType { imageData: string; } export interface GrpcGetMsgVoiceType { voiceData: string; } export interface GrpcGetA8KeyType { Url: string; XWechatKey: string; XWechatUin: string; } export interface GrpcGetContactQrcodePayload { QrcodeBuf: string; FoterWording: string; } export interface GrpcGetCdnDnsPayload { dnsCdn: { ver: string; uin: string; ip: string; aesKey: string; }; snsCdn: { ver: string; uin: string; ip: string; aesKey: string; }; appCdn: { ver: string; uin: string; ip: string; aesKey: string; }; clientVersion: number; } export declare enum GRPC_CODE { OK = 0, CANCELLED = 1, UNKNOWN = 2, INVALID_ARGUMENT = 3, DEADLINE_EXCEEDED = 4, NOT_FOUND = 5, ALREADY_EXISTS = 6, PERMISSION_DENIED = 7, UNAUTHENTICATED = 16, RESOURCE_EXHAUSTED = 8, FAILED_PRECONDITION = 9, ABORTED = 10, OUT_OF_RANGE = 11, UNIMPLEMENTED = 12, INTERNAL = 13, UNAVAILABLE = 14, DATA_LOSS = 15 } //# sourceMappingURL=grpc-schemas.d.ts.map