已合并
多段注释合一 手动会刷docs注释 #32760
多段注释合一 手动会刷docs注释 #32760
已合并
jeam-wang创建于 5月11日
4 个文件变更+533-617
Mapi/@ohos.data.cloudData.d.ts+196-209
@@ -1040,11 +1040,12 @@ declare namespace cloudData {
1040 }1040 }
1041 1041 
1042 /**1042 /**
1043- * Sets cloud strategy.1043+ * Sets the cloud sync strategy of an application. This API uses a promise to return the result.
1044 *1044 *
1045- * @param { StrategyType } strategy - Indicates the strategy type of the cloud sync.1045+ * @param { StrategyType } strategy - Type of the strategy to set.
1046- * @param { Array<commonType.ValueType> } param - Indicates specific strategy of the cloud sync.1046+ * @param { Array<commonType.ValueType> } param - Strategy parameters to set.
1047- * @returns { Promise<void> } Promise used to return the result.1047+ * Currently, only network strategies can be set. By default, Wi-Fi and cellular network are supported.
1048+ * @returns { Promise<void> } Promise that returns no value.
1048 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2.1049 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2.
1049 * Incorrect parameter types;1050 * Incorrect parameter types;
1050 * 3. Parameter verification failed.1051 * 3. Parameter verification failed.
@@ -1313,7 +1314,7 @@ declare namespace cloudData {
1313 }1314 }
1314 1315 
1315 /**1316 /**
1316- * Result interface.1317+ * Represents the device-cloud sharing result.
1317 *1318 *
1318 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1319 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1319 * @systemapi1320 * @systemapi
@@ -1332,7 +1333,7 @@ declare namespace cloudData {
1332 code: int;1333 code: int;
1333 1334 
1334 /**1335 /**
1335- * Error code description.1336+ * Detailed description of the error code. The default value is undefined.
1336 *1337 *
1337 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1338 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1338 * @systemapi1339 * @systemapi
@@ -1342,7 +1343,7 @@ declare namespace cloudData {
1342 description?: string;1343 description?: string;
1343 1344 
1344 /**1345 /**
1345- * The result value.1346+ * Value returned. The specific type is specified by the T parameter. The default value is undefined.
1346 *1347 *
1347 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1348 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1348 * @systemapi1349 * @systemapi
@@ -1362,8 +1363,8 @@ declare namespace cloudData {
1362 */1363 */
1363 interface Privilege {1364 interface Privilege {
1364 /**1365 /**
1365- * Whether the participant can modify the shared data. The value **true** means the participant can modify the 1366+ * Whether the participant can modify the shared data. The value true means the participant can modify the
1366- * data; the value **false** means the opposite. The default value is **false**.1367+ * data; the value false means the opposite. The default value is false.
1367 *1368 *
1368 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1369 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1369 * @systemapi1370 * @systemapi
@@ -1373,8 +1374,8 @@ declare namespace cloudData {
1373 writable?: boolean;1374 writable?: boolean;
1374 1375 
1375 /**1376 /**
1376- * Whether the participant can read the shared data. The value **true** means the participant can read the data; 1377+ * Whether the participant can read the shared data. The value true means the participant can read the data;
1377- * the value **false** means the opposite. The default value is **false**.1378+ * the value false means the opposite. The default value is false.
1378 *1379 *
1379 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1380 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1380 * @systemapi1381 * @systemapi
@@ -1384,8 +1385,8 @@ declare namespace cloudData {
1384 readable?: boolean;1385 readable?: boolean;
1385 1386 
1386 /**1387 /**
1387- * Whether the participant can create data to share. The value **true** means the participant can create data; the1388+ * Whether the participant can create data to share. The value true means the participant can create data; the
1388- * value **false** means the opposite. The default value is **false**.1389+ * value false means the opposite. The default value is false.
1389 *1390 *
1390 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1391 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1391 * @systemapi1392 * @systemapi
@@ -1395,8 +1396,8 @@ declare namespace cloudData {
1395 creatable?: boolean;1396 creatable?: boolean;
1396 1397 
1397 /**1398 /**
1398- * Whether the participant can delete the shared data. The value **true** means the participant can delete the 1399+ * Whether the participant can delete the shared data. The value true means the participant can delete the
1399- * data; the value **false** means the opposite. The default value is **false**.1400+ * data; the value false means the opposite. The default value is false.
1400 *1401 *
1401 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1402 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1402 * @systemapi1403 * @systemapi
@@ -1406,8 +1407,8 @@ declare namespace cloudData {
1406 deletable?: boolean;1407 deletable?: boolean;
1407 1408 
1408 /**1409 /**
1409- * Whether the participant can share the data to others. The value **true** means the participant can share the 1410+ * Whether the participant can share the data to others. The value true means the participant can share the
1410- * data; the value **false** means the opposite. The default value is **false**.1411+ * data; the value false means the opposite. The default value is false.
1411 *1412 *
1412 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1413 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1413 * @systemapi1414 * @systemapi
@@ -1427,7 +1428,7 @@ declare namespace cloudData {
1427 */1428 */
1428 interface Participant {1429 interface Participant {
1429 /**1430 /**
1430- * Identity of participant.1431+ * ID of the participant.
1431 *1432 *
1432 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1433 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1433 * @systemapi1434 * @systemapi
@@ -1437,7 +1438,7 @@ declare namespace cloudData {
1437 identity: string;1438 identity: string;
1438 1439 
1439 /**1440 /**
1440- * Role of the participant, which can be inviter or invitee.1441+ * Role of the participant, inviter or invitee. The default value is undefined.
1441 *1442 *
1442 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1443 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1443 * @systemapi1444 * @systemapi
@@ -1447,7 +1448,7 @@ declare namespace cloudData {
1447 role?: Role;1448 role?: Role;
1448 1449 
1449 /**1450 /**
1450- * State of the sharing invitation.1451+ * State of the device-cloud sharing. The default value is undefined.
1451 *1452 *
1452 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1453 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1453 * @systemapi1454 * @systemapi
@@ -1457,7 +1458,7 @@ declare namespace cloudData {
1457 state?: State;1458 state?: State;
1458 1459 
1459 /**1460 /**
1460- * Permissions for the shared data.1461+ * Permissions on the shared data. The Privilege defaults are used by default.
1461 *1462 *
1462 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1463 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1463 * @systemapi1464 * @systemapi
@@ -1467,7 +1468,8 @@ declare namespace cloudData {
1467 privilege?: Privilege;1468 privilege?: Privilege;
1468 1469 
1469 /**1470 /**
1470- * Attach information.1471+ * Additional information, such as the verification code used for participant identity verification.
1472+ * The default value is an empty string.
1471 *1473 *
1472 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1474 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1473 * @systemapi1475 * @systemapi
@@ -1478,19 +1480,20 @@ declare namespace cloudData {
1478 }1480 }
1479 1481 
1480 /**1482 /**
1481- * Allocates shared resources based on conditions,1483+ * Allocates a shared resource ID based on the data that matches the specified predicates.
1482- * and shares data with the specified privilege to participants.1484+ * This API uses a promise to return the result set of the data to share,
1485+ * which also includes the column names if they are specified.
1483 *1486 *
1484- * @param { string } storeId - Indicates relational store name.1487+ * @param { string } storeId - Name of the RDB store.
1485- * @param { relationalStore.RdbPredicates } predicates - See {@link relationalStore.RdbPredicates}.1488+ * @param { relationalStore.RdbPredicates } predicates - Predicates for matching the data to share.
1486- * @param { Array<Participant> } participants - Participants to share.1489+ * @param { Array<Participant> } participants - Participants of the share.
1487- * @param { Array<string> } [columns] - Columns to be shared.1490+ * @param { Array<string> } [columns] - Columns in which the data is located.
1488- * @returns { Promise<relationalStore.ResultSet> } - Promise used to return {@link relationalStore.ResultSet}.1491+ * The default value is undefined, which means column names are not returned.
1489- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1492+ * @returns { Promise<relationalStore.ResultSet> } Promise used to return the result set of the data to share.
1490- * uses system API.1493+ * @throws { BusinessError } 202 - Permission verification failed,
1491- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 21494+ * application which is not a system application uses system API.
1492- * . Incorrect parameter types;1495+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1493- * 3. Parameter verification failed.1496+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1494 * @throws { BusinessError } 801 - Capability not supported.1497 * @throws { BusinessError } 801 - Capability not supported.
1495 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1498 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1496 * @systemapi1499 * @systemapi
@@ -1505,19 +1508,17 @@ declare namespace cloudData {
1505 ): Promise<relationalStore.ResultSet>;1508 ): Promise<relationalStore.ResultSet>;
1506 1509 
1507 /**1510 /**
1508- * Allocates shared resources based on conditions,1511+ * Allocates a shared resource ID based on the data that matches the specified predicates.
1509- * and shares data with the specified privilege to participants.1512+ * This API uses an asynchronous callback to return the result.
1510 *1513 *
1511- * @param { string } storeId - Indicates relational store name.1514+ * @param { string } storeId - Name of the RDB store.
1512- * @param { relationalStore.RdbPredicates } predicates - See {@link relationalStore.RdbPredicates}.1515+ * @param { relationalStore.RdbPredicates } predicates - Predicates for matching the data to share.
1513- * @param { Array<Participant> } participants - Participants to share.1516+ * @param { Array<Participant> } participants - Participants of the share.
1514- * @param { AsyncCallback<relationalStore.ResultSet> } callback - Indicates the1517+ * @param { AsyncCallback<relationalStore.ResultSet> } callback - Callback used to return the result.
1515- * callback invoked to return the {@link relationalStore.ResultSet}.1518+ * @throws { BusinessError } 202 - Permission verification failed,
1516- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1519+ * application which is not a system application uses system API.
1517- * uses system API.1520+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1518- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 21521+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1519- * . Incorrect parameter types;
1520- * 3. Parameter verification failed.
1521 * @throws { BusinessError } 801 - Capability not supported.1522 * @throws { BusinessError } 801 - Capability not supported.
1522 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1523 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1523 * @systemapi1524 * @systemapi
@@ -1532,20 +1533,18 @@ declare namespace cloudData {
1532 ): void;1533 ): void;
1533 1534 
1534 /**1535 /**
1535- * Allocates shared resources based on conditions,1536+ * Allocates a shared resource ID based on the data that matches the specified predicates.
1536- * and shares data with the specified privilege to participants.1537+ * This API uses an asynchronous callback to return the result.
1537 *1538 *
1538- * @param { string } storeId - Indicates relational store name.1539+ * @param { string } storeId - Name of the RDB store.
1539- * @param { relationalStore.RdbPredicates } predicates - See {@link relationalStore.RdbPredicates}.1540+ * @param { relationalStore.RdbPredicates } predicates - Predicates for matching the data to share.
1540- * @param { Array<Participant> } participants - Participants to share.1541+ * @param { Array<Participant> } participants - Participants of the share.
1541- * @param { Array<string> } columns - Columns to be shared.1542+ * @param { Array<string> } columns - Columns in which the data is located.
1542- * @param { AsyncCallback<relationalStore.ResultSet> } callback - Indicates the1543+ * @param { AsyncCallback<relationalStore.ResultSet> } callback - Callback used to return the result.
1543- * callback invoked to return the {@link relationalStore.ResultSet}.1544+ * @throws { BusinessError } 202 - Permission verification failed,
1544- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1545+ * application which is not a system application uses system API.
1545- * uses system API.1546+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1546- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 21547+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1547- * . Incorrect parameter types;
1548- * 3. Parameter verification failed.
1549 * @throws { BusinessError } 801 - Capability not supported.1548 * @throws { BusinessError } 801 - Capability not supported.
1550 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1549 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1551 * @systemapi1550 * @systemapi
@@ -1561,18 +1560,16 @@ declare namespace cloudData {
1561 ): void;1560 ): void;
1562 1561 
1563 /**1562 /**
1564- * Shares data with the specified privilege to participants.1563+ * Shares data based on the specified shared resource ID and participants.
1564+ * This API uses an asynchronous callback to return the result.
1565 *1565 *
1566- * @param { string } sharingResource - Indicates the sharing resource.1566+ * @param { string } sharingResource - Shared resource ID.
1567- * @param { Array<Participant> } participants - Indicates the participants1567+ * @param { Array<Participant> } participants - Participants of the share.
1568- * involved in the data sharing.1568+ * @param { AsyncCallback<Result<Array<Result<Participant>>>> } callback - Callback used to return the result.
1569- * @param { AsyncCallback<Result<Array<Result<Participant>>>> } callback - Indicates the1569+ * @throws { BusinessError } 202 - Permission verification failed,
1570- * callback invoked to return the result.1570+ * application which is not a system application uses system API.
1571- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1571+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1572- * uses system API.1572+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1573- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2
1574- * . Incorrect parameter types;
1575- * 3. Parameter verification failed.
1576 * @throws { BusinessError } 801 - Capability not supported.1573 * @throws { BusinessError } 801 - Capability not supported.
1577 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1574 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1578 * @systemapi1575 * @systemapi
@@ -1586,17 +1583,16 @@ declare namespace cloudData {
1586 ): void;1583 ): void;
1587 1584 
1588 /**1585 /**
1589- * Shares data with the specified privilege to participants.1586+ * Shares data based on the specified shared resource ID and participants.
1587+ * This API uses a promise to return the result.
1590 *1588 *
1591- * @param { string } sharingResource - Indicates the sharing resource.1589+ * @param { string } sharingResource - Shared resource ID.
1592- * @param { Array<Participant> } participants - Indicates the participants1590+ * @param { Array<Participant> } participants - Participants of the share.
1593- * involved in the data sharing.1591+ * @returns { Promise<Result<Array<Result<Participant>>>> } Promise used to return the result.
1594- * @returns { Promise<Result<Array<Result<Participant>>>> } - Promise used to return the result.1592+ * @throws { BusinessError } 202 - Permission verification failed,
1595- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1593+ * application which is not a system application uses system API.
1596- * uses system API.1594+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1597- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 21595+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1598- * . Incorrect parameter types;
1599- * 3. Parameter verification failed.
1600 * @throws { BusinessError } 801 - Capability not supported.1596 * @throws { BusinessError } 801 - Capability not supported.
1601 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1597 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1602 * @systemapi1598 * @systemapi
@@ -1609,18 +1605,16 @@ declare namespace cloudData {
1609 ): Promise<Result<Array<Result<Participant>>>>;1605 ): Promise<Result<Array<Result<Participant>>>>;
1610 1606 
1611 /**1607 /**
1612- * UnShares data.1608+ * Unshares data based on the specified shared resource ID and participants.
1609+ * This API uses an asynchronous callback to return the result.
1613 *1610 *
1614- * @param { string } sharingResource - Indicates the sharing resource.1611+ * @param { string } sharingResource - Shared resource ID.
1615- * @param { Array<Participant> } participants - Indicates the participants1612+ * @param { Array<Participant> } participants - Participants of the share.
1616- * involved.1613+ * @param { AsyncCallback<Result<Array<Result<Participant>>>> } callback - Callback used to return the result.
1617- * @param { AsyncCallback<Result<Array<Result<Participant>>>> } callback - Indicates the callback invoked1614+ * @throws { BusinessError } 202 - Permission verification failed,
1618- * to return the result.1615+ * application which is not a system application uses system API.
1619- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1616+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1620- * uses system API.1617+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1621- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2
1622- * . Incorrect parameter types;
1623- * 3. Parameter verification failed.
1624 * @throws { BusinessError } 801 - Capability not supported.1618 * @throws { BusinessError } 801 - Capability not supported.
1625 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1619 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1626 * @systemapi1620 * @systemapi
@@ -1634,17 +1628,16 @@ declare namespace cloudData {
1634 ): void;1628 ): void;
1635 1629 
1636 /**1630 /**
1637- * UnShares data.1631+ * Unshares data based on the specified shared resource ID and participants.
1632+ * This API uses a promise to return the result.
1638 *1633 *
1639- * @param { string } sharingResource - Indicates the sharing resource.1634+ * @param { string } sharingResource - Shared resource ID.
1640- * @param { Array<Participant> } participants - Indicates the participants1635+ * @param { Array<Participant> } participants - Participants of the share.
1641- * involved.1636+ * @returns { Promise<Result<Array<Result<Participant>>>> } Promise used to return the result.
1642- * @returns { Promise<Result<Array<Result<Participant>>>> } - Promise used to return the result.1637+ * @throws { BusinessError } 202 - Permission verification failed,
1643- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1638+ * application which is not a system application uses system API.
1644- * uses system API.1639+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1645- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 21640+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1646- * . Incorrect parameter types;
1647- * 3. Parameter verification failed.
1648 * @throws { BusinessError } 801 - Capability not supported.1641 * @throws { BusinessError } 801 - Capability not supported.
1649 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1642 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1650 * @systemapi1643 * @systemapi
@@ -1657,15 +1650,15 @@ declare namespace cloudData {
1657 ): Promise<Result<Array<Result<Participant>>>>;1650 ): Promise<Result<Array<Result<Participant>>>>;
1658 1651 
1659 /**1652 /**
1660- * Exit sharing.1653+ * Exits the share of the specified shared resource.
1654+ * This API uses an asynchronous callback to return the result.
1661 *1655 *
1662- * @param { string } sharingResource - Indicates the sharing resource.1656+ * @param { string } sharingResource - Shared resource ID.
1663- * @param { AsyncCallback<Result<void>> } callback - The callback of exit.1657+ * @param { AsyncCallback<Result<void>> } callback - Callback used to return the result.
1664- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1658+ * @throws { BusinessError } 202 - Permission verification failed,
1665- * uses system API.1659+ * application which is not a system application uses system API.
1666- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 21660+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1667- * . Incorrect parameter types;1661+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1668- * 3. Parameter verification failed.
1669 * @throws { BusinessError } 801 - Capability not supported.1662 * @throws { BusinessError } 801 - Capability not supported.
1670 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1663 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1671 * @systemapi1664 * @systemapi
@@ -1675,15 +1668,15 @@ declare namespace cloudData {
1675 function exit(sharingResource: string, callback: AsyncCallback<Result<void>>): void;1668 function exit(sharingResource: string, callback: AsyncCallback<Result<void>>): void;
1676 1669 
1677 /**1670 /**
1678- * Exit sharing.1671+ * Exits the share of the specified shared resource.
1672+ * This API uses a promise to return the result.
1679 *1673 *
1680- * @param { string } sharingResource - Indicates the sharing resource.1674+ * @param { string } sharingResource - Shared resource ID.
1681- * @returns { Promise<Result<void>> } - The promise returned by the function.1675+ * @returns { Promise<Result<void>> } Promise used to return the result.
1682- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1676+ * @throws { BusinessError } 202 - Permission verification failed,
1683- * uses system API.1677+ * application which is not a system application uses system API.
1684- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 21678+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1685- * . Incorrect parameter types;1679+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1686- * 3. Parameter verification failed.
1687 * @throws { BusinessError } 801 - Capability not supported.1680 * @throws { BusinessError } 801 - Capability not supported.
1688 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1681 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1689 * @systemapi1682 * @systemapi
@@ -1693,18 +1686,16 @@ declare namespace cloudData {
1693 function exit(sharingResource: string): Promise<Result<void>>;1686 function exit(sharingResource: string): Promise<Result<void>>;
1694 1687 
1695 /**1688 /**
1696- * Changes the permissions for the shared data.1689+ * Changes the privilege on the shared data.
1690+ * This API uses an asynchronous callback to return the result.
1697 *1691 *
1698- * @param { string } sharingResource - Indicates the sharing resource.1692+ * @param { string } sharingResource - Shared resource ID.
1699- * @param { Array<Participant> } participants - Indicates the participants1693+ * @param { Array<Participant> } participants - Participants of the share.
1700- * whose permissions are to be changed.1694+ * @param { AsyncCallback<Result<Array<Result<Participant>>>> } callback - Callback used to return the result.
1701- * @param { AsyncCallback<Result<Array<Result<Participant>>>> } callback - Indicates the1695+ * @throws { BusinessError } 202 - Permission verification failed,
1702- * callback invoked to return the result.1696+ * application which is not a system application uses system API.
1703- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1697+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1704- * uses system API.1698+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1705- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2
1706- * . Incorrect parameter types;
1707- * 3. Parameter verification failed.
1708 * @throws { BusinessError } 801 - Capability not supported.1699 * @throws { BusinessError } 801 - Capability not supported.
1709 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1700 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1710 * @systemapi1701 * @systemapi
@@ -1718,17 +1709,16 @@ declare namespace cloudData {
1718 ): void;1709 ): void;
1719 1710 
1720 /**1711 /**
1721- * Changes the permissions for the shared data.1712+ * Changes the privilege on the shared data.
1713+ * This API uses a promise to return the result.
1722 *1714 *
1723- * @param { string } sharingResource - Indicates the sharing resource.1715+ * @param { string } sharingResource - Shared resource ID.
1724- * @param { Array<Participant> } participants - Indicates the participants1716+ * @param { Array<Participant> } participants - Participants of the share.
1725- * whose permissions are to be changed.1717+ * @returns { Promise<Result<Array<Result<Participant>>>> } Promise used to return the result.
1726- * @returns { Promise<Result<Array<Result<Participant>>>> } - Promise used to return the result.1718+ * @throws { BusinessError } 202 - Permission verification failed,
1727- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1719+ * application which is not a system application uses system API.
1728- * uses system API.1720+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1729- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 21721+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1730- * . Incorrect parameter types;
1731- * 3. Parameter verification failed.
1732 * @throws { BusinessError } 801 - Capability not supported.1722 * @throws { BusinessError } 801 - Capability not supported.
1733 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1723 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1734 * @systemapi1724 * @systemapi
@@ -1741,16 +1731,15 @@ declare namespace cloudData {
1741 ): Promise<Result<Array<Result<Participant>>>>;1731 ): Promise<Result<Array<Result<Participant>>>>;
1742 1732 
1743 /**1733 /**
1744- * Queries the participants based on the specified shared data.1734+ * Queries the participants of the specified shared data.
1735+ * This API uses an asynchronous callback to return the result.
1745 *1736 *
1746- * @param { string } sharingResource - Indicates the sharing resource.1737+ * @param { string } sharingResource - Shared resource ID.
1747- * @param { AsyncCallback<Result<Array<Participant>>> } callback - Indicates the1738+ * @param { AsyncCallback<Result<Array<Participant>>> } callback - Callback used to return the result.
1748- * callback invoked to return the participants obtained.1739+ * @throws { BusinessError } 202 - Permission verification failed,
1749- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1740+ * application which is not a system application uses system API.
1750- * uses system API.1741+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1751- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 21742+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1752- * . Incorrect parameter types;
1753- * 3. Parameter verification failed.
1754 * @throws { BusinessError } 801 - Capability not supported.1743 * @throws { BusinessError } 801 - Capability not supported.
1755 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1744 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1756 * @systemapi1745 * @systemapi
@@ -1760,15 +1749,15 @@ declare namespace cloudData {
1760 function queryParticipants(sharingResource: string, callback: AsyncCallback<Result<Array<Participant>>>): void;1749 function queryParticipants(sharingResource: string, callback: AsyncCallback<Result<Array<Participant>>>): void;
1761 1750 
1762 /**1751 /**
1763- * Queries the participants based on the specified shared data.1752+ * Queries the participants of the specified shared data.
1753+ * This API uses a promise to return the result.
1764 *1754 *
1765- * @param { string } sharingResource - Indicates the sharing resource.1755+ * @param { string } sharingResource - Shared resource ID.
1766- * @returns { Promise<Result<Array<Participant>>> } - Promise used to return the result.1756+ * @returns { Promise<Result<Array<Participant>>> } Promise used to return the participants obtained.
1767- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1757+ * @throws { BusinessError } 202 - Permission verification failed,
1768- * uses system API.1758+ * application which is not a system application uses system API.
1769- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 21759+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1770- * . Incorrect parameter types;1760+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1771- * 3. Parameter verification failed.
1772 * @throws { BusinessError } 801 - Capability not supported.1761 * @throws { BusinessError } 801 - Capability not supported.
1773 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1762 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1774 * @systemapi1763 * @systemapi
@@ -1778,16 +1767,15 @@ declare namespace cloudData {
1778 function queryParticipants(sharingResource: string): Promise<Result<Array<Participant>>>;1767 function queryParticipants(sharingResource: string): Promise<Result<Array<Participant>>>;
1779 1768 
1780 /**1769 /**
1781- * Queries the participants based on the specified invitation code.1770+ * Queries the participants based on the sharing invitation code.
1771+ * This API uses an asynchronous callback to return the result.
1782 *1772 *
1783- * @param { string } invitationCode - Indicates the invitation code.1773+ * @param { string } invitationCode - Invitation code.
1784- * @param { AsyncCallback<Result<Array<Participant>>> } callback - Indicates the1774+ * @param { AsyncCallback<Result<Array<Participant>>> } callback - Callback used to return the result.
1785- * callback invoked to return the participants obtained.1775+ * @throws { BusinessError } 202 - Permission verification failed,
1786- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1776+ * application which is not a system application uses system API.
1787- * uses system API.1777+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1788- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 21778+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1789- * . Incorrect parameter types;
1790- * 3. Parameter verification failed.
1791 * @throws { BusinessError } 801 - Capability not supported.1779 * @throws { BusinessError } 801 - Capability not supported.
1792 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1780 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1793 * @systemapi1781 * @systemapi
@@ -1800,15 +1788,15 @@ declare namespace cloudData {
1800 ): void;1788 ): void;
1801 1789 
1802 /**1790 /**
1803- * Queries the participants based on the specified invitation code.1791+ * Queries the participants based on the sharing invitation code.
1792+ * This API uses a promise to return the result.
1804 *1793 *
1805- * @param { string } invitationCode - Indicates the invitation code.1794+ * @param { string } invitationCode - Invitation code.
1806- * @returns { Promise<Result<Array<Participant>>> } - Promise used to return the result.1795+ * @returns { Promise<Result<Array<Participant>>> } Promise used to return the participants obtained.
1807- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1796+ * @throws { BusinessError } 202 - Permission verification failed,
1808- * uses system API.1797+ * application which is not a system application uses system API.
1809- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 21798+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1810- * . Incorrect parameter types;1799+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1811- * 3. Parameter verification failed.
1812 * @throws { BusinessError } 801 - Capability not supported.1800 * @throws { BusinessError } 801 - Capability not supported.
1813 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1801 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1814 * @systemapi1802 * @systemapi
@@ -1818,17 +1806,16 @@ declare namespace cloudData {
1818 function queryParticipantsByInvitation(invitationCode: string): Promise<Result<Array<Participant>>>;1806 function queryParticipantsByInvitation(invitationCode: string): Promise<Result<Array<Participant>>>;
1819 1807 
1820 /**1808 /**
1821- * Confirms the invitation of cloud sharing.1809+ * Confirms the invitation based on the sharing invitation code and obtains the shared resource ID.
1810+ * This API uses an asynchronous callback to return the result.
1822 *1811 *
1823- * @param { string } invitationCode - Indicates the invitation code.1812+ * @param { string } invitationCode - Invitation code of the share.
1824- * @param { State } state - Indicates the state of invitation.1813+ * @param { State } state - Confirmation state.
1825- * @param { AsyncCallback<Result<string>> } callback - Indicates the callback1814+ * @param { AsyncCallback<Result<string>> } callback - Callback used to return the shared resource ID.
1826- * invoked to return the sharing resource.1815+ * @throws { BusinessError } 202 - Permission verification failed,
1827- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1816+ * application which is not a system application uses system API.
1828- * uses system API.1817+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1829- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 21818+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1830- * . Incorrect parameter types;
1831- * 3. Parameter verification failed.
1832 * @throws { BusinessError } 801 - Capability not supported.1819 * @throws { BusinessError } 801 - Capability not supported.
1833 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1820 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1834 * @systemapi1821 * @systemapi
@@ -1838,16 +1825,16 @@ declare namespace cloudData {
1838 function confirmInvitation(invitationCode: string, state: State, callback: AsyncCallback<Result<string>>): void;1825 function confirmInvitation(invitationCode: string, state: State, callback: AsyncCallback<Result<string>>): void;
1839 1826 
1840 /**1827 /**
1841- * Confirms the invitation of cloud sharing.1828+ * Confirms the invitation based on the sharing invitation code and obtains the shared resource ID.
1829+ * This API uses a promise to return the result.
1842 *1830 *
1843- * @param { string } invitationCode - Indicates the invitation code.1831+ * @param { string } invitationCode - Invitation code of the share.
1844- * @param { State } state - Indicates the state of invitation.1832+ * @param { State } state - Confirmation state.
1845- * @returns { Promise<Result<string>> } - Promise used to return the sharing resource.1833+ * @returns { Promise<Result<string>> } Promise used to return the shared resource ID.
1846- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1834+ * @throws { BusinessError } 202 - Permission verification failed,
1847- * uses system API.1835+ * application which is not a system application uses system API.
1848- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 21836+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1849- * . Incorrect parameter types;1837+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1850- * 3. Parameter verification failed.
1851 * @throws { BusinessError } 801 - Capability not supported.1838 * @throws { BusinessError } 801 - Capability not supported.
1852 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1839 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1853 * @systemapi1840 * @systemapi
@@ -1857,16 +1844,16 @@ declare namespace cloudData {
1857 function confirmInvitation(invitationCode: string, state: State): Promise<Result<string>>;1844 function confirmInvitation(invitationCode: string, state: State): Promise<Result<string>>;
1858 1845 
1859 /**1846 /**
1860- * Changes confirmation of shared record.1847+ * Changes the invitation confirmation state based on the shared resource ID.
1848+ * This API uses an asynchronous callback to return the result.
1861 *1849 *
1862- * @param { string } sharingResource - Indicates the sharing resource.1850+ * @param { string } sharingResource - Shared resource ID.
1863- * @param { State } state - Indicates the state of invitation.1851+ * @param { State } state - Confirmation state.
1864- * @param { AsyncCallback<Result<void>> } callback - Indicates the callback.1852+ * @param { AsyncCallback<Result<void>> } callback - Callback used to return the result.
1865- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1853+ * @throws { BusinessError } 202 - Permission verification failed,
1866- * uses system API.1854+ * application which is not a system application uses system API.
1867- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 21855+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1868- * . Incorrect parameter types;1856+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1869- * 3. Parameter verification failed.
1870 * @throws { BusinessError } 801 - Capability not supported.1857 * @throws { BusinessError } 801 - Capability not supported.
1871 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1858 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1872 * @systemapi1859 * @systemapi
@@ -1876,16 +1863,16 @@ declare namespace cloudData {
1876 function changeConfirmation(sharingResource: string, state: State, callback: AsyncCallback<Result<void>>): void;1863 function changeConfirmation(sharingResource: string, state: State, callback: AsyncCallback<Result<void>>): void;
1877 1864 
1878 /**1865 /**
1879- * Changes confirmation of shared record.1866+ * Changes the invitation confirmation state based on the shared resource ID.
1867+ * This API uses a promise to return the result.
1880 *1868 *
1881- * @param { string } sharingResource - Indicates the sharing resource.1869+ * @param { string } sharingResource - Shared resource ID.
1882- * @param { State } state - Indicates the state of invitation.1870+ * @param { State } state - Confirmation state.
1883- * @returns { Promise<Result<void>> } - The promise returned by the function.1871+ * @returns { Promise<Result<void>> } Promise used to return the result.
1884- * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application1872+ * @throws { BusinessError } 202 - Permission verification failed,
1885- * uses system API.1873+ * application which is not a system application uses system API.
1886- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 21874+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1887- * . Incorrect parameter types;1875+ * 2. Incorrect parameter types; 3. Parameter verification failed.
1888- * 3. Parameter verification failed.
1889 * @throws { BusinessError } 801 - Capability not supported.1876 * @throws { BusinessError } 801 - Capability not supported.
1890 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client1877 * @syscap SystemCapability.DistributedDataManager.CloudSync.Client
1891 * @systemapi1878 * @systemapi
Mapi/@ohos.data.cloudExtension.d.ts+247-218
Mapi/@ohos.data.commonType.d.ts+19-19
@@ -19,7 +19,7 @@
19 */19 */
20 20 
21/**21/**
22- * Indicates the common data types.22+ * The commonType module defines common data types in data management.
23 *23 *
24 * @syscap SystemCapability.DistributedDataManager.CommonType24 * @syscap SystemCapability.DistributedDataManager.CommonType
25 * @crossplatform25 * @crossplatform
@@ -28,7 +28,7 @@
28 */28 */
29declare namespace commonType {29declare namespace commonType {
30 /**30 /**
31- * Describes the status of asset.31+ * Enumerates the asset statuses.
32 *32 *
33 * @syscap SystemCapability.DistributedDataManager.CommonType33 * @syscap SystemCapability.DistributedDataManager.CommonType
34 * @crossplatform34 * @crossplatform
@@ -37,7 +37,7 @@ declare namespace commonType {
37 */37 */
38 enum AssetStatus {38 enum AssetStatus {
39 /**39 /**
40- * Means the status of asset is normal.40+ * The asset is in normal status.
41 *41 *
42 * @syscap SystemCapability.DistributedDataManager.CommonType42 * @syscap SystemCapability.DistributedDataManager.CommonType
43 * @crossplatform43 * @crossplatform
@@ -47,7 +47,7 @@ declare namespace commonType {
47 ASSET_NORMAL,47 ASSET_NORMAL,
48 48 
49 /**49 /**
50- * Means the asset needs to be inserted.50+ * The asset is to be inserted to the cloud.
51 *51 *
52 * @syscap SystemCapability.DistributedDataManager.CommonType52 * @syscap SystemCapability.DistributedDataManager.CommonType
53 * @crossplatform53 * @crossplatform
@@ -57,7 +57,7 @@ declare namespace commonType {
57 ASSET_INSERT,57 ASSET_INSERT,
58 58 
59 /**59 /**
60- * Means the asset needs to be updated.60+ * The asset is to be updated to the cloud.
61 *61 *
62 * @syscap SystemCapability.DistributedDataManager.CommonType62 * @syscap SystemCapability.DistributedDataManager.CommonType
63 * @crossplatform63 * @crossplatform
@@ -67,7 +67,7 @@ declare namespace commonType {
67 ASSET_UPDATE,67 ASSET_UPDATE,
68 68 
69 /**69 /**
70- * Means the asset needs to be deleted.70+ * The asset is to be deleted from the cloud.
71 *71 *
72 * @syscap SystemCapability.DistributedDataManager.CommonType72 * @syscap SystemCapability.DistributedDataManager.CommonType
73 * @crossplatform73 * @crossplatform
@@ -77,7 +77,7 @@ declare namespace commonType {
77 ASSET_DELETE,77 ASSET_DELETE,
78 78 
79 /**79 /**
80- * Means the status of asset is abnormal.80+ * The asset is in abnormal status.
81 *81 *
82 * @syscap SystemCapability.DistributedDataManager.CommonType82 * @syscap SystemCapability.DistributedDataManager.CommonType
83 * @crossplatform83 * @crossplatform
@@ -87,7 +87,7 @@ declare namespace commonType {
87 ASSET_ABNORMAL,87 ASSET_ABNORMAL,
88 88 
89 /**89 /**
90- * Means the status of asset is downloading.90+ * The asset is being downloaded to a local device.
91 *91 *
92 * @syscap SystemCapability.DistributedDataManager.CommonType92 * @syscap SystemCapability.DistributedDataManager.CommonType
93 * @crossplatform93 * @crossplatform
@@ -98,7 +98,7 @@ declare namespace commonType {
98 }98 }
99 99 
100 /**100 /**
101- * Information of the asset.101+ * Represents asset (such as a file, image, or video) information.
102 *102 *
103 * @syscap SystemCapability.DistributedDataManager.CommonType103 * @syscap SystemCapability.DistributedDataManager.CommonType
104 * @crossplatform104 * @crossplatform
@@ -107,7 +107,7 @@ declare namespace commonType {
107 */107 */
108 interface Asset {108 interface Asset {
109 /**109 /**
110- * The name of asset.110+ * Asset name.
111 *111 *
112 * @syscap SystemCapability.DistributedDataManager.CommonType112 * @syscap SystemCapability.DistributedDataManager.CommonType
113 * @crossplatform113 * @crossplatform
@@ -117,7 +117,7 @@ declare namespace commonType {
117 name: string;117 name: string;
118 118 
119 /**119 /**
120- * The uri of asset.120+ * Asset URI, which is an absolute path in the system.
121 *121 *
122 * @syscap SystemCapability.DistributedDataManager.CommonType122 * @syscap SystemCapability.DistributedDataManager.CommonType
123 * @crossplatform123 * @crossplatform
@@ -127,7 +127,7 @@ declare namespace commonType {
127 uri: string;127 uri: string;
128 128 
129 /**129 /**
130- * The path of asset.130+ * Application sandbox path of the asset.
131 *131 *
132 * @syscap SystemCapability.DistributedDataManager.CommonType132 * @syscap SystemCapability.DistributedDataManager.CommonType
133 * @crossplatform133 * @crossplatform
@@ -137,7 +137,7 @@ declare namespace commonType {
137 path: string;137 path: string;
138 138 
139 /**139 /**
140- * The created time of asset.140+ * Time when the asset was created.
141 *141 *
142 * @syscap SystemCapability.DistributedDataManager.CommonType142 * @syscap SystemCapability.DistributedDataManager.CommonType
143 * @crossplatform143 * @crossplatform
@@ -147,7 +147,7 @@ declare namespace commonType {
147 createTime: string;147 createTime: string;
148 148 
149 /**149 /**
150- * The modified time of asset. If this field changes, the asset is considered to have changed.150+ * Time when the asset was last modified.
151 *151 *
152 * @syscap SystemCapability.DistributedDataManager.CommonType152 * @syscap SystemCapability.DistributedDataManager.CommonType
153 * @crossplatform153 * @crossplatform
@@ -157,7 +157,7 @@ declare namespace commonType {
157 modifyTime: string;157 modifyTime: string;
158 158 
159 /**159 /**
160- * The size of asset. If this field changes, the asset is considered to have changed.160+ * Size of the asset. If this field changes, the asset is considered to have changed.
161 *161 *
162 * @syscap SystemCapability.DistributedDataManager.CommonType162 * @syscap SystemCapability.DistributedDataManager.CommonType
163 * @crossplatform163 * @crossplatform
@@ -167,7 +167,7 @@ declare namespace commonType {
167 size: string;167 size: string;
168 168 
169 /**169 /**
170- * The status of asset.170+ * Asset status. The default value is ASSET_NORMAL.
171 *171 *
172 * @syscap SystemCapability.DistributedDataManager.CommonType172 * @syscap SystemCapability.DistributedDataManager.CommonType
173 * @crossplatform173 * @crossplatform
@@ -178,7 +178,7 @@ declare namespace commonType {
178 }178 }
179 179 
180 /**180 /**
181- * Indicates several assets181+ * Represents an array of Assets.
182 *182 *
183 * @syscap SystemCapability.DistributedDataManager.CommonType183 * @syscap SystemCapability.DistributedDataManager.CommonType
184 * @crossplatform184 * @crossplatform
@@ -188,7 +188,7 @@ declare namespace commonType {
188 type Assets = Array<Asset>;188 type Assets = Array<Asset>;
189 189 
190 /**190 /**
191- * Indicates possible value types.191+ * Enumerates the value types, which vary with the parameter function.
192 *192 *
193 * @unionmember { null } The value is null.193 * @unionmember { null } The value is null.
194 * @unionmember { long } The value is a 64-bit integer (int64_t).194 * @unionmember { long } The value is a 64-bit integer (int64_t).
@@ -206,7 +206,7 @@ declare namespace commonType {
206 type ValueType = null | long | double | string | boolean | Uint8Array | Asset | Assets;206 type ValueType = null | long | double | string | boolean | Uint8Array | Asset | Assets;
207 207 
208 /**208 /**
209- * Values in buckets are stored in key-value pairs.209+ * Defines the types of the key and value in a KV pair.
210 *210 *
211 * @syscap SystemCapability.DistributedDataManager.CommonType211 * @syscap SystemCapability.DistributedDataManager.CommonType
212 * @crossplatform212 * @crossplatform
Mapi/@ohos.data.distributedDataObject.d.ts+71-171
@@ -23,9 +23,9 @@ import type Context from './application/BaseContext';
23import commonType from '@ohos.data.commonType';23import commonType from '@ohos.data.commonType';
24 24 
25/**25/**
26- * The **distributedDataObject** module provides basic data object management, including creating, querying, deleting, 26+ * The distributedDataObject module provides basic data object management, including creating, querying, deleting,
27- * modifying, and subscribing to data objects, and distributed data object collaboration for the same application among 27+ * modifying, and subscribing to data objects, and distributed data object collaboration for the same application among
28- * multiple devices. Although this module does not parse user data, you are advised not to transfer sensitive personal 28+ * multiple devices. Although this module does not parse user data, you are advised not to transfer sensitive personal
29 * data or privacy data due to low-level security of storage path.29 * data or privacy data due to low-level security of storage path.
30 *30 *
31 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject31 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
@@ -34,7 +34,7 @@ import commonType from '@ohos.data.commonType';
34 */34 */
35declare namespace distributedDataObject {35declare namespace distributedDataObject {
36 /**36 /**
37- * Represents the information about the joint asset in the RDB store to bind. Currently, only the RDB stores are 37+ * Represents the information about the joint asset in the RDB store to bind. Currently, only the RDB stores are
38 * supported.38 * supported.
39 *39 *
40 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject40 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
@@ -104,9 +104,8 @@ declare namespace distributedDataObject {
104 * Creates a distributed data object. The object properties support basic types (number, Boolean, and string) and 104 * Creates a distributed data object. The object properties support basic types (number, Boolean, and string) and
105 * complex types (array and nested basic types).105 * complex types (array and nested basic types).
106 *106 *
107- * @param { Context } context - Application context.<br>For details about the application context of the FA model, see107+ * @param { Context } context - Application context. For details about the application context of the FA model,
108- * [Context]{@link ./app/context}.<br>For details about the application context of the stage model, see108+ * see Context.For details about the application context of the stage model, see Context.
109- * [Context]{@link ./application/UIAbilityContext:UIAbilityContext}.
110 * @param { object } source - Properties of the distributed data object.109 * @param { object } source - Properties of the distributed data object.
111 * @returns { DataObject } Distributed data object created.110 * @returns { DataObject } Distributed data object created.
112 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;111 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
@@ -128,8 +127,7 @@ declare namespace distributedDataObject {
128 function genSessionId(): string;127 function genSessionId(): string;
129 128 
130 /**129 /**
131- * Represents the information returned by the callback of 130+ * Represents the information returned by the callback of save.
132- * [save]{@link distributedDataObject.DataObject.save(deviceId: string, callback: AsyncCallback<SaveSuccessResponse>)}
133 * .131 * .
134 *132 *
135 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject133 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
@@ -156,7 +154,7 @@ declare namespace distributedDataObject {
156 version: int;154 version: int;
157 155 
158 /**156 /**
159- * ID of the device where the distributed data object is stored. The value **local** indicates a local device.157+ * ID of the device where the distributed data object is stored. The value local indicates a local device.
160 *158 *
161 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject159 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
162 * @since 9 dynamic160 * @since 9 dynamic
@@ -166,9 +164,7 @@ declare namespace distributedDataObject {
166 }164 }
167 165 
168 /**166 /**
169- * Represents the information returned by the callback of 167+ * Represents the information returned by the callback of revokeSave.
170- * [revokeSave]{@link distributedDataObject.DataObject.revokeSave(callback: AsyncCallback<RevokeSaveSuccessResponse>)}
171- * .
172 *168 *
173 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject169 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
174 * @since 9 dynamic170 * @since 9 dynamic
@@ -228,9 +224,8 @@ declare namespace distributedDataObject {
228 type ProgressObserver = (sessionId: string, progress: int) => void;224 type ProgressObserver = (sessionId: string, progress: int) => void;
229 225 
230 /**226 /**
231- * Provides APIs for managing a distributed data object. Before using any API of this class, use 227+ * Provides APIs for managing a distributed data object. Before using any API of this class, use
232- * [createDistributedObject()]{@link distributedDataObject.createDistributedObject} to create a **DistributedObject** 228+ * createDistributedObject() to create a DistributedObject object.
233- * object.
234 *229 *
235 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject230 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
236 * @since 8 dynamiconly231 * @since 8 dynamiconly
@@ -244,9 +239,8 @@ declare namespace distributedDataObject {
244 *239 *
245 * @permission ohos.permission.DISTRIBUTED_DATASYNC240 * @permission ohos.permission.DISTRIBUTED_DATASYNC
246 * @param { string } sessionId - ID of a distributed data object on a trusted network. To remove a distributed data241 * @param { string } sessionId - ID of a distributed data object on a trusted network. To remove a distributed data
247- * object from the network, set this parameter to **""** or leave it empty.242+ * object from the network, set this parameter to "" or leave it empty.
248- * @returns { boolean } Returns **true** if the session ID is set successfully;243+ * @returns { boolean } Returns true if the session ID is set successfully; returns false otherwise.
249- * <br>returns **false** otherwise.
250 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject244 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
251 * @since 8 dynamiconly245 * @since 8 dynamiconly
252 * @deprecated since 9246 * @deprecated since 9
@@ -257,10 +251,10 @@ declare namespace distributedDataObject {
257 /**251 /**
258 * Subscribes to data changes of this distributed data object.252 * Subscribes to data changes of this distributed data object.
259 *253 *
260- * @param { 'change' } type - Event type. The value is **'change'**, which indicates data changes.254+ * @param { 'change' } type - Event type. The value is 'change', which indicates data changes.
261- * @param { Function } callback - Callback used to return the changes of the distributed data object.<br>255+ * @param { Function } callback - Callback used to return the changes of the distributed data object. sessionId
262- * **sessionId** indicates the session ID of the distributed data object.<br>**fields** indicates the changed256+ * indicates the session ID of the distributed data object. fields indicates the changed properties of the
263- * properties of the distributed data object.257+ * distributed data object.
264 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject258 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
265 * @since 8 dynamiconly259 * @since 8 dynamiconly
266 * @deprecated since 9260 * @deprecated since 9
@@ -271,10 +265,10 @@ declare namespace distributedDataObject {
271 /**265 /**
272 * Unsubscribes from data changes of this distributed data object.266 * Unsubscribes from data changes of this distributed data object.
273 *267 *
274- * @param { 'change' } type - Event type. The value is **'change'**, which indicates data changes.268+ * @param { 'change' } type - Event type. The value is 'change', which indicates data changes.
275 * @param { Function } callback - Callback to unregister. If this parameter is not specified, this API unsubscribes269 * @param { Function } callback - Callback to unregister. If this parameter is not specified, this API unsubscribes
276- * from all callbacks for data changes of this distributed object.<br>**sessionId** indicates the session ID of270+ * from all callbacks for data changes of this distributed object.sessionId indicates the session ID of the
277- * the distributed data object.<br>**fields** indicates the changed properties of the distributed data object.271+ * distributed data object. fields indicates the changed properties of the distributed data object.
278 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject272 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
279 * @since 8 dynamiconly273 * @since 8 dynamiconly
280 * @deprecated since 9274 * @deprecated since 9
@@ -285,11 +279,11 @@ declare namespace distributedDataObject {
285 /**279 /**
286 * Subscribes to status changes of this distributed data object.280 * Subscribes to status changes of this distributed data object.
287 *281 *
288- * @param { 'status' } type - Event type. The value is **'status'**, which indicates the status change (online or282+ * @param { 'status' } type - Event type. The value is 'status', which indicates the status change (online or
289 * offline) of the distributed object.283 * offline) of the distributed object.
290- * @param { Function } callback - Callback used to return the status change.<br>**sessionId** indicates the session284+ * @param { Function } callback - Callback used to return the status change. sessionId indicates the session ID of
291- * ID of the distributed data object.<br>**networkId** identifies the device.<br>**status** indicates the object285+ * the distributed data object. networkId identifies the device. status indicates the object status, which can
292- * status, which can be online or offline.286+ * be online or offline.
293 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject287 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
294 * @since 8 dynamiconly288 * @since 8 dynamiconly
295 * @deprecated since 9289 * @deprecated since 9
@@ -303,12 +297,12 @@ declare namespace distributedDataObject {
303 /**297 /**
304 * Unsubscribes from the status change of this distributed data object.298 * Unsubscribes from the status change of this distributed data object.
305 *299 *
306- * @param { 'status' } type - Event type. The value is **'status'**, which indicates the status change (online or300+ * @param { 'status' } type - Event type. The value is 'status', which indicates the status change (online or
307 * offline) of the distributed object.301 * offline) of the distributed object.
308 * @param { Function } callback - Callback to unregister. If this parameter is not specified, this API unsubscribes302 * @param { Function } callback - Callback to unregister. If this parameter is not specified, this API unsubscribes
309- * from all callbacks for status changes of this distributed object.<br>**sessionId** indicates the session ID303+ * from all callbacks for status changes of this distributed object. sessionId indicates the session ID of the
310- * of the distributed data object.<br>**networkId** identifies the distributed data object.<br>**status**304+ * distributed data object. networkId identifies the distributed data object. status indicates the object
311- * indicates the object status, which can be online or offline.305+ * status, which can be online or offline.
312 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject306 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
313 * @since 8 dynamiconly307 * @since 8 dynamiconly
314 * @deprecated since 9308 * @deprecated since 9
@@ -321,8 +315,8 @@ declare namespace distributedDataObject {
321 }315 }
322 316 
323 /**317 /**
324- * Provides APIs for managing a distributed data object. Before using any API of this class, use 318+ * Provides APIs for managing a distributed data object. Before using any API of this class, use create() to create a
325- * [create()]{@link distributedDataObject.create} to create a **DataObject** object.319+ * DataObject object.
326 *320 *
327 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject321 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
328 * @since 9 dynamic322 * @since 9 dynamic
@@ -330,14 +324,14 @@ declare namespace distributedDataObject {
330 */324 */
331 interface DataObject {325 interface DataObject {
332 /**326 /**
333- * Sets a session ID. This API uses an asynchronous callback to return the result. For the devices in the 327+ * Sets a session ID. This API uses an asynchronous callback to return the result. For the devices in the
334- * collaboration state in a trusted network, data of the distributed objects with the same session ID can be 328+ * collaboration state in a trusted network, data of the distributed objects with the same session ID can be
335 * automatically synced across devices.329 * automatically synced across devices.
336 *330 *
337 * @permission ohos.permission.DISTRIBUTED_DATASYNC331 * @permission ohos.permission.DISTRIBUTED_DATASYNC
338 * @param {string} sessionId - ID of a distributed data object on a trusted network. The value can contain only332 * @param {string} sessionId - ID of a distributed data object on a trusted network. The value can contain only
339- * letters, digits, and underscores (_), and cannot exceed 128 characters. If this parameter is set to **""** or333+ * letters, digits, and underscores (_), and cannot exceed 128 characters. If this parameter is set to "" or
340- * **null**, the distributed data object exits the network.334+ * null, the distributed data object exits the network.
341 * @param {AsyncCallback<void>} callback - Asynchronous callback invoked when the session ID is successfully set.335 * @param {AsyncCallback<void>} callback - Asynchronous callback invoked when the session ID is successfully set.
342 * @throws {BusinessError} 201 - Permission verification failed.336 * @throws {BusinessError} 201 - Permission verification failed.
343 * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Incorrect parameter types;337 * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Incorrect parameter types;
@@ -365,14 +359,14 @@ declare namespace distributedDataObject {
365 359 
366 /**360 /**
367 * Sets a session ID or exits the distributed network. This API uses a promise to return the result. If this 361 * Sets a session ID or exits the distributed network. This API uses a promise to return the result. If this
368- * parameter is set to **""** or **null**, or left empty, the distributed data object exits the network. For the 362+ * parameter is set to "" or null, or left empty, the distributed data object exits the network. For the devices in
369- * devices in the collaboration state in a trusted network, data of the distributed objects with the same session ID363+ * the collaboration state in a trusted network, data of the distributed objects with the same session ID can be
370- * can be automatically synced across devices.364+ * automatically synced across devices.
371 *365 *
372 * @permission ohos.permission.DISTRIBUTED_DATASYNC366 * @permission ohos.permission.DISTRIBUTED_DATASYNC
373 * @param {string} sessionId - ID of a distributed data object on a trusted network. The value can contain only367 * @param {string} sessionId - ID of a distributed data object on a trusted network. The value can contain only
374- * letters, digits, and underscores (_), and cannot exceed 128 characters. If this parameter is set to **""** or368+ * letters, digits, and underscores (_), and cannot exceed 128 characters. If this parameter is set to "" or
375- * **null**, or left empty, the distributed data object exits the network.369+ * null, or left empty, the distributed data object exits the network.
376 * @returns {Promise<void>} Promise that returns no value.370 * @returns {Promise<void>} Promise that returns no value.
377 * @throws {BusinessError} 201 - Permission verification failed.371 * @throws {BusinessError} 201 - Permission verification failed.
378 * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Incorrect parameter types;372 * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Incorrect parameter types;
@@ -387,10 +381,10 @@ declare namespace distributedDataObject {
387 /**381 /**
388 * Subscribes to data changes of this distributed data object.382 * Subscribes to data changes of this distributed data object.
389 *383 *
390- * @param { 'change' } type - Event type. The value is **'change'**, which indicates data changes.384+ * @param { 'change' } type - Event type. The value is **'change'**, which indicates data changes. sessionId
391- * @param { Function } callback - Callback used to return the changes of the distributed data object.<br>385+ * @param { Function } callback - Callback used to return the changes of the distributed data object.
392- * **sessionId** indicates the session ID of the distributed data object.<br>**fields** indicates the changed386+ * indicates the session ID of the distributed data object. fields indicates the changed properties of the
393- * properties of the distributed data object.387+ * distributed data object.
394 * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;388 * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
395 * 2. Incorrect parameter types.389 * 2. Incorrect parameter types.
396 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject390 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
@@ -401,10 +395,10 @@ declare namespace distributedDataObject {
401 /**395 /**
402 * Unsubscribes from data changes of this distributed data object.396 * Unsubscribes from data changes of this distributed data object.
403 *397 *
404- * @param { 'change' } type - Event type. The value is **'change'**, which indicates data changes.398+ * @param { 'change' } type - Event type. The value is 'change', which indicates data changes.
405 * @param { Function } callback - Callback to unregister. If this parameter is not specified, this API unsubscribes399 * @param { Function } callback - Callback to unregister. If this parameter is not specified, this API unsubscribes
406- * from all callbacks for data changes of this distributed object.<br>**sessionId** indicates the session ID of400+ * from all callbacks for data changes of this distributed object. sessionId indicates the session ID of
407- * the distributed data object.<br>**fields** indicates the changed properties of the distributed data object.401+ * the distributed data object. fields indicates the changed properties of the distributed data object.
408 * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;402 * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
409 * 2. Incorrect parameter types.403 * 2. Incorrect parameter types.
410 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject404 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
@@ -415,11 +409,11 @@ declare namespace distributedDataObject {
415 /**409 /**
416 * Subscribes to status changes of this distributed data object.410 * Subscribes to status changes of this distributed data object.
417 *411 *
418- * @param { 'status' } type - Event type. The value is **'status'**, which indicates the status change (online or412+ * @param { 'status' } type - Event type. The value is 'status', which indicates the status change (online or
419 * offline) of the distributed object.413 * offline) of the distributed object.
420- * @param { Function } callback - Callback used to return the status change.<br>**sessionId** indicates the session414+ * @param { Function } callback - Callback used to return the status change. sessionId indicates the session
421- * ID of the distributed data object.<br>**networkId** identifies the device.<br>**status** indicates the object415+ * ID of the distributed data object. networkId identifies the device. status indicates the object status,
422- * status, which can be online or offline.416+ * which can be online or offline.
423 * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;417 * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
424 * 2. Incorrect parameter types.418 * 2. Incorrect parameter types.
425 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject419 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
@@ -433,11 +427,11 @@ declare namespace distributedDataObject {
433 /**427 /**
434 * Unsubscribes from the status change of this distributed data object.428 * Unsubscribes from the status change of this distributed data object.
435 *429 *
436- * @param { 'status' } type - Event type. The value is **'status'**, which indicates the status change (online or430+ * @param { 'status' } type - Event type. The value is 'status', which indicates the status change (online or
437 * offline) of the distributed object.431 * offline) of the distributed object.
438 * @param { Function } callback - Callback to unregister. If this parameter is not specified, this API unsubscribes432 * @param { Function } callback - Callback to unregister. If this parameter is not specified, this API unsubscribes
439- * from all callbacks for status changes of this distributed object.<br>**sessionId** indicates the session ID433+ * from all callbacks for status changes of this distributed object. sessionId indicates the session ID
440- * of the distributed data object.<br>**networkId** identifies the distributed data object.<br>**status**434+ * distributed data object. networkId identifies the distributed data object. status indicates the
441 * indicates the object status, which can be online or offline.435 * indicates the object status, which can be online or offline.
442 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;436 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
443 * 2. Incorrect parameter types.437 * 2. Incorrect parameter types.
@@ -451,19 +445,10 @@ declare namespace distributedDataObject {
451 445 
452 /**446 /**
453 * Saves a distributed data object. This API uses an asynchronous callback to return the result.447 * Saves a distributed data object. This API uses an asynchronous callback to return the result.
454- *
455- * If the application is active, the saved data will not be released. When the application exits and restarts, the
456- * data saved on the device will be restored.
457- *
458- * The saved data will be released in the following cases:
459- *
460- * - The data is stored for more than 24 hours.
461- * - The application has been uninstalled.
462- * - Data is successfully restored.
463 *448 *
464- * @param { string } deviceId - ID of the device where the data is stored. The value **local** indicates a local449+ * @param { string } deviceId - ID of the device where the data is stored. The value local indicates a local
465 * device.450 * device.
466- * @param { AsyncCallback<SaveSuccessResponse> } callback - Callback used to return **SaveSuccessResponse**, which451+ * @param { AsyncCallback<SaveSuccessResponse> } callback - Callback used to return SaveSuccessResponse, which
467 * contains information such as session ID, version, and device ID.452 * contains information such as session ID, version, and device ID.
468 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;453 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
469 * 2. Incorrect parameter types.454 * 2. Incorrect parameter types.
@@ -476,19 +461,10 @@ declare namespace distributedDataObject {
476 461 
477 /**462 /**
478 * Saves a distributed data object. This API uses a promise to return the result.463 * Saves a distributed data object. This API uses a promise to return the result.
479- *
480- * If the application is active, the saved data will not be released. When the application exits and restarts, the
481- * data saved on the device will be restored.
482- *
483- * The saved data will be released in the following cases:
484- *
485- * - The data is stored for more than 24 hours.
486- * - The application has been uninstalled.
487- * - Data is successfully restored.
488 *464 *
489- * @param { string } deviceId - ID of the device where the data is saved. The default value is **local**, which465+ * @param { string } deviceId - ID of the device where the data is saved. The default value is local, which
490 * indicates a local device.466 * indicates a local device.
491- * @returns { Promise<SaveSuccessResponse> } Promise used to return **SaveSuccessResponse**, which contains467+ * @returns { Promise<SaveSuccessResponse> } Promise used to return SaveSuccessResponse, which contains
492 * information such as session ID, version, and device ID.468 * information such as session ID, version, and device ID.
493 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;469 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
494 * 2. Incorrect parameter types.470 * 2. Incorrect parameter types.
@@ -500,15 +476,11 @@ declare namespace distributedDataObject {
500 save(deviceId: string): Promise<SaveSuccessResponse>;476 save(deviceId: string): Promise<SaveSuccessResponse>;
501 477 
502 /**478 /**
503- * Revokes the data of this distributed data object saved. This API uses an asynchronous callback to return the 479+ * Revokes the data of this distributed data object saved. This API uses an asynchronous callback to return the
504 * result.480 * result.
505- *
506- * If the object is saved on the local device, the data saved on all trusted devices will be deleted.
507- *
508- * If the object is stored on another device, the data on the local device will be deleted.
509 *481 *
510 * @param { AsyncCallback<RevokeSaveSuccessResponse> } callback - Callback used to return482 * @param { AsyncCallback<RevokeSaveSuccessResponse> } callback - Callback used to return
511- * **RevokeSaveSuccessResponse**, which contains the session ID.483+ * RevokeSaveSuccessResponse, which contains the session ID.
512 * @throws { BusinessError } 401 - Parameter error. Incorrect parameter types.484 * @throws { BusinessError } 401 - Parameter error. Incorrect parameter types.
513 * @throws { BusinessError } 801 - Capability not supported.485 * @throws { BusinessError } 801 - Capability not supported.
514 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject486 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
@@ -519,12 +491,8 @@ declare namespace distributedDataObject {
519 491 
520 /**492 /**
521 * Revokes the data of this distributed data object saved. This API uses a promise to return the result.493 * Revokes the data of this distributed data object saved. This API uses a promise to return the result.
522- *
523- * If the object is saved on the local device, the data saved on all trusted devices will be deleted.
524- *
525- * If the object is stored on another device, the data on the local device will be deleted.
526 *494 *
527- * @returns { Promise<RevokeSaveSuccessResponse> } Promise used to return **RevokeSaveSuccessResponse**, which495+ * @returns { Promise<RevokeSaveSuccessResponse> } Promise used to return RevokeSaveSuccessResponse, which
528 * contains the session ID.496 * contains the session ID.
529 * @throws { BusinessError } 801 - Capability not supported.497 * @throws { BusinessError } 801 - Capability not supported.
530 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject498 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
@@ -536,10 +504,6 @@ declare namespace distributedDataObject {
536 /**504 /**
537 * Binds joint assets. Currently, only the binding between an asset in a distributed data object and an asset in an 505 * Binds joint assets. Currently, only the binding between an asset in a distributed data object and an asset in an
538 * RDB store is supported. This API uses an asynchronous callback to return the result.506 * RDB store is supported. This API uses an asynchronous callback to return the result.
539- *
540- * When an asset in a distributed object and an asset in an RDB store point to the same entity asset file, that is,
541- * the URIs of the two assets are the same, a conflict occurs. Such assets are called joint assets. To resolve the
542- * conflict, bind the joint assets. The binding is automatically released when the application exits the session.
543 *507 *
544 * @param { string } assetKey - Key of the joint asset in the distributed data object.508 * @param { string } assetKey - Key of the joint asset in the distributed data object.
545 * @param { BindInfo } bindInfo - Information about the joint asset in the RDB store, including the RDB store name,509 * @param { BindInfo } bindInfo - Information about the joint asset in the RDB store, including the RDB store name,
@@ -557,10 +521,6 @@ declare namespace distributedDataObject {
557 /**521 /**
558 * Binds joint assets. Currently, only the binding between an asset in a distributed data object and an asset in an 522 * Binds joint assets. Currently, only the binding between an asset in a distributed data object and an asset in an
559 * RDB store is supported. This API uses a promise to return the result.523 * RDB store is supported. This API uses a promise to return the result.
560- *
561- * When an asset in a distributed object and an asset in an RDB store point to the same entity asset file, that is,
562- * the URIs of the two assets are the same, a conflict occurs. Such assets are called joint assets. To resolve the
563- * conflict, bind the joint assets. The binding is automatically released when the application exits the session.
564 *524 *
565 * @param { string } assetKey - Key of the joint asset in the distributed data object.525 * @param { string } assetKey - Key of the joint asset in the distributed data object.
566 * @param { BindInfo } bindInfo - Information about the joint asset in the RDB store, including the RDB store name,526 * @param { BindInfo } bindInfo - Information about the joint asset in the RDB store, including the RDB store name,
@@ -578,7 +538,7 @@ declare namespace distributedDataObject {
578 /**538 /**
579 * Subscribes to data changes of this distributed data object.539 * Subscribes to data changes of this distributed data object.
580 *540 *
581- * @param { 'change' } type - Event type. The value is **'change'**, which indicates data changes.541+ * @param { 'change' } type - Event type. The value is 'change', which indicates data changes.
582 * @param { DataObserver } callback - Callback used to listen for data changes of a distributed object.542 * @param { DataObserver } callback - Callback used to listen for data changes of a distributed object.
583 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject543 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
584 * @since 20 dynamic544 * @since 20 dynamic
@@ -597,7 +557,7 @@ declare namespace distributedDataObject {
597 /**557 /**
598 * Unsubscribes from data changes of this distributed object.558 * Unsubscribes from data changes of this distributed object.
599 *559 *
600- * @param { 'change' } type - Event type. The value is **'change'**, which indicates data changes.560+ * @param { 'change' } type - Event type. The value is 'change', which indicates data changes.
601 * @param { DataObserver } [callback] - Callback to unregister. If this parameter is not specified, this API561 * @param { DataObserver } [callback] - Callback to unregister. If this parameter is not specified, this API
602 * unsubscribes from all callbacks for data changes of this distributed object.562 * unsubscribes from all callbacks for data changes of this distributed object.
603 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject563 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
@@ -618,7 +578,7 @@ declare namespace distributedDataObject {
618 /**578 /**
619 * Subscribes to the status changes of this distributed object.579 * Subscribes to the status changes of this distributed object.
620 *580 *
621- * @param { 'status' } type - Event type. The value is **'status'**, which indicates the status changes of a581+ * @param { 'status' } type - Event type. The value is 'status', which indicates the status changes of a
622 * distributed object.582 * distributed object.
623 * @param { StatusObserver } callback - Callback used to listen for status changes of a distributed object.583 * @param { StatusObserver } callback - Callback used to listen for status changes of a distributed object.
624 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject584 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
@@ -639,7 +599,7 @@ declare namespace distributedDataObject {
639 /**599 /**
640 * Unsubscribes from status changes of this distributed object.600 * Unsubscribes from status changes of this distributed object.
641 *601 *
642- * @param { 'status' } type - Event type. The value is **'status'**, which indicates the status changes of a602+ * @param { 'status' } type - Event type. The value is 'status', which indicates the status changes of a
643 * distributed object.603 * distributed object.
644 * @param { StatusObserver } [callback] - Callback to unregister. If this parameter is not specified, this API604 * @param { StatusObserver } [callback] - Callback to unregister. If this parameter is not specified, this API
645 * unsubscribes from all callbacks for status changes of this distributed object.605 * unsubscribes from all callbacks for status changes of this distributed object.
@@ -661,7 +621,7 @@ declare namespace distributedDataObject {
661 /**621 /**
662 * Subscribes to the asset transfer progress changes.622 * Subscribes to the asset transfer progress changes.
663 *623 *
664- * @param { 'progressChanged' } type - Event type. The value is **'progressChanged'**, which indicates the asset624+ * @param { 'progressChanged' } type - Event type. The value is 'progressChanged', which indicates the asset
665 * transfer progress changes.625 * transfer progress changes.
666 * @param { ProgressObserver } callback - Callback used to listen for the asset transfer progress changes.626 * @param { ProgressObserver } callback - Callback used to listen for the asset transfer progress changes.
667 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject627 * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject
@@ -681,7 +641,7 @@ declare namespace distributedDataObject {
681 /**641 /**
682 * Unsubscribes from asset transfer progress changes.642 * Unsubscribes from asset transfer progress changes.
683 *643 *
684- * @param { 'progressChanged' } type - Event type. The value is **'progressChanged'**, which indicates the asset644+ * @param { 'progressChanged' } type - Event type. The value is 'progressChanged', which indicates the asset
685 * transfer progress changes.645 * transfer progress changes.
686 * @param { ProgressObserver } [callback] - Callback to unregister. If this parameter is not specified, this API646 * @param { ProgressObserver } [callback] - Callback to unregister. If this parameter is not specified, this API
687 * unsubscribes from all callbacks for progress changes of this distributed object.647 * unsubscribes from all callbacks for progress changes of this distributed object.
@@ -702,37 +662,9 @@ declare namespace distributedDataObject {
702 662 
703 /**663 /**
704 * Sets the property information about a single asset in a distributed object. This API must be called before the 664 * Sets the property information about a single asset in a distributed object. This API must be called before the
705- * [setSessionId]{@link distributedDataObject.DataObject.setSessionId(sessionId?: string)} API is called. This API 665+ * setSessionId API is called. This API uses a promise to return the result.
706- * uses a promise to return the result.
707- *
708- * > **NOTE**
709- * >
710- * > When setting an asset, ensure that the **assetKey** file exists and is of the asset type. Otherwise, the peer
711- * > device may fail to receive the asset.
712- * >
713- * > When setting an asset, ensure that the URI is a correct and actual distributed path. Otherwise, the peer device
714- * > may fail to receive the asset.
715- *
716- * The following table lists the exception scenarios.
717- *
718- * | Scenario | Execution Results|
719- * | -------- | -------- |
720- * | The [setAsset]{@link distributedDataObject.DataObject.setAsset} API is called to set an asset after the
721- * [setSessionId]{@link distributedDataObject.DataObject.setSessionId(sessionId?: string)} API is called to set a
722- * session ID. | Error code 15400003 is thrown, indicating the asset setting failure.|
723- * | The value of **assetKey** is invalid, for example, **null**, **undefined**, or '' (empty). | Error
724- * code 15400002 is thrown, indicating the asset setting failure.|
725- * | **assetKey** exists, but the corresponding file is not of the asset type.| The system forcibly changes the
726- * file type to asset and sets the asset field. As a result, the actual asset may fail to be synchronized to the
727- * peer device.|
728- * | The value of **uri** is invalid, for example, **null**, **undefined**, or '' (empty). | Error
729- * code 15400002 is thrown, indicating the asset setting failure.|
730 *666 *
731- * @param { string } assetKey - Property name of the asset in the distributed object.<br>**Constraints**<br>(1) The667+ * @param { string } assetKey - Property name of the asset in the distributed object.
732- * corresponding **assetKey** file must exist and be of the
733- * [Asset]{@link @ohos.data.commonType:commonType.AssetStatus} type. Otherwise, an asset setting error may
734- * occur.<br>(2) In the collaboration or continuation scenario, the corresponding **assetKey** file must exist
735- * and be of the asset type at both devices so that the asset can be synchronized to the peer device.
736 * @param { string } uri - URI of the new asset to be set, indicating the distributed path for storing the asset.668 * @param { string } uri - URI of the new asset to be set, indicating the distributed path for storing the asset.
737 * The value must correspond to an existing asset.669 * The value must correspond to an existing asset.
738 * @returns { Promise<void> } Promise that returns no value.670 * @returns { Promise<void> } Promise that returns no value.
@@ -748,42 +680,10 @@ declare namespace distributedDataObject {
748 680 
749 /**681 /**
750 * Sets the property information about multiple assets in a distributed object. This API must be called before the 682 * Sets the property information about multiple assets in a distributed object. This API must be called before the
751- * [setSessionId]{@link distributedDataObject.DataObject.setSessionId(sessionId?: string)} API is called. The number683+ * setSessionId API is called. The number of values contained in the uris array ranges from 1 to 50.
752- * of values contained in the **uris** array ranges from 1 to 50. This API uses a promise to return the result.684+ * This API uses a promise to return the result.
753- *
754- * > **NOTE**
755- * >
756- * > When setting an asset, ensure that the **assetsKey** file exists and is of the asset type. Otherwise, the peer
757- * > device may fail to receive the assets.
758- * >
759- * > When setting an asset, ensure that the URIs in the array are correct and actual distributed paths. Otherwise,
760- * > the peer device may fail to receive the assets.
761- *
762- * The following table lists the exception scenarios.
763- *
764- * | Scenario | Execution Results|
765- * | -------- | -------- |
766- * | The [setAssets]{@link distributedDataObject.DataObject.setAssets} API is called to set an asset after the
767- * [setSessionId]{@link distributedDataObject.DataObject.setSessionId(sessionId?: string)} API is called to set a
768- * session ID. | Error code 15400003 is thrown, indicating the asset setting failure.|
769- * | The value of **assetsKey** is invalid, for example, **null**, **undefined**, or '' (empty). | Error
770- * code 15400002 is thrown, indicating the asset setting failure.|
771- * | **assetsKey** exists, but the corresponding file is not of the asset type.| The system forcibly changes the
772- * file type to asset and sets the asset field. As a result, the actual asset may fail to be synchronized to the
773- * peer device.|
774- * | **assetsKey** exists and the corresponding file is of the asset type.| The asset is set successfully, and the
775- * URI information is updated.|
776- * | The number of URI elements in the **uris** array is 0 or greater than 50. | Error code 15400002 is thrown,
777- * indicating the asset setting failure.|
778- * | The number of URI elements in the **uris** array ranges from 1 to 50, and one or more URIs are invalid, for
779- * example, **null**, **undefined**, or '' (empty).| Error code 15400002 is thrown, indicating the asset setting
780- * failure.|
781 *685 *
782- * @param { string } assetsKey - Property name of the assets in the distributed object.<br>**Constraints**<br>(1)686+ * @param { string } assetsKey - Property name of the assets in the distributed object.
783- * The corresponding **assetsKey** file must exist and be of the
784- * [Asset]{@link @ohos.data.commonType:commonType.AssetStatus} type. Otherwise, an asset setting error may
785- * occur.<br>(2) In the collaboration or continuation scenario, the corresponding **assetsKey** file must exist
786- * and be of the asset type at both devices so that the asset array can be synchronized to the peer device.
787 * @param { Array<string> } uris - URIs of the new asset array to be set, indicating the distributed paths for687 * @param { Array<string> } uris - URIs of the new asset array to be set, indicating the distributed paths for
788 * storing each element of the asset. The number of array elements ranges from 1 to 50. The URI of an element688 * storing each element of the asset. The number of array elements ranges from 1 to 50. The URI of an element
789 * must be the distributed path corresponding to an actual asset.689 * must be the distributed path corresponding to an actual asset.