diff --git a/en/application-dev/reference/apis/js-apis-distributed-data.md b/en/application-dev/reference/apis/js-apis-distributed-data.md index eff79b5dbed8a643cb3651b594df6a5db4336b07..cd25c298b90c6f59cba4e2d86f79650991eb7ab8 100644 --- a/en/application-dev/reference/apis/js-apis-distributed-data.md +++ b/en/application-dev/reference/apis/js-apis-distributed-data.md @@ -9,7 +9,7 @@ This module provides the following functions: - [Query8+](#query8): provides methods to query data from the database through a **Query** instance by using predicates. - [KVStore](#kvstore): provides methods to add data, delete data, and observe data changes and data synchronization through a **KVStore** instance. - [SingleKVStore](#singlekvstore): provides methods to query and synchronize data in a single KV store. This class inherits from [KVStore](#kvstore), and data is not distinguished by device. -- [DeviceKVStore8+ ](#devicekvstore8): provides methods to query and synchronize data in a device KV store. This class inherits from [KVStore](#kvstore), and data is distinguished by device. +- [DeviceKVStore8+](#devicekvstore8): provides methods to query and synchronize data in a device KV store. This class inherits from [KVStore](#kvstore), and data is distinguished by device. >**NOTE** > @@ -128,8 +128,8 @@ Defines user information. | Name| Type| Mandatory| Description| | ----- | ------ |------ | ------ | -| userId | string | No | User ID.| -| userType | [UserType](#usertype) | No | User type.| +| userId | string | No | User ID. The default value is **0**.| +| userType | [UserType](#usertype) | No | User type. The default value is **0**.| ## UserType @@ -267,7 +267,7 @@ const options = { backup: false, autoSync: true, kvStoreType: distributedData.KVStoreType.SINGLE_VERSION, - schema: '', + schema: undefined, securityLevel: distributedData.SecurityLevel.S2, } try { @@ -317,7 +317,7 @@ const options = { backup: false, autoSync: true, kvStoreType: distributedData.KVStoreType.SINGLE_VERSION, - schema: '', + schema: undefined, securityLevel: distributedData.SecurityLevel.S2, } try { @@ -365,7 +365,7 @@ const options = { backup : false, autoSync : true, kvStoreType : distributedData.KVStoreType.SINGLE_VERSION, - schema : '', + schema : undefined, securityLevel : distributedData.SecurityLevel.S2, } try { @@ -414,7 +414,7 @@ const options = { backup : false, autoSync : true, kvStoreType : distributedData.KVStoreType.SINGLE_VERSION, - schema : '', + schema : undefined, securityLevel : distributedData.SecurityLevel.S2, } try { @@ -548,7 +548,7 @@ Unsubscribes from service status changes. | Name | Type| Mandatory | Description | | ----- | ------ | ---- | ----------------------- | | event | string | Yes | Event to unsubscribe from. The value is **distributedDataServiceDie**, which indicates a service status change event.| -| deathCallback | Callback<void> | No | Callback for the service status change event.| +| deathCallback | Callback<void> | No | Callback for the service status change event. If the callback is not specified, all subscriptions to the service status change event are canceled.| **Example** @@ -574,13 +574,13 @@ Provides KV store configuration. | Name | Type| Mandatory | Description | | ----- | ------ | ------ | -------------------| -| createIfMissing | boolean | No| Whether to create a KV store if no database file exists. By default, a KV store is created.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | -| encrypt | boolean | No|Whether to encrypt database files. By default, database files are not encrypted.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | -| backup | boolean | No|Whether to back up database files. By default, database files are backed up.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | -| autoSync | boolean | No|Whether to automatically synchronize database files. The value **false** (default) means to manually synchronize database files; the value **true** means to automatically synchronize database files.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core
**Required permissions**: ohos.permission.DISTRIBUTED_DATASYNC | -| kvStoreType | [KVStoreType](#kvstoretype) | No|Type of the KV store to create. By default, a device KV store is created. The device KV store stores data for multiple devices that collaborate with each other.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core| -| securityLevel | [SecurityLevel](#securitylevel) | No|Security level of the KV store. By default, the security level is not set.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | -| schema8+ | [Schema](#schema8) | No| Schema used to define the values stored in a KV store.
**System capability**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore| +| createIfMissing | boolean | No| Whether to create a KV store if the database file does not exist. The default value is **true**, which means to create a KV store.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | +| encrypt | boolean | No|Whether to encrypt the KV store. The default value is **false**, which means the KV store is not encrypted.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | +| backup | boolean | No|Whether to back up the KV store. The default value is **true**, which means to back up the KV store.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | +| autoSync | boolean | No|Whether to automatically synchronize database files. The default value is **false**, which means the database files are manually synchronized.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core
**Required permissions**: ohos.permission.DISTRIBUTED_DATASYNC | +| kvStoreType | [KVStoreType](#kvstoretype) | No|Type of the KV store to create. The default value is **DEVICE_COLLABORATION**, which indicates a device KV store.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core| +| securityLevel | [SecurityLevel](#securitylevel) | Yes|Security level (S1 to S4) of the KV store.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | +| schema8+ | [Schema](#schema8) | No| Schema used to define the values stored in the KV store. The default value is **undefined**, which means no schema is used.
**System capability**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore| ## KVStoreType @@ -601,12 +601,12 @@ Enumerates the KV store security levels. | Name | Value| Description | | --- | ---- | ----------------------- | -| NO_LEVEL | 0 | No security level is set for the KV store.
**System capability**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore | -| S0 | 1 | The KV store security level is public.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | -| S1 | 2 | The KV store security level is low. If data leakage occurs, minor impact will be caused on the database. For example, a KV store that contains system data such as wallpapers.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | -| S2 | 3 | The KV store security level is medium. If data leakage occurs, moderate impact will be caused on the database. For example, a KV store that contains information created by users or call records, such as audio or video clips.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | -| S3 | 5 | The KV store security level is high. If data leakage occurs, major impact will be caused on the database. For example, a KV store that contains information such as user fitness, health, and location data.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | -| S4 | 6 | The KV store security level is critical. If data leakage occurs, severe impact will be caused on the database. For example, a KV store that contains information such as authentication credentials and financial data.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | +| NO_LEVEL | 0 | No security level is set for the KV store (deprecated).
**System capability**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore | +| S0 | 1 | The KV store security level is public (deprecated).
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | +| S1 | 2 | The KV store security level is low. If data leakage occurs, minor impact will be caused. For example, a KV store that contains system data such as wallpapers.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | +| S2 | 3 | The KV store security level is medium. If data leakage occurs, moderate impact will be caused. For example, a KV store that contains information created by users or call records such as audio or video clips.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | +| S3 | 5 | The KV store security level is high. If data leakage occurs, major impact will be caused. For example, a KV store that contains information such as user fitness, health, and location data.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | +| S4 | 6 | The KV store security level is critical. If data leakage occurs, severe impact will be caused. For example, a KV store that contains information such as authentication credentials and financial data.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | ## Constants @@ -1686,7 +1686,7 @@ Creates a **Query** object with the AND condition. | Type | Description | | ------ | ------- | -| [Query](#query8) |**Query** object Created.| +| [Query](#query8) |**Query** object created.| **Example** @@ -1716,7 +1716,7 @@ Creates a **Query** object with the OR condition. | Type | Description | | ------ | ------- | -| [Query](#query8) |**Query** object Created.| +| [Query](#query8) |**Query** object created.| **Example** @@ -2295,7 +2295,7 @@ Unsubscribes from data changes. | Name | Type | Mandatory| Description | | -------- | --------------------------------------------------------- | ---- | -------------------------------------------------------- | | event | string | Yes | Event to unsubscribe from. The value is **dataChange**, which indicates a data change event.| -| listener |Callback<[ChangeNotification](#changenotification)> |No |Callback for the data change event.| +| listener | Callback<[ChangeNotification](#changenotification)> | No | Callback for the data change event. If the callback is not specified, all subscriptions to the data change event are canceled.| @@ -2333,7 +2333,7 @@ Unsubscribes from synchronization complete events. | Name | Type | Mandatory| Description | | ------------ | --------------------------------------------- | ---- | ---------------------------------------------------------- | | event | string | Yes | Event to unsubscribe from. The value is **syncComplete**, which indicates a synchronization complete event.| -| syncCallback |Callback<Array<[string, number]>> | No |Callback for the synchronization complete event. | +| syncCallback | Callback<Array<[string, number]>> | No | Callback for the synchronization complete event. If the callback is not specified, all subscriptions to the synchronization complete event are canceled.| **Example** @@ -3895,7 +3895,7 @@ Unsubscribes from data changes. | Name | Type | Mandatory| Description | | -------- | --------------------------------------------------------- | ---- | -------------------------------------------------------- | | event | string | Yes | Event to unsubscribe from. The value is **dataChange**, which indicates a data change event.| -| listener |Callback<[ChangeNotification](#changenotification)> |No |Callback for the data change event.| +| listener | Callback<[ChangeNotification](#changenotification)> | No | Callback for the data change event. If the callback is not specified, all subscriptions to the data change event are canceled.| **Example** @@ -3931,7 +3931,7 @@ Unsubscribes from synchronization complete events. | Name | Type | Mandatory| Description | | ------------ | --------------------------------------------- | ---- | ---------------------------------------------------------- | | event | string | Yes | Event to unsubscribe from. The value is **syncComplete**, which indicates a synchronization complete event.| -| syncCallback | Callback<Array<[string, number]>> | No | Callback for the synchronization complete event. | +| syncCallback | Callback<Array<[string, number]>> | No | Callback for the synchronization complete event. If the callback is not specified, all subscriptions to the synchronization complete event are canceled. | **Example** @@ -5258,7 +5258,7 @@ Synchronizes the KV store manually. | ----- | ------ | ---- | ----------------------- | | deviceIds |string[] | Yes |IDs of the devices to be synchronized.| | mode |[SyncMode](#syncmode) | Yes |Synchronization mode. | -| delayMs |number | No |Allowed synchronization delay time, in ms. | +| delayMs |number | No |Allowed synchronization delay time, in ms. The default value is **0**. | **Example** @@ -5373,7 +5373,7 @@ Unsubscribes from data changes. | Name | Type | Mandatory| Description | | -------- | --------------------------------------------------------- | ---- | -------------------------------------------------------- | | event | string | Yes | Event to unsubscribe from. The value is **dataChange**, which indicates a data change event.| -| listener |Callback<[ChangeNotification](#changenotification)> |No |Callback for the data change event.| +| listener | Callback<[ChangeNotification](#changenotification)> | No | Callback for the data change event. If the callback is not specified, all subscriptions to the data change event are canceled.| **Example** @@ -5409,7 +5409,7 @@ Unsubscribes from synchronization complete events. | Name | Type | Mandatory| Description | | ------------ | --------------------------------------------- | ---- | ---------------------------------------------------------- | | event | string | Yes | Event to unsubscribe from. The value is **syncComplete**, which indicates a synchronization complete event.| -| syncCallback | Callback<Array<[string, number]>> | No | Callback for the synchronization complete event. | +| syncCallback | Callback<Array<[string, number]>> | No | Callback for the synchronization complete event. If the callback is not specified, all subscriptions to the synchronization complete event are canceled. | **Example** diff --git a/en/application-dev/reference/apis/js-apis-distributedKVStore.md b/en/application-dev/reference/apis/js-apis-distributedKVStore.md index d1911570c6460214f6d814583359a889dd75d8c8..117afe8d4f70bb034add259da1a09d3b58b680ba 100644 --- a/en/application-dev/reference/apis/js-apis-distributedKVStore.md +++ b/en/application-dev/reference/apis/js-apis-distributedKVStore.md @@ -12,8 +12,8 @@ The **distributedKVStore** module provides the following functions: > **NOTE** > -> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. ->
All the APIs that need to obtain **deviceId** in this module are available only to system applications. +> - The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. +> - All the APIs that need to obtain **deviceId** in this module are available only to system applications. ## Modules to Import @@ -41,7 +41,7 @@ Provides constants of the distributed KV store. | Name | Value | Description | | --------------------- | ------- | --------------------------------------- | | MAX_KEY_LENGTH | 1024 | Maximum length of a key in a distributed KV store, in bytes. | -| MAX_VALUE_LENGTH | 4194303 | Maximum length of a value in a distributed KV store, in bytes. | +| MAX_VALUE_LENGTH | 4194303 | Maximum length of a value in a distributed KV store, in bytes.| | MAX_KEY_LENGTH_DEVICE | 896 | Maximum length of a key in a device KV store, in bytes.| | MAX_STORE_ID_LENGTH | 128 | Maximum length of a KV store ID, in bytes. | | MAX_QUERY_LENGTH | 512000 | Maximum query length, in bytes. | @@ -127,7 +127,7 @@ Enumerates the distributed KV store types. | Name | Description | | -------------------- | ------------------------------------------------------------ | -| DEVICE_COLLABORATION | Device KV store.
The device KV store manages data by device, which eliminates conflicts. Data can be queried by device.
**System capability**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore| +| DEVICE_COLLABORATION | Device KV store.
The device KV store manages data by device, which eliminates conflicts. Data can be queried by device.
**System capability**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore | | SINGLE_VERSION | Single KV store.
The single KV store does not differentiate data by device. If entries with the same key are modified on different devices, the value will be overwritten.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | ## SecurityLevel @@ -137,11 +137,11 @@ Enumerates the KV store security levels. **System capability**: SystemCapability.DistributedDataManager.KVStore.Core | Name | Description | -| ---: | ------------------------------------------------------------ | -| S1 | Low security level. Disclosure, tampering, corruption, or loss of the data may cause minor impact on an individual or group.
Examples: gender and nationality information, and user application records | -| S2 | Medium security level. Disclosure, tampering, corruption, or loss of the data may cause major impact on an individual or group.
Examples: mailing addresses and nicknames of individuals | -| S3 | High security level. Disclosure, tampering, corruption, or loss of the data may cause critical impact on an individual or group.
Examples: real-time precise positioning information and movement trajectory | -| S4 | Critical security level. Disclosure, tampering, corruption, or loss of the data may cause significant adverse impact on an individual or group.
Examples: political opinions, religious and philosophical belief, trade union membership, genetic data, biological information, health and sexual life status, sexual orientation, device authentication, and personal credit card information | +| -------: | ------------------------------------------------------------ | +| S1 | Low security level. Disclosure, tampering, corruption, or loss of the data may cause minor impact on an individual or group.
Examples: gender and nationality information, and user application records| +| S2 | Medium security level. Disclosure, tampering, corruption, or loss of the data may cause major impact on an individual or group.
Examples: mailing addresses and nicknames of individuals| +| S3 | High security level. Disclosure, tampering, corruption, or loss of the data may cause critical impact on an individual or group.
Examples: real-time precise positioning information and movement trajectory | +| S4 | Critical security level. Disclosure, tampering, corruption, or loss of the data may cause significant adverse impact on an individual or group.
Examples: political opinions, religious and philosophical belief, trade union membership, genetic data, biological information, health and sexual life status, sexual orientation, device authentication, and personal credit card information| ## Options @@ -149,13 +149,13 @@ Provides KV store configuration. | Name | Type | Mandatory| Description | | --------------- | -------------- | ---- | -------------------------| -| createIfMissing | boolean | No | Whether to create a KV store if no database file exists. By default, a KV store is created.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core| -| encrypt | boolean | No | Whether to encrypt the KV store. By default, KV stores are not encrypted.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | -| backup | boolean | No | Whether to back up database files. By default, database files are backed up.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core| -| autoSync | boolean | No | Whether to automatically synchronize the KV store data. The value **true** means to automatically synchronize the KV store data; the value **false** (default) means the opposite.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core
**Required permissions**: ohos.permission.DISTRIBUTED_DATASYNC | -| kvStoreType | [KVStoreType](#kvstoretype) | No | Type of the KV store to create. By default, a device KV store is created.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core | -| securityLevel | [SecurityLevel](#securitylevel) | Yes |Security level of the KV store.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core| -| schema | [Schema](#schema) | No | Schema used to define the values stored in the KV store. By default, **schema** is not used.
**System capability**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore| +| createIfMissing | boolean | No | Whether to create a KV store if the database file does not exist. The default value is **true**, which means to create a KV store.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core| +| encrypt | boolean | No | Whether to encrypt the KV store. The default value is **false**, which means the KV store is not encrypted.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core| +| backup | boolean | No | Whether to back up the KV store. The default value is **true**, which means to back up the KV store.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core| +| autoSync | boolean | No | Whether to automatically synchronize database files. The default value is **false**, which means the database files are manually synchronized.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core
**Required permissions**: ohos.permission.DISTRIBUTED_DATASYNC| +| kvStoreType | [KVStoreType](#kvstoretype) | No | Type of the KV store to create. The default value is **DEVICE_COLLABORATION**, which indicates a device KV store.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core| +| securityLevel | [SecurityLevel](#securitylevel) | Yes | Security level of the KV store.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core| +| schema | [Schema](#schema) | No | Schema used to define the values stored in the KV store. The default value is **undefined**, which means no schema is used.
**System capability**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore| ## Schema @@ -166,7 +166,7 @@ Defines the schema of a KV store. You can create a **Schema** object and place i | Name | Type | Readable| Writable| Description | | ------- | ----------------------- | ---- | ---- | -------------------------- | | root | [FieldNode](#fieldnode) | Yes | Yes | JSON root object. | -| indexes | Array\ | Yes | Yes | Array of strings in JSON format. | +| indexes | Array\ | Yes | Yes | String array in JSON format.| | mode | number | Yes | Yes | Schema mode. | | skip | number | Yes | Yes | Size of a skip of the schema. | @@ -444,7 +444,7 @@ const options = { backup: false, autoSync: true, kvStoreType: distributedKVStore.KVStoreType.SINGLE_VERSION, - schema: '', + schema: undefined, securityLevel: distributedKVStore.SecurityLevel.S2, } try { @@ -500,7 +500,7 @@ const options = { backup: false, autoSync: true, kvStoreType: distributedKVStore.KVStoreType.SINGLE_VERSION, - schema: '', + schema: undefined, securityLevel: distributedKVStore.SecurityLevel.S2, } try { @@ -555,7 +555,7 @@ const options = { backup: false, autoSync: true, kvStoreType: distributedKVStore.KVStoreType.SINGLE_VERSION, - schema: '', + schema: undefined, securityLevel: distributedKVStore.SecurityLevel.S2, } try { @@ -619,7 +619,7 @@ const options = { backup: false, autoSync: true, kvStoreType: distributedKVStore.KVStoreType.SINGLE_VERSION, - schema: '', + schema: undefined, securityLevel: distributedKVStore.SecurityLevel.S2, } try { @@ -645,7 +645,7 @@ try { getAllKVStoreId(appId: string, callback: AsyncCallback<string[]>): void -Obtains IDs of all distributed KV stores that are created by [getKVStore](#getkvstore) and have not been deleted by [deleteKVStore](#deletekvstore). This API uses an asynchronous callback to return the result. +Obtains the IDs of all distributed KV stores that are created by [getKVStore](#getkvstore) and have not been deleted by [deleteKVStore](#deletekvstore). This API uses an asynchronous callback to return the result. **System capability**: SystemCapability.DistributedDataManager.KVStore.Core @@ -677,7 +677,7 @@ try { getAllKVStoreId(appId: string): Promise<string[]> -Obtains IDs of all distributed KV stores that are created by [getKVStore](#getkvstore) and have not been deleted by [deleteKVStore](#deletekvstore). This API uses a promise to return the result. +Obtains the IDs of all distributed KV stores that are created by [getKVStore](#getkvstore) and have not been deleted by [deleteKVStore](#deletekvstore). This API uses a promise to return the result. **System capability**: SystemCapability.DistributedDataManager.KVStore.Core @@ -751,7 +751,7 @@ Unsubscribes from service status changes. The **deathCallback** parameter must b | Name | Type | Mandatory| Description | | ------------- | -------------------- | ---- | ------------------------------------------------------------ | | event | string | Yes | Event to unsubscribe from. The value is **distributedDataServiceDie**, which indicates a service status change event.| -| deathCallback | Callback<void> | No | Callback for the service status change event. If this parameter is not specified, all deathCallback subscriptions will be canceled. | +| deathCallback | Callback<void> | No | Callback for the service status change event. If this parameter is not specified, all subscriptions to the service status change event are canceled. | **Example** @@ -4562,7 +4562,7 @@ Synchronizes the KV store manually. For details about the synchronization modes | --------- | --------------------- | ---- | ---------------------------------------------- | | deviceIds | string[] | Yes | List of IDs of the devices in the same networking environment to be synchronized.| | mode | [SyncMode](#syncmode) | Yes | Synchronization mode. | -| delayMs | number | No | Allowed synchronization delay time, in ms. | +| delayMs | number | No | Allowed synchronization delay time, in ms. The default value is **0**. | **Error codes** @@ -4632,7 +4632,7 @@ Synchronizes the KV store manually. This API returns the result synchronously. F | deviceIds | string[] | Yes | List of IDs of the devices in the same networking environment to be synchronized.| | mode | [SyncMode](#syncmode) | Yes | Synchronization mode. | | query | [Query](#query) | Yes | **Query** object to match. | -| delayMs | number | No | Allowed synchronization delay time, in ms. | +| delayMs | number | No | Allowed synchronization delay time, in ms. The default value is **0**.| **Error codes** @@ -4769,7 +4769,7 @@ Unsubscribes from data changes. | Name | Type | Mandatory| Description | | -------- | --------------------------------------------------------- | ---- | -------------------------------------------------------- | | event | string | Yes | Event to unsubscribe from. The value is **dataChange**, which indicates a data change event.| -| listener | Callback<[ChangeNotification](#changenotification)> | No | Callback for the data change event. | +| listener | Callback<[ChangeNotification](#changenotification)> | No | Callback for the data change event. If the callback is not specified, all subscriptions to the data change event are canceled.| **Error codes** @@ -4822,7 +4822,7 @@ Unsubscribes from synchronization complete events. | Name | Type | Mandatory| Description | | ------------ | --------------------------------------------- | ---- | ---------------------------------------------------------- | | event | string | Yes | Event to unsubscribe from. The value is **syncComplete**, which indicates a synchronization complete event.| -| syncCallback | Callback<Array<[string, number]>> | No | Callback for the synchronization complete event. | +| syncCallback | Callback<Array<[string, number]>> | No | Callback for the synchronization complete event. If the callback is not specified, all subscriptions to the synchronization complete event are canceled. | **Example**