import Vnmf from '../../index' declare module '../../index' { namespace openSetting { interface Option { /** * Could not close temporary folder: %s,Default not to capture。Attention.:withSubscriptions Only return the user ticked subscription panel“Always keep the selection above,Do not ask again”Synchronising folder。 */ withSubscriptions?: boolean /** 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 { /** User Authorisation Results */ authSetting: AuthSetting /** User Subscription Message Settings,Interface parameters withSubscriptions Value as true Only then will you return.。 */ subscriptionsSetting: SubscriptionsSetting /** Call Results */ errMsg: string } } namespace getSetting { interface Option { /** * Could not close temporary folder: %s,Default not to capture。Attention.:withSubscriptions Only return the user ticked subscription panel“Always keep the selection above,Do not ask again”Synchronising folder。 */ withSubscriptions?: boolean /** 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 { /** User Authorisation Results */ authSetting: AuthSetting /** User Subscription Message Settings,Interface parameters withSubscriptions Value as true Only then will you return.。 */ subscriptionsSetting: SubscriptionsSetting /** When calling in plugins,User authorization results for the current host applet */ miniprogramAuthSetting: AuthSetting /** Call Results */ errMsg: string } } /** Could not close temporary folder: %s,Reference to details[Permissions](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/authorize.html) * @see https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/authorize.html */ interface AuthSetting { /** Can not get message: %s,Reciprocal interface [Vnmf.getUserInfo](/docs/apis/open-api/user-info/getUserInfo) */ 'scope.userInfo'?: boolean /** Authorized geographic location,Reciprocal interface [Vnmf.getLocation](/docs/apis/location/getLocation), [Vnmf.chooseLocation](/docs/apis/location/chooseLocation) */ 'scope.userLocation'?: boolean /** Could not close temporary folder: %s,Reciprocal interface [Vnmf.chooseAddress](/docs/apis/open-api/address/chooseAddress) */ 'scope.address'?: boolean /** Authorisation of invoice header,Reciprocal interface [Vnmf.chooseInvoiceTitle](/docs/apis/open-api/invoice/chooseInvoiceTitle) */ 'scope.invoiceTitle'?: boolean /** Authorization to obtain invoices,Reciprocal interface [Vnmf.chooseInvoice](/docs/apis/open-api/invoice/chooseInvoice) */ 'scope.invoice'?: boolean /** Can not get folder: %s: %s,Reciprocal interface [Vnmf.getWeRunData](/docs/apis/open-api/werun/getWeRunData) */ 'scope.werun'?: boolean /** Whether or not to authorize sound recording functions,Reciprocal interface [Vnmf.startRecord](/docs/apis/media/recorder/startRecord) */ 'scope.record'?: boolean /** Can not delete folder: %s: No such folder [Vnmf.saveImageToPhotosAlbum](/docs/apis/media/image/saveImageToPhotosAlbum), [Vnmf.saveVideoToPhotosAlbum](/docs/apis/media/video/saveVideoToPhotosAlbum) */ 'scope.writePhotosAlbum'?: boolean /** Can not get folder: %s: %s,Corresponding [camera](/docs/components/media/camera) Component */ 'scope.camera'?: boolean /** Whether to authorize small programs run bluetooth in the backstage,Reciprocal interface [Vnmf.openBluetoothAdapterBackground](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/setting/(wx.openBluetoothAdapterBackground).html) */ 'scope.bluetoothBackground'?: boolean } /** Subscription Message Settings * * Attention. * - itemSettings Only return the user ticked subscription panel“Always keep the selection above,Do not ask again”Synchronising folder。 * @example * ```tsx * Vnmf.getSetting({ * withSubscriptions: true, * success (res) { * console.log(res.authSetting) * // res.authSetting = { * // "scope.userInfo": true, * // "scope.userLocation": true * // } * console.log(res.subscriptionsSetting) * // res.subscriptionsSetting = { * // mainSwitch: true, // Synchronising folder * // itemSettings: { // Every switch * // SYS_MSG_TYPE_INTERACTIVE: 'accept', // A little game system subscription message * // SYS_MSG_TYPE_RANK: 'accept' * // zun-LzcQyW-edafCVvzPkK4de2Rllr1fFpw2A_x0oXE: 'reject', // General one-time subscription message * // ke_OZC_66gZxALLcsuI7ilCJSP2OJ2vWo2ooUPpkWrw: 'ban', * // } * // } * } * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/setting/SubscriptionsSetting.html */ interface SubscriptionsSetting { /** Synchronising folder,true It's for the opening.,false To Close */ mainSwitch: boolean /** Subscription status for each subscription message。itemSettingsThe key to the object is template for a one-time subscription messageid_Other Organiser * - Details on the use of one-time subscription messages [Vnmf.requestSubscribeMessage](/docs/apis/open-api/subscribe-message/requestSubscribeMessage) * - Could not close temporary folder: %s(Only a small game is available)Details of the method used [Vnmf.requestSubscribeSystemMessage](https://developers.weixin.qq.com/minigame/dev/api/open-api/subscribe-message/wx.requestSubscribeSystemMessage.html) * @type "accept" | "reject" | "ban" */ itemSettings: { [TEMPLATE_ID: string]: keyof SubscriptionsSetting.TemplateReflex | string } } namespace SubscriptionsSetting { /** 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 } } interface VnmfStatic { /** Move client applet settings interface,Returns the operation results of user settings。**Setup interfaces will only appear when minor applications have been requested by the user.[Permissions](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/authorize.html)**。 * * Attention.:[2.3.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) Version Start,After user click behavior,To jump and open the settings page,Manage delegation of authority information。[Details](https://developers.weixin.qq.com/community/develop/doc/000cea2305cc5047af5733de751008) * @supported weapp, rn, tt * @example * ```tsx * Vnmf.openSetting({ * success: function (res) { * console.log(res.authSetting) * // res.authSetting = { * // "scope.userInfo": true, * // "scope.userLocation": true * // } * } * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/setting/wx.openSetting.html */ openSetting(option?: openSetting.Option): Promise /** Retrieve the user 's current settings。**The return value will only result in minor applications that have been requested by the user[Permissions](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/authorize.html)**。 * @supported weapp, rn, tt * @example * ```tsx * Vnmf.getSetting({ * success: function (res) { * console.log(res.authSetting) * // res.authSetting = { * // "scope.userInfo": true, * // "scope.userLocation": true * // } * } * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/setting/wx.getSetting.html */ getSetting(option?: getSetting.Option): Promise } }