import Vnmf from '../../index' declare module '../../index' { namespace startSoterAuthentication { interface Option { /** Challenge factor。Challenge factor key identifying information for the string used signature of caller this bioassay,Will be `resultJSON` Part,This request is recognized by the caller.。For example...:If the scene is to request a user's authorization confirm an order,,then you can fill the order number in this parameter。 */ challenge: string /** Acceptable manner of biological authentication requested */ requestAuthModes: Array /** Could not close temporary folder: %s,that is the content of dialogue box hints displayed on interface during recognition process */ authContent?: string /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.CallbackResult { /** Biocertification */ authMode: string /** Error Code */ errCode: number /** Cannot initialise Evolution's mail component. */ errMsg: string /** Equipment security area(TEE)Acquiring security information on the mainframe(LikeTEEName version number, etc. and anti-reflection parameters)And this authentication information.(OnlyAndroidSupport,This authenticated fingerprint.ID)。For details see below. */ resultJSON: string /** UseSOTERSecurity Key pair `resultJSON` Could not close temporary folder: %s(SHA256 with RSA/PSS, saltlen=20) */ resultJSONSignature: string } interface requestAuthModes { /** Fingerprint recognition. */ fingerPrint /** Face recognition. */ facial /** Acoustic recognizance * @supported Not yet supported */ speech } } namespace checkIsSupportSoterAuthentication { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (result: SuccessCallbackResult) => void } interface SuccessCallbackResult extends VnmfGeneral.CallbackResult { /** Can be supported by this deviceSOTERIdentification of methods biometric identification */ supportMode: Array /** Call Information */ errMsg: string } interface requestAuthModes { /** Fingerprint recognition. */ fingerPrint /** Face recognition. */ facial /** Acoustic recognizance * @supported Not yet supported */ speech } } namespace checkIsSoterEnrolledInDevice { interface Option { /** Method of authentication */ checkAuthMode: keyof RequestAuthModes /** 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 RequestAuthModes { /** Fingerprint recognition. */ fingerPrint /** Face recognition. */ facial /** Acoustic recognizance * @supported Not yet supported */ speech } interface SuccessCallbackResult extends VnmfGeneral.CallbackResult { /** Cannot initialise Evolution's mail component. */ errMsg: string /** Information entered */ isEnrolled: boolean } } interface VnmfStatic { /** Here we go. SOTER Biological certification。Could not close temporary folder: %s[Annotations](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/bio-auth.html)。 * * **resultJSON Annotations** * This data is a deviceTEEMedium,It's going to be passed in.challengeandTEEData from other sources of security information are assembled.JSON,The explanation of the following fields is provided in table below.。Here's a few examples.: * | Field Name | Annotations | * |---|----| * | raw | Caller's in.challenge | * | fid | (OnlyAndroidSupport)Bioinformation number for this biometric authentication(Fingerprint recognition is the internal number of this device.) | * | counter | Replay feature parameters | * | tee_n | TEEName(♪ Like high-speed ortrustonicWait.) | * | tee_v | TEEVersion Number | * | fp_n | Fingerprint and associated logic module provider(LikeFPCWait.) | * | fp_v | Fingerprints and associated module version numbers | * | cpu_id | The machine's only recognizable.ID | * | uid | The same concept.AndroidSystem Definitionsuid,That is, the application number. | * @supported weapp * @example * ```tsx * Vnmf.startSoterAuthentication({ * requestAuthModes: ['fingerPrint'], * challenge: '123456', * authContent: 'Unlock the fingerprints, please.', * success: function (res) { } * }) * ``` * * ```json * { * "raw":"msg", * "fid":"2", * "counter":123, * "tee_n":"TEE Name", * "tee_v":"TEE Version", * "fp_n":"Fingerprint Sensor Name", * "fp_v":"Fingerprint Sensor Version", * "cpu_id":"CPU Id", * "uid":"21" * } * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/soter/wx.startSoterAuthentication.html */ startSoterAuthentication(option: startSoterAuthentication.Option): Promise /** Get Supported by this machine SOTER Biocertification * @supported weapp * @example * ```tsx * Vnmf.checkIsSupportSoterAuthentication({ * success: function (res) { * // res.supportMode = [] There's no cover.SOTERSupported biometric methods * // res.supportMode = ['fingerPrint'] Fingerprint recognition only. * // res.supportMode = ['fingerPrint', 'facial'] Support fingerprinting and face recognition. * } * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/soter/wx.checkIsSupportSoterAuthentication.html */ checkIsSupportSoterAuthentication( option?: checkIsSupportSoterAuthentication.Option, ): Promise /** Interface to access whether biological information, such as fingerprints, is entered into the device * @supported weapp * @example * ```tsx * Vnmf.checkIsSoterEnrolledInDevice({ * checkAuthMode: 'fingerPrint', * success: function (res) { * console.log(res.isEnrolled) * } * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/soter/wx.checkIsSoterEnrolledInDevice.html */ checkIsSoterEnrolledInDevice( option: checkIsSoterEnrolledInDevice.Option, ): Promise } }