1/* 2 * Copyright (c) 2022-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit UserAuthenticationKit 19 * @arkts 1.1&1.2 20 */ 21 22/** 23 * This module provides the capability to manage face auth. 24 * 25 * @namespace faceAuth 26 * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth 27 * @since arkts {'1.1':'9','1.2':'20'} 28 * @arkts 1.1&1.2 29 */ 30declare namespace faceAuth { 31 /** 32 * Provides the abilities for face authentication. 33 * 34 * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth 35 * @systemapi Hide this for inner system use. 36 * @since arkts {'1.1':'9','1.2':'20'} 37 * @arkts 1.1&1.2 38 */ 39 class FaceAuthManager { 40 /** 41 * Constructor to get the FaceAuthManager class instance. 42 * 43 * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth 44 * @systemapi Hide this for inner system use. 45 * @since arkts {'1.1':'9','1.2':'20'} 46 * @arkts 1.1&1.2 47 */ 48 constructor(); 49 50 /** 51 * Set XComponent surface id for camera preview during enroll. 52 * 53 * @permission ohos.permission.MANAGE_USER_IDM 54 * @param { string } surfaceId Indicates surface id for face enroll preview. 55 * @throws { BusinessError } 201 - Permission denied. 56 * @throws { BusinessError } 202 - Permission denied. Called by non-system application. 57 * @throws { BusinessError } 12700001 - The service is unavailable. 58 * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth 59 * @systemapi Hide this for inner system use. 60 * @since arkts {'1.1':'9','1.2':'20'} 61 * @arkts 1.1&1.2 62 */ 63 setSurfaceId(surfaceId: string): void; 64 } 65} 66 67export default faceAuth; 68