1# @ohos.data.commonType (Common Data Types) 2 3The **commonType** module defines common data types in data management. 4 5> **NOTE** 6> 7> The initial APIs of this module are supported since API version 11. Newly added APIs will be marked with a superscript to indicate their earliest API version. 8 9## Modules to Import 10 11```ts 12import { commonType } from '@kit.ArkData'; 13``` 14 15## AssetStatus 16 17Enumerates the asset statuses. Use the enum name rather than the enum value. 18 19**System capability**: SystemCapability.DistributedDataManager.CommonType 20 21| Name | Value | Description | 22| ----------------- | --- | ---------------------------- | 23| ASSET_NORMAL | 1 | The asset is in normal status. | 24| ASSET_INSERT | 2 | The asset is to be inserted to the cloud. | 25| ASSET_UPDATE | 3 | The asset is to be updated to the cloud. | 26| ASSET_DELETE | 4 | The asset is to be deleted from the cloud. | 27| ASSET_ABNORMAL | 5 | The asset is in abnormal status. | 28| ASSET_DOWNLOADING | 6 | The asset is being downloaded to a local device.| 29 30## Asset 31 32Defines information about an asset (such as a document, image, and video). 33 34**System capability**: SystemCapability.DistributedDataManager.CommonType 35 36| Name | Type | Mandatory| Description | 37| ---------- | --------------------------- | ---- | ---------------------------------- | 38| name | string | Yes | Asset name. | 39| uri | string | Yes | Asset URI, which is an absolute path in the system. | 40| path | string | Yes | Application sandbox path of the asset. | 41| createTime | string | Yes | Time when the asset was created. | 42| modifyTime | string | Yes | Time when the asset was last modified. | 43| size | string | Yes | Size of the asset. | 44| status | [AssetStatus](#assetstatus) | No | Asset status. The default value is **ASSET_NORMAL**.| 45 46## Assets 47 48type Assets = Array\<Asset> 49 50Represents an array of [Assets](#asset). 51 52**System capability**: SystemCapability.DistributedDataManager.CommonType 53 54| Type | Description | 55| ---------------------------- | --------------------- | 56| Array<[Asset](#asset)> | Array of assets.| 57 58## ValueType 59 60type ValueType = null | number | string | boolean | Uint8Array | Asset | Assets 61 62Enumerates the value types, which vary with the parameter function. 63 64**System capability**: SystemCapability.DistributedDataManager.CommonType 65 66| Type | Description | 67| ---------- | --------------------------------------- | 68| null | The value is null. | 69| number | The value is a number. | 70| string | The value is a string. | 71| boolean | The value is true or false. | 72| Uint8Array | The value is a Uint8 array. | 73| Asset | The value is an [Asset](#asset). | 74| Assets | The value is an [Asset array](#assets).| 75 76## ValuesBucket 77 78type ValuesBucket = Record<string, ValueType> 79 80Defines the types of the key and value in a KV pair. This type is not multi-thread safe. If a **ValuesBucket** instance is operated by multiple threads at the same time in an application, use a lock for the instance. 81 82**System capability**: SystemCapability.DistributedDataManager.CommonType 83 84| Type| Description | 85| ------ | ----------------------- | 86| Record<string, [ValueType](#valuetype)> | Types of the key and value in a KV pair. The key type is string, and the value type is [ValueType](#valuetype).| 87