From 86f5306cebc00da0a5caa69e9923c9b093fc23ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=AD=90=E6=9D=8E?= Date: Sat, 2 Aug 2025 10:56:32 +0800 Subject: [PATCH 1/7] overload sdk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 木子李 --- api/@ohos.data.unifiedDataChannel.d.ts | 157 ++++++++++++++++++++++--- 1 file changed, 141 insertions(+), 16 deletions(-) diff --git a/api/@ohos.data.unifiedDataChannel.d.ts b/api/@ohos.data.unifiedDataChannel.d.ts index f7137aba69..3e45290159 100644 --- a/api/@ohos.data.unifiedDataChannel.d.ts +++ b/api/@ohos.data.unifiedDataChannel.d.ts @@ -219,8 +219,7 @@ declare namespace unifiedDataChannel { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ constructor(record: UnifiedRecord); /** @@ -236,10 +235,40 @@ declare namespace unifiedDataChannel { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 + */ + constructor(); + + /** + * @since 20 + * @arkts 1.2 + */ + overload constructor { ctorWithArgs }; + + /** + * Create a empty unified data. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 */ constructor(); + + /** + * Create unified data with a record + * + * @param { UnifiedRecord } record - Record will add into unified data. + * @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.2 + */ + constructor ctorWithArgs(record: UnifiedRecord); + + /** * Add a record into unified data * @@ -472,8 +501,7 @@ declare namespace unifiedDataChannel { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ constructor(); @@ -502,10 +530,43 @@ declare namespace unifiedDataChannel { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ constructor(type: string, value: ValueType); + + /** + * @since 20 + * @arkts 1.2 + */ + overload constructor { ctorWithArgs }; + + /** + * Create unified record. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(); + + /** + * Create unified record by type and value. + * + * @param { string } type - indicates to data type of unified record. It can not be empty. When type of value is + * object, parameter type must be pixel-map or want UTD type. + * @param { ValueType } value - indicates to value of unified record. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types; + *
3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + constructor ctorWithArgs(type: string, value: ValueType); + /** * Get the value of unified record. @@ -3575,6 +3636,39 @@ declare namespace unifiedDataChannel { */ dataLoadInfo: DataLoadInfo; } + /** + * @since 20 + * @arkts 1.2 + */ + overload insertData { insertDataWithCallback, insertDataReturnsPromise }; + + /** + * Insert data into unified data channel by Intention + * + * @param { Options } options - fill the intention field to indicate the target {@link Intention}. + * @param { UnifiedData } data - {@link UnifiedData} data object to insert into target intention. + * @param { AsyncCallback } callback - {string}: the unique identifier. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + function insertDataWithCallback(options: Options, data: UnifiedData, callback: AsyncCallback): void; + + /** + * Insert data into unified data channel by Intention + * + * @param { Options } options - fill the intention field to indicate the target {@link Intention}. + * @param { UnifiedData } data - {@link UnifiedData} data object to insert into target intention. + * @returns { Promise } {string}: the unique identifier. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + function insertDataReturnsPromise(options: Options, data: UnifiedData): Promise; /** * Insert data into unified data channel by Intention @@ -3597,8 +3691,7 @@ declare namespace unifiedDataChannel { *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ function insertData(options: Options, data: UnifiedData, callback: AsyncCallback): void; @@ -3623,8 +3716,7 @@ declare namespace unifiedDataChannel { *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ function insertData(options: Options, data: UnifiedData): Promise; @@ -3678,6 +3770,41 @@ declare namespace unifiedDataChannel { */ function updateData(options: Options, data: UnifiedData): Promise; + /** + * @since 20 + * @arkts 1.2 + */ + overload queryData { queryDataWithCallback, queryDataReturnsPromise }; + + /** + * Query data of unified data channel by Intention or Unique Identifier + * + * @param { Options } options - fill the intention or unique identifier field to indicate the target {@link Intention} + * or {@link UnifiedData}. + * @param { AsyncCallback> } callback - {Array}: the target {@link UnifiedData} object + * array. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + function queryDataWithCallback(options: Options, callback: AsyncCallback>): void; + + /** + * Query data of unified data channel by Intention or Unique Identifier + * + * @param { Options } options - fill the intention or unique identifier field to indicate the target {@link Intention} + * or {@link UnifiedData}. + * @returns { Promise> } {Array}: the target {@link UnifiedData} object array. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + function queryDataReturnsPromise(options: Options): Promise>; + /** * Query data of unified data channel by Intention or Unique Identifier * @@ -3701,8 +3828,7 @@ declare namespace unifiedDataChannel { *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ function queryData(options: Options, callback: AsyncCallback>): void; @@ -3727,8 +3853,7 @@ declare namespace unifiedDataChannel { *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ function queryData(options: Options): Promise>; -- Gitee From eaf9ecc0d53f6f908ee753ba30c8c2a07b369123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=AD=90=E6=9D=8E?= Date: Sat, 2 Aug 2025 11:00:55 +0800 Subject: [PATCH 2/7] overload sdk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 木子李 --- api/@ohos.data.unifiedDataChannel.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/api/@ohos.data.unifiedDataChannel.d.ts b/api/@ohos.data.unifiedDataChannel.d.ts index 3e45290159..ab90efde78 100644 --- a/api/@ohos.data.unifiedDataChannel.d.ts +++ b/api/@ohos.data.unifiedDataChannel.d.ts @@ -3636,6 +3636,7 @@ declare namespace unifiedDataChannel { */ dataLoadInfo: DataLoadInfo; } + /** * @since 20 * @arkts 1.2 -- Gitee From 270d60b44ab753cef6bbd23fff968f658332f7f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=AD=90=E6=9D=8E?= Date: Sat, 2 Aug 2025 17:18:46 +0800 Subject: [PATCH 3/7] overload sdk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 木子李 --- api/@ohos.data.unifiedDataChannel.d.ts | 69 +++++++++++++------------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/api/@ohos.data.unifiedDataChannel.d.ts b/api/@ohos.data.unifiedDataChannel.d.ts index ab90efde78..9d149b2c31 100644 --- a/api/@ohos.data.unifiedDataChannel.d.ts +++ b/api/@ohos.data.unifiedDataChannel.d.ts @@ -222,6 +222,20 @@ declare namespace unifiedDataChannel { * @since 14 */ constructor(record: UnifiedRecord); + + /** + * Create unified data with a record + * + * @param { UnifiedRecord } record - Record will add into unified data. + * @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.2 + */ + constructor ctorWithArgs(record: UnifiedRecord); + /** * Create a empty unified data. * @@ -239,12 +253,6 @@ declare namespace unifiedDataChannel { */ constructor(); - /** - * @since 20 - * @arkts 1.2 - */ - overload constructor { ctorWithArgs }; - /** * Create a empty unified data. * @@ -256,18 +264,10 @@ declare namespace unifiedDataChannel { constructor(); /** - * Create unified data with a record - * - * @param { UnifiedRecord } record - Record will add into unified data. - * @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.2 */ - constructor ctorWithArgs(record: UnifiedRecord); - + overload constructor { ctorWithArgs }; /** * Add a record into unified data @@ -505,6 +505,17 @@ declare namespace unifiedDataChannel { */ constructor(); + /** + * Create unified record. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(); + /** * Create unified record by type and value. * @@ -533,23 +544,6 @@ declare namespace unifiedDataChannel { * @since 14 */ constructor(type: string, value: ValueType); - - /** - * @since 20 - * @arkts 1.2 - */ - overload constructor { ctorWithArgs }; - - /** - * Create unified record. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - constructor(); /** * Create unified record by type and value. @@ -566,7 +560,12 @@ declare namespace unifiedDataChannel { * @arkts 1.2 */ constructor ctorWithArgs(type: string, value: ValueType); - + + /** + * @since 20 + * @arkts 1.2 + */ + overload constructor { fromParams }; /** * Get the value of unified record. @@ -3636,7 +3635,6 @@ declare namespace unifiedDataChannel { */ dataLoadInfo: DataLoadInfo; } - /** * @since 20 * @arkts 1.2 @@ -3802,7 +3800,8 @@ declare namespace unifiedDataChannel { *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 11 + * @since 20 + * @arkts 1.2 */ function queryDataReturnsPromise(options: Options): Promise>; -- Gitee From f01e065c11fadf3811666269f5ac1a817172a6dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=AD=90=E6=9D=8E?= Date: Sat, 2 Aug 2025 17:20:05 +0800 Subject: [PATCH 4/7] overload sdk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 木子李 --- api/@ohos.data.unifiedDataChannel.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/api/@ohos.data.unifiedDataChannel.d.ts b/api/@ohos.data.unifiedDataChannel.d.ts index 9d149b2c31..1ee7c68088 100644 --- a/api/@ohos.data.unifiedDataChannel.d.ts +++ b/api/@ohos.data.unifiedDataChannel.d.ts @@ -510,7 +510,6 @@ declare namespace unifiedDataChannel { * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform - * @atomicservice * @since 20 * @arkts 1.2 */ -- Gitee From cd863b4190afe0d54e0ce2fd560fc9521ec99406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=AD=90=E6=9D=8E?= Date: Sat, 2 Aug 2025 17:21:01 +0800 Subject: [PATCH 5/7] overload sdk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 木子李 --- api/@ohos.data.unifiedDataChannel.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/api/@ohos.data.unifiedDataChannel.d.ts b/api/@ohos.data.unifiedDataChannel.d.ts index 1ee7c68088..594aa2ba2a 100644 --- a/api/@ohos.data.unifiedDataChannel.d.ts +++ b/api/@ohos.data.unifiedDataChannel.d.ts @@ -3798,7 +3798,6 @@ declare namespace unifiedDataChannel { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice * @since 20 * @arkts 1.2 */ -- Gitee From f5628991b5c2a1b1cea4701ef9d94db07637b174 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=AD=90=E6=9D=8E?= Date: Sat, 2 Aug 2025 17:52:02 +0800 Subject: [PATCH 6/7] overload sdk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 木子李 --- api/@ohos.data.unifiedDataChannel.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.data.unifiedDataChannel.d.ts b/api/@ohos.data.unifiedDataChannel.d.ts index 594aa2ba2a..5ff6ee8185 100644 --- a/api/@ohos.data.unifiedDataChannel.d.ts +++ b/api/@ohos.data.unifiedDataChannel.d.ts @@ -564,7 +564,7 @@ declare namespace unifiedDataChannel { * @since 20 * @arkts 1.2 */ - overload constructor { fromParams }; + overload constructor { ctorWithArgs }; /** * Get the value of unified record. -- Gitee From ae08a6a05348184a353afd68b826201eb2d8c097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=AD=90=E6=9D=8E?= Date: Wed, 6 Aug 2025 09:28:30 +0800 Subject: [PATCH 7/7] fix overload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 木子李 --- api/@ohos.data.unifiedDataChannel.d.ts | 137 ++++++++++--------------- 1 file changed, 57 insertions(+), 80 deletions(-) diff --git a/api/@ohos.data.unifiedDataChannel.d.ts b/api/@ohos.data.unifiedDataChannel.d.ts index 5ff6ee8185..f111323a3f 100644 --- a/api/@ohos.data.unifiedDataChannel.d.ts +++ b/api/@ohos.data.unifiedDataChannel.d.ts @@ -230,11 +230,10 @@ declare namespace unifiedDataChannel { * @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.2 */ - constructor ctorWithArgs(record: UnifiedRecord); + constructor ctorWithRecord(record: UnifiedRecord); /** * Create a empty unified data. @@ -249,25 +248,15 @@ declare namespace unifiedDataChannel { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice - * @since 14 - */ - constructor(); - - /** - * Create a empty unified data. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @since 20 - * @arkts 1.2 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); /** - * @since 20 * @arkts 1.2 */ - overload constructor { ctorWithArgs }; + overload constructor { ctorWithRecord }; /** * Add a record into unified data @@ -501,17 +490,8 @@ declare namespace unifiedDataChannel { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice - * @since 14 - */ - constructor(); - - /** - * Create unified record. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @since 20 - * @arkts 1.2 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -554,17 +534,15 @@ declare namespace unifiedDataChannel { *
2.Incorrect parameters types; *
3.Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ - constructor ctorWithArgs(type: string, value: ValueType); + constructor ctorWithValueType(type: string, value: ValueType); /** - * @since 20 * @arkts 1.2 */ - overload constructor { ctorWithArgs }; + overload constructor { ctorWithValueType }; /** * Get the value of unified record. @@ -3634,11 +3612,6 @@ declare namespace unifiedDataChannel { */ dataLoadInfo: DataLoadInfo; } - /** - * @since 20 - * @arkts 1.2 - */ - overload insertData { insertDataWithCallback, insertDataReturnsPromise }; /** * Insert data into unified data channel by Intention @@ -3649,24 +3622,21 @@ declare namespace unifiedDataChannel { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 20 - * @arkts 1.2 + * @since 10 */ - function insertDataWithCallback(options: Options, data: UnifiedData, callback: AsyncCallback): void; - /** * Insert data into unified data channel by Intention * * @param { Options } options - fill the intention field to indicate the target {@link Intention}. * @param { UnifiedData } data - {@link UnifiedData} data object to insert into target intention. - * @returns { Promise } {string}: the unique identifier. + * @param { AsyncCallback } callback - {string}: the unique identifier. * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 20 - * @arkts 1.2 + * @atomicservice + * @since 11 */ - function insertDataReturnsPromise(options: Options, data: UnifiedData): Promise; + function insertData(options: Options, data: UnifiedData, callback: AsyncCallback): void; /** * Insert data into unified data channel by Intention @@ -3677,22 +3647,22 @@ declare namespace unifiedDataChannel { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 + * @since 20 + * @arkts 1.2 */ + function insertDataWithCallback(options: Options, data: UnifiedData, callback: AsyncCallback): void; + /** * Insert data into unified data channel by Intention * * @param { Options } options - fill the intention field to indicate the target {@link Intention}. * @param { UnifiedData } data - {@link UnifiedData} data object to insert into target intention. - * @param { AsyncCallback } callback - {string}: the unique identifier. + * @returns { Promise } {string}: the unique identifier. * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 + * @since 10 */ - function insertData(options: Options, data: UnifiedData, callback: AsyncCallback): void; - /** * Insert data into unified data channel by Intention * @@ -3702,8 +3672,11 @@ declare namespace unifiedDataChannel { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 + * @atomicservice + * @since 11 */ + function insertData(options: Options, data: UnifiedData): Promise; + /** * Insert data into unified data channel by Intention * @@ -3713,10 +3686,15 @@ declare namespace unifiedDataChannel { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 + * @since 20 + * @arkts 1.2 */ - function insertData(options: Options, data: UnifiedData): Promise; + function insertDataReturnsPromise(options: Options, data: UnifiedData): Promise; + + /** + * @arkts 1.2 + */ + overload insertData { insertDataWithCallback, insertDataReturnsPromise }; /** * Update data to unified data channel by Unique Identifier @@ -3769,11 +3747,17 @@ declare namespace unifiedDataChannel { function updateData(options: Options, data: UnifiedData): Promise; /** - * @since 20 - * @arkts 1.2 + * Query data of unified data channel by Intention or Unique Identifier + * + * @param { Options } options - fill the intention or unique identifier field to indicate the target {@link Intention} + * or {@link UnifiedData}. + * @param { AsyncCallback> } callback - {Array}: the target {@link UnifiedData} + * object array. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 */ - overload queryData { queryDataWithCallback, queryDataReturnsPromise }; - /** * Query data of unified data channel by Intention or Unique Identifier * @@ -3784,32 +3768,32 @@ declare namespace unifiedDataChannel { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 20 - * @arkts 1.2 + * @atomicservice + * @since 11 */ - function queryDataWithCallback(options: Options, callback: AsyncCallback>): void; + function queryData(options: Options, callback: AsyncCallback>): void; - /** + /** * Query data of unified data channel by Intention or Unique Identifier * * @param { Options } options - fill the intention or unique identifier field to indicate the target {@link Intention} * or {@link UnifiedData}. - * @returns { Promise> } {Array}: the target {@link UnifiedData} object array. + * @param { AsyncCallback> } callback - {Array}: the target {@link UnifiedData} object + * array. * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 20 * @arkts 1.2 */ - function queryDataReturnsPromise(options: Options): Promise>; + function queryDataWithCallback(options: Options, callback: AsyncCallback>): void; /** * Query data of unified data channel by Intention or Unique Identifier * * @param { Options } options - fill the intention or unique identifier field to indicate the target {@link Intention} * or {@link UnifiedData}. - * @param { AsyncCallback> } callback - {Array}: the target {@link UnifiedData} - * object array. + * @returns { Promise> } {Array}: the target {@link UnifiedData} object array. * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core @@ -3820,15 +3804,14 @@ declare namespace unifiedDataChannel { * * @param { Options } options - fill the intention or unique identifier field to indicate the target {@link Intention} * or {@link UnifiedData}. - * @param { AsyncCallback> } callback - {Array}: the target {@link UnifiedData} object - * array. + * @returns { Promise> } {Array}: the target {@link UnifiedData} object array. * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ - function queryData(options: Options, callback: AsyncCallback>): void; + function queryData(options: Options): Promise>; /** * Query data of unified data channel by Intention or Unique Identifier @@ -3839,21 +3822,15 @@ declare namespace unifiedDataChannel { * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 + * @since 20 + * @arkts 1.2 */ + function queryDataReturnsPromise(options: Options): Promise>; + /** - * Query data of unified data channel by Intention or Unique Identifier - * - * @param { Options } options - fill the intention or unique identifier field to indicate the target {@link Intention} - * or {@link UnifiedData}. - * @returns { Promise> } {Array}: the target {@link UnifiedData} object array. - * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; - *
2.Incorrect parameters types. - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 + * @arkts 1.2 */ - function queryData(options: Options): Promise>; + overload queryData { queryDataWithCallback, queryDataReturnsPromise }; /** * Delete data of unified data channel by Intention or Unique Identifier -- Gitee