hylid-bridge
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -9,3 +9,4 @@ interface AppEnv { | ||
} | ||
declare const _default: AppEnv; | ||
export default _default; | ||
declare const appEnv: AppEnv; | ||
export default appEnv; | ||
export { appEnv }; |
import { callbackFn, loadAppxBridge, upFirst } from './common/utils'; | ||
import * as mpWebCnApis from './clients/mp-web/cn'; | ||
import * as mpWebIntlAPis from './clients/mp-web/intl'; | ||
var clientType = [{ | ||
name: 'mp_web_intl', | ||
regs: [/alipayIDE/i], | ||
type: 'ua' | ||
}, { | ||
name: 'web_cn', | ||
@@ -62,2 +68,4 @@ regs: [/^((?!miniprogram).)*$/i, /alipay/i], | ||
var appEnv = getEnv(); | ||
export default appEnv; | ||
export { appEnv }; | ||
@@ -92,6 +100,4 @@ if (appEnv.isMpWebCn || appEnv.isMpWebIntl) { | ||
Object.assign(my, appEnv.isMpWebCn ? require('./clients/mp-web/cn') : require('./clients/mp-web/intl')); | ||
Object.assign(my, appEnv.isMpWebCn ? mpWebCnApis : mpWebIntlAPis); | ||
}); | ||
} | ||
export default appEnv; | ||
} |
@@ -7,2 +7,3 @@ /// <reference types="miniprogram" /> | ||
import crossPay from './crossPay'; | ||
import getAppIdSync from '../../../common/mp-web/getAppIdSync'; | ||
import getAuthCode from '../../../common/mp-web/getAuthCode'; | ||
@@ -44,3 +45,3 @@ import getClipboard from '../../../common/mp-web/getClipboard'; | ||
import vibrate from '../../../common/mp-web/vibrate'; | ||
export { alert, chooseImage, clearStorage, confirm, crossPay, getAuthCode, getClipboard, getImageInfo, getLocation, getNetworkType, getPhoneNumber, getStorage, getSystemInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideToast, makePhoneCall, multiLevelSelect, navigateBack, navigateBackMiniProgram, navigateTo, navigateToMiniProgram, previewImage, prompt, redirectTo, reLaunch, removeStorage, request, saveImage, scan, setClipboard, setNavigationBar, setOptionMenu, setStorage, showAuthGuide, showLoading, showNavigationBarLoading, showToast, tradePay, vibrate, }; | ||
export { alert, chooseImage, clearStorage, confirm, crossPay, getAppIdSync, getAuthCode, getClipboard, getImageInfo, getLocation, getNetworkType, getPhoneNumber, getStorage, getSystemInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideToast, makePhoneCall, multiLevelSelect, navigateBack, navigateBackMiniProgram, navigateTo, navigateToMiniProgram, previewImage, prompt, redirectTo, reLaunch, removeStorage, request, saveImage, scan, setClipboard, setNavigationBar, setOptionMenu, setStorage, showAuthGuide, showLoading, showNavigationBarLoading, showToast, tradePay, vibrate, }; | ||
declare const _default: { | ||
@@ -52,2 +53,3 @@ alert: (args?: AlertArgs | undefined) => void; | ||
crossPay: (args: TradePayArgs) => void; | ||
getAppIdSync: () => string; | ||
getAuthCode: (args: GetAuthCodeArgs) => void; | ||
@@ -54,0 +56,0 @@ getClipboard: (args: GetClipboardArgs) => void; |
@@ -7,2 +7,3 @@ // auto generated | ||
import crossPay from './crossPay'; | ||
import getAppIdSync from '../../../common/mp-web/getAppIdSync'; | ||
import getAuthCode from '../../../common/mp-web/getAuthCode'; | ||
@@ -44,3 +45,3 @@ import getClipboard from '../../../common/mp-web/getClipboard'; | ||
import vibrate from '../../../common/mp-web/vibrate'; | ||
export { alert, chooseImage, clearStorage, confirm, crossPay, getAuthCode, getClipboard, getImageInfo, getLocation, getNetworkType, getPhoneNumber, getStorage, getSystemInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideToast, makePhoneCall, multiLevelSelect, navigateBack, navigateBackMiniProgram, navigateTo, navigateToMiniProgram, previewImage, prompt, redirectTo, reLaunch, removeStorage, request, saveImage, scan, setClipboard, setNavigationBar, setOptionMenu, setStorage, showAuthGuide, showLoading, showNavigationBarLoading, showToast, tradePay, vibrate }; | ||
export { alert, chooseImage, clearStorage, confirm, crossPay, getAppIdSync, getAuthCode, getClipboard, getImageInfo, getLocation, getNetworkType, getPhoneNumber, getStorage, getSystemInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideToast, makePhoneCall, multiLevelSelect, navigateBack, navigateBackMiniProgram, navigateTo, navigateToMiniProgram, previewImage, prompt, redirectTo, reLaunch, removeStorage, request, saveImage, scan, setClipboard, setNavigationBar, setOptionMenu, setStorage, showAuthGuide, showLoading, showNavigationBarLoading, showToast, tradePay, vibrate }; | ||
export default { | ||
@@ -52,2 +53,3 @@ alert: alert, | ||
crossPay: crossPay, | ||
getAppIdSync: getAppIdSync, | ||
getAuthCode: getAuthCode, | ||
@@ -54,0 +56,0 @@ getClipboard: getClipboard, |
@@ -14,2 +14,3 @@ /// <reference types="miniprogram" /> | ||
import exitApp from './exitApp'; | ||
import getAppIdSync from '../../../common/mp-web/getAppIdSync'; | ||
import getAppToken from './getAppToken'; | ||
@@ -70,3 +71,3 @@ import getAuthCode from '../../../common/mp-web/getAuthCode'; | ||
import vibrate from '../../../common/mp-web/vibrate'; | ||
export { addFatigueAction, alert, apDisableJSAPI, appxrpc, APRegionRPC, batchQueryCdpSpaceInfo, chooseImage, choosePhoneContact, clearStorage, confirm, crossPay, exitApp, getAppToken, getAuthCode, getClipboard, getComponentAuth, getImageInfo, getLocation, getNetworkType, getPaymentCode, getPhoneNumber, getServerTime, getSetting, getSiteInfo, getStorage, getSystemInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideToast, inquireQuote, isInstalledApp, makePhoneCall, multiLevelSelect, navigateBack, navigateBackMiniProgram, navigateTo, navigateToBizScene, navigateToMiniProgram, openSchemeWithBacking, paySignCenter, previewImage, prompt, redirectTo, regionFetchAllApps, regionSearchAppsByKeywords, reLaunch, removeStorage, request, rpc, saveImage, scan, setClipboard, setNavigationBar, setOptionMenu, setStorage, showAuthGuide, showLoading, showNavigationBarLoading, showToast, signContract, startApp, startBizService, thirdPartyAuthForAc, tradePay, uploadApdidToken, vibrate, }; | ||
export { addFatigueAction, alert, apDisableJSAPI, appxrpc, APRegionRPC, batchQueryCdpSpaceInfo, chooseImage, choosePhoneContact, clearStorage, confirm, crossPay, exitApp, getAppIdSync, getAppToken, getAuthCode, getClipboard, getComponentAuth, getImageInfo, getLocation, getNetworkType, getPaymentCode, getPhoneNumber, getServerTime, getSetting, getSiteInfo, getStorage, getSystemInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideToast, inquireQuote, isInstalledApp, makePhoneCall, multiLevelSelect, navigateBack, navigateBackMiniProgram, navigateTo, navigateToBizScene, navigateToMiniProgram, openSchemeWithBacking, paySignCenter, previewImage, prompt, redirectTo, regionFetchAllApps, regionSearchAppsByKeywords, reLaunch, removeStorage, request, rpc, saveImage, scan, setClipboard, setNavigationBar, setOptionMenu, setStorage, showAuthGuide, showLoading, showNavigationBarLoading, showToast, signContract, startApp, startBizService, thirdPartyAuthForAc, tradePay, uploadApdidToken, vibrate, }; | ||
declare const _default: { | ||
@@ -87,2 +88,3 @@ addFatigueAction: (args?: import("../../../types").AddFatigueActionArgs | undefined) => void; | ||
exitApp: (args?: any) => void; | ||
getAppIdSync: () => string; | ||
getAppToken: (args?: any) => void; | ||
@@ -89,0 +91,0 @@ getAuthCode: (args: GetAuthCodeArgs) => void; |
@@ -14,2 +14,3 @@ // auto generated | ||
import exitApp from './exitApp'; | ||
import getAppIdSync from '../../../common/mp-web/getAppIdSync'; | ||
import getAppToken from './getAppToken'; | ||
@@ -70,3 +71,3 @@ import getAuthCode from '../../../common/mp-web/getAuthCode'; | ||
import vibrate from '../../../common/mp-web/vibrate'; | ||
export { addFatigueAction, alert, apDisableJSAPI, appxrpc, APRegionRPC, batchQueryCdpSpaceInfo, chooseImage, choosePhoneContact, clearStorage, confirm, crossPay, exitApp, getAppToken, getAuthCode, getClipboard, getComponentAuth, getImageInfo, getLocation, getNetworkType, getPaymentCode, getPhoneNumber, getServerTime, getSetting, getSiteInfo, getStorage, getSystemInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideToast, inquireQuote, isInstalledApp, makePhoneCall, multiLevelSelect, navigateBack, navigateBackMiniProgram, navigateTo, navigateToBizScene, navigateToMiniProgram, openSchemeWithBacking, paySignCenter, previewImage, prompt, redirectTo, regionFetchAllApps, regionSearchAppsByKeywords, reLaunch, removeStorage, request, rpc, saveImage, scan, setClipboard, setNavigationBar, setOptionMenu, setStorage, showAuthGuide, showLoading, showNavigationBarLoading, showToast, signContract, startApp, startBizService, thirdPartyAuthForAc, tradePay, uploadApdidToken, vibrate }; | ||
export { addFatigueAction, alert, apDisableJSAPI, appxrpc, APRegionRPC, batchQueryCdpSpaceInfo, chooseImage, choosePhoneContact, clearStorage, confirm, crossPay, exitApp, getAppIdSync, getAppToken, getAuthCode, getClipboard, getComponentAuth, getImageInfo, getLocation, getNetworkType, getPaymentCode, getPhoneNumber, getServerTime, getSetting, getSiteInfo, getStorage, getSystemInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideToast, inquireQuote, isInstalledApp, makePhoneCall, multiLevelSelect, navigateBack, navigateBackMiniProgram, navigateTo, navigateToBizScene, navigateToMiniProgram, openSchemeWithBacking, paySignCenter, previewImage, prompt, redirectTo, regionFetchAllApps, regionSearchAppsByKeywords, reLaunch, removeStorage, request, rpc, saveImage, scan, setClipboard, setNavigationBar, setOptionMenu, setStorage, showAuthGuide, showLoading, showNavigationBarLoading, showToast, signContract, startApp, startBizService, thirdPartyAuthForAc, tradePay, uploadApdidToken, vibrate }; | ||
export default { | ||
@@ -85,2 +86,3 @@ addFatigueAction: addFatigueAction, | ||
exitApp: exitApp, | ||
getAppIdSync: getAppIdSync, | ||
getAppToken: getAppToken, | ||
@@ -87,0 +89,0 @@ getAuthCode: getAuthCode, |
@@ -22,2 +22,3 @@ /// <reference types="miniprogram" /> | ||
import getConnectedBluetoothDevices from '../../../common/web/getConnectedBluetoothDevices'; | ||
import getFileInfo from '../../../common/web/getFileInfo'; | ||
import getImageInfo from '../../../common/web/getImageInfo'; | ||
@@ -29,2 +30,3 @@ import getLocation from '../../../common/web/getLocation'; | ||
import getSavedFileList from '../../../common/web/getSavedFileList'; | ||
import getScreenBrightness from '../../../common/web/getScreenBrightness'; | ||
import getServerTime from '../../../common/web/getServerTime'; | ||
@@ -54,2 +56,3 @@ import getSetting from '../../../common/web/getSetting'; | ||
import offSocketOpen from '../../../common/web/offSocketOpen'; | ||
import offUserCaptureScreen from '../../../common/web/offUserCaptureScreen'; | ||
import onAccelerometerChange from '../../../common/web/onAccelerometerChange'; | ||
@@ -65,3 +68,5 @@ import onBLECharacteristicValueChange from '../../../common/web/onBLECharacteristicValueChange'; | ||
import onSocketOpen from '../../../common/web/onSocketOpen'; | ||
import onUserCaptureScreen from '../../../common/web/onUserCaptureScreen'; | ||
import openBluetoothAdapter from '../../../common/web/openBluetoothAdapter'; | ||
import openDocument from '../../../common/web/openDocument'; | ||
import openSetting from '../../../common/web/openSetting'; | ||
@@ -82,4 +87,6 @@ import previewImage from '../../../common/web/previewImage'; | ||
import setClipboard from '../../../common/web/setClipboard'; | ||
import setKeepScreenOn from '../../../common/web/setKeepScreenOn'; | ||
import setNavigationBar from '../../../common/web/setNavigationBar'; | ||
import setOptionMenu from '../../../common/web/setOptionMenu'; | ||
import setScreenBrightness from '../../../common/web/setScreenBrightness'; | ||
import setStorage from '../../../common/web/setStorage'; | ||
@@ -102,10 +109,3 @@ import setTabBarStyle from '../../../common/web/setTabBarStyle'; | ||
import writeBLECharacteristicValue from '../../../common/web/writeBLECharacteristicValue'; | ||
import getFileInfo from '../../../common/web/getFileInfo'; | ||
import openDocument from '../../../common/web/openDocument'; | ||
import onUserCaptureScreen from '../../../common/web/onUserCaptureScreen'; | ||
import offUserCaptureScreen from '../../../common/web/offUserCaptureScreen'; | ||
import setKeepScreenOn from '../../../common/web/setKeepScreenOn'; | ||
import getScreenBrightness from '../../../common/web/getScreenBrightness'; | ||
import setScreenBrightness from '../../../common/web/setScreenBrightness'; | ||
export { addPhoneContact, alert, chooseImage, clearStorage, closeBluetoothAdapter, closeSocket, confirm, connectBLEDevice, connectSocket, datePicker, disconnectBLEDevice, downloadFile, getAuthCode, getBatteryInfo, getBLEDeviceCharacteristics, getBLEDeviceServices, getBluetoothAdapterState, getBluetoothDevices, getClipboard, getConnectedBluetoothDevices, getImageInfo, getLocation, getNetworkType, getPhoneNumber, getSavedFileInfo, getSavedFileList, getServerTime, getSetting, getStorage, getSystemInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideToast, multiLevelSelect, navigateBack, navigateBackMiniProgram, navigateTo, navigateToMiniProgram, notifyBLECharacteristicValueChange, offAccelerometerChange, offBLECharacteristicValueChange, offBLEConnectionStateChanged, offBluetoothAdapterStateChange, offBluetoothDeviceFound, offCompassChange, offSocketClose, offSocketError, offSocketMessage, offSocketOpen, onAccelerometerChange, onBLECharacteristicValueChange, onBLEConnectionStateChanged, onBluetoothAdapterStateChange, onBluetoothDeviceFound, onCompassChange, onSocketClose, onSocketError, onSocketMessage, onSocketOpen, openBluetoothAdapter, openSetting, previewImage, readBLECharacteristicValue, redirectTo, reLaunch, removeSavedFile, removeStorage, request, saveFile, saveImage, scan, sendSocketMessage, setBackgroundColor, setCanPullDown, setClipboard, setNavigationBar, setOptionMenu, setStorage, setTabBarStyle, showActionSheet, showAuthGuide, showLoading, showNavigationBarLoading, showToast, signContract, startBluetoothDevicesDiscovery, startPullDownRefresh, stopBluetoothDevicesDiscovery, stopPullDownRefresh, switchTab, uploadFile, vibrate, watchShake, writeBLECharacteristicValue, getFileInfo, openDocument, onUserCaptureScreen, offUserCaptureScreen, setKeepScreenOn, getScreenBrightness, setScreenBrightness, }; | ||
export { addPhoneContact, alert, chooseImage, clearStorage, closeBluetoothAdapter, closeSocket, confirm, connectBLEDevice, connectSocket, datePicker, disconnectBLEDevice, downloadFile, getAuthCode, getBatteryInfo, getBLEDeviceCharacteristics, getBLEDeviceServices, getBluetoothAdapterState, getBluetoothDevices, getClipboard, getConnectedBluetoothDevices, getFileInfo, getImageInfo, getLocation, getNetworkType, getPhoneNumber, getSavedFileInfo, getSavedFileList, getScreenBrightness, getServerTime, getSetting, getStorage, getSystemInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideToast, multiLevelSelect, navigateBack, navigateBackMiniProgram, navigateTo, navigateToMiniProgram, notifyBLECharacteristicValueChange, offAccelerometerChange, offBLECharacteristicValueChange, offBLEConnectionStateChanged, offBluetoothAdapterStateChange, offBluetoothDeviceFound, offCompassChange, offSocketClose, offSocketError, offSocketMessage, offSocketOpen, offUserCaptureScreen, onAccelerometerChange, onBLECharacteristicValueChange, onBLEConnectionStateChanged, onBluetoothAdapterStateChange, onBluetoothDeviceFound, onCompassChange, onSocketClose, onSocketError, onSocketMessage, onSocketOpen, onUserCaptureScreen, openBluetoothAdapter, openDocument, openSetting, previewImage, readBLECharacteristicValue, redirectTo, reLaunch, removeSavedFile, removeStorage, request, saveFile, saveImage, scan, sendSocketMessage, setBackgroundColor, setCanPullDown, setClipboard, setKeepScreenOn, setNavigationBar, setOptionMenu, setScreenBrightness, setStorage, setTabBarStyle, showActionSheet, showAuthGuide, showLoading, showNavigationBarLoading, showToast, signContract, startBluetoothDevicesDiscovery, startPullDownRefresh, stopBluetoothDevicesDiscovery, stopPullDownRefresh, switchTab, uploadFile, vibrate, watchShake, writeBLECharacteristicValue, }; | ||
declare const _default: { | ||
@@ -132,2 +132,6 @@ addPhoneContact: (args: Partial<AddPhoneContactArgs>) => void; | ||
getConnectedBluetoothDevices: (args?: (import("../../../types").Common & AsyncCallback<any>) | undefined) => void; | ||
getFileInfo: (args?: ({ | ||
apFilePath: string; | ||
digestAlgorithm?: string | undefined; | ||
} & AsyncCallback<any>) | undefined) => void; | ||
getImageInfo: (args: GetImageInfo) => void; | ||
@@ -139,2 +143,5 @@ getLocation: (args: GetLocationArgs) => void; | ||
getSavedFileList: (args: GetSavedFileListArgs) => void; | ||
getScreenBrightness: (args: AsyncCallback<{ | ||
brightness: number; | ||
}>) => void; | ||
getServerTime: (args: AsyncCallback<{ | ||
@@ -166,2 +173,3 @@ time: number; | ||
offSocketOpen: (args?: (import("../../../types").Common & AsyncCallback<any>) | undefined) => void; | ||
offUserCaptureScreen: (args?: (() => void) | undefined) => void; | ||
onAccelerometerChange: (args?: (import("../../../types").Common & AsyncCallback<any>) | undefined) => void; | ||
@@ -177,3 +185,8 @@ onBLECharacteristicValueChange: (args?: (import("../../../types").Common & AsyncCallback<any>) | undefined) => void; | ||
onSocketOpen: (args?: (import("../../../types").Common & AsyncCallback<any>) | undefined) => void; | ||
onUserCaptureScreen: (args: () => void) => void; | ||
openBluetoothAdapter: (args?: (import("../../../types").Common & AsyncCallback<any>) | undefined) => void; | ||
openDocument: (args?: ({ | ||
filePath: string; | ||
fileType: string; | ||
} & AsyncCallback<any>) | undefined) => void; | ||
openSetting: (args?: (import("../../../types").Common & AsyncCallback<any>) | undefined) => void; | ||
@@ -196,4 +209,6 @@ previewImage: (args: PreviewImageArgs) => void; | ||
setClipboard: (args: SetClipboardArgs) => void; | ||
setKeepScreenOn: (args: SetKeepScreenOnArgs) => void; | ||
setNavigationBar: (args: SetNavigationBarArgs) => void; | ||
setOptionMenu: (args?: (import("../../../types").Common & AsyncCallback<any>) | undefined) => void; | ||
setScreenBrightness: (args: SetScreenBrightnessArgs) => void; | ||
setStorage: (args: SetStorage) => void; | ||
@@ -216,18 +231,3 @@ setTabBarStyle: (opt: import("../../../types").TabBarStyle) => void; | ||
writeBLECharacteristicValue: (args?: (import("../../../types").Common & AsyncCallback<any>) | undefined) => void; | ||
getFileInfo: (args?: ({ | ||
apFilePath: string; | ||
digestAlgorithm?: string | undefined; | ||
} & AsyncCallback<any>) | undefined) => void; | ||
openDocument: (args?: ({ | ||
filePath: string; | ||
fileType: string; | ||
} & AsyncCallback<any>) | undefined) => void; | ||
onUserCaptureScreen: (args: () => void) => void; | ||
offUserCaptureScreen: (args?: (() => void) | undefined) => void; | ||
setKeepScreenOn: (args: SetKeepScreenOnArgs) => void; | ||
getScreenBrightness: (args: AsyncCallback<{ | ||
brightness: number; | ||
}>) => void; | ||
setScreenBrightness: (args: SetScreenBrightnessArgs) => void; | ||
}; | ||
export default _default; |
@@ -22,2 +22,3 @@ // auto generated | ||
import getConnectedBluetoothDevices from '../../../common/web/getConnectedBluetoothDevices'; | ||
import getFileInfo from '../../../common/web/getFileInfo'; | ||
import getImageInfo from '../../../common/web/getImageInfo'; | ||
@@ -29,2 +30,3 @@ import getLocation from '../../../common/web/getLocation'; | ||
import getSavedFileList from '../../../common/web/getSavedFileList'; | ||
import getScreenBrightness from '../../../common/web/getScreenBrightness'; | ||
import getServerTime from '../../../common/web/getServerTime'; | ||
@@ -54,2 +56,3 @@ import getSetting from '../../../common/web/getSetting'; | ||
import offSocketOpen from '../../../common/web/offSocketOpen'; | ||
import offUserCaptureScreen from '../../../common/web/offUserCaptureScreen'; | ||
import onAccelerometerChange from '../../../common/web/onAccelerometerChange'; | ||
@@ -65,3 +68,5 @@ import onBLECharacteristicValueChange from '../../../common/web/onBLECharacteristicValueChange'; | ||
import onSocketOpen from '../../../common/web/onSocketOpen'; | ||
import onUserCaptureScreen from '../../../common/web/onUserCaptureScreen'; | ||
import openBluetoothAdapter from '../../../common/web/openBluetoothAdapter'; | ||
import openDocument from '../../../common/web/openDocument'; | ||
import openSetting from '../../../common/web/openSetting'; | ||
@@ -82,4 +87,6 @@ import previewImage from '../../../common/web/previewImage'; | ||
import setClipboard from '../../../common/web/setClipboard'; | ||
import setKeepScreenOn from '../../../common/web/setKeepScreenOn'; | ||
import setNavigationBar from '../../../common/web/setNavigationBar'; | ||
import setOptionMenu from '../../../common/web/setOptionMenu'; | ||
import setScreenBrightness from '../../../common/web/setScreenBrightness'; | ||
import setStorage from '../../../common/web/setStorage'; | ||
@@ -102,10 +109,3 @@ import setTabBarStyle from '../../../common/web/setTabBarStyle'; | ||
import writeBLECharacteristicValue from '../../../common/web/writeBLECharacteristicValue'; | ||
import getFileInfo from '../../../common/web/getFileInfo'; | ||
import openDocument from '../../../common/web/openDocument'; | ||
import onUserCaptureScreen from '../../../common/web/onUserCaptureScreen'; | ||
import offUserCaptureScreen from '../../../common/web/offUserCaptureScreen'; | ||
import setKeepScreenOn from '../../../common/web/setKeepScreenOn'; | ||
import getScreenBrightness from '../../../common/web/getScreenBrightness'; | ||
import setScreenBrightness from '../../../common/web/setScreenBrightness'; | ||
export { addPhoneContact, alert, chooseImage, clearStorage, closeBluetoothAdapter, closeSocket, confirm, connectBLEDevice, connectSocket, datePicker, disconnectBLEDevice, downloadFile, getAuthCode, getBatteryInfo, getBLEDeviceCharacteristics, getBLEDeviceServices, getBluetoothAdapterState, getBluetoothDevices, getClipboard, getConnectedBluetoothDevices, getImageInfo, getLocation, getNetworkType, getPhoneNumber, getSavedFileInfo, getSavedFileList, getServerTime, getSetting, getStorage, getSystemInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideToast, multiLevelSelect, navigateBack, navigateBackMiniProgram, navigateTo, navigateToMiniProgram, notifyBLECharacteristicValueChange, offAccelerometerChange, offBLECharacteristicValueChange, offBLEConnectionStateChanged, offBluetoothAdapterStateChange, offBluetoothDeviceFound, offCompassChange, offSocketClose, offSocketError, offSocketMessage, offSocketOpen, onAccelerometerChange, onBLECharacteristicValueChange, onBLEConnectionStateChanged, onBluetoothAdapterStateChange, onBluetoothDeviceFound, onCompassChange, onSocketClose, onSocketError, onSocketMessage, onSocketOpen, openBluetoothAdapter, openSetting, previewImage, readBLECharacteristicValue, redirectTo, reLaunch, removeSavedFile, removeStorage, request, saveFile, saveImage, scan, sendSocketMessage, setBackgroundColor, setCanPullDown, setClipboard, setNavigationBar, setOptionMenu, setStorage, setTabBarStyle, showActionSheet, showAuthGuide, showLoading, showNavigationBarLoading, showToast, signContract, startBluetoothDevicesDiscovery, startPullDownRefresh, stopBluetoothDevicesDiscovery, stopPullDownRefresh, switchTab, uploadFile, vibrate, watchShake, writeBLECharacteristicValue, getFileInfo, openDocument, onUserCaptureScreen, offUserCaptureScreen, setKeepScreenOn, getScreenBrightness, setScreenBrightness }; | ||
export { addPhoneContact, alert, chooseImage, clearStorage, closeBluetoothAdapter, closeSocket, confirm, connectBLEDevice, connectSocket, datePicker, disconnectBLEDevice, downloadFile, getAuthCode, getBatteryInfo, getBLEDeviceCharacteristics, getBLEDeviceServices, getBluetoothAdapterState, getBluetoothDevices, getClipboard, getConnectedBluetoothDevices, getFileInfo, getImageInfo, getLocation, getNetworkType, getPhoneNumber, getSavedFileInfo, getSavedFileList, getScreenBrightness, getServerTime, getSetting, getStorage, getSystemInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideToast, multiLevelSelect, navigateBack, navigateBackMiniProgram, navigateTo, navigateToMiniProgram, notifyBLECharacteristicValueChange, offAccelerometerChange, offBLECharacteristicValueChange, offBLEConnectionStateChanged, offBluetoothAdapterStateChange, offBluetoothDeviceFound, offCompassChange, offSocketClose, offSocketError, offSocketMessage, offSocketOpen, offUserCaptureScreen, onAccelerometerChange, onBLECharacteristicValueChange, onBLEConnectionStateChanged, onBluetoothAdapterStateChange, onBluetoothDeviceFound, onCompassChange, onSocketClose, onSocketError, onSocketMessage, onSocketOpen, onUserCaptureScreen, openBluetoothAdapter, openDocument, openSetting, previewImage, readBLECharacteristicValue, redirectTo, reLaunch, removeSavedFile, removeStorage, request, saveFile, saveImage, scan, sendSocketMessage, setBackgroundColor, setCanPullDown, setClipboard, setKeepScreenOn, setNavigationBar, setOptionMenu, setScreenBrightness, setStorage, setTabBarStyle, showActionSheet, showAuthGuide, showLoading, showNavigationBarLoading, showToast, signContract, startBluetoothDevicesDiscovery, startPullDownRefresh, stopBluetoothDevicesDiscovery, stopPullDownRefresh, switchTab, uploadFile, vibrate, watchShake, writeBLECharacteristicValue }; | ||
export default { | ||
@@ -132,2 +132,3 @@ addPhoneContact: addPhoneContact, | ||
getConnectedBluetoothDevices: getConnectedBluetoothDevices, | ||
getFileInfo: getFileInfo, | ||
getImageInfo: getImageInfo, | ||
@@ -139,2 +140,3 @@ getLocation: getLocation, | ||
getSavedFileList: getSavedFileList, | ||
getScreenBrightness: getScreenBrightness, | ||
getServerTime: getServerTime, | ||
@@ -164,2 +166,3 @@ getSetting: getSetting, | ||
offSocketOpen: offSocketOpen, | ||
offUserCaptureScreen: offUserCaptureScreen, | ||
onAccelerometerChange: onAccelerometerChange, | ||
@@ -175,3 +178,5 @@ onBLECharacteristicValueChange: onBLECharacteristicValueChange, | ||
onSocketOpen: onSocketOpen, | ||
onUserCaptureScreen: onUserCaptureScreen, | ||
openBluetoothAdapter: openBluetoothAdapter, | ||
openDocument: openDocument, | ||
openSetting: openSetting, | ||
@@ -192,4 +197,6 @@ previewImage: previewImage, | ||
setClipboard: setClipboard, | ||
setKeepScreenOn: setKeepScreenOn, | ||
setNavigationBar: setNavigationBar, | ||
setOptionMenu: setOptionMenu, | ||
setScreenBrightness: setScreenBrightness, | ||
setStorage: setStorage, | ||
@@ -211,10 +218,3 @@ setTabBarStyle: setTabBarStyle, | ||
watchShake: watchShake, | ||
writeBLECharacteristicValue: writeBLECharacteristicValue, | ||
getFileInfo: getFileInfo, | ||
openDocument: openDocument, | ||
onUserCaptureScreen: onUserCaptureScreen, | ||
offUserCaptureScreen: offUserCaptureScreen, | ||
setKeepScreenOn: setKeepScreenOn, | ||
getScreenBrightness: getScreenBrightness, | ||
setScreenBrightness: setScreenBrightness | ||
writeBLECharacteristicValue: writeBLECharacteristicValue | ||
}; |
@@ -22,2 +22,3 @@ /// <reference types="miniprogram" /> | ||
import getConnectedBluetoothDevices from '../../../common/web/getConnectedBluetoothDevices'; | ||
import getFileInfo from '../../../common/web/getFileInfo'; | ||
import getImageInfo from '../../../common/web/getImageInfo'; | ||
@@ -29,2 +30,3 @@ import getLocation from '../../../common/web/getLocation'; | ||
import getSavedFileList from '../../../common/web/getSavedFileList'; | ||
import getScreenBrightness from '../../../common/web/getScreenBrightness'; | ||
import getServerTime from '../../../common/web/getServerTime'; | ||
@@ -55,2 +57,3 @@ import getSetting from '../../../common/web/getSetting'; | ||
import offSocketOpen from '../../../common/web/offSocketOpen'; | ||
import offUserCaptureScreen from '../../../common/web/offUserCaptureScreen'; | ||
import onAccelerometerChange from '../../../common/web/onAccelerometerChange'; | ||
@@ -66,3 +69,5 @@ import onBLECharacteristicValueChange from '../../../common/web/onBLECharacteristicValueChange'; | ||
import onSocketOpen from '../../../common/web/onSocketOpen'; | ||
import onUserCaptureScreen from '../../../common/web/onUserCaptureScreen'; | ||
import openBluetoothAdapter from '../../../common/web/openBluetoothAdapter'; | ||
import openDocument from '../../../common/web/openDocument'; | ||
import openSetting from '../../../common/web/openSetting'; | ||
@@ -83,4 +88,6 @@ import previewImage from '../../../common/web/previewImage'; | ||
import setClipboard from '../../../common/web/setClipboard'; | ||
import setKeepScreenOn from '../../../common/web/setKeepScreenOn'; | ||
import setNavigationBar from '../../../common/web/setNavigationBar'; | ||
import setOptionMenu from '../../../common/web/setOptionMenu'; | ||
import setScreenBrightness from '../../../common/web/setScreenBrightness'; | ||
import setStorage from '../../../common/web/setStorage'; | ||
@@ -103,10 +110,3 @@ import setTabBarStyle from '../../../common/web/setTabBarStyle'; | ||
import writeBLECharacteristicValue from '../../../common/web/writeBLECharacteristicValue'; | ||
import getFileInfo from '../../../common/web/getFileInfo'; | ||
import openDocument from '../../../common/web/openDocument'; | ||
import onUserCaptureScreen from '../../../common/web/onUserCaptureScreen'; | ||
import offUserCaptureScreen from '../../../common/web/offUserCaptureScreen'; | ||
import setKeepScreenOn from '../../../common/web/setKeepScreenOn'; | ||
import getScreenBrightness from '../../../common/web/getScreenBrightness'; | ||
import setScreenBrightness from '../../../common/web/setScreenBrightness'; | ||
export { addPhoneContact, alert, chooseImage, clearStorage, closeBluetoothAdapter, closeSocket, confirm, connectBLEDevice, connectSocket, datePicker, disconnectBLEDevice, downloadFile, getAuthCode, getBatteryInfo, getBLEDeviceCharacteristics, getBLEDeviceServices, getBluetoothAdapterState, getBluetoothDevices, getClipboard, getConnectedBluetoothDevices, getImageInfo, getLocation, getNetworkType, getPhoneNumber, getSavedFileInfo, getSavedFileList, getServerTime, getSetting, getSiteInfo, getStorage, getSystemInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideToast, multiLevelSelect, navigateBack, navigateBackMiniProgram, navigateTo, navigateToMiniProgram, notifyBLECharacteristicValueChange, offAccelerometerChange, offBLECharacteristicValueChange, offBLEConnectionStateChanged, offBluetoothAdapterStateChange, offBluetoothDeviceFound, offCompassChange, offSocketClose, offSocketError, offSocketMessage, offSocketOpen, onAccelerometerChange, onBLECharacteristicValueChange, onBLEConnectionStateChanged, onBluetoothAdapterStateChange, onBluetoothDeviceFound, onCompassChange, onSocketClose, onSocketError, onSocketMessage, onSocketOpen, openBluetoothAdapter, openSetting, previewImage, readBLECharacteristicValue, redirectTo, reLaunch, removeSavedFile, removeStorage, request, saveFile, saveImage, scan, sendSocketMessage, setBackgroundColor, setCanPullDown, setClipboard, setNavigationBar, setOptionMenu, setStorage, setTabBarStyle, showActionSheet, showAuthGuide, showLoading, showNavigationBarLoading, showToast, signContract, startBluetoothDevicesDiscovery, startPullDownRefresh, stopBluetoothDevicesDiscovery, stopPullDownRefresh, switchTab, uploadFile, vibrate, watchShake, writeBLECharacteristicValue, getFileInfo, openDocument, onUserCaptureScreen, offUserCaptureScreen, setKeepScreenOn, getScreenBrightness, setScreenBrightness, }; | ||
export { addPhoneContact, alert, chooseImage, clearStorage, closeBluetoothAdapter, closeSocket, confirm, connectBLEDevice, connectSocket, datePicker, disconnectBLEDevice, downloadFile, getAuthCode, getBatteryInfo, getBLEDeviceCharacteristics, getBLEDeviceServices, getBluetoothAdapterState, getBluetoothDevices, getClipboard, getConnectedBluetoothDevices, getFileInfo, getImageInfo, getLocation, getNetworkType, getPhoneNumber, getSavedFileInfo, getSavedFileList, getScreenBrightness, getServerTime, getSetting, getSiteInfo, getStorage, getSystemInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideToast, multiLevelSelect, navigateBack, navigateBackMiniProgram, navigateTo, navigateToMiniProgram, notifyBLECharacteristicValueChange, offAccelerometerChange, offBLECharacteristicValueChange, offBLEConnectionStateChanged, offBluetoothAdapterStateChange, offBluetoothDeviceFound, offCompassChange, offSocketClose, offSocketError, offSocketMessage, offSocketOpen, offUserCaptureScreen, onAccelerometerChange, onBLECharacteristicValueChange, onBLEConnectionStateChanged, onBluetoothAdapterStateChange, onBluetoothDeviceFound, onCompassChange, onSocketClose, onSocketError, onSocketMessage, onSocketOpen, onUserCaptureScreen, openBluetoothAdapter, openDocument, openSetting, previewImage, readBLECharacteristicValue, redirectTo, reLaunch, removeSavedFile, removeStorage, request, saveFile, saveImage, scan, sendSocketMessage, setBackgroundColor, setCanPullDown, setClipboard, setKeepScreenOn, setNavigationBar, setOptionMenu, setScreenBrightness, setStorage, setTabBarStyle, showActionSheet, showAuthGuide, showLoading, showNavigationBarLoading, showToast, signContract, startBluetoothDevicesDiscovery, startPullDownRefresh, stopBluetoothDevicesDiscovery, stopPullDownRefresh, switchTab, uploadFile, vibrate, watchShake, writeBLECharacteristicValue, }; | ||
declare const _default: { | ||
@@ -133,2 +133,6 @@ addPhoneContact: (args: Partial<AddPhoneContactArgs>) => void; | ||
getConnectedBluetoothDevices: (args?: (import("../../../types").Common & AsyncCallback<any>) | undefined) => void; | ||
getFileInfo: (args?: ({ | ||
apFilePath: string; | ||
digestAlgorithm?: string | undefined; | ||
} & AsyncCallback<any>) | undefined) => void; | ||
getImageInfo: (args: GetImageInfo) => void; | ||
@@ -140,2 +144,5 @@ getLocation: (args: GetLocationArgs) => void; | ||
getSavedFileList: (args: GetSavedFileListArgs) => void; | ||
getScreenBrightness: (args: AsyncCallback<{ | ||
brightness: number; | ||
}>) => void; | ||
getServerTime: (args: AsyncCallback<{ | ||
@@ -170,2 +177,3 @@ time: number; | ||
offSocketOpen: (args?: (import("../../../types").Common & AsyncCallback<any>) | undefined) => void; | ||
offUserCaptureScreen: (args?: (() => void) | undefined) => void; | ||
onAccelerometerChange: (args?: (import("../../../types").Common & AsyncCallback<any>) | undefined) => void; | ||
@@ -181,3 +189,8 @@ onBLECharacteristicValueChange: (args?: (import("../../../types").Common & AsyncCallback<any>) | undefined) => void; | ||
onSocketOpen: (args?: (import("../../../types").Common & AsyncCallback<any>) | undefined) => void; | ||
onUserCaptureScreen: (args: () => void) => void; | ||
openBluetoothAdapter: (args?: (import("../../../types").Common & AsyncCallback<any>) | undefined) => void; | ||
openDocument: (args?: ({ | ||
filePath: string; | ||
fileType: string; | ||
} & AsyncCallback<any>) | undefined) => void; | ||
openSetting: (args?: (import("../../../types").Common & AsyncCallback<any>) | undefined) => void; | ||
@@ -200,4 +213,6 @@ previewImage: (args: PreviewImageArgs) => void; | ||
setClipboard: (args: SetClipboardArgs) => void; | ||
setKeepScreenOn: (args: SetKeepScreenOnArgs) => void; | ||
setNavigationBar: (args: SetNavigationBarArgs) => void; | ||
setOptionMenu: (args?: (import("../../../types").Common & AsyncCallback<any>) | undefined) => void; | ||
setScreenBrightness: (args: SetScreenBrightnessArgs) => void; | ||
setStorage: (args: SetStorage) => void; | ||
@@ -220,18 +235,3 @@ setTabBarStyle: (opt: import("../../../types").TabBarStyle) => void; | ||
writeBLECharacteristicValue: (args?: (import("../../../types").Common & AsyncCallback<any>) | undefined) => void; | ||
getFileInfo: (args?: ({ | ||
apFilePath: string; | ||
digestAlgorithm?: string | undefined; | ||
} & AsyncCallback<any>) | undefined) => void; | ||
openDocument: (args?: ({ | ||
filePath: string; | ||
fileType: string; | ||
} & AsyncCallback<any>) | undefined) => void; | ||
onUserCaptureScreen: (args: () => void) => void; | ||
offUserCaptureScreen: (args?: (() => void) | undefined) => void; | ||
setKeepScreenOn: (args: SetKeepScreenOnArgs) => void; | ||
getScreenBrightness: (args: AsyncCallback<{ | ||
brightness: number; | ||
}>) => void; | ||
setScreenBrightness: (args: SetScreenBrightnessArgs) => void; | ||
}; | ||
export default _default; |
@@ -22,2 +22,3 @@ // auto generated | ||
import getConnectedBluetoothDevices from '../../../common/web/getConnectedBluetoothDevices'; | ||
import getFileInfo from '../../../common/web/getFileInfo'; | ||
import getImageInfo from '../../../common/web/getImageInfo'; | ||
@@ -29,2 +30,3 @@ import getLocation from '../../../common/web/getLocation'; | ||
import getSavedFileList from '../../../common/web/getSavedFileList'; | ||
import getScreenBrightness from '../../../common/web/getScreenBrightness'; | ||
import getServerTime from '../../../common/web/getServerTime'; | ||
@@ -55,2 +57,3 @@ import getSetting from '../../../common/web/getSetting'; | ||
import offSocketOpen from '../../../common/web/offSocketOpen'; | ||
import offUserCaptureScreen from '../../../common/web/offUserCaptureScreen'; | ||
import onAccelerometerChange from '../../../common/web/onAccelerometerChange'; | ||
@@ -66,3 +69,5 @@ import onBLECharacteristicValueChange from '../../../common/web/onBLECharacteristicValueChange'; | ||
import onSocketOpen from '../../../common/web/onSocketOpen'; | ||
import onUserCaptureScreen from '../../../common/web/onUserCaptureScreen'; | ||
import openBluetoothAdapter from '../../../common/web/openBluetoothAdapter'; | ||
import openDocument from '../../../common/web/openDocument'; | ||
import openSetting from '../../../common/web/openSetting'; | ||
@@ -83,4 +88,6 @@ import previewImage from '../../../common/web/previewImage'; | ||
import setClipboard from '../../../common/web/setClipboard'; | ||
import setKeepScreenOn from '../../../common/web/setKeepScreenOn'; | ||
import setNavigationBar from '../../../common/web/setNavigationBar'; | ||
import setOptionMenu from '../../../common/web/setOptionMenu'; | ||
import setScreenBrightness from '../../../common/web/setScreenBrightness'; | ||
import setStorage from '../../../common/web/setStorage'; | ||
@@ -103,10 +110,3 @@ import setTabBarStyle from '../../../common/web/setTabBarStyle'; | ||
import writeBLECharacteristicValue from '../../../common/web/writeBLECharacteristicValue'; | ||
import getFileInfo from '../../../common/web/getFileInfo'; | ||
import openDocument from '../../../common/web/openDocument'; | ||
import onUserCaptureScreen from '../../../common/web/onUserCaptureScreen'; | ||
import offUserCaptureScreen from '../../../common/web/offUserCaptureScreen'; | ||
import setKeepScreenOn from '../../../common/web/setKeepScreenOn'; | ||
import getScreenBrightness from '../../../common/web/getScreenBrightness'; | ||
import setScreenBrightness from '../../../common/web/setScreenBrightness'; | ||
export { addPhoneContact, alert, chooseImage, clearStorage, closeBluetoothAdapter, closeSocket, confirm, connectBLEDevice, connectSocket, datePicker, disconnectBLEDevice, downloadFile, getAuthCode, getBatteryInfo, getBLEDeviceCharacteristics, getBLEDeviceServices, getBluetoothAdapterState, getBluetoothDevices, getClipboard, getConnectedBluetoothDevices, getImageInfo, getLocation, getNetworkType, getPhoneNumber, getSavedFileInfo, getSavedFileList, getServerTime, getSetting, getSiteInfo, getStorage, getSystemInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideToast, multiLevelSelect, navigateBack, navigateBackMiniProgram, navigateTo, navigateToMiniProgram, notifyBLECharacteristicValueChange, offAccelerometerChange, offBLECharacteristicValueChange, offBLEConnectionStateChanged, offBluetoothAdapterStateChange, offBluetoothDeviceFound, offCompassChange, offSocketClose, offSocketError, offSocketMessage, offSocketOpen, onAccelerometerChange, onBLECharacteristicValueChange, onBLEConnectionStateChanged, onBluetoothAdapterStateChange, onBluetoothDeviceFound, onCompassChange, onSocketClose, onSocketError, onSocketMessage, onSocketOpen, openBluetoothAdapter, openSetting, previewImage, readBLECharacteristicValue, redirectTo, reLaunch, removeSavedFile, removeStorage, request, saveFile, saveImage, scan, sendSocketMessage, setBackgroundColor, setCanPullDown, setClipboard, setNavigationBar, setOptionMenu, setStorage, setTabBarStyle, showActionSheet, showAuthGuide, showLoading, showNavigationBarLoading, showToast, signContract, startBluetoothDevicesDiscovery, startPullDownRefresh, stopBluetoothDevicesDiscovery, stopPullDownRefresh, switchTab, uploadFile, vibrate, watchShake, writeBLECharacteristicValue, getFileInfo, openDocument, onUserCaptureScreen, offUserCaptureScreen, setKeepScreenOn, getScreenBrightness, setScreenBrightness }; | ||
export { addPhoneContact, alert, chooseImage, clearStorage, closeBluetoothAdapter, closeSocket, confirm, connectBLEDevice, connectSocket, datePicker, disconnectBLEDevice, downloadFile, getAuthCode, getBatteryInfo, getBLEDeviceCharacteristics, getBLEDeviceServices, getBluetoothAdapterState, getBluetoothDevices, getClipboard, getConnectedBluetoothDevices, getFileInfo, getImageInfo, getLocation, getNetworkType, getPhoneNumber, getSavedFileInfo, getSavedFileList, getScreenBrightness, getServerTime, getSetting, getSiteInfo, getStorage, getSystemInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideToast, multiLevelSelect, navigateBack, navigateBackMiniProgram, navigateTo, navigateToMiniProgram, notifyBLECharacteristicValueChange, offAccelerometerChange, offBLECharacteristicValueChange, offBLEConnectionStateChanged, offBluetoothAdapterStateChange, offBluetoothDeviceFound, offCompassChange, offSocketClose, offSocketError, offSocketMessage, offSocketOpen, offUserCaptureScreen, onAccelerometerChange, onBLECharacteristicValueChange, onBLEConnectionStateChanged, onBluetoothAdapterStateChange, onBluetoothDeviceFound, onCompassChange, onSocketClose, onSocketError, onSocketMessage, onSocketOpen, onUserCaptureScreen, openBluetoothAdapter, openDocument, openSetting, previewImage, readBLECharacteristicValue, redirectTo, reLaunch, removeSavedFile, removeStorage, request, saveFile, saveImage, scan, sendSocketMessage, setBackgroundColor, setCanPullDown, setClipboard, setKeepScreenOn, setNavigationBar, setOptionMenu, setScreenBrightness, setStorage, setTabBarStyle, showActionSheet, showAuthGuide, showLoading, showNavigationBarLoading, showToast, signContract, startBluetoothDevicesDiscovery, startPullDownRefresh, stopBluetoothDevicesDiscovery, stopPullDownRefresh, switchTab, uploadFile, vibrate, watchShake, writeBLECharacteristicValue }; | ||
export default { | ||
@@ -133,2 +133,3 @@ addPhoneContact: addPhoneContact, | ||
getConnectedBluetoothDevices: getConnectedBluetoothDevices, | ||
getFileInfo: getFileInfo, | ||
getImageInfo: getImageInfo, | ||
@@ -140,2 +141,3 @@ getLocation: getLocation, | ||
getSavedFileList: getSavedFileList, | ||
getScreenBrightness: getScreenBrightness, | ||
getServerTime: getServerTime, | ||
@@ -166,2 +168,3 @@ getSetting: getSetting, | ||
offSocketOpen: offSocketOpen, | ||
offUserCaptureScreen: offUserCaptureScreen, | ||
onAccelerometerChange: onAccelerometerChange, | ||
@@ -177,3 +180,5 @@ onBLECharacteristicValueChange: onBLECharacteristicValueChange, | ||
onSocketOpen: onSocketOpen, | ||
onUserCaptureScreen: onUserCaptureScreen, | ||
openBluetoothAdapter: openBluetoothAdapter, | ||
openDocument: openDocument, | ||
openSetting: openSetting, | ||
@@ -194,4 +199,6 @@ previewImage: previewImage, | ||
setClipboard: setClipboard, | ||
setKeepScreenOn: setKeepScreenOn, | ||
setNavigationBar: setNavigationBar, | ||
setOptionMenu: setOptionMenu, | ||
setScreenBrightness: setScreenBrightness, | ||
setStorage: setStorage, | ||
@@ -213,10 +220,3 @@ setTabBarStyle: setTabBarStyle, | ||
watchShake: watchShake, | ||
writeBLECharacteristicValue: writeBLECharacteristicValue, | ||
getFileInfo: getFileInfo, | ||
openDocument: openDocument, | ||
onUserCaptureScreen: onUserCaptureScreen, | ||
offUserCaptureScreen: offUserCaptureScreen, | ||
setKeepScreenOn: setKeepScreenOn, | ||
getScreenBrightness: getScreenBrightness, | ||
setScreenBrightness: setScreenBrightness | ||
writeBLECharacteristicValue: writeBLECharacteristicValue | ||
}; |
import { PickMPArgs, PickMpReturns, MPApi } from '../types'; | ||
declare type Callback<T> = (result?: T) => void; | ||
export default function call<T extends keyof MPApi>(apiName: T, options?: PickMPArgs<T> | Callback<PickMpReturns<T>>, callback?: Callback<PickMpReturns<T>>): void; | ||
export default function call<T extends keyof MPApi>(apiName: T, options?: PickMPArgs<T> | Callback<PickMpReturns<T>>, callback?: Callback<PickMpReturns<T>>, isSync?: boolean): void; | ||
export {}; |
@@ -7,3 +7,4 @@ import { loadAppxBridge } from './utils'; | ||
options = _a.options, | ||
callback = _a.callback; | ||
callback = _a.callback, | ||
isSync = _a.isSync; | ||
var env = window; | ||
@@ -22,7 +23,8 @@ var random = Math.floor(Math.random() * 1000000); | ||
options: options, | ||
callback: callback | ||
callback: callback, | ||
isSync: isSync | ||
}); | ||
} | ||
export default function call(apiName, options, callback) { | ||
export default function call(apiName, options, callback, isSync) { | ||
loadAppxBridge(function (bridgeReady) { | ||
@@ -42,3 +44,4 @@ var env = window; | ||
options: options, | ||
callback: callback | ||
callback: callback, | ||
isSync: isSync | ||
}); | ||
@@ -49,3 +52,4 @@ } else { | ||
options: options, | ||
callback: callback | ||
callback: callback, | ||
isSync: isSync | ||
}); | ||
@@ -52,0 +56,0 @@ } |
@@ -38,6 +38,8 @@ import { BridgeReady } from './constants'; | ||
export var callbackFn = function callbackFn(res, callback) { | ||
var success = callback.success, | ||
fail = callback.fail, | ||
complete = callback.complete; // @ts-ignore | ||
var _a = callback || {}, | ||
success = _a.success, | ||
fail = _a.fail, | ||
complete = _a.complete; // @ts-ignore | ||
if (res.error && isFunction(fail)) { | ||
@@ -44,0 +46,0 @@ // @ts-ignore |
@@ -204,6 +204,10 @@ var __assign = this && this.__assign || function () { | ||
var api = data.api, | ||
options = data.options; | ||
options = data.options, | ||
_a = data.isSync, | ||
isSync = _a === void 0 ? false : _a; | ||
return new Promise(function (resolve) { | ||
// @ts-ignore | ||
if (!my[api]) { | ||
var mpApi = my[api]; | ||
if (!mpApi) { | ||
// @ts-ignore | ||
@@ -216,8 +220,11 @@ my.call(api, __assign(__assign({}, options), { | ||
} else { | ||
// @ts-ignore | ||
my[api](__assign(__assign({}, options), { | ||
success: resolve, | ||
fail: resolve, | ||
complete: resolve | ||
})); | ||
if (isSync) { | ||
resolve(mpApi(options)); | ||
} else { | ||
mpApi(__assign(__assign({}, options), { | ||
success: resolve, | ||
fail: resolve, | ||
complete: resolve | ||
})); | ||
} | ||
} | ||
@@ -224,0 +231,0 @@ }); |
import * as bridge from './bridges'; | ||
import webCall from './common/web-call'; | ||
import mpWebCall from './common/mp-web-call'; | ||
export * from './bridges'; | ||
export default bridge; | ||
export { default as appEnv } from './appEnv'; | ||
export { webCall, mpWebCall }; | ||
export { appEnv } from './appEnv'; |
import * as bridge from './bridges'; | ||
import webCall from './common/web-call'; | ||
import mpWebCall from './common/mp-web-call'; | ||
export * from './bridges'; | ||
export default bridge; | ||
export { default as appEnv } from './appEnv'; | ||
export { webCall, mpWebCall }; | ||
export { appEnv } from './appEnv'; |
{ | ||
"name": "hylid-bridge", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "description": "Unite Api For AliPay Plus MiniProgram Project.", |
@@ -131,2 +131,3 @@ # hylid-bridge | ||
> - getNetworkType | ||
> - getAppIdSync | ||
> - getPaymentCode | ||
@@ -133,0 +134,0 @@ > - getPhoneNumber |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10722
184
537568