diff --git a/api/@ohos.userIAM.faceAuth.d.ts b/api/@ohos.userIAM.faceAuth.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fc6276dc025a1e17dea8a02338463bf2f1fa5ca5 --- /dev/null +++ b/api/@ohos.userIAM.faceAuth.d.ts @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2022-2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * This module provides the capability to manage face auth. + * + * @since 9 + */ +declare namespace faceAuth { + /** + * Provides the abilities for face authentication. + * @name FaceAuth + * @since 9 + * @syscap SystemCapability.UserIAM.FaceAuth + * @systemapi Hide this for inner system use. + */ + class FaceAuthManager { + /** + * Constructor to get the FaceAuthManager class instance. + * + * @since 9 + * @return Returns the FaceAuthManager class instance. + * @systemapi Hide this for inner system use. + */ + constructor(); + + /** + * Set XComponent surface id for camera preview during enroll. + * + * @since 9 + * @param surfaceId Indicates surface id for face enroll preview. + * @return Operation result. + * @systemapi Hide this for inner system use. + */ + setSurfaceId(surfaceId: string): ResultCode; + } + + /** + * Indicates the enumeration of operation result code. + * + * @name ResultCode + * @since 9 + * @syscap SystemCapability.UserIAM.FaceAuth + * @systemapi Hide this for inner system use. + */ + enum ResultCode { + /** + * Indicates that operation is success. + */ + SUCCESS = 0, + + /** + * Indicates that operation is fail. + */ + FAIL = 1, + } +} + +export default faceAuth; \ No newline at end of file