From ef38ede37136c529d3c5c62ad1d57c4d91f37b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=AD=90=E6=9D=8E?= Date: Fri, 29 Aug 2025 20:06:16 +0800 Subject: [PATCH 1/2] sync code from 0702 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 木子李 --- api/@ohos.data.UdmfComponents.d.ets | 10 +- api/@ohos.data.unifiedDataChannel.d.ts | 206 ++++++++++++++++++++----- api/@ohos.data.uniformDataStruct.d.ts | 29 ++-- 3 files changed, 193 insertions(+), 52 deletions(-) diff --git a/api/@ohos.data.UdmfComponents.d.ets b/api/@ohos.data.UdmfComponents.d.ets index e3a59e42b2..8c0544060f 100644 --- a/api/@ohos.data.UdmfComponents.d.ets +++ b/api/@ohos.data.UdmfComponents.d.ets @@ -21,7 +21,7 @@ import uniformDataStruct from '@ohos.data.uniformDataStruct'; /** * Enumerates the form card types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 20 */ @@ -82,22 +82,22 @@ declare struct ContentFormCard { /** * Width of the form card. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 20 */ @Prop - formWidth?: number; + formWidth?: double; /** * Height of the form card. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 20 */ @Prop - formHeight?: number; + formHeight?: double; /** * Callback to be invoked when the form card is tapped. diff --git a/api/@ohos.data.unifiedDataChannel.d.ts b/api/@ohos.data.unifiedDataChannel.d.ts index 32c500d165..581745b9a2 100644 --- a/api/@ohos.data.unifiedDataChannel.d.ts +++ b/api/@ohos.data.unifiedDataChannel.d.ts @@ -62,7 +62,7 @@ import Want from "./@ohos.app.ability.Want"; declare namespace unifiedDataChannel { /** * Types of scope that UnifiedData can be used. - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 12 @@ -84,6 +84,16 @@ declare namespace unifiedDataChannel { CROSS_APP } + /** + * RrcordData is used for input parameter obj of the equal function + * @typedef { undefined | null | Object | Record | Array } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + type RecordData = undefined | null | Object | Record | Array; + /** * Indicated delay get UnifiedData * @@ -98,21 +108,30 @@ declare namespace unifiedDataChannel { /** * Indicates type of value. - * @typedef {number | string | boolean | image.PixelMap | Want | ArrayBuffer | object | null | undefined} + * @typedef {int | long | double | string | boolean | image.PixelMap | Want | ArrayBuffer | object | null | undefined} * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 12 */ /** * Indicates type of value. - * @typedef {number | string | boolean | image.PixelMap | Want | ArrayBuffer | object | null | undefined} + * @typedef {int | long | double | string | boolean | image.PixelMap | Want | ArrayBuffer | object | null | undefined} * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 + */ + type ValueType = int | long | double | string | boolean | image.PixelMap | Want | ArrayBuffer | object | null | undefined; + + /** + * Indicates type of value. + * @typedef {int | long | double | string | boolean | image.PixelMap | Want | ArrayBuffer | RecordData | null | undefined} + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 */ - type ValueType = number | string | boolean | image.PixelMap | Want | ArrayBuffer | object | null | undefined; + type ValueType = int | long | double | string | boolean | image.PixelMap | Want | ArrayBuffer | RecordData | null | undefined; /** * Describe the unified data properties. @@ -131,6 +150,15 @@ declare namespace unifiedDataChannel { */ extras?: Record; + /** + * extra property data. key-value pairs. + * @type { ?Record } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + extras?: Record; + /** * the user-defined tag of a UnifiedData object. * @type { ?string } @@ -381,13 +409,13 @@ declare namespace unifiedDataChannel { /** * A map for each type and data size, key is data type, value is the corresponding data size * - * @type { Record } + * @type { Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - summary: Record; + summary: Record; /** * Total data size of data in Bytes * @@ -397,13 +425,13 @@ declare namespace unifiedDataChannel { /** * Total data size of data in Bytes * - * @type { number } + * @type { long } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - totalSize: number; + totalSize: long; } /** @@ -854,13 +882,13 @@ declare namespace unifiedDataChannel { /** * Indicates the abstract of text * - * @param { string } the abstract of text + * @param { string | undefined } the abstract of text * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @since 20 * @arkts 1.2 */ - set textAbstract(value: string); + set textAbstract(value: string | undefined); } /** @@ -2010,12 +2038,12 @@ declare namespace unifiedDataChannel { /** * Indicates the details of system defined data * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ - details?: Record; + details?: Record; /** * Indicates the details of system defined data @@ -2026,7 +2054,7 @@ declare namespace unifiedDataChannel { /** * Indicates the details of system defined data * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 @@ -2034,12 +2062,12 @@ declare namespace unifiedDataChannel { /** * Indicates the details of system defined data * - * @returns { Record | undefined } the details of system defined data + * @returns { Record | undefined } the details of system defined data * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 20 * @arkts 1.2 */ - get details(): Record | undefined; + get details(): Record | undefined; /** * Indicates the details of system defined data @@ -2050,7 +2078,7 @@ declare namespace unifiedDataChannel { /** * Indicates the details of system defined data * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 @@ -2058,12 +2086,12 @@ declare namespace unifiedDataChannel { /** * Indicates the details of system defined data * - * @param { Record } the details of system defined data + * @param { Record | undefined } the details of system defined data * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 20 * @arkts 1.2 */ - set details(value: Record); + set details(value: Record | undefined); } /** @@ -2094,12 +2122,12 @@ declare namespace unifiedDataChannel { /** * Indicates the id of form * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ - formId: number; + formId: int; /** * Indicates the id of form @@ -2110,7 +2138,7 @@ declare namespace unifiedDataChannel { /** * Indicates the id of form * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 @@ -2118,12 +2146,12 @@ declare namespace unifiedDataChannel { /** * Indicates the id of form * - * @returns { number } the id of form + * @returns { int } the id of form * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 20 * @arkts 1.2 */ - get formId(): number; + get formId(): int; /** * Indicates the id of form @@ -2134,7 +2162,7 @@ declare namespace unifiedDataChannel { /** * Indicates the id of form * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 @@ -2142,12 +2170,12 @@ declare namespace unifiedDataChannel { /** * Indicates the id of form * - * @param { number } the id of form + * @param { int } the id of form * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 20 * @arkts 1.2 */ - set formId(value: number); + set formId(value: int); /** * Indicates the name of form @@ -2909,7 +2937,8 @@ declare namespace unifiedDataChannel { * @extends UnifiedRecord * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ class ApplicationDefinedRecord extends UnifiedRecord { /** @@ -2929,6 +2958,61 @@ declare namespace unifiedDataChannel { * @since 11 */ applicationDefinedType: string; + + /** + * Indicates the type of data, should always be started with 'ApplicationDefined.', will + * return error otherwise + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the type of data, should always be started with 'ApplicationDefined.', will + * return error otherwise + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the type of data, should always be started with 'ApplicationDefined.', will + * return error otherwise + * + * @returns { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get applicationDefinedType(): string; + + /** + * Indicates the type of data, should always be started with 'ApplicationDefined.', will + * return error otherwise + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the type of data, should always be started with 'ApplicationDefined.', will + * return error otherwise + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the type of data, should always be started with 'ApplicationDefined.', will + * return error otherwise + * + * @oaram { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + set applicationDefinedType(value: string); + /** * Indicates the raw data of application defined data * @@ -2944,6 +3028,54 @@ declare namespace unifiedDataChannel { * @since 11 */ rawData: Uint8Array; + + /** + * Indicates the raw data of application defined data + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the raw data of application defined data + * + * @type { Uint8Array } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the raw data of application defined data + * + * @returns { Uint8Array } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get rawData(): Uint8Array; + + /** + * Indicates the raw data of application defined data + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the raw data of application defined data + * + * @type { Uint8Array } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the raw data of application defined data + * + * @param { Uint8Array } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + set rawData(value: Uint8Array); } /** @@ -3027,7 +3159,7 @@ declare namespace unifiedDataChannel { /** * Describe the visibility range of data * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 20 @@ -3139,7 +3271,7 @@ declare namespace unifiedDataChannel { /** * Defines the types of file conflict options when getting data from the UDMF. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since arkts {'1.1':'15', '1.2':'20'} @@ -3170,7 +3302,7 @@ declare namespace unifiedDataChannel { /** * Defines the types of progress indicator when getting data from the UDMF. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since arkts {'1.1':'15', '1.2':'20'} @@ -3201,7 +3333,7 @@ declare namespace unifiedDataChannel { /** * Defines the listener status of obtaining progress and data. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since arkts {'1.1':'15', '1.2':'20'} @@ -3302,13 +3434,13 @@ declare namespace unifiedDataChannel { /** * Indicates the UDMF processing progress. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since arkts {'1.1':'15', '1.2':'20'} * @arkts 1.1&1.2 */ - progress: number; + progress: int; /** * Indicates the status of obtaining progress and data. @@ -3423,12 +3555,12 @@ declare namespace unifiedDataChannel { /** * Indicates the maximum number of data records to be loaded. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 20 */ - recordCount?: number; + recordCount?: long; } /** diff --git a/api/@ohos.data.uniformDataStruct.d.ts b/api/@ohos.data.uniformDataStruct.d.ts index 4f811c4ed2..a2b21ac71d 100644 --- a/api/@ohos.data.uniformDataStruct.d.ts +++ b/api/@ohos.data.uniformDataStruct.d.ts @@ -61,6 +61,15 @@ declare namespace uniformDataStruct { * @since 12 */ abstract?: string; + + /** + * Indicates the abstract of the PlainText. + * @type { ?string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + textAbstract?: string; /** * Object of the dictionary type used to describe the attributes of the text content. Both the key and value of the * object are of the string type. For example, the following is a details object used to describe the properties of @@ -247,11 +256,11 @@ declare namespace uniformDataStruct { * Object of the dictionary type used to describe the icon. The key is of the string type, and the value can be a * number, a string, or a Uint8Array. By default, it is an empty dictionary object. * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 12 */ - details?: Record; + details?: Record; } /** @@ -348,11 +357,11 @@ declare namespace uniformDataStruct { /** * Indicates the form id of form. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 15 */ - formId: number; + formId: int; /** * Indicates the form name of form. @@ -393,11 +402,11 @@ declare namespace uniformDataStruct { /** * Indicates the details of form. * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 15 */ - details?: Record; + details?: Record; } /** @@ -439,11 +448,11 @@ declare namespace uniformDataStruct { /** * Indicates the details of fileUri. * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 15 */ - details?: Record; + details?: Record; } /** @@ -476,11 +485,11 @@ declare namespace uniformDataStruct { /** * Indicates the details of pixelMap. * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 15 */ - details?: Record; + details?: Record; } } -- Gitee From 3721595c1fdb1dfe4c18bb942783203fdb7b125e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=AD=90=E6=9D=8E?= Date: Sat, 30 Aug 2025 15:08:04 +0800 Subject: [PATCH 2/2] sync code from 0702 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 木子李 --- api/@ohos.data.unifiedDataChannel.d.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/api/@ohos.data.unifiedDataChannel.d.ts b/api/@ohos.data.unifiedDataChannel.d.ts index 581745b9a2..cb1ed0b4fd 100644 --- a/api/@ohos.data.unifiedDataChannel.d.ts +++ b/api/@ohos.data.unifiedDataChannel.d.ts @@ -88,7 +88,6 @@ declare namespace unifiedDataChannel { * RrcordData is used for input parameter obj of the equal function * @typedef { undefined | null | Object | Record | Array } * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -127,7 +126,6 @@ declare namespace unifiedDataChannel { * Indicates type of value. * @typedef {int | long | double | string | boolean | image.PixelMap | Want | ArrayBuffer | RecordData | null | undefined} * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -884,7 +882,6 @@ declare namespace unifiedDataChannel { * * @param { string | undefined } the abstract of text * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ -- Gitee