From c64c57f76ea2afda53b4d1a8b4955480efcd81fd Mon Sep 17 00:00:00 2001 From: adelelimi Date: Wed, 6 Aug 2025 14:29:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80arkts=E9=9D=99=E6=80=81?= =?UTF-8?q?=E5=8C=96=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: adelelimi --- ....app.ability.UserAuthExtensionAbility.d.ts | 3 +- api/@ohos.userIAM.faceAuth.d.ts | 13 +- api/@ohos.userIAM.userAccessCtrl.d.ts | 59 ++-- api/@ohos.userIAM.userAuth.d.ts | 290 ++++++------------ kits/@kit.UserAuthenticationKit.d.ts | 10 - 5 files changed, 117 insertions(+), 258 deletions(-) diff --git a/api/@ohos.app.ability.UserAuthExtensionAbility.d.ts b/api/@ohos.app.ability.UserAuthExtensionAbility.d.ts index 959833aa70..7a8e808c03 100644 --- a/api/@ohos.app.ability.UserAuthExtensionAbility.d.ts +++ b/api/@ohos.app.ability.UserAuthExtensionAbility.d.ts @@ -16,7 +16,6 @@ /** * @file * @kit UserAuthenticationKit - * @arkts 1.1&1.2 */ import UIExtensionAbility from './@ohos.app.ability.UIExtensionAbility'; @@ -28,7 +27,7 @@ import UIExtensionAbility from './@ohos.app.ability.UIExtensionAbility'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi Hide this for inner system use. * @StageModelOnly - * @since arkts {'1.1':'10','1.2':'20'} + * @since 10 */ export default class UserAuthExtensionAbility extends UIExtensionAbility { } \ No newline at end of file diff --git a/api/@ohos.userIAM.faceAuth.d.ts b/api/@ohos.userIAM.faceAuth.d.ts index e5f2740484..550cdbe623 100644 --- a/api/@ohos.userIAM.faceAuth.d.ts +++ b/api/@ohos.userIAM.faceAuth.d.ts @@ -16,7 +16,6 @@ /** * @file * @kit UserAuthenticationKit - * @arkts 1.1&1.2 */ /** @@ -24,8 +23,7 @@ * * @namespace faceAuth * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth - * @since arkts {'1.1':'9','1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 */ declare namespace faceAuth { /** @@ -33,8 +31,7 @@ declare namespace faceAuth { * * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'9','1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 */ class FaceAuthManager { /** @@ -42,8 +39,7 @@ declare namespace faceAuth { * * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'9','1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 */ constructor(); @@ -57,8 +53,7 @@ declare namespace faceAuth { * @throws { BusinessError } 12700001 - The service is unavailable. * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'9','1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 */ setSurfaceId(surfaceId: string): void; } diff --git a/api/@ohos.userIAM.userAccessCtrl.d.ts b/api/@ohos.userIAM.userAccessCtrl.d.ts index dc178074c0..c998c14626 100644 --- a/api/@ohos.userIAM.userAccessCtrl.d.ts +++ b/api/@ohos.userIAM.userAccessCtrl.d.ts @@ -16,7 +16,6 @@ /** * @file * @kit UserAuthenticationKit - * @arkts 1.1&1.2 */ import userAuth from '@ohos.userIAM.userAuth'; @@ -26,8 +25,7 @@ import userAuth from '@ohos.userIAM.userAuth'; * * @namespace userAccessCtrl * @syscap SystemCapability.UserIAM.UserAuth.Core - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare namespace userAccessCtrl { /** @@ -35,7 +33,7 @@ declare namespace userAccessCtrl { * * @permission ohos.permission.USE_USER_ACCESS_MANAGER * @param { Uint8Array } authToken - AuthToken to be verified. - * @param { int } allowableDuration - Allowable time interval from the authToken is issued till now in milliseconds. + * @param { number } allowableDuration - Allowable time interval from the authToken is issued till now in milliseconds. * @returns { Promise } Returns parsed authToken. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied. Called by non-system application. @@ -48,10 +46,9 @@ declare namespace userAccessCtrl { * @throws { BusinessError } 12500016 - AuthToken has expired. * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ - function verifyAuthToken(authToken: Uint8Array, allowableDuration: int): Promise; + function verifyAuthToken(authToken: Uint8Array, allowableDuration: number): Promise; /** * Authentication token. @@ -59,8 +56,7 @@ declare namespace userAccessCtrl { * @typedef AuthToken * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface AuthToken { /** @@ -69,8 +65,7 @@ declare namespace userAccessCtrl { * @type { Uint8Array } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ challenge: Uint8Array; @@ -80,8 +75,7 @@ declare namespace userAccessCtrl { * @type { userAuth.AuthTrustLevel } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ authTrustLevel: userAuth.AuthTrustLevel; @@ -91,8 +85,7 @@ declare namespace userAccessCtrl { * @type { userAuth.UserAuthType } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ authType: userAuth.UserAuthType; @@ -102,21 +95,19 @@ declare namespace userAccessCtrl { * @type { AuthTokenType } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ tokenType: AuthTokenType; /** * The user id of authToken. * - * @type { int } + * @type { number } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ - userId: int; + userId: number; /** * The time interval from the authToken is issued till now in milliseconds. @@ -124,8 +115,7 @@ declare namespace userAccessCtrl { * @type { bigint } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ timeInterval: bigint; @@ -135,8 +125,7 @@ declare namespace userAccessCtrl { * @type { ?bigint } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ secureUid?: bigint; @@ -146,8 +135,7 @@ declare namespace userAccessCtrl { * @type { ?bigint } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ enrolledId?: bigint; @@ -157,8 +145,7 @@ declare namespace userAccessCtrl { * @type { ?bigint } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ credentialId?: bigint; } @@ -166,11 +153,10 @@ declare namespace userAccessCtrl { /** * The issued type for authToken. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ enum AuthTokenType { /** @@ -178,8 +164,7 @@ declare namespace userAccessCtrl { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ TOKEN_TYPE_LOCAL_AUTH = 0, @@ -188,8 +173,7 @@ declare namespace userAccessCtrl { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ TOKEN_TYPE_LOCAL_RESIGN = 1, @@ -198,8 +182,7 @@ declare namespace userAccessCtrl { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ TOKEN_TYPE_COAUTH = 2 } diff --git a/api/@ohos.userIAM.userAuth.d.ts b/api/@ohos.userIAM.userAuth.d.ts index 8e436ec93c..2e5679beab 100644 --- a/api/@ohos.userIAM.userAuth.d.ts +++ b/api/@ohos.userIAM.userAuth.d.ts @@ -18,12 +18,7 @@ * @kit UserAuthenticationKit */ -/*** if arkts 1.1 */ import type { AsyncCallback } from './@ohos.base'; -/*** endif */ -/*** if arkts 1.2 */ -import Context from './application/Context'; -/*** endif */ /** * User authentication @@ -39,8 +34,7 @@ import Context from './application/Context'; * @namespace userAuth * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare namespace userAuth { /** @@ -52,16 +46,6 @@ declare namespace userAuth { * @since 12 */ const MAX_ALLOWABLE_REUSE_DURATION: 300000; - /** - * Maximum reuse duration of the authentication result, in milliseconds. The value is 300000. - * - * @constant - * @syscap SystemCapability.UserIAM.UserAuth.Core - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - const MAX_ALLOWABLE_REUSE_DURATION: int = 300000; /** * Enum for authentication result. @@ -692,11 +676,10 @@ declare namespace userAuth { /** * Enumerates the identity authentication types. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enum UserAuthType { /** @@ -710,8 +693,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PIN = 1, @@ -726,8 +708,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ FACE = 2, @@ -742,8 +723,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ FINGERPRINT = 4, @@ -752,8 +732,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ PRIVATE_PIN = 16 } @@ -770,11 +749,10 @@ declare namespace userAuth { * For details about typical scenarios and examples, see Principles for Classifying Biometric * Authentication Trust Levels. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enum AuthTrustLevel { /** @@ -790,8 +768,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ATL1 = 10000, @@ -808,8 +785,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ATL2 = 20000, @@ -825,8 +801,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ATL3 = 30000, @@ -842,8 +817,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ATL4 = 40000 } @@ -1086,8 +1060,7 @@ declare namespace userAuth { * @throws { BusinessError } 12500013 - Operation failed because of PIN expired. * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ function getAvailableStatus(authType: UserAuthType, authTrustLevel: AuthTrustLevel): void; @@ -1097,31 +1070,28 @@ declare namespace userAuth { * @typedef EnrolledState * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface EnrolledState { /** * Credential digest, which is randomly generated when a credential is added. * - * @type { int } + * @type { number } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - credentialDigest: int; + credentialDigest: number; /** * Number of enrolled credentials. * - * @type { int } + * @type { number } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - credentialCount: int; + credentialCount: number; } /** @@ -1138,8 +1108,7 @@ declare namespace userAuth { * @throws { BusinessError } 12500010 - The type of credential has not been enrolled. * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ function getEnrolledState(authType: UserAuthType): EnrolledState; @@ -1164,11 +1133,10 @@ declare namespace userAuth { /** * Enumerates the window types of the authentication widget. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ enum WindowModeType { /** @@ -1176,8 +1144,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ DIALOG_BOX = 1, @@ -1186,8 +1153,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ FULLSCREEN = 2 } @@ -1195,11 +1161,10 @@ declare namespace userAuth { /** * Enumerates the modes for reusing authentication results. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enum ReuseMode { /** @@ -1208,8 +1173,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ AUTH_TYPE_RELEVANT = 1, @@ -1219,8 +1183,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ AUTH_TYPE_IRRELEVANT = 2, @@ -1231,8 +1194,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ CALLER_IRRELEVANT_AUTH_TYPE_RELEVANT = 3, @@ -1242,8 +1204,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ CALLER_IRRELEVANT_AUTH_TYPE_IRRELEVANT = 4 } @@ -1265,8 +1226,7 @@ declare namespace userAuth { * @typedef ReuseUnlockResult * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface ReuseUnlockResult { /** @@ -1275,8 +1235,7 @@ declare namespace userAuth { * @type { ReuseMode } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ reuseMode: ReuseMode; @@ -1284,13 +1243,12 @@ declare namespace userAuth { * Period for which the authentication result can be reused. The value must be greater than 0 and less * than MAX_ALLOWABLE_REUSE_DURATION. * - * @type { int } + * @type { number } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - reuseDuration: int; + reuseDuration: number; } /** @@ -1306,8 +1264,7 @@ declare namespace userAuth { * @typedef AuthParam * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface AuthParam { /** @@ -1324,8 +1281,7 @@ declare namespace userAuth { * @type { Uint8Array } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ challenge: Uint8Array; @@ -1342,8 +1298,7 @@ declare namespace userAuth { * @type { UserAuthType[] } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ authType: UserAuthType[]; @@ -1360,8 +1315,7 @@ declare namespace userAuth { * @type { AuthTrustLevel } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ authTrustLevel: AuthTrustLevel; @@ -1371,22 +1325,20 @@ declare namespace userAuth { * @type { ?ReuseUnlockResult } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ reuseUnlockResult?: ReuseUnlockResult; /** * ID of the user to be authenticated. * - * @type { ?int } + * @type { ?number } * @default The ID of the current user. The value is a positive integer greater than or equal to 0. * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ - userId?: int; + userId?: number; /** * Indicates whether to skip biometric authentication which has been locked by continuous failures. @@ -1412,8 +1364,7 @@ declare namespace userAuth { * @typedef WidgetParam * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface WidgetParam { /** @@ -1429,8 +1380,7 @@ declare namespace userAuth { * @type { string } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ title: string; @@ -1449,8 +1399,7 @@ declare namespace userAuth { * @type { ?string } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ navigationButtonText?: string; @@ -1461,8 +1410,7 @@ declare namespace userAuth { * @default WindowModeType.DIALOG_BOX * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ windowMode?: WindowModeType; @@ -1474,8 +1422,7 @@ declare namespace userAuth { * @type { ?Context } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ uiContext?: Context; } @@ -1494,8 +1441,7 @@ declare namespace userAuth { * @typedef UserAuthResult * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface UserAuthResult { /** @@ -1509,13 +1455,12 @@ declare namespace userAuth { * User authentication result. If the authentication is successful, SUCCESS is returned. Otherwise, an error code * is returned. For details, see UserAuthResultCode. * - * @type { int } + * @type { number } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - result: int; + result: number; /** * The authentication result if the authentication is passed. @@ -1530,8 +1475,7 @@ declare namespace userAuth { * @type { ?Uint8Array } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ token?: Uint8Array; @@ -1548,8 +1492,7 @@ declare namespace userAuth { * @type { ?UserAuthType } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ authType?: UserAuthType; @@ -1559,8 +1502,7 @@ declare namespace userAuth { * @type { ?EnrolledState } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enrolledState?: EnrolledState; } @@ -1578,8 +1520,7 @@ declare namespace userAuth { * @interface IAuthCallback * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface IAuthCallback { /** @@ -1600,23 +1541,12 @@ declare namespace userAuth { * @since 12 */ onResult(result: UserAuthResult): void; - /** - * Called to return the authentication result. If the authentication is successful, - * UserAuthResult contains the token information. - * - * @type { function } - * @syscap SystemCapability.UserIAM.UserAuth.Core - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onResult: (result: UserAuthResult) => void; } /** * Authentication tip code. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice * @since 20 @@ -1732,8 +1662,7 @@ declare namespace userAuth { * @interface UserAuthInstance * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface UserAuthInstance { /** @@ -1761,8 +1690,7 @@ declare namespace userAuth { * @throws { BusinessError } 12500002 - General operation error. * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'result', callback: IAuthCallback): void; @@ -1795,8 +1723,7 @@ declare namespace userAuth { * @throws { BusinessError } 12500002 - General operation error. * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'result', callback?: IAuthCallback): void; @@ -1871,7 +1798,6 @@ declare namespace userAuth { * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ start(): void; @@ -1900,8 +1826,7 @@ declare namespace userAuth { * @throws { BusinessError } 12500002 - General operation error. * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ cancel(): void; @@ -1965,19 +1890,17 @@ declare namespace userAuth { * @throws { BusinessError } 12500006 - The authentication trust level is not supported. * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ function getUserAuthInstance(authParam: AuthParam, widgetParam: WidgetParam): UserAuthInstance; /** * Defines the type of the user authentication notification. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ enum NoticeType { /** @@ -1985,8 +1908,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ WIDGET_NOTICE = 1 } @@ -2006,8 +1928,7 @@ declare namespace userAuth { * @throws { BusinessError } 12500002 - General operation error. * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ function sendNotice(noticeType: NoticeType, eventData: string): void; @@ -2021,11 +1942,10 @@ declare namespace userAuth { /** * Enumerates the authentication result codes. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enum UserAuthResultCode { /** @@ -2039,8 +1959,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ SUCCESS = 12500000, @@ -2055,8 +1974,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ FAIL = 12500001, @@ -2071,8 +1989,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ GENERAL_ERROR = 12500002, @@ -2087,8 +2004,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ CANCELED = 12500003, @@ -2103,8 +2019,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ TIMEOUT = 12500004, @@ -2119,8 +2034,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ TYPE_NOT_SUPPORT = 12500005, @@ -2135,8 +2049,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ TRUST_LEVEL_NOT_SUPPORT = 12500006, @@ -2151,8 +2064,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ BUSY = 12500007, @@ -2176,8 +2088,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ LOCKED = 12500009, @@ -2192,8 +2103,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NOT_ENROLLED = 12500010, @@ -2209,8 +2119,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ CANCELED_FROM_WIDGET = 12500011, @@ -2219,8 +2128,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PIN_EXPIRED = 12500013, @@ -2229,8 +2137,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ AUTH_TOKEN_CHECK_FAILED = 12500015, @@ -2240,11 +2147,10 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ AUTH_TOKEN_EXPIRED = 12500016, - + /** * Indicates that reuse of last authentication result is failed. * @@ -2262,8 +2168,7 @@ declare namespace userAuth { * @interface UserAuthWidgetMgr * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ interface UserAuthWidgetMgr { /** @@ -2280,8 +2185,7 @@ declare namespace userAuth { * @throws { BusinessError } 12500002 - General operation error. * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ on(type: 'command', callback: IAuthWidgetCallback): void; @@ -2298,8 +2202,7 @@ declare namespace userAuth { * @throws { BusinessError } 12500002 - General operation error. * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ off(type: 'command', callback?: IAuthWidgetCallback): void; } @@ -2312,7 +2215,7 @@ declare namespace userAuth { *

* * @permission ohos.permission.SUPPORT_USER_AUTH - * @param { int } version - Version of the user authentication widget. + * @param { number } version - Version of the user authentication widget. * @returns { UserAuthWidgetMgr } UserAuthWidgetMgr instance obtained. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied. Called by non-system application. @@ -2322,10 +2225,9 @@ declare namespace userAuth { * @throws { BusinessError } 12500002 - General operation error. * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ - function getUserAuthWidgetMgr(version: int): UserAuthWidgetMgr; + function getUserAuthWidgetMgr(version: number): UserAuthWidgetMgr; /** * Provides the callback for returning the commands sent from the user authentication framework @@ -2347,16 +2249,6 @@ declare namespace userAuth { * @since 10 */ sendCommand(cmdData: string): void; - /** - * Called to return the command sent from the user authentication framework to the user authentication widget. - * - * @type { function } - * @syscap SystemCapability.UserIAM.UserAuth.Core - * @systemapi Hide this for inner system use. - * @since 20 - * @arkts 1.2 - */ - sendCommand: (cmdData: string) => void; } /** diff --git a/kits/@kit.UserAuthenticationKit.d.ts b/kits/@kit.UserAuthenticationKit.d.ts index 59e6e37e41..116aa7f077 100644 --- a/kits/@kit.UserAuthenticationKit.d.ts +++ b/kits/@kit.UserAuthenticationKit.d.ts @@ -17,7 +17,6 @@ * @file * @kit UserAuthenticationKit */ -/*** if arkts 1.1 */ import faceAuth from '@ohos.userIAM.faceAuth'; import userAccessCtrl from '@ohos.userIAM.userAccessCtrl'; import userAuth from '@ohos.userIAM.userAuth'; @@ -25,12 +24,3 @@ import UserAuthIcon from '@ohos.userIAM.userAuthIcon'; import UserAuthExtensionAbility from '@ohos.app.ability.UserAuthExtensionAbility'; export { faceAuth, userAccessCtrl, userAuth, UserAuthIcon, UserAuthExtensionAbility }; -/*** endif */ -/*** if arkts 1.2 */ -import faceAuth from '@ohos.userIAM.faceAuth'; -import userAccessCtrl from '@ohos.userIAM.userAccessCtrl'; -import userAuth from '@ohos.userIAM.userAuth'; -import UserAuthExtensionAbility from '@ohos.app.ability.UserAuthExtensionAbility'; - -export { faceAuth, userAccessCtrl, userAuth, UserAuthExtensionAbility }; -/*** endif */ -- Gitee