@supernova-studio/client 0.47.30 → 0.47.32

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.47.30",
3
+ "version": "0.47.32",
4
4
  "description": "Supernova Data Models",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -54,9 +54,13 @@ export function elementGroupsToDocumentationGroupFixedConfigurationDTOV1(
54
54
  >(pages, groups, getDtoDefaultItemConfigurationV1);
55
55
 
56
56
  return fixedGroups.map(group => {
57
+ const configuration = documentationItemConfigurationToDTOV1(group.data?.configuration);
58
+
57
59
  return {
58
60
  ...elementGroupToDocumentationGroupStructureDTOV1(group, childrenIdsMap),
59
- configuration: documentationItemConfigurationToDTOV1(group.data?.configuration),
61
+ // backward compatibility with custom doc exporters, anyway these groups will not be shown, so we can adjust title
62
+ title: configuration.isHidden && !group.meta.name.startsWith("_") ? "_" + group.meta.name : group.meta.name,
63
+ configuration,
60
64
  };
61
65
  });
62
66
  }
@@ -49,16 +49,19 @@ function documentationPageToDTOV1(page: DocumentationPageV1, pagePathMap: Map<st
49
49
 
50
50
  if (path.startsWith("/")) path = path.substring(1);
51
51
 
52
+ const configuration = documentationItemConfigurationToDTOV1(page.data.configuration);
53
+
52
54
  return {
53
55
  id: page.id,
54
56
  designSystemVersionId: page.designSystemVersionId,
55
57
  persistentId: page.persistentId,
56
58
  shortPersistentId: page.shortPersistentId,
57
- title: page.meta.name,
59
+ // backward compatibility with custom doc exporters, anyway these pages will not be shown, so we can adjust title
60
+ title: configuration.isHidden && !page.meta.name.startsWith("_") ? "_" + page.meta.name : page.meta.name,
58
61
  blocks: page.data.blocks,
59
62
  slug: page.slug,
60
63
  userSlug: page.userSlug,
61
- configuration: documentationItemConfigurationToDTOV1(page.data.configuration),
64
+ configuration,
62
65
  createdAt: page.createdAt,
63
66
  updatedAt: page.updatedAt,
64
67
  path: path,
@@ -42,7 +42,7 @@ export const DTOCreateDocumentationGroupInput = z.object({
42
42
 
43
43
  // Group properties
44
44
  title: z.string(),
45
- configuration: DTODocumentationItemConfigurationV2.optional(),
45
+ configuration: DTODocumentationItemConfigurationV2.partial().optional(),
46
46
 
47
47
  // Group placement properties
48
48
  afterPersistentId: z.string().uuid().nullish(),
@@ -33,7 +33,6 @@ export const DTODocumentationHierarchyV2 = z.object({
33
33
 
34
34
  export type DTODocumentationHierarchyV2 = z.infer<typeof DTODocumentationHierarchyV2>;
35
35
 
36
-
37
36
  //
38
37
  // Write
39
38
  //
@@ -44,7 +43,7 @@ export const DTOCreateDocumentationPageInputV2 = z.object({
44
43
 
45
44
  // Page properties
46
45
  title: z.string(),
47
- configuration: DTODocumentationItemConfigurationV2.optional(),
46
+ configuration: DTODocumentationItemConfigurationV2.partial().optional(),
48
47
 
49
48
  // Page placement properties
50
49
  parentPersistentId: z.string().uuid(),