From 57f14cf8427b249edf179d14fb2d944cf5ecff48 Mon Sep 17 00:00:00 2001 From: BrainL Date: Mon, 16 Jun 2025 14:29:46 +0800 Subject: [PATCH 1/8] =?UTF-8?q?arkui=20=E8=B7=A8=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: BrainL --- api/@ohos.data.preferences.d.ts | 4 ++- api/@ohos.data.relationalStore.d.ts | 33 ++++++++++++++++++++++- api/@ohos.data.uniformTypeDescriptor.d.ts | 19 ++++++++++++- api/@ohos.request.d.ts | 25 +++++++++++++++-- 4 files changed, 76 insertions(+), 5 deletions(-) diff --git a/api/@ohos.data.preferences.d.ts b/api/@ohos.data.preferences.d.ts index 686904d792..ee25e4398c 100644 --- a/api/@ohos.data.preferences.d.ts +++ b/api/@ohos.data.preferences.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 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 @@ -1907,6 +1907,7 @@ declare namespace preferences { *
3. Parameter verification failed. * @throws { BusinessError } 15500000 - Inner error. * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform * @atomicservice * @since 12 */ @@ -1988,6 +1989,7 @@ declare namespace preferences { *
3. Parameter verification failed. * @throws { BusinessError } 15500000 - Inner error. * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform * @atomicservice * @since 12 */ diff --git a/api/@ohos.data.relationalStore.d.ts b/api/@ohos.data.relationalStore.d.ts index efb9c04611..1fe37bd6e2 100644 --- a/api/@ohos.data.relationalStore.d.ts +++ b/api/@ohos.data.relationalStore.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -425,6 +425,7 @@ declare namespace relationalStore { * * @type { ?boolean } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -528,6 +529,7 @@ declare namespace relationalStore { * * @typedef CryptoParam * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -538,6 +540,7 @@ declare namespace relationalStore { * * @type { Uint8Array } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -550,6 +553,7 @@ declare namespace relationalStore { * * @type { ?number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -561,6 +565,7 @@ declare namespace relationalStore { * * @type { ?EncryptionAlgo } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -572,6 +577,7 @@ declare namespace relationalStore { * * @type { ?HmacAlgo } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -583,6 +589,7 @@ declare namespace relationalStore { * * @type { ?KdfAlgo } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -594,6 +601,7 @@ declare namespace relationalStore { * * @type { ?number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -633,6 +641,7 @@ declare namespace relationalStore { * * @enum { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -641,6 +650,7 @@ declare namespace relationalStore { * SHA1: HMAC_SHA1 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -650,6 +660,7 @@ declare namespace relationalStore { * SHA256: HMAC_SHA256 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -659,6 +670,7 @@ declare namespace relationalStore { * SHA512: HMAC_SHA512 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -670,6 +682,7 @@ declare namespace relationalStore { * * @enum { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -678,6 +691,7 @@ declare namespace relationalStore { * KDF_SHA1: PBKDF2_HMAC_SHA1 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -687,6 +701,7 @@ declare namespace relationalStore { * KDF_SHA256: PBKDF2_HMAC_SHA256 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -696,6 +711,7 @@ declare namespace relationalStore { * KDF_SHA512: PBKDF2_HMAC_SHA512 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -1552,6 +1568,7 @@ declare namespace relationalStore { * * @enum { string } * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform * @since 11 */ enum Field { @@ -1559,6 +1576,7 @@ declare namespace relationalStore { * Cursor field. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform * @since 11 */ CURSOR_FIELD = '#_cursor', @@ -1567,6 +1585,7 @@ declare namespace relationalStore { * Origin field. For details, see {@link Origin}. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform * @since 11 */ ORIGIN_FIELD = '#_origin', @@ -1576,6 +1595,7 @@ declare namespace relationalStore { * Indicates whether data has deleted in cloud. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform * @since 11 */ DELETED_FLAG_FIELD = '#_deleted_flag', @@ -1585,6 +1605,7 @@ declare namespace relationalStore { * Indicates data status. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform * @since 12 */ DATA_STATUS_FIELD = '#_data_status', @@ -1593,6 +1614,7 @@ declare namespace relationalStore { * Owner field. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform * @since 11 */ OWNER_FIELD = '#_cloud_owner', @@ -1601,6 +1623,7 @@ declare namespace relationalStore { * Privilege field. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform * @since 11 */ PRIVILEGE_FIELD = '#_cloud_privilege', @@ -1609,6 +1632,7 @@ declare namespace relationalStore { * Sharing resource field. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform * @since 11 */ SHARING_RESOURCE_FIELD = '#_sharing_resource_field' @@ -2564,6 +2588,7 @@ declare namespace relationalStore { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since 12 */ notContains(field: string, value: string): RdbPredicates; @@ -2579,6 +2604,7 @@ declare namespace relationalStore { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since 12 */ notLike(field: string, value: string): RdbPredicates; @@ -3691,6 +3717,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since 14 */ getValue(columnIndex: number): ValueType; @@ -4357,6 +4384,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since 12 */ insertSync(table: string, values: sendableRelationalStore.ValuesBucket, conflict?: ConflictResolution): number; @@ -7734,6 +7762,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since 12 */ on(event: 'statistics', observer: Callback ): void; @@ -7965,6 +7994,7 @@ declare namespace relationalStore { * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since 12 */ close(): Promise; @@ -8741,6 +8771,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since 14 */ execute(sql: string, args?: Array): Promise; diff --git a/api/@ohos.data.uniformTypeDescriptor.d.ts b/api/@ohos.data.uniformTypeDescriptor.d.ts index 5d1d9c4a1c..8763b63205 100644 --- a/api/@ohos.data.uniformTypeDescriptor.d.ts +++ b/api/@ohos.data.uniformTypeDescriptor.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -1834,6 +1834,7 @@ declare namespace uniformTypeDescriptor { *
methods describing the uniform data type and its relationships to other uniform data types. * * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ class TypeDescriptor { @@ -1843,6 +1844,7 @@ declare namespace uniformTypeDescriptor { * @type { string } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ readonly typeId: string; @@ -1853,6 +1855,7 @@ declare namespace uniformTypeDescriptor { * @type { Array } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ readonly belongingToTypes: Array; @@ -1863,6 +1866,7 @@ declare namespace uniformTypeDescriptor { * @type { string } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ readonly description: string; @@ -1873,6 +1877,7 @@ declare namespace uniformTypeDescriptor { * @type { string } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ readonly referenceURL: string; @@ -1883,6 +1888,7 @@ declare namespace uniformTypeDescriptor { * @type { string } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ readonly iconFile: string; @@ -1893,6 +1899,7 @@ declare namespace uniformTypeDescriptor { * @type { Array } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 12 */ readonly filenameExtensions: Array; @@ -1903,6 +1910,7 @@ declare namespace uniformTypeDescriptor { * @type { Array } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 12 */ readonly mimeTypes: Array; @@ -1915,6 +1923,7 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ belongsTo(type: string): boolean; @@ -1927,6 +1936,7 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ isLowerLevelType(type: string): boolean; @@ -1939,6 +1949,7 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ isHigherLevelType(type: string): boolean; @@ -1951,6 +1962,7 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ equals(typeDescriptor: TypeDescriptor): boolean; @@ -1965,6 +1977,7 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ function getTypeDescriptor(typeId: string): TypeDescriptor; @@ -1981,6 +1994,7 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -1996,6 +2010,7 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ function getUniformDataTypeByMIMEType(mimeType: string, belongsTo?: string): string; @@ -2012,6 +2027,7 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 13 */ function getUniformDataTypesByFilenameExtension(filenameExtension: string, belongsTo?: string): Array; @@ -2028,6 +2044,7 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 13 */ function getUniformDataTypesByMIMEType(mimeType: string, belongsTo?: string): Array; diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts index 082e31d35a..f8d5a97edc 100644 --- a/api/@ohos.request.d.ts +++ b/api/@ohos.request.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 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 @@ -283,7 +283,7 @@ declare namespace request { /** * Error code 7 - Indicates an HTTP code that cannot be identified. - * + * @crossplatform * @syscap SystemCapability.MiscServices.Download * @since 7 */ @@ -1984,6 +1984,7 @@ declare namespace request { * * @type { ?number } * @syscap SystemCapability.MiscServices.Upload + * @crossplatform * @since 11 */ index?: number; @@ -1995,6 +1996,7 @@ declare namespace request { * * @type { ?number } * @syscap SystemCapability.MiscServices.Upload + * @crossplatform * @since 11 */ begins?: number; @@ -2006,6 +2008,7 @@ declare namespace request { * * @type { ?number } * @syscap SystemCapability.MiscServices.Upload + * @crossplatform * @since 11 */ ends?: number; @@ -2662,6 +2665,7 @@ declare namespace request { * * @enum { string } BroadcastEvent * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ enum BroadcastEvent { @@ -2671,6 +2675,7 @@ declare namespace request { * The data in the commonEventData contains the id of the task. * * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ COMPLETE = 'ohos.request.event.COMPLETE' @@ -3339,6 +3344,7 @@ declare namespace request { * * @type { ?string } * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 12 */ proxy?: string; @@ -4494,6 +4500,7 @@ declare namespace request { * * @interface HttpResponse * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -4505,6 +4512,7 @@ declare namespace request { * @type { string } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -4516,6 +4524,7 @@ declare namespace request { * @type { number } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -4527,6 +4536,7 @@ declare namespace request { * @type { string } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -4538,6 +4548,7 @@ declare namespace request { * @type { Map> } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since 12 */ @@ -4814,6 +4825,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ on(event: 'pause', callback: (progress: Progress) => void): void; @@ -4826,6 +4838,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ off(event: 'pause', callback?: (progress: Progress) => void): void; @@ -4838,6 +4851,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ on(event: 'resume', callback: (progress: Progress) => void): void; @@ -4850,6 +4864,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ off(event: 'resume', callback?: (progress: Progress) => void): void; @@ -4862,6 +4877,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ on(event: 'remove', callback: (progress: Progress) => void): void; @@ -4874,6 +4890,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ off(event: 'remove', callback?: (progress: Progress) => void): void; @@ -4886,6 +4903,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -4900,6 +4918,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since 12 */ @@ -5051,6 +5070,7 @@ declare namespace request { * @throws { BusinessError } 13400003 - Task service ability error. * @throws { BusinessError } 21900007 - Operation with wrong task state. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ pause(callback: AsyncCallback): void; @@ -5071,6 +5091,7 @@ declare namespace request { * @throws { BusinessError } 13400003 - Task service ability error. * @throws { BusinessError } 21900007 - Operation with wrong task state. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ pause(): Promise; -- Gitee From 2c20258970e13d0ea4a4a44726a63250547ed11b Mon Sep 17 00:00:00 2001 From: BrainL Date: Mon, 16 Jun 2025 14:29:46 +0800 Subject: [PATCH 2/8] =?UTF-8?q?arkui=20=E8=B7=A8=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: BrainL --- api/@ohos.data.preferences.d.ts | 4 ++- api/@ohos.data.relationalStore.d.ts | 33 ++++++++++++++++++++++- api/@ohos.data.uniformTypeDescriptor.d.ts | 19 ++++++++++++- api/@ohos.request.d.ts | 27 +++++++++++++++++-- 4 files changed, 78 insertions(+), 5 deletions(-) diff --git a/api/@ohos.data.preferences.d.ts b/api/@ohos.data.preferences.d.ts index 686904d792..ee25e4398c 100644 --- a/api/@ohos.data.preferences.d.ts +++ b/api/@ohos.data.preferences.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 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 @@ -1907,6 +1907,7 @@ declare namespace preferences { *
3. Parameter verification failed. * @throws { BusinessError } 15500000 - Inner error. * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform * @atomicservice * @since 12 */ @@ -1988,6 +1989,7 @@ declare namespace preferences { *
3. Parameter verification failed. * @throws { BusinessError } 15500000 - Inner error. * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform * @atomicservice * @since 12 */ diff --git a/api/@ohos.data.relationalStore.d.ts b/api/@ohos.data.relationalStore.d.ts index efb9c04611..1fe37bd6e2 100644 --- a/api/@ohos.data.relationalStore.d.ts +++ b/api/@ohos.data.relationalStore.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -425,6 +425,7 @@ declare namespace relationalStore { * * @type { ?boolean } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -528,6 +529,7 @@ declare namespace relationalStore { * * @typedef CryptoParam * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -538,6 +540,7 @@ declare namespace relationalStore { * * @type { Uint8Array } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -550,6 +553,7 @@ declare namespace relationalStore { * * @type { ?number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -561,6 +565,7 @@ declare namespace relationalStore { * * @type { ?EncryptionAlgo } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -572,6 +577,7 @@ declare namespace relationalStore { * * @type { ?HmacAlgo } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -583,6 +589,7 @@ declare namespace relationalStore { * * @type { ?KdfAlgo } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -594,6 +601,7 @@ declare namespace relationalStore { * * @type { ?number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -633,6 +641,7 @@ declare namespace relationalStore { * * @enum { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -641,6 +650,7 @@ declare namespace relationalStore { * SHA1: HMAC_SHA1 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -650,6 +660,7 @@ declare namespace relationalStore { * SHA256: HMAC_SHA256 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -659,6 +670,7 @@ declare namespace relationalStore { * SHA512: HMAC_SHA512 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -670,6 +682,7 @@ declare namespace relationalStore { * * @enum { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -678,6 +691,7 @@ declare namespace relationalStore { * KDF_SHA1: PBKDF2_HMAC_SHA1 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -687,6 +701,7 @@ declare namespace relationalStore { * KDF_SHA256: PBKDF2_HMAC_SHA256 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -696,6 +711,7 @@ declare namespace relationalStore { * KDF_SHA512: PBKDF2_HMAC_SHA512 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -1552,6 +1568,7 @@ declare namespace relationalStore { * * @enum { string } * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform * @since 11 */ enum Field { @@ -1559,6 +1576,7 @@ declare namespace relationalStore { * Cursor field. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform * @since 11 */ CURSOR_FIELD = '#_cursor', @@ -1567,6 +1585,7 @@ declare namespace relationalStore { * Origin field. For details, see {@link Origin}. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform * @since 11 */ ORIGIN_FIELD = '#_origin', @@ -1576,6 +1595,7 @@ declare namespace relationalStore { * Indicates whether data has deleted in cloud. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform * @since 11 */ DELETED_FLAG_FIELD = '#_deleted_flag', @@ -1585,6 +1605,7 @@ declare namespace relationalStore { * Indicates data status. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform * @since 12 */ DATA_STATUS_FIELD = '#_data_status', @@ -1593,6 +1614,7 @@ declare namespace relationalStore { * Owner field. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform * @since 11 */ OWNER_FIELD = '#_cloud_owner', @@ -1601,6 +1623,7 @@ declare namespace relationalStore { * Privilege field. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform * @since 11 */ PRIVILEGE_FIELD = '#_cloud_privilege', @@ -1609,6 +1632,7 @@ declare namespace relationalStore { * Sharing resource field. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform * @since 11 */ SHARING_RESOURCE_FIELD = '#_sharing_resource_field' @@ -2564,6 +2588,7 @@ declare namespace relationalStore { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since 12 */ notContains(field: string, value: string): RdbPredicates; @@ -2579,6 +2604,7 @@ declare namespace relationalStore { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since 12 */ notLike(field: string, value: string): RdbPredicates; @@ -3691,6 +3717,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since 14 */ getValue(columnIndex: number): ValueType; @@ -4357,6 +4384,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since 12 */ insertSync(table: string, values: sendableRelationalStore.ValuesBucket, conflict?: ConflictResolution): number; @@ -7734,6 +7762,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since 12 */ on(event: 'statistics', observer: Callback ): void; @@ -7965,6 +7994,7 @@ declare namespace relationalStore { * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since 12 */ close(): Promise; @@ -8741,6 +8771,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform * @since 14 */ execute(sql: string, args?: Array): Promise; diff --git a/api/@ohos.data.uniformTypeDescriptor.d.ts b/api/@ohos.data.uniformTypeDescriptor.d.ts index 5d1d9c4a1c..8763b63205 100644 --- a/api/@ohos.data.uniformTypeDescriptor.d.ts +++ b/api/@ohos.data.uniformTypeDescriptor.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -1834,6 +1834,7 @@ declare namespace uniformTypeDescriptor { *
methods describing the uniform data type and its relationships to other uniform data types. * * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ class TypeDescriptor { @@ -1843,6 +1844,7 @@ declare namespace uniformTypeDescriptor { * @type { string } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ readonly typeId: string; @@ -1853,6 +1855,7 @@ declare namespace uniformTypeDescriptor { * @type { Array } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ readonly belongingToTypes: Array; @@ -1863,6 +1866,7 @@ declare namespace uniformTypeDescriptor { * @type { string } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ readonly description: string; @@ -1873,6 +1877,7 @@ declare namespace uniformTypeDescriptor { * @type { string } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ readonly referenceURL: string; @@ -1883,6 +1888,7 @@ declare namespace uniformTypeDescriptor { * @type { string } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ readonly iconFile: string; @@ -1893,6 +1899,7 @@ declare namespace uniformTypeDescriptor { * @type { Array } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 12 */ readonly filenameExtensions: Array; @@ -1903,6 +1910,7 @@ declare namespace uniformTypeDescriptor { * @type { Array } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 12 */ readonly mimeTypes: Array; @@ -1915,6 +1923,7 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ belongsTo(type: string): boolean; @@ -1927,6 +1936,7 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ isLowerLevelType(type: string): boolean; @@ -1939,6 +1949,7 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ isHigherLevelType(type: string): boolean; @@ -1951,6 +1962,7 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ equals(typeDescriptor: TypeDescriptor): boolean; @@ -1965,6 +1977,7 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ function getTypeDescriptor(typeId: string): TypeDescriptor; @@ -1981,6 +1994,7 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -1996,6 +2010,7 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 11 */ function getUniformDataTypeByMIMEType(mimeType: string, belongsTo?: string): string; @@ -2012,6 +2027,7 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 13 */ function getUniformDataTypesByFilenameExtension(filenameExtension: string, belongsTo?: string): Array; @@ -2028,6 +2044,7 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform * @since 13 */ function getUniformDataTypesByMIMEType(mimeType: string, belongsTo?: string): Array; diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts index 082e31d35a..e0305945d9 100644 --- a/api/@ohos.request.d.ts +++ b/api/@ohos.request.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 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 @@ -283,7 +283,7 @@ declare namespace request { /** * Error code 7 - Indicates an HTTP code that cannot be identified. - * + * @crossplatform * @syscap SystemCapability.MiscServices.Download * @since 7 */ @@ -1984,6 +1984,7 @@ declare namespace request { * * @type { ?number } * @syscap SystemCapability.MiscServices.Upload + * @crossplatform * @since 11 */ index?: number; @@ -1995,6 +1996,7 @@ declare namespace request { * * @type { ?number } * @syscap SystemCapability.MiscServices.Upload + * @crossplatform * @since 11 */ begins?: number; @@ -2006,6 +2008,7 @@ declare namespace request { * * @type { ?number } * @syscap SystemCapability.MiscServices.Upload + * @crossplatform * @since 11 */ ends?: number; @@ -2662,6 +2665,7 @@ declare namespace request { * * @enum { string } BroadcastEvent * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ enum BroadcastEvent { @@ -2671,6 +2675,7 @@ declare namespace request { * The data in the commonEventData contains the id of the task. * * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ COMPLETE = 'ohos.request.event.COMPLETE' @@ -3339,6 +3344,7 @@ declare namespace request { * * @type { ?string } * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 12 */ proxy?: string; @@ -4494,6 +4500,7 @@ declare namespace request { * * @interface HttpResponse * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -4505,6 +4512,7 @@ declare namespace request { * @type { string } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -4516,6 +4524,7 @@ declare namespace request { * @type { number } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -4527,6 +4536,7 @@ declare namespace request { * @type { string } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -4538,6 +4548,7 @@ declare namespace request { * @type { Map> } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since 12 */ @@ -4814,6 +4825,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ on(event: 'pause', callback: (progress: Progress) => void): void; @@ -4826,6 +4838,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ off(event: 'pause', callback?: (progress: Progress) => void): void; @@ -4838,6 +4851,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ on(event: 'resume', callback: (progress: Progress) => void): void; @@ -4850,6 +4864,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ off(event: 'resume', callback?: (progress: Progress) => void): void; @@ -4862,6 +4877,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ on(event: 'remove', callback: (progress: Progress) => void): void; @@ -4874,6 +4890,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ off(event: 'remove', callback?: (progress: Progress) => void): void; @@ -4886,6 +4903,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -4900,6 +4918,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since 12 */ @@ -5051,6 +5070,7 @@ declare namespace request { * @throws { BusinessError } 13400003 - Task service ability error. * @throws { BusinessError } 21900007 - Operation with wrong task state. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ pause(callback: AsyncCallback): void; @@ -5071,6 +5091,7 @@ declare namespace request { * @throws { BusinessError } 13400003 - Task service ability error. * @throws { BusinessError } 21900007 - Operation with wrong task state. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ pause(): Promise; @@ -5095,6 +5116,7 @@ declare namespace request { * @throws { BusinessError } 13400003 - Task service ability error. * @throws { BusinessError } 21900007 - Operation with wrong task state. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ resume(callback: AsyncCallback): void; @@ -5119,6 +5141,7 @@ declare namespace request { * @throws { BusinessError } 13400003 - Task service ability error. * @throws { BusinessError } 21900007 - Operation with wrong task state. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ resume(): Promise; -- Gitee From f6803268224e25aa825e4022e7723cab22b505c5 Mon Sep 17 00:00:00 2001 From: BrainL Date: Wed, 18 Jun 2025 12:59:22 +0800 Subject: [PATCH 3/8] modify since tag Signed-off-by: BrainL --- api/@ohos.data.relationalStore.d.ts | 48 +++++++++++++++-------- api/@ohos.data.uniformTypeDescriptor.d.ts | 3 +- api/@ohos.request.d.ts | 15 ++++--- 3 files changed, 44 insertions(+), 22 deletions(-) diff --git a/api/@ohos.data.relationalStore.d.ts b/api/@ohos.data.relationalStore.d.ts index 1fe37bd6e2..bc07174699 100644 --- a/api/@ohos.data.relationalStore.d.ts +++ b/api/@ohos.data.relationalStore.d.ts @@ -425,8 +425,9 @@ declare namespace relationalStore { * * @type { ?boolean } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ isReadOnly?: boolean; @@ -529,8 +530,9 @@ declare namespace relationalStore { * * @typedef CryptoParam * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ interface CryptoParam { @@ -540,8 +542,9 @@ declare namespace relationalStore { * * @type { Uint8Array } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ encryptionKey: Uint8Array; @@ -553,8 +556,9 @@ declare namespace relationalStore { * * @type { ?number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ iterationCount?: number; @@ -565,8 +569,9 @@ declare namespace relationalStore { * * @type { ?EncryptionAlgo } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ encryptionAlgo?: EncryptionAlgo; @@ -577,8 +582,9 @@ declare namespace relationalStore { * * @type { ?HmacAlgo } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ hmacAlgo?: HmacAlgo; @@ -589,8 +595,9 @@ declare namespace relationalStore { * * @type { ?KdfAlgo } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ kdfAlgo?: KdfAlgo; @@ -601,8 +608,9 @@ declare namespace relationalStore { * * @type { ?number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ cryptoPageSize?: number; @@ -641,8 +649,9 @@ declare namespace relationalStore { * * @enum { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ enum HmacAlgo { @@ -650,8 +659,9 @@ declare namespace relationalStore { * SHA1: HMAC_SHA1 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ SHA1 = 0, @@ -660,8 +670,9 @@ declare namespace relationalStore { * SHA256: HMAC_SHA256 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ SHA256, @@ -670,8 +681,9 @@ declare namespace relationalStore { * SHA512: HMAC_SHA512 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ SHA512 @@ -682,8 +694,9 @@ declare namespace relationalStore { * * @enum { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ enum KdfAlgo { @@ -691,8 +704,9 @@ declare namespace relationalStore { * KDF_SHA1: PBKDF2_HMAC_SHA1 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ KDF_SHA1 = 0, @@ -701,8 +715,9 @@ declare namespace relationalStore { * KDF_SHA256: PBKDF2_HMAC_SHA256 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ KDF_SHA256, @@ -711,8 +726,9 @@ declare namespace relationalStore { * KDF_SHA512: PBKDF2_HMAC_SHA512 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ KDF_SHA512 diff --git a/api/@ohos.data.uniformTypeDescriptor.d.ts b/api/@ohos.data.uniformTypeDescriptor.d.ts index 8763b63205..62fc0fecef 100644 --- a/api/@ohos.data.uniformTypeDescriptor.d.ts +++ b/api/@ohos.data.uniformTypeDescriptor.d.ts @@ -1994,8 +1994,9 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 11 * @crossplatform - * @since arkts {'1.1':'11', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ function getUniformDataTypeByFilenameExtension(filenameExtension: string, belongsTo?: string): string; diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts index e0305945d9..f6f846445c 100644 --- a/api/@ohos.request.d.ts +++ b/api/@ohos.request.d.ts @@ -4500,9 +4500,10 @@ declare namespace request { * * @interface HttpResponse * @syscap SystemCapability.Request.FileTransferAgent + * @since 12 * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ interface HttpResponse { @@ -4512,9 +4513,10 @@ declare namespace request { * @type { string } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @since 12 * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ readonly version: string, @@ -4524,9 +4526,10 @@ declare namespace request { * @type { number } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @since 12 * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ readonly statusCode: number, @@ -4536,9 +4539,10 @@ declare namespace request { * @type { string } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @since 12 * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ readonly reason: string, @@ -4903,9 +4907,10 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @since 12 * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ on(event: 'response', callback: Callback): void; -- Gitee From 7a049accb92f57b3b6ca0f86a022fd1ae0e72542 Mon Sep 17 00:00:00 2001 From: BrainL Date: Wed, 18 Jun 2025 12:59:22 +0800 Subject: [PATCH 4/8] modify since tag Signed-off-by: BrainL --- api/@ohos.data.relationalStore.d.ts | 146 +++++++++++++++++++--- api/@ohos.data.uniformTypeDescriptor.d.ts | 16 ++- api/@ohos.request.d.ts | 43 ++++++- 3 files changed, 183 insertions(+), 22 deletions(-) diff --git a/api/@ohos.data.relationalStore.d.ts b/api/@ohos.data.relationalStore.d.ts index 1fe37bd6e2..11c99b5ad6 100644 --- a/api/@ohos.data.relationalStore.d.ts +++ b/api/@ohos.data.relationalStore.d.ts @@ -419,6 +419,14 @@ declare namespace relationalStore { */ vector?: boolean; + /** + * Specifies whether the database opened is read-only. + * If isReadOnly is true, other configuration items will become invalid. + * + * @type { ?boolean } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ /** * Specifies whether the database opened is read-only. * If isReadOnly is true, other configuration items will become invalid. @@ -426,7 +434,7 @@ declare namespace relationalStore { * @type { ?boolean } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ isReadOnly?: boolean; @@ -524,16 +532,31 @@ declare namespace relationalStore { MAIN_REPLICA } + /** + * Specifies the cryptographic parameters used when opening an encrypted database. + * + * @typedef CryptoParam + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ /** * Specifies the cryptographic parameters used when opening an encrypted database. * * @typedef CryptoParam * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ interface CryptoParam { + /** + * Specifies the key used when opening an encrypted database. + * When finished passing the key to the database, its content should be set to all-zero. + * + * @type { Uint8Array } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ /** * Specifies the key used when opening an encrypted database. * When finished passing the key to the database, its content should be set to all-zero. @@ -541,11 +564,20 @@ declare namespace relationalStore { * @type { Uint8Array } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ encryptionKey: Uint8Array; + /** + * Specifies the number of KDF iterations used when opening an encrypted database. + * Default number is 10000. + * When the number is set to 0, use default iteration number and encryption algorithm. + * + * @type { ?number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ /** * Specifies the number of KDF iterations used when opening an encrypted database. * Default number is 10000. @@ -554,11 +586,19 @@ declare namespace relationalStore { * @type { ?number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ iterationCount?: number; + /** + * Specifies the encryption algorithm when opening an encrypted database. + * Default encryption algorithm is AES_256_GCM. + * + * @type { ?EncryptionAlgo } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ /** * Specifies the encryption algorithm when opening an encrypted database. * Default encryption algorithm is AES_256_GCM. @@ -566,11 +606,19 @@ declare namespace relationalStore { * @type { ?EncryptionAlgo } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ encryptionAlgo?: EncryptionAlgo; + /** + * Specifies the HMAC algorithm when opening an encrypted database. + * Default HMAC algorithm is SHA256. + * + * @type { ?HmacAlgo } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ /** * Specifies the HMAC algorithm when opening an encrypted database. * Default HMAC algorithm is SHA256. @@ -578,11 +626,19 @@ declare namespace relationalStore { * @type { ?HmacAlgo } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ hmacAlgo?: HmacAlgo; + /** + * Specifies the KDF algorithm when opening an encrypted database. + * Default KDF SHA algorithm is the same as HMAC algorithm. + * + * @type { ?KdfAlgo } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ /** * Specifies the KDF algorithm when opening an encrypted database. * Default KDF SHA algorithm is the same as HMAC algorithm. @@ -590,11 +646,19 @@ declare namespace relationalStore { * @type { ?KdfAlgo } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ kdfAlgo?: KdfAlgo; + /** + * Specifies the page size used when opening an encrypted database. + * Default crypto page size is 1024. + * + * @type { ?number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ /** * Specifies the page size used when opening an encrypted database. * Default crypto page size is 1024. @@ -602,7 +666,7 @@ declare namespace relationalStore { * @type { ?number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ cryptoPageSize?: number; @@ -636,83 +700,133 @@ declare namespace relationalStore { AES_256_CBC } + /** + * Enumerates the supported HMAC algorithm when opening a database. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ /** * Enumerates the supported HMAC algorithm when opening a database. * * @enum { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ enum HmacAlgo { + /** + * SHA1: HMAC_SHA1 algorithm. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ /** * SHA1: HMAC_SHA1 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ SHA1 = 0, + /** + * SHA256: HMAC_SHA256 algorithm. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ /** * SHA256: HMAC_SHA256 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ SHA256, + /** + * SHA512: HMAC_SHA512 algorithm. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ /** * SHA512: HMAC_SHA512 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ SHA512 } + /** + * Enumerates the supported KDF algorithm when opening a database. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ /** * Enumerates the supported KDF algorithm when opening a database. * * @enum { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ enum KdfAlgo { + /** + * KDF_SHA1: PBKDF2_HMAC_SHA1 algorithm. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ /** * KDF_SHA1: PBKDF2_HMAC_SHA1 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ KDF_SHA1 = 0, + /** + * KDF_SHA256: PBKDF2_HMAC_SHA256 algorithm. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ /** * KDF_SHA256: PBKDF2_HMAC_SHA256 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ KDF_SHA256, + /** + * KDF_SHA512: PBKDF2_HMAC_SHA512 algorithm. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ /** * KDF_SHA512: PBKDF2_HMAC_SHA512 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ KDF_SHA512 diff --git a/api/@ohos.data.uniformTypeDescriptor.d.ts b/api/@ohos.data.uniformTypeDescriptor.d.ts index 8763b63205..4feebfa174 100644 --- a/api/@ohos.data.uniformTypeDescriptor.d.ts +++ b/api/@ohos.data.uniformTypeDescriptor.d.ts @@ -1982,6 +1982,20 @@ declare namespace uniformTypeDescriptor { */ function getTypeDescriptor(typeId: string): TypeDescriptor; + /** + * Queries and returns the uniform type descriptor by the given filename extension and the uniform data type it + * belongs to. + * + * @param { string } filenameExtension - Filename extension. + * @param { string } [belongsTo] - A uniform data type ID it belongs to. + * @returns { string } Returns the uniform data type ID corresponding to the given filename extension and the + *
uniform data type it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type + * does not exist. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 11 + */ /** * Queries and returns the uniform type descriptor by the given filename extension and the uniform data type it * belongs to. @@ -1995,7 +2009,7 @@ declare namespace uniformTypeDescriptor { *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform - * @since arkts {'1.1':'11', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ function getUniformDataTypeByFilenameExtension(filenameExtension: string, belongsTo?: string): string; diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts index e0305945d9..81b854311f 100644 --- a/api/@ohos.request.d.ts +++ b/api/@ohos.request.d.ts @@ -4494,6 +4494,14 @@ declare namespace request { readonly extras?: object; } + /** + * The HTTP response. + * Describes the data structure of the task response header. + * + * @interface HttpResponse + * @syscap SystemCapability.Request.FileTransferAgent + * @since 12 + */ /** * The HTTP response. * Describes the data structure of the task response header. @@ -4502,10 +4510,18 @@ declare namespace request { * @syscap SystemCapability.Request.FileTransferAgent * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ interface HttpResponse { + /** + * The version of the HTTP response. + * + * @type { string } + * @readonly + * @syscap SystemCapability.Request.FileTransferAgent + * @since 12 + */ /** * The version of the HTTP response. * @@ -4514,10 +4530,18 @@ declare namespace request { * @syscap SystemCapability.Request.FileTransferAgent * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ readonly version: string, + /** + * The status code of the HTTP response. + * + * @type { number } + * @readonly + * @syscap SystemCapability.Request.FileTransferAgent + * @since 12 + */ /** * The status code of the HTTP response. * @@ -4526,10 +4550,18 @@ declare namespace request { * @syscap SystemCapability.Request.FileTransferAgent * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ readonly statusCode: number, + /** + * The reason of the HTTP response. + * + * @type { string } + * @readonly + * @syscap SystemCapability.Request.FileTransferAgent + * @since 12 + */ /** * The reason of the HTTP response. * @@ -4538,7 +4570,7 @@ declare namespace request { * @syscap SystemCapability.Request.FileTransferAgent * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ readonly reason: string, @@ -4903,9 +4935,10 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @since 12 * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ on(event: 'response', callback: Callback): void; -- Gitee From 4c5c3c40e95f4d2e1fbcddc86b1d2418ecb7ce3f Mon Sep 17 00:00:00 2001 From: BrainL Date: Wed, 18 Jun 2025 18:34:40 +0800 Subject: [PATCH 5/8] modify since tag Signed-off-by: BrainL --- api/@ohos.request.d.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts index 81b854311f..34a0ed1d6c 100644 --- a/api/@ohos.request.d.ts +++ b/api/@ohos.request.d.ts @@ -4936,6 +4936,16 @@ declare namespace request { *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent * @since 12 + */ + /** + * Enables the response callback. + * Subscribes to task response headers. + * + * @param { 'response' } event - event types. + * @param { Callback } callback - callback function with an `HttpResponse` argument. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent * @crossplatform * @atomicservice * @since 20 -- Gitee From 8774f17519199b487bca5bc9f99a7665299109c2 Mon Sep 17 00:00:00 2001 From: BrainL Date: Thu, 19 Jun 2025 11:25:27 +0800 Subject: [PATCH 6/8] modify tags Signed-off-by: BrainL --- api/@ohos.data.preferences.d.ts | 32 +- api/@ohos.data.relationalStore.d.ts | 224 +++- api/@ohos.data.uniformTypeDescriptor.d.ts | 186 +++- api/@ohos.request.d.ts | 223 +++- changes.diff | 1163 +++++++++++++++++++++ 5 files changed, 1776 insertions(+), 52 deletions(-) create mode 100644 changes.diff diff --git a/api/@ohos.data.preferences.d.ts b/api/@ohos.data.preferences.d.ts index ee25e4398c..4f3aafd797 100644 --- a/api/@ohos.data.preferences.d.ts +++ b/api/@ohos.data.preferences.d.ts @@ -1907,10 +1907,24 @@ declare namespace preferences { *
3. Parameter verification failed. * @throws { BusinessError } 15500000 - Inner error. * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform * @atomicservice * @since 12 */ + /** + * Registers an observer to listen for changes to the {@ link Preferences} object. + * + * @param { 'dataChange' } type - Indicates the type of the event to observe. + * @param { Array } keys - Indicates one or more keys to listen for. + * @param { Callback> } callback - Indicates the callback used to return the data change. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since 20 + */ on(type: 'dataChange', keys: Array, callback: Callback>): void; /** @@ -1989,10 +2003,24 @@ declare namespace preferences { *
3. Parameter verification failed. * @throws { BusinessError } 15500000 - Inner error. * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform * @atomicservice * @since 12 */ + /** + * Unregisters an observer for changes to the {@ link Preferences} object. + * + * @param { 'dataChange' } type - Indicates the event type. + * @param { Array } keys - Indicates the data whose changes are not observed. + * @param { Callback> } callback - Indicates the callback to unregister. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since 20 + */ off(type: 'dataChange', keys: Array, callback?: Callback>): void; } } diff --git a/api/@ohos.data.relationalStore.d.ts b/api/@ohos.data.relationalStore.d.ts index 11c99b5ad6..ef63edae9b 100644 --- a/api/@ohos.data.relationalStore.d.ts +++ b/api/@ohos.data.relationalStore.d.ts @@ -1682,26 +1682,45 @@ declare namespace relationalStore { * * @enum { string } * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @crossplatform * @since 11 */ + /** + * Enumerates the field. + * + * @enum { string } + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ enum Field { /** * Cursor field. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @crossplatform * @since 11 */ + /** + * Cursor field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ CURSOR_FIELD = '#_cursor', /** * Origin field. For details, see {@link Origin}. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @crossplatform * @since 11 */ + /** + * Origin field. For details, see {@link Origin}. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ ORIGIN_FIELD = '#_origin', /** @@ -1709,9 +1728,16 @@ declare namespace relationalStore { * Indicates whether data has deleted in cloud. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @crossplatform * @since 11 */ + /** + * Deleted flag field. + * Indicates whether data has deleted in cloud. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ DELETED_FLAG_FIELD = '#_deleted_flag', /** @@ -1719,36 +1745,61 @@ declare namespace relationalStore { * Indicates data status. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @crossplatform * @since 12 */ + /** + * Data status field. + * Indicates data status. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ DATA_STATUS_FIELD = '#_data_status', /** * Owner field. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @crossplatform * @since 11 */ + /** + * Owner field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ OWNER_FIELD = '#_cloud_owner', /** * Privilege field. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @crossplatform * @since 11 */ + /** + * Privilege field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ PRIVILEGE_FIELD = '#_cloud_privilege', /** * Sharing resource field. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @crossplatform * @since 11 */ + /** + * Sharing resource field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ SHARING_RESOURCE_FIELD = '#_sharing_resource_field' } @@ -2702,9 +2753,22 @@ declare namespace relationalStore { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform * @since 12 */ + /** + * Sets the RdbPredicates to match the field whose data type is string and value + * does not contain the specified value. + * This method is similar to "Not like %value%" of the SQL statement. + * + * @param { string } field - Indicates the column name in the database table. + * @param { string } value - Indicates the value that is not contained. + * @returns { RdbPredicates } - The {@Link RdbPredicates} set. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ notContains(field: string, value: string): RdbPredicates; /** @@ -2718,9 +2782,22 @@ declare namespace relationalStore { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform * @since 12 */ + /** + * Sets the RdbPredicates to match the field whose data type is string and value + * is not like the specified value. + * This method is similar to "Not like" of the SQL statement. + * + * @param { string } field - Indicates the column name in the database table. + * @param { string } value - Indicates the value to compare against. + * @returns { RdbPredicates } - The {@Link RdbPredicates} set. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ notLike(field: string, value: string): RdbPredicates; /** @@ -3831,9 +3908,43 @@ declare namespace relationalStore { * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform * @since 14 */ + /** + * Obtains the value of the specified column in the current row. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null or the specified column is not of the Assets type. + * Inserting an empty blob, after API14 and API14, the obtained value is an empty blob; Before API 14, + * the obtained value was null. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { ValueType } The value of the specified column. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ getValue(columnIndex: number): ValueType; /** @@ -4498,9 +4609,42 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform * @since 12 */ + /** + * Inserts a row of data into the target table with sync interface. + * + * @param { string } table - Indicates the target table. + * @param { sendableRelationalStore.ValuesBucket } values - Indicates the row of data + * {@link sendableRelationalStore.ValuesBucket} to be inserted into the table. + * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. + * @returns { number } The row ID if the operation is successful. return -1 otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ insertSync(table: string, values: sendableRelationalStore.ValuesBucket, conflict?: ConflictResolution): number; /** @@ -7876,9 +8020,22 @@ declare namespace relationalStore { * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform * @since 12 */ + /** + * Subscribes to the SQL statistics. + * @param { 'statistics' } event - Indicates the event type, which must be 'statistics'. + * @param { Callback } observer - + * Indicates the callback used to return the SQL execution statistics {@link SqlExeInfo} in the database. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ on(event: 'statistics', observer: Callback ): void; /** @@ -8108,9 +8265,18 @@ declare namespace relationalStore { * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform * @since 12 */ + /** + * Close the RdbStore and all resultSets. + * + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ close(): Promise; /** @@ -8885,9 +9051,37 @@ declare namespace relationalStore { * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform * @since 14 */ + /** + * Executes a SQL statement that contains specified parameters and returns a value of ValueType. + * + * @param { string } sql - Indicates the SQL statement to execute. + * @param { Array } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. + * The values are strings. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ execute(sql: string, args?: Array): Promise; /** diff --git a/api/@ohos.data.uniformTypeDescriptor.d.ts b/api/@ohos.data.uniformTypeDescriptor.d.ts index 4feebfa174..6d5bc0f67b 100644 --- a/api/@ohos.data.uniformTypeDescriptor.d.ts +++ b/api/@ohos.data.uniformTypeDescriptor.d.ts @@ -1834,9 +1834,16 @@ declare namespace uniformTypeDescriptor { *
methods describing the uniform data type and its relationships to other uniform data types. * * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Class describing the uniform data type defined in the {@code UniformDataType}, which consists of attributes and + *
methods describing the uniform data type and its relationships to other uniform data types. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ class TypeDescriptor { /** * Type ID of the uniform data type, which corresponds to the enum string in the {@code UniformDataType}. @@ -1844,9 +1851,17 @@ declare namespace uniformTypeDescriptor { * @type { string } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Type ID of the uniform data type, which corresponds to the enum string in the {@code UniformDataType}. + * + * @type { string } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ readonly typeId: string; /** @@ -1855,9 +1870,17 @@ declare namespace uniformTypeDescriptor { * @type { Array } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Uniform data type IDs that the uniform data type belongs to. + * + * @type { Array } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ readonly belongingToTypes: Array; /** @@ -1866,9 +1889,17 @@ declare namespace uniformTypeDescriptor { * @type { string } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * A textual description for the uniform data type. + * + * @type { string } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ readonly description: string; /** @@ -1877,9 +1908,17 @@ declare namespace uniformTypeDescriptor { * @type { string } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Reference URL for the uniform data type, which describes the detail information of the type. + * + * @type { string } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ readonly referenceURL: string; /** @@ -1888,9 +1927,17 @@ declare namespace uniformTypeDescriptor { * @type { string } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Default icon file path for the uniform data type. + * + * @type { string } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ readonly iconFile: string; /** @@ -1899,11 +1946,27 @@ declare namespace uniformTypeDescriptor { * @type { Array } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 12 */ + /** + * File name extensions for the uniform data type. + * + * @type { Array } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ readonly filenameExtensions: Array; + /** + * MIMETypes of the uniform data type. + * + * @type { Array } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 12 + */ /** * MIMETypes of the uniform data type. * @@ -1911,7 +1974,7 @@ declare namespace uniformTypeDescriptor { * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform - * @since 12 + * @since 20 */ readonly mimeTypes: Array; @@ -1923,9 +1986,19 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Checks whether the uniform data type belongs to the given uniform data type. + * + * @param { string } type - A uniform data type to be compared. + * @returns { boolean } Returns true if the data type belongs to the given data type, else false. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ belongsTo(type: string): boolean; /** @@ -1936,9 +2009,19 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Checks whether the uniform data type is the lower level type of the given uniform data type. + * + * @param { string } type - A uniform data type to be compared. + * @returns { boolean } Returns true if the data type is the lower level type of the given data type, else false. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ isLowerLevelType(type: string): boolean; /** @@ -1949,9 +2032,19 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Checks whether the uniform data type is the higher level type of the given uniform data type. + * + * @param { string } type - A uniform data type to be compared. + * @returns { boolean } Returns true if the data type is the higher level type of the given data type, else false. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ isHigherLevelType(type: string): boolean; /** @@ -1962,9 +2055,19 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Checks whether the uniform type descriptor is equal to the given uniform type descriptor. + * + * @param { TypeDescriptor } typeDescriptor - A uniform type descriptor to be compared. + * @returns { boolean } Returns true if the type descriptor is equal to the given type descriptor, else false. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ equals(typeDescriptor: TypeDescriptor): boolean; } @@ -1977,9 +2080,20 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Queries and returns the uniform type descriptor by the given uniform data type ID. + * + * @param { string } typeId - Uniform data type ID. + * @returns { TypeDescriptor } Returns the uniform type descriptor corresponding to the uniform data type ID or null + *
if the uniform data type does not exist. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ function getTypeDescriptor(typeId: string): TypeDescriptor; /** @@ -2024,9 +2138,21 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Queries and returns the uniform type descriptor by the given MIME type and the uniform data type it belongs to. + * + * @param { string } mimeType - MIME type. + * @param { string } [belongsTo] - A uniform data type ID it belongs to. + * @returns { string } Returns the uniform data type ID corresponding to the given MIME type and the uniform data type + *
it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type does not exist. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ function getUniformDataTypeByMIMEType(mimeType: string, belongsTo?: string): string; /** @@ -2041,9 +2167,23 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 13 */ + /** + * Queries and returns the uniform type descriptor list by the given filename extension and the uniform data type it + * belongs to. + * + * @param { string } filenameExtension - Filename extension. + * @param { string } [belongsTo] - A uniform data type ID it belongs to. + * @returns { Array } Returns the uniform data type ID list corresponding to the given filename extension and + * the uniform data type it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type + * does not exist. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ function getUniformDataTypesByFilenameExtension(filenameExtension: string, belongsTo?: string): Array; /** @@ -2058,9 +2198,23 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 13 */ + /** + * Queries and returns the uniform type descriptor list by the given MIME type and the uniform data type it belongs + * to. + * + * @param { string } mimeType - MIME type. + * @param { string } [belongsTo] - A uniform data type ID it belongs to. + * @returns { Array } Returns the uniform data type ID list corresponding to the given MIME type and the + * uniform data type it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type does + * not exist. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ function getUniformDataTypesByMIMEType(mimeType: string, belongsTo?: string): Array; } diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts index 34a0ed1d6c..689c7e7949 100644 --- a/api/@ohos.request.d.ts +++ b/api/@ohos.request.d.ts @@ -283,7 +283,7 @@ declare namespace request { /** * Error code 7 - Indicates an HTTP code that cannot be identified. - * @crossplatform + * * @syscap SystemCapability.MiscServices.Download * @since 7 */ @@ -1984,9 +1984,18 @@ declare namespace request { * * @type { ?number } * @syscap SystemCapability.MiscServices.Upload - * @crossplatform * @since 11 */ + /** + * The index of paths for a task. + * Usually used for a continuous job. + * The default is 0. + * + * @type { ?number } + * @syscap SystemCapability.MiscServices.Upload + * @crossplatform + * @since 20 + */ index?: number; /** * The start point of a file. @@ -1996,9 +2005,19 @@ declare namespace request { * * @type { ?number } * @syscap SystemCapability.MiscServices.Upload - * @crossplatform * @since 11 */ + /** + * The start point of a file. + * Usually used for a continuous job. + * It will start read at the point in upload. + * The default is 0. + * + * @type { ?number } + * @syscap SystemCapability.MiscServices.Upload + * @crossplatform + * @since 20 + */ begins?: number; /** * The end point of a file. @@ -2008,9 +2027,19 @@ declare namespace request { * * @type { ?number } * @syscap SystemCapability.MiscServices.Upload - * @crossplatform * @since 11 */ + /** + * The end point of a file. + * Usually used for a continuous job. + * It will end read at the point in upload. + * The default is -1 indicating the end of the data for upload. + * + * @type { ?number } + * @syscap SystemCapability.MiscServices.Upload + * @crossplatform + * @since 20 + */ ends?: number; /** * A list of files to be uploaded. Please use multipart/form-data to submit. @@ -2665,9 +2694,16 @@ declare namespace request { * * @enum { string } BroadcastEvent * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Broadcast events for the request. + * + * @enum { string } BroadcastEvent + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ enum BroadcastEvent { /** * Completion event for the task. @@ -2675,9 +2711,17 @@ declare namespace request { * The data in the commonEventData contains the id of the task. * * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Completion event for the task. + * The code in the commonEventData can only be "0x40"(COMPLETE) or "0x41"(FAILED), same as "State". + * The data in the commonEventData contains the id of the task. + * + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ COMPLETE = 'ohos.request.event.COMPLETE' } @@ -3344,9 +3388,18 @@ declare namespace request { * * @type { ?string } * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 12 */ + /** + * The proxy url for the task. + * Only this format is supported: http://: + * Username and password are not supported. + * + * @type { ?string } + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ proxy?: string; /** * The index of paths for a task. @@ -4500,6 +4553,7 @@ declare namespace request { * * @interface HttpResponse * @syscap SystemCapability.Request.FileTransferAgent + * @atomicservice * @since 12 */ /** @@ -4520,6 +4574,7 @@ declare namespace request { * @type { string } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @atomicservice * @since 12 */ /** @@ -4540,6 +4595,7 @@ declare namespace request { * @type { number } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @atomicservice * @since 12 */ /** @@ -4560,6 +4616,7 @@ declare namespace request { * @type { string } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @atomicservice * @since 12 */ /** @@ -4580,10 +4637,19 @@ declare namespace request { * @type { Map> } * @readonly * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @atomicservice * @since 12 */ + /** + * The headers of the HTTP response. + * + * @type { Map> } + * @readonly + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @atomicservice + * @since 20 + */ readonly headers: Map>, } @@ -4857,9 +4923,20 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Enables the specified callback. + * Subscribes to task pause events. + * + * @param { 'pause' } event - event types. + * @param { function } callback - callback function with a `Progress` argument. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ on(event: 'pause', callback: (progress: Progress) => void): void; /** * Disables the specified callback. @@ -4870,9 +4947,20 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Disables the specified callback. + * Unsubscribes from the foreground task pause event. + * + * @param { 'pause' } event - event types. + * @param { function } callback - callback function with a `Progress` argument. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ off(event: 'pause', callback?: (progress: Progress) => void): void; /** * Enables the specified callback. @@ -4883,9 +4971,20 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Enables the specified callback. + * Subscribes to task resume events. + * + * @param { 'resume' } event - event types. + * @param { function } callback - callback function with a `Progress` argument. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ on(event: 'resume', callback: (progress: Progress) => void): void; /** * Disables the specified callback. @@ -4896,9 +4995,20 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Disables the specified callback. + * Unsubscribes from the foreground task resume event. + * + * @param { 'resume' } event - event types. + * @param { function } callback - callback function with a `Progress` argument. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ off(event: 'resume', callback?: (progress: Progress) => void): void; /** * Enables the specified callback. @@ -4909,9 +5019,20 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Enables the specified callback. + * Subscribes to task removal events. + * + * @param { 'remove' } event - event types. + * @param { function } callback - callback function with a `Progress` argument. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ on(event: 'remove', callback: (progress: Progress) => void): void; /** * Disables the specified callback. @@ -4922,9 +5043,20 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Disables the specified callback. + * Unsubscribes from the task removal event. + * + * @param { 'remove' } event - event types. + * @param { function } callback - callback function with a `Progress` argument. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ off(event: 'remove', callback?: (progress: Progress) => void): void; /** * Enables the response callback. @@ -4935,6 +5067,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @atomicservice * @since 12 */ /** @@ -4961,10 +5094,22 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @atomicservice * @since 12 */ + /** + * Disables the response callback. + * Unsubscribes from task response headers. + * + * @param { 'response' } event - event types. + * @param { Callback } callback - callback function with an `HttpResponse` argument. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @atomicservice + * @since 20 + */ off(event: 'response', callback?: Callback): void; /** * Enables the 'faultOccur' callback. @@ -5113,9 +5258,18 @@ declare namespace request { * @throws { BusinessError } 13400003 - Task service ability error. * @throws { BusinessError } 21900007 - Operation with wrong task state. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Pauses a task that is waiting, running, or retrying. + * + * @param { AsyncCallback } callback - callback function with a boolean argument indicating the calling result. + * @throws { BusinessError } 13400003 - Task service ability error. + * @throws { BusinessError } 21900007 - Operation with wrong task state. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ pause(callback: AsyncCallback): void; /** * Pauses the background task. @@ -5134,9 +5288,18 @@ declare namespace request { * @throws { BusinessError } 13400003 - Task service ability error. * @throws { BusinessError } 21900007 - Operation with wrong task state. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Pauses a task that is waiting, running, or retrying. + * + * @returns { Promise } the promise returned by the function. + * @throws { BusinessError } 13400003 - Task service ability error. + * @throws { BusinessError } 21900007 - Operation with wrong task state. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ pause(): Promise; /** * Resumes the background task. @@ -5159,9 +5322,20 @@ declare namespace request { * @throws { BusinessError } 13400003 - Task service ability error. * @throws { BusinessError } 21900007 - Operation with wrong task state. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Resumes a paused task. + * + * @permission ohos.permission.INTERNET + * @param { AsyncCallback } callback - callback function with a boolean argument indicating the calling result. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 13400003 - Task service ability error. + * @throws { BusinessError } 21900007 - Operation with wrong task state. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ resume(callback: AsyncCallback): void; /** * Resumes the background task. @@ -5184,9 +5358,20 @@ declare namespace request { * @throws { BusinessError } 13400003 - Task service ability error. * @throws { BusinessError } 21900007 - Operation with wrong task state. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Resumes a paused task. + * + * @permission ohos.permission.INTERNET + * @returns { Promise } the promise returned by the function. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 13400003 - Task service ability error. + * @throws { BusinessError } 21900007 - Operation with wrong task state. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ resume(): Promise; /** * Stop a running, waiting, or retrying task. diff --git a/changes.diff b/changes.diff new file mode 100644 index 0000000000..3f513acab8 --- /dev/null +++ b/changes.diff @@ -0,0 +1,1163 @@ +diff --git a/api/@ohos.data.preferences.d.ts b/api/@ohos.data.preferences.d.ts +index ee25e4398..4f3aafd79 100644 +--- a/api/@ohos.data.preferences.d.ts ++++ b/api/@ohos.data.preferences.d.ts +@@ -1907,10 +1907,24 @@ declare namespace preferences { + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core +- * @crossplatform + * @atomicservice + * @since 12 + */ ++ /** ++ * Registers an observer to listen for changes to the {@ link Preferences} object. ++ * ++ * @param { 'dataChange' } type - Indicates the type of the event to observe. ++ * @param { Array } keys - Indicates one or more keys to listen for. ++ * @param { Callback> } callback - Indicates the callback used to return the data change. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes: ++ *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; ++ *
3. Parameter verification failed. ++ * @throws { BusinessError } 15500000 - Inner error. ++ * @syscap SystemCapability.DistributedDataManager.Preferences.Core ++ * @crossplatform ++ * @atomicservice ++ * @since 20 ++ */ + on(type: 'dataChange', keys: Array, callback: Callback>): void; + + /** +@@ -1989,10 +2003,24 @@ declare namespace preferences { + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core +- * @crossplatform + * @atomicservice + * @since 12 + */ ++ /** ++ * Unregisters an observer for changes to the {@ link Preferences} object. ++ * ++ * @param { 'dataChange' } type - Indicates the event type. ++ * @param { Array } keys - Indicates the data whose changes are not observed. ++ * @param { Callback> } callback - Indicates the callback to unregister. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes: ++ *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; ++ *
3. Parameter verification failed. ++ * @throws { BusinessError } 15500000 - Inner error. ++ * @syscap SystemCapability.DistributedDataManager.Preferences.Core ++ * @crossplatform ++ * @atomicservice ++ * @since 20 ++ */ + off(type: 'dataChange', keys: Array, callback?: Callback>): void; + } + } +diff --git a/api/@ohos.data.relationalStore.d.ts b/api/@ohos.data.relationalStore.d.ts +index 11c99b5ad..173995f6e 100644 +--- a/api/@ohos.data.relationalStore.d.ts ++++ b/api/@ohos.data.relationalStore.d.ts +@@ -1682,26 +1682,45 @@ declare namespace relationalStore { + * + * @enum { string } + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client +- * @crossplatform + * @since 11 + */ ++ /** ++ * Enumerates the field. ++ * ++ * @enum { string } ++ * @syscap SystemCapability.DistributedDataManager.CloudSync.Client ++ * @crossplatform ++ * @since 20 ++ */ + enum Field { + /** + * Cursor field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client +- * @crossplatform + * @since 11 + */ ++ /** ++ * Cursor field. ++ * ++ * @syscap SystemCapability.DistributedDataManager.CloudSync.Client ++ * @crossplatform ++ * @since 20 ++ */ + CURSOR_FIELD = '#_cursor', + + /** + * Origin field. For details, see {@link Origin}. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client +- * @crossplatform + * @since 11 + */ ++ /** ++ * Origin field. For details, see {@link Origin}. ++ * ++ * @syscap SystemCapability.DistributedDataManager.CloudSync.Client ++ * @crossplatform ++ * @since 20 ++ */ + ORIGIN_FIELD = '#_origin', + + /** +@@ -1709,9 +1728,16 @@ declare namespace relationalStore { + * Indicates whether data has deleted in cloud. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client +- * @crossplatform + * @since 11 + */ ++ /** ++ * Deleted flag field. ++ * Indicates whether data has deleted in cloud. ++ * ++ * @syscap SystemCapability.DistributedDataManager.CloudSync.Client ++ * @crossplatform ++ * @since 20 ++ */ + DELETED_FLAG_FIELD = '#_deleted_flag', + + /** +@@ -1719,29 +1745,54 @@ declare namespace relationalStore { + * Indicates data status. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client +- * @crossplatform + * @since 12 + */ ++ /** ++ * Data status field. ++ * Indicates data status. ++ * ++ * @syscap SystemCapability.DistributedDataManager.CloudSync.Client ++ * @crossplatform ++ * @since 20 ++ */ + DATA_STATUS_FIELD = '#_data_status', + + /** + * Owner field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client +- * @crossplatform + * @since 11 + */ ++ /** ++ * Owner field. ++ * ++ * @syscap SystemCapability.DistributedDataManager.CloudSync.Client ++ * @crossplatform ++ * @since 20 ++ */ + OWNER_FIELD = '#_cloud_owner', + + /** + * Privilege field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client +- * @crossplatform + * @since 11 + */ ++ /** ++ * Privilege field. ++ * ++ * @syscap SystemCapability.DistributedDataManager.CloudSync.Client ++ * @crossplatform ++ * @since 20 ++ */ + PRIVILEGE_FIELD = '#_cloud_privilege', + ++ /** ++ * Sharing resource field. ++ * ++ * @syscap SystemCapability.DistributedDataManager.CloudSync.Client ++ * @since 11 ++ */ + /** + * Sharing resource field. + * +@@ -2702,11 +2753,37 @@ declare namespace relationalStore { + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core +- * @crossplatform + * @since 12 + */ ++ /** ++ * Sets the RdbPredicates to match the field whose data type is string and value ++ * does not contain the specified value. ++ * This method is similar to "Not like %value%" of the SQL statement. ++ * ++ * @param { string } field - Indicates the column name in the database table. ++ * @param { string } value - Indicates the value that is not contained. ++ * @returns { RdbPredicates } - The {@Link RdbPredicates} set. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; ++ *
2. Incorrect parameter types. ++ * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core ++ * @crossplatform ++ * @since 20 ++ */ + notContains(field: string, value: string): RdbPredicates; + ++ /** ++ * Sets the RdbPredicates to match the field whose data type is string and value ++ * is not like the specified value. ++ * This method is similar to "Not like" of the SQL statement. ++ * ++ * @param { string } field - Indicates the column name in the database table. ++ * @param { string } value - Indicates the value to compare against. ++ * @returns { RdbPredicates } - The {@Link RdbPredicates} set. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; ++ *
2. Incorrect parameter types. ++ * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core ++ * @since 12 ++ */ + /** + * Sets the RdbPredicates to match the field whose data type is string and value + * is not like the specified value. +@@ -3831,9 +3908,43 @@ declare namespace relationalStore { + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core +- * @crossplatform + * @since 14 + */ ++ /** ++ * Obtains the value of the specified column in the current row. ++ * The implementation class determines whether to throw an exception if the value of the specified column ++ * in the current row is null or the specified column is not of the Assets type. ++ * Inserting an empty blob, after API14 and API14, the obtained value is an empty blob; Before API 14, ++ * the obtained value was null. ++ * ++ * @param { number } columnIndex - Indicates the specified column index, which starts from 0. ++ * @returns { ValueType } The value of the specified column. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; ++ *
2. Incorrect parameter types. ++ * @throws { BusinessError } 14800000 - Inner error. ++ * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. ++ * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. ++ * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. ++ * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. ++ * @throws { BusinessError } 14800021 - SQLite: Generic error. ++ * Possible causes: Insert failed or the updated data does not exist. ++ * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. ++ * @throws { BusinessError } 14800023 - SQLite: Access permission denied. ++ * @throws { BusinessError } 14800024 - SQLite: The database file is locked. ++ * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. ++ * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. ++ * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. ++ * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. ++ * @throws { BusinessError } 14800029 - SQLite: The database is full. ++ * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. ++ * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. ++ * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. ++ * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. ++ * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. ++ * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core ++ * @crossplatform ++ * @since 20 ++ */ + getValue(columnIndex: number): ValueType; + + /** +@@ -4498,9 +4609,42 @@ declare namespace relationalStore { + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core +- * @crossplatform + * @since 12 + */ ++ /** ++ * Inserts a row of data into the target table with sync interface. ++ * ++ * @param { string } table - Indicates the target table. ++ * @param { sendableRelationalStore.ValuesBucket } values - Indicates the row of data ++ * {@link sendableRelationalStore.ValuesBucket} to be inserted into the table. ++ * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. ++ * @returns { number } The row ID if the operation is successful. return -1 otherwise. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; ++ *
2. Incorrect parameter types. ++ * @throws { BusinessError } 14800000 - Inner error. ++ * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. ++ * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. ++ * @throws { BusinessError } 14800015 - The database does not respond. ++ * @throws { BusinessError } 14800021 - SQLite: Generic error. ++ * Possible causes: Insert failed or the updated data does not exist. ++ * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. ++ * @throws { BusinessError } 14800023 - SQLite: Access permission denied. ++ * @throws { BusinessError } 14800024 - SQLite: The database file is locked. ++ * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. ++ * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. ++ * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. ++ * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. ++ * @throws { BusinessError } 14800029 - SQLite: The database is full. ++ * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. ++ * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. ++ * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. ++ * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. ++ * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. ++ * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. ++ * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core ++ * @crossplatform ++ * @since 20 ++ */ + insertSync(table: string, values: sendableRelationalStore.ValuesBucket, conflict?: ConflictResolution): number; + + /** +@@ -7876,9 +8020,22 @@ declare namespace relationalStore { + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core +- * @crossplatform + * @since 12 + */ ++ /** ++ * Subscribes to the SQL statistics. ++ * @param { 'statistics' } event - Indicates the event type, which must be 'statistics'. ++ * @param { Callback } observer - ++ * Indicates the callback used to return the SQL execution statistics {@link SqlExeInfo} in the database. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes: ++ * 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. ++ * @throws { BusinessError } 801 - Capability not supported. ++ * @throws { BusinessError } 14800000 - Inner error. ++ * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. ++ * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core ++ * @crossplatform ++ * @since 20 ++ */ + on(event: 'statistics', observer: Callback ): void; + + /** +@@ -8108,9 +8265,18 @@ declare namespace relationalStore { + * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core +- * @crossplatform + * @since 12 + */ ++ /** ++ * Close the RdbStore and all resultSets. ++ * ++ * @returns { Promise } The promise returned by the function. ++ * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. ++ * @throws { BusinessError } 14800000 - Inner error. ++ * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core ++ * @crossplatform ++ * @since 20 ++ */ + close(): Promise; + + /** +@@ -8885,9 +9051,37 @@ declare namespace relationalStore { + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core +- * @crossplatform + * @since 14 + */ ++ /** ++ * Executes a SQL statement that contains specified parameters and returns a value of ValueType. ++ * ++ * @param { string } sql - Indicates the SQL statement to execute. ++ * @param { Array } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. ++ * The values are strings. ++ * @returns { Promise } The promise returned by the function. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; ++ *
2. Incorrect parameter types. ++ * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). ++ * @throws { BusinessError } 14800000 - Inner error. ++ * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. ++ * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. ++ * @throws { BusinessError } 14800021 - SQLite: Generic error. ++ * Possible causes: Insert failed or the updated data does not exist. ++ * @throws { BusinessError } 14800023 - SQLite: Access permission denied. ++ * @throws { BusinessError } 14800024 - SQLite: The database file is locked. ++ * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. ++ * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. ++ * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. ++ * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. ++ * @throws { BusinessError } 14800029 - SQLite: The database is full. ++ * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. ++ * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. ++ * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. ++ * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core ++ * @crossplatform ++ * @since 20 ++ */ + execute(sql: string, args?: Array): Promise; + + /** +diff --git a/api/@ohos.data.uniformTypeDescriptor.d.ts b/api/@ohos.data.uniformTypeDescriptor.d.ts +index 4feebfa17..6d5bc0f67 100644 +--- a/api/@ohos.data.uniformTypeDescriptor.d.ts ++++ b/api/@ohos.data.uniformTypeDescriptor.d.ts +@@ -1834,9 +1834,16 @@ declare namespace uniformTypeDescriptor { + *
methods describing the uniform data type and its relationships to other uniform data types. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core +- * @crossplatform + * @since 11 + */ ++ /** ++ * Class describing the uniform data type defined in the {@code UniformDataType}, which consists of attributes and ++ *
methods describing the uniform data type and its relationships to other uniform data types. ++ * ++ * @syscap SystemCapability.DistributedDataManager.UDMF.Core ++ * @crossplatform ++ * @since 20 ++ */ + class TypeDescriptor { + /** + * Type ID of the uniform data type, which corresponds to the enum string in the {@code UniformDataType}. +@@ -1844,9 +1851,17 @@ declare namespace uniformTypeDescriptor { + * @type { string } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core +- * @crossplatform + * @since 11 + */ ++ /** ++ * Type ID of the uniform data type, which corresponds to the enum string in the {@code UniformDataType}. ++ * ++ * @type { string } ++ * @readonly ++ * @syscap SystemCapability.DistributedDataManager.UDMF.Core ++ * @crossplatform ++ * @since 20 ++ */ + readonly typeId: string; + + /** +@@ -1855,9 +1870,17 @@ declare namespace uniformTypeDescriptor { + * @type { Array } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core +- * @crossplatform + * @since 11 + */ ++ /** ++ * Uniform data type IDs that the uniform data type belongs to. ++ * ++ * @type { Array } ++ * @readonly ++ * @syscap SystemCapability.DistributedDataManager.UDMF.Core ++ * @crossplatform ++ * @since 20 ++ */ + readonly belongingToTypes: Array; + + /** +@@ -1866,9 +1889,17 @@ declare namespace uniformTypeDescriptor { + * @type { string } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core +- * @crossplatform + * @since 11 + */ ++ /** ++ * A textual description for the uniform data type. ++ * ++ * @type { string } ++ * @readonly ++ * @syscap SystemCapability.DistributedDataManager.UDMF.Core ++ * @crossplatform ++ * @since 20 ++ */ + readonly description: string; + + /** +@@ -1877,9 +1908,17 @@ declare namespace uniformTypeDescriptor { + * @type { string } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core +- * @crossplatform + * @since 11 + */ ++ /** ++ * Reference URL for the uniform data type, which describes the detail information of the type. ++ * ++ * @type { string } ++ * @readonly ++ * @syscap SystemCapability.DistributedDataManager.UDMF.Core ++ * @crossplatform ++ * @since 20 ++ */ + readonly referenceURL: string; + + /** +@@ -1888,9 +1927,17 @@ declare namespace uniformTypeDescriptor { + * @type { string } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core +- * @crossplatform + * @since 11 + */ ++ /** ++ * Default icon file path for the uniform data type. ++ * ++ * @type { string } ++ * @readonly ++ * @syscap SystemCapability.DistributedDataManager.UDMF.Core ++ * @crossplatform ++ * @since 20 ++ */ + readonly iconFile: string; + + /** +@@ -1899,11 +1946,27 @@ declare namespace uniformTypeDescriptor { + * @type { Array } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core +- * @crossplatform + * @since 12 + */ ++ /** ++ * File name extensions for the uniform data type. ++ * ++ * @type { Array } ++ * @readonly ++ * @syscap SystemCapability.DistributedDataManager.UDMF.Core ++ * @crossplatform ++ * @since 20 ++ */ + readonly filenameExtensions: Array; + ++ /** ++ * MIMETypes of the uniform data type. ++ * ++ * @type { Array } ++ * @readonly ++ * @syscap SystemCapability.DistributedDataManager.UDMF.Core ++ * @since 12 ++ */ + /** + * MIMETypes of the uniform data type. + * +@@ -1911,7 +1974,7 @@ declare namespace uniformTypeDescriptor { + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform +- * @since 12 ++ * @since 20 + */ + readonly mimeTypes: Array; + +@@ -1923,9 +1986,19 @@ declare namespace uniformTypeDescriptor { + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core +- * @crossplatform + * @since 11 + */ ++ /** ++ * Checks whether the uniform data type belongs to the given uniform data type. ++ * ++ * @param { string } type - A uniform data type to be compared. ++ * @returns { boolean } Returns true if the data type belongs to the given data type, else false. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; ++ *
2.Incorrect parameters types. ++ * @syscap SystemCapability.DistributedDataManager.UDMF.Core ++ * @crossplatform ++ * @since 20 ++ */ + belongsTo(type: string): boolean; + + /** +@@ -1936,9 +2009,19 @@ declare namespace uniformTypeDescriptor { + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core +- * @crossplatform + * @since 11 + */ ++ /** ++ * Checks whether the uniform data type is the lower level type of the given uniform data type. ++ * ++ * @param { string } type - A uniform data type to be compared. ++ * @returns { boolean } Returns true if the data type is the lower level type of the given data type, else false. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; ++ *
2.Incorrect parameters types. ++ * @syscap SystemCapability.DistributedDataManager.UDMF.Core ++ * @crossplatform ++ * @since 20 ++ */ + isLowerLevelType(type: string): boolean; + + /** +@@ -1949,9 +2032,19 @@ declare namespace uniformTypeDescriptor { + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core +- * @crossplatform + * @since 11 + */ ++ /** ++ * Checks whether the uniform data type is the higher level type of the given uniform data type. ++ * ++ * @param { string } type - A uniform data type to be compared. ++ * @returns { boolean } Returns true if the data type is the higher level type of the given data type, else false. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; ++ *
2.Incorrect parameters types. ++ * @syscap SystemCapability.DistributedDataManager.UDMF.Core ++ * @crossplatform ++ * @since 20 ++ */ + isHigherLevelType(type: string): boolean; + + /** +@@ -1962,9 +2055,19 @@ declare namespace uniformTypeDescriptor { + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core +- * @crossplatform + * @since 11 + */ ++ /** ++ * Checks whether the uniform type descriptor is equal to the given uniform type descriptor. ++ * ++ * @param { TypeDescriptor } typeDescriptor - A uniform type descriptor to be compared. ++ * @returns { boolean } Returns true if the type descriptor is equal to the given type descriptor, else false. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; ++ *
2.Incorrect parameters types. ++ * @syscap SystemCapability.DistributedDataManager.UDMF.Core ++ * @crossplatform ++ * @since 20 ++ */ + equals(typeDescriptor: TypeDescriptor): boolean; + } + +@@ -1977,9 +2080,20 @@ declare namespace uniformTypeDescriptor { + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core +- * @crossplatform + * @since 11 + */ ++ /** ++ * Queries and returns the uniform type descriptor by the given uniform data type ID. ++ * ++ * @param { string } typeId - Uniform data type ID. ++ * @returns { TypeDescriptor } Returns the uniform type descriptor corresponding to the uniform data type ID or null ++ *
if the uniform data type does not exist. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; ++ *
2.Incorrect parameters types. ++ * @syscap SystemCapability.DistributedDataManager.UDMF.Core ++ * @crossplatform ++ * @since 20 ++ */ + function getTypeDescriptor(typeId: string): TypeDescriptor; + + /** +@@ -2024,9 +2138,21 @@ declare namespace uniformTypeDescriptor { + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core +- * @crossplatform + * @since 11 + */ ++ /** ++ * Queries and returns the uniform type descriptor by the given MIME type and the uniform data type it belongs to. ++ * ++ * @param { string } mimeType - MIME type. ++ * @param { string } [belongsTo] - A uniform data type ID it belongs to. ++ * @returns { string } Returns the uniform data type ID corresponding to the given MIME type and the uniform data type ++ *
it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type does not exist. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; ++ *
2.Incorrect parameters types. ++ * @syscap SystemCapability.DistributedDataManager.UDMF.Core ++ * @crossplatform ++ * @since 20 ++ */ + function getUniformDataTypeByMIMEType(mimeType: string, belongsTo?: string): string; + + /** +@@ -2041,9 +2167,23 @@ declare namespace uniformTypeDescriptor { + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core +- * @crossplatform + * @since 13 + */ ++ /** ++ * Queries and returns the uniform type descriptor list by the given filename extension and the uniform data type it ++ * belongs to. ++ * ++ * @param { string } filenameExtension - Filename extension. ++ * @param { string } [belongsTo] - A uniform data type ID it belongs to. ++ * @returns { Array } Returns the uniform data type ID list corresponding to the given filename extension and ++ * the uniform data type it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type ++ * does not exist. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; ++ *
2.Incorrect parameters types. ++ * @syscap SystemCapability.DistributedDataManager.UDMF.Core ++ * @crossplatform ++ * @since 20 ++ */ + function getUniformDataTypesByFilenameExtension(filenameExtension: string, belongsTo?: string): Array; + + /** +@@ -2058,9 +2198,23 @@ declare namespace uniformTypeDescriptor { + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core +- * @crossplatform + * @since 13 + */ ++ /** ++ * Queries and returns the uniform type descriptor list by the given MIME type and the uniform data type it belongs ++ * to. ++ * ++ * @param { string } mimeType - MIME type. ++ * @param { string } [belongsTo] - A uniform data type ID it belongs to. ++ * @returns { Array } Returns the uniform data type ID list corresponding to the given MIME type and the ++ * uniform data type it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type does ++ * not exist. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; ++ *
2.Incorrect parameters types. ++ * @syscap SystemCapability.DistributedDataManager.UDMF.Core ++ * @crossplatform ++ * @since 20 ++ */ + function getUniformDataTypesByMIMEType(mimeType: string, belongsTo?: string): Array; + } + +diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts +index 34a0ed1d6..689c7e794 100644 +--- a/api/@ohos.request.d.ts ++++ b/api/@ohos.request.d.ts +@@ -283,7 +283,7 @@ declare namespace request { + + /** + * Error code 7 - Indicates an HTTP code that cannot be identified. +- * @crossplatform ++ * + * @syscap SystemCapability.MiscServices.Download + * @since 7 + */ +@@ -1984,9 +1984,18 @@ declare namespace request { + * + * @type { ?number } + * @syscap SystemCapability.MiscServices.Upload +- * @crossplatform + * @since 11 + */ ++ /** ++ * The index of paths for a task. ++ * Usually used for a continuous job. ++ * The default is 0. ++ * ++ * @type { ?number } ++ * @syscap SystemCapability.MiscServices.Upload ++ * @crossplatform ++ * @since 20 ++ */ + index?: number; + /** + * The start point of a file. +@@ -1996,9 +2005,19 @@ declare namespace request { + * + * @type { ?number } + * @syscap SystemCapability.MiscServices.Upload +- * @crossplatform + * @since 11 + */ ++ /** ++ * The start point of a file. ++ * Usually used for a continuous job. ++ * It will start read at the point in upload. ++ * The default is 0. ++ * ++ * @type { ?number } ++ * @syscap SystemCapability.MiscServices.Upload ++ * @crossplatform ++ * @since 20 ++ */ + begins?: number; + /** + * The end point of a file. +@@ -2008,9 +2027,19 @@ declare namespace request { + * + * @type { ?number } + * @syscap SystemCapability.MiscServices.Upload +- * @crossplatform + * @since 11 + */ ++ /** ++ * The end point of a file. ++ * Usually used for a continuous job. ++ * It will end read at the point in upload. ++ * The default is -1 indicating the end of the data for upload. ++ * ++ * @type { ?number } ++ * @syscap SystemCapability.MiscServices.Upload ++ * @crossplatform ++ * @since 20 ++ */ + ends?: number; + /** + * A list of files to be uploaded. Please use multipart/form-data to submit. +@@ -2665,9 +2694,16 @@ declare namespace request { + * + * @enum { string } BroadcastEvent + * @syscap SystemCapability.Request.FileTransferAgent +- * @crossplatform + * @since 11 + */ ++ /** ++ * Broadcast events for the request. ++ * ++ * @enum { string } BroadcastEvent ++ * @syscap SystemCapability.Request.FileTransferAgent ++ * @crossplatform ++ * @since 20 ++ */ + enum BroadcastEvent { + /** + * Completion event for the task. +@@ -2675,9 +2711,17 @@ declare namespace request { + * The data in the commonEventData contains the id of the task. + * + * @syscap SystemCapability.Request.FileTransferAgent +- * @crossplatform + * @since 11 + */ ++ /** ++ * Completion event for the task. ++ * The code in the commonEventData can only be "0x40"(COMPLETE) or "0x41"(FAILED), same as "State". ++ * The data in the commonEventData contains the id of the task. ++ * ++ * @syscap SystemCapability.Request.FileTransferAgent ++ * @crossplatform ++ * @since 20 ++ */ + COMPLETE = 'ohos.request.event.COMPLETE' + } + +@@ -3344,9 +3388,18 @@ declare namespace request { + * + * @type { ?string } + * @syscap SystemCapability.Request.FileTransferAgent +- * @crossplatform + * @since 12 + */ ++ /** ++ * The proxy url for the task. ++ * Only this format is supported: http://: ++ * Username and password are not supported. ++ * ++ * @type { ?string } ++ * @syscap SystemCapability.Request.FileTransferAgent ++ * @crossplatform ++ * @since 20 ++ */ + proxy?: string; + /** + * The index of paths for a task. +@@ -4500,6 +4553,7 @@ declare namespace request { + * + * @interface HttpResponse + * @syscap SystemCapability.Request.FileTransferAgent ++ * @atomicservice + * @since 12 + */ + /** +@@ -4520,6 +4574,7 @@ declare namespace request { + * @type { string } + * @readonly + * @syscap SystemCapability.Request.FileTransferAgent ++ * @atomicservice + * @since 12 + */ + /** +@@ -4540,6 +4595,7 @@ declare namespace request { + * @type { number } + * @readonly + * @syscap SystemCapability.Request.FileTransferAgent ++ * @atomicservice + * @since 12 + */ + /** +@@ -4560,6 +4616,7 @@ declare namespace request { + * @type { string } + * @readonly + * @syscap SystemCapability.Request.FileTransferAgent ++ * @atomicservice + * @since 12 + */ + /** +@@ -4580,10 +4637,19 @@ declare namespace request { + * @type { Map> } + * @readonly + * @syscap SystemCapability.Request.FileTransferAgent +- * @crossplatform + * @atomicservice + * @since 12 + */ ++ /** ++ * The headers of the HTTP response. ++ * ++ * @type { Map> } ++ * @readonly ++ * @syscap SystemCapability.Request.FileTransferAgent ++ * @crossplatform ++ * @atomicservice ++ * @since 20 ++ */ + readonly headers: Map>, + } + +@@ -4857,9 +4923,20 @@ declare namespace request { + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent +- * @crossplatform + * @since 11 + */ ++ /** ++ * Enables the specified callback. ++ * Subscribes to task pause events. ++ * ++ * @param { 'pause' } event - event types. ++ * @param { function } callback - callback function with a `Progress` argument. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. ++ *
2. Incorrect parameter type. 3. Parameter verification failed. ++ * @syscap SystemCapability.Request.FileTransferAgent ++ * @crossplatform ++ * @since 20 ++ */ + on(event: 'pause', callback: (progress: Progress) => void): void; + /** + * Disables the specified callback. +@@ -4870,9 +4947,20 @@ declare namespace request { + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent +- * @crossplatform + * @since 11 + */ ++ /** ++ * Disables the specified callback. ++ * Unsubscribes from the foreground task pause event. ++ * ++ * @param { 'pause' } event - event types. ++ * @param { function } callback - callback function with a `Progress` argument. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. ++ *
2. Incorrect parameter type. 3. Parameter verification failed. ++ * @syscap SystemCapability.Request.FileTransferAgent ++ * @crossplatform ++ * @since 20 ++ */ + off(event: 'pause', callback?: (progress: Progress) => void): void; + /** + * Enables the specified callback. +@@ -4883,9 +4971,20 @@ declare namespace request { + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent +- * @crossplatform + * @since 11 + */ ++ /** ++ * Enables the specified callback. ++ * Subscribes to task resume events. ++ * ++ * @param { 'resume' } event - event types. ++ * @param { function } callback - callback function with a `Progress` argument. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. ++ *
2. Incorrect parameter type. 3. Parameter verification failed. ++ * @syscap SystemCapability.Request.FileTransferAgent ++ * @crossplatform ++ * @since 20 ++ */ + on(event: 'resume', callback: (progress: Progress) => void): void; + /** + * Disables the specified callback. +@@ -4896,9 +4995,20 @@ declare namespace request { + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent +- * @crossplatform + * @since 11 + */ ++ /** ++ * Disables the specified callback. ++ * Unsubscribes from the foreground task resume event. ++ * ++ * @param { 'resume' } event - event types. ++ * @param { function } callback - callback function with a `Progress` argument. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. ++ *
2. Incorrect parameter type. 3. Parameter verification failed. ++ * @syscap SystemCapability.Request.FileTransferAgent ++ * @crossplatform ++ * @since 20 ++ */ + off(event: 'resume', callback?: (progress: Progress) => void): void; + /** + * Enables the specified callback. +@@ -4909,9 +5019,20 @@ declare namespace request { + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent +- * @crossplatform + * @since 11 + */ ++ /** ++ * Enables the specified callback. ++ * Subscribes to task removal events. ++ * ++ * @param { 'remove' } event - event types. ++ * @param { function } callback - callback function with a `Progress` argument. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. ++ *
2. Incorrect parameter type. 3. Parameter verification failed. ++ * @syscap SystemCapability.Request.FileTransferAgent ++ * @crossplatform ++ * @since 20 ++ */ + on(event: 'remove', callback: (progress: Progress) => void): void; + /** + * Disables the specified callback. +@@ -4922,9 +5043,20 @@ declare namespace request { + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent +- * @crossplatform + * @since 11 + */ ++ /** ++ * Disables the specified callback. ++ * Unsubscribes from the task removal event. ++ * ++ * @param { 'remove' } event - event types. ++ * @param { function } callback - callback function with a `Progress` argument. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. ++ *
2. Incorrect parameter type. 3. Parameter verification failed. ++ * @syscap SystemCapability.Request.FileTransferAgent ++ * @crossplatform ++ * @since 20 ++ */ + off(event: 'remove', callback?: (progress: Progress) => void): void; + /** + * Enables the response callback. +@@ -4935,6 +5067,7 @@ declare namespace request { + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent ++ * @atomicservice + * @since 12 + */ + /** +@@ -4961,10 +5094,22 @@ declare namespace request { + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent +- * @crossplatform + * @atomicservice + * @since 12 + */ ++ /** ++ * Disables the response callback. ++ * Unsubscribes from task response headers. ++ * ++ * @param { 'response' } event - event types. ++ * @param { Callback } callback - callback function with an `HttpResponse` argument. ++ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. ++ *
2. Incorrect parameter type. 3. Parameter verification failed. ++ * @syscap SystemCapability.Request.FileTransferAgent ++ * @crossplatform ++ * @atomicservice ++ * @since 20 ++ */ + off(event: 'response', callback?: Callback): void; + /** + * Enables the 'faultOccur' callback. +@@ -5113,9 +5258,18 @@ declare namespace request { + * @throws { BusinessError } 13400003 - Task service ability error. + * @throws { BusinessError } 21900007 - Operation with wrong task state. + * @syscap SystemCapability.Request.FileTransferAgent +- * @crossplatform + * @since 11 + */ ++ /** ++ * Pauses a task that is waiting, running, or retrying. ++ * ++ * @param { AsyncCallback } callback - callback function with a boolean argument indicating the calling result. ++ * @throws { BusinessError } 13400003 - Task service ability error. ++ * @throws { BusinessError } 21900007 - Operation with wrong task state. ++ * @syscap SystemCapability.Request.FileTransferAgent ++ * @crossplatform ++ * @since 20 ++ */ + pause(callback: AsyncCallback): void; + /** + * Pauses the background task. +@@ -5134,9 +5288,18 @@ declare namespace request { + * @throws { BusinessError } 13400003 - Task service ability error. + * @throws { BusinessError } 21900007 - Operation with wrong task state. + * @syscap SystemCapability.Request.FileTransferAgent +- * @crossplatform + * @since 11 + */ ++ /** ++ * Pauses a task that is waiting, running, or retrying. ++ * ++ * @returns { Promise } the promise returned by the function. ++ * @throws { BusinessError } 13400003 - Task service ability error. ++ * @throws { BusinessError } 21900007 - Operation with wrong task state. ++ * @syscap SystemCapability.Request.FileTransferAgent ++ * @crossplatform ++ * @since 20 ++ */ + pause(): Promise; + /** + * Resumes the background task. +@@ -5159,9 +5322,20 @@ declare namespace request { + * @throws { BusinessError } 13400003 - Task service ability error. + * @throws { BusinessError } 21900007 - Operation with wrong task state. + * @syscap SystemCapability.Request.FileTransferAgent +- * @crossplatform + * @since 11 + */ ++ /** ++ * Resumes a paused task. ++ * ++ * @permission ohos.permission.INTERNET ++ * @param { AsyncCallback } callback - callback function with a boolean argument indicating the calling result. ++ * @throws { BusinessError } 201 - Permission denied. ++ * @throws { BusinessError } 13400003 - Task service ability error. ++ * @throws { BusinessError } 21900007 - Operation with wrong task state. ++ * @syscap SystemCapability.Request.FileTransferAgent ++ * @crossplatform ++ * @since 20 ++ */ + resume(callback: AsyncCallback): void; + /** + * Resumes the background task. +@@ -5184,9 +5358,20 @@ declare namespace request { + * @throws { BusinessError } 13400003 - Task service ability error. + * @throws { BusinessError } 21900007 - Operation with wrong task state. + * @syscap SystemCapability.Request.FileTransferAgent +- * @crossplatform + * @since 11 + */ ++ /** ++ * Resumes a paused task. ++ * ++ * @permission ohos.permission.INTERNET ++ * @returns { Promise } the promise returned by the function. ++ * @throws { BusinessError } 201 - Permission denied. ++ * @throws { BusinessError } 13400003 - Task service ability error. ++ * @throws { BusinessError } 21900007 - Operation with wrong task state. ++ * @syscap SystemCapability.Request.FileTransferAgent ++ * @crossplatform ++ * @since 20 ++ */ + resume(): Promise; + /** + * Stop a running, waiting, or retrying task. -- Gitee From 0bacbca220f6f8d58d1a8c299d296333b26efec0 Mon Sep 17 00:00:00 2001 From: BrainL Date: Thu, 19 Jun 2025 11:25:27 +0800 Subject: [PATCH 7/8] modify tags Signed-off-by: BrainL --- api/@ohos.data.preferences.d.ts | 33 +++- api/@ohos.data.relationalStore.d.ts | 224 ++++++++++++++++++++-- api/@ohos.data.uniformTypeDescriptor.d.ts | 186 ++++++++++++++++-- api/@ohos.request.d.ts | 223 +++++++++++++++++++-- 4 files changed, 614 insertions(+), 52 deletions(-) diff --git a/api/@ohos.data.preferences.d.ts b/api/@ohos.data.preferences.d.ts index ee25e4398c..37ac09b9e6 100644 --- a/api/@ohos.data.preferences.d.ts +++ b/api/@ohos.data.preferences.d.ts @@ -1907,10 +1907,25 @@ declare namespace preferences { *
3. Parameter verification failed. * @throws { BusinessError } 15500000 - Inner error. * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform * @atomicservice * @since 12 */ + /** + * Registers an observer to listen for changes to the {@ link Preferences} object. + * + * @param { 'dataChange' } type - Indicates the type of the event to observe. + * @param { Array } keys - Indicates one or more keys to listen for. + * @param { Callback> } callback - Indicates the callback used to return the data change. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter types; + * 3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ on(type: 'dataChange', keys: Array, callback: Callback>): void; /** @@ -1989,10 +2004,24 @@ declare namespace preferences { *
3. Parameter verification failed. * @throws { BusinessError } 15500000 - Inner error. * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform * @atomicservice * @since 12 */ + /** + * Unregisters an observer for changes to the {@ link Preferences} object. + * + * @param { 'dataChange' } type - Indicates the event type. + * @param { Array } keys - Indicates the data whose changes are not observed. + * @param { Callback> } callback - Indicates the callback to unregister. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since 20 + */ off(type: 'dataChange', keys: Array, callback?: Callback>): void; } } diff --git a/api/@ohos.data.relationalStore.d.ts b/api/@ohos.data.relationalStore.d.ts index 11c99b5ad6..ef63edae9b 100644 --- a/api/@ohos.data.relationalStore.d.ts +++ b/api/@ohos.data.relationalStore.d.ts @@ -1682,26 +1682,45 @@ declare namespace relationalStore { * * @enum { string } * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @crossplatform * @since 11 */ + /** + * Enumerates the field. + * + * @enum { string } + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ enum Field { /** * Cursor field. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @crossplatform * @since 11 */ + /** + * Cursor field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ CURSOR_FIELD = '#_cursor', /** * Origin field. For details, see {@link Origin}. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @crossplatform * @since 11 */ + /** + * Origin field. For details, see {@link Origin}. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ ORIGIN_FIELD = '#_origin', /** @@ -1709,9 +1728,16 @@ declare namespace relationalStore { * Indicates whether data has deleted in cloud. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @crossplatform * @since 11 */ + /** + * Deleted flag field. + * Indicates whether data has deleted in cloud. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ DELETED_FLAG_FIELD = '#_deleted_flag', /** @@ -1719,36 +1745,61 @@ declare namespace relationalStore { * Indicates data status. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @crossplatform * @since 12 */ + /** + * Data status field. + * Indicates data status. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ DATA_STATUS_FIELD = '#_data_status', /** * Owner field. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @crossplatform * @since 11 */ + /** + * Owner field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ OWNER_FIELD = '#_cloud_owner', /** * Privilege field. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @crossplatform * @since 11 */ + /** + * Privilege field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ PRIVILEGE_FIELD = '#_cloud_privilege', /** * Sharing resource field. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @crossplatform * @since 11 */ + /** + * Sharing resource field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ SHARING_RESOURCE_FIELD = '#_sharing_resource_field' } @@ -2702,9 +2753,22 @@ declare namespace relationalStore { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform * @since 12 */ + /** + * Sets the RdbPredicates to match the field whose data type is string and value + * does not contain the specified value. + * This method is similar to "Not like %value%" of the SQL statement. + * + * @param { string } field - Indicates the column name in the database table. + * @param { string } value - Indicates the value that is not contained. + * @returns { RdbPredicates } - The {@Link RdbPredicates} set. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ notContains(field: string, value: string): RdbPredicates; /** @@ -2718,9 +2782,22 @@ declare namespace relationalStore { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform * @since 12 */ + /** + * Sets the RdbPredicates to match the field whose data type is string and value + * is not like the specified value. + * This method is similar to "Not like" of the SQL statement. + * + * @param { string } field - Indicates the column name in the database table. + * @param { string } value - Indicates the value to compare against. + * @returns { RdbPredicates } - The {@Link RdbPredicates} set. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ notLike(field: string, value: string): RdbPredicates; /** @@ -3831,9 +3908,43 @@ declare namespace relationalStore { * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform * @since 14 */ + /** + * Obtains the value of the specified column in the current row. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null or the specified column is not of the Assets type. + * Inserting an empty blob, after API14 and API14, the obtained value is an empty blob; Before API 14, + * the obtained value was null. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { ValueType } The value of the specified column. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ getValue(columnIndex: number): ValueType; /** @@ -4498,9 +4609,42 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform * @since 12 */ + /** + * Inserts a row of data into the target table with sync interface. + * + * @param { string } table - Indicates the target table. + * @param { sendableRelationalStore.ValuesBucket } values - Indicates the row of data + * {@link sendableRelationalStore.ValuesBucket} to be inserted into the table. + * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. + * @returns { number } The row ID if the operation is successful. return -1 otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ insertSync(table: string, values: sendableRelationalStore.ValuesBucket, conflict?: ConflictResolution): number; /** @@ -7876,9 +8020,22 @@ declare namespace relationalStore { * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform * @since 12 */ + /** + * Subscribes to the SQL statistics. + * @param { 'statistics' } event - Indicates the event type, which must be 'statistics'. + * @param { Callback } observer - + * Indicates the callback used to return the SQL execution statistics {@link SqlExeInfo} in the database. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ on(event: 'statistics', observer: Callback ): void; /** @@ -8108,9 +8265,18 @@ declare namespace relationalStore { * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform * @since 12 */ + /** + * Close the RdbStore and all resultSets. + * + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ close(): Promise; /** @@ -8885,9 +9051,37 @@ declare namespace relationalStore { * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform * @since 14 */ + /** + * Executes a SQL statement that contains specified parameters and returns a value of ValueType. + * + * @param { string } sql - Indicates the SQL statement to execute. + * @param { Array } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. + * The values are strings. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ execute(sql: string, args?: Array): Promise; /** diff --git a/api/@ohos.data.uniformTypeDescriptor.d.ts b/api/@ohos.data.uniformTypeDescriptor.d.ts index 4feebfa174..6d5bc0f67b 100644 --- a/api/@ohos.data.uniformTypeDescriptor.d.ts +++ b/api/@ohos.data.uniformTypeDescriptor.d.ts @@ -1834,9 +1834,16 @@ declare namespace uniformTypeDescriptor { *
methods describing the uniform data type and its relationships to other uniform data types. * * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Class describing the uniform data type defined in the {@code UniformDataType}, which consists of attributes and + *
methods describing the uniform data type and its relationships to other uniform data types. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ class TypeDescriptor { /** * Type ID of the uniform data type, which corresponds to the enum string in the {@code UniformDataType}. @@ -1844,9 +1851,17 @@ declare namespace uniformTypeDescriptor { * @type { string } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Type ID of the uniform data type, which corresponds to the enum string in the {@code UniformDataType}. + * + * @type { string } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ readonly typeId: string; /** @@ -1855,9 +1870,17 @@ declare namespace uniformTypeDescriptor { * @type { Array } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Uniform data type IDs that the uniform data type belongs to. + * + * @type { Array } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ readonly belongingToTypes: Array; /** @@ -1866,9 +1889,17 @@ declare namespace uniformTypeDescriptor { * @type { string } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * A textual description for the uniform data type. + * + * @type { string } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ readonly description: string; /** @@ -1877,9 +1908,17 @@ declare namespace uniformTypeDescriptor { * @type { string } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Reference URL for the uniform data type, which describes the detail information of the type. + * + * @type { string } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ readonly referenceURL: string; /** @@ -1888,9 +1927,17 @@ declare namespace uniformTypeDescriptor { * @type { string } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Default icon file path for the uniform data type. + * + * @type { string } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ readonly iconFile: string; /** @@ -1899,11 +1946,27 @@ declare namespace uniformTypeDescriptor { * @type { Array } * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 12 */ + /** + * File name extensions for the uniform data type. + * + * @type { Array } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ readonly filenameExtensions: Array; + /** + * MIMETypes of the uniform data type. + * + * @type { Array } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 12 + */ /** * MIMETypes of the uniform data type. * @@ -1911,7 +1974,7 @@ declare namespace uniformTypeDescriptor { * @readonly * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform - * @since 12 + * @since 20 */ readonly mimeTypes: Array; @@ -1923,9 +1986,19 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Checks whether the uniform data type belongs to the given uniform data type. + * + * @param { string } type - A uniform data type to be compared. + * @returns { boolean } Returns true if the data type belongs to the given data type, else false. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ belongsTo(type: string): boolean; /** @@ -1936,9 +2009,19 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Checks whether the uniform data type is the lower level type of the given uniform data type. + * + * @param { string } type - A uniform data type to be compared. + * @returns { boolean } Returns true if the data type is the lower level type of the given data type, else false. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ isLowerLevelType(type: string): boolean; /** @@ -1949,9 +2032,19 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Checks whether the uniform data type is the higher level type of the given uniform data type. + * + * @param { string } type - A uniform data type to be compared. + * @returns { boolean } Returns true if the data type is the higher level type of the given data type, else false. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ isHigherLevelType(type: string): boolean; /** @@ -1962,9 +2055,19 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Checks whether the uniform type descriptor is equal to the given uniform type descriptor. + * + * @param { TypeDescriptor } typeDescriptor - A uniform type descriptor to be compared. + * @returns { boolean } Returns true if the type descriptor is equal to the given type descriptor, else false. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ equals(typeDescriptor: TypeDescriptor): boolean; } @@ -1977,9 +2080,20 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Queries and returns the uniform type descriptor by the given uniform data type ID. + * + * @param { string } typeId - Uniform data type ID. + * @returns { TypeDescriptor } Returns the uniform type descriptor corresponding to the uniform data type ID or null + *
if the uniform data type does not exist. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ function getTypeDescriptor(typeId: string): TypeDescriptor; /** @@ -2024,9 +2138,21 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 11 */ + /** + * Queries and returns the uniform type descriptor by the given MIME type and the uniform data type it belongs to. + * + * @param { string } mimeType - MIME type. + * @param { string } [belongsTo] - A uniform data type ID it belongs to. + * @returns { string } Returns the uniform data type ID corresponding to the given MIME type and the uniform data type + *
it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type does not exist. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ function getUniformDataTypeByMIMEType(mimeType: string, belongsTo?: string): string; /** @@ -2041,9 +2167,23 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 13 */ + /** + * Queries and returns the uniform type descriptor list by the given filename extension and the uniform data type it + * belongs to. + * + * @param { string } filenameExtension - Filename extension. + * @param { string } [belongsTo] - A uniform data type ID it belongs to. + * @returns { Array } Returns the uniform data type ID list corresponding to the given filename extension and + * the uniform data type it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type + * does not exist. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ function getUniformDataTypesByFilenameExtension(filenameExtension: string, belongsTo?: string): Array; /** @@ -2058,9 +2198,23 @@ declare namespace uniformTypeDescriptor { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 13 */ + /** + * Queries and returns the uniform type descriptor list by the given MIME type and the uniform data type it belongs + * to. + * + * @param { string } mimeType - MIME type. + * @param { string } [belongsTo] - A uniform data type ID it belongs to. + * @returns { Array } Returns the uniform data type ID list corresponding to the given MIME type and the + * uniform data type it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type does + * not exist. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ function getUniformDataTypesByMIMEType(mimeType: string, belongsTo?: string): Array; } diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts index 34a0ed1d6c..689c7e7949 100644 --- a/api/@ohos.request.d.ts +++ b/api/@ohos.request.d.ts @@ -283,7 +283,7 @@ declare namespace request { /** * Error code 7 - Indicates an HTTP code that cannot be identified. - * @crossplatform + * * @syscap SystemCapability.MiscServices.Download * @since 7 */ @@ -1984,9 +1984,18 @@ declare namespace request { * * @type { ?number } * @syscap SystemCapability.MiscServices.Upload - * @crossplatform * @since 11 */ + /** + * The index of paths for a task. + * Usually used for a continuous job. + * The default is 0. + * + * @type { ?number } + * @syscap SystemCapability.MiscServices.Upload + * @crossplatform + * @since 20 + */ index?: number; /** * The start point of a file. @@ -1996,9 +2005,19 @@ declare namespace request { * * @type { ?number } * @syscap SystemCapability.MiscServices.Upload - * @crossplatform * @since 11 */ + /** + * The start point of a file. + * Usually used for a continuous job. + * It will start read at the point in upload. + * The default is 0. + * + * @type { ?number } + * @syscap SystemCapability.MiscServices.Upload + * @crossplatform + * @since 20 + */ begins?: number; /** * The end point of a file. @@ -2008,9 +2027,19 @@ declare namespace request { * * @type { ?number } * @syscap SystemCapability.MiscServices.Upload - * @crossplatform * @since 11 */ + /** + * The end point of a file. + * Usually used for a continuous job. + * It will end read at the point in upload. + * The default is -1 indicating the end of the data for upload. + * + * @type { ?number } + * @syscap SystemCapability.MiscServices.Upload + * @crossplatform + * @since 20 + */ ends?: number; /** * A list of files to be uploaded. Please use multipart/form-data to submit. @@ -2665,9 +2694,16 @@ declare namespace request { * * @enum { string } BroadcastEvent * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Broadcast events for the request. + * + * @enum { string } BroadcastEvent + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ enum BroadcastEvent { /** * Completion event for the task. @@ -2675,9 +2711,17 @@ declare namespace request { * The data in the commonEventData contains the id of the task. * * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Completion event for the task. + * The code in the commonEventData can only be "0x40"(COMPLETE) or "0x41"(FAILED), same as "State". + * The data in the commonEventData contains the id of the task. + * + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ COMPLETE = 'ohos.request.event.COMPLETE' } @@ -3344,9 +3388,18 @@ declare namespace request { * * @type { ?string } * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 12 */ + /** + * The proxy url for the task. + * Only this format is supported: http://: + * Username and password are not supported. + * + * @type { ?string } + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ proxy?: string; /** * The index of paths for a task. @@ -4500,6 +4553,7 @@ declare namespace request { * * @interface HttpResponse * @syscap SystemCapability.Request.FileTransferAgent + * @atomicservice * @since 12 */ /** @@ -4520,6 +4574,7 @@ declare namespace request { * @type { string } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @atomicservice * @since 12 */ /** @@ -4540,6 +4595,7 @@ declare namespace request { * @type { number } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @atomicservice * @since 12 */ /** @@ -4560,6 +4616,7 @@ declare namespace request { * @type { string } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @atomicservice * @since 12 */ /** @@ -4580,10 +4637,19 @@ declare namespace request { * @type { Map> } * @readonly * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @atomicservice * @since 12 */ + /** + * The headers of the HTTP response. + * + * @type { Map> } + * @readonly + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @atomicservice + * @since 20 + */ readonly headers: Map>, } @@ -4857,9 +4923,20 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Enables the specified callback. + * Subscribes to task pause events. + * + * @param { 'pause' } event - event types. + * @param { function } callback - callback function with a `Progress` argument. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ on(event: 'pause', callback: (progress: Progress) => void): void; /** * Disables the specified callback. @@ -4870,9 +4947,20 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Disables the specified callback. + * Unsubscribes from the foreground task pause event. + * + * @param { 'pause' } event - event types. + * @param { function } callback - callback function with a `Progress` argument. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ off(event: 'pause', callback?: (progress: Progress) => void): void; /** * Enables the specified callback. @@ -4883,9 +4971,20 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Enables the specified callback. + * Subscribes to task resume events. + * + * @param { 'resume' } event - event types. + * @param { function } callback - callback function with a `Progress` argument. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ on(event: 'resume', callback: (progress: Progress) => void): void; /** * Disables the specified callback. @@ -4896,9 +4995,20 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Disables the specified callback. + * Unsubscribes from the foreground task resume event. + * + * @param { 'resume' } event - event types. + * @param { function } callback - callback function with a `Progress` argument. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ off(event: 'resume', callback?: (progress: Progress) => void): void; /** * Enables the specified callback. @@ -4909,9 +5019,20 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Enables the specified callback. + * Subscribes to task removal events. + * + * @param { 'remove' } event - event types. + * @param { function } callback - callback function with a `Progress` argument. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ on(event: 'remove', callback: (progress: Progress) => void): void; /** * Disables the specified callback. @@ -4922,9 +5043,20 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Disables the specified callback. + * Unsubscribes from the task removal event. + * + * @param { 'remove' } event - event types. + * @param { function } callback - callback function with a `Progress` argument. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ off(event: 'remove', callback?: (progress: Progress) => void): void; /** * Enables the response callback. @@ -4935,6 +5067,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @atomicservice * @since 12 */ /** @@ -4961,10 +5094,22 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @atomicservice * @since 12 */ + /** + * Disables the response callback. + * Unsubscribes from task response headers. + * + * @param { 'response' } event - event types. + * @param { Callback } callback - callback function with an `HttpResponse` argument. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. + *
2. Incorrect parameter type. 3. Parameter verification failed. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @atomicservice + * @since 20 + */ off(event: 'response', callback?: Callback): void; /** * Enables the 'faultOccur' callback. @@ -5113,9 +5258,18 @@ declare namespace request { * @throws { BusinessError } 13400003 - Task service ability error. * @throws { BusinessError } 21900007 - Operation with wrong task state. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Pauses a task that is waiting, running, or retrying. + * + * @param { AsyncCallback } callback - callback function with a boolean argument indicating the calling result. + * @throws { BusinessError } 13400003 - Task service ability error. + * @throws { BusinessError } 21900007 - Operation with wrong task state. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ pause(callback: AsyncCallback): void; /** * Pauses the background task. @@ -5134,9 +5288,18 @@ declare namespace request { * @throws { BusinessError } 13400003 - Task service ability error. * @throws { BusinessError } 21900007 - Operation with wrong task state. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Pauses a task that is waiting, running, or retrying. + * + * @returns { Promise } the promise returned by the function. + * @throws { BusinessError } 13400003 - Task service ability error. + * @throws { BusinessError } 21900007 - Operation with wrong task state. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ pause(): Promise; /** * Resumes the background task. @@ -5159,9 +5322,20 @@ declare namespace request { * @throws { BusinessError } 13400003 - Task service ability error. * @throws { BusinessError } 21900007 - Operation with wrong task state. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Resumes a paused task. + * + * @permission ohos.permission.INTERNET + * @param { AsyncCallback } callback - callback function with a boolean argument indicating the calling result. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 13400003 - Task service ability error. + * @throws { BusinessError } 21900007 - Operation with wrong task state. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ resume(callback: AsyncCallback): void; /** * Resumes the background task. @@ -5184,9 +5358,20 @@ declare namespace request { * @throws { BusinessError } 13400003 - Task service ability error. * @throws { BusinessError } 21900007 - Operation with wrong task state. * @syscap SystemCapability.Request.FileTransferAgent - * @crossplatform * @since 11 */ + /** + * Resumes a paused task. + * + * @permission ohos.permission.INTERNET + * @returns { Promise } the promise returned by the function. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 13400003 - Task service ability error. + * @throws { BusinessError } 21900007 - Operation with wrong task state. + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ resume(): Promise; /** * Stop a running, waiting, or retrying task. -- Gitee From 8c2b32203bd43ab66b020e4e99b047ec0e0719d4 Mon Sep 17 00:00:00 2001 From: BrainL Date: Thu, 19 Jun 2025 11:52:11 +0800 Subject: [PATCH 8/8] modify tags Signed-off-by: BrainL --- changes.diff | 1163 -------------------------------------------------- 1 file changed, 1163 deletions(-) delete mode 100644 changes.diff diff --git a/changes.diff b/changes.diff deleted file mode 100644 index 3f513acab8..0000000000 --- a/changes.diff +++ /dev/null @@ -1,1163 +0,0 @@ -diff --git a/api/@ohos.data.preferences.d.ts b/api/@ohos.data.preferences.d.ts -index ee25e4398..4f3aafd79 100644 ---- a/api/@ohos.data.preferences.d.ts -+++ b/api/@ohos.data.preferences.d.ts -@@ -1907,10 +1907,24 @@ declare namespace preferences { - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core -- * @crossplatform - * @atomicservice - * @since 12 - */ -+ /** -+ * Registers an observer to listen for changes to the {@ link Preferences} object. -+ * -+ * @param { 'dataChange' } type - Indicates the type of the event to observe. -+ * @param { Array } keys - Indicates one or more keys to listen for. -+ * @param { Callback> } callback - Indicates the callback used to return the data change. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes: -+ *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; -+ *
3. Parameter verification failed. -+ * @throws { BusinessError } 15500000 - Inner error. -+ * @syscap SystemCapability.DistributedDataManager.Preferences.Core -+ * @crossplatform -+ * @atomicservice -+ * @since 20 -+ */ - on(type: 'dataChange', keys: Array, callback: Callback>): void; - - /** -@@ -1989,10 +2003,24 @@ declare namespace preferences { - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core -- * @crossplatform - * @atomicservice - * @since 12 - */ -+ /** -+ * Unregisters an observer for changes to the {@ link Preferences} object. -+ * -+ * @param { 'dataChange' } type - Indicates the event type. -+ * @param { Array } keys - Indicates the data whose changes are not observed. -+ * @param { Callback> } callback - Indicates the callback to unregister. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes: -+ *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; -+ *
3. Parameter verification failed. -+ * @throws { BusinessError } 15500000 - Inner error. -+ * @syscap SystemCapability.DistributedDataManager.Preferences.Core -+ * @crossplatform -+ * @atomicservice -+ * @since 20 -+ */ - off(type: 'dataChange', keys: Array, callback?: Callback>): void; - } - } -diff --git a/api/@ohos.data.relationalStore.d.ts b/api/@ohos.data.relationalStore.d.ts -index 11c99b5ad..173995f6e 100644 ---- a/api/@ohos.data.relationalStore.d.ts -+++ b/api/@ohos.data.relationalStore.d.ts -@@ -1682,26 +1682,45 @@ declare namespace relationalStore { - * - * @enum { string } - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client -- * @crossplatform - * @since 11 - */ -+ /** -+ * Enumerates the field. -+ * -+ * @enum { string } -+ * @syscap SystemCapability.DistributedDataManager.CloudSync.Client -+ * @crossplatform -+ * @since 20 -+ */ - enum Field { - /** - * Cursor field. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client -- * @crossplatform - * @since 11 - */ -+ /** -+ * Cursor field. -+ * -+ * @syscap SystemCapability.DistributedDataManager.CloudSync.Client -+ * @crossplatform -+ * @since 20 -+ */ - CURSOR_FIELD = '#_cursor', - - /** - * Origin field. For details, see {@link Origin}. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client -- * @crossplatform - * @since 11 - */ -+ /** -+ * Origin field. For details, see {@link Origin}. -+ * -+ * @syscap SystemCapability.DistributedDataManager.CloudSync.Client -+ * @crossplatform -+ * @since 20 -+ */ - ORIGIN_FIELD = '#_origin', - - /** -@@ -1709,9 +1728,16 @@ declare namespace relationalStore { - * Indicates whether data has deleted in cloud. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client -- * @crossplatform - * @since 11 - */ -+ /** -+ * Deleted flag field. -+ * Indicates whether data has deleted in cloud. -+ * -+ * @syscap SystemCapability.DistributedDataManager.CloudSync.Client -+ * @crossplatform -+ * @since 20 -+ */ - DELETED_FLAG_FIELD = '#_deleted_flag', - - /** -@@ -1719,29 +1745,54 @@ declare namespace relationalStore { - * Indicates data status. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client -- * @crossplatform - * @since 12 - */ -+ /** -+ * Data status field. -+ * Indicates data status. -+ * -+ * @syscap SystemCapability.DistributedDataManager.CloudSync.Client -+ * @crossplatform -+ * @since 20 -+ */ - DATA_STATUS_FIELD = '#_data_status', - - /** - * Owner field. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client -- * @crossplatform - * @since 11 - */ -+ /** -+ * Owner field. -+ * -+ * @syscap SystemCapability.DistributedDataManager.CloudSync.Client -+ * @crossplatform -+ * @since 20 -+ */ - OWNER_FIELD = '#_cloud_owner', - - /** - * Privilege field. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client -- * @crossplatform - * @since 11 - */ -+ /** -+ * Privilege field. -+ * -+ * @syscap SystemCapability.DistributedDataManager.CloudSync.Client -+ * @crossplatform -+ * @since 20 -+ */ - PRIVILEGE_FIELD = '#_cloud_privilege', - -+ /** -+ * Sharing resource field. -+ * -+ * @syscap SystemCapability.DistributedDataManager.CloudSync.Client -+ * @since 11 -+ */ - /** - * Sharing resource field. - * -@@ -2702,11 +2753,37 @@ declare namespace relationalStore { - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core -- * @crossplatform - * @since 12 - */ -+ /** -+ * Sets the RdbPredicates to match the field whose data type is string and value -+ * does not contain the specified value. -+ * This method is similar to "Not like %value%" of the SQL statement. -+ * -+ * @param { string } field - Indicates the column name in the database table. -+ * @param { string } value - Indicates the value that is not contained. -+ * @returns { RdbPredicates } - The {@Link RdbPredicates} set. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; -+ *
2. Incorrect parameter types. -+ * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core -+ * @crossplatform -+ * @since 20 -+ */ - notContains(field: string, value: string): RdbPredicates; - -+ /** -+ * Sets the RdbPredicates to match the field whose data type is string and value -+ * is not like the specified value. -+ * This method is similar to "Not like" of the SQL statement. -+ * -+ * @param { string } field - Indicates the column name in the database table. -+ * @param { string } value - Indicates the value to compare against. -+ * @returns { RdbPredicates } - The {@Link RdbPredicates} set. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; -+ *
2. Incorrect parameter types. -+ * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core -+ * @since 12 -+ */ - /** - * Sets the RdbPredicates to match the field whose data type is string and value - * is not like the specified value. -@@ -3831,9 +3908,43 @@ declare namespace relationalStore { - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core -- * @crossplatform - * @since 14 - */ -+ /** -+ * Obtains the value of the specified column in the current row. -+ * The implementation class determines whether to throw an exception if the value of the specified column -+ * in the current row is null or the specified column is not of the Assets type. -+ * Inserting an empty blob, after API14 and API14, the obtained value is an empty blob; Before API 14, -+ * the obtained value was null. -+ * -+ * @param { number } columnIndex - Indicates the specified column index, which starts from 0. -+ * @returns { ValueType } The value of the specified column. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; -+ *
2. Incorrect parameter types. -+ * @throws { BusinessError } 14800000 - Inner error. -+ * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. -+ * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. -+ * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. -+ * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. -+ * @throws { BusinessError } 14800021 - SQLite: Generic error. -+ * Possible causes: Insert failed or the updated data does not exist. -+ * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. -+ * @throws { BusinessError } 14800023 - SQLite: Access permission denied. -+ * @throws { BusinessError } 14800024 - SQLite: The database file is locked. -+ * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. -+ * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. -+ * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. -+ * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. -+ * @throws { BusinessError } 14800029 - SQLite: The database is full. -+ * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. -+ * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. -+ * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. -+ * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. -+ * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. -+ * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core -+ * @crossplatform -+ * @since 20 -+ */ - getValue(columnIndex: number): ValueType; - - /** -@@ -4498,9 +4609,42 @@ declare namespace relationalStore { - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core -- * @crossplatform - * @since 12 - */ -+ /** -+ * Inserts a row of data into the target table with sync interface. -+ * -+ * @param { string } table - Indicates the target table. -+ * @param { sendableRelationalStore.ValuesBucket } values - Indicates the row of data -+ * {@link sendableRelationalStore.ValuesBucket} to be inserted into the table. -+ * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. -+ * @returns { number } The row ID if the operation is successful. return -1 otherwise. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; -+ *
2. Incorrect parameter types. -+ * @throws { BusinessError } 14800000 - Inner error. -+ * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. -+ * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. -+ * @throws { BusinessError } 14800015 - The database does not respond. -+ * @throws { BusinessError } 14800021 - SQLite: Generic error. -+ * Possible causes: Insert failed or the updated data does not exist. -+ * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. -+ * @throws { BusinessError } 14800023 - SQLite: Access permission denied. -+ * @throws { BusinessError } 14800024 - SQLite: The database file is locked. -+ * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. -+ * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. -+ * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. -+ * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. -+ * @throws { BusinessError } 14800029 - SQLite: The database is full. -+ * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. -+ * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. -+ * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. -+ * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. -+ * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. -+ * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. -+ * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core -+ * @crossplatform -+ * @since 20 -+ */ - insertSync(table: string, values: sendableRelationalStore.ValuesBucket, conflict?: ConflictResolution): number; - - /** -@@ -7876,9 +8020,22 @@ declare namespace relationalStore { - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core -- * @crossplatform - * @since 12 - */ -+ /** -+ * Subscribes to the SQL statistics. -+ * @param { 'statistics' } event - Indicates the event type, which must be 'statistics'. -+ * @param { Callback } observer - -+ * Indicates the callback used to return the SQL execution statistics {@link SqlExeInfo} in the database. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes: -+ * 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. -+ * @throws { BusinessError } 801 - Capability not supported. -+ * @throws { BusinessError } 14800000 - Inner error. -+ * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. -+ * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core -+ * @crossplatform -+ * @since 20 -+ */ - on(event: 'statistics', observer: Callback ): void; - - /** -@@ -8108,9 +8265,18 @@ declare namespace relationalStore { - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core -- * @crossplatform - * @since 12 - */ -+ /** -+ * Close the RdbStore and all resultSets. -+ * -+ * @returns { Promise } The promise returned by the function. -+ * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. -+ * @throws { BusinessError } 14800000 - Inner error. -+ * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core -+ * @crossplatform -+ * @since 20 -+ */ - close(): Promise; - - /** -@@ -8885,9 +9051,37 @@ declare namespace relationalStore { - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core -- * @crossplatform - * @since 14 - */ -+ /** -+ * Executes a SQL statement that contains specified parameters and returns a value of ValueType. -+ * -+ * @param { string } sql - Indicates the SQL statement to execute. -+ * @param { Array } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. -+ * The values are strings. -+ * @returns { Promise } The promise returned by the function. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; -+ *
2. Incorrect parameter types. -+ * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). -+ * @throws { BusinessError } 14800000 - Inner error. -+ * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. -+ * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. -+ * @throws { BusinessError } 14800021 - SQLite: Generic error. -+ * Possible causes: Insert failed or the updated data does not exist. -+ * @throws { BusinessError } 14800023 - SQLite: Access permission denied. -+ * @throws { BusinessError } 14800024 - SQLite: The database file is locked. -+ * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. -+ * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. -+ * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. -+ * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. -+ * @throws { BusinessError } 14800029 - SQLite: The database is full. -+ * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. -+ * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. -+ * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. -+ * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core -+ * @crossplatform -+ * @since 20 -+ */ - execute(sql: string, args?: Array): Promise; - - /** -diff --git a/api/@ohos.data.uniformTypeDescriptor.d.ts b/api/@ohos.data.uniformTypeDescriptor.d.ts -index 4feebfa17..6d5bc0f67 100644 ---- a/api/@ohos.data.uniformTypeDescriptor.d.ts -+++ b/api/@ohos.data.uniformTypeDescriptor.d.ts -@@ -1834,9 +1834,16 @@ declare namespace uniformTypeDescriptor { - *
methods describing the uniform data type and its relationships to other uniform data types. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core -- * @crossplatform - * @since 11 - */ -+ /** -+ * Class describing the uniform data type defined in the {@code UniformDataType}, which consists of attributes and -+ *
methods describing the uniform data type and its relationships to other uniform data types. -+ * -+ * @syscap SystemCapability.DistributedDataManager.UDMF.Core -+ * @crossplatform -+ * @since 20 -+ */ - class TypeDescriptor { - /** - * Type ID of the uniform data type, which corresponds to the enum string in the {@code UniformDataType}. -@@ -1844,9 +1851,17 @@ declare namespace uniformTypeDescriptor { - * @type { string } - * @readonly - * @syscap SystemCapability.DistributedDataManager.UDMF.Core -- * @crossplatform - * @since 11 - */ -+ /** -+ * Type ID of the uniform data type, which corresponds to the enum string in the {@code UniformDataType}. -+ * -+ * @type { string } -+ * @readonly -+ * @syscap SystemCapability.DistributedDataManager.UDMF.Core -+ * @crossplatform -+ * @since 20 -+ */ - readonly typeId: string; - - /** -@@ -1855,9 +1870,17 @@ declare namespace uniformTypeDescriptor { - * @type { Array } - * @readonly - * @syscap SystemCapability.DistributedDataManager.UDMF.Core -- * @crossplatform - * @since 11 - */ -+ /** -+ * Uniform data type IDs that the uniform data type belongs to. -+ * -+ * @type { Array } -+ * @readonly -+ * @syscap SystemCapability.DistributedDataManager.UDMF.Core -+ * @crossplatform -+ * @since 20 -+ */ - readonly belongingToTypes: Array; - - /** -@@ -1866,9 +1889,17 @@ declare namespace uniformTypeDescriptor { - * @type { string } - * @readonly - * @syscap SystemCapability.DistributedDataManager.UDMF.Core -- * @crossplatform - * @since 11 - */ -+ /** -+ * A textual description for the uniform data type. -+ * -+ * @type { string } -+ * @readonly -+ * @syscap SystemCapability.DistributedDataManager.UDMF.Core -+ * @crossplatform -+ * @since 20 -+ */ - readonly description: string; - - /** -@@ -1877,9 +1908,17 @@ declare namespace uniformTypeDescriptor { - * @type { string } - * @readonly - * @syscap SystemCapability.DistributedDataManager.UDMF.Core -- * @crossplatform - * @since 11 - */ -+ /** -+ * Reference URL for the uniform data type, which describes the detail information of the type. -+ * -+ * @type { string } -+ * @readonly -+ * @syscap SystemCapability.DistributedDataManager.UDMF.Core -+ * @crossplatform -+ * @since 20 -+ */ - readonly referenceURL: string; - - /** -@@ -1888,9 +1927,17 @@ declare namespace uniformTypeDescriptor { - * @type { string } - * @readonly - * @syscap SystemCapability.DistributedDataManager.UDMF.Core -- * @crossplatform - * @since 11 - */ -+ /** -+ * Default icon file path for the uniform data type. -+ * -+ * @type { string } -+ * @readonly -+ * @syscap SystemCapability.DistributedDataManager.UDMF.Core -+ * @crossplatform -+ * @since 20 -+ */ - readonly iconFile: string; - - /** -@@ -1899,11 +1946,27 @@ declare namespace uniformTypeDescriptor { - * @type { Array } - * @readonly - * @syscap SystemCapability.DistributedDataManager.UDMF.Core -- * @crossplatform - * @since 12 - */ -+ /** -+ * File name extensions for the uniform data type. -+ * -+ * @type { Array } -+ * @readonly -+ * @syscap SystemCapability.DistributedDataManager.UDMF.Core -+ * @crossplatform -+ * @since 20 -+ */ - readonly filenameExtensions: Array; - -+ /** -+ * MIMETypes of the uniform data type. -+ * -+ * @type { Array } -+ * @readonly -+ * @syscap SystemCapability.DistributedDataManager.UDMF.Core -+ * @since 12 -+ */ - /** - * MIMETypes of the uniform data type. - * -@@ -1911,7 +1974,7 @@ declare namespace uniformTypeDescriptor { - * @readonly - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform -- * @since 12 -+ * @since 20 - */ - readonly mimeTypes: Array; - -@@ -1923,9 +1986,19 @@ declare namespace uniformTypeDescriptor { - * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; - *
2.Incorrect parameters types. - * @syscap SystemCapability.DistributedDataManager.UDMF.Core -- * @crossplatform - * @since 11 - */ -+ /** -+ * Checks whether the uniform data type belongs to the given uniform data type. -+ * -+ * @param { string } type - A uniform data type to be compared. -+ * @returns { boolean } Returns true if the data type belongs to the given data type, else false. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; -+ *
2.Incorrect parameters types. -+ * @syscap SystemCapability.DistributedDataManager.UDMF.Core -+ * @crossplatform -+ * @since 20 -+ */ - belongsTo(type: string): boolean; - - /** -@@ -1936,9 +2009,19 @@ declare namespace uniformTypeDescriptor { - * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; - *
2.Incorrect parameters types. - * @syscap SystemCapability.DistributedDataManager.UDMF.Core -- * @crossplatform - * @since 11 - */ -+ /** -+ * Checks whether the uniform data type is the lower level type of the given uniform data type. -+ * -+ * @param { string } type - A uniform data type to be compared. -+ * @returns { boolean } Returns true if the data type is the lower level type of the given data type, else false. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; -+ *
2.Incorrect parameters types. -+ * @syscap SystemCapability.DistributedDataManager.UDMF.Core -+ * @crossplatform -+ * @since 20 -+ */ - isLowerLevelType(type: string): boolean; - - /** -@@ -1949,9 +2032,19 @@ declare namespace uniformTypeDescriptor { - * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; - *
2.Incorrect parameters types. - * @syscap SystemCapability.DistributedDataManager.UDMF.Core -- * @crossplatform - * @since 11 - */ -+ /** -+ * Checks whether the uniform data type is the higher level type of the given uniform data type. -+ * -+ * @param { string } type - A uniform data type to be compared. -+ * @returns { boolean } Returns true if the data type is the higher level type of the given data type, else false. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; -+ *
2.Incorrect parameters types. -+ * @syscap SystemCapability.DistributedDataManager.UDMF.Core -+ * @crossplatform -+ * @since 20 -+ */ - isHigherLevelType(type: string): boolean; - - /** -@@ -1962,9 +2055,19 @@ declare namespace uniformTypeDescriptor { - * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; - *
2.Incorrect parameters types. - * @syscap SystemCapability.DistributedDataManager.UDMF.Core -- * @crossplatform - * @since 11 - */ -+ /** -+ * Checks whether the uniform type descriptor is equal to the given uniform type descriptor. -+ * -+ * @param { TypeDescriptor } typeDescriptor - A uniform type descriptor to be compared. -+ * @returns { boolean } Returns true if the type descriptor is equal to the given type descriptor, else false. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; -+ *
2.Incorrect parameters types. -+ * @syscap SystemCapability.DistributedDataManager.UDMF.Core -+ * @crossplatform -+ * @since 20 -+ */ - equals(typeDescriptor: TypeDescriptor): boolean; - } - -@@ -1977,9 +2080,20 @@ declare namespace uniformTypeDescriptor { - * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; - *
2.Incorrect parameters types. - * @syscap SystemCapability.DistributedDataManager.UDMF.Core -- * @crossplatform - * @since 11 - */ -+ /** -+ * Queries and returns the uniform type descriptor by the given uniform data type ID. -+ * -+ * @param { string } typeId - Uniform data type ID. -+ * @returns { TypeDescriptor } Returns the uniform type descriptor corresponding to the uniform data type ID or null -+ *
if the uniform data type does not exist. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; -+ *
2.Incorrect parameters types. -+ * @syscap SystemCapability.DistributedDataManager.UDMF.Core -+ * @crossplatform -+ * @since 20 -+ */ - function getTypeDescriptor(typeId: string): TypeDescriptor; - - /** -@@ -2024,9 +2138,21 @@ declare namespace uniformTypeDescriptor { - * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; - *
2.Incorrect parameters types. - * @syscap SystemCapability.DistributedDataManager.UDMF.Core -- * @crossplatform - * @since 11 - */ -+ /** -+ * Queries and returns the uniform type descriptor by the given MIME type and the uniform data type it belongs to. -+ * -+ * @param { string } mimeType - MIME type. -+ * @param { string } [belongsTo] - A uniform data type ID it belongs to. -+ * @returns { string } Returns the uniform data type ID corresponding to the given MIME type and the uniform data type -+ *
it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type does not exist. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; -+ *
2.Incorrect parameters types. -+ * @syscap SystemCapability.DistributedDataManager.UDMF.Core -+ * @crossplatform -+ * @since 20 -+ */ - function getUniformDataTypeByMIMEType(mimeType: string, belongsTo?: string): string; - - /** -@@ -2041,9 +2167,23 @@ declare namespace uniformTypeDescriptor { - * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; - *
2.Incorrect parameters types. - * @syscap SystemCapability.DistributedDataManager.UDMF.Core -- * @crossplatform - * @since 13 - */ -+ /** -+ * Queries and returns the uniform type descriptor list by the given filename extension and the uniform data type it -+ * belongs to. -+ * -+ * @param { string } filenameExtension - Filename extension. -+ * @param { string } [belongsTo] - A uniform data type ID it belongs to. -+ * @returns { Array } Returns the uniform data type ID list corresponding to the given filename extension and -+ * the uniform data type it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type -+ * does not exist. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; -+ *
2.Incorrect parameters types. -+ * @syscap SystemCapability.DistributedDataManager.UDMF.Core -+ * @crossplatform -+ * @since 20 -+ */ - function getUniformDataTypesByFilenameExtension(filenameExtension: string, belongsTo?: string): Array; - - /** -@@ -2058,9 +2198,23 @@ declare namespace uniformTypeDescriptor { - * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; - *
2.Incorrect parameters types. - * @syscap SystemCapability.DistributedDataManager.UDMF.Core -- * @crossplatform - * @since 13 - */ -+ /** -+ * Queries and returns the uniform type descriptor list by the given MIME type and the uniform data type it belongs -+ * to. -+ * -+ * @param { string } mimeType - MIME type. -+ * @param { string } [belongsTo] - A uniform data type ID it belongs to. -+ * @returns { Array } Returns the uniform data type ID list corresponding to the given MIME type and the -+ * uniform data type it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type does -+ * not exist. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; -+ *
2.Incorrect parameters types. -+ * @syscap SystemCapability.DistributedDataManager.UDMF.Core -+ * @crossplatform -+ * @since 20 -+ */ - function getUniformDataTypesByMIMEType(mimeType: string, belongsTo?: string): Array; - } - -diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts -index 34a0ed1d6..689c7e794 100644 ---- a/api/@ohos.request.d.ts -+++ b/api/@ohos.request.d.ts -@@ -283,7 +283,7 @@ declare namespace request { - - /** - * Error code 7 - Indicates an HTTP code that cannot be identified. -- * @crossplatform -+ * - * @syscap SystemCapability.MiscServices.Download - * @since 7 - */ -@@ -1984,9 +1984,18 @@ declare namespace request { - * - * @type { ?number } - * @syscap SystemCapability.MiscServices.Upload -- * @crossplatform - * @since 11 - */ -+ /** -+ * The index of paths for a task. -+ * Usually used for a continuous job. -+ * The default is 0. -+ * -+ * @type { ?number } -+ * @syscap SystemCapability.MiscServices.Upload -+ * @crossplatform -+ * @since 20 -+ */ - index?: number; - /** - * The start point of a file. -@@ -1996,9 +2005,19 @@ declare namespace request { - * - * @type { ?number } - * @syscap SystemCapability.MiscServices.Upload -- * @crossplatform - * @since 11 - */ -+ /** -+ * The start point of a file. -+ * Usually used for a continuous job. -+ * It will start read at the point in upload. -+ * The default is 0. -+ * -+ * @type { ?number } -+ * @syscap SystemCapability.MiscServices.Upload -+ * @crossplatform -+ * @since 20 -+ */ - begins?: number; - /** - * The end point of a file. -@@ -2008,9 +2027,19 @@ declare namespace request { - * - * @type { ?number } - * @syscap SystemCapability.MiscServices.Upload -- * @crossplatform - * @since 11 - */ -+ /** -+ * The end point of a file. -+ * Usually used for a continuous job. -+ * It will end read at the point in upload. -+ * The default is -1 indicating the end of the data for upload. -+ * -+ * @type { ?number } -+ * @syscap SystemCapability.MiscServices.Upload -+ * @crossplatform -+ * @since 20 -+ */ - ends?: number; - /** - * A list of files to be uploaded. Please use multipart/form-data to submit. -@@ -2665,9 +2694,16 @@ declare namespace request { - * - * @enum { string } BroadcastEvent - * @syscap SystemCapability.Request.FileTransferAgent -- * @crossplatform - * @since 11 - */ -+ /** -+ * Broadcast events for the request. -+ * -+ * @enum { string } BroadcastEvent -+ * @syscap SystemCapability.Request.FileTransferAgent -+ * @crossplatform -+ * @since 20 -+ */ - enum BroadcastEvent { - /** - * Completion event for the task. -@@ -2675,9 +2711,17 @@ declare namespace request { - * The data in the commonEventData contains the id of the task. - * - * @syscap SystemCapability.Request.FileTransferAgent -- * @crossplatform - * @since 11 - */ -+ /** -+ * Completion event for the task. -+ * The code in the commonEventData can only be "0x40"(COMPLETE) or "0x41"(FAILED), same as "State". -+ * The data in the commonEventData contains the id of the task. -+ * -+ * @syscap SystemCapability.Request.FileTransferAgent -+ * @crossplatform -+ * @since 20 -+ */ - COMPLETE = 'ohos.request.event.COMPLETE' - } - -@@ -3344,9 +3388,18 @@ declare namespace request { - * - * @type { ?string } - * @syscap SystemCapability.Request.FileTransferAgent -- * @crossplatform - * @since 12 - */ -+ /** -+ * The proxy url for the task. -+ * Only this format is supported: http://: -+ * Username and password are not supported. -+ * -+ * @type { ?string } -+ * @syscap SystemCapability.Request.FileTransferAgent -+ * @crossplatform -+ * @since 20 -+ */ - proxy?: string; - /** - * The index of paths for a task. -@@ -4500,6 +4553,7 @@ declare namespace request { - * - * @interface HttpResponse - * @syscap SystemCapability.Request.FileTransferAgent -+ * @atomicservice - * @since 12 - */ - /** -@@ -4520,6 +4574,7 @@ declare namespace request { - * @type { string } - * @readonly - * @syscap SystemCapability.Request.FileTransferAgent -+ * @atomicservice - * @since 12 - */ - /** -@@ -4540,6 +4595,7 @@ declare namespace request { - * @type { number } - * @readonly - * @syscap SystemCapability.Request.FileTransferAgent -+ * @atomicservice - * @since 12 - */ - /** -@@ -4560,6 +4616,7 @@ declare namespace request { - * @type { string } - * @readonly - * @syscap SystemCapability.Request.FileTransferAgent -+ * @atomicservice - * @since 12 - */ - /** -@@ -4580,10 +4637,19 @@ declare namespace request { - * @type { Map> } - * @readonly - * @syscap SystemCapability.Request.FileTransferAgent -- * @crossplatform - * @atomicservice - * @since 12 - */ -+ /** -+ * The headers of the HTTP response. -+ * -+ * @type { Map> } -+ * @readonly -+ * @syscap SystemCapability.Request.FileTransferAgent -+ * @crossplatform -+ * @atomicservice -+ * @since 20 -+ */ - readonly headers: Map>, - } - -@@ -4857,9 +4923,20 @@ declare namespace request { - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. - *
2. Incorrect parameter type. 3. Parameter verification failed. - * @syscap SystemCapability.Request.FileTransferAgent -- * @crossplatform - * @since 11 - */ -+ /** -+ * Enables the specified callback. -+ * Subscribes to task pause events. -+ * -+ * @param { 'pause' } event - event types. -+ * @param { function } callback - callback function with a `Progress` argument. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. -+ *
2. Incorrect parameter type. 3. Parameter verification failed. -+ * @syscap SystemCapability.Request.FileTransferAgent -+ * @crossplatform -+ * @since 20 -+ */ - on(event: 'pause', callback: (progress: Progress) => void): void; - /** - * Disables the specified callback. -@@ -4870,9 +4947,20 @@ declare namespace request { - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. - *
2. Incorrect parameter type. 3. Parameter verification failed. - * @syscap SystemCapability.Request.FileTransferAgent -- * @crossplatform - * @since 11 - */ -+ /** -+ * Disables the specified callback. -+ * Unsubscribes from the foreground task pause event. -+ * -+ * @param { 'pause' } event - event types. -+ * @param { function } callback - callback function with a `Progress` argument. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. -+ *
2. Incorrect parameter type. 3. Parameter verification failed. -+ * @syscap SystemCapability.Request.FileTransferAgent -+ * @crossplatform -+ * @since 20 -+ */ - off(event: 'pause', callback?: (progress: Progress) => void): void; - /** - * Enables the specified callback. -@@ -4883,9 +4971,20 @@ declare namespace request { - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. - *
2. Incorrect parameter type. 3. Parameter verification failed. - * @syscap SystemCapability.Request.FileTransferAgent -- * @crossplatform - * @since 11 - */ -+ /** -+ * Enables the specified callback. -+ * Subscribes to task resume events. -+ * -+ * @param { 'resume' } event - event types. -+ * @param { function } callback - callback function with a `Progress` argument. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. -+ *
2. Incorrect parameter type. 3. Parameter verification failed. -+ * @syscap SystemCapability.Request.FileTransferAgent -+ * @crossplatform -+ * @since 20 -+ */ - on(event: 'resume', callback: (progress: Progress) => void): void; - /** - * Disables the specified callback. -@@ -4896,9 +4995,20 @@ declare namespace request { - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. - *
2. Incorrect parameter type. 3. Parameter verification failed. - * @syscap SystemCapability.Request.FileTransferAgent -- * @crossplatform - * @since 11 - */ -+ /** -+ * Disables the specified callback. -+ * Unsubscribes from the foreground task resume event. -+ * -+ * @param { 'resume' } event - event types. -+ * @param { function } callback - callback function with a `Progress` argument. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. -+ *
2. Incorrect parameter type. 3. Parameter verification failed. -+ * @syscap SystemCapability.Request.FileTransferAgent -+ * @crossplatform -+ * @since 20 -+ */ - off(event: 'resume', callback?: (progress: Progress) => void): void; - /** - * Enables the specified callback. -@@ -4909,9 +5019,20 @@ declare namespace request { - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. - *
2. Incorrect parameter type. 3. Parameter verification failed. - * @syscap SystemCapability.Request.FileTransferAgent -- * @crossplatform - * @since 11 - */ -+ /** -+ * Enables the specified callback. -+ * Subscribes to task removal events. -+ * -+ * @param { 'remove' } event - event types. -+ * @param { function } callback - callback function with a `Progress` argument. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. -+ *
2. Incorrect parameter type. 3. Parameter verification failed. -+ * @syscap SystemCapability.Request.FileTransferAgent -+ * @crossplatform -+ * @since 20 -+ */ - on(event: 'remove', callback: (progress: Progress) => void): void; - /** - * Disables the specified callback. -@@ -4922,9 +5043,20 @@ declare namespace request { - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. - *
2. Incorrect parameter type. 3. Parameter verification failed. - * @syscap SystemCapability.Request.FileTransferAgent -- * @crossplatform - * @since 11 - */ -+ /** -+ * Disables the specified callback. -+ * Unsubscribes from the task removal event. -+ * -+ * @param { 'remove' } event - event types. -+ * @param { function } callback - callback function with a `Progress` argument. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. -+ *
2. Incorrect parameter type. 3. Parameter verification failed. -+ * @syscap SystemCapability.Request.FileTransferAgent -+ * @crossplatform -+ * @since 20 -+ */ - off(event: 'remove', callback?: (progress: Progress) => void): void; - /** - * Enables the response callback. -@@ -4935,6 +5067,7 @@ declare namespace request { - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. - *
2. Incorrect parameter type. 3. Parameter verification failed. - * @syscap SystemCapability.Request.FileTransferAgent -+ * @atomicservice - * @since 12 - */ - /** -@@ -4961,10 +5094,22 @@ declare namespace request { - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. - *
2. Incorrect parameter type. 3. Parameter verification failed. - * @syscap SystemCapability.Request.FileTransferAgent -- * @crossplatform - * @atomicservice - * @since 12 - */ -+ /** -+ * Disables the response callback. -+ * Unsubscribes from task response headers. -+ * -+ * @param { 'response' } event - event types. -+ * @param { Callback } callback - callback function with an `HttpResponse` argument. -+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. -+ *
2. Incorrect parameter type. 3. Parameter verification failed. -+ * @syscap SystemCapability.Request.FileTransferAgent -+ * @crossplatform -+ * @atomicservice -+ * @since 20 -+ */ - off(event: 'response', callback?: Callback): void; - /** - * Enables the 'faultOccur' callback. -@@ -5113,9 +5258,18 @@ declare namespace request { - * @throws { BusinessError } 13400003 - Task service ability error. - * @throws { BusinessError } 21900007 - Operation with wrong task state. - * @syscap SystemCapability.Request.FileTransferAgent -- * @crossplatform - * @since 11 - */ -+ /** -+ * Pauses a task that is waiting, running, or retrying. -+ * -+ * @param { AsyncCallback } callback - callback function with a boolean argument indicating the calling result. -+ * @throws { BusinessError } 13400003 - Task service ability error. -+ * @throws { BusinessError } 21900007 - Operation with wrong task state. -+ * @syscap SystemCapability.Request.FileTransferAgent -+ * @crossplatform -+ * @since 20 -+ */ - pause(callback: AsyncCallback): void; - /** - * Pauses the background task. -@@ -5134,9 +5288,18 @@ declare namespace request { - * @throws { BusinessError } 13400003 - Task service ability error. - * @throws { BusinessError } 21900007 - Operation with wrong task state. - * @syscap SystemCapability.Request.FileTransferAgent -- * @crossplatform - * @since 11 - */ -+ /** -+ * Pauses a task that is waiting, running, or retrying. -+ * -+ * @returns { Promise } the promise returned by the function. -+ * @throws { BusinessError } 13400003 - Task service ability error. -+ * @throws { BusinessError } 21900007 - Operation with wrong task state. -+ * @syscap SystemCapability.Request.FileTransferAgent -+ * @crossplatform -+ * @since 20 -+ */ - pause(): Promise; - /** - * Resumes the background task. -@@ -5159,9 +5322,20 @@ declare namespace request { - * @throws { BusinessError } 13400003 - Task service ability error. - * @throws { BusinessError } 21900007 - Operation with wrong task state. - * @syscap SystemCapability.Request.FileTransferAgent -- * @crossplatform - * @since 11 - */ -+ /** -+ * Resumes a paused task. -+ * -+ * @permission ohos.permission.INTERNET -+ * @param { AsyncCallback } callback - callback function with a boolean argument indicating the calling result. -+ * @throws { BusinessError } 201 - Permission denied. -+ * @throws { BusinessError } 13400003 - Task service ability error. -+ * @throws { BusinessError } 21900007 - Operation with wrong task state. -+ * @syscap SystemCapability.Request.FileTransferAgent -+ * @crossplatform -+ * @since 20 -+ */ - resume(callback: AsyncCallback): void; - /** - * Resumes the background task. -@@ -5184,9 +5358,20 @@ declare namespace request { - * @throws { BusinessError } 13400003 - Task service ability error. - * @throws { BusinessError } 21900007 - Operation with wrong task state. - * @syscap SystemCapability.Request.FileTransferAgent -- * @crossplatform - * @since 11 - */ -+ /** -+ * Resumes a paused task. -+ * -+ * @permission ohos.permission.INTERNET -+ * @returns { Promise } the promise returned by the function. -+ * @throws { BusinessError } 201 - Permission denied. -+ * @throws { BusinessError } 13400003 - Task service ability error. -+ * @throws { BusinessError } 21900007 - Operation with wrong task state. -+ * @syscap SystemCapability.Request.FileTransferAgent -+ * @crossplatform -+ * @since 20 -+ */ - resume(): Promise; - /** - * Stop a running, waiting, or retrying task. -- Gitee