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 * This module provides the capability to manage face auth. 18 * @namespace faceAuth 19 * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth 20 * @since 9 21 */ 22declare namespace faceAuth { 23 /** 24 * Provides the abilities for face authentication. 25 * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth 26 * @systemapi Hide this for inner system use. 27 * @since 9 28 */ 29 class FaceAuthManager { 30 /** 31 * Constructor to get the FaceAuthManager class instance. 32 * @returns Returns the FaceAuthManager class instance. 33 * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth 34 * @systemapi Hide this for inner system use. 35 * @since 9 36 */ 37 constructor(); 38 39 /** 40 * Set XComponent surface id for camera preview during enroll. 41 * @permission ohos.permission.MANAGE_USER_IDM 42 * @param surfaceId Indicates surface id for face enroll preview. 43 * @throws { BusinessError } 201 - Permission verification failed. 44 * @throws { BusinessError } 202 - The caller is not a system application. 45 * @throws { BusinessError } 12700001 - The operation is failed. 46 * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth 47 * @systemapi Hide this for inner system use. 48 * @since 9 49 */ 50 setSurfaceId(surfaceId: string): void; 51 } 52} 53 54export default faceAuth;