import Vnmf from '../../index' declare module '../../index' { namespace stopHCE { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace startHCE { interface Option { /** Need to register the system AID List */ aid_list: string[] /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace sendHCEMessage { interface Option { /** Binary Data */ data: ArrayBuffer /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace onHCEMessage { /** Receive NFC Device message event echo function */ type Callback = (result: CallbackResult) => void interface CallbackResult { /** `messageType=1` Hour ,Client received NFC Device Command */ data: ArrayBuffer /** Message Type */ messageType: keyof MessageType /** `messageType=2` Hour,Reason */ reason: number } /** Message Type */ interface MessageType { /** HCE APDU CommandType,A small program needs to deal with this command.,& Call sendHCEMessage Interface returns processing command */ 1 /** Equipment out-of-site incident type */ 2 } } namespace getHCEState { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } /** IsoDep Label * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/IsoDep.html */ interface IsoDep { /** Disconnect * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/IsoDep.close.html */ close(option?: IsoDep.close.Option): Promise /** Connection NFC Label * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/IsoDep.connect.html */ connect(option?: IsoDep.connect.Option): Promise /** Retrieving Retrieval Information * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/IsoDep.getHistoricalBytes.html */ getHistoricalBytes(option?: IsoDep.getHistoricalBytes.Option): Promise /** Retrieve maximum transmission length * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/IsoDep.getMaxTransceiveLength.html */ getMaxTransceiveLength(option?: IsoDep.getMaxTransceiveLength.Option): Promise /** Check for connection * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/IsoDep.isConnected.html */ isConnected(option?: IsoDep.isConnected.Option): Promise /** Set timeout * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/IsoDep.setTimeout.html */ setTimeout(option?: IsoDep.setTimeout.Option): Promise /** Send Data * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/IsoDep.transceive.html */ transceive(option?: IsoDep.transceive.Option): Promise } namespace IsoDep { namespace close { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace connect { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace getHistoricalBytes { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.NFCError { /** Returns Historical Binary Data */ histBytes: ArrayBuffer } } namespace getMaxTransceiveLength { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.NFCError { /** Maximum transport length */ length: number } } namespace isConnected { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace setTimeout { interface Option { /** Set timeout (ms) */ timeout: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace transceive { interface Option { /** Binary data required to pass */ transceive: ArrayBuffer /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.NFCError { data: ArrayBuffer } } } /** MifareClassic Label * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/MifareClassic.html */ interface MifareClassic { /** Disconnect * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/MifareClassic.close.html */ close(option?: MifareClassic.close.Option): Promise /** Connection NFC Label * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/MifareClassic.connect.html */ connect(option?: MifareClassic.connect.Option): Promise /** Retrieve maximum transmission length * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/MifareClassic.getMaxTransceiveLength.html */ getMaxTransceiveLength(option?: MifareClassic.getMaxTransceiveLength.Option): Promise /** Check for connection * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/MifareClassic.isConnected.html */ isConnected(option?: MifareClassic.isConnected.Option): Promise /** Set timeout * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/MifareClassic.setTimeout.html */ setTimeout(option?: MifareClassic.setTimeout.Option): Promise /** Send Data * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/MifareClassic.transceive.html */ transceive(option?: MifareClassic.transceive.Option): Promise } namespace MifareClassic { namespace close { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace connect { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace getMaxTransceiveLength { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.NFCError { /** Maximum transport length */ length: number } } namespace isConnected { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace setTimeout { interface Option { /** Set timeout (ms) */ timeout: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace transceive { interface Option { /** Binary data required to pass */ transceive: ArrayBuffer /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.NFCError { data: ArrayBuffer } } } /** MifareUltralight Label * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/MifareUltralight.html */ interface MifareUltralight { /** Disconnect * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/MifareUltralight.close.html */ close(option?: MifareUltralight.close.Option): Promise /** Connection NFC Label * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/MifareUltralight.connect.html */ connect(option?: MifareUltralight.connect.Option): Promise /** Retrieve maximum transmission length * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/MifareUltralight.getMaxTransceiveLength.html */ getMaxTransceiveLength(option?: MifareUltralight.getMaxTransceiveLength.Option): Promise /** Check for connection * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/MifareUltralight.isConnected.html */ isConnected(option?: MifareUltralight.isConnected.Option): Promise /** Set timeout * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/MifareUltralight.setTimeout.html */ setTimeout(option?: MifareUltralight.setTimeout.Option): Promise /** Send Data * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/MifareUltralight.transceive.html */ transceive(option?: MifareUltralight.transceive.Option): Promise } namespace MifareUltralight { namespace close { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace connect { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace getMaxTransceiveLength { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.NFCError { /** Maximum transport length */ length: number } } namespace isConnected { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace setTimeout { interface Option { /** Set timeout (ms) */ timeout: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace transceive { interface Option { /** Binary data required to pass */ transceive: ArrayBuffer /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.NFCError { data: ArrayBuffer } } } /** Ndef Label * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/Ndef.html */ interface Ndef { /** Disconnect * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/Ndef.close.html */ close(option?: Ndef.close.Option): Promise /** Connection NFC Label * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/Ndef.connect.html */ connect(option?: Ndef.connect.Option): Promise /** Check for connection * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/Ndef.isConnected.html */ isConnected(option?: Ndef.isConnected.Option): Promise /** Disable listening. Ndef Message * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/Ndef.offNdefMessage.html */ offNdefMessage( /** Listening. Ndef Message echo function */ callback: Ndef.onNdefMessage.Callback, ): void /** Listening. Ndef Message * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/Ndef.onNdefMessage.html */ onNdefMessage( /** Listening. Ndef Message echo function */ callback: Ndef.onNdefMessage.Callback, ): void /** Set timeout * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/Ndef.setTimeout.html */ setTimeout(option?: Ndef.setTimeout.Option): Promise /** Rewrite Ndef Label Contents * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/Ndef.writeNdefMessage.html */ writeNdefMessage(option?: Ndef.writeNdefMessage.Option): Promise } namespace Ndef { namespace close { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace connect { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace isConnected { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace onNdefMessage { /** Listening. Ndef Message echo function */ type Callback = (...args: unknown[]) => void } namespace setTimeout { interface Option { /** Set timeout (ms) */ timeout: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace writeNdefMessage { interface Option { /** uri Array */ uris: string[] /** text Array */ texts: string[] /** Binary Object Array, Need to specify id, type and payload (Both. ArrayBuffer Type) */ records: record[] /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } interface record { id: ArrayBuffer type: ArrayBuffer payload: ArrayBuffer } } } /** NfcA Label * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcA.html */ interface NfcA { /** Disconnect * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcA.close.html */ close(option?: NfcA.close.Option): Promise /** Connection NFC Label * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcA.connect.html */ connect(option?: NfcA.connect.Option): Promise /** Fetch ATQA Information * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcA.getAtqa.html */ getAtqa(option?: NfcA.getAtqa.Option): Promise /** Retrieve maximum transmission length * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcA.getMaxTransceiveLength.html */ getMaxTransceiveLength(option?: NfcA.getMaxTransceiveLength.Option): Promise /** Fetch SAK Information * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcA.getSak.html */ getSak(option?: NfcA.getSak.Option): Promise /** Check for connection * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcA.isConnected.html */ isConnected(option?: NfcA.isConnected.Option): Promise /** Set timeout * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcA.setTimeout.html */ setTimeout(option?: NfcA.setTimeout.Option): Promise /** Send Data * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcA.transceive.html */ transceive(option?: NfcA.transceive.Option): Promise } namespace NfcA { namespace close { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace connect { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace getAtqa { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.NFCError { /** Back ATQA/SENS_RES Data */ atqa: ArrayBuffer } } namespace getMaxTransceiveLength { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.NFCError { /** Maximum transport length */ length: number } } namespace getSak { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.NFCError { /** Back SAK/SEL_RES Data */ sak: number } } namespace isConnected { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace setTimeout { interface Option { /** Set timeout (ms) */ timeout: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace transceive { interface Option { /** Binary data required to pass */ transceive: ArrayBuffer /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.NFCError { data: ArrayBuffer } } } /** NFC Example * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NFCAdapter.html */ interface NFCAdapter { /** FetchIsoDepExample,Example supportISO-DEP (ISO 14443-4)Standard reading and writing * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NFCAdapter.getIsoDep.html */ getIsoDep(): IsoDep /** FetchMifareClassicExample,Example supportMIFARE ClassicRead & Write of Tabs * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NFCAdapter.getMifareClassic.html */ getMifareClassic(): MifareClassic /** FetchMifareUltralightExample,Example supportMIFARE UltralightRead & Write of Tabs * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NFCAdapter.getMifareUltralight.html */ getMifareUltralight(): MifareUltralight /** FetchNdefExample,Example Support for the RightNDEFFormattedNFCTabNDEFReading and writing of data * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NFCAdapter.getNdef.html */ getNdef(): Ndef /** FetchNfcAExample,Example supportNFC-A (ISO 14443-3A)Standard reading and writing * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NFCAdapter.getNfcA.html */ getNfcA(): NfcA /** FetchNfcBExample,Example supportNFC-B (ISO 14443-3B)Standard reading and writing * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NFCAdapter.getNfcB.html */ getNfcB(): NfcB /** FetchNfcFExample,Example supportNFC-F (JIS 6319-4)Standard reading and writing * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NFCAdapter.getNfcF.html */ getNfcF(): NfcB /** FetchNfcVExample,Example supportNFC-V (ISO 15693)Standard reading and writing * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NFCAdapter.getNfcV.html */ getNfcV(): NfcV /** Disable listening. NFC Tag * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NFCAdapter.offDiscovered.html */ offDiscovered( /** Listening. NFC TagThe echo function of the %1 */ callback: NFCAdapter.onDiscovered.Callback, ): void /** Listening. NFC Tag * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NFCAdapter.onDiscovered.html */ onDiscovered( /** Listening. NFC TagThe echo function of the %1 */ callback: NFCAdapter.onDiscovered.Callback, ): void /** Start ScanningNFCLabel * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NFCAdapter.startDiscovery.html */ startDiscovery(option?: NFCAdapter.startDiscovery.Option): Promise /** CloseNFCTab Scan * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NFCAdapter.stopDiscovery.html */ stopDiscovery(option?: NFCAdapter.stopDiscovery.Option): Promise } namespace NFCAdapter { namespace onDiscovered { /** Listening. NFC TagThe echo function of the %1 */ type Callback = ( result: CallbackResult, ) => void interface CallbackResult { /** tech Array,For matchingNFCWhat kind of standards do the cards use?(NfcAExamples:)Processing */ techs: string[] /** NdefMessage Array,Message Format As {id: ArrayBuffer, type: ArrayBuffer, payload: ArrayBuffer} */ messages: NdefMessage[] /** NFCLabel 'sUID * @supported tt */ uid?: ArrayBuffer } interface NdefMessage { id: ArrayBuffer type: ArrayBuffer payload: ArrayBuffer } } namespace startDiscovery { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace stopDiscovery { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } } /** NfcB Label * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcB.html */ interface NfcB { /** Disconnect * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcB.close.html */ close(option?: NfcB.close.Option): Promise /** Connection NFC Label * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcB.connect.html */ connect(option?: NfcB.connect.Option): Promise /** Retrieve maximum transmission length * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcB.getMaxTransceiveLength.html */ getMaxTransceiveLength(option?: NfcB.getMaxTransceiveLength.Option): Promise /** Check for connection * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcB.isConnected.html */ isConnected(option?: NfcB.isConnected.Option): Promise /** Set timeout * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcB.setTimeout.html */ setTimeout(option?: NfcB.setTimeout.Option): Promise /** Send Data * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcB.transceive.html */ transceive(option?: NfcB.transceive.Option): Promise } namespace NfcB { namespace close { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace connect { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace getMaxTransceiveLength { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.NFCError { /** Maximum transport length */ length: number } } namespace isConnected { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace setTimeout { interface Option { /** Set timeout (ms) */ timeout: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace transceive { interface Option { /** Binary data required to pass */ transceive: ArrayBuffer /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.NFCError { data: ArrayBuffer } } } /** NfcF Label * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcF.html */ interface NfcF { /** Disconnect * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcF.close.html */ close(option?: NfcF.close.Option): Promise /** Connection NFC Label * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcF.connect.html */ connect(option?: NfcF.connect.Option): Promise /** Retrieve maximum transmission length * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcF.getMaxTransceiveLength.html */ getMaxTransceiveLength(option?: NfcF.getMaxTransceiveLength.Option): Promise /** Check for connection * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcF.isConnected.html */ isConnected(option?: NfcF.isConnected.Option): Promise /** Set timeout * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcF.setTimeout.html */ setTimeout(option?: NfcF.setTimeout.Option): Promise /** Send Data * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcF.transceive.html */ transceive(option?: NfcF.transceive.Option): Promise } namespace NfcF { namespace close { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace connect { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace getMaxTransceiveLength { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.NFCError { /** Maximum transport length */ length: number } } namespace isConnected { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace setTimeout { interface Option { /** Set timeout (ms) */ timeout: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace transceive { interface Option { /** Binary data required to pass */ transceive: ArrayBuffer /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.NFCError { data: ArrayBuffer } } } /** NfcV Label * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcV.html */ interface NfcV { /** Disconnect * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcV.close.html */ close(option?: NfcV.close.Option): Promise /** Connection NFC Label * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcV.connect.html */ connect(option?: NfcV.connect.Option): Promise /** Retrieve maximum transmission length * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcV.getMaxTransceiveLength.html */ getMaxTransceiveLength(option?: NfcV.getMaxTransceiveLength.Option): Promise /** Check for connection * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcV.isConnected.html */ isConnected(option?: NfcV.isConnected.Option): Promise /** Set timeout * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcV.setTimeout.html */ setTimeout(option?: NfcV.setTimeout.Option): Promise /** Send Data * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcV.transceive.html */ transceive(option?: NfcV.transceive.Option): Promise } namespace NfcV { namespace close { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace connect { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace getMaxTransceiveLength { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.NFCError { /** Maximum transport length */ length: number } } namespace isConnected { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace setTimeout { interface Option { /** Set timeout (ms) */ timeout: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.NFCError) => void } } namespace transceive { interface Option { /** Binary data required to pass */ transceive: ArrayBuffer /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.NFCError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.NFCError) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.NFCError { data: ArrayBuffer } } } interface VnmfStatic { /** * Close NFC Module。It only works under Andre's system.。 * @supported weapp * @example * ```tsx * Vnmf.stopHCE({ * success: function (res) { * console.log(res.errMsg) * } * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/wx.stopHCE.html */ stopHCE(option?: stopHCE.Option): Promise /** * Initialization NFC Module。 * @supported weapp * @example * ```tsx * Vnmf.startHCE({ * aid_list: ['F222222222'] * success: function (res) { * console.log(res.errMsg) * } * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/wx.startHCE.html */ startHCE(option: startHCE.Option): Promise /** * Send NFC Message。It only works under Andre's system.。 * @supported weapp * @example * ```tsx * const buffer = new ArrayBuffer(1) * const dataView = new DataView(buffer) * dataView.setUint8(0, 0) * Vnmf.startHCE({ * success: function (res) { * Vnmf.onHCEMessage(function (res) { * if (res.messageType === 1) { * Vnmf.sendHCEMessage({data: buffer}) * } * }) * } * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/wx.sendHCEMessage.html */ sendHCEMessage(option: sendHCEMessage.Option): Promise /** * Listen to it. NFC Device Message Event,Only one bug can be registered. * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/wx.onHCEMessage.html */ onHCEMessage( /** Receive NFC Device message event echo function */ callback: onHCEMessage.Callback, ): void /** Receive NFC Device Message Event,Disable the bug.。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/wx.offHCEMessage.html */ offHCEMessage( /** Receive NFC Device message event echo function */ callback: (...args: any[]) => any, ): void /** Fetch NFC Example * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/wx.getNFCAdapter.html */ getNFCAdapter(): NFCAdapter /** Determining whether the current device is supported HCE Capacity。 * @supported weapp * @example * ```tsx * Vnmf.getHCEState({ * success: function (res) { * console.log(res.errCode) * } * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/wx.getHCEState.html */ getHCEState(option?: getHCEState.Option): Promise } }