Commit 9741076
committed
Expose protocol v6 typed fields on public ObjectOperation and ObjectData
The public ObjectOperation interface is updated to use the protocol v6
field names (mapCreate, mapSet, mapRemove, counterCreate, counterInc).
The previous fields (mapOp, counterOp, map, counter) are preserved as
deprecated aliases.
The public ObjectData interface previously exposed a combined `value`
field, which was an incorrect internal representation leaking through
the public API (introduced in 54f8ae2).
The LODR-042 [1] DR proposed that subscription events should be
equivalent to the REST API publish endpoint syntax. With protocol v6
aligning the realtime protocol and REST API in LODR-51 [2], ObjectData
now exposes the same typed fields available on the wire: boolean, bytes,
number, string, json - with decoded values (bytes as Buffer/ArrayBuffer,
json as parsed objects). The combined `value` field is preserved as a
deprecated alias.
Both new and deprecated fields are populated for backwards
compatibility; deprecated fields will be removed in a future major
version.
[1] https://ably.atlassian.net/wiki/spaces/LOB/pages/4235722804/LODR-042+LiveObjects+Realtime+Client+API+Improvements#Subscriptions
[2] https://ably.atlassian.net/wiki/x/AQAPEgE1 parent be7ea17 commit 9741076
4 files changed
Lines changed: 259 additions & 49 deletions
File tree
- src/plugins/liveobjects
- test
- common/modules
- realtime
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1577 | 1577 | | |
1578 | 1578 | | |
1579 | 1579 | | |
1580 | | - | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
1581 | 1616 | | |
1582 | | - | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
1583 | 1622 | | |
1584 | 1623 | | |
1585 | 1624 | | |
1586 | 1625 | | |
| 1626 | + | |
| 1627 | + | |
1587 | 1628 | | |
1588 | 1629 | | |
1589 | 1630 | | |
1590 | 1631 | | |
1591 | 1632 | | |
| 1633 | + | |
| 1634 | + | |
1592 | 1635 | | |
1593 | 1636 | | |
1594 | 1637 | | |
| |||
1643 | 1686 | | |
1644 | 1687 | | |
1645 | 1688 | | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
1646 | 1738 | | |
1647 | 1739 | | |
1648 | 1740 | | |
1649 | 1741 | | |
1650 | 1742 | | |
1651 | 1743 | | |
1652 | | - | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
1653 | 1760 | | |
1654 | 1761 | | |
1655 | 1762 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
| 446 | + | |
| 447 | + | |
446 | 448 | | |
447 | 449 | | |
448 | 450 | | |
| |||
455 | 457 | | |
456 | 458 | | |
457 | 459 | | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
464 | 467 | | |
465 | | - | |
| 468 | + | |
466 | 469 | | |
467 | 470 | | |
468 | 471 | | |
469 | 472 | | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
470 | 482 | | |
471 | | - | |
| 483 | + | |
472 | 484 | | |
473 | | - | |
474 | | - | |
| 485 | + | |
| 486 | + | |
475 | 487 | | |
476 | | - | |
477 | | - | |
| 488 | + | |
| 489 | + | |
478 | 490 | | |
479 | 491 | | |
480 | 492 | | |
481 | | - | |
482 | | - | |
| 493 | + | |
| 494 | + | |
483 | 495 | | |
484 | 496 | | |
485 | 497 | | |
| 498 | + | |
486 | 499 | | |
487 | | - | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
488 | 506 | | |
489 | 507 | | |
490 | | - | |
491 | | - | |
| 508 | + | |
| 509 | + | |
492 | 510 | | |
493 | 511 | | |
494 | 512 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
0 commit comments