import Vnmf from '../../index' declare module '../../index' { namespace requestSubscribeMessage { interface Option { /** Can not append message to mh folder: %s: %sid♪ The collection(Attention.:iOSClient7.0.6Version、AndroidClient7.0.7One-time subscription after version/Multiple template messages are supported by long subscriptions,iOSClient7.0.5Version、AndroidClient7.0.6Only one template message is supported by a subscription before the version)Message TemplateidYes.[Micro-Credit Public Platform(mp.weixin.qq.com)-Functions-Synchronising folder]Cannot initialise Evolution's mail component. */ tmplIds: string[] /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (result: FailCallbackResult) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface FailCallbackResult extends VnmfGeneral.CallbackResult { /** Interface call failed error code */ errCode: number /** Interface call failed error information */ errMsg: string } /** * @example * Expression of user's agreement to Subscription zun-LzcQyW-edafCVvzPkK4de2Rllr1fFpw2A_x0oXE That's the message. * * ```json * { * "errMsg": "requestSubscribeMessage:ok", * "zun-LzcQyW-edafCVvzPkK4de2Rllr1fFpw2A_x0oXE": "accept" * } * ``` */ interface SuccessCallbackResult extends VnmfGeneral.CallbackResult { /** Dynamic Keys,_Other Organiserid * @name [TEMPLATE_ID] * @type "accept" | "reject" | "ban" */ [TEMPLATE_ID: string]: keyof TemplateReflex | string /** When the interface calls successfullyerrMsgValue as'requestSubscribeMessage:ok' */ errMsg: string } /** Template message subscription type */ interface TemplateReflex { /** Expression of user's agreement to subscribe the articleidThe corresponding template message */ accept /** indicates that the user refuses to subscribe articleidThe corresponding template message */ reject /** It says it's been banned from backstage. */ ban /** indicates that the template is filtered backstage because of same name as header */ filter } } namespace requestSubscribeDeviceMessage { interface Option { /** Can not append message to mh folder: %s: %s id ♪ The collection,Up to one call Subscription3Message */ tmplIds: string[] /** Unique serial number of the device。Distribution by manufacturer,The length cannot be exceeded.128Bytes。Characters accept numbers only,Case letters,Underline(_)and hyphenation(-)。 */ sn: string /** Equipment notes,5It's effective in minutes.。 */ snTicket: string /** Device type id 。Acquisition of registered equipment through the Wireless Public Platform。 */ modelId: string /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (result: FailCallbackResult) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface FailCallbackResult extends VnmfGeneral.CallbackResult { /** Interface call failed error code,It could be empty. */ errCode: number /** Interface call failed error information */ errMsg: string } /** * @example * Expression of user's agreement to Subscription zun-LzcQyW-edafCVvzPkK4de2Rllr1fFpw2A_x0oXE That's the message. * ```json * { * "errMsg": "requestSubscribeDeviceMessage:ok", * "zun-LzcQyW-edafCVvzPkK4de2Rllr1fFpw2A_x0oXE": "accept" * } * ``` */ interface SuccessCallbackResult extends VnmfGeneral.CallbackResult { /** [TEMPLATE_ID]It's a dynamic key.,_Other Organiserid * @name [TEMPLATE_ID] * @type "accept" | "reject" | "ban" | "filter" | "acceptWithAudio" */ [TEMPLATE_ID: string]: keyof TemplateReflex | string /** When the interface calls successfullyerrMsgValue as'requestSubscribeMessage:ok' */ errMsg: string } /** Template message subscription type */ interface TemplateReflex { /** Expression of user's agreement to subscribe the articleidThe corresponding template message */ accept /** indicates that the user refuses to subscribe articleidThe corresponding template message */ reject /** It says it's been banned from backstage. */ ban /** indicates that the template is filtered backstage because of same name as header */ filter /** Says that the subscriber received subscription and turned on voice alarm. */ acceptWithAudio } } interface VnmfStatic { /** Could not close temporary folder: %s * * Attention.:[2.8.2](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) Version Start,After user clicks or initiates a payback,Can not get message: %s。 * @supported weapp, tt * @example * ```tsx * Vnmf.requestSubscribeMessage({ * tmplIds: [''], * success: function (res) { } * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/subscribe-message/wx.requestSubscribeMessage.html */ requestSubscribeMessage( option: requestSubscribeMessage.Option ): Promise /** Could not close temporary folder: %s,Popup Authorization Box After Call,The user will allow the developers to send subscriber messages when agrees.。When the user clicks“Allow”Button,Template messages will be added to the user's applet settings page,Through wx.getSetting Interface to access user subscription status for template messages。 * @supported weapp, tt * @example * ```tsx * Vnmf.requestSubscribeDeviceMessage({ * tmplIds: ['xxxxx'], * sn: 'xxxx', * snTicket: 'xxxxx', * modelId: 'xxx', * success(res) { * console.log(res) * }, * fail(res) { * console.log(res) * } * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/subscribe-message/wx.requestSubscribeDeviceMessage.html */ requestSubscribeDeviceMessage( option: requestSubscribeDeviceMessage.Option ): Promise } }