diff --git a/api/@ohos.data.UdmfComponents.d.ets b/api/@ohos.data.UdmfComponents.d.ets index e3a59e42b2e37fbc21a327c7ab031574004a25f6..8c0544060f35aa8fcb2aa32af1b2fb08796f7466 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 32c500d1658562c4320edfad0ca38232f43cdb6e..eddb33722d3a04e527406b1cd880e091a6475129 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,15 @@ 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 + * @since 20 + * @arkts 1.2 + */ + type RecordData = undefined | null | Object | Record | Array; + /** * Indicated delay get UnifiedData * @@ -98,21 +107,29 @@ 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 = number | string | boolean | image.PixelMap | Want | ArrayBuffer | object | null | undefined; + 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 + * @since 20 + * @arkts 1.2 + */ + type ValueType = int | long | double | string | boolean | image.PixelMap | Want | ArrayBuffer | RecordData | null | undefined; /** * Describe the unified data properties. @@ -131,6 +148,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 +407,36 @@ 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 + * @since 11 */ - summary: Record; + summary: Record; + + /** + * A map for each type and data size, key is data type, value is the corresponding data size + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * A map for each type and data size, key is data type, value is the corresponding data size + * + * @type { Record } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * A map for each type and data size, key is data type, value is the corresponding data size + * + * @returns { Record } Type and size information of data + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get summary(): Record; /** * Total data size of data in Bytes * @@ -397,13 +446,36 @@ 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 + * @since 11 + */ + totalSize: long; + + /** + * Total data size of data in Bytes + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Total data size of data in Bytes + * + * @type { long } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 */ - totalSize: number; + /** + * A map for each type and data size, key is data type, value is the corresponding data size + * + * @returns { long } Total size information of data + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get totalSize(): long; } /** @@ -655,7 +727,6 @@ declare namespace unifiedDataChannel { * * @returns { Record | undefined } the details of unified text * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -687,13 +758,12 @@ declare namespace unifiedDataChannel { /** * Indicates the details of unified text * - * @param { Record } the details of unified text + * @param { Record | undefined } the details of unified text * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ - set details(value: Record); + set details(value: Record | undefined); } /** @@ -775,7 +845,6 @@ declare namespace unifiedDataChannel { * * @returns { string } the content of text * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -809,7 +878,6 @@ declare namespace unifiedDataChannel { * * @param { string } the content of text * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -845,7 +913,6 @@ declare namespace unifiedDataChannel { * * @returns { string | undefined } the abstract of text * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -854,13 +921,12 @@ 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); } /** @@ -942,7 +1008,6 @@ declare namespace unifiedDataChannel { * * @returns { string } the url of a link * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -976,7 +1041,6 @@ declare namespace unifiedDataChannel { * * @param { string } the url of a link * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -1035,7 +1099,6 @@ declare namespace unifiedDataChannel { * * @returns { string | undefined } the description of a link. * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -1067,13 +1130,12 @@ declare namespace unifiedDataChannel { /** * Indicates the description of a link * - * @param { string } the description of a link + * @param { string | undefined } the description of a link * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ - set description(value: string); + set description(value: string | undefined); } /** @@ -1155,7 +1217,6 @@ declare namespace unifiedDataChannel { * * @returns { string } the content of html * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -1189,7 +1250,6 @@ declare namespace unifiedDataChannel { * * @param { string } the content of html * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -1248,7 +1308,6 @@ declare namespace unifiedDataChannel { * * @returns { string | undefined } the plain content of html * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -1280,13 +1339,12 @@ declare namespace unifiedDataChannel { /** * Indicates the plain content of html * - * @param { string } the plain content of html + * @param { string | undefined} the plain content of html * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ - set plainContent(value: string); + set plainContent(value: string | undefined); } /** @@ -1368,7 +1426,6 @@ declare namespace unifiedDataChannel { * * @returns { Record | undefined } the details of unified File * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -1400,13 +1457,12 @@ declare namespace unifiedDataChannel { /** * Indicates the details of unified File * - * @param { Record } the details of unified File + * @param { Record | undefined} the details of unified File * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ - set details(value: Record); + set details(value: Record | undefined); /** * URI of the local file or online file. The local file URI can be obtained using the getUriFromPath function. @@ -1461,7 +1517,6 @@ declare namespace unifiedDataChannel { * * @returns { string } the uri of file * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -1495,7 +1550,6 @@ declare namespace unifiedDataChannel { * * @param { string } the uri of file * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -1581,7 +1635,6 @@ declare namespace unifiedDataChannel { * * @returns { string } the uri of image * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -1615,7 +1668,6 @@ declare namespace unifiedDataChannel { * * @param { string } the uri of image * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -1701,7 +1753,6 @@ declare namespace unifiedDataChannel { * * @returns { string } the uri of video * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -1735,7 +1786,6 @@ declare namespace unifiedDataChannel { * * @param { string } the uri of video * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -1821,7 +1871,6 @@ declare namespace unifiedDataChannel { * * @returns { string } the uri of audio * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -1855,7 +1904,6 @@ declare namespace unifiedDataChannel { * * @param { string } the uri of audio * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -1941,7 +1989,6 @@ declare namespace unifiedDataChannel { * * @returns { string } the uri of folder * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -1975,7 +2022,6 @@ declare namespace unifiedDataChannel { * * @param { string } the uri of folder * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform * @since 20 * @arkts 1.2 */ @@ -2010,12 +2056,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 +2072,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 +2080,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 +2096,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 +2104,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 +2140,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 +2156,7 @@ declare namespace unifiedDataChannel { /** * Indicates the id of form * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 @@ -2118,12 +2164,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 +2180,7 @@ declare namespace unifiedDataChannel { /** * Indicates the id of form * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 @@ -2142,12 +2188,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 +2955,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 +2976,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 +3046,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 +3177,7 @@ declare namespace unifiedDataChannel { /** * Describe the visibility range of data * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 20 @@ -3139,7 +3289,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 +3320,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 +3351,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 +3452,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 +3573,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 4f811c4ed20686cd02cc92b179db4dfc3b651ce7..a2b21ac71d95a309f25b315fd480f5088fd7abed 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; } }