import Vnmf from '../../index' declare module '../../index' { namespace shareToWeRun { interface Option { /** Sports Data List */ recordList: record[] /** 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 } interface record { /** Sports projectsid */ typeId: number /** Sports time */ time: number /** Sports distance */ distance: number /** Consumption of calories */ calorie: number } } namespace getWeRunData { interface Option { /** 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 } interface SuccessCallbackResult extends VnmfGeneral.CallbackResult { /** Clouds corresponding to sensitive data ID,A small program to open the clouds will return.,Direct access to open data through cloud calls,See you later.[Cloud call direct access to open data](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html#method-cloud) */ cloudID?: string /** Encryption data for complete user information, including sensitive,See you later.[Encryption Data Decrypt algorithm](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html)。The structure of the data obtained after decrypting can be found in following text. */ encryptedData: string /** Initial vector of encryption algorithms,See you later.[Encryption Data Decrypt algorithm](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html) */ iv: string /** Call Results */ errMsg: string } } interface VnmfStatic { /** Sharing data to the micro-motion。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/werun/wx.shareToWeRun.html */ shareToWeRun(option?: shareToWeRun.Option): Promise /** Retrieve the number of micro-motion steps over past 30 days by user。We need to call first. Vnmf.login Interface。Step information is updated when the user enters applet on its own initiative。 * @supported weapp * @example * ```tsx * Vnmf.getWeRunData({ * success: function (res) { * // Take it. encryptedData Decrypt Open Data to Developer Backstage * const encryptedData = res.encryptedData * // Or take it. cloudID Direct access to open data through cloud calls * const cloudID = res.cloudID * } * }) * ``` * * **Open Data JSON Structure** * There are two ways to get sensitive data.,- It's for use. [Encryption Data Decrypt algorithm](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html#%E5%8A%A0%E5%AF%86%E6%95%B0%E6%8D%AE%E8%A7%A3%E5%AF%86%E7%AE%97%E6%B3%95) 。 * Access to open data is as follows: json Structure: * * ```json * { * "stepInfoList": [ * { * "timestamp": 1445866601, * "step": 100 * }, * { * "timestamp": 1445876601, * "step": 120 * } * ] * } * ``` * * stepInfoList Medium,Each structure is as follows:: * * | Properties | Type | Annotations | * | --- | ---- | --- | * | timestamp | number | Time stamp,Indicates the time of data | * | step | number | MicroMotion Steps | * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/werun/wx.getWeRunData.html */ getWeRunData(option?: getWeRunData.Option): Promise } }