import { StartSoterAuthenticationOptions, CheckIsSoterEnrolledInDeviceOptions, SoterAuthMode } from './interface.uts'; export const API_START_SOTER_AUTHENTICATION = 'startSoterAuthentication' export const StartSoterAuthenticationApiOptions: ApiOptions = { formatArgs: new Map string | undefined)>([ ['requestAuthModes', function (value: string) { if (!value.includes('fingerPrint') && !value.includes('facial')) { return 'requestAuthModes 填写错误' } return undefined }] ]) } export const StartSoterAuthenticationApiProtocols = new Map([ [ 'requestAuthModes', { type: 'array', required: true } ], [ 'challenge', { type: 'string' } ], [ 'authContent', { type: 'string' } ] ]) export const API_CHECK_IS_SOTER_ENROLLED_IN_DEVICE = 'checkIsSoterEnrolledInDevice' export const checkAuthModes: SoterAuthMode[] = ['fingerPrint', 'facial', 'speech'] export const CheckIsSoterEnrolledInDeviceApiOptions: ApiOptions = { formatArgs: new Map string | undefined)>([ ['checkAuthMode', function (value: string) { if (!checkAuthModes.includes(value as SoterAuthMode)) { return 'checkAuthMode 填写错误' } return undefined }] ]) } export const CheckIsSoterEnrolledInDeviceProtocols = new Map([ [ 'checkAuthMode', { type: 'string' } ] ]) export const API_CHECK_IS_SUPPORT_SOTER_AUTHENTICATION = 'checkIsSupportSoterAuthentication'