@supernova-studio/client 0.58.17 → 0.58.18
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 +42 -1
- package/dist/index.d.ts +42 -1
- package/dist/index.js +38 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +373 -343
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/client.ts +3 -0
- package/src/api/dto/documentation/index.ts +1 -0
- package/src/api/dto/documentation/room.ts +12 -0
- package/src/api/endpoints/design-system/versions/documentation.ts +11 -7
- package/src/api/endpoints/index.ts +1 -0
- package/src/api/endpoints/liveblocks.ts +14 -0
package/dist/index.mjs
CHANGED
|
@@ -4283,7 +4283,8 @@ var RestoredDocumentationGroup = z149.object({
|
|
|
4283
4283
|
parent: ElementGroup
|
|
4284
4284
|
});
|
|
4285
4285
|
var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
4286
|
-
RoomTypeEnum2["
|
|
4286
|
+
RoomTypeEnum2["DocumentationPageOld"] = "documentation-page";
|
|
4287
|
+
RoomTypeEnum2["DocumentationPage"] = "doc-page";
|
|
4287
4288
|
RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
|
|
4288
4289
|
RoomTypeEnum2["Workspace"] = "workspace";
|
|
4289
4290
|
return RoomTypeEnum2;
|
|
@@ -6467,53 +6468,62 @@ var DTOPublishDocumentationResponse = z228.object({
|
|
|
6467
6468
|
job: DTOExportJob
|
|
6468
6469
|
});
|
|
6469
6470
|
|
|
6471
|
+
// src/api/dto/documentation/room.ts
|
|
6472
|
+
import { z as z229 } from "zod";
|
|
6473
|
+
var DTODocumentationPageRoom = z229.object({
|
|
6474
|
+
id: z229.string()
|
|
6475
|
+
});
|
|
6476
|
+
var DTODocumentationPageRoomResponse = z229.object({
|
|
6477
|
+
room: DTODocumentationPageRoom
|
|
6478
|
+
});
|
|
6479
|
+
|
|
6470
6480
|
// src/api/dto/elements/components/figma-component-group.ts
|
|
6471
|
-
import
|
|
6472
|
-
var DTOFigmaComponentGroup =
|
|
6473
|
-
id:
|
|
6474
|
-
designSystemVersionId:
|
|
6475
|
-
persistentId:
|
|
6476
|
-
isRoot:
|
|
6477
|
-
brandId:
|
|
6481
|
+
import z230 from "zod";
|
|
6482
|
+
var DTOFigmaComponentGroup = z230.object({
|
|
6483
|
+
id: z230.string(),
|
|
6484
|
+
designSystemVersionId: z230.string(),
|
|
6485
|
+
persistentId: z230.string(),
|
|
6486
|
+
isRoot: z230.boolean(),
|
|
6487
|
+
brandId: z230.string(),
|
|
6478
6488
|
meta: DTOObjectMeta,
|
|
6479
|
-
childrenIds:
|
|
6489
|
+
childrenIds: z230.string().array()
|
|
6480
6490
|
});
|
|
6481
|
-
var DTOFigmaComponentGroupListResponse =
|
|
6491
|
+
var DTOFigmaComponentGroupListResponse = z230.object({
|
|
6482
6492
|
groups: DTOFigmaComponentGroup.array()
|
|
6483
6493
|
});
|
|
6484
6494
|
|
|
6485
6495
|
// src/api/dto/elements/components/figma-component.ts
|
|
6486
|
-
import { z as
|
|
6496
|
+
import { z as z231 } from "zod";
|
|
6487
6497
|
var DTOFigmaComponentProperty = FigmaComponentProperty;
|
|
6488
|
-
var DTOFigmaComponentPropertyMap =
|
|
6489
|
-
var DTOFigmaComponent =
|
|
6490
|
-
id:
|
|
6491
|
-
persistentId:
|
|
6492
|
-
designSystemVersionId:
|
|
6493
|
-
brandId:
|
|
6494
|
-
thumbnailUrl:
|
|
6495
|
-
svgUrl:
|
|
6496
|
-
exportProperties:
|
|
6497
|
-
isAsset:
|
|
6498
|
+
var DTOFigmaComponentPropertyMap = z231.record(DTOFigmaComponentProperty);
|
|
6499
|
+
var DTOFigmaComponent = z231.object({
|
|
6500
|
+
id: z231.string(),
|
|
6501
|
+
persistentId: z231.string(),
|
|
6502
|
+
designSystemVersionId: z231.string(),
|
|
6503
|
+
brandId: z231.string(),
|
|
6504
|
+
thumbnailUrl: z231.string().optional(),
|
|
6505
|
+
svgUrl: z231.string().optional(),
|
|
6506
|
+
exportProperties: z231.object({
|
|
6507
|
+
isAsset: z231.boolean()
|
|
6498
6508
|
}),
|
|
6499
|
-
createdAt:
|
|
6500
|
-
updatedAt:
|
|
6509
|
+
createdAt: z231.coerce.date(),
|
|
6510
|
+
updatedAt: z231.coerce.date(),
|
|
6501
6511
|
meta: ObjectMeta,
|
|
6502
6512
|
originComponent: FigmaComponentOrigin.optional(),
|
|
6503
|
-
parentComponentPersistentId:
|
|
6504
|
-
childrenPersistentIds:
|
|
6513
|
+
parentComponentPersistentId: z231.string().optional(),
|
|
6514
|
+
childrenPersistentIds: z231.string().array().optional(),
|
|
6505
6515
|
componentPropertyDefinitions: DTOFigmaComponentPropertyMap.optional(),
|
|
6506
|
-
variantPropertyValues:
|
|
6516
|
+
variantPropertyValues: z231.record(z231.string()).optional()
|
|
6507
6517
|
});
|
|
6508
|
-
var DTOFigmaComponentListResponse =
|
|
6518
|
+
var DTOFigmaComponentListResponse = z231.object({
|
|
6509
6519
|
components: DTOFigmaComponent.array()
|
|
6510
6520
|
});
|
|
6511
6521
|
|
|
6512
6522
|
// src/api/dto/elements/documentation/group-action.ts
|
|
6513
|
-
import { z as
|
|
6523
|
+
import { z as z233 } from "zod";
|
|
6514
6524
|
|
|
6515
6525
|
// src/api/dto/elements/documentation/group-v2.ts
|
|
6516
|
-
import { z as
|
|
6526
|
+
import { z as z232 } from "zod";
|
|
6517
6527
|
var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
6518
6528
|
sortOrder: true,
|
|
6519
6529
|
parentPersistentId: true,
|
|
@@ -6523,13 +6533,13 @@ var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
|
6523
6533
|
data: true,
|
|
6524
6534
|
shortPersistentId: true
|
|
6525
6535
|
}).extend({
|
|
6526
|
-
title:
|
|
6527
|
-
isRoot:
|
|
6528
|
-
childrenIds:
|
|
6536
|
+
title: z232.string(),
|
|
6537
|
+
isRoot: z232.boolean(),
|
|
6538
|
+
childrenIds: z232.array(z232.string()),
|
|
6529
6539
|
groupBehavior: DocumentationGroupBehavior,
|
|
6530
|
-
shortPersistentId:
|
|
6540
|
+
shortPersistentId: z232.string(),
|
|
6531
6541
|
configuration: DTODocumentationItemConfigurationV2,
|
|
6532
|
-
type:
|
|
6542
|
+
type: z232.literal("Group"),
|
|
6533
6543
|
/** Defined when a group has changed since last publish and can be included into a partial publish */
|
|
6534
6544
|
draftState: DTODocumentationDraftState.optional(),
|
|
6535
6545
|
/** Defined if a group was published at least once and contains metadata about last publish */
|
|
@@ -6537,127 +6547,127 @@ var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
|
6537
6547
|
//** An approval state for frontend to utilize. */
|
|
6538
6548
|
approvalState: DTODocumentationGroupApprovalState.optional()
|
|
6539
6549
|
});
|
|
6540
|
-
var DTOCreateDocumentationGroupInput =
|
|
6550
|
+
var DTOCreateDocumentationGroupInput = z232.object({
|
|
6541
6551
|
// Identifier
|
|
6542
|
-
persistentId:
|
|
6552
|
+
persistentId: z232.string(),
|
|
6543
6553
|
// Group properties
|
|
6544
|
-
title:
|
|
6554
|
+
title: z232.string(),
|
|
6545
6555
|
configuration: DTODocumentationItemConfigurationV2.partial().optional(),
|
|
6546
6556
|
// Group placement properties
|
|
6547
|
-
afterPersistentId:
|
|
6548
|
-
parentPersistentId:
|
|
6557
|
+
afterPersistentId: z232.string().nullish(),
|
|
6558
|
+
parentPersistentId: z232.string()
|
|
6549
6559
|
});
|
|
6550
|
-
var DTOUpdateDocumentationGroupInput =
|
|
6560
|
+
var DTOUpdateDocumentationGroupInput = z232.object({
|
|
6551
6561
|
// Identifier of the group to update
|
|
6552
|
-
id:
|
|
6562
|
+
id: z232.string(),
|
|
6553
6563
|
// Group properties
|
|
6554
|
-
title:
|
|
6564
|
+
title: z232.string().optional(),
|
|
6555
6565
|
configuration: DTODocumentationItemConfigurationV2.partial().optional()
|
|
6556
6566
|
});
|
|
6557
|
-
var DTOMoveDocumentationGroupInput =
|
|
6567
|
+
var DTOMoveDocumentationGroupInput = z232.object({
|
|
6558
6568
|
// Identifier of the group to update
|
|
6559
|
-
id:
|
|
6569
|
+
id: z232.string(),
|
|
6560
6570
|
// Group placement properties
|
|
6561
|
-
parentPersistentId:
|
|
6562
|
-
afterPersistentId:
|
|
6571
|
+
parentPersistentId: z232.string(),
|
|
6572
|
+
afterPersistentId: z232.string().nullish()
|
|
6563
6573
|
});
|
|
6564
|
-
var DTODuplicateDocumentationGroupInput =
|
|
6574
|
+
var DTODuplicateDocumentationGroupInput = z232.object({
|
|
6565
6575
|
// Identifier of the group to duplicate from
|
|
6566
|
-
id:
|
|
6576
|
+
id: z232.string(),
|
|
6567
6577
|
// New group persistent id
|
|
6568
|
-
persistentId:
|
|
6578
|
+
persistentId: z232.string(),
|
|
6569
6579
|
// Group placement properties
|
|
6570
|
-
afterPersistentId:
|
|
6571
|
-
parentPersistentId:
|
|
6580
|
+
afterPersistentId: z232.string().nullish(),
|
|
6581
|
+
parentPersistentId: z232.string()
|
|
6572
6582
|
});
|
|
6573
|
-
var DTOCreateDocumentationTabInput =
|
|
6583
|
+
var DTOCreateDocumentationTabInput = z232.object({
|
|
6574
6584
|
// New group persistent id
|
|
6575
|
-
persistentId:
|
|
6585
|
+
persistentId: z232.string(),
|
|
6576
6586
|
// If this is page, we will attempt to convert it to tab
|
|
6577
6587
|
// If this is tab group, we will add a new tab to it
|
|
6578
|
-
fromItemPersistentId:
|
|
6579
|
-
tabName:
|
|
6588
|
+
fromItemPersistentId: z232.string(),
|
|
6589
|
+
tabName: z232.string()
|
|
6580
6590
|
});
|
|
6581
|
-
var DTODeleteDocumentationTabGroupInput =
|
|
6591
|
+
var DTODeleteDocumentationTabGroupInput = z232.object({
|
|
6582
6592
|
// Deleted group id
|
|
6583
|
-
id:
|
|
6593
|
+
id: z232.string()
|
|
6584
6594
|
});
|
|
6585
|
-
var DTODeleteDocumentationGroupInput =
|
|
6595
|
+
var DTODeleteDocumentationGroupInput = z232.object({
|
|
6586
6596
|
// Identifier
|
|
6587
|
-
id:
|
|
6597
|
+
id: z232.string(),
|
|
6588
6598
|
// Deletion options
|
|
6589
|
-
deleteSubtree:
|
|
6599
|
+
deleteSubtree: z232.boolean().default(false)
|
|
6590
6600
|
});
|
|
6591
6601
|
|
|
6592
6602
|
// src/api/dto/elements/documentation/group-action.ts
|
|
6593
|
-
var SuccessPayload =
|
|
6594
|
-
success:
|
|
6603
|
+
var SuccessPayload = z233.object({
|
|
6604
|
+
success: z233.literal(true)
|
|
6595
6605
|
});
|
|
6596
|
-
var DTODocumentationGroupCreateActionOutputV2 =
|
|
6597
|
-
type:
|
|
6606
|
+
var DTODocumentationGroupCreateActionOutputV2 = z233.object({
|
|
6607
|
+
type: z233.literal("DocumentationGroupCreate"),
|
|
6598
6608
|
output: SuccessPayload
|
|
6599
6609
|
});
|
|
6600
|
-
var DTODocumentationTabCreateActionOutputV2 =
|
|
6601
|
-
type:
|
|
6610
|
+
var DTODocumentationTabCreateActionOutputV2 = z233.object({
|
|
6611
|
+
type: z233.literal("DocumentationTabCreate"),
|
|
6602
6612
|
output: SuccessPayload
|
|
6603
6613
|
});
|
|
6604
|
-
var DTODocumentationGroupUpdateActionOutputV2 =
|
|
6605
|
-
type:
|
|
6614
|
+
var DTODocumentationGroupUpdateActionOutputV2 = z233.object({
|
|
6615
|
+
type: z233.literal("DocumentationGroupUpdate"),
|
|
6606
6616
|
output: SuccessPayload
|
|
6607
6617
|
});
|
|
6608
|
-
var DTODocumentationGroupMoveActionOutputV2 =
|
|
6609
|
-
type:
|
|
6618
|
+
var DTODocumentationGroupMoveActionOutputV2 = z233.object({
|
|
6619
|
+
type: z233.literal("DocumentationGroupMove"),
|
|
6610
6620
|
output: SuccessPayload
|
|
6611
6621
|
});
|
|
6612
|
-
var DTODocumentationGroupDuplicateActionOutputV2 =
|
|
6613
|
-
type:
|
|
6622
|
+
var DTODocumentationGroupDuplicateActionOutputV2 = z233.object({
|
|
6623
|
+
type: z233.literal("DocumentationGroupDuplicate"),
|
|
6614
6624
|
output: SuccessPayload
|
|
6615
6625
|
});
|
|
6616
|
-
var DTODocumentationGroupDeleteActionOutputV2 =
|
|
6617
|
-
type:
|
|
6626
|
+
var DTODocumentationGroupDeleteActionOutputV2 = z233.object({
|
|
6627
|
+
type: z233.literal("DocumentationGroupDelete"),
|
|
6618
6628
|
output: SuccessPayload
|
|
6619
6629
|
});
|
|
6620
|
-
var DTODocumentationTabGroupDeleteActionOutputV2 =
|
|
6621
|
-
type:
|
|
6630
|
+
var DTODocumentationTabGroupDeleteActionOutputV2 = z233.object({
|
|
6631
|
+
type: z233.literal("DocumentationTabGroupDelete"),
|
|
6622
6632
|
output: SuccessPayload
|
|
6623
6633
|
});
|
|
6624
|
-
var DTODocumentationGroupCreateActionInputV2 =
|
|
6625
|
-
type:
|
|
6634
|
+
var DTODocumentationGroupCreateActionInputV2 = z233.object({
|
|
6635
|
+
type: z233.literal("DocumentationGroupCreate"),
|
|
6626
6636
|
input: DTOCreateDocumentationGroupInput
|
|
6627
6637
|
});
|
|
6628
|
-
var DTODocumentationTabCreateActionInputV2 =
|
|
6629
|
-
type:
|
|
6638
|
+
var DTODocumentationTabCreateActionInputV2 = z233.object({
|
|
6639
|
+
type: z233.literal("DocumentationTabCreate"),
|
|
6630
6640
|
input: DTOCreateDocumentationTabInput
|
|
6631
6641
|
});
|
|
6632
|
-
var DTODocumentationGroupUpdateActionInputV2 =
|
|
6633
|
-
type:
|
|
6642
|
+
var DTODocumentationGroupUpdateActionInputV2 = z233.object({
|
|
6643
|
+
type: z233.literal("DocumentationGroupUpdate"),
|
|
6634
6644
|
input: DTOUpdateDocumentationGroupInput
|
|
6635
6645
|
});
|
|
6636
|
-
var DTODocumentationGroupMoveActionInputV2 =
|
|
6637
|
-
type:
|
|
6646
|
+
var DTODocumentationGroupMoveActionInputV2 = z233.object({
|
|
6647
|
+
type: z233.literal("DocumentationGroupMove"),
|
|
6638
6648
|
input: DTOMoveDocumentationGroupInput
|
|
6639
6649
|
});
|
|
6640
|
-
var DTODocumentationGroupDuplicateActionInputV2 =
|
|
6641
|
-
type:
|
|
6650
|
+
var DTODocumentationGroupDuplicateActionInputV2 = z233.object({
|
|
6651
|
+
type: z233.literal("DocumentationGroupDuplicate"),
|
|
6642
6652
|
input: DTODuplicateDocumentationGroupInput
|
|
6643
6653
|
});
|
|
6644
|
-
var DTODocumentationGroupDeleteActionInputV2 =
|
|
6645
|
-
type:
|
|
6654
|
+
var DTODocumentationGroupDeleteActionInputV2 = z233.object({
|
|
6655
|
+
type: z233.literal("DocumentationGroupDelete"),
|
|
6646
6656
|
input: DTODeleteDocumentationGroupInput
|
|
6647
6657
|
});
|
|
6648
|
-
var DTODocumentationTabGroupDeleteActionInputV2 =
|
|
6649
|
-
type:
|
|
6658
|
+
var DTODocumentationTabGroupDeleteActionInputV2 = z233.object({
|
|
6659
|
+
type: z233.literal("DocumentationTabGroupDelete"),
|
|
6650
6660
|
input: DTODeleteDocumentationTabGroupInput
|
|
6651
6661
|
});
|
|
6652
6662
|
|
|
6653
6663
|
// src/api/dto/elements/documentation/group-v1.ts
|
|
6654
|
-
import { z as
|
|
6664
|
+
import { z as z235 } from "zod";
|
|
6655
6665
|
|
|
6656
6666
|
// src/api/dto/elements/documentation/item-configuration-v1.ts
|
|
6657
|
-
import { z as
|
|
6658
|
-
var DocumentationColorV1 =
|
|
6659
|
-
aliasTo:
|
|
6660
|
-
value:
|
|
6667
|
+
import { z as z234 } from "zod";
|
|
6668
|
+
var DocumentationColorV1 = z234.object({
|
|
6669
|
+
aliasTo: z234.string().optional(),
|
|
6670
|
+
value: z234.string().optional()
|
|
6661
6671
|
});
|
|
6662
6672
|
var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
6663
6673
|
foregroundColor: true,
|
|
@@ -6666,10 +6676,10 @@ var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
|
6666
6676
|
foregroundColor: DocumentationColorV1.optional(),
|
|
6667
6677
|
backgroundColor: DocumentationColorV1.optional()
|
|
6668
6678
|
});
|
|
6669
|
-
var DTODocumentationItemConfigurationV1 =
|
|
6670
|
-
showSidebar:
|
|
6671
|
-
isPrivate:
|
|
6672
|
-
isHidden:
|
|
6679
|
+
var DTODocumentationItemConfigurationV1 = z234.object({
|
|
6680
|
+
showSidebar: z234.boolean(),
|
|
6681
|
+
isPrivate: z234.boolean(),
|
|
6682
|
+
isHidden: z234.boolean(),
|
|
6673
6683
|
header: DTODocumentationItemHeaderV1
|
|
6674
6684
|
});
|
|
6675
6685
|
|
|
@@ -6683,27 +6693,27 @@ var DTODocumentationGroupStructureV1 = ElementGroup.omit({
|
|
|
6683
6693
|
data: true,
|
|
6684
6694
|
shortPersistentId: true
|
|
6685
6695
|
}).extend({
|
|
6686
|
-
title:
|
|
6687
|
-
isRoot:
|
|
6688
|
-
childrenIds:
|
|
6696
|
+
title: z235.string(),
|
|
6697
|
+
isRoot: z235.boolean(),
|
|
6698
|
+
childrenIds: z235.array(z235.string()),
|
|
6689
6699
|
groupBehavior: DocumentationGroupBehavior,
|
|
6690
|
-
shortPersistentId:
|
|
6691
|
-
type:
|
|
6700
|
+
shortPersistentId: z235.string(),
|
|
6701
|
+
type: z235.literal("Group")
|
|
6692
6702
|
});
|
|
6693
6703
|
var DTODocumentationGroupV1 = DTODocumentationGroupStructureV1.extend({
|
|
6694
6704
|
configuration: DTODocumentationItemConfigurationV1
|
|
6695
6705
|
});
|
|
6696
6706
|
|
|
6697
6707
|
// src/api/dto/elements/documentation/hierarchy.ts
|
|
6698
|
-
import { z as
|
|
6699
|
-
var DTODocumentationHierarchyV2 =
|
|
6700
|
-
pages:
|
|
6708
|
+
import { z as z236 } from "zod";
|
|
6709
|
+
var DTODocumentationHierarchyV2 = z236.object({
|
|
6710
|
+
pages: z236.array(
|
|
6701
6711
|
DTODocumentationPageV2.extend({
|
|
6702
6712
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
6703
6713
|
draftState: DTODocumentationDraftState.optional()
|
|
6704
6714
|
})
|
|
6705
6715
|
),
|
|
6706
|
-
groups:
|
|
6716
|
+
groups: z236.array(
|
|
6707
6717
|
DTODocumentationGroupV2.extend({
|
|
6708
6718
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
6709
6719
|
draftState: DTODocumentationDraftState.optional()
|
|
@@ -6712,84 +6722,84 @@ var DTODocumentationHierarchyV2 = z235.object({
|
|
|
6712
6722
|
});
|
|
6713
6723
|
|
|
6714
6724
|
// src/api/dto/elements/documentation/page-actions-v2.ts
|
|
6715
|
-
import { z as
|
|
6716
|
-
var SuccessPayload2 =
|
|
6717
|
-
success:
|
|
6725
|
+
import { z as z237 } from "zod";
|
|
6726
|
+
var SuccessPayload2 = z237.object({
|
|
6727
|
+
success: z237.literal(true)
|
|
6718
6728
|
});
|
|
6719
|
-
var DTODocumentationPageCreateActionOutputV2 =
|
|
6720
|
-
type:
|
|
6729
|
+
var DTODocumentationPageCreateActionOutputV2 = z237.object({
|
|
6730
|
+
type: z237.literal("DocumentationPageCreate"),
|
|
6721
6731
|
output: SuccessPayload2
|
|
6722
6732
|
});
|
|
6723
|
-
var DTODocumentationPageUpdateActionOutputV2 =
|
|
6724
|
-
type:
|
|
6733
|
+
var DTODocumentationPageUpdateActionOutputV2 = z237.object({
|
|
6734
|
+
type: z237.literal("DocumentationPageUpdate"),
|
|
6725
6735
|
output: SuccessPayload2
|
|
6726
6736
|
});
|
|
6727
|
-
var DTODocumentationPageMoveActionOutputV2 =
|
|
6728
|
-
type:
|
|
6737
|
+
var DTODocumentationPageMoveActionOutputV2 = z237.object({
|
|
6738
|
+
type: z237.literal("DocumentationPageMove"),
|
|
6729
6739
|
output: SuccessPayload2
|
|
6730
6740
|
});
|
|
6731
|
-
var DTODocumentationPageDuplicateActionOutputV2 =
|
|
6732
|
-
type:
|
|
6741
|
+
var DTODocumentationPageDuplicateActionOutputV2 = z237.object({
|
|
6742
|
+
type: z237.literal("DocumentationPageDuplicate"),
|
|
6733
6743
|
output: SuccessPayload2
|
|
6734
6744
|
});
|
|
6735
|
-
var DTODocumentationPageDeleteActionOutputV2 =
|
|
6736
|
-
type:
|
|
6745
|
+
var DTODocumentationPageDeleteActionOutputV2 = z237.object({
|
|
6746
|
+
type: z237.literal("DocumentationPageDelete"),
|
|
6737
6747
|
output: SuccessPayload2
|
|
6738
6748
|
});
|
|
6739
|
-
var DTODocumentationPageRestoreActionOutput =
|
|
6740
|
-
type:
|
|
6749
|
+
var DTODocumentationPageRestoreActionOutput = z237.object({
|
|
6750
|
+
type: z237.literal("DocumentationPageRestore"),
|
|
6741
6751
|
output: SuccessPayload2
|
|
6742
6752
|
});
|
|
6743
|
-
var DTODocumentationGroupRestoreActionOutput =
|
|
6744
|
-
type:
|
|
6753
|
+
var DTODocumentationGroupRestoreActionOutput = z237.object({
|
|
6754
|
+
type: z237.literal("DocumentationGroupRestore"),
|
|
6745
6755
|
output: SuccessPayload2
|
|
6746
6756
|
});
|
|
6747
|
-
var DTODocumentationPageApprovalStateChangeActionOutput =
|
|
6748
|
-
type:
|
|
6757
|
+
var DTODocumentationPageApprovalStateChangeActionOutput = z237.object({
|
|
6758
|
+
type: z237.literal("DocumentationPageApprovalStateChange"),
|
|
6749
6759
|
output: SuccessPayload2
|
|
6750
6760
|
});
|
|
6751
|
-
var DTODocumentationPageCreateActionInputV2 =
|
|
6752
|
-
type:
|
|
6761
|
+
var DTODocumentationPageCreateActionInputV2 = z237.object({
|
|
6762
|
+
type: z237.literal("DocumentationPageCreate"),
|
|
6753
6763
|
input: DTOCreateDocumentationPageInputV2
|
|
6754
6764
|
});
|
|
6755
|
-
var DTODocumentationPageUpdateActionInputV2 =
|
|
6756
|
-
type:
|
|
6765
|
+
var DTODocumentationPageUpdateActionInputV2 = z237.object({
|
|
6766
|
+
type: z237.literal("DocumentationPageUpdate"),
|
|
6757
6767
|
input: DTOUpdateDocumentationPageInputV2
|
|
6758
6768
|
});
|
|
6759
|
-
var DTODocumentationPageMoveActionInputV2 =
|
|
6760
|
-
type:
|
|
6769
|
+
var DTODocumentationPageMoveActionInputV2 = z237.object({
|
|
6770
|
+
type: z237.literal("DocumentationPageMove"),
|
|
6761
6771
|
input: DTOMoveDocumentationPageInputV2
|
|
6762
6772
|
});
|
|
6763
|
-
var DTODocumentationPageDuplicateActionInputV2 =
|
|
6764
|
-
type:
|
|
6773
|
+
var DTODocumentationPageDuplicateActionInputV2 = z237.object({
|
|
6774
|
+
type: z237.literal("DocumentationPageDuplicate"),
|
|
6765
6775
|
input: DTODuplicateDocumentationPageInputV2
|
|
6766
6776
|
});
|
|
6767
|
-
var DTODocumentationPageDeleteActionInputV2 =
|
|
6768
|
-
type:
|
|
6777
|
+
var DTODocumentationPageDeleteActionInputV2 = z237.object({
|
|
6778
|
+
type: z237.literal("DocumentationPageDelete"),
|
|
6769
6779
|
input: DTODeleteDocumentationPageInputV2
|
|
6770
6780
|
});
|
|
6771
|
-
var DTODocumentationPageRestoreActionInput =
|
|
6772
|
-
type:
|
|
6781
|
+
var DTODocumentationPageRestoreActionInput = z237.object({
|
|
6782
|
+
type: z237.literal("DocumentationPageRestore"),
|
|
6773
6783
|
input: DTORestoreDocumentationPageInput
|
|
6774
6784
|
});
|
|
6775
|
-
var DTODocumentationGroupRestoreActionInput =
|
|
6776
|
-
type:
|
|
6785
|
+
var DTODocumentationGroupRestoreActionInput = z237.object({
|
|
6786
|
+
type: z237.literal("DocumentationGroupRestore"),
|
|
6777
6787
|
input: DTORestoreDocumentationGroupInput
|
|
6778
6788
|
});
|
|
6779
|
-
var DTODocumentationPageApprovalStateChangeActionInput =
|
|
6780
|
-
type:
|
|
6789
|
+
var DTODocumentationPageApprovalStateChangeActionInput = z237.object({
|
|
6790
|
+
type: z237.literal("DocumentationPageApprovalStateChange"),
|
|
6781
6791
|
input: DTODocumentationPageApprovalStateChangeInput
|
|
6782
6792
|
});
|
|
6783
6793
|
|
|
6784
6794
|
// src/api/dto/elements/documentation/page-content.ts
|
|
6785
|
-
import { z as
|
|
6795
|
+
import { z as z238 } from "zod";
|
|
6786
6796
|
var DTODocumentationPageContent = DocumentationPageContent;
|
|
6787
|
-
var DTODocumentationPageContentGetResponse =
|
|
6797
|
+
var DTODocumentationPageContentGetResponse = z238.object({
|
|
6788
6798
|
pageContent: DTODocumentationPageContent
|
|
6789
6799
|
});
|
|
6790
6800
|
|
|
6791
6801
|
// src/api/dto/elements/documentation/page-v1.ts
|
|
6792
|
-
import { z as
|
|
6802
|
+
import { z as z239 } from "zod";
|
|
6793
6803
|
var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
6794
6804
|
data: true,
|
|
6795
6805
|
meta: true,
|
|
@@ -6797,63 +6807,63 @@ var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
|
6797
6807
|
sortOrder: true
|
|
6798
6808
|
}).extend({
|
|
6799
6809
|
configuration: DTODocumentationItemConfigurationV1,
|
|
6800
|
-
blocks:
|
|
6801
|
-
title:
|
|
6802
|
-
path:
|
|
6810
|
+
blocks: z239.array(PageBlockV1),
|
|
6811
|
+
title: z239.string(),
|
|
6812
|
+
path: z239.string()
|
|
6803
6813
|
});
|
|
6804
6814
|
|
|
6805
6815
|
// src/api/dto/elements/documentation/structure.ts
|
|
6806
|
-
import { z as
|
|
6807
|
-
var DTODocumentationStructureItemType =
|
|
6808
|
-
var DTODocumentationStructureItemBase =
|
|
6816
|
+
import { z as z240 } from "zod";
|
|
6817
|
+
var DTODocumentationStructureItemType = z240.enum(["Group", "Page"]);
|
|
6818
|
+
var DTODocumentationStructureItemBase = z240.object({
|
|
6809
6819
|
type: DTODocumentationStructureItemType,
|
|
6810
|
-
id:
|
|
6811
|
-
designSystemVersionId:
|
|
6812
|
-
shortPersistentId:
|
|
6813
|
-
persistentId:
|
|
6814
|
-
title:
|
|
6815
|
-
createdAt:
|
|
6816
|
-
updatedAt:
|
|
6820
|
+
id: z240.string(),
|
|
6821
|
+
designSystemVersionId: z240.string(),
|
|
6822
|
+
shortPersistentId: z240.string(),
|
|
6823
|
+
persistentId: z240.string(),
|
|
6824
|
+
title: z240.string(),
|
|
6825
|
+
createdAt: z240.coerce.date(),
|
|
6826
|
+
updatedAt: z240.coerce.date()
|
|
6817
6827
|
});
|
|
6818
6828
|
var DTODocumentationStructureGroupItem = DTODocumentationStructureItemBase.extend({
|
|
6819
|
-
type:
|
|
6820
|
-
groupBehavior:
|
|
6821
|
-
childrenIds:
|
|
6822
|
-
isRoot:
|
|
6829
|
+
type: z240.literal(DTODocumentationStructureItemType.enum.Group),
|
|
6830
|
+
groupBehavior: z240.string(),
|
|
6831
|
+
childrenIds: z240.string().array(),
|
|
6832
|
+
isRoot: z240.boolean()
|
|
6823
6833
|
});
|
|
6824
6834
|
var DTODocumentationStructurePageItem = DTODocumentationStructureItemBase.extend({
|
|
6825
|
-
type:
|
|
6826
|
-
path:
|
|
6835
|
+
type: z240.literal(DTODocumentationStructureItemType.enum.Page),
|
|
6836
|
+
path: z240.string()
|
|
6827
6837
|
});
|
|
6828
|
-
var DTODocumentationStructureItem =
|
|
6838
|
+
var DTODocumentationStructureItem = z240.discriminatedUnion("type", [
|
|
6829
6839
|
DTODocumentationStructureGroupItem,
|
|
6830
6840
|
DTODocumentationStructurePageItem
|
|
6831
6841
|
]);
|
|
6832
|
-
var DTODocumentationStructure =
|
|
6833
|
-
items:
|
|
6842
|
+
var DTODocumentationStructure = z240.object({
|
|
6843
|
+
items: z240.array(DTODocumentationStructureItem)
|
|
6834
6844
|
});
|
|
6835
6845
|
|
|
6836
6846
|
// src/api/dto/elements/figma-nodes/figma-node.ts
|
|
6837
|
-
import { z as
|
|
6847
|
+
import { z as z241 } from "zod";
|
|
6838
6848
|
var DTOFigmaNodeRenderFormat = FigmaNodeRenderFormat;
|
|
6839
|
-
var DTOFigmaNodeOrigin =
|
|
6840
|
-
sourceId:
|
|
6841
|
-
fileId:
|
|
6842
|
-
parentName:
|
|
6849
|
+
var DTOFigmaNodeOrigin = z241.object({
|
|
6850
|
+
sourceId: z241.string(),
|
|
6851
|
+
fileId: z241.string().optional(),
|
|
6852
|
+
parentName: z241.string().optional()
|
|
6843
6853
|
});
|
|
6844
|
-
var DTOFigmaNodeData =
|
|
6854
|
+
var DTOFigmaNodeData = z241.object({
|
|
6845
6855
|
// Id of the node in the Figma file
|
|
6846
|
-
figmaNodeId:
|
|
6856
|
+
figmaNodeId: z241.string(),
|
|
6847
6857
|
// Validity
|
|
6848
|
-
isValid:
|
|
6858
|
+
isValid: z241.boolean(),
|
|
6849
6859
|
// Asset data
|
|
6850
|
-
assetId:
|
|
6851
|
-
assetUrl:
|
|
6860
|
+
assetId: z241.string(),
|
|
6861
|
+
assetUrl: z241.string(),
|
|
6852
6862
|
assetFormat: DTOFigmaNodeRenderFormat,
|
|
6853
6863
|
// Asset metadata
|
|
6854
|
-
assetScale:
|
|
6855
|
-
assetWidth:
|
|
6856
|
-
assetHeight:
|
|
6864
|
+
assetScale: z241.number(),
|
|
6865
|
+
assetWidth: z241.number().optional(),
|
|
6866
|
+
assetHeight: z241.number().optional()
|
|
6857
6867
|
});
|
|
6858
6868
|
var DTOFigmaNode = FigmaNodeReference.omit({
|
|
6859
6869
|
data: true,
|
|
@@ -6862,127 +6872,127 @@ var DTOFigmaNode = FigmaNodeReference.omit({
|
|
|
6862
6872
|
data: DTOFigmaNodeData,
|
|
6863
6873
|
origin: DTOFigmaNodeOrigin
|
|
6864
6874
|
});
|
|
6865
|
-
var DTOFigmaNodeRenderInputBase =
|
|
6875
|
+
var DTOFigmaNodeRenderInputBase = z241.object({
|
|
6866
6876
|
/**
|
|
6867
6877
|
* Format in which the node must be rendered, png by default.
|
|
6868
6878
|
*/
|
|
6869
6879
|
format: FigmaNodeRenderFormat.default("Png")
|
|
6870
6880
|
});
|
|
6871
6881
|
var DTOFigmaNodeRenderIdInput = DTOFigmaNodeRenderInputBase.extend({
|
|
6872
|
-
inputType:
|
|
6882
|
+
inputType: z241.literal("NodeId").optional().transform((v) => v ?? "NodeId"),
|
|
6873
6883
|
/**
|
|
6874
6884
|
* Id of a design system's data source representing a linked Figma file
|
|
6875
6885
|
*/
|
|
6876
|
-
sourceId:
|
|
6886
|
+
sourceId: z241.string(),
|
|
6877
6887
|
/**
|
|
6878
6888
|
* Id of a node within the Figma file
|
|
6879
6889
|
*/
|
|
6880
|
-
figmaFileNodeId:
|
|
6890
|
+
figmaFileNodeId: z241.string()
|
|
6881
6891
|
});
|
|
6882
6892
|
var DTOFigmaNodeRenderUrlInput = DTOFigmaNodeRenderInputBase.extend({
|
|
6883
|
-
inputType:
|
|
6893
|
+
inputType: z241.literal("URL"),
|
|
6884
6894
|
/**
|
|
6885
6895
|
* Id of a design system's data source representing a linked Figma file
|
|
6886
6896
|
*/
|
|
6887
|
-
figmaNodeUrl:
|
|
6897
|
+
figmaNodeUrl: z241.string()
|
|
6888
6898
|
});
|
|
6889
|
-
var DTOFigmaNodeRenderInput =
|
|
6899
|
+
var DTOFigmaNodeRenderInput = z241.discriminatedUnion("inputType", [
|
|
6890
6900
|
DTOFigmaNodeRenderIdInput,
|
|
6891
6901
|
DTOFigmaNodeRenderUrlInput
|
|
6892
6902
|
]);
|
|
6893
6903
|
|
|
6894
6904
|
// src/api/dto/elements/figma-nodes/node-actions-v2.ts
|
|
6895
|
-
import { z as
|
|
6896
|
-
var DTOFigmaNodeRenderActionOutput =
|
|
6897
|
-
type:
|
|
6898
|
-
figmaNodes:
|
|
6905
|
+
import { z as z242 } from "zod";
|
|
6906
|
+
var DTOFigmaNodeRenderActionOutput = z242.object({
|
|
6907
|
+
type: z242.literal("FigmaNodeRender"),
|
|
6908
|
+
figmaNodes: z242.array(DTOFigmaNode)
|
|
6899
6909
|
});
|
|
6900
|
-
var DTOFigmaNodeRenderActionInput =
|
|
6901
|
-
type:
|
|
6910
|
+
var DTOFigmaNodeRenderActionInput = z242.object({
|
|
6911
|
+
type: z242.literal("FigmaNodeRender"),
|
|
6902
6912
|
input: DTOFigmaNodeRenderInput.array()
|
|
6903
6913
|
});
|
|
6904
6914
|
|
|
6905
6915
|
// src/api/dto/elements/frame-node-structures/frame-node-structure.ts
|
|
6906
|
-
import { z as
|
|
6907
|
-
var DTOFrameNodeStructure =
|
|
6908
|
-
id:
|
|
6909
|
-
persistentId:
|
|
6910
|
-
designSystemVersionId:
|
|
6916
|
+
import { z as z243 } from "zod";
|
|
6917
|
+
var DTOFrameNodeStructure = z243.object({
|
|
6918
|
+
id: z243.string(),
|
|
6919
|
+
persistentId: z243.string(),
|
|
6920
|
+
designSystemVersionId: z243.string(),
|
|
6911
6921
|
origin: FigmaFileStructureOrigin,
|
|
6912
6922
|
assetsInFile: FigmaFileStructureStatistics
|
|
6913
6923
|
});
|
|
6914
|
-
var DTOFrameNodeStructureListResponse =
|
|
6924
|
+
var DTOFrameNodeStructureListResponse = z243.object({
|
|
6915
6925
|
structures: DTOFrameNodeStructure.array()
|
|
6916
6926
|
});
|
|
6917
6927
|
|
|
6918
6928
|
// src/api/dto/elements/properties/property-definitions.ts
|
|
6919
|
-
import { z as
|
|
6929
|
+
import { z as z244 } from "zod";
|
|
6920
6930
|
var CODE_NAME_REGEX2 = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
6921
|
-
var DTOElementPropertyDefinitionOption =
|
|
6922
|
-
id:
|
|
6923
|
-
name:
|
|
6931
|
+
var DTOElementPropertyDefinitionOption = z244.object({
|
|
6932
|
+
id: z244.string(),
|
|
6933
|
+
name: z244.string(),
|
|
6924
6934
|
backgroundColor: DTOColorTokenInlineData.optional()
|
|
6925
6935
|
});
|
|
6926
|
-
var DTOElementPropertyDefinition =
|
|
6927
|
-
id:
|
|
6928
|
-
designSystemVersionId:
|
|
6936
|
+
var DTOElementPropertyDefinition = z244.object({
|
|
6937
|
+
id: z244.string(),
|
|
6938
|
+
designSystemVersionId: z244.string(),
|
|
6929
6939
|
meta: DTOObjectMeta,
|
|
6930
|
-
persistentId:
|
|
6940
|
+
persistentId: z244.string(),
|
|
6931
6941
|
type: ElementPropertyTypeSchema,
|
|
6932
6942
|
targetElementType: ElementPropertyTargetType,
|
|
6933
|
-
codeName:
|
|
6934
|
-
options: nullishToOptional(
|
|
6943
|
+
codeName: z244.string().regex(CODE_NAME_REGEX2),
|
|
6944
|
+
options: nullishToOptional(z244.array(DTOElementPropertyDefinitionOption)),
|
|
6935
6945
|
linkElementType: nullishToOptional(ElementPropertyLinkType),
|
|
6936
|
-
isImmutable:
|
|
6946
|
+
isImmutable: z244.boolean(),
|
|
6937
6947
|
immutablePropertyType: ElementPropertyImmutableType.optional()
|
|
6938
6948
|
});
|
|
6939
|
-
var DTOElementPropertyDefinitionListResponse =
|
|
6940
|
-
definitions:
|
|
6949
|
+
var DTOElementPropertyDefinitionListResponse = z244.object({
|
|
6950
|
+
definitions: z244.array(DTOElementPropertyDefinition)
|
|
6941
6951
|
});
|
|
6942
|
-
var DTOElementPropertyDefinitionResponse =
|
|
6952
|
+
var DTOElementPropertyDefinitionResponse = z244.object({
|
|
6943
6953
|
definition: DTOElementPropertyDefinition
|
|
6944
6954
|
});
|
|
6945
|
-
var DTOElementPropertyDefinitionCreatePayload =
|
|
6955
|
+
var DTOElementPropertyDefinitionCreatePayload = z244.object({
|
|
6946
6956
|
meta: DTOObjectMeta,
|
|
6947
|
-
persistentId:
|
|
6957
|
+
persistentId: z244.string(),
|
|
6948
6958
|
type: ElementPropertyTypeSchema,
|
|
6949
6959
|
targetElementType: ElementPropertyTargetType,
|
|
6950
|
-
codeName:
|
|
6951
|
-
options: nullishToOptional(
|
|
6960
|
+
codeName: z244.string().regex(CODE_NAME_REGEX2),
|
|
6961
|
+
options: nullishToOptional(z244.array(DTOElementPropertyDefinitionOption)),
|
|
6952
6962
|
linkElementType: nullishToOptional(ElementPropertyLinkType),
|
|
6953
|
-
columnWidth:
|
|
6963
|
+
columnWidth: z244.number().max(1024).optional()
|
|
6954
6964
|
});
|
|
6955
|
-
var DTOElementPropertyDefinitionUpdatePayload =
|
|
6965
|
+
var DTOElementPropertyDefinitionUpdatePayload = z244.object({
|
|
6956
6966
|
meta: DTOObjectMeta.optional(),
|
|
6957
|
-
codeName:
|
|
6958
|
-
options:
|
|
6967
|
+
codeName: z244.string().regex(CODE_NAME_REGEX2).optional(),
|
|
6968
|
+
options: z244.array(DTOElementPropertyDefinitionOption).optional()
|
|
6959
6969
|
});
|
|
6960
6970
|
|
|
6961
6971
|
// src/api/dto/elements/properties/property-values.ts
|
|
6962
|
-
import { z as
|
|
6963
|
-
var DTOElementPropertyValue =
|
|
6964
|
-
id:
|
|
6965
|
-
designSystemVersionId:
|
|
6966
|
-
definitionId:
|
|
6967
|
-
targetElementId:
|
|
6968
|
-
value:
|
|
6969
|
-
valuePreview:
|
|
6970
|
-
});
|
|
6971
|
-
var DTOElementPropertyValueListResponse =
|
|
6972
|
-
values:
|
|
6973
|
-
});
|
|
6974
|
-
var DTOElementPropertyValueResponse =
|
|
6972
|
+
import { z as z245 } from "zod";
|
|
6973
|
+
var DTOElementPropertyValue = z245.object({
|
|
6974
|
+
id: z245.string(),
|
|
6975
|
+
designSystemVersionId: z245.string(),
|
|
6976
|
+
definitionId: z245.string(),
|
|
6977
|
+
targetElementId: z245.string(),
|
|
6978
|
+
value: z245.union([z245.string(), z245.number(), z245.boolean()]).optional(),
|
|
6979
|
+
valuePreview: z245.string().optional()
|
|
6980
|
+
});
|
|
6981
|
+
var DTOElementPropertyValueListResponse = z245.object({
|
|
6982
|
+
values: z245.array(DTOElementPropertyValue)
|
|
6983
|
+
});
|
|
6984
|
+
var DTOElementPropertyValueResponse = z245.object({
|
|
6975
6985
|
value: DTOElementPropertyValue
|
|
6976
6986
|
});
|
|
6977
|
-
var DTOElementPropertyValueUpsertPaylod =
|
|
6978
|
-
definitionId:
|
|
6979
|
-
targetElementId:
|
|
6980
|
-
value:
|
|
6987
|
+
var DTOElementPropertyValueUpsertPaylod = z245.object({
|
|
6988
|
+
definitionId: z245.string(),
|
|
6989
|
+
targetElementId: z245.string(),
|
|
6990
|
+
value: z245.string().or(z245.number()).or(z245.boolean())
|
|
6981
6991
|
});
|
|
6982
6992
|
|
|
6983
6993
|
// src/api/dto/elements/elements-action-v2.ts
|
|
6984
|
-
import { z as
|
|
6985
|
-
var DTOElementActionOutput =
|
|
6994
|
+
import { z as z246 } from "zod";
|
|
6995
|
+
var DTOElementActionOutput = z246.discriminatedUnion("type", [
|
|
6986
6996
|
// Documentation pages
|
|
6987
6997
|
DTODocumentationPageCreateActionOutputV2,
|
|
6988
6998
|
DTODocumentationPageUpdateActionOutputV2,
|
|
@@ -7005,7 +7015,7 @@ var DTOElementActionOutput = z245.discriminatedUnion("type", [
|
|
|
7005
7015
|
// Approvals
|
|
7006
7016
|
DTODocumentationPageApprovalStateChangeActionOutput
|
|
7007
7017
|
]);
|
|
7008
|
-
var DTOElementActionInput =
|
|
7018
|
+
var DTOElementActionInput = z246.discriminatedUnion("type", [
|
|
7009
7019
|
// Documentation pages
|
|
7010
7020
|
DTODocumentationPageCreateActionInputV2,
|
|
7011
7021
|
DTODocumentationPageUpdateActionInputV2,
|
|
@@ -7030,80 +7040,80 @@ var DTOElementActionInput = z245.discriminatedUnion("type", [
|
|
|
7030
7040
|
]);
|
|
7031
7041
|
|
|
7032
7042
|
// src/api/dto/elements/get-elements-v2.ts
|
|
7033
|
-
import { z as
|
|
7034
|
-
var DTOElementsGetTypeFilter =
|
|
7035
|
-
var DTOElementsGetQuerySchema =
|
|
7036
|
-
types:
|
|
7043
|
+
import { z as z247 } from "zod";
|
|
7044
|
+
var DTOElementsGetTypeFilter = z247.enum(["FigmaNode"]);
|
|
7045
|
+
var DTOElementsGetQuerySchema = z247.object({
|
|
7046
|
+
types: z247.string().transform((val) => val.split(",").map((v) => DTOElementsGetTypeFilter.parse(v)))
|
|
7037
7047
|
});
|
|
7038
|
-
var DTOElementsGetOutput =
|
|
7039
|
-
figmaNodes:
|
|
7048
|
+
var DTOElementsGetOutput = z247.object({
|
|
7049
|
+
figmaNodes: z247.array(DTOFigmaNode).optional()
|
|
7040
7050
|
});
|
|
7041
7051
|
|
|
7042
7052
|
// src/api/dto/figma-components/assets/download.ts
|
|
7043
|
-
import { z as
|
|
7044
|
-
var DTOAssetRenderConfiguration =
|
|
7045
|
-
prefix:
|
|
7046
|
-
suffix:
|
|
7047
|
-
scale:
|
|
7048
|
-
format:
|
|
7049
|
-
});
|
|
7050
|
-
var DTORenderedAssetFile =
|
|
7051
|
-
assetId:
|
|
7052
|
-
fileName:
|
|
7053
|
-
sourceUrl:
|
|
7053
|
+
import { z as z248 } from "zod";
|
|
7054
|
+
var DTOAssetRenderConfiguration = z248.object({
|
|
7055
|
+
prefix: z248.string().optional(),
|
|
7056
|
+
suffix: z248.string().optional(),
|
|
7057
|
+
scale: z248.enum(["x1", "x2", "x3", "x4"]),
|
|
7058
|
+
format: z248.enum(["png", "pdf", "svg"])
|
|
7059
|
+
});
|
|
7060
|
+
var DTORenderedAssetFile = z248.object({
|
|
7061
|
+
assetId: z248.string(),
|
|
7062
|
+
fileName: z248.string(),
|
|
7063
|
+
sourceUrl: z248.string(),
|
|
7054
7064
|
settings: DTOAssetRenderConfiguration,
|
|
7055
|
-
originalName:
|
|
7065
|
+
originalName: z248.string()
|
|
7056
7066
|
});
|
|
7057
|
-
var DTODownloadAssetsRequest =
|
|
7058
|
-
persistentIds:
|
|
7067
|
+
var DTODownloadAssetsRequest = z248.object({
|
|
7068
|
+
persistentIds: z248.array(z248.string().uuid()).optional(),
|
|
7059
7069
|
settings: DTOAssetRenderConfiguration.array()
|
|
7060
7070
|
});
|
|
7061
|
-
var DTODownloadAssetsResponse =
|
|
7071
|
+
var DTODownloadAssetsResponse = z248.object({
|
|
7062
7072
|
items: DTORenderedAssetFile.array()
|
|
7063
7073
|
});
|
|
7064
7074
|
|
|
7065
7075
|
// src/api/dto/liveblocks/auth-response.ts
|
|
7066
|
-
import { z as
|
|
7067
|
-
var DTOLiveblocksAuthResponse =
|
|
7068
|
-
token:
|
|
7076
|
+
import { z as z249 } from "zod";
|
|
7077
|
+
var DTOLiveblocksAuthResponse = z249.object({
|
|
7078
|
+
token: z249.string()
|
|
7069
7079
|
});
|
|
7070
7080
|
|
|
7071
7081
|
// src/api/dto/themes/override.ts
|
|
7072
|
-
import { z as
|
|
7082
|
+
import { z as z250 } from "zod";
|
|
7073
7083
|
var DTOThemeOverride = DesignTokenTypedData.and(
|
|
7074
|
-
|
|
7075
|
-
tokenPersistentId:
|
|
7084
|
+
z250.object({
|
|
7085
|
+
tokenPersistentId: z250.string(),
|
|
7076
7086
|
origin: ThemeOverrideOrigin.optional()
|
|
7077
7087
|
})
|
|
7078
7088
|
);
|
|
7079
7089
|
var DTOThemeOverrideCreatePayload = DesignTokenTypedData.and(
|
|
7080
|
-
|
|
7081
|
-
tokenPersistentId:
|
|
7090
|
+
z250.object({
|
|
7091
|
+
tokenPersistentId: z250.string()
|
|
7082
7092
|
})
|
|
7083
7093
|
);
|
|
7084
7094
|
|
|
7085
7095
|
// src/api/dto/themes/theme.ts
|
|
7086
|
-
import { z as
|
|
7087
|
-
var DTOTheme =
|
|
7088
|
-
id:
|
|
7089
|
-
persistentId:
|
|
7090
|
-
designSystemVersionId:
|
|
7091
|
-
brandId:
|
|
7096
|
+
import { z as z251 } from "zod";
|
|
7097
|
+
var DTOTheme = z251.object({
|
|
7098
|
+
id: z251.string(),
|
|
7099
|
+
persistentId: z251.string(),
|
|
7100
|
+
designSystemVersionId: z251.string(),
|
|
7101
|
+
brandId: z251.string(),
|
|
7092
7102
|
meta: ObjectMeta,
|
|
7093
|
-
codeName:
|
|
7103
|
+
codeName: z251.string(),
|
|
7094
7104
|
overrides: DTOThemeOverride.array()
|
|
7095
7105
|
});
|
|
7096
|
-
var DTOThemeResponse =
|
|
7106
|
+
var DTOThemeResponse = z251.object({
|
|
7097
7107
|
theme: DTOTheme
|
|
7098
7108
|
});
|
|
7099
|
-
var DTOThemeListResponse =
|
|
7109
|
+
var DTOThemeListResponse = z251.object({
|
|
7100
7110
|
themes: DTOTheme.array()
|
|
7101
7111
|
});
|
|
7102
|
-
var DTOThemeCreatePayload =
|
|
7112
|
+
var DTOThemeCreatePayload = z251.object({
|
|
7103
7113
|
meta: ObjectMeta,
|
|
7104
|
-
persistentId:
|
|
7105
|
-
brandId:
|
|
7106
|
-
codeName:
|
|
7114
|
+
persistentId: z251.string(),
|
|
7115
|
+
brandId: z251.string(),
|
|
7116
|
+
codeName: z251.string(),
|
|
7107
7117
|
overrides: DTOThemeOverride.array()
|
|
7108
7118
|
});
|
|
7109
7119
|
|
|
@@ -7270,7 +7280,7 @@ var CodegenEndpoint = class {
|
|
|
7270
7280
|
};
|
|
7271
7281
|
|
|
7272
7282
|
// src/api/endpoints/design-system/versions/brands.ts
|
|
7273
|
-
import { z as
|
|
7283
|
+
import { z as z252 } from "zod";
|
|
7274
7284
|
var BrandsEndpoint = class {
|
|
7275
7285
|
constructor(requestExecutor) {
|
|
7276
7286
|
this.requestExecutor = requestExecutor;
|
|
@@ -7304,7 +7314,7 @@ var BrandsEndpoint = class {
|
|
|
7304
7314
|
});
|
|
7305
7315
|
}
|
|
7306
7316
|
delete(dsId, vId, brandId) {
|
|
7307
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${vId}/brands/${brandId}`,
|
|
7317
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${vId}/brands/${brandId}`, z252.any(), {
|
|
7308
7318
|
method: "DELETE"
|
|
7309
7319
|
});
|
|
7310
7320
|
}
|
|
@@ -7315,8 +7325,8 @@ var DocumentationEndpoint = class {
|
|
|
7315
7325
|
constructor(requestExecutor) {
|
|
7316
7326
|
this.requestExecutor = requestExecutor;
|
|
7317
7327
|
}
|
|
7318
|
-
getStructure(designSystemId, versionId) {
|
|
7319
|
-
return this.requestExecutor.json(
|
|
7328
|
+
async getStructure(designSystemId, versionId) {
|
|
7329
|
+
return await this.requestExecutor.json(
|
|
7320
7330
|
`/design-systems/${designSystemId}/versions/${versionId}/documentation/structure`,
|
|
7321
7331
|
DTODocumentationStructure
|
|
7322
7332
|
);
|
|
@@ -7324,10 +7334,13 @@ var DocumentationEndpoint = class {
|
|
|
7324
7334
|
async getDocStructure(dsId, vId) {
|
|
7325
7335
|
return await this.requestExecutor.json(
|
|
7326
7336
|
`/design-systems/${dsId}/versions/${vId}/documentation/structure`,
|
|
7327
|
-
DTODocumentationStructure
|
|
7328
|
-
|
|
7329
|
-
|
|
7330
|
-
|
|
7337
|
+
DTODocumentationStructure
|
|
7338
|
+
);
|
|
7339
|
+
}
|
|
7340
|
+
async getPageRoom(dsId, vId, pageId) {
|
|
7341
|
+
return await this.requestExecutor.json(
|
|
7342
|
+
`/design-systems/${dsId}/versions/${vId}/documentation/pages/${pageId}/room`,
|
|
7343
|
+
DTODocumentationPageRoomResponse
|
|
7331
7344
|
);
|
|
7332
7345
|
}
|
|
7333
7346
|
};
|
|
@@ -7458,7 +7471,7 @@ var ImportJobsEndpoint = class {
|
|
|
7458
7471
|
};
|
|
7459
7472
|
|
|
7460
7473
|
// src/api/endpoints/design-system/versions/overrides.ts
|
|
7461
|
-
import { z as
|
|
7474
|
+
import { z as z253 } from "zod";
|
|
7462
7475
|
var OverridesEndpoint = class {
|
|
7463
7476
|
constructor(requestExecutor) {
|
|
7464
7477
|
this.requestExecutor = requestExecutor;
|
|
@@ -7466,7 +7479,7 @@ var OverridesEndpoint = class {
|
|
|
7466
7479
|
create(dsId, versionId, themeId, body) {
|
|
7467
7480
|
return this.requestExecutor.json(
|
|
7468
7481
|
`/design-systems/${dsId}/versions/${versionId}/themes/${themeId}/overrides`,
|
|
7469
|
-
|
|
7482
|
+
z253.any(),
|
|
7470
7483
|
{
|
|
7471
7484
|
method: "POST",
|
|
7472
7485
|
body
|
|
@@ -7476,7 +7489,7 @@ var OverridesEndpoint = class {
|
|
|
7476
7489
|
};
|
|
7477
7490
|
|
|
7478
7491
|
// src/api/endpoints/design-system/versions/property-definitions.ts
|
|
7479
|
-
import { z as
|
|
7492
|
+
import { z as z254 } from "zod";
|
|
7480
7493
|
var ElementPropertyDefinitionsEndpoint = class {
|
|
7481
7494
|
constructor(requestExecutor) {
|
|
7482
7495
|
this.requestExecutor = requestExecutor;
|
|
@@ -7504,7 +7517,7 @@ var ElementPropertyDefinitionsEndpoint = class {
|
|
|
7504
7517
|
delete(designSystemId, versionId, defId) {
|
|
7505
7518
|
return this.requestExecutor.json(
|
|
7506
7519
|
`/design-systems/${designSystemId}/versions/${versionId}/element-properties/definitions/${defId}`,
|
|
7507
|
-
|
|
7520
|
+
z254.any(),
|
|
7508
7521
|
{ method: "DELETE" }
|
|
7509
7522
|
);
|
|
7510
7523
|
}
|
|
@@ -7543,7 +7556,7 @@ var VersionStatsEndpoint = class {
|
|
|
7543
7556
|
};
|
|
7544
7557
|
|
|
7545
7558
|
// src/api/endpoints/design-system/versions/themes.ts
|
|
7546
|
-
import { z as
|
|
7559
|
+
import { z as z255 } from "zod";
|
|
7547
7560
|
var ThemesEndpoint = class {
|
|
7548
7561
|
constructor(requestExecutor) {
|
|
7549
7562
|
this.requestExecutor = requestExecutor;
|
|
@@ -7566,7 +7579,7 @@ var ThemesEndpoint = class {
|
|
|
7566
7579
|
});
|
|
7567
7580
|
}
|
|
7568
7581
|
delete(dsId, versionId, themeId) {
|
|
7569
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${versionId}/themes/${themeId}`,
|
|
7582
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${versionId}/themes/${themeId}`, z255.any(), {
|
|
7570
7583
|
method: "DELETE"
|
|
7571
7584
|
});
|
|
7572
7585
|
}
|
|
@@ -7713,7 +7726,7 @@ var DesignSystemContactsEndpoint = class {
|
|
|
7713
7726
|
};
|
|
7714
7727
|
|
|
7715
7728
|
// src/api/endpoints/design-system/design-systems.ts
|
|
7716
|
-
import { z as
|
|
7729
|
+
import { z as z257 } from "zod";
|
|
7717
7730
|
|
|
7718
7731
|
// src/api/endpoints/design-system/members.ts
|
|
7719
7732
|
var DesignSystemMembersEndpoint = class {
|
|
@@ -7734,7 +7747,7 @@ var DesignSystemMembersEndpoint = class {
|
|
|
7734
7747
|
};
|
|
7735
7748
|
|
|
7736
7749
|
// src/api/endpoints/design-system/sources.ts
|
|
7737
|
-
import { z as
|
|
7750
|
+
import { z as z256 } from "zod";
|
|
7738
7751
|
var DesignSystemSourcesEndpoint = class {
|
|
7739
7752
|
constructor(requestExecutor) {
|
|
7740
7753
|
this.requestExecutor = requestExecutor;
|
|
@@ -7749,7 +7762,7 @@ var DesignSystemSourcesEndpoint = class {
|
|
|
7749
7762
|
return this.requestExecutor.json(`/design-systems/${dsId}/sources`, DTODataSourcesListResponse);
|
|
7750
7763
|
}
|
|
7751
7764
|
delete(dsId, sourceId) {
|
|
7752
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/sources/${sourceId}`,
|
|
7765
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/sources/${sourceId}`, z256.any(), { method: "DELETE" });
|
|
7753
7766
|
}
|
|
7754
7767
|
figmaImport(dsId, payload) {
|
|
7755
7768
|
return this.requestExecutor.json(`/design-systems/${dsId}/versions/head/cloud-import`, DTOImportJobResponse, {
|
|
@@ -7784,7 +7797,7 @@ var DesignSystemsEndpoint = class {
|
|
|
7784
7797
|
return this.requestExecutor.json(`/design-systems/${dsId}`, DTODesignSystemResponse);
|
|
7785
7798
|
}
|
|
7786
7799
|
delete(dsId) {
|
|
7787
|
-
return this.requestExecutor.json(`/design-systems/${dsId}`,
|
|
7800
|
+
return this.requestExecutor.json(`/design-systems/${dsId}`, z257.any(), { method: "DELETE" });
|
|
7788
7801
|
}
|
|
7789
7802
|
update(dsId, body) {
|
|
7790
7803
|
return this.requestExecutor.json(`/design-systems/${dsId}`, DTODesignSystemResponse, {
|
|
@@ -7828,7 +7841,7 @@ var WorkspaceInvitationsEndpoint = class {
|
|
|
7828
7841
|
};
|
|
7829
7842
|
|
|
7830
7843
|
// src/api/endpoints/workspaces/workspace-members.ts
|
|
7831
|
-
import { z as
|
|
7844
|
+
import { z as z258 } from "zod";
|
|
7832
7845
|
var WorkspaceMembersEndpoint = class {
|
|
7833
7846
|
constructor(requestExecutor) {
|
|
7834
7847
|
this.requestExecutor = requestExecutor;
|
|
@@ -7845,7 +7858,7 @@ var WorkspaceMembersEndpoint = class {
|
|
|
7845
7858
|
});
|
|
7846
7859
|
}
|
|
7847
7860
|
invite(workspaceId, body) {
|
|
7848
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}/members`,
|
|
7861
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/members`, z258.any(), { method: "POST", body });
|
|
7849
7862
|
}
|
|
7850
7863
|
delete(workspaceId, userId) {
|
|
7851
7864
|
return this.requestExecutor.json(`/workspaces/${workspaceId}/members/${userId}`, DTOWorkspaceResponse, {
|
|
@@ -7855,7 +7868,7 @@ var WorkspaceMembersEndpoint = class {
|
|
|
7855
7868
|
};
|
|
7856
7869
|
|
|
7857
7870
|
// src/api/endpoints/workspaces/workspaces.ts
|
|
7858
|
-
import { z as
|
|
7871
|
+
import { z as z259 } from "zod";
|
|
7859
7872
|
var WorkspacesEndpoint = class {
|
|
7860
7873
|
constructor(requestExecutor) {
|
|
7861
7874
|
this.requestExecutor = requestExecutor;
|
|
@@ -7878,10 +7891,10 @@ var WorkspacesEndpoint = class {
|
|
|
7878
7891
|
return this.requestExecutor.json(`/workspaces/${workspaceId}`, DTOWorkspaceResponse, { method: "GET" });
|
|
7879
7892
|
}
|
|
7880
7893
|
delete(workspaceId) {
|
|
7881
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}`,
|
|
7894
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}`, z259.any(), { method: "DELETE" });
|
|
7882
7895
|
}
|
|
7883
7896
|
subscription(workspaceId) {
|
|
7884
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}/subscription`,
|
|
7897
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/subscription`, z259.any(), { method: "GET" });
|
|
7885
7898
|
}
|
|
7886
7899
|
transferOwnership(workspaceId, body) {
|
|
7887
7900
|
return this.requestExecutor.json(`/workspaces/${workspaceId}/ownership`, DTOWorkspaceResponse, {
|
|
@@ -7968,9 +7981,9 @@ ${bodyText}`,
|
|
|
7968
7981
|
|
|
7969
7982
|
// src/api/transport/request-executor.ts
|
|
7970
7983
|
import fetch from "node-fetch";
|
|
7971
|
-
import { z as
|
|
7972
|
-
var ResponseWrapper =
|
|
7973
|
-
result:
|
|
7984
|
+
import { z as z260 } from "zod";
|
|
7985
|
+
var ResponseWrapper = z260.object({
|
|
7986
|
+
result: z260.record(z260.any())
|
|
7974
7987
|
});
|
|
7975
7988
|
var RequestExecutor = class {
|
|
7976
7989
|
constructor(testServerConfig) {
|
|
@@ -8026,6 +8039,19 @@ var RequestExecutor = class {
|
|
|
8026
8039
|
}
|
|
8027
8040
|
};
|
|
8028
8041
|
|
|
8042
|
+
// src/api/endpoints/liveblocks.ts
|
|
8043
|
+
var LiveblocksEndpoint = class {
|
|
8044
|
+
constructor(requestExecutor) {
|
|
8045
|
+
this.requestExecutor = requestExecutor;
|
|
8046
|
+
}
|
|
8047
|
+
auth(body) {
|
|
8048
|
+
return this.requestExecutor.json("/liveblocks/auth", DTOLiveblocksAuthResponse, {
|
|
8049
|
+
method: "POST",
|
|
8050
|
+
body
|
|
8051
|
+
});
|
|
8052
|
+
}
|
|
8053
|
+
};
|
|
8054
|
+
|
|
8029
8055
|
// src/api/client.ts
|
|
8030
8056
|
var SupernovaApiClient = class {
|
|
8031
8057
|
constructor(config) {
|
|
@@ -8033,6 +8059,7 @@ var SupernovaApiClient = class {
|
|
|
8033
8059
|
__publicField(this, "workspaces");
|
|
8034
8060
|
__publicField(this, "designSystems");
|
|
8035
8061
|
__publicField(this, "codegen");
|
|
8062
|
+
__publicField(this, "liveblocks");
|
|
8036
8063
|
const requestExecutor = new RequestExecutor({
|
|
8037
8064
|
host: config.host,
|
|
8038
8065
|
accessToken: config.accessToken
|
|
@@ -8041,11 +8068,12 @@ var SupernovaApiClient = class {
|
|
|
8041
8068
|
this.workspaces = new WorkspacesEndpoint(requestExecutor);
|
|
8042
8069
|
this.designSystems = new DesignSystemsEndpoint(requestExecutor);
|
|
8043
8070
|
this.codegen = new CodegenEndpoint(requestExecutor);
|
|
8071
|
+
this.liveblocks = new LiveblocksEndpoint(requestExecutor);
|
|
8044
8072
|
}
|
|
8045
8073
|
};
|
|
8046
8074
|
|
|
8047
8075
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
8048
|
-
import { z as
|
|
8076
|
+
import { z as z261 } from "zod";
|
|
8049
8077
|
|
|
8050
8078
|
// src/yjs/version-room/base.ts
|
|
8051
8079
|
var VersionRoomBaseYDoc = class {
|
|
@@ -8575,24 +8603,24 @@ var FrontendVersionRoomYDoc = class {
|
|
|
8575
8603
|
};
|
|
8576
8604
|
|
|
8577
8605
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
8578
|
-
var DocumentationHierarchySettings =
|
|
8579
|
-
routingVersion:
|
|
8580
|
-
isDraftFeatureAdopted:
|
|
8581
|
-
isApprovalFeatureEnabled:
|
|
8582
|
-
approvalRequiredForPublishing:
|
|
8606
|
+
var DocumentationHierarchySettings = z261.object({
|
|
8607
|
+
routingVersion: z261.string(),
|
|
8608
|
+
isDraftFeatureAdopted: z261.boolean(),
|
|
8609
|
+
isApprovalFeatureEnabled: z261.boolean(),
|
|
8610
|
+
approvalRequiredForPublishing: z261.boolean()
|
|
8583
8611
|
});
|
|
8584
8612
|
function yjsToDocumentationHierarchy(doc) {
|
|
8585
8613
|
return new FrontendVersionRoomYDoc(doc).getDocumentationHierarchy();
|
|
8586
8614
|
}
|
|
8587
8615
|
|
|
8588
8616
|
// src/yjs/design-system-content/item-configuration.ts
|
|
8589
|
-
import { z as
|
|
8590
|
-
var DTODocumentationPageRoomHeaderData =
|
|
8591
|
-
title:
|
|
8617
|
+
import { z as z262 } from "zod";
|
|
8618
|
+
var DTODocumentationPageRoomHeaderData = z262.object({
|
|
8619
|
+
title: z262.string(),
|
|
8592
8620
|
configuration: DTODocumentationItemConfigurationV2
|
|
8593
8621
|
});
|
|
8594
|
-
var DTODocumentationPageRoomHeaderDataUpdate =
|
|
8595
|
-
title:
|
|
8622
|
+
var DTODocumentationPageRoomHeaderDataUpdate = z262.object({
|
|
8623
|
+
title: z262.string().optional(),
|
|
8596
8624
|
configuration: DTODocumentationItemConfigurationV2.omit({ header: true }).extend({ header: DocumentationItemHeaderV2.partial() }).optional()
|
|
8597
8625
|
});
|
|
8598
8626
|
function itemConfigurationToYjs(yDoc, item) {
|
|
@@ -8643,7 +8671,7 @@ function yjsToItemConfiguration(yDoc) {
|
|
|
8643
8671
|
header: rawHeader
|
|
8644
8672
|
};
|
|
8645
8673
|
return {
|
|
8646
|
-
title:
|
|
8674
|
+
title: z262.string().parse(title),
|
|
8647
8675
|
configuration: DTODocumentationItemConfigurationV2.parse(rawConfig)
|
|
8648
8676
|
};
|
|
8649
8677
|
}
|
|
@@ -8653,9 +8681,9 @@ var PageBlockEditorModel = PageBlockEditorModelV2;
|
|
|
8653
8681
|
var PageSectionEditorModel = PageSectionEditorModelV2;
|
|
8654
8682
|
|
|
8655
8683
|
// src/yjs/docs-editor/model/page.ts
|
|
8656
|
-
import { z as
|
|
8657
|
-
var DocumentationPageEditorModel =
|
|
8658
|
-
blocks:
|
|
8684
|
+
import { z as z263 } from "zod";
|
|
8685
|
+
var DocumentationPageEditorModel = z263.object({
|
|
8686
|
+
blocks: z263.array(DocumentationPageContentItem)
|
|
8659
8687
|
});
|
|
8660
8688
|
|
|
8661
8689
|
// src/yjs/docs-editor/prosemirror/inner-editor-schema.ts
|
|
@@ -12176,7 +12204,7 @@ var blocks = [
|
|
|
12176
12204
|
|
|
12177
12205
|
// src/yjs/docs-editor/prosemirror-to-blocks.ts
|
|
12178
12206
|
import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
|
|
12179
|
-
import { z as
|
|
12207
|
+
import { z as z264 } from "zod";
|
|
12180
12208
|
function yDocToPage(yDoc, definitions) {
|
|
12181
12209
|
return yXmlFragmentToPage(yDoc.getXmlFragment("default"), definitions);
|
|
12182
12210
|
}
|
|
@@ -12256,7 +12284,7 @@ function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
|
|
|
12256
12284
|
return null;
|
|
12257
12285
|
return {
|
|
12258
12286
|
id,
|
|
12259
|
-
title: getProsemirrorAttribute(prosemirrorNode, "title",
|
|
12287
|
+
title: getProsemirrorAttribute(prosemirrorNode, "title", z264.string()) ?? "",
|
|
12260
12288
|
columns: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(nonNullFilter)
|
|
12261
12289
|
};
|
|
12262
12290
|
}
|
|
@@ -12291,7 +12319,7 @@ function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap, dept
|
|
|
12291
12319
|
});
|
|
12292
12320
|
}
|
|
12293
12321
|
function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap, depth) {
|
|
12294
|
-
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId",
|
|
12322
|
+
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z264.string());
|
|
12295
12323
|
if (!definitionId) {
|
|
12296
12324
|
console.warn(`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`);
|
|
12297
12325
|
return [];
|
|
@@ -12333,7 +12361,7 @@ function parseAsRichText(prosemirrorNode, definition, property) {
|
|
|
12333
12361
|
if (!id)
|
|
12334
12362
|
return null;
|
|
12335
12363
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
12336
|
-
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type",
|
|
12364
|
+
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z264.string().optional()));
|
|
12337
12365
|
return {
|
|
12338
12366
|
id,
|
|
12339
12367
|
type: "Block",
|
|
@@ -12461,10 +12489,10 @@ function parseRichTextAttribute(mark) {
|
|
|
12461
12489
|
return null;
|
|
12462
12490
|
}
|
|
12463
12491
|
function parseProsemirrorLink(mark) {
|
|
12464
|
-
const href = getProsemirrorAttribute(mark, "href",
|
|
12492
|
+
const href = getProsemirrorAttribute(mark, "href", z264.string().optional());
|
|
12465
12493
|
if (!href)
|
|
12466
12494
|
return null;
|
|
12467
|
-
const target = getProsemirrorAttribute(mark, "target",
|
|
12495
|
+
const target = getProsemirrorAttribute(mark, "target", z264.string().optional());
|
|
12468
12496
|
const openInNewTab = target === "_blank";
|
|
12469
12497
|
if (href.startsWith("@")) {
|
|
12470
12498
|
return {
|
|
@@ -12483,10 +12511,10 @@ function parseProsemirrorLink(mark) {
|
|
|
12483
12511
|
}
|
|
12484
12512
|
}
|
|
12485
12513
|
function parseProsemirrorCommentHighlight(mark) {
|
|
12486
|
-
const highlightId = getProsemirrorAttribute(mark, "highlightId",
|
|
12514
|
+
const highlightId = getProsemirrorAttribute(mark, "highlightId", z264.string().optional());
|
|
12487
12515
|
if (!highlightId)
|
|
12488
12516
|
return null;
|
|
12489
|
-
const isResolved = getProsemirrorAttribute(mark, "resolved",
|
|
12517
|
+
const isResolved = getProsemirrorAttribute(mark, "resolved", z264.boolean().optional()) ?? false;
|
|
12490
12518
|
return {
|
|
12491
12519
|
type: "Comment",
|
|
12492
12520
|
commentHighlightId: highlightId,
|
|
@@ -12498,7 +12526,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
12498
12526
|
if (!id)
|
|
12499
12527
|
return null;
|
|
12500
12528
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
12501
|
-
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder",
|
|
12529
|
+
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z264.boolean().optional()) !== false;
|
|
12502
12530
|
const tableChild = prosemirrorNode.content?.find((c) => c.type === "table");
|
|
12503
12531
|
if (!tableChild) {
|
|
12504
12532
|
return emptyTable(id, variantId, 0);
|
|
@@ -12545,9 +12573,9 @@ function parseAsTableCell(prosemirrorNode) {
|
|
|
12545
12573
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
12546
12574
|
if (!id)
|
|
12547
12575
|
return null;
|
|
12548
|
-
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign",
|
|
12576
|
+
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z264.string().optional());
|
|
12549
12577
|
let columnWidth;
|
|
12550
|
-
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth",
|
|
12578
|
+
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z264.array(z264.number()).nullish());
|
|
12551
12579
|
if (columnWidthArray) {
|
|
12552
12580
|
columnWidth = roundDimension(columnWidthArray[0]);
|
|
12553
12581
|
}
|
|
@@ -12585,7 +12613,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
12585
12613
|
value: parseRichText(prosemirrorNode.content ?? [])
|
|
12586
12614
|
};
|
|
12587
12615
|
case "image":
|
|
12588
|
-
const items = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
12616
|
+
const items = getProsemirrorAttribute(prosemirrorNode, "items", z264.string());
|
|
12589
12617
|
if (!items)
|
|
12590
12618
|
return null;
|
|
12591
12619
|
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
@@ -12705,7 +12733,7 @@ function definitionExpectsPlaceholderItem(definition) {
|
|
|
12705
12733
|
);
|
|
12706
12734
|
}
|
|
12707
12735
|
function parseBlockItems(prosemirrorNode, definition) {
|
|
12708
|
-
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
12736
|
+
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z264.string());
|
|
12709
12737
|
if (!itemsString)
|
|
12710
12738
|
return null;
|
|
12711
12739
|
const itemsJson = JSON.parse(itemsString);
|
|
@@ -12717,18 +12745,18 @@ function parseBlockItems(prosemirrorNode, definition) {
|
|
|
12717
12745
|
}
|
|
12718
12746
|
function parseAppearance(prosemirrorNode) {
|
|
12719
12747
|
let appearance = {};
|
|
12720
|
-
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance",
|
|
12748
|
+
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance", z264.string().optional());
|
|
12721
12749
|
if (rawAppearanceString) {
|
|
12722
12750
|
const parsedAppearance = PageBlockAppearanceV2.safeParse(JSON.parse(rawAppearanceString));
|
|
12723
12751
|
if (parsedAppearance.success) {
|
|
12724
12752
|
appearance = parsedAppearance.data;
|
|
12725
12753
|
}
|
|
12726
12754
|
}
|
|
12727
|
-
const columns = getProsemirrorAttribute(prosemirrorNode, "columns",
|
|
12755
|
+
const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z264.number().optional());
|
|
12728
12756
|
if (columns) {
|
|
12729
12757
|
appearance.numberOfColumns = columns;
|
|
12730
12758
|
}
|
|
12731
|
-
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor",
|
|
12759
|
+
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z264.string().optional());
|
|
12732
12760
|
if (backgroundColor) {
|
|
12733
12761
|
const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
|
|
12734
12762
|
if (parsedColor.success) {
|
|
@@ -12823,13 +12851,13 @@ function valueSchemaForPropertyType(type) {
|
|
|
12823
12851
|
}
|
|
12824
12852
|
}
|
|
12825
12853
|
function getProsemirrorBlockId(prosemirrorNode) {
|
|
12826
|
-
const id = getProsemirrorAttribute(prosemirrorNode, "id",
|
|
12854
|
+
const id = getProsemirrorAttribute(prosemirrorNode, "id", z264.string());
|
|
12827
12855
|
if (!id)
|
|
12828
12856
|
console.warn(`Prosemirror attribute "id" on ${prosemirrorNode.type} is required`);
|
|
12829
12857
|
return id;
|
|
12830
12858
|
}
|
|
12831
12859
|
function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
12832
|
-
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(
|
|
12860
|
+
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z264.string()));
|
|
12833
12861
|
}
|
|
12834
12862
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
12835
12863
|
const parsedAttr = validationSchema.safeParse(prosemirrorNode.attrs?.[attributeName]);
|
|
@@ -13005,8 +13033,10 @@ export {
|
|
|
13005
13033
|
DTODocumentationPageMoveActionOutputV2,
|
|
13006
13034
|
DTODocumentationPageRestoreActionInput,
|
|
13007
13035
|
DTODocumentationPageRestoreActionOutput,
|
|
13036
|
+
DTODocumentationPageRoom,
|
|
13008
13037
|
DTODocumentationPageRoomHeaderData,
|
|
13009
13038
|
DTODocumentationPageRoomHeaderDataUpdate,
|
|
13039
|
+
DTODocumentationPageRoomResponse,
|
|
13010
13040
|
DTODocumentationPageSnapshot,
|
|
13011
13041
|
DTODocumentationPageUpdateActionInputV2,
|
|
13012
13042
|
DTODocumentationPageUpdateActionOutputV2,
|