已合并
多段注释合一 手动会刷docs注释 #32760
jeam-wang创建于 5月11日
多段注释合一 手动会刷docs注释 #32760
已合并
共 4 个文件变更+533-617
| @@ -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 | + * { Promise<void> } Promise that returns no value. | ||
| 1048 | * { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. | 1049 | * { 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 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1319 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1319 | * | 1320 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1338 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1338 | * | 1339 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1348 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1348 | * | 1349 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1369 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1369 | * | 1370 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1380 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1380 | * | 1381 | * |
| @@ -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; the | 1388 | + * 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 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1391 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1391 | * | 1392 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1402 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1402 | * | 1403 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1413 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1413 | * | 1414 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1433 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1433 | * | 1434 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1443 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1443 | * | 1444 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1453 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1453 | * | 1454 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1463 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1463 | * | 1464 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1474 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1473 | * | 1475 | * |
| @@ -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 application | 1492 | + * @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; 2 | 1494 | + * 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 | * { BusinessError } 801 - Capability not supported. | 1497 | * { BusinessError } 801 - Capability not supported. |
| 1495 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1498 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1496 | * | 1499 | * |
| @@ -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 the | 1517 | + * @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 application | 1519 | + * 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; 2 | 1521 | + * 2. Incorrect parameter types; 3. Parameter verification failed. |
| 1519 | - * . Incorrect parameter types; | ||
| 1520 | - * 3. Parameter verification failed. | ||
| 1521 | * { BusinessError } 801 - Capability not supported. | 1522 | * { BusinessError } 801 - Capability not supported. |
| 1522 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1523 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1523 | * | 1524 | * |
| @@ -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 the | 1543 | + * @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 application | 1545 | + * 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; 2 | 1547 | + * 2. Incorrect parameter types; 3. Parameter verification failed. |
| 1547 | - * . Incorrect parameter types; | ||
| 1548 | - * 3. Parameter verification failed. | ||
| 1549 | * { BusinessError } 801 - Capability not supported. | 1548 | * { BusinessError } 801 - Capability not supported. |
| 1550 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1549 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1551 | * | 1550 | * |
| @@ -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 participants | 1567 | + * @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 the | 1569 | + * @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 application | 1571 | + * @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 | - * { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2 | ||
| 1574 | - * . Incorrect parameter types; | ||
| 1575 | - * 3. Parameter verification failed. | ||
| 1576 | * { BusinessError } 801 - Capability not supported. | 1573 | * { BusinessError } 801 - Capability not supported. |
| 1577 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1574 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1578 | * | 1575 | * |
| @@ -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 participants | 1590 | + * @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 application | 1593 | + * 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; 2 | 1595 | + * 2. Incorrect parameter types; 3. Parameter verification failed. |
| 1598 | - * . Incorrect parameter types; | ||
| 1599 | - * 3. Parameter verification failed. | ||
| 1600 | * { BusinessError } 801 - Capability not supported. | 1596 | * { BusinessError } 801 - Capability not supported. |
| 1601 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1597 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1602 | * | 1598 | * |
| @@ -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 participants | 1612 | + * @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 invoked | 1614 | + * @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 application | 1616 | + * @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 | - * { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2 | ||
| 1622 | - * . Incorrect parameter types; | ||
| 1623 | - * 3. Parameter verification failed. | ||
| 1624 | * { BusinessError } 801 - Capability not supported. | 1618 | * { BusinessError } 801 - Capability not supported. |
| 1625 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1619 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1626 | * | 1620 | * |
| @@ -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 participants | 1635 | + * @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 application | 1638 | + * 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; 2 | 1640 | + * 2. Incorrect parameter types; 3. Parameter verification failed. |
| 1646 | - * . Incorrect parameter types; | ||
| 1647 | - * 3. Parameter verification failed. | ||
| 1648 | * { BusinessError } 801 - Capability not supported. | 1641 | * { BusinessError } 801 - Capability not supported. |
| 1649 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1642 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1650 | * | 1643 | * |
| @@ -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 application | 1658 | + * @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; 2 | 1660 | + * @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 | * { BusinessError } 801 - Capability not supported. | 1662 | * { BusinessError } 801 - Capability not supported. |
| 1670 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1663 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1671 | * | 1664 | * |
| @@ -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 application | 1676 | + * @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; 2 | 1678 | + * @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 | * { BusinessError } 801 - Capability not supported. | 1680 | * { BusinessError } 801 - Capability not supported. |
| 1688 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1681 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1689 | * | 1682 | * |
| @@ -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 participants | 1693 | + * @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 the | 1695 | + * @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 application | 1697 | + * @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 | - * { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2 | ||
| 1706 | - * . Incorrect parameter types; | ||
| 1707 | - * 3. Parameter verification failed. | ||
| 1708 | * { BusinessError } 801 - Capability not supported. | 1699 | * { BusinessError } 801 - Capability not supported. |
| 1709 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1700 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1710 | * | 1701 | * |
| @@ -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 participants | 1716 | + * @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 application | 1719 | + * 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; 2 | 1721 | + * 2. Incorrect parameter types; 3. Parameter verification failed. |
| 1730 | - * . Incorrect parameter types; | ||
| 1731 | - * 3. Parameter verification failed. | ||
| 1732 | * { BusinessError } 801 - Capability not supported. | 1722 | * { BusinessError } 801 - Capability not supported. |
| 1733 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1723 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1734 | * | 1724 | * |
| @@ -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 the | 1738 | + * @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 application | 1740 | + * 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; 2 | 1742 | + * 2. Incorrect parameter types; 3. Parameter verification failed. |
| 1752 | - * . Incorrect parameter types; | ||
| 1753 | - * 3. Parameter verification failed. | ||
| 1754 | * { BusinessError } 801 - Capability not supported. | 1743 | * { BusinessError } 801 - Capability not supported. |
| 1755 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1744 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1756 | * | 1745 | * |
| @@ -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 application | 1757 | + * @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; 2 | 1759 | + * @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 | * { BusinessError } 801 - Capability not supported. | 1761 | * { BusinessError } 801 - Capability not supported. |
| 1773 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1762 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1774 | * | 1763 | * |
| @@ -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 the | 1774 | + * @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 application | 1776 | + * 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; 2 | 1778 | + * 2. Incorrect parameter types; 3. Parameter verification failed. |
| 1789 | - * . Incorrect parameter types; | ||
| 1790 | - * 3. Parameter verification failed. | ||
| 1791 | * { BusinessError } 801 - Capability not supported. | 1779 | * { BusinessError } 801 - Capability not supported. |
| 1792 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1780 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1793 | * | 1781 | * |
| @@ -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 application | 1796 | + * @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; 2 | 1798 | + * @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 | * { BusinessError } 801 - Capability not supported. | 1800 | * { BusinessError } 801 - Capability not supported. |
| 1813 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1801 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1814 | * | 1802 | * |
| @@ -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 callback | 1814 | + * @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 application | 1816 | + * 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; 2 | 1818 | + * 2. Incorrect parameter types; 3. Parameter verification failed. |
| 1830 | - * . Incorrect parameter types; | ||
| 1831 | - * 3. Parameter verification failed. | ||
| 1832 | * { BusinessError } 801 - Capability not supported. | 1819 | * { BusinessError } 801 - Capability not supported. |
| 1833 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1820 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1834 | * | 1821 | * |
| @@ -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 application | 1834 | + * @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; 2 | 1836 | + * @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 | * { BusinessError } 801 - Capability not supported. | 1838 | * { BusinessError } 801 - Capability not supported. |
| 1852 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1839 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1853 | * | 1840 | * |
| @@ -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 application | 1853 | + * @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; 2 | 1855 | + * @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 | * { BusinessError } 801 - Capability not supported. | 1857 | * { BusinessError } 801 - Capability not supported. |
| 1871 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1858 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1872 | * | 1859 | * |
| @@ -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 application | 1872 | + * @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; 2 | 1874 | + * @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 | * { BusinessError } 801 - Capability not supported. | 1876 | * { BusinessError } 801 - Capability not supported. |
| 1890 | * SystemCapability.DistributedDataManager.CloudSync.Client | 1877 | * SystemCapability.DistributedDataManager.CloudSync.Client |
| 1891 | * | 1878 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CommonType | 24 | * SystemCapability.DistributedDataManager.CommonType |
| 25 | * | 25 | * |
| @@ -28,7 +28,7 @@ | |||
| 28 | */ | 28 | */ |
| 29 | declare namespace commonType { | 29 | declare namespace commonType { |
| 30 | /** | 30 | /** |
| 31 | - * Describes the status of asset. | 31 | + * Enumerates the asset statuses. |
| 32 | * | 32 | * |
| 33 | * SystemCapability.DistributedDataManager.CommonType | 33 | * SystemCapability.DistributedDataManager.CommonType |
| 34 | * | 34 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CommonType | 42 | * SystemCapability.DistributedDataManager.CommonType |
| 43 | * | 43 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CommonType | 52 | * SystemCapability.DistributedDataManager.CommonType |
| 53 | * | 53 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CommonType | 62 | * SystemCapability.DistributedDataManager.CommonType |
| 63 | * | 63 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CommonType | 72 | * SystemCapability.DistributedDataManager.CommonType |
| 73 | * | 73 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CommonType | 82 | * SystemCapability.DistributedDataManager.CommonType |
| 83 | * | 83 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CommonType | 92 | * SystemCapability.DistributedDataManager.CommonType |
| 93 | * | 93 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CommonType | 103 | * SystemCapability.DistributedDataManager.CommonType |
| 104 | * | 104 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CommonType | 112 | * SystemCapability.DistributedDataManager.CommonType |
| 113 | * | 113 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CommonType | 122 | * SystemCapability.DistributedDataManager.CommonType |
| 123 | * | 123 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CommonType | 132 | * SystemCapability.DistributedDataManager.CommonType |
| 133 | * | 133 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CommonType | 142 | * SystemCapability.DistributedDataManager.CommonType |
| 143 | * | 143 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CommonType | 152 | * SystemCapability.DistributedDataManager.CommonType |
| 153 | * | 153 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CommonType | 162 | * SystemCapability.DistributedDataManager.CommonType |
| 163 | * | 163 | * |
| @@ -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 | * SystemCapability.DistributedDataManager.CommonType | 172 | * SystemCapability.DistributedDataManager.CommonType |
| 173 | * | 173 | * |
| @@ -178,7 +178,7 @@ declare namespace commonType { | |||
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | /** | 180 | /** |
| 181 | - * Indicates several assets | 181 | + * Represents an array of Assets. |
| 182 | * | 182 | * |
| 183 | * SystemCapability.DistributedDataManager.CommonType | 183 | * SystemCapability.DistributedDataManager.CommonType |
| 184 | * | 184 | * |
| @@ -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 | * { null } The value is null. | 193 | * { null } The value is null. |
| 194 | * { long } The value is a 64-bit integer (int64_t). | 194 | * { 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 | * SystemCapability.DistributedDataManager.CommonType | 211 | * SystemCapability.DistributedDataManager.CommonType |
| 212 | * | 212 | * |
| @@ -23,9 +23,9 @@ import type Context from './application/BaseContext'; | |||
| 23 | import commonType from '@ohos.data.commonType'; | 23 | import 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 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 31 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject |
| @@ -34,7 +34,7 @@ import commonType from '@ohos.data.commonType'; | |||
| 34 | */ | 34 | */ |
| 35 | declare namespace distributedDataObject { | 35 | declare 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 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 40 | * 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, see | 107 | + * @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, see | 108 | + * see Context.For details about the application context of the stage model, see Context. |
| 109 | - * [Context]{ ./application/UIAbilityContext:UIAbilityContext}. | ||
| 110 | * { object } source - Properties of the distributed data object. | 109 | * { object } source - Properties of the distributed data object. |
| 111 | * { DataObject } Distributed data object created. | 110 | * { DataObject } Distributed data object created. |
| 112 | * { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; | 111 | * { 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]{ distributedDataObject.DataObject.save(deviceId: string, callback: AsyncCallback<SaveSuccessResponse>)} | ||
| 133 | * . | 131 | * . |
| 134 | * | 132 | * |
| 135 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 133 | * 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 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 159 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject |
| 162 | * 9 dynamic | 160 | * 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]{ distributedDataObject.DataObject.revokeSave(callback: AsyncCallback<RevokeSaveSuccessResponse>)} | ||
| 171 | - * . | ||
| 172 | * | 168 | * |
| 173 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 169 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject |
| 174 | * 9 dynamic | 170 | * 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 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 230 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject |
| 236 | * 8 dynamiconly | 231 | * 8 dynamiconly |
| @@ -244,9 +239,8 @@ declare namespace distributedDataObject { | |||
| 244 | * | 239 | * |
| 245 | * ohos.permission.DISTRIBUTED_DATASYNC | 240 | * ohos.permission.DISTRIBUTED_DATASYNC |
| 246 | * { string } sessionId - ID of a distributed data object on a trusted network. To remove a distributed data | 241 | * { 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 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 244 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject |
| 251 | * 8 dynamiconly | 245 | * 8 dynamiconly |
| 252 | * since 9 | 246 | * 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 changed | 256 | + * 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 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 258 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject |
| 265 | * 8 dynamiconly | 259 | * 8 dynamiconly |
| 266 | * since 9 | 260 | * 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 | * { Function } callback - Callback to unregister. If this parameter is not specified, this API unsubscribes | 269 | * { 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 of | 270 | + * 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 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 272 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject |
| 279 | * 8 dynamiconly | 273 | * 8 dynamiconly |
| 280 | * since 9 | 274 | * 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 or | 282 | + * @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 session | 284 | + * @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 object | 285 | + * 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 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 287 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject |
| 294 | * 8 dynamiconly | 288 | * 8 dynamiconly |
| 295 | * since 9 | 289 | * 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 or | 300 | + * @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 | * { Function } callback - Callback to unregister. If this parameter is not specified, this API unsubscribes | 302 | * { 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 ID | 303 | + * 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 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 306 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject |
| 313 | * 8 dynamiconly | 307 | * 8 dynamiconly |
| 314 | * since 9 | 308 | * 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 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 321 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject |
| 328 | * 9 dynamic | 322 | * 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 | * ohos.permission.DISTRIBUTED_DATASYNC | 331 | * ohos.permission.DISTRIBUTED_DATASYNC |
| 338 | * {string} sessionId - ID of a distributed data object on a trusted network. The value can contain only | 332 | * {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 **""** or | 333 | + * 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 | * {AsyncCallback<void>} callback - Asynchronous callback invoked when the session ID is successfully set. | 335 | * {AsyncCallback<void>} callback - Asynchronous callback invoked when the session ID is successfully set. |
| 342 | * {BusinessError} 201 - Permission verification failed. | 336 | * {BusinessError} 201 - Permission verification failed. |
| 343 | * {BusinessError} 401 - Parameter error. Possible causes: 1. Incorrect parameter types; | 337 | * {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 ID | 363 | + * 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 | * ohos.permission.DISTRIBUTED_DATASYNC | 366 | * ohos.permission.DISTRIBUTED_DATASYNC |
| 373 | * {string} sessionId - ID of a distributed data object on a trusted network. The value can contain only | 367 | * {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 **""** or | 368 | + * 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 | * {Promise<void>} Promise that returns no value. | 370 | * {Promise<void>} Promise that returns no value. |
| 377 | * {BusinessError} 201 - Permission verification failed. | 371 | * {BusinessError} 201 - Permission verification failed. |
| 378 | * {BusinessError} 401 - Parameter error. Possible causes: 1. Incorrect parameter types; | 372 | * {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 changed | 386 | + * 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 | * {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; | 388 | * {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; |
| 395 | * 2. Incorrect parameter types. | 389 | * 2. Incorrect parameter types. |
| 396 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 390 | * 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 | * { Function } callback - Callback to unregister. If this parameter is not specified, this API unsubscribes | 399 | * { 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 of | 400 | + * 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 | * {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; | 402 | * {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; |
| 409 | * 2. Incorrect parameter types. | 403 | * 2. Incorrect parameter types. |
| 410 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 404 | * 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 or | 412 | + * @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 session | 414 | + * @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 object | 415 | + * 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 | * {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; | 417 | * {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; |
| 424 | * 2. Incorrect parameter types. | 418 | * 2. Incorrect parameter types. |
| 425 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 419 | * 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 or | 430 | + * @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 | * { Function } callback - Callback to unregister. If this parameter is not specified, this API unsubscribes | 432 | * { 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 ID | 433 | + * 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 | * { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; | 436 | * { 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 local | 449 | + * @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**, which | 451 | + * @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 | * { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; | 453 | * { 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**, which | 465 | + * @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 contains | 467 | + * @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 | * { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; | 469 | * { 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 | * { AsyncCallback<RevokeSaveSuccessResponse> } callback - Callback used to return | 482 | * { AsyncCallback<RevokeSaveSuccessResponse> } callback - Callback used to return |
| 511 | - * **RevokeSaveSuccessResponse**, which contains the session ID. | 483 | + * RevokeSaveSuccessResponse, which contains the session ID. |
| 512 | * { BusinessError } 401 - Parameter error. Incorrect parameter types. | 484 | * { BusinessError } 401 - Parameter error. Incorrect parameter types. |
| 513 | * { BusinessError } 801 - Capability not supported. | 485 | * { BusinessError } 801 - Capability not supported. |
| 514 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 486 | * 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**, which | 495 | + * @returns { Promise<RevokeSaveSuccessResponse> } Promise used to return RevokeSaveSuccessResponse, which |
| 528 | * contains the session ID. | 496 | * contains the session ID. |
| 529 | * { BusinessError } 801 - Capability not supported. | 497 | * { BusinessError } 801 - Capability not supported. |
| 530 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 498 | * 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 | * { string } assetKey - Key of the joint asset in the distributed data object. | 508 | * { string } assetKey - Key of the joint asset in the distributed data object. |
| 545 | * { BindInfo } bindInfo - Information about the joint asset in the RDB store, including the RDB store name, | 509 | * { 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 | * { string } assetKey - Key of the joint asset in the distributed data object. | 525 | * { string } assetKey - Key of the joint asset in the distributed data object. |
| 566 | * { BindInfo } bindInfo - Information about the joint asset in the RDB store, including the RDB store name, | 526 | * { 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 | * { DataObserver } callback - Callback used to listen for data changes of a distributed object. | 542 | * { DataObserver } callback - Callback used to listen for data changes of a distributed object. |
| 583 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 543 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject |
| 584 | * 20 dynamic | 544 | * 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 | * { DataObserver } [callback] - Callback to unregister. If this parameter is not specified, this API | 561 | * { 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 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 563 | * 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 a | 581 | + * @param { 'status' } type - Event type. The value is 'status', which indicates the status changes of a |
| 622 | * distributed object. | 582 | * distributed object. |
| 623 | * { StatusObserver } callback - Callback used to listen for status changes of a distributed object. | 583 | * { StatusObserver } callback - Callback used to listen for status changes of a distributed object. |
| 624 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 584 | * 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 a | 602 | + * @param { 'status' } type - Event type. The value is 'status', which indicates the status changes of a |
| 643 | * distributed object. | 603 | * distributed object. |
| 644 | * { StatusObserver } [callback] - Callback to unregister. If this parameter is not specified, this API | 604 | * { 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 asset | 624 | + * @param { 'progressChanged' } type - Event type. The value is 'progressChanged', which indicates the asset |
| 665 | * transfer progress changes. | 625 | * transfer progress changes. |
| 666 | * { ProgressObserver } callback - Callback used to listen for the asset transfer progress changes. | 626 | * { ProgressObserver } callback - Callback used to listen for the asset transfer progress changes. |
| 667 | * SystemCapability.DistributedDataManager.DataObject.DistributedObject | 627 | * 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 asset | 644 | + * @param { 'progressChanged' } type - Event type. The value is 'progressChanged', which indicates the asset |
| 685 | * transfer progress changes. | 645 | * transfer progress changes. |
| 686 | * { ProgressObserver } [callback] - Callback to unregister. If this parameter is not specified, this API | 646 | * { 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]{ distributedDataObject.DataObject.setAsset} API is called to set an asset after the | ||
| 721 | - * [setSessionId]{ 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) The | 667 | + * @param { string } assetKey - Property name of the asset in the distributed object. |
| 732 | - * corresponding **assetKey** file must exist and be of the | ||
| 733 | - * [Asset]{ .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 | * { string } uri - URI of the new asset to be set, indicating the distributed path for storing the asset. | 668 | * { 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 | * { Promise<void> } Promise that returns no value. | 670 | * { 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 number | 683 | + * 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]{ distributedDataObject.DataObject.setAssets} API is called to set an asset after the | ||
| 767 | - * [setSessionId]{ 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]{ .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 | * { Array<string> } uris - URIs of the new asset array to be set, indicating the distributed paths for | 687 | * { 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 element | 688 | * 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. |