@supernova-studio/client 1.0.0-alpha.7 → 1.0.0-alpha.8

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/dist/index.d.mts CHANGED
@@ -92864,7 +92864,7 @@ type DocPageCreate = {
92864
92864
  type DocPageUpdate = {
92865
92865
  persistentId: string;
92866
92866
  title?: string;
92867
- configuration?: DTODocumentationItemConfigurationV2;
92867
+ configuration?: Partial<DTODocumentationItemConfigurationV2>;
92868
92868
  };
92869
92869
  type TransactionExecutor = (trx: DTOElementActionInput) => Promise<void>;
92870
92870
  declare class DocsStructureRepository {
package/dist/index.d.ts CHANGED
@@ -92864,7 +92864,7 @@ type DocPageCreate = {
92864
92864
  type DocPageUpdate = {
92865
92865
  persistentId: string;
92866
92866
  title?: string;
92867
- configuration?: DTODocumentationItemConfigurationV2;
92867
+ configuration?: Partial<DTODocumentationItemConfigurationV2>;
92868
92868
  };
92869
92869
  type TransactionExecutor = (trx: DTOElementActionInput) => Promise<void>;
92870
92870
  declare class DocsStructureRepository {
package/dist/index.js CHANGED
@@ -13188,14 +13188,21 @@ var DocsStructureRepository = class {
13188
13188
  void this.deletePagePromise(persistentId);
13189
13189
  }
13190
13190
  createLocalPageUpdate(basePage, update) {
13191
- const { title, configuration } = update;
13191
+ let updatedConfiguration = basePage.data.configuration;
13192
+ if (update.configuration && Object.keys(update.configuration).length) {
13193
+ updatedConfiguration = { ..._nullishCoalesce(updatedConfiguration, () => ( defaultDocumentationItemConfigurationV2)) };
13194
+ updatedConfiguration.header = _nullishCoalesce(update.configuration.header, () => ( updatedConfiguration.header));
13195
+ updatedConfiguration.isHidden = _nullishCoalesce(update.configuration.isHidden, () => ( updatedConfiguration.isHidden));
13196
+ updatedConfiguration.isPrivate = _nullishCoalesce(update.configuration.isPrivate, () => ( updatedConfiguration.isPrivate));
13197
+ updatedConfiguration.showSidebar = _nullishCoalesce(update.configuration.showSidebar, () => ( updatedConfiguration.showSidebar));
13198
+ }
13192
13199
  return {
13193
13200
  createdAt: basePage.createdAt,
13194
13201
  data: {
13195
- configuration: _nullishCoalesce(configuration, () => ( basePage.data.configuration))
13202
+ configuration: updatedConfiguration
13196
13203
  },
13197
13204
  designSystemVersionId: basePage.designSystemVersionId,
13198
- meta: { name: _nullishCoalesce(title, () => ( basePage.meta.name)) },
13205
+ meta: { name: _nullishCoalesce(update.title, () => ( basePage.meta.name)) },
13199
13206
  parentPersistentId: basePage.parentPersistentId,
13200
13207
  persistentId: basePage.persistentId,
13201
13208
  shortPersistentId: basePage.shortPersistentId,