Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "message.response"

Index

Type aliases

IMsgImage

IMsgImage: IMsgRespBase<{ Image: { MediaId: string }; MsgType: "image" }>

IMsgImage2wx

IMsgImage2wx: IMsgRespBase2wx<{ Image: { MediaId: IString }; MsgType: Idata<"image"> }>

IMsgMusic

IMsgMusic: IMsgRespBase<{ MsgType: "music"; Music: { Description: string; HQMusicUrl: string; MusicUrl: string; ThumbMediaId: string; Title: string } }>

IMsgMusic2wx

IMsgMusic2wx: IMsgRespBase2wx<{ MsgType: Idata<"music">; Music: { Description: IString; HQMusicUrl: IString; MusicUrl: IString; ThumbMediaId: IString; Title: IString } }>

IMsgNews

IMsgNews: IMsgRespBase<{ ArticleCount: number; Articles: { item: Array<{ Description: string; PicUrl: string; Title: string; Url: string }> }; MsgType: "news" }>

IMsgNews2wx

IMsgNews2wx: IMsgRespBase2wx<{ ArticleCount: number; Articles: { item: Array<{ Description: IString; PicUrl: IString; Title: IString; Url: IString }> }; MsgType: Idata<"news"> }>

IMsgRespBase

IMsgRespBase<T>: { CreateTime?: undefined | number; FromUserName: string; ToUserName: string } & T

Type parameters

  • T

IMsgRespBase2wx

IMsgRespBase2wx<T>: { CreateTime?: undefined | number; FromUserName: IString; ToUserName: IString } & T

Type parameters

  • T

IMsgText

IMsgText: IMsgRespBase<{ Content: string; MsgType: "text" }>

IMsgText2wx

IMsgText2wx: IMsgRespBase2wx<{ Content: IString; MsgType: Idata<"text"> }>

IMsgVideo

IMsgVideo: IMsgRespBase<{ MsgType: "video"; Video: { Description: string; MediaId: string; Title: string } }>

IMsgVideo2wx

IMsgVideo2wx: IMsgRespBase2wx<{ MsgType: Idata<"video">; Video: { Description: IString; MediaId: IString; Title: IString } }>

IMsgVoice

IMsgVoice: IMsgRespBase<{ MsgType: "voice"; Voice: { MediaId: string } }>

IMsgVoice2wx

IMsgVoice2wx: IMsgRespBase2wx<{ MsgType: Idata<"voice">; Video: { MediaId: IString } }>

IRespJSON

IString

IString: { _cdata: string }

Type declaration

  • _cdata: string

Idata

Idata<T>: { _cdata: T }

Type parameters

  • T

Type declaration

  • _cdata: T

Variables

Const baseField

baseField: string[] = ['ToUserName', 'FromUserName', 'MsgType']

Functions

Const image

  • image(p: Omit<IMsgImage, "MsgType">): string

Const json2msg

  • json2msg(json: any): string

Const music

  • music(p: Omit<IMsgMusic, "MsgType">): string

Const news

  • news(p: Omit<IMsgNews, "MsgType">): string

Const now

  • now(): number

Const resp

  • 关注或者取消关注事件,事件类型,subscribe(订阅)、unsubscribe(取消订阅)

    Parameters

    Returns string

Const text

  • text(p: Omit<IMsgText, "MsgType">): string

transData

  • transData(obj: {}, keys: Array<string>): {}
  • Parameters

    • obj: {}
      • [k: string]: any
    • keys: Array<string>

    Returns {}

    • [key: string]: { _cdata: string }
      • _cdata: string

Const video

  • video(p: Omit<IMsgVideo, "MsgType">): string

Const voice

  • voice(p: Omit<IMsgVoice, "MsgType">): string

Generated using TypeDoc