@supernova-studio/client 0.14.0 → 0.15.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/dist/index.d.mts CHANGED
@@ -925,7 +925,7 @@ declare const DocumentationPageV1DTO: z.ZodObject<{
925
925
  }>;
926
926
  type DocumentationPageV1DTO = z.infer<typeof DocumentationPageV1DTO>;
927
927
 
928
- declare const DocumentationPageV2DTO: z.ZodObject<{
928
+ declare const DTODocumentationPageV2: z.ZodObject<{
929
929
  id: z.ZodString;
930
930
  createdAt: z.ZodDate;
931
931
  updatedAt: z.ZodDate;
@@ -1400,12 +1400,12 @@ declare const DocumentationPageV2DTO: z.ZodObject<{
1400
1400
  };
1401
1401
  } | null | undefined;
1402
1402
  }>;
1403
- type DocumentationPageV2DTO = z.infer<typeof DocumentationPageV2DTO>;
1403
+ type DTODocumentationPageV2 = z.infer<typeof DTODocumentationPageV2>;
1404
1404
  /**
1405
1405
  * Structure DTO is element properties minus element data (in other words data required
1406
1406
  * to display the element in the left panel)
1407
1407
  */
1408
- declare const DocumentationPageStructureV2DTO: z.ZodObject<{
1408
+ declare const DTODocumentationPageStructureV2: z.ZodObject<{
1409
1409
  id: z.ZodString;
1410
1410
  createdAt: z.ZodDate;
1411
1411
  updatedAt: z.ZodDate;
@@ -1439,8 +1439,8 @@ declare const DocumentationPageStructureV2DTO: z.ZodObject<{
1439
1439
  slug?: string | undefined;
1440
1440
  userSlug?: string | undefined;
1441
1441
  }>;
1442
- type DocumentationPageStructureV2DTO = z.infer<typeof DocumentationPageStructureV2DTO>;
1443
- declare const DocumentationHierarchyV2DTO: z.ZodObject<{
1442
+ type DTODocumentationPageStructureV2 = z.infer<typeof DTODocumentationPageStructureV2>;
1443
+ declare const DTODocumentationHierarchyV2: z.ZodObject<{
1444
1444
  pages: z.ZodArray<z.ZodObject<{
1445
1445
  id: z.ZodString;
1446
1446
  createdAt: z.ZodDate;
@@ -1570,7 +1570,7 @@ declare const DocumentationHierarchyV2DTO: z.ZodObject<{
1570
1570
  userSlug?: string | undefined;
1571
1571
  }[];
1572
1572
  }>;
1573
- type DocumentationHierarchyV2DTO = z.infer<typeof DocumentationHierarchyV2DTO>;
1573
+ type DTODocumentationHierarchyV2 = z.infer<typeof DTODocumentationHierarchyV2>;
1574
1574
 
1575
1575
  /**
1576
1576
  * Structure DTO is element properties minus element data (in other words data required
@@ -8312,8 +8312,8 @@ declare const PostLiveblocksAuth: z.ZodObject<{
8312
8312
  }>;
8313
8313
 
8314
8314
  type DTODocumentationElementsTransactionOutput = {
8315
- created: DocumentationPageV2DTO[];
8316
- updated: DocumentationPageV2DTO[];
8315
+ created: DTODocumentationPageV2[];
8316
+ updated: DTODocumentationPageV2[];
8317
8317
  deleted: string[];
8318
8318
  };
8319
8319
  type DTOElementsTransactionOutput = {
@@ -8868,8 +8868,8 @@ type ItemsToDelete = {
8868
8868
  pagePersistentIdsToDelete: string[];
8869
8869
  groupPersistentIdsToDelete: string[];
8870
8870
  };
8871
- declare function documentationHierarchyToYjs(doc: Y.Doc, documentationHierarchy: DocumentationHierarchyV2DTO, itemsToDelete: ItemsToDelete): Y.Doc;
8872
- declare function yjsToDocumentationHierarchy(doc: Y.Doc): DocumentationHierarchyV2DTO;
8871
+ declare function documentationHierarchyToYjs(doc: Y.Doc, documentationHierarchy: DTODocumentationHierarchyV2, itemsToDelete: ItemsToDelete): Y.Doc;
8872
+ declare function yjsToDocumentationHierarchy(doc: Y.Doc): DTODocumentationHierarchyV2;
8873
8873
 
8874
8874
  type UpdateDocumentationItemConfiguration = Partial<DocumentationItemConfiguration> & {
8875
8875
  header?: Partial<DocumentationItemHeader>;
@@ -9490,4 +9490,4 @@ declare const BlockDefinitionUtils: {
9490
9490
  };
9491
9491
  };
9492
9492
 
9493
- export { BlockDefinitionUtils, BlockParsingUtils, DTOCreateDocumentationPageInput, type DTODocumentationElementsTransactionOutput, DTODocumentationTransactionInput, DTODuplicateDocumentationPageInput, DTOElementsTransactionInput, type DTOElementsTransactionOutput, DTOUpdateDocumentationPageInput, DesignSystemDTO, DocumentationGroupDTO, DocumentationGroupStructureDTO, DocumentationHierarchyV2DTO, DocumentationPageEditorModel, DocumentationPageStructureV2DTO, DocumentationPageV1DTO, DocumentationPageV2DTO, GetBlockDefinitionsResponse, PageBlockEditorModel, PostLiveblocksAuth, type ProsemirrorBlockItem, type ProsemirrorMark, type ProsemirrorNode, blockDefinitionForBlock, blockToProsemirrorNode, documentationHierarchyToYjs, getMockPageBlockDefinitions, itemConfigurationToYjs, pageToProsemirrorDoc, pageToYXmlFragment, pmSchema, prosemirrorDocToPage, prosemirrorNodeToBlock, serializeAsCustomBlock, yDocToPage, yXmlFragmentToPage, yjsToDocumentationHierarchy, yjsToItemConfiguration };
9493
+ export { BlockDefinitionUtils, BlockParsingUtils, DTOCreateDocumentationPageInput, type DTODocumentationElementsTransactionOutput, DTODocumentationHierarchyV2, DTODocumentationPageStructureV2, DTODocumentationPageV2, DTODocumentationTransactionInput, DTODuplicateDocumentationPageInput, DTOElementsTransactionInput, type DTOElementsTransactionOutput, DTOUpdateDocumentationPageInput, DesignSystemDTO, DocumentationGroupDTO, DocumentationGroupStructureDTO, DocumentationPageEditorModel, DocumentationPageV1DTO, GetBlockDefinitionsResponse, PageBlockEditorModel, PostLiveblocksAuth, type ProsemirrorBlockItem, type ProsemirrorMark, type ProsemirrorNode, blockDefinitionForBlock, blockToProsemirrorNode, documentationHierarchyToYjs, getMockPageBlockDefinitions, itemConfigurationToYjs, pageToProsemirrorDoc, pageToYXmlFragment, pmSchema, prosemirrorDocToPage, prosemirrorNodeToBlock, serializeAsCustomBlock, yDocToPage, yXmlFragmentToPage, yjsToDocumentationHierarchy, yjsToItemConfiguration };
package/dist/index.d.ts CHANGED
@@ -925,7 +925,7 @@ declare const DocumentationPageV1DTO: z.ZodObject<{
925
925
  }>;
926
926
  type DocumentationPageV1DTO = z.infer<typeof DocumentationPageV1DTO>;
927
927
 
928
- declare const DocumentationPageV2DTO: z.ZodObject<{
928
+ declare const DTODocumentationPageV2: z.ZodObject<{
929
929
  id: z.ZodString;
930
930
  createdAt: z.ZodDate;
931
931
  updatedAt: z.ZodDate;
@@ -1400,12 +1400,12 @@ declare const DocumentationPageV2DTO: z.ZodObject<{
1400
1400
  };
1401
1401
  } | null | undefined;
1402
1402
  }>;
1403
- type DocumentationPageV2DTO = z.infer<typeof DocumentationPageV2DTO>;
1403
+ type DTODocumentationPageV2 = z.infer<typeof DTODocumentationPageV2>;
1404
1404
  /**
1405
1405
  * Structure DTO is element properties minus element data (in other words data required
1406
1406
  * to display the element in the left panel)
1407
1407
  */
1408
- declare const DocumentationPageStructureV2DTO: z.ZodObject<{
1408
+ declare const DTODocumentationPageStructureV2: z.ZodObject<{
1409
1409
  id: z.ZodString;
1410
1410
  createdAt: z.ZodDate;
1411
1411
  updatedAt: z.ZodDate;
@@ -1439,8 +1439,8 @@ declare const DocumentationPageStructureV2DTO: z.ZodObject<{
1439
1439
  slug?: string | undefined;
1440
1440
  userSlug?: string | undefined;
1441
1441
  }>;
1442
- type DocumentationPageStructureV2DTO = z.infer<typeof DocumentationPageStructureV2DTO>;
1443
- declare const DocumentationHierarchyV2DTO: z.ZodObject<{
1442
+ type DTODocumentationPageStructureV2 = z.infer<typeof DTODocumentationPageStructureV2>;
1443
+ declare const DTODocumentationHierarchyV2: z.ZodObject<{
1444
1444
  pages: z.ZodArray<z.ZodObject<{
1445
1445
  id: z.ZodString;
1446
1446
  createdAt: z.ZodDate;
@@ -1570,7 +1570,7 @@ declare const DocumentationHierarchyV2DTO: z.ZodObject<{
1570
1570
  userSlug?: string | undefined;
1571
1571
  }[];
1572
1572
  }>;
1573
- type DocumentationHierarchyV2DTO = z.infer<typeof DocumentationHierarchyV2DTO>;
1573
+ type DTODocumentationHierarchyV2 = z.infer<typeof DTODocumentationHierarchyV2>;
1574
1574
 
1575
1575
  /**
1576
1576
  * Structure DTO is element properties minus element data (in other words data required
@@ -8312,8 +8312,8 @@ declare const PostLiveblocksAuth: z.ZodObject<{
8312
8312
  }>;
8313
8313
 
8314
8314
  type DTODocumentationElementsTransactionOutput = {
8315
- created: DocumentationPageV2DTO[];
8316
- updated: DocumentationPageV2DTO[];
8315
+ created: DTODocumentationPageV2[];
8316
+ updated: DTODocumentationPageV2[];
8317
8317
  deleted: string[];
8318
8318
  };
8319
8319
  type DTOElementsTransactionOutput = {
@@ -8868,8 +8868,8 @@ type ItemsToDelete = {
8868
8868
  pagePersistentIdsToDelete: string[];
8869
8869
  groupPersistentIdsToDelete: string[];
8870
8870
  };
8871
- declare function documentationHierarchyToYjs(doc: Y.Doc, documentationHierarchy: DocumentationHierarchyV2DTO, itemsToDelete: ItemsToDelete): Y.Doc;
8872
- declare function yjsToDocumentationHierarchy(doc: Y.Doc): DocumentationHierarchyV2DTO;
8871
+ declare function documentationHierarchyToYjs(doc: Y.Doc, documentationHierarchy: DTODocumentationHierarchyV2, itemsToDelete: ItemsToDelete): Y.Doc;
8872
+ declare function yjsToDocumentationHierarchy(doc: Y.Doc): DTODocumentationHierarchyV2;
8873
8873
 
8874
8874
  type UpdateDocumentationItemConfiguration = Partial<DocumentationItemConfiguration> & {
8875
8875
  header?: Partial<DocumentationItemHeader>;
@@ -9490,4 +9490,4 @@ declare const BlockDefinitionUtils: {
9490
9490
  };
9491
9491
  };
9492
9492
 
9493
- export { BlockDefinitionUtils, BlockParsingUtils, DTOCreateDocumentationPageInput, type DTODocumentationElementsTransactionOutput, DTODocumentationTransactionInput, DTODuplicateDocumentationPageInput, DTOElementsTransactionInput, type DTOElementsTransactionOutput, DTOUpdateDocumentationPageInput, DesignSystemDTO, DocumentationGroupDTO, DocumentationGroupStructureDTO, DocumentationHierarchyV2DTO, DocumentationPageEditorModel, DocumentationPageStructureV2DTO, DocumentationPageV1DTO, DocumentationPageV2DTO, GetBlockDefinitionsResponse, PageBlockEditorModel, PostLiveblocksAuth, type ProsemirrorBlockItem, type ProsemirrorMark, type ProsemirrorNode, blockDefinitionForBlock, blockToProsemirrorNode, documentationHierarchyToYjs, getMockPageBlockDefinitions, itemConfigurationToYjs, pageToProsemirrorDoc, pageToYXmlFragment, pmSchema, prosemirrorDocToPage, prosemirrorNodeToBlock, serializeAsCustomBlock, yDocToPage, yXmlFragmentToPage, yjsToDocumentationHierarchy, yjsToItemConfiguration };
9493
+ export { BlockDefinitionUtils, BlockParsingUtils, DTOCreateDocumentationPageInput, type DTODocumentationElementsTransactionOutput, DTODocumentationHierarchyV2, DTODocumentationPageStructureV2, DTODocumentationPageV2, DTODocumentationTransactionInput, DTODuplicateDocumentationPageInput, DTOElementsTransactionInput, type DTOElementsTransactionOutput, DTOUpdateDocumentationPageInput, DesignSystemDTO, DocumentationGroupDTO, DocumentationGroupStructureDTO, DocumentationPageEditorModel, DocumentationPageV1DTO, GetBlockDefinitionsResponse, PageBlockEditorModel, PostLiveblocksAuth, type ProsemirrorBlockItem, type ProsemirrorMark, type ProsemirrorNode, blockDefinitionForBlock, blockToProsemirrorNode, documentationHierarchyToYjs, getMockPageBlockDefinitions, itemConfigurationToYjs, pageToProsemirrorDoc, pageToYXmlFragment, pmSchema, prosemirrorDocToPage, prosemirrorNodeToBlock, serializeAsCustomBlock, yDocToPage, yXmlFragmentToPage, yjsToDocumentationHierarchy, yjsToItemConfiguration };
package/dist/index.js CHANGED
@@ -2720,7 +2720,7 @@ var DocumentationGroupDTO = DocumentationGroupStructureDTO.extend({
2720
2720
  });
2721
2721
 
2722
2722
  // src/api/dto/documentation-v2.ts
2723
- var DocumentationPageStructureV2DTO = DocumentationPageV2.omit({
2723
+ var DTODocumentationPageStructureV2 = DocumentationPageV2.omit({
2724
2724
  data: true,
2725
2725
  meta: true,
2726
2726
  parentPersistentId: true,
@@ -2729,9 +2729,9 @@ var DocumentationPageStructureV2DTO = DocumentationPageV2.omit({
2729
2729
  title: _zod.z.string(),
2730
2730
  path: _zod.z.string()
2731
2731
  });
2732
- var DocumentationPageV2DTO = DocumentationPageStructureV2DTO.extend(DocumentationPageV2.shape.data.shape);
2733
- var DocumentationHierarchyV2DTO = _zod.z.object({
2734
- pages: _zod.z.array(DocumentationPageStructureV2DTO),
2732
+ var DTODocumentationPageV2 = DTODocumentationPageStructureV2.extend(DocumentationPageV2.shape.data.shape);
2733
+ var DTODocumentationHierarchyV2 = _zod.z.object({
2734
+ pages: _zod.z.array(DTODocumentationPageStructureV2),
2735
2735
  groups: _zod.z.array(DocumentationGroupStructureDTO)
2736
2736
  });
2737
2737
 
@@ -2804,7 +2804,7 @@ function yjsToDocumentationHierarchy(doc) {
2804
2804
  const groupsMap = getGroupsYMap(doc);
2805
2805
  const pages = [];
2806
2806
  pagesMap.forEach((page) => {
2807
- pages.push(DocumentationPageStructureV2DTO.parse(page));
2807
+ pages.push(DTODocumentationPageStructureV2.parse(page));
2808
2808
  });
2809
2809
  const groups = [];
2810
2810
  groupsMap.forEach((group) => {
@@ -7023,5 +7023,5 @@ function mapByUnique(items, keyFn) {
7023
7023
 
7024
7024
 
7025
7025
 
7026
- exports.BlockDefinitionUtils = BlockDefinitionUtils; exports.BlockParsingUtils = BlockParsingUtils; exports.DTOCreateDocumentationPageInput = DTOCreateDocumentationPageInput; exports.DTODocumentationTransactionInput = DTODocumentationTransactionInput; exports.DTODuplicateDocumentationPageInput = DTODuplicateDocumentationPageInput; exports.DTOElementsTransactionInput = DTOElementsTransactionInput; exports.DTOUpdateDocumentationPageInput = DTOUpdateDocumentationPageInput; exports.DesignSystemDTO = DesignSystemDTO; exports.DocumentationGroupDTO = DocumentationGroupDTO; exports.DocumentationGroupStructureDTO = DocumentationGroupStructureDTO; exports.DocumentationHierarchyV2DTO = DocumentationHierarchyV2DTO; exports.DocumentationPageEditorModel = DocumentationPageEditorModel; exports.DocumentationPageStructureV2DTO = DocumentationPageStructureV2DTO; exports.DocumentationPageV1DTO = DocumentationPageV1DTO; exports.DocumentationPageV2DTO = DocumentationPageV2DTO; exports.GetBlockDefinitionsResponse = GetBlockDefinitionsResponse; exports.PageBlockEditorModel = PageBlockEditorModel; exports.PostLiveblocksAuth = PostLiveblocksAuth; exports.blockDefinitionForBlock = blockDefinitionForBlock; exports.blockToProsemirrorNode = blockToProsemirrorNode; exports.documentationHierarchyToYjs = documentationHierarchyToYjs; exports.getMockPageBlockDefinitions = getMockPageBlockDefinitions; exports.itemConfigurationToYjs = itemConfigurationToYjs; exports.pageToProsemirrorDoc = pageToProsemirrorDoc; exports.pageToYXmlFragment = pageToYXmlFragment; exports.pmSchema = pmSchema; exports.prosemirrorDocToPage = prosemirrorDocToPage; exports.prosemirrorNodeToBlock = prosemirrorNodeToBlock; exports.serializeAsCustomBlock = serializeAsCustomBlock; exports.yDocToPage = yDocToPage; exports.yXmlFragmentToPage = yXmlFragmentToPage; exports.yjsToDocumentationHierarchy = yjsToDocumentationHierarchy; exports.yjsToItemConfiguration = yjsToItemConfiguration;
7026
+ exports.BlockDefinitionUtils = BlockDefinitionUtils; exports.BlockParsingUtils = BlockParsingUtils; exports.DTOCreateDocumentationPageInput = DTOCreateDocumentationPageInput; exports.DTODocumentationHierarchyV2 = DTODocumentationHierarchyV2; exports.DTODocumentationPageStructureV2 = DTODocumentationPageStructureV2; exports.DTODocumentationPageV2 = DTODocumentationPageV2; exports.DTODocumentationTransactionInput = DTODocumentationTransactionInput; exports.DTODuplicateDocumentationPageInput = DTODuplicateDocumentationPageInput; exports.DTOElementsTransactionInput = DTOElementsTransactionInput; exports.DTOUpdateDocumentationPageInput = DTOUpdateDocumentationPageInput; exports.DesignSystemDTO = DesignSystemDTO; exports.DocumentationGroupDTO = DocumentationGroupDTO; exports.DocumentationGroupStructureDTO = DocumentationGroupStructureDTO; exports.DocumentationPageEditorModel = DocumentationPageEditorModel; exports.DocumentationPageV1DTO = DocumentationPageV1DTO; exports.GetBlockDefinitionsResponse = GetBlockDefinitionsResponse; exports.PageBlockEditorModel = PageBlockEditorModel; exports.PostLiveblocksAuth = PostLiveblocksAuth; exports.blockDefinitionForBlock = blockDefinitionForBlock; exports.blockToProsemirrorNode = blockToProsemirrorNode; exports.documentationHierarchyToYjs = documentationHierarchyToYjs; exports.getMockPageBlockDefinitions = getMockPageBlockDefinitions; exports.itemConfigurationToYjs = itemConfigurationToYjs; exports.pageToProsemirrorDoc = pageToProsemirrorDoc; exports.pageToYXmlFragment = pageToYXmlFragment; exports.pmSchema = pmSchema; exports.prosemirrorDocToPage = prosemirrorDocToPage; exports.prosemirrorNodeToBlock = prosemirrorNodeToBlock; exports.serializeAsCustomBlock = serializeAsCustomBlock; exports.yDocToPage = yDocToPage; exports.yXmlFragmentToPage = yXmlFragmentToPage; exports.yjsToDocumentationHierarchy = yjsToDocumentationHierarchy; exports.yjsToItemConfiguration = yjsToItemConfiguration;
7027
7027
  //# sourceMappingURL=index.js.map