import { PadproContactPayload, PadproMessagePayload, PadproRoomInvitationPayload, PadproRoomInviteEvent, PadproRoomMemberPayload, PadproRoomPayload } from '../schemas'; import { PadproGrpc } from './padpro-grpc'; export interface ManagerOptions { token: string; } export declare class PadproManager extends PadproGrpc { options: ManagerOptions; private loginScanQrCode?; private loginScanStatus?; private loginScanTimer?; private initDataTimer?; private readonly state; private debounceQueue?; private debounceQueueSubscription?; private throttleQueue?; private throttleQueueSubscription?; private syncQueueExecutor; private selfContact; private messageBuffer; private cacheManager?; private contactAndRoomData?; constructor(options: ManagerOptions); /** * ************************************************************************************************************* * * Initialize Section * * ************************************************************************************************************* * ************************************************************************************************************* */ private initQueue; private setContactAndRoomData; /** * Init data needed for Padpro, includes self contact data, all contact data, all room data and all room member data */ private initData; private initDataInternalLoop; private stopInitData; private clearContactAndRoomData; /** * ************************************************************************************************************* * * Release Section * * ************************************************************************************************************* * ************************************************************************************************************* */ private releaseQueue; /** * ************************************************************************************************************* * * Life-cycle Section * * ************************************************************************************************************* * ************************************************************************************************************* */ start(): Promise; stop(): Promise; protected onLogin(userId: string): Promise; logout(): Promise; protected stopCheckScan(): Promise; protected startCheckScan(): Promise; private qrCodeLogin; private syncMessage; private processMessages; private tryEmitLogin; private releaseBufferedMessage; /** * Return an empty contact which can be used as the self contact * Fix issue when avatar is empty, initialize the head img url as a string 'null' */ private getEmptySelfContact; /** * Get voice data in base64 string for a given message * @param payload message payload which to retrieve the voice data */ getMsgVoice(payload: PadproMessagePayload): Promise; protected tryAutoLogin(): Promise; protected emitLoginQrcode(): Promise; getContactIdList(): string[]; getRoomIdList(): string[]; roomMemberRawPayloadDirty(roomId: string): void; getRoomMemberIdList(roomId: string, dirty?: boolean): Promise; roomRawPayloadDirty(roomId: string): void; roomMemberRawPayload(roomId: string): Promise<{ [contactId: string]: PadproRoomMemberPayload; }>; syncRoomMember(roomId: string): Promise<{ [contactId: string]: PadproRoomMemberPayload; }>; /** * Treat the payload dirty as a force refresh data to avoid lose weixin from contact * @param contactId contact id */ contactRawPayloadDirty(contactId: string, forceCall?: boolean): Promise; contactRawPayload(contactId: string): Promise; roomRawPayload(id: string): Promise; roomInvitationRawPayload(roomInvitationId: string): Promise; roomInvitationRawPayloadDirty(roomInvitationId: string): Promise; saveRoomInvitationRawPayload(roomInvitation: PadproRoomInviteEvent): Promise; ding(data?: string): void; updateSelfName(newName: string): Promise; updateSelfSignature(signature: string): Promise; shareContactCard(toId: string, contactId: string): Promise; GrpcSendMessage(contactId: string, content: string, atUserList?: string[]): Promise; GrpcSendImage(contactId: string, data: string): Promise; GrpcSendApp(contactId: string, content: string): Promise; private replayTextMsg; private replayImageMsg; private replayAppMsg; private generateBaseMsg; private memberIsSame; } export default PadproManager; //# sourceMappingURL=padpro-manager.d.ts.map