@i2analyze/notebook-sdk 1.9.0-dev.2 → 1.9.0-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/gen/notebook-sdk-public.d.ts +180 -2
- package/package.json +1 -1
|
@@ -1662,6 +1662,145 @@ export declare namespace chart {
|
|
|
1662
1662
|
*/
|
|
1663
1663
|
getRecordsOfType(itemType: schema.ChartItemTypeSpecifier): data.IReadOnlyCollection<records.IChartRecord>;
|
|
1664
1664
|
}
|
|
1665
|
+
/**
|
|
1666
|
+
* Detailed information about the specific properties, notes, and source references that changed within a record.
|
|
1667
|
+
*
|
|
1668
|
+
* @remarks
|
|
1669
|
+
* This interface provides granular change tracking at the property level.
|
|
1670
|
+
* Empty sets indicate no changes occurred in that category.
|
|
1671
|
+
*
|
|
1672
|
+
* **Known Limitations:**
|
|
1673
|
+
* - Only includes changes for properties that have been fetched. Changes to unfetched properties are not reported here.
|
|
1674
|
+
* - Security dimension changes are not included in this interface.
|
|
1675
|
+
* - If a record is reported as having changed but `recordChanges` shows empty sets for all categories, this may indicate unfetched property changes or security-only edits.
|
|
1676
|
+
*
|
|
1677
|
+
* @example
|
|
1678
|
+
* ```typescript
|
|
1679
|
+
* // Plugin code consuming recordChanges
|
|
1680
|
+
* chartChangeListener((change) => {
|
|
1681
|
+
* if (change.type === 'minor' && change.recordChanges) {
|
|
1682
|
+
* change.recordChanges.forEach((recordId, changes) => {
|
|
1683
|
+
* // Check for property changes
|
|
1684
|
+
* if (changes.properties?.changed.size > 0) {
|
|
1685
|
+
* console.log('Properties changed:', changes.properties.changed);
|
|
1686
|
+
* }
|
|
1687
|
+
*
|
|
1688
|
+
* // Check for note additions
|
|
1689
|
+
* if (changes.notes?.added.size > 0) {
|
|
1690
|
+
* console.log('Notes added:', changes.notes.added);
|
|
1691
|
+
* }
|
|
1692
|
+
*
|
|
1693
|
+
* // Check for source reference edits
|
|
1694
|
+
* if (changes.sourceReferences?.edited.size > 0) {
|
|
1695
|
+
* console.log('Source references edited:', changes.sourceReferences.edited);
|
|
1696
|
+
* }
|
|
1697
|
+
*
|
|
1698
|
+
* // Check for source reference removals
|
|
1699
|
+
* if (changes.sourceReferences?.removed.size > 0) {
|
|
1700
|
+
* console.log('Source references removed:', changes.sourceReferences.removed);
|
|
1701
|
+
* }
|
|
1702
|
+
* });
|
|
1703
|
+
* }
|
|
1704
|
+
* });
|
|
1705
|
+
* ```
|
|
1706
|
+
*
|
|
1707
|
+
* @i2since 1.9
|
|
1708
|
+
*/
|
|
1709
|
+
export interface IRecordChanges {
|
|
1710
|
+
/**
|
|
1711
|
+
* Gets the property changes for this record.
|
|
1712
|
+
*
|
|
1713
|
+
* @remarks
|
|
1714
|
+
* The property changes are categorized as follows:
|
|
1715
|
+
* - Added: New properties that were set (property type IDs that were not previously set)
|
|
1716
|
+
* - Removed: Properties that were removed (set to `null` or deleted)
|
|
1717
|
+
* - Changed: Existing properties whose values were modified
|
|
1718
|
+
*
|
|
1719
|
+
* **Note:** If a property value oscillates within the same mutation (for example, A→B→A),
|
|
1720
|
+
* it is still reported as "changed" since this tracks mutations, not just final state.
|
|
1721
|
+
*
|
|
1722
|
+
* Empty sets indicate no changes in that category.
|
|
1723
|
+
*
|
|
1724
|
+
* @i2since 1.9
|
|
1725
|
+
*/
|
|
1726
|
+
readonly properties?: {
|
|
1727
|
+
/**
|
|
1728
|
+
* Gets the property type IDs for properties that were added to the record.
|
|
1729
|
+
* @i2since 1.9
|
|
1730
|
+
*/
|
|
1731
|
+
readonly added: data.IReadOnlyCollection<schema.PropertyTypeIdentifier>;
|
|
1732
|
+
/**
|
|
1733
|
+
* Gets the property type IDs for properties that were removed from the record.
|
|
1734
|
+
* @i2since 1.9
|
|
1735
|
+
*/
|
|
1736
|
+
readonly removed: data.IReadOnlyCollection<schema.PropertyTypeIdentifier>;
|
|
1737
|
+
/**
|
|
1738
|
+
* Gets the property type IDs for properties whose values were changed.
|
|
1739
|
+
* @i2since 1.9
|
|
1740
|
+
*/
|
|
1741
|
+
readonly changed: data.IReadOnlyCollection<schema.PropertyTypeIdentifier>;
|
|
1742
|
+
};
|
|
1743
|
+
/**
|
|
1744
|
+
* Gets the note changes for this record.
|
|
1745
|
+
*
|
|
1746
|
+
* @remarks
|
|
1747
|
+
* The note changes are categorized as follows:
|
|
1748
|
+
* - Added: New notes that were created
|
|
1749
|
+
* - Edited: Existing notes whose content was modified
|
|
1750
|
+
* - Removed: Notes that were deleted
|
|
1751
|
+
*
|
|
1752
|
+
* Empty sets indicate no changes in that category.
|
|
1753
|
+
*
|
|
1754
|
+
* @i2since 1.9
|
|
1755
|
+
*/
|
|
1756
|
+
readonly notes?: {
|
|
1757
|
+
/**
|
|
1758
|
+
* Gets the note IDs for notes that were added to the record.
|
|
1759
|
+
* @i2since 1.9
|
|
1760
|
+
*/
|
|
1761
|
+
readonly added: data.IReadOnlyCollection<data.NoteId>;
|
|
1762
|
+
/**
|
|
1763
|
+
* Gets the note IDs for notes whose content was edited.
|
|
1764
|
+
* @i2since 1.9
|
|
1765
|
+
*/
|
|
1766
|
+
readonly edited: data.IReadOnlyCollection<data.NoteId>;
|
|
1767
|
+
/**
|
|
1768
|
+
* Gets the note IDs for notes that were removed from the record.
|
|
1769
|
+
* @i2since 1.9
|
|
1770
|
+
*/
|
|
1771
|
+
readonly removed: data.IReadOnlyCollection<data.NoteId>;
|
|
1772
|
+
};
|
|
1773
|
+
/**
|
|
1774
|
+
* Gets the source reference changes for this record.
|
|
1775
|
+
*
|
|
1776
|
+
* @remarks
|
|
1777
|
+
* The source reference changes are categorized as follows:
|
|
1778
|
+
* - Added: New source references that were added
|
|
1779
|
+
* - Edited: Existing source references whose content was modified
|
|
1780
|
+
* - Removed: Source references that were deleted
|
|
1781
|
+
*
|
|
1782
|
+
* Empty sets indicate no changes in that category.
|
|
1783
|
+
*
|
|
1784
|
+
* @i2since 1.9
|
|
1785
|
+
*/
|
|
1786
|
+
readonly sourceReferences?: {
|
|
1787
|
+
/**
|
|
1788
|
+
* Gets the source reference IDs for source references that were added to the record.
|
|
1789
|
+
* @i2since 1.9
|
|
1790
|
+
*/
|
|
1791
|
+
readonly added: data.IReadOnlyCollection<data.SourceReferenceId>;
|
|
1792
|
+
/**
|
|
1793
|
+
* Gets the source reference IDs for source references whose content was edited.
|
|
1794
|
+
* @i2since 1.9
|
|
1795
|
+
*/
|
|
1796
|
+
readonly edited: data.IReadOnlyCollection<data.SourceReferenceId>;
|
|
1797
|
+
/**
|
|
1798
|
+
* Gets the source reference IDs for source references that were removed from the record.
|
|
1799
|
+
* @i2since 1.9
|
|
1800
|
+
*/
|
|
1801
|
+
readonly removed: data.IReadOnlyCollection<data.SourceReferenceId>;
|
|
1802
|
+
};
|
|
1803
|
+
}
|
|
1665
1804
|
/**
|
|
1666
1805
|
* A change that has occurred to the data in a chart.
|
|
1667
1806
|
* @i2since 1.0
|
|
@@ -1671,14 +1810,18 @@ export declare namespace chart {
|
|
|
1671
1810
|
* Gets the type of change (minor or major) made to the chart.
|
|
1672
1811
|
*
|
|
1673
1812
|
* @remarks
|
|
1674
|
-
*
|
|
1675
|
-
*
|
|
1813
|
+
* The `type` field is always "minor" in current versions. The distinction between major and minor changes has been removed.
|
|
1814
|
+
* This field will be removed in the next major release.
|
|
1815
|
+
*
|
|
1816
|
+
* @deprecated This field will be removed in the next major release. All changes now report detailed affected elements and records.
|
|
1676
1817
|
* @i2since 1.0
|
|
1818
|
+
*
|
|
1677
1819
|
*/
|
|
1678
1820
|
readonly type: 'minor' | 'major';
|
|
1679
1821
|
}
|
|
1680
1822
|
/**
|
|
1681
1823
|
* A major change that has occurred to the data on a chart.
|
|
1824
|
+
* @deprecated Use {@link chart.IChartChange} instead. The `type` field is always "minor" and the distinction between major and minor changes has been removed. This interface will be removed in the next major release.
|
|
1682
1825
|
* @i2since 1.0
|
|
1683
1826
|
*/
|
|
1684
1827
|
export interface IChartChangeMajor extends IChartChangeBase {
|
|
@@ -1784,9 +1927,44 @@ export declare namespace chart {
|
|
|
1784
1927
|
*/
|
|
1785
1928
|
readonly removed: data.IReadOnlyCollection<visual.ElementId>;
|
|
1786
1929
|
};
|
|
1930
|
+
/**
|
|
1931
|
+
* Gets granular change details for records that changed in this chart update.
|
|
1932
|
+
*
|
|
1933
|
+
* @remarks
|
|
1934
|
+
* This optional field provides property-level change tracking for records.
|
|
1935
|
+
* When populated, it contains an entry for each record that changed, with detailed information about:
|
|
1936
|
+
* - Which properties were added, removed, or changed
|
|
1937
|
+
* - Which notes were added, edited, or removed
|
|
1938
|
+
* - Which source references were added or removed
|
|
1939
|
+
* *
|
|
1940
|
+
* **Usage Pattern:**
|
|
1941
|
+
* ```typescript
|
|
1942
|
+
* // New opt-in granularity
|
|
1943
|
+
* change.recordChanges?.forEach((recordId, changes) => {
|
|
1944
|
+
* if (changes.properties?.changed.size > 0) {
|
|
1945
|
+
* console.log('Properties changed for', recordId);
|
|
1946
|
+
* }
|
|
1947
|
+
* });
|
|
1948
|
+
* ```
|
|
1949
|
+
*
|
|
1950
|
+
* **Known Limitations:**
|
|
1951
|
+
* Changes to unfetched properties are not reported here.
|
|
1952
|
+
* - Security dimension changes are not included.
|
|
1953
|
+
* - If a record appears in `records.changed` but has no corresponding entry in `recordChanges`,
|
|
1954
|
+
* or if the entry shows empty sets for all categories, this may indicate unfetched property changes
|
|
1955
|
+
* or security-only edits.
|
|
1956
|
+
*
|
|
1957
|
+
* @i2since 1.9
|
|
1958
|
+
*/
|
|
1959
|
+
readonly recordChanges?: data.IKeyedReadOnlyCollection<records.AnalyzeRecordId, IRecordChanges>;
|
|
1787
1960
|
}
|
|
1788
1961
|
/**
|
|
1789
1962
|
* A change to the data in a chart in i2 Notebook.
|
|
1963
|
+
*
|
|
1964
|
+
* @remarks
|
|
1965
|
+
* Use this type for all chart change handling. The distinction between major and minor changes has been removed,
|
|
1966
|
+
* and all changes now report detailed information about affected elements and records.
|
|
1967
|
+
*
|
|
1790
1968
|
* @i2since 1.0
|
|
1791
1969
|
*/
|
|
1792
1970
|
export type IChartChange = IChartChangeMajor | IChartChangeMinor;
|