diff --git a/api/@ohos.data.preferences.d.ts b/api/@ohos.data.preferences.d.ts index 686904d792a832c88ddb2c8af73a3909dcddf660..37ac09b9e68e550f12da2263980bf976ac370226 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 @@ -1910,6 +1910,22 @@ declare namespace preferences { * @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; /** @@ -1991,6 +2007,21 @@ declare namespace preferences { * @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 efb9c046112600a407a2df5b232dd732eb6d1e4b..ef63edae9b30cad578cf17ec50ba10584229fa53 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,7 +425,16 @@ declare namespace relationalStore { * * @type { ?boolean } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 12 + */ + /** + * 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 + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ isReadOnly?: boolean; @@ -528,7 +537,15 @@ declare namespace relationalStore { * * @typedef CryptoParam * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 14 + */ + /** + * Specifies the cryptographic parameters used when opening an encrypted database. + * + * @typedef CryptoParam + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ interface CryptoParam { @@ -538,7 +555,16 @@ declare namespace relationalStore { * * @type { Uint8Array } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} + * @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. + * + * @type { Uint8Array } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ encryptionKey: Uint8Array; @@ -550,7 +576,17 @@ declare namespace relationalStore { * * @type { ?number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 14 + */ + /** + * 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 + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ iterationCount?: number; @@ -561,7 +597,16 @@ declare namespace relationalStore { * * @type { ?EncryptionAlgo } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 14 + */ + /** + * Specifies the encryption algorithm when opening an encrypted database. + * Default encryption algorithm is AES_256_GCM. + * + * @type { ?EncryptionAlgo } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ encryptionAlgo?: EncryptionAlgo; @@ -572,7 +617,16 @@ declare namespace relationalStore { * * @type { ?HmacAlgo } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 14 + */ + /** + * Specifies the HMAC algorithm when opening an encrypted database. + * Default HMAC algorithm is SHA256. + * + * @type { ?HmacAlgo } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ hmacAlgo?: HmacAlgo; @@ -583,7 +637,16 @@ declare namespace relationalStore { * * @type { ?KdfAlgo } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 14 + */ + /** + * 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 + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ kdfAlgo?: KdfAlgo; @@ -594,7 +657,16 @@ declare namespace relationalStore { * * @type { ?number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 14 + */ + /** + * Specifies the page size used when opening an encrypted database. + * Default crypto page size is 1024. + * + * @type { ?number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ cryptoPageSize?: number; @@ -633,7 +705,15 @@ declare namespace relationalStore { * * @enum { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 14 + */ + /** + * Enumerates the supported HMAC algorithm when opening a database. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ enum HmacAlgo { @@ -641,7 +721,14 @@ declare namespace relationalStore { * SHA1: HMAC_SHA1 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 14 + */ + /** + * SHA1: HMAC_SHA1 algorithm. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ SHA1 = 0, @@ -650,7 +737,14 @@ declare namespace relationalStore { * SHA256: HMAC_SHA256 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 14 + */ + /** + * SHA256: HMAC_SHA256 algorithm. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ SHA256, @@ -659,7 +753,14 @@ declare namespace relationalStore { * SHA512: HMAC_SHA512 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 14 + */ + /** + * SHA512: HMAC_SHA512 algorithm. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ SHA512 @@ -670,7 +771,15 @@ declare namespace relationalStore { * * @enum { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 14 + */ + /** + * Enumerates the supported KDF algorithm when opening a database. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ enum KdfAlgo { @@ -678,7 +787,14 @@ declare namespace relationalStore { * KDF_SHA1: PBKDF2_HMAC_SHA1 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 14 + */ + /** + * KDF_SHA1: PBKDF2_HMAC_SHA1 algorithm. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ KDF_SHA1 = 0, @@ -687,7 +803,14 @@ declare namespace relationalStore { * KDF_SHA256: PBKDF2_HMAC_SHA256 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 14 + */ + /** + * KDF_SHA256: PBKDF2_HMAC_SHA256 algorithm. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ KDF_SHA256, @@ -696,7 +819,14 @@ declare namespace relationalStore { * KDF_SHA512: PBKDF2_HMAC_SHA512 algorithm. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} + * @since 14 + */ + /** + * KDF_SHA512: PBKDF2_HMAC_SHA512 algorithm. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ KDF_SHA512 @@ -1554,6 +1684,14 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.CloudSync.Client * @since 11 */ + /** + * Enumerates the field. + * + * @enum { string } + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ enum Field { /** * Cursor field. @@ -1561,6 +1699,13 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.CloudSync.Client * @since 11 */ + /** + * Cursor field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ CURSOR_FIELD = '#_cursor', /** @@ -1569,6 +1714,13 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.CloudSync.Client * @since 11 */ + /** + * Origin field. For details, see {@link Origin}. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ ORIGIN_FIELD = '#_origin', /** @@ -1578,6 +1730,14 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.CloudSync.Client * @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', /** @@ -1587,6 +1747,14 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.CloudSync.Client * @since 12 */ + /** + * Data status field. + * Indicates data status. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ DATA_STATUS_FIELD = '#_data_status', /** @@ -1595,6 +1763,13 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.CloudSync.Client * @since 11 */ + /** + * Owner field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ OWNER_FIELD = '#_cloud_owner', /** @@ -1603,6 +1778,13 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.CloudSync.Client * @since 11 */ + /** + * Privilege field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ PRIVILEGE_FIELD = '#_cloud_privilege', /** @@ -1611,6 +1793,13 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.CloudSync.Client * @since 11 */ + /** + * Sharing resource field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 20 + */ SHARING_RESOURCE_FIELD = '#_sharing_resource_field' } @@ -2566,6 +2755,20 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @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; /** @@ -2581,6 +2784,20 @@ declare namespace relationalStore { * @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. + * 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; /** @@ -3693,6 +3910,41 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @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; /** @@ -4359,6 +4611,40 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @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; /** @@ -7736,6 +8022,20 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @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; /** @@ -7967,6 +8267,16 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @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; /** @@ -8743,6 +9053,35 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @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 5d1d9c4a1cf9903445f02b2bc47656392d46925c..6d5bc0f67b5f99461627c0164650de1f391b56c1 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 @@ -1836,6 +1836,14 @@ declare namespace uniformTypeDescriptor { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @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}. @@ -1845,6 +1853,15 @@ declare namespace uniformTypeDescriptor { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @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,6 +1872,15 @@ declare namespace uniformTypeDescriptor { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @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; /** @@ -1865,6 +1891,15 @@ declare namespace uniformTypeDescriptor { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 11 */ + /** + * A textual description for the uniform data type. + * + * @type { string } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ readonly description: string; /** @@ -1875,6 +1910,15 @@ declare namespace uniformTypeDescriptor { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @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; /** @@ -1885,6 +1929,15 @@ declare namespace uniformTypeDescriptor { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @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; /** @@ -1895,9 +1948,18 @@ declare namespace uniformTypeDescriptor { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @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 } @@ -1905,6 +1967,15 @@ declare namespace uniformTypeDescriptor { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 12 */ + /** + * MIMETypes of the uniform data type. + * + * @type { Array } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + */ readonly mimeTypes: Array; /** @@ -1917,6 +1988,17 @@ declare namespace uniformTypeDescriptor { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @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; /** @@ -1929,6 +2011,17 @@ declare namespace uniformTypeDescriptor { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @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; /** @@ -1941,6 +2034,17 @@ declare namespace uniformTypeDescriptor { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @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; /** @@ -1953,6 +2057,17 @@ declare namespace uniformTypeDescriptor { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @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; } @@ -1967,6 +2082,18 @@ declare namespace uniformTypeDescriptor { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @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; /** @@ -1981,7 +2108,22 @@ 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 arkts {'1.1':'11', '1.2':'20'} + * @since 11 + */ + /** + * 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 + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ function getUniformDataTypeByFilenameExtension(filenameExtension: string, belongsTo?: string): string; @@ -1998,6 +2140,19 @@ declare namespace uniformTypeDescriptor { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @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; /** @@ -2014,6 +2169,21 @@ declare namespace uniformTypeDescriptor { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @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; /** @@ -2030,6 +2200,21 @@ declare namespace uniformTypeDescriptor { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @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 082e31d35afa05f0dae9ad9f30a7f0564baba2a0..689c7e7949dc52c00aa75a1417f326d32f65f723 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 @@ -1986,6 +1986,16 @@ declare namespace request { * @syscap SystemCapability.MiscServices.Upload * @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. @@ -1997,6 +2007,17 @@ declare namespace request { * @syscap SystemCapability.MiscServices.Upload * @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,6 +2029,17 @@ declare namespace request { * @syscap SystemCapability.MiscServices.Upload * @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. @@ -2664,6 +2696,14 @@ declare namespace request { * @syscap SystemCapability.Request.FileTransferAgent * @since 11 */ + /** + * Broadcast events for the request. + * + * @enum { string } BroadcastEvent + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @since 20 + */ enum BroadcastEvent { /** * Completion event for the task. @@ -2673,6 +2713,15 @@ declare namespace request { * @syscap SystemCapability.Request.FileTransferAgent * @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' } @@ -3341,6 +3390,16 @@ declare namespace request { * @syscap SystemCapability.Request.FileTransferAgent * @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. @@ -4495,7 +4554,17 @@ declare namespace request { * @interface HttpResponse * @syscap SystemCapability.Request.FileTransferAgent * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 12 + */ + /** + * The HTTP response. + * Describes the data structure of the task response header. + * + * @interface HttpResponse + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @atomicservice + * @since 20 * @arkts 1.1&1.2 */ interface HttpResponse { @@ -4506,7 +4575,17 @@ declare namespace request { * @readonly * @syscap SystemCapability.Request.FileTransferAgent * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 12 + */ + /** + * The version of the HTTP response. + * + * @type { string } + * @readonly + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @atomicservice + * @since 20 * @arkts 1.1&1.2 */ readonly version: string, @@ -4517,7 +4596,17 @@ declare namespace request { * @readonly * @syscap SystemCapability.Request.FileTransferAgent * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 12 + */ + /** + * The status code of the HTTP response. + * + * @type { number } + * @readonly + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @atomicservice + * @since 20 * @arkts 1.1&1.2 */ readonly statusCode: number, @@ -4528,7 +4617,17 @@ declare namespace request { * @readonly * @syscap SystemCapability.Request.FileTransferAgent * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 12 + */ + /** + * The reason of the HTTP response. + * + * @type { string } + * @readonly + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @atomicservice + * @since 20 * @arkts 1.1&1.2 */ readonly reason: string, @@ -4541,6 +4640,16 @@ declare namespace request { * @atomicservice * @since 12 */ + /** + * The headers of the HTTP response. + * + * @type { Map> } + * @readonly + * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform + * @atomicservice + * @since 20 + */ readonly headers: Map>, } @@ -4816,6 +4925,18 @@ declare namespace request { * @syscap SystemCapability.Request.FileTransferAgent * @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. @@ -4828,6 +4949,18 @@ declare namespace request { * @syscap SystemCapability.Request.FileTransferAgent * @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. @@ -4840,6 +4973,18 @@ declare namespace request { * @syscap SystemCapability.Request.FileTransferAgent * @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. @@ -4852,6 +4997,18 @@ declare namespace request { * @syscap SystemCapability.Request.FileTransferAgent * @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. @@ -4864,6 +5021,18 @@ declare namespace request { * @syscap SystemCapability.Request.FileTransferAgent * @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. @@ -4876,6 +5045,18 @@ declare namespace request { * @syscap SystemCapability.Request.FileTransferAgent * @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. @@ -4887,7 +5068,20 @@ declare namespace request { *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @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 * @arkts 1.1&1.2 */ on(event: 'response', callback: Callback): void; @@ -4903,6 +5097,19 @@ declare namespace request { * @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. @@ -5053,6 +5260,16 @@ declare namespace request { * @syscap SystemCapability.Request.FileTransferAgent * @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. @@ -5073,6 +5290,16 @@ declare namespace request { * @syscap SystemCapability.Request.FileTransferAgent * @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. @@ -5097,6 +5324,18 @@ declare namespace request { * @syscap SystemCapability.Request.FileTransferAgent * @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. @@ -5121,6 +5360,18 @@ declare namespace request { * @syscap SystemCapability.Request.FileTransferAgent * @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.