import Vnmf from '../../index' declare module '../../index' { namespace addVideoToFavorites { interface Option { /** Video address to collect,Must be local or temporary */ videoPath: string /** Thumbnail Path,Use video header if left empty */ thumbPath?: 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?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } } namespace addFileToFavorites { interface Option { /** Cannot initialise Evolution's mail component.,Must be local or temporary */ filePath: string /** Custom Filename,Use if left emptyfilePathFilename in */ fileName?: 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?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } } interface VnmfStatic { /** Collection of videos * @supported weapp * @example * ```tsx * // callback Writing * Vnmf.downloadFile({ * url: URL, // Downloadurl * success (res) { * // Download after completion of collection * Vnmf.addVideoToFavorites({ * videoPath: res.tempFilePath, * success() {}, * fail: console.error, * }) * }, * fail: console.error, * }) * ``` * @example * ```tsx * // async await Writing * const { tempFilePath } = await Vnmf.downloadFile({ * url: URL, // Downloadurl * }) * // Download after completion of collection * await Vnmf.addVideoToFavorites({ * videoPath: res.tempFilePath, * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/favorites/wx.addVideoToFavorites.html */ addVideoToFavorites(option?: addVideoToFavorites.Option): Promise /** Make an appointment to live the video number. * @supported weapp * @example * ```tsx * // callback Writing * Vnmf.downloadFile({ * url: URL, // Downloadurl * success (res) { * // Download after completion of collection * Vnmf.addFileToFavorites({ * filePath: res.tempFilePath, * success() {}, * fail: console.error, * }) * }, * fail: console.error, * }) * ``` * @example * ```tsx * // async await Writing * const { tempFilePath } = await Vnmf.downloadFile({ * url: URL, // Downloadurl * }) * // Download after completion of collection * await Vnmf.addFileToFavorites({ * filePath: res.tempFilePath, * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/favorites/wx.addFileToFavorites.html */ addFileToFavorites(option?: addFileToFavorites.Option): Promise } }