@supernova-studio/client 0.49.1 → 0.50.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supernova-studio/client",
3
- "version": "0.49.1",
3
+ "version": "0.50.0",
4
4
  "description": "Supernova Data Models",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -22,7 +22,7 @@ type DocumentationHierarchyTransaction = {
22
22
  groupSnapshots?: ElementGroupSnapshot[];
23
23
  groupSnapshotIdsToDelete?: string[];
24
24
 
25
- internalSettings?: DocumentationHierarchySettings;
25
+ internalSettings?: Partial<DocumentationHierarchySettings>;
26
26
 
27
27
  pageHashesToUpdate?: Record<string, string>;
28
28
 
@@ -93,12 +93,11 @@ export class VersionRoomBaseYDoc {
93
93
  return settingsParseResult.data;
94
94
  }
95
95
 
96
- updateDocumentationInternalSettings(settings: DocumentationHierarchySettings) {
96
+ updateDocumentationInternalSettings(settings: Partial<DocumentationHierarchySettings>) {
97
97
  const map = this.internalSettingsYMap;
98
-
99
- map.set("routingVersion", settings.routingVersion);
100
- map.set("isDraftFeatureAdopted", settings.isDraftFeatureAdopted);
101
- map.set("isApprovalFeatureEnabled", settings.isApprovalFeatureEnabled);
98
+ map.set("routingVersion", settings.routingVersion ?? map.get("routingVersion"));
99
+ map.set("isDraftFeatureAdopted", settings.isDraftFeatureAdopted ?? map.get("isDraftFeatureAdopted"));
100
+ map.set("isApprovalFeatureEnabled", settings.isApprovalFeatureEnabled ?? map.get("isApprovalFeatureEnabled"));
102
101
  }
103
102
 
104
103
  private get internalSettingsYMap() {