@supernova-studio/client 0.58.21 → 0.58.22
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 +19 -3
- package/dist/index.d.ts +19 -3
- package/dist/index.js +32 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/conversion/documentation/documentation-page-v2-to-dto.ts +14 -8
- package/src/api/dto/elements/documentation/page-v2.ts +3 -0
- package/src/yjs/version-room/base.ts +15 -0
- package/src/yjs/version-room/frontend.ts +3 -1
package/dist/index.d.mts
CHANGED
|
@@ -23232,6 +23232,7 @@ declare const DTODocumentationPageSnapshot: z.ZodObject<{
|
|
|
23232
23232
|
pagePersistentId: string;
|
|
23233
23233
|
updatedByUserId: string;
|
|
23234
23234
|
}>>;
|
|
23235
|
+
liveblocksRoomId: z.ZodOptional<z.ZodString>;
|
|
23235
23236
|
type: z.ZodLiteral<"Page">;
|
|
23236
23237
|
}, "strip", z.ZodTypeAny, {
|
|
23237
23238
|
path: string;
|
|
@@ -23337,6 +23338,7 @@ declare const DTODocumentationPageSnapshot: z.ZodObject<{
|
|
|
23337
23338
|
lastPublishedByUserId: string;
|
|
23338
23339
|
lastPublishedAt: Date;
|
|
23339
23340
|
} | undefined;
|
|
23341
|
+
liveblocksRoomId?: string | undefined;
|
|
23340
23342
|
}, {
|
|
23341
23343
|
path: string;
|
|
23342
23344
|
type: "Page";
|
|
@@ -23441,6 +23443,7 @@ declare const DTODocumentationPageSnapshot: z.ZodObject<{
|
|
|
23441
23443
|
lastPublishedByUserId: string;
|
|
23442
23444
|
lastPublishedAt: Date;
|
|
23443
23445
|
} | undefined;
|
|
23446
|
+
liveblocksRoomId?: string | undefined;
|
|
23444
23447
|
}>;
|
|
23445
23448
|
pageContentHash: z.ZodString;
|
|
23446
23449
|
reason: z.ZodEnum<["Publish", "Deletion"]>;
|
|
@@ -23553,6 +23556,7 @@ declare const DTODocumentationPageSnapshot: z.ZodObject<{
|
|
|
23553
23556
|
lastPublishedByUserId: string;
|
|
23554
23557
|
lastPublishedAt: Date;
|
|
23555
23558
|
} | undefined;
|
|
23559
|
+
liveblocksRoomId?: string | undefined;
|
|
23556
23560
|
};
|
|
23557
23561
|
pageContentHash: string;
|
|
23558
23562
|
reason: "Publish" | "Deletion";
|
|
@@ -23665,6 +23669,7 @@ declare const DTODocumentationPageSnapshot: z.ZodObject<{
|
|
|
23665
23669
|
lastPublishedByUserId: string;
|
|
23666
23670
|
lastPublishedAt: Date;
|
|
23667
23671
|
} | undefined;
|
|
23672
|
+
liveblocksRoomId?: string | undefined;
|
|
23668
23673
|
};
|
|
23669
23674
|
pageContentHash: string;
|
|
23670
23675
|
reason: "Publish" | "Deletion";
|
|
@@ -29874,6 +29879,7 @@ declare const DTODocumentationHierarchyV2: z.ZodObject<{
|
|
|
29874
29879
|
pagePersistentId: string;
|
|
29875
29880
|
updatedByUserId: string;
|
|
29876
29881
|
}>>;
|
|
29882
|
+
liveblocksRoomId: z.ZodOptional<z.ZodString>;
|
|
29877
29883
|
type: z.ZodLiteral<"Page">;
|
|
29878
29884
|
}, {
|
|
29879
29885
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
@@ -30342,6 +30348,7 @@ declare const DTODocumentationHierarchyV2: z.ZodObject<{
|
|
|
30342
30348
|
lastPublishedByUserId: string;
|
|
30343
30349
|
lastPublishedAt: Date;
|
|
30344
30350
|
} | undefined;
|
|
30351
|
+
liveblocksRoomId?: string | undefined;
|
|
30345
30352
|
}, {
|
|
30346
30353
|
path: string;
|
|
30347
30354
|
type: "Page";
|
|
@@ -30446,6 +30453,7 @@ declare const DTODocumentationHierarchyV2: z.ZodObject<{
|
|
|
30446
30453
|
lastPublishedByUserId: string;
|
|
30447
30454
|
lastPublishedAt: Date;
|
|
30448
30455
|
} | undefined;
|
|
30456
|
+
liveblocksRoomId?: string | undefined;
|
|
30449
30457
|
}>, "many">;
|
|
30450
30458
|
groups: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<Omit<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
30451
30459
|
id: z.ZodString;
|
|
@@ -32027,6 +32035,7 @@ declare const DTODocumentationHierarchyV2: z.ZodObject<{
|
|
|
32027
32035
|
lastPublishedByUserId: string;
|
|
32028
32036
|
lastPublishedAt: Date;
|
|
32029
32037
|
} | undefined;
|
|
32038
|
+
liveblocksRoomId?: string | undefined;
|
|
32030
32039
|
}[];
|
|
32031
32040
|
}, {
|
|
32032
32041
|
groups: {
|
|
@@ -32235,6 +32244,7 @@ declare const DTODocumentationHierarchyV2: z.ZodObject<{
|
|
|
32235
32244
|
lastPublishedByUserId: string;
|
|
32236
32245
|
lastPublishedAt: Date;
|
|
32237
32246
|
} | undefined;
|
|
32247
|
+
liveblocksRoomId?: string | undefined;
|
|
32238
32248
|
}[];
|
|
32239
32249
|
}>;
|
|
32240
32250
|
type DTODocumentationHierarchyV2 = z.infer<typeof DTODocumentationHierarchyV2>;
|
|
@@ -39723,6 +39733,8 @@ declare const DTODocumentationPageV2: z.ZodObject<{
|
|
|
39723
39733
|
pagePersistentId: string;
|
|
39724
39734
|
updatedByUserId: string;
|
|
39725
39735
|
}>>;
|
|
39736
|
+
/** Id of the page document room */
|
|
39737
|
+
liveblocksRoomId: z.ZodOptional<z.ZodString>;
|
|
39726
39738
|
type: z.ZodLiteral<"Page">;
|
|
39727
39739
|
}, "strip", z.ZodTypeAny, {
|
|
39728
39740
|
path: string;
|
|
@@ -39828,6 +39840,7 @@ declare const DTODocumentationPageV2: z.ZodObject<{
|
|
|
39828
39840
|
lastPublishedByUserId: string;
|
|
39829
39841
|
lastPublishedAt: Date;
|
|
39830
39842
|
} | undefined;
|
|
39843
|
+
liveblocksRoomId?: string | undefined;
|
|
39831
39844
|
}, {
|
|
39832
39845
|
path: string;
|
|
39833
39846
|
type: "Page";
|
|
@@ -39932,6 +39945,7 @@ declare const DTODocumentationPageV2: z.ZodObject<{
|
|
|
39932
39945
|
lastPublishedByUserId: string;
|
|
39933
39946
|
lastPublishedAt: Date;
|
|
39934
39947
|
} | undefined;
|
|
39948
|
+
liveblocksRoomId?: string | undefined;
|
|
39935
39949
|
}>;
|
|
39936
39950
|
type DTODocumentationPageV2 = z.infer<typeof DTODocumentationPageV2>;
|
|
39937
39951
|
declare const DTOCreateDocumentationPageInputV2: z.ZodObject<{
|
|
@@ -83938,9 +83952,9 @@ declare function applyPrivacyConfigurationToNestedItems<PageType extends Documen
|
|
|
83938
83952
|
declare function documentationPagesToDTOV1(pages: DocumentationPageV1[], groups: DocumentationGroupV1[], routingVersion: string): DocumentationPageV1DTO[];
|
|
83939
83953
|
declare function documentationPagesFixedConfigurationToDTOV1(pages: DocumentationPageV1[], groups: DocumentationGroupV1[], routingVersion: string): DocumentationPageV1DTO[];
|
|
83940
83954
|
|
|
83941
|
-
declare function documentationPageToDTOV2(page: DocumentationPageV2, groups: ElementGroup[], routingVersion: string): DTODocumentationPageV2;
|
|
83942
|
-
declare function documentationPagesToDTOV2(pages: DocumentationPageV2[], groups: ElementGroup[], routingVersion: string): DTODocumentationPageV2[];
|
|
83943
|
-
declare function documentationPagesFixedConfigurationToDTOV2(pages: DocumentationPageV2[], groups: ElementGroup[], routingVersion: string): DTODocumentationPageV2[];
|
|
83955
|
+
declare function documentationPageToDTOV2(page: DocumentationPageV2, groups: ElementGroup[], routingVersion: string, pageLiveblocksRoomIdMap: Map<string, string>): DTODocumentationPageV2;
|
|
83956
|
+
declare function documentationPagesToDTOV2(pages: DocumentationPageV2[], groups: ElementGroup[], routingVersion: string, pageLiveblocksRoomIdMap: Map<string, string>): DTODocumentationPageV2[];
|
|
83957
|
+
declare function documentationPagesFixedConfigurationToDTOV2(pages: DocumentationPageV2[], groups: ElementGroup[], routingVersion: string, pageLiveblocksRoomIdMap: Map<string, string>): DTODocumentationPageV2[];
|
|
83944
83958
|
|
|
83945
83959
|
declare function pipelineToDto(pipeline: Pipeline): DTOPipeline;
|
|
83946
83960
|
|
|
@@ -94641,6 +94655,8 @@ declare class VersionRoomBaseYDoc {
|
|
|
94641
94655
|
private setObjects;
|
|
94642
94656
|
private deleteObjects;
|
|
94643
94657
|
getDocumentationPageContentHashes(): Record<string, string>;
|
|
94658
|
+
getDocumentationPageLiveblocksRoomIds(): Record<string, string>;
|
|
94659
|
+
private get documentationPageLiveblocksRoomIdsYMap();
|
|
94644
94660
|
updateDocumentationPageContentHashes(hashes: Record<string, string>): void;
|
|
94645
94661
|
private get documentationPageContentHashesYMap();
|
|
94646
94662
|
updateApprovalStates(updates: DocumentationPageApproval[]): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -23232,6 +23232,7 @@ declare const DTODocumentationPageSnapshot: z.ZodObject<{
|
|
|
23232
23232
|
pagePersistentId: string;
|
|
23233
23233
|
updatedByUserId: string;
|
|
23234
23234
|
}>>;
|
|
23235
|
+
liveblocksRoomId: z.ZodOptional<z.ZodString>;
|
|
23235
23236
|
type: z.ZodLiteral<"Page">;
|
|
23236
23237
|
}, "strip", z.ZodTypeAny, {
|
|
23237
23238
|
path: string;
|
|
@@ -23337,6 +23338,7 @@ declare const DTODocumentationPageSnapshot: z.ZodObject<{
|
|
|
23337
23338
|
lastPublishedByUserId: string;
|
|
23338
23339
|
lastPublishedAt: Date;
|
|
23339
23340
|
} | undefined;
|
|
23341
|
+
liveblocksRoomId?: string | undefined;
|
|
23340
23342
|
}, {
|
|
23341
23343
|
path: string;
|
|
23342
23344
|
type: "Page";
|
|
@@ -23441,6 +23443,7 @@ declare const DTODocumentationPageSnapshot: z.ZodObject<{
|
|
|
23441
23443
|
lastPublishedByUserId: string;
|
|
23442
23444
|
lastPublishedAt: Date;
|
|
23443
23445
|
} | undefined;
|
|
23446
|
+
liveblocksRoomId?: string | undefined;
|
|
23444
23447
|
}>;
|
|
23445
23448
|
pageContentHash: z.ZodString;
|
|
23446
23449
|
reason: z.ZodEnum<["Publish", "Deletion"]>;
|
|
@@ -23553,6 +23556,7 @@ declare const DTODocumentationPageSnapshot: z.ZodObject<{
|
|
|
23553
23556
|
lastPublishedByUserId: string;
|
|
23554
23557
|
lastPublishedAt: Date;
|
|
23555
23558
|
} | undefined;
|
|
23559
|
+
liveblocksRoomId?: string | undefined;
|
|
23556
23560
|
};
|
|
23557
23561
|
pageContentHash: string;
|
|
23558
23562
|
reason: "Publish" | "Deletion";
|
|
@@ -23665,6 +23669,7 @@ declare const DTODocumentationPageSnapshot: z.ZodObject<{
|
|
|
23665
23669
|
lastPublishedByUserId: string;
|
|
23666
23670
|
lastPublishedAt: Date;
|
|
23667
23671
|
} | undefined;
|
|
23672
|
+
liveblocksRoomId?: string | undefined;
|
|
23668
23673
|
};
|
|
23669
23674
|
pageContentHash: string;
|
|
23670
23675
|
reason: "Publish" | "Deletion";
|
|
@@ -29874,6 +29879,7 @@ declare const DTODocumentationHierarchyV2: z.ZodObject<{
|
|
|
29874
29879
|
pagePersistentId: string;
|
|
29875
29880
|
updatedByUserId: string;
|
|
29876
29881
|
}>>;
|
|
29882
|
+
liveblocksRoomId: z.ZodOptional<z.ZodString>;
|
|
29877
29883
|
type: z.ZodLiteral<"Page">;
|
|
29878
29884
|
}, {
|
|
29879
29885
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
@@ -30342,6 +30348,7 @@ declare const DTODocumentationHierarchyV2: z.ZodObject<{
|
|
|
30342
30348
|
lastPublishedByUserId: string;
|
|
30343
30349
|
lastPublishedAt: Date;
|
|
30344
30350
|
} | undefined;
|
|
30351
|
+
liveblocksRoomId?: string | undefined;
|
|
30345
30352
|
}, {
|
|
30346
30353
|
path: string;
|
|
30347
30354
|
type: "Page";
|
|
@@ -30446,6 +30453,7 @@ declare const DTODocumentationHierarchyV2: z.ZodObject<{
|
|
|
30446
30453
|
lastPublishedByUserId: string;
|
|
30447
30454
|
lastPublishedAt: Date;
|
|
30448
30455
|
} | undefined;
|
|
30456
|
+
liveblocksRoomId?: string | undefined;
|
|
30449
30457
|
}>, "many">;
|
|
30450
30458
|
groups: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<Omit<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
30451
30459
|
id: z.ZodString;
|
|
@@ -32027,6 +32035,7 @@ declare const DTODocumentationHierarchyV2: z.ZodObject<{
|
|
|
32027
32035
|
lastPublishedByUserId: string;
|
|
32028
32036
|
lastPublishedAt: Date;
|
|
32029
32037
|
} | undefined;
|
|
32038
|
+
liveblocksRoomId?: string | undefined;
|
|
32030
32039
|
}[];
|
|
32031
32040
|
}, {
|
|
32032
32041
|
groups: {
|
|
@@ -32235,6 +32244,7 @@ declare const DTODocumentationHierarchyV2: z.ZodObject<{
|
|
|
32235
32244
|
lastPublishedByUserId: string;
|
|
32236
32245
|
lastPublishedAt: Date;
|
|
32237
32246
|
} | undefined;
|
|
32247
|
+
liveblocksRoomId?: string | undefined;
|
|
32238
32248
|
}[];
|
|
32239
32249
|
}>;
|
|
32240
32250
|
type DTODocumentationHierarchyV2 = z.infer<typeof DTODocumentationHierarchyV2>;
|
|
@@ -39723,6 +39733,8 @@ declare const DTODocumentationPageV2: z.ZodObject<{
|
|
|
39723
39733
|
pagePersistentId: string;
|
|
39724
39734
|
updatedByUserId: string;
|
|
39725
39735
|
}>>;
|
|
39736
|
+
/** Id of the page document room */
|
|
39737
|
+
liveblocksRoomId: z.ZodOptional<z.ZodString>;
|
|
39726
39738
|
type: z.ZodLiteral<"Page">;
|
|
39727
39739
|
}, "strip", z.ZodTypeAny, {
|
|
39728
39740
|
path: string;
|
|
@@ -39828,6 +39840,7 @@ declare const DTODocumentationPageV2: z.ZodObject<{
|
|
|
39828
39840
|
lastPublishedByUserId: string;
|
|
39829
39841
|
lastPublishedAt: Date;
|
|
39830
39842
|
} | undefined;
|
|
39843
|
+
liveblocksRoomId?: string | undefined;
|
|
39831
39844
|
}, {
|
|
39832
39845
|
path: string;
|
|
39833
39846
|
type: "Page";
|
|
@@ -39932,6 +39945,7 @@ declare const DTODocumentationPageV2: z.ZodObject<{
|
|
|
39932
39945
|
lastPublishedByUserId: string;
|
|
39933
39946
|
lastPublishedAt: Date;
|
|
39934
39947
|
} | undefined;
|
|
39948
|
+
liveblocksRoomId?: string | undefined;
|
|
39935
39949
|
}>;
|
|
39936
39950
|
type DTODocumentationPageV2 = z.infer<typeof DTODocumentationPageV2>;
|
|
39937
39951
|
declare const DTOCreateDocumentationPageInputV2: z.ZodObject<{
|
|
@@ -83938,9 +83952,9 @@ declare function applyPrivacyConfigurationToNestedItems<PageType extends Documen
|
|
|
83938
83952
|
declare function documentationPagesToDTOV1(pages: DocumentationPageV1[], groups: DocumentationGroupV1[], routingVersion: string): DocumentationPageV1DTO[];
|
|
83939
83953
|
declare function documentationPagesFixedConfigurationToDTOV1(pages: DocumentationPageV1[], groups: DocumentationGroupV1[], routingVersion: string): DocumentationPageV1DTO[];
|
|
83940
83954
|
|
|
83941
|
-
declare function documentationPageToDTOV2(page: DocumentationPageV2, groups: ElementGroup[], routingVersion: string): DTODocumentationPageV2;
|
|
83942
|
-
declare function documentationPagesToDTOV2(pages: DocumentationPageV2[], groups: ElementGroup[], routingVersion: string): DTODocumentationPageV2[];
|
|
83943
|
-
declare function documentationPagesFixedConfigurationToDTOV2(pages: DocumentationPageV2[], groups: ElementGroup[], routingVersion: string): DTODocumentationPageV2[];
|
|
83955
|
+
declare function documentationPageToDTOV2(page: DocumentationPageV2, groups: ElementGroup[], routingVersion: string, pageLiveblocksRoomIdMap: Map<string, string>): DTODocumentationPageV2;
|
|
83956
|
+
declare function documentationPagesToDTOV2(pages: DocumentationPageV2[], groups: ElementGroup[], routingVersion: string, pageLiveblocksRoomIdMap: Map<string, string>): DTODocumentationPageV2[];
|
|
83957
|
+
declare function documentationPagesFixedConfigurationToDTOV2(pages: DocumentationPageV2[], groups: ElementGroup[], routingVersion: string, pageLiveblocksRoomIdMap: Map<string, string>): DTODocumentationPageV2[];
|
|
83944
83958
|
|
|
83945
83959
|
declare function pipelineToDto(pipeline: Pipeline): DTOPipeline;
|
|
83946
83960
|
|
|
@@ -94641,6 +94655,8 @@ declare class VersionRoomBaseYDoc {
|
|
|
94641
94655
|
private setObjects;
|
|
94642
94656
|
private deleteObjects;
|
|
94643
94657
|
getDocumentationPageContentHashes(): Record<string, string>;
|
|
94658
|
+
getDocumentationPageLiveblocksRoomIds(): Record<string, string>;
|
|
94659
|
+
private get documentationPageLiveblocksRoomIdsYMap();
|
|
94644
94660
|
updateDocumentationPageContentHashes(hashes: Record<string, string>): void;
|
|
94645
94661
|
private get documentationPageContentHashesYMap();
|
|
94646
94662
|
updateApprovalStates(updates: DocumentationPageApproval[]): void;
|
package/dist/index.js
CHANGED
|
@@ -838,6 +838,12 @@ function areShallowObjectsEqual(lhs, rhs) {
|
|
|
838
838
|
}
|
|
839
839
|
return true;
|
|
840
840
|
}
|
|
841
|
+
function recordToMap(record) {
|
|
842
|
+
const map = /* @__PURE__ */ new Map();
|
|
843
|
+
for (const [k, v] of Object.entries(record))
|
|
844
|
+
map.set(k, v);
|
|
845
|
+
return map;
|
|
846
|
+
}
|
|
841
847
|
var ContentLoadInstruction = _zod.z.object({
|
|
842
848
|
from: _zod.z.string(),
|
|
843
849
|
to: _zod.z.string(),
|
|
@@ -5048,25 +5054,26 @@ function documentationPageToDTOV1(page, pagePathMap) {
|
|
|
5048
5054
|
}
|
|
5049
5055
|
|
|
5050
5056
|
// src/api/conversion/documentation/documentation-page-v2-to-dto.ts
|
|
5051
|
-
function documentationPageToDTOV2(page, groups, routingVersion) {
|
|
5057
|
+
function documentationPageToDTOV2(page, groups, routingVersion, pageLiveblocksRoomIdMap) {
|
|
5052
5058
|
const pathsMap = buildDocPagePublishPaths(groups, [page], routingVersion);
|
|
5053
|
-
return _documentationPageToDTOV2(page, pathsMap);
|
|
5059
|
+
return _documentationPageToDTOV2(page, pathsMap, pageLiveblocksRoomIdMap);
|
|
5054
5060
|
}
|
|
5055
|
-
function documentationPagesToDTOV2(pages, groups, routingVersion) {
|
|
5061
|
+
function documentationPagesToDTOV2(pages, groups, routingVersion, pageLiveblocksRoomIdMap) {
|
|
5056
5062
|
const pathsMap = buildDocPagePublishPaths(groups, pages, routingVersion);
|
|
5057
|
-
return pages.map((page) => _documentationPageToDTOV2(page, pathsMap));
|
|
5063
|
+
return pages.map((page) => _documentationPageToDTOV2(page, pathsMap, pageLiveblocksRoomIdMap));
|
|
5058
5064
|
}
|
|
5059
|
-
function documentationPagesFixedConfigurationToDTOV2(pages, groups, routingVersion) {
|
|
5065
|
+
function documentationPagesFixedConfigurationToDTOV2(pages, groups, routingVersion, pageLiveblocksRoomIdMap) {
|
|
5060
5066
|
const pathsMap = buildDocPagePublishPaths(groups, pages, routingVersion);
|
|
5061
5067
|
const { pages: fixedPages } = applyPrivacyConfigurationToNestedItems(pages, groups, getDtoDefaultItemConfigurationV2);
|
|
5062
|
-
return fixedPages.map((page) => _documentationPageToDTOV2(page, pathsMap));
|
|
5068
|
+
return fixedPages.map((page) => _documentationPageToDTOV2(page, pathsMap, pageLiveblocksRoomIdMap));
|
|
5063
5069
|
}
|
|
5064
|
-
function _documentationPageToDTOV2(page, pagePathMap) {
|
|
5070
|
+
function _documentationPageToDTOV2(page, pagePathMap, pageLiveblocksRoomIdMap) {
|
|
5065
5071
|
let path = pagePathMap.get(page.persistentId);
|
|
5066
5072
|
if (!path)
|
|
5067
5073
|
throw new Error(`Path for page ${page.id} was not calculated`);
|
|
5068
5074
|
if (path.startsWith("/"))
|
|
5069
5075
|
path = path.substring(1);
|
|
5076
|
+
const liveblocksRoomId = pageLiveblocksRoomIdMap.get(page.persistentId);
|
|
5070
5077
|
return {
|
|
5071
5078
|
id: page.id,
|
|
5072
5079
|
designSystemVersionId: page.designSystemVersionId,
|
|
@@ -5079,7 +5086,8 @@ function _documentationPageToDTOV2(page, pagePathMap) {
|
|
|
5079
5086
|
createdAt: page.createdAt,
|
|
5080
5087
|
updatedAt: page.updatedAt,
|
|
5081
5088
|
path,
|
|
5082
|
-
type: "Page"
|
|
5089
|
+
type: "Page",
|
|
5090
|
+
...liveblocksRoomId && { liveblocksRoomId }
|
|
5083
5091
|
};
|
|
5084
5092
|
}
|
|
5085
5093
|
|
|
@@ -6271,6 +6279,8 @@ var DTODocumentationPageV2 = _zod.z.object({
|
|
|
6271
6279
|
publishMetadata: DTODocumentationPublishMetadata.optional(),
|
|
6272
6280
|
/** Defines the approval state of the documentation page */
|
|
6273
6281
|
approvalState: DTODocumentationPageApprovalState.optional(),
|
|
6282
|
+
/** Id of the page document room */
|
|
6283
|
+
liveblocksRoomId: _zod.z.string().optional(),
|
|
6274
6284
|
// Backward compatibility
|
|
6275
6285
|
type: _zod.z.literal("Page")
|
|
6276
6286
|
});
|
|
@@ -8268,6 +8278,18 @@ var VersionRoomBaseYDoc = class {
|
|
|
8268
8278
|
});
|
|
8269
8279
|
return result;
|
|
8270
8280
|
}
|
|
8281
|
+
getDocumentationPageLiveblocksRoomIds() {
|
|
8282
|
+
const map = this.documentationPageLiveblocksRoomIdsYMap;
|
|
8283
|
+
const result = {};
|
|
8284
|
+
map.forEach((hash2, key) => {
|
|
8285
|
+
if (typeof hash2 === "string")
|
|
8286
|
+
result[key] = hash2;
|
|
8287
|
+
});
|
|
8288
|
+
return result;
|
|
8289
|
+
}
|
|
8290
|
+
get documentationPageLiveblocksRoomIdsYMap() {
|
|
8291
|
+
return this.yDoc.getMap("documentationPageLiveblocksRoomIds");
|
|
8292
|
+
}
|
|
8271
8293
|
updateDocumentationPageContentHashes(hashes) {
|
|
8272
8294
|
const map = this.documentationPageContentHashesYMap;
|
|
8273
8295
|
Object.entries(hashes).forEach(([key, hash2]) => map.set(key, hash2));
|
|
@@ -8375,12 +8397,13 @@ var FrontendVersionRoomYDoc = class {
|
|
|
8375
8397
|
const groups = doc.getGroups();
|
|
8376
8398
|
const pageSnapshots = doc.getPageSnapshots();
|
|
8377
8399
|
const groupSnapshots = doc.getGroupSnapshots();
|
|
8400
|
+
const liveblocksRoomIds = recordToMap(doc.getDocumentationPageLiveblocksRoomIds());
|
|
8378
8401
|
if (includeDeletedContent) {
|
|
8379
8402
|
pages.push(...this.getDeletedPages(pages, pageSnapshots));
|
|
8380
8403
|
groups.push(...this.getDeletedGroups(groups, groupSnapshots));
|
|
8381
8404
|
}
|
|
8382
8405
|
const settings = doc.getDocumentationInternalSettings();
|
|
8383
|
-
const pageDTOs = documentationPagesToDTOV2(pages, groups, settings.routingVersion);
|
|
8406
|
+
const pageDTOs = documentationPagesToDTOV2(pages, groups, settings.routingVersion, liveblocksRoomIds);
|
|
8384
8407
|
const groupDTOs = elementGroupsToDocumentationGroupDTOV2(groups, pages);
|
|
8385
8408
|
if (!settings.isDraftFeatureAdopted) {
|
|
8386
8409
|
return {
|