import Vnmf from '../../index' declare module '../../index' { namespace openCard { interface Option { /** List of coupons to open */ cardList: RequestInfo[] /** 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?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } /** List of coupons to open */ interface RequestInfo { /** Cards ID */ cardId: string /** By Vnmf.addCard Encryption in returned objects code By decrypting it.,Please refer to decryption.:[code Decoding interface](https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1499332673_Unm7V) */ code: string } } namespace addCard { interface Option { /** List of coupons to add */ cardList: RequestInfo[] /** 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?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } /** List of coupons to add */ interface RequestInfo { /** Extended parameters for cards。Yes, sir. CardExt Object JSON Sequence As**String**Organisation */ cardExt: string /** Cards ID */ cardId: string } interface SuccessCallbackResult extends VnmfGeneral.CallbackResult { /** Bond Add Results List */ cardList: AddCardResponseInfo[] /** Call Results */ errMsg: string } /** Bond Add Results List */ interface AddCardResponseInfo { /** Extended parameters for cards,Please refer to the structure below. */ cardExt: string /** The person who received the coupon ID */ cardId: string /** Encryption code,A voucher for the usercodeEncrypted Strings,Please refer to decryption.:[code Decoding interface](https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1499332673_Unm7V) */ code: string /** Success */ isSuccess: boolean } } interface VnmfStatic { /** View the credential in micro-mail bag。It's only through. [Authentication](https://developers.weixin.qq.com/miniprogram/product/renzheng.html) Xerox or cultural interaction-type games to be used。For more documents, please refer to [MicroCard Interface Document](https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncement&key=1490190158&version=1&lang=zh_CN&platform=2)。 * @supported weapp * @example * ```tsx * Vnmf.openCard({ * cardList: [{ * cardId: '', * code: '' * }, { * cardId: '', * code: '' * }], * success: function (res) { } * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/card/wx.openCard.html */ openCard(option: openCard.Option): Promise /** Bulk Add Bonds。It's only through. [Authentication](https://developers.weixin.qq.com/miniprogram/product/renzheng.html) Xerox or cultural interaction-type games to be used。For more documents, please refer to [MicroCard Interface Document](https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncement&key=1490190158&version=1&lang=zh_CN&platform=2)。 * * **cardExt Annotations** * cardExt It's an extension of the coupon.,It's worth one. JSON String。 * @supported weapp * @example * ```tsx * Vnmf.addCard({ * cardList: [ * { * cardId: '', * cardExt: '{"code": "", "openid": "", "timestamp": "", "signature":""}' * }, { * cardId: '', * cardExt: '{"code": "", "openid": "", "timestamp": "", "signature":""}' * } * ], * success: function (res) { * console.log(res.cardList) // Can not open message * } * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/card/wx.addCard.html */ addCard(option: addCard.Option): Promise } }