@supernova-studio/client 0.58.17 → 0.58.19
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 +49 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +384 -345
- 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
|
@@ -2712,6 +2712,7 @@ var ShadowLayerValue = z70.object({
|
|
|
2712
2712
|
type: ShadowType
|
|
2713
2713
|
});
|
|
2714
2714
|
var ShadowTokenDataBase = tokenAliasOrValue(ShadowLayerValue);
|
|
2715
|
+
var ShadowValue = z70.array(ShadowTokenDataBase);
|
|
2715
2716
|
var ShadowTokenData = tokenAliasOrValue(z70.array(ShadowTokenDataBase));
|
|
2716
2717
|
var SizeUnit = z71.enum(["Pixels", "Rem", "Percent"]);
|
|
2717
2718
|
var SizeValue = z71.object({
|
|
@@ -3229,10 +3230,15 @@ var FigmaImportBaseContext = z90.object({
|
|
|
3229
3230
|
*/
|
|
3230
3231
|
importWarnings: z90.record(ImportWarning.array()).default({})
|
|
3231
3232
|
});
|
|
3233
|
+
var FeatureFlagsKeepAliases = z90.object({
|
|
3234
|
+
isTypographyPropsKeepAliasesEnabled: z90.boolean().default(false),
|
|
3235
|
+
isGradientPropsKeepAliasesEnabled: z90.boolean().default(false),
|
|
3236
|
+
isShadowPropsKeepAliasesEnabled: z90.boolean().default(false)
|
|
3237
|
+
});
|
|
3232
3238
|
var FigmaImportContextWithSourcesState = FigmaImportBaseContext.extend({
|
|
3233
3239
|
sourcesWithMissingAccess: z90.array(z90.string()).default([]),
|
|
3234
3240
|
shadowOpacityOptional: z90.boolean().default(false),
|
|
3235
|
-
|
|
3241
|
+
featureFlagsKeepAliases: FeatureFlagsKeepAliases.default({})
|
|
3236
3242
|
});
|
|
3237
3243
|
var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
|
|
3238
3244
|
importMetadata: DataSourceFigmaImportMetadata
|
|
@@ -4283,7 +4289,8 @@ var RestoredDocumentationGroup = z149.object({
|
|
|
4283
4289
|
parent: ElementGroup
|
|
4284
4290
|
});
|
|
4285
4291
|
var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
4286
|
-
RoomTypeEnum2["
|
|
4292
|
+
RoomTypeEnum2["DocumentationPageOld"] = "documentation-page";
|
|
4293
|
+
RoomTypeEnum2["DocumentationPage"] = "doc-page";
|
|
4287
4294
|
RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
|
|
4288
4295
|
RoomTypeEnum2["Workspace"] = "workspace";
|
|
4289
4296
|
return RoomTypeEnum2;
|
|
@@ -4607,7 +4614,9 @@ var FlaggedFeature = z169.enum([
|
|
|
4607
4614
|
"ShadowOpacityOptional",
|
|
4608
4615
|
"DisableImporter",
|
|
4609
4616
|
"VariablesOrder",
|
|
4610
|
-
"TypographyPropsKeepAliases"
|
|
4617
|
+
"TypographyPropsKeepAliases",
|
|
4618
|
+
"GradientPropsKeepAliases",
|
|
4619
|
+
"ShadowPropsKeepAliases"
|
|
4611
4620
|
]);
|
|
4612
4621
|
var FeatureFlagMap = z169.record(FlaggedFeature, z169.boolean());
|
|
4613
4622
|
var FeatureFlag = z169.object({
|
|
@@ -6467,53 +6476,62 @@ var DTOPublishDocumentationResponse = z228.object({
|
|
|
6467
6476
|
job: DTOExportJob
|
|
6468
6477
|
});
|
|
6469
6478
|
|
|
6479
|
+
// src/api/dto/documentation/room.ts
|
|
6480
|
+
import { z as z229 } from "zod";
|
|
6481
|
+
var DTODocumentationPageRoom = z229.object({
|
|
6482
|
+
id: z229.string()
|
|
6483
|
+
});
|
|
6484
|
+
var DTODocumentationPageRoomResponse = z229.object({
|
|
6485
|
+
room: DTODocumentationPageRoom
|
|
6486
|
+
});
|
|
6487
|
+
|
|
6470
6488
|
// src/api/dto/elements/components/figma-component-group.ts
|
|
6471
|
-
import
|
|
6472
|
-
var DTOFigmaComponentGroup =
|
|
6473
|
-
id:
|
|
6474
|
-
designSystemVersionId:
|
|
6475
|
-
persistentId:
|
|
6476
|
-
isRoot:
|
|
6477
|
-
brandId:
|
|
6489
|
+
import z230 from "zod";
|
|
6490
|
+
var DTOFigmaComponentGroup = z230.object({
|
|
6491
|
+
id: z230.string(),
|
|
6492
|
+
designSystemVersionId: z230.string(),
|
|
6493
|
+
persistentId: z230.string(),
|
|
6494
|
+
isRoot: z230.boolean(),
|
|
6495
|
+
brandId: z230.string(),
|
|
6478
6496
|
meta: DTOObjectMeta,
|
|
6479
|
-
childrenIds:
|
|
6497
|
+
childrenIds: z230.string().array()
|
|
6480
6498
|
});
|
|
6481
|
-
var DTOFigmaComponentGroupListResponse =
|
|
6499
|
+
var DTOFigmaComponentGroupListResponse = z230.object({
|
|
6482
6500
|
groups: DTOFigmaComponentGroup.array()
|
|
6483
6501
|
});
|
|
6484
6502
|
|
|
6485
6503
|
// src/api/dto/elements/components/figma-component.ts
|
|
6486
|
-
import { z as
|
|
6504
|
+
import { z as z231 } from "zod";
|
|
6487
6505
|
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:
|
|
6506
|
+
var DTOFigmaComponentPropertyMap = z231.record(DTOFigmaComponentProperty);
|
|
6507
|
+
var DTOFigmaComponent = z231.object({
|
|
6508
|
+
id: z231.string(),
|
|
6509
|
+
persistentId: z231.string(),
|
|
6510
|
+
designSystemVersionId: z231.string(),
|
|
6511
|
+
brandId: z231.string(),
|
|
6512
|
+
thumbnailUrl: z231.string().optional(),
|
|
6513
|
+
svgUrl: z231.string().optional(),
|
|
6514
|
+
exportProperties: z231.object({
|
|
6515
|
+
isAsset: z231.boolean()
|
|
6498
6516
|
}),
|
|
6499
|
-
createdAt:
|
|
6500
|
-
updatedAt:
|
|
6517
|
+
createdAt: z231.coerce.date(),
|
|
6518
|
+
updatedAt: z231.coerce.date(),
|
|
6501
6519
|
meta: ObjectMeta,
|
|
6502
6520
|
originComponent: FigmaComponentOrigin.optional(),
|
|
6503
|
-
parentComponentPersistentId:
|
|
6504
|
-
childrenPersistentIds:
|
|
6521
|
+
parentComponentPersistentId: z231.string().optional(),
|
|
6522
|
+
childrenPersistentIds: z231.string().array().optional(),
|
|
6505
6523
|
componentPropertyDefinitions: DTOFigmaComponentPropertyMap.optional(),
|
|
6506
|
-
variantPropertyValues:
|
|
6524
|
+
variantPropertyValues: z231.record(z231.string()).optional()
|
|
6507
6525
|
});
|
|
6508
|
-
var DTOFigmaComponentListResponse =
|
|
6526
|
+
var DTOFigmaComponentListResponse = z231.object({
|
|
6509
6527
|
components: DTOFigmaComponent.array()
|
|
6510
6528
|
});
|
|
6511
6529
|
|
|
6512
6530
|
// src/api/dto/elements/documentation/group-action.ts
|
|
6513
|
-
import { z as
|
|
6531
|
+
import { z as z233 } from "zod";
|
|
6514
6532
|
|
|
6515
6533
|
// src/api/dto/elements/documentation/group-v2.ts
|
|
6516
|
-
import { z as
|
|
6534
|
+
import { z as z232 } from "zod";
|
|
6517
6535
|
var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
6518
6536
|
sortOrder: true,
|
|
6519
6537
|
parentPersistentId: true,
|
|
@@ -6523,13 +6541,13 @@ var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
|
6523
6541
|
data: true,
|
|
6524
6542
|
shortPersistentId: true
|
|
6525
6543
|
}).extend({
|
|
6526
|
-
title:
|
|
6527
|
-
isRoot:
|
|
6528
|
-
childrenIds:
|
|
6544
|
+
title: z232.string(),
|
|
6545
|
+
isRoot: z232.boolean(),
|
|
6546
|
+
childrenIds: z232.array(z232.string()),
|
|
6529
6547
|
groupBehavior: DocumentationGroupBehavior,
|
|
6530
|
-
shortPersistentId:
|
|
6548
|
+
shortPersistentId: z232.string(),
|
|
6531
6549
|
configuration: DTODocumentationItemConfigurationV2,
|
|
6532
|
-
type:
|
|
6550
|
+
type: z232.literal("Group"),
|
|
6533
6551
|
/** Defined when a group has changed since last publish and can be included into a partial publish */
|
|
6534
6552
|
draftState: DTODocumentationDraftState.optional(),
|
|
6535
6553
|
/** Defined if a group was published at least once and contains metadata about last publish */
|
|
@@ -6537,127 +6555,127 @@ var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
|
6537
6555
|
//** An approval state for frontend to utilize. */
|
|
6538
6556
|
approvalState: DTODocumentationGroupApprovalState.optional()
|
|
6539
6557
|
});
|
|
6540
|
-
var DTOCreateDocumentationGroupInput =
|
|
6558
|
+
var DTOCreateDocumentationGroupInput = z232.object({
|
|
6541
6559
|
// Identifier
|
|
6542
|
-
persistentId:
|
|
6560
|
+
persistentId: z232.string(),
|
|
6543
6561
|
// Group properties
|
|
6544
|
-
title:
|
|
6562
|
+
title: z232.string(),
|
|
6545
6563
|
configuration: DTODocumentationItemConfigurationV2.partial().optional(),
|
|
6546
6564
|
// Group placement properties
|
|
6547
|
-
afterPersistentId:
|
|
6548
|
-
parentPersistentId:
|
|
6565
|
+
afterPersistentId: z232.string().nullish(),
|
|
6566
|
+
parentPersistentId: z232.string()
|
|
6549
6567
|
});
|
|
6550
|
-
var DTOUpdateDocumentationGroupInput =
|
|
6568
|
+
var DTOUpdateDocumentationGroupInput = z232.object({
|
|
6551
6569
|
// Identifier of the group to update
|
|
6552
|
-
id:
|
|
6570
|
+
id: z232.string(),
|
|
6553
6571
|
// Group properties
|
|
6554
|
-
title:
|
|
6572
|
+
title: z232.string().optional(),
|
|
6555
6573
|
configuration: DTODocumentationItemConfigurationV2.partial().optional()
|
|
6556
6574
|
});
|
|
6557
|
-
var DTOMoveDocumentationGroupInput =
|
|
6575
|
+
var DTOMoveDocumentationGroupInput = z232.object({
|
|
6558
6576
|
// Identifier of the group to update
|
|
6559
|
-
id:
|
|
6577
|
+
id: z232.string(),
|
|
6560
6578
|
// Group placement properties
|
|
6561
|
-
parentPersistentId:
|
|
6562
|
-
afterPersistentId:
|
|
6579
|
+
parentPersistentId: z232.string(),
|
|
6580
|
+
afterPersistentId: z232.string().nullish()
|
|
6563
6581
|
});
|
|
6564
|
-
var DTODuplicateDocumentationGroupInput =
|
|
6582
|
+
var DTODuplicateDocumentationGroupInput = z232.object({
|
|
6565
6583
|
// Identifier of the group to duplicate from
|
|
6566
|
-
id:
|
|
6584
|
+
id: z232.string(),
|
|
6567
6585
|
// New group persistent id
|
|
6568
|
-
persistentId:
|
|
6586
|
+
persistentId: z232.string(),
|
|
6569
6587
|
// Group placement properties
|
|
6570
|
-
afterPersistentId:
|
|
6571
|
-
parentPersistentId:
|
|
6588
|
+
afterPersistentId: z232.string().nullish(),
|
|
6589
|
+
parentPersistentId: z232.string()
|
|
6572
6590
|
});
|
|
6573
|
-
var DTOCreateDocumentationTabInput =
|
|
6591
|
+
var DTOCreateDocumentationTabInput = z232.object({
|
|
6574
6592
|
// New group persistent id
|
|
6575
|
-
persistentId:
|
|
6593
|
+
persistentId: z232.string(),
|
|
6576
6594
|
// If this is page, we will attempt to convert it to tab
|
|
6577
6595
|
// If this is tab group, we will add a new tab to it
|
|
6578
|
-
fromItemPersistentId:
|
|
6579
|
-
tabName:
|
|
6596
|
+
fromItemPersistentId: z232.string(),
|
|
6597
|
+
tabName: z232.string()
|
|
6580
6598
|
});
|
|
6581
|
-
var DTODeleteDocumentationTabGroupInput =
|
|
6599
|
+
var DTODeleteDocumentationTabGroupInput = z232.object({
|
|
6582
6600
|
// Deleted group id
|
|
6583
|
-
id:
|
|
6601
|
+
id: z232.string()
|
|
6584
6602
|
});
|
|
6585
|
-
var DTODeleteDocumentationGroupInput =
|
|
6603
|
+
var DTODeleteDocumentationGroupInput = z232.object({
|
|
6586
6604
|
// Identifier
|
|
6587
|
-
id:
|
|
6605
|
+
id: z232.string(),
|
|
6588
6606
|
// Deletion options
|
|
6589
|
-
deleteSubtree:
|
|
6607
|
+
deleteSubtree: z232.boolean().default(false)
|
|
6590
6608
|
});
|
|
6591
6609
|
|
|
6592
6610
|
// src/api/dto/elements/documentation/group-action.ts
|
|
6593
|
-
var SuccessPayload =
|
|
6594
|
-
success:
|
|
6611
|
+
var SuccessPayload = z233.object({
|
|
6612
|
+
success: z233.literal(true)
|
|
6595
6613
|
});
|
|
6596
|
-
var DTODocumentationGroupCreateActionOutputV2 =
|
|
6597
|
-
type:
|
|
6614
|
+
var DTODocumentationGroupCreateActionOutputV2 = z233.object({
|
|
6615
|
+
type: z233.literal("DocumentationGroupCreate"),
|
|
6598
6616
|
output: SuccessPayload
|
|
6599
6617
|
});
|
|
6600
|
-
var DTODocumentationTabCreateActionOutputV2 =
|
|
6601
|
-
type:
|
|
6618
|
+
var DTODocumentationTabCreateActionOutputV2 = z233.object({
|
|
6619
|
+
type: z233.literal("DocumentationTabCreate"),
|
|
6602
6620
|
output: SuccessPayload
|
|
6603
6621
|
});
|
|
6604
|
-
var DTODocumentationGroupUpdateActionOutputV2 =
|
|
6605
|
-
type:
|
|
6622
|
+
var DTODocumentationGroupUpdateActionOutputV2 = z233.object({
|
|
6623
|
+
type: z233.literal("DocumentationGroupUpdate"),
|
|
6606
6624
|
output: SuccessPayload
|
|
6607
6625
|
});
|
|
6608
|
-
var DTODocumentationGroupMoveActionOutputV2 =
|
|
6609
|
-
type:
|
|
6626
|
+
var DTODocumentationGroupMoveActionOutputV2 = z233.object({
|
|
6627
|
+
type: z233.literal("DocumentationGroupMove"),
|
|
6610
6628
|
output: SuccessPayload
|
|
6611
6629
|
});
|
|
6612
|
-
var DTODocumentationGroupDuplicateActionOutputV2 =
|
|
6613
|
-
type:
|
|
6630
|
+
var DTODocumentationGroupDuplicateActionOutputV2 = z233.object({
|
|
6631
|
+
type: z233.literal("DocumentationGroupDuplicate"),
|
|
6614
6632
|
output: SuccessPayload
|
|
6615
6633
|
});
|
|
6616
|
-
var DTODocumentationGroupDeleteActionOutputV2 =
|
|
6617
|
-
type:
|
|
6634
|
+
var DTODocumentationGroupDeleteActionOutputV2 = z233.object({
|
|
6635
|
+
type: z233.literal("DocumentationGroupDelete"),
|
|
6618
6636
|
output: SuccessPayload
|
|
6619
6637
|
});
|
|
6620
|
-
var DTODocumentationTabGroupDeleteActionOutputV2 =
|
|
6621
|
-
type:
|
|
6638
|
+
var DTODocumentationTabGroupDeleteActionOutputV2 = z233.object({
|
|
6639
|
+
type: z233.literal("DocumentationTabGroupDelete"),
|
|
6622
6640
|
output: SuccessPayload
|
|
6623
6641
|
});
|
|
6624
|
-
var DTODocumentationGroupCreateActionInputV2 =
|
|
6625
|
-
type:
|
|
6642
|
+
var DTODocumentationGroupCreateActionInputV2 = z233.object({
|
|
6643
|
+
type: z233.literal("DocumentationGroupCreate"),
|
|
6626
6644
|
input: DTOCreateDocumentationGroupInput
|
|
6627
6645
|
});
|
|
6628
|
-
var DTODocumentationTabCreateActionInputV2 =
|
|
6629
|
-
type:
|
|
6646
|
+
var DTODocumentationTabCreateActionInputV2 = z233.object({
|
|
6647
|
+
type: z233.literal("DocumentationTabCreate"),
|
|
6630
6648
|
input: DTOCreateDocumentationTabInput
|
|
6631
6649
|
});
|
|
6632
|
-
var DTODocumentationGroupUpdateActionInputV2 =
|
|
6633
|
-
type:
|
|
6650
|
+
var DTODocumentationGroupUpdateActionInputV2 = z233.object({
|
|
6651
|
+
type: z233.literal("DocumentationGroupUpdate"),
|
|
6634
6652
|
input: DTOUpdateDocumentationGroupInput
|
|
6635
6653
|
});
|
|
6636
|
-
var DTODocumentationGroupMoveActionInputV2 =
|
|
6637
|
-
type:
|
|
6654
|
+
var DTODocumentationGroupMoveActionInputV2 = z233.object({
|
|
6655
|
+
type: z233.literal("DocumentationGroupMove"),
|
|
6638
6656
|
input: DTOMoveDocumentationGroupInput
|
|
6639
6657
|
});
|
|
6640
|
-
var DTODocumentationGroupDuplicateActionInputV2 =
|
|
6641
|
-
type:
|
|
6658
|
+
var DTODocumentationGroupDuplicateActionInputV2 = z233.object({
|
|
6659
|
+
type: z233.literal("DocumentationGroupDuplicate"),
|
|
6642
6660
|
input: DTODuplicateDocumentationGroupInput
|
|
6643
6661
|
});
|
|
6644
|
-
var DTODocumentationGroupDeleteActionInputV2 =
|
|
6645
|
-
type:
|
|
6662
|
+
var DTODocumentationGroupDeleteActionInputV2 = z233.object({
|
|
6663
|
+
type: z233.literal("DocumentationGroupDelete"),
|
|
6646
6664
|
input: DTODeleteDocumentationGroupInput
|
|
6647
6665
|
});
|
|
6648
|
-
var DTODocumentationTabGroupDeleteActionInputV2 =
|
|
6649
|
-
type:
|
|
6666
|
+
var DTODocumentationTabGroupDeleteActionInputV2 = z233.object({
|
|
6667
|
+
type: z233.literal("DocumentationTabGroupDelete"),
|
|
6650
6668
|
input: DTODeleteDocumentationTabGroupInput
|
|
6651
6669
|
});
|
|
6652
6670
|
|
|
6653
6671
|
// src/api/dto/elements/documentation/group-v1.ts
|
|
6654
|
-
import { z as
|
|
6672
|
+
import { z as z235 } from "zod";
|
|
6655
6673
|
|
|
6656
6674
|
// src/api/dto/elements/documentation/item-configuration-v1.ts
|
|
6657
|
-
import { z as
|
|
6658
|
-
var DocumentationColorV1 =
|
|
6659
|
-
aliasTo:
|
|
6660
|
-
value:
|
|
6675
|
+
import { z as z234 } from "zod";
|
|
6676
|
+
var DocumentationColorV1 = z234.object({
|
|
6677
|
+
aliasTo: z234.string().optional(),
|
|
6678
|
+
value: z234.string().optional()
|
|
6661
6679
|
});
|
|
6662
6680
|
var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
6663
6681
|
foregroundColor: true,
|
|
@@ -6666,10 +6684,10 @@ var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
|
6666
6684
|
foregroundColor: DocumentationColorV1.optional(),
|
|
6667
6685
|
backgroundColor: DocumentationColorV1.optional()
|
|
6668
6686
|
});
|
|
6669
|
-
var DTODocumentationItemConfigurationV1 =
|
|
6670
|
-
showSidebar:
|
|
6671
|
-
isPrivate:
|
|
6672
|
-
isHidden:
|
|
6687
|
+
var DTODocumentationItemConfigurationV1 = z234.object({
|
|
6688
|
+
showSidebar: z234.boolean(),
|
|
6689
|
+
isPrivate: z234.boolean(),
|
|
6690
|
+
isHidden: z234.boolean(),
|
|
6673
6691
|
header: DTODocumentationItemHeaderV1
|
|
6674
6692
|
});
|
|
6675
6693
|
|
|
@@ -6683,27 +6701,27 @@ var DTODocumentationGroupStructureV1 = ElementGroup.omit({
|
|
|
6683
6701
|
data: true,
|
|
6684
6702
|
shortPersistentId: true
|
|
6685
6703
|
}).extend({
|
|
6686
|
-
title:
|
|
6687
|
-
isRoot:
|
|
6688
|
-
childrenIds:
|
|
6704
|
+
title: z235.string(),
|
|
6705
|
+
isRoot: z235.boolean(),
|
|
6706
|
+
childrenIds: z235.array(z235.string()),
|
|
6689
6707
|
groupBehavior: DocumentationGroupBehavior,
|
|
6690
|
-
shortPersistentId:
|
|
6691
|
-
type:
|
|
6708
|
+
shortPersistentId: z235.string(),
|
|
6709
|
+
type: z235.literal("Group")
|
|
6692
6710
|
});
|
|
6693
6711
|
var DTODocumentationGroupV1 = DTODocumentationGroupStructureV1.extend({
|
|
6694
6712
|
configuration: DTODocumentationItemConfigurationV1
|
|
6695
6713
|
});
|
|
6696
6714
|
|
|
6697
6715
|
// src/api/dto/elements/documentation/hierarchy.ts
|
|
6698
|
-
import { z as
|
|
6699
|
-
var DTODocumentationHierarchyV2 =
|
|
6700
|
-
pages:
|
|
6716
|
+
import { z as z236 } from "zod";
|
|
6717
|
+
var DTODocumentationHierarchyV2 = z236.object({
|
|
6718
|
+
pages: z236.array(
|
|
6701
6719
|
DTODocumentationPageV2.extend({
|
|
6702
6720
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
6703
6721
|
draftState: DTODocumentationDraftState.optional()
|
|
6704
6722
|
})
|
|
6705
6723
|
),
|
|
6706
|
-
groups:
|
|
6724
|
+
groups: z236.array(
|
|
6707
6725
|
DTODocumentationGroupV2.extend({
|
|
6708
6726
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
6709
6727
|
draftState: DTODocumentationDraftState.optional()
|
|
@@ -6712,84 +6730,84 @@ var DTODocumentationHierarchyV2 = z235.object({
|
|
|
6712
6730
|
});
|
|
6713
6731
|
|
|
6714
6732
|
// src/api/dto/elements/documentation/page-actions-v2.ts
|
|
6715
|
-
import { z as
|
|
6716
|
-
var SuccessPayload2 =
|
|
6717
|
-
success:
|
|
6733
|
+
import { z as z237 } from "zod";
|
|
6734
|
+
var SuccessPayload2 = z237.object({
|
|
6735
|
+
success: z237.literal(true)
|
|
6718
6736
|
});
|
|
6719
|
-
var DTODocumentationPageCreateActionOutputV2 =
|
|
6720
|
-
type:
|
|
6737
|
+
var DTODocumentationPageCreateActionOutputV2 = z237.object({
|
|
6738
|
+
type: z237.literal("DocumentationPageCreate"),
|
|
6721
6739
|
output: SuccessPayload2
|
|
6722
6740
|
});
|
|
6723
|
-
var DTODocumentationPageUpdateActionOutputV2 =
|
|
6724
|
-
type:
|
|
6741
|
+
var DTODocumentationPageUpdateActionOutputV2 = z237.object({
|
|
6742
|
+
type: z237.literal("DocumentationPageUpdate"),
|
|
6725
6743
|
output: SuccessPayload2
|
|
6726
6744
|
});
|
|
6727
|
-
var DTODocumentationPageMoveActionOutputV2 =
|
|
6728
|
-
type:
|
|
6745
|
+
var DTODocumentationPageMoveActionOutputV2 = z237.object({
|
|
6746
|
+
type: z237.literal("DocumentationPageMove"),
|
|
6729
6747
|
output: SuccessPayload2
|
|
6730
6748
|
});
|
|
6731
|
-
var DTODocumentationPageDuplicateActionOutputV2 =
|
|
6732
|
-
type:
|
|
6749
|
+
var DTODocumentationPageDuplicateActionOutputV2 = z237.object({
|
|
6750
|
+
type: z237.literal("DocumentationPageDuplicate"),
|
|
6733
6751
|
output: SuccessPayload2
|
|
6734
6752
|
});
|
|
6735
|
-
var DTODocumentationPageDeleteActionOutputV2 =
|
|
6736
|
-
type:
|
|
6753
|
+
var DTODocumentationPageDeleteActionOutputV2 = z237.object({
|
|
6754
|
+
type: z237.literal("DocumentationPageDelete"),
|
|
6737
6755
|
output: SuccessPayload2
|
|
6738
6756
|
});
|
|
6739
|
-
var DTODocumentationPageRestoreActionOutput =
|
|
6740
|
-
type:
|
|
6757
|
+
var DTODocumentationPageRestoreActionOutput = z237.object({
|
|
6758
|
+
type: z237.literal("DocumentationPageRestore"),
|
|
6741
6759
|
output: SuccessPayload2
|
|
6742
6760
|
});
|
|
6743
|
-
var DTODocumentationGroupRestoreActionOutput =
|
|
6744
|
-
type:
|
|
6761
|
+
var DTODocumentationGroupRestoreActionOutput = z237.object({
|
|
6762
|
+
type: z237.literal("DocumentationGroupRestore"),
|
|
6745
6763
|
output: SuccessPayload2
|
|
6746
6764
|
});
|
|
6747
|
-
var DTODocumentationPageApprovalStateChangeActionOutput =
|
|
6748
|
-
type:
|
|
6765
|
+
var DTODocumentationPageApprovalStateChangeActionOutput = z237.object({
|
|
6766
|
+
type: z237.literal("DocumentationPageApprovalStateChange"),
|
|
6749
6767
|
output: SuccessPayload2
|
|
6750
6768
|
});
|
|
6751
|
-
var DTODocumentationPageCreateActionInputV2 =
|
|
6752
|
-
type:
|
|
6769
|
+
var DTODocumentationPageCreateActionInputV2 = z237.object({
|
|
6770
|
+
type: z237.literal("DocumentationPageCreate"),
|
|
6753
6771
|
input: DTOCreateDocumentationPageInputV2
|
|
6754
6772
|
});
|
|
6755
|
-
var DTODocumentationPageUpdateActionInputV2 =
|
|
6756
|
-
type:
|
|
6773
|
+
var DTODocumentationPageUpdateActionInputV2 = z237.object({
|
|
6774
|
+
type: z237.literal("DocumentationPageUpdate"),
|
|
6757
6775
|
input: DTOUpdateDocumentationPageInputV2
|
|
6758
6776
|
});
|
|
6759
|
-
var DTODocumentationPageMoveActionInputV2 =
|
|
6760
|
-
type:
|
|
6777
|
+
var DTODocumentationPageMoveActionInputV2 = z237.object({
|
|
6778
|
+
type: z237.literal("DocumentationPageMove"),
|
|
6761
6779
|
input: DTOMoveDocumentationPageInputV2
|
|
6762
6780
|
});
|
|
6763
|
-
var DTODocumentationPageDuplicateActionInputV2 =
|
|
6764
|
-
type:
|
|
6781
|
+
var DTODocumentationPageDuplicateActionInputV2 = z237.object({
|
|
6782
|
+
type: z237.literal("DocumentationPageDuplicate"),
|
|
6765
6783
|
input: DTODuplicateDocumentationPageInputV2
|
|
6766
6784
|
});
|
|
6767
|
-
var DTODocumentationPageDeleteActionInputV2 =
|
|
6768
|
-
type:
|
|
6785
|
+
var DTODocumentationPageDeleteActionInputV2 = z237.object({
|
|
6786
|
+
type: z237.literal("DocumentationPageDelete"),
|
|
6769
6787
|
input: DTODeleteDocumentationPageInputV2
|
|
6770
6788
|
});
|
|
6771
|
-
var DTODocumentationPageRestoreActionInput =
|
|
6772
|
-
type:
|
|
6789
|
+
var DTODocumentationPageRestoreActionInput = z237.object({
|
|
6790
|
+
type: z237.literal("DocumentationPageRestore"),
|
|
6773
6791
|
input: DTORestoreDocumentationPageInput
|
|
6774
6792
|
});
|
|
6775
|
-
var DTODocumentationGroupRestoreActionInput =
|
|
6776
|
-
type:
|
|
6793
|
+
var DTODocumentationGroupRestoreActionInput = z237.object({
|
|
6794
|
+
type: z237.literal("DocumentationGroupRestore"),
|
|
6777
6795
|
input: DTORestoreDocumentationGroupInput
|
|
6778
6796
|
});
|
|
6779
|
-
var DTODocumentationPageApprovalStateChangeActionInput =
|
|
6780
|
-
type:
|
|
6797
|
+
var DTODocumentationPageApprovalStateChangeActionInput = z237.object({
|
|
6798
|
+
type: z237.literal("DocumentationPageApprovalStateChange"),
|
|
6781
6799
|
input: DTODocumentationPageApprovalStateChangeInput
|
|
6782
6800
|
});
|
|
6783
6801
|
|
|
6784
6802
|
// src/api/dto/elements/documentation/page-content.ts
|
|
6785
|
-
import { z as
|
|
6803
|
+
import { z as z238 } from "zod";
|
|
6786
6804
|
var DTODocumentationPageContent = DocumentationPageContent;
|
|
6787
|
-
var DTODocumentationPageContentGetResponse =
|
|
6805
|
+
var DTODocumentationPageContentGetResponse = z238.object({
|
|
6788
6806
|
pageContent: DTODocumentationPageContent
|
|
6789
6807
|
});
|
|
6790
6808
|
|
|
6791
6809
|
// src/api/dto/elements/documentation/page-v1.ts
|
|
6792
|
-
import { z as
|
|
6810
|
+
import { z as z239 } from "zod";
|
|
6793
6811
|
var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
6794
6812
|
data: true,
|
|
6795
6813
|
meta: true,
|
|
@@ -6797,63 +6815,63 @@ var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
|
6797
6815
|
sortOrder: true
|
|
6798
6816
|
}).extend({
|
|
6799
6817
|
configuration: DTODocumentationItemConfigurationV1,
|
|
6800
|
-
blocks:
|
|
6801
|
-
title:
|
|
6802
|
-
path:
|
|
6818
|
+
blocks: z239.array(PageBlockV1),
|
|
6819
|
+
title: z239.string(),
|
|
6820
|
+
path: z239.string()
|
|
6803
6821
|
});
|
|
6804
6822
|
|
|
6805
6823
|
// src/api/dto/elements/documentation/structure.ts
|
|
6806
|
-
import { z as
|
|
6807
|
-
var DTODocumentationStructureItemType =
|
|
6808
|
-
var DTODocumentationStructureItemBase =
|
|
6824
|
+
import { z as z240 } from "zod";
|
|
6825
|
+
var DTODocumentationStructureItemType = z240.enum(["Group", "Page"]);
|
|
6826
|
+
var DTODocumentationStructureItemBase = z240.object({
|
|
6809
6827
|
type: DTODocumentationStructureItemType,
|
|
6810
|
-
id:
|
|
6811
|
-
designSystemVersionId:
|
|
6812
|
-
shortPersistentId:
|
|
6813
|
-
persistentId:
|
|
6814
|
-
title:
|
|
6815
|
-
createdAt:
|
|
6816
|
-
updatedAt:
|
|
6828
|
+
id: z240.string(),
|
|
6829
|
+
designSystemVersionId: z240.string(),
|
|
6830
|
+
shortPersistentId: z240.string(),
|
|
6831
|
+
persistentId: z240.string(),
|
|
6832
|
+
title: z240.string(),
|
|
6833
|
+
createdAt: z240.coerce.date(),
|
|
6834
|
+
updatedAt: z240.coerce.date()
|
|
6817
6835
|
});
|
|
6818
6836
|
var DTODocumentationStructureGroupItem = DTODocumentationStructureItemBase.extend({
|
|
6819
|
-
type:
|
|
6820
|
-
groupBehavior:
|
|
6821
|
-
childrenIds:
|
|
6822
|
-
isRoot:
|
|
6837
|
+
type: z240.literal(DTODocumentationStructureItemType.enum.Group),
|
|
6838
|
+
groupBehavior: z240.string(),
|
|
6839
|
+
childrenIds: z240.string().array(),
|
|
6840
|
+
isRoot: z240.boolean()
|
|
6823
6841
|
});
|
|
6824
6842
|
var DTODocumentationStructurePageItem = DTODocumentationStructureItemBase.extend({
|
|
6825
|
-
type:
|
|
6826
|
-
path:
|
|
6843
|
+
type: z240.literal(DTODocumentationStructureItemType.enum.Page),
|
|
6844
|
+
path: z240.string()
|
|
6827
6845
|
});
|
|
6828
|
-
var DTODocumentationStructureItem =
|
|
6846
|
+
var DTODocumentationStructureItem = z240.discriminatedUnion("type", [
|
|
6829
6847
|
DTODocumentationStructureGroupItem,
|
|
6830
6848
|
DTODocumentationStructurePageItem
|
|
6831
6849
|
]);
|
|
6832
|
-
var DTODocumentationStructure =
|
|
6833
|
-
items:
|
|
6850
|
+
var DTODocumentationStructure = z240.object({
|
|
6851
|
+
items: z240.array(DTODocumentationStructureItem)
|
|
6834
6852
|
});
|
|
6835
6853
|
|
|
6836
6854
|
// src/api/dto/elements/figma-nodes/figma-node.ts
|
|
6837
|
-
import { z as
|
|
6855
|
+
import { z as z241 } from "zod";
|
|
6838
6856
|
var DTOFigmaNodeRenderFormat = FigmaNodeRenderFormat;
|
|
6839
|
-
var DTOFigmaNodeOrigin =
|
|
6840
|
-
sourceId:
|
|
6841
|
-
fileId:
|
|
6842
|
-
parentName:
|
|
6857
|
+
var DTOFigmaNodeOrigin = z241.object({
|
|
6858
|
+
sourceId: z241.string(),
|
|
6859
|
+
fileId: z241.string().optional(),
|
|
6860
|
+
parentName: z241.string().optional()
|
|
6843
6861
|
});
|
|
6844
|
-
var DTOFigmaNodeData =
|
|
6862
|
+
var DTOFigmaNodeData = z241.object({
|
|
6845
6863
|
// Id of the node in the Figma file
|
|
6846
|
-
figmaNodeId:
|
|
6864
|
+
figmaNodeId: z241.string(),
|
|
6847
6865
|
// Validity
|
|
6848
|
-
isValid:
|
|
6866
|
+
isValid: z241.boolean(),
|
|
6849
6867
|
// Asset data
|
|
6850
|
-
assetId:
|
|
6851
|
-
assetUrl:
|
|
6868
|
+
assetId: z241.string(),
|
|
6869
|
+
assetUrl: z241.string(),
|
|
6852
6870
|
assetFormat: DTOFigmaNodeRenderFormat,
|
|
6853
6871
|
// Asset metadata
|
|
6854
|
-
assetScale:
|
|
6855
|
-
assetWidth:
|
|
6856
|
-
assetHeight:
|
|
6872
|
+
assetScale: z241.number(),
|
|
6873
|
+
assetWidth: z241.number().optional(),
|
|
6874
|
+
assetHeight: z241.number().optional()
|
|
6857
6875
|
});
|
|
6858
6876
|
var DTOFigmaNode = FigmaNodeReference.omit({
|
|
6859
6877
|
data: true,
|
|
@@ -6862,127 +6880,127 @@ var DTOFigmaNode = FigmaNodeReference.omit({
|
|
|
6862
6880
|
data: DTOFigmaNodeData,
|
|
6863
6881
|
origin: DTOFigmaNodeOrigin
|
|
6864
6882
|
});
|
|
6865
|
-
var DTOFigmaNodeRenderInputBase =
|
|
6883
|
+
var DTOFigmaNodeRenderInputBase = z241.object({
|
|
6866
6884
|
/**
|
|
6867
6885
|
* Format in which the node must be rendered, png by default.
|
|
6868
6886
|
*/
|
|
6869
6887
|
format: FigmaNodeRenderFormat.default("Png")
|
|
6870
6888
|
});
|
|
6871
6889
|
var DTOFigmaNodeRenderIdInput = DTOFigmaNodeRenderInputBase.extend({
|
|
6872
|
-
inputType:
|
|
6890
|
+
inputType: z241.literal("NodeId").optional().transform((v) => v ?? "NodeId"),
|
|
6873
6891
|
/**
|
|
6874
6892
|
* Id of a design system's data source representing a linked Figma file
|
|
6875
6893
|
*/
|
|
6876
|
-
sourceId:
|
|
6894
|
+
sourceId: z241.string(),
|
|
6877
6895
|
/**
|
|
6878
6896
|
* Id of a node within the Figma file
|
|
6879
6897
|
*/
|
|
6880
|
-
figmaFileNodeId:
|
|
6898
|
+
figmaFileNodeId: z241.string()
|
|
6881
6899
|
});
|
|
6882
6900
|
var DTOFigmaNodeRenderUrlInput = DTOFigmaNodeRenderInputBase.extend({
|
|
6883
|
-
inputType:
|
|
6901
|
+
inputType: z241.literal("URL"),
|
|
6884
6902
|
/**
|
|
6885
6903
|
* Id of a design system's data source representing a linked Figma file
|
|
6886
6904
|
*/
|
|
6887
|
-
figmaNodeUrl:
|
|
6905
|
+
figmaNodeUrl: z241.string()
|
|
6888
6906
|
});
|
|
6889
|
-
var DTOFigmaNodeRenderInput =
|
|
6907
|
+
var DTOFigmaNodeRenderInput = z241.discriminatedUnion("inputType", [
|
|
6890
6908
|
DTOFigmaNodeRenderIdInput,
|
|
6891
6909
|
DTOFigmaNodeRenderUrlInput
|
|
6892
6910
|
]);
|
|
6893
6911
|
|
|
6894
6912
|
// src/api/dto/elements/figma-nodes/node-actions-v2.ts
|
|
6895
|
-
import { z as
|
|
6896
|
-
var DTOFigmaNodeRenderActionOutput =
|
|
6897
|
-
type:
|
|
6898
|
-
figmaNodes:
|
|
6913
|
+
import { z as z242 } from "zod";
|
|
6914
|
+
var DTOFigmaNodeRenderActionOutput = z242.object({
|
|
6915
|
+
type: z242.literal("FigmaNodeRender"),
|
|
6916
|
+
figmaNodes: z242.array(DTOFigmaNode)
|
|
6899
6917
|
});
|
|
6900
|
-
var DTOFigmaNodeRenderActionInput =
|
|
6901
|
-
type:
|
|
6918
|
+
var DTOFigmaNodeRenderActionInput = z242.object({
|
|
6919
|
+
type: z242.literal("FigmaNodeRender"),
|
|
6902
6920
|
input: DTOFigmaNodeRenderInput.array()
|
|
6903
6921
|
});
|
|
6904
6922
|
|
|
6905
6923
|
// src/api/dto/elements/frame-node-structures/frame-node-structure.ts
|
|
6906
|
-
import { z as
|
|
6907
|
-
var DTOFrameNodeStructure =
|
|
6908
|
-
id:
|
|
6909
|
-
persistentId:
|
|
6910
|
-
designSystemVersionId:
|
|
6924
|
+
import { z as z243 } from "zod";
|
|
6925
|
+
var DTOFrameNodeStructure = z243.object({
|
|
6926
|
+
id: z243.string(),
|
|
6927
|
+
persistentId: z243.string(),
|
|
6928
|
+
designSystemVersionId: z243.string(),
|
|
6911
6929
|
origin: FigmaFileStructureOrigin,
|
|
6912
6930
|
assetsInFile: FigmaFileStructureStatistics
|
|
6913
6931
|
});
|
|
6914
|
-
var DTOFrameNodeStructureListResponse =
|
|
6932
|
+
var DTOFrameNodeStructureListResponse = z243.object({
|
|
6915
6933
|
structures: DTOFrameNodeStructure.array()
|
|
6916
6934
|
});
|
|
6917
6935
|
|
|
6918
6936
|
// src/api/dto/elements/properties/property-definitions.ts
|
|
6919
|
-
import { z as
|
|
6937
|
+
import { z as z244 } from "zod";
|
|
6920
6938
|
var CODE_NAME_REGEX2 = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
6921
|
-
var DTOElementPropertyDefinitionOption =
|
|
6922
|
-
id:
|
|
6923
|
-
name:
|
|
6939
|
+
var DTOElementPropertyDefinitionOption = z244.object({
|
|
6940
|
+
id: z244.string(),
|
|
6941
|
+
name: z244.string(),
|
|
6924
6942
|
backgroundColor: DTOColorTokenInlineData.optional()
|
|
6925
6943
|
});
|
|
6926
|
-
var DTOElementPropertyDefinition =
|
|
6927
|
-
id:
|
|
6928
|
-
designSystemVersionId:
|
|
6944
|
+
var DTOElementPropertyDefinition = z244.object({
|
|
6945
|
+
id: z244.string(),
|
|
6946
|
+
designSystemVersionId: z244.string(),
|
|
6929
6947
|
meta: DTOObjectMeta,
|
|
6930
|
-
persistentId:
|
|
6948
|
+
persistentId: z244.string(),
|
|
6931
6949
|
type: ElementPropertyTypeSchema,
|
|
6932
6950
|
targetElementType: ElementPropertyTargetType,
|
|
6933
|
-
codeName:
|
|
6934
|
-
options: nullishToOptional(
|
|
6951
|
+
codeName: z244.string().regex(CODE_NAME_REGEX2),
|
|
6952
|
+
options: nullishToOptional(z244.array(DTOElementPropertyDefinitionOption)),
|
|
6935
6953
|
linkElementType: nullishToOptional(ElementPropertyLinkType),
|
|
6936
|
-
isImmutable:
|
|
6954
|
+
isImmutable: z244.boolean(),
|
|
6937
6955
|
immutablePropertyType: ElementPropertyImmutableType.optional()
|
|
6938
6956
|
});
|
|
6939
|
-
var DTOElementPropertyDefinitionListResponse =
|
|
6940
|
-
definitions:
|
|
6957
|
+
var DTOElementPropertyDefinitionListResponse = z244.object({
|
|
6958
|
+
definitions: z244.array(DTOElementPropertyDefinition)
|
|
6941
6959
|
});
|
|
6942
|
-
var DTOElementPropertyDefinitionResponse =
|
|
6960
|
+
var DTOElementPropertyDefinitionResponse = z244.object({
|
|
6943
6961
|
definition: DTOElementPropertyDefinition
|
|
6944
6962
|
});
|
|
6945
|
-
var DTOElementPropertyDefinitionCreatePayload =
|
|
6963
|
+
var DTOElementPropertyDefinitionCreatePayload = z244.object({
|
|
6946
6964
|
meta: DTOObjectMeta,
|
|
6947
|
-
persistentId:
|
|
6965
|
+
persistentId: z244.string(),
|
|
6948
6966
|
type: ElementPropertyTypeSchema,
|
|
6949
6967
|
targetElementType: ElementPropertyTargetType,
|
|
6950
|
-
codeName:
|
|
6951
|
-
options: nullishToOptional(
|
|
6968
|
+
codeName: z244.string().regex(CODE_NAME_REGEX2),
|
|
6969
|
+
options: nullishToOptional(z244.array(DTOElementPropertyDefinitionOption)),
|
|
6952
6970
|
linkElementType: nullishToOptional(ElementPropertyLinkType),
|
|
6953
|
-
columnWidth:
|
|
6971
|
+
columnWidth: z244.number().max(1024).optional()
|
|
6954
6972
|
});
|
|
6955
|
-
var DTOElementPropertyDefinitionUpdatePayload =
|
|
6973
|
+
var DTOElementPropertyDefinitionUpdatePayload = z244.object({
|
|
6956
6974
|
meta: DTOObjectMeta.optional(),
|
|
6957
|
-
codeName:
|
|
6958
|
-
options:
|
|
6975
|
+
codeName: z244.string().regex(CODE_NAME_REGEX2).optional(),
|
|
6976
|
+
options: z244.array(DTOElementPropertyDefinitionOption).optional()
|
|
6959
6977
|
});
|
|
6960
6978
|
|
|
6961
6979
|
// 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 =
|
|
6980
|
+
import { z as z245 } from "zod";
|
|
6981
|
+
var DTOElementPropertyValue = z245.object({
|
|
6982
|
+
id: z245.string(),
|
|
6983
|
+
designSystemVersionId: z245.string(),
|
|
6984
|
+
definitionId: z245.string(),
|
|
6985
|
+
targetElementId: z245.string(),
|
|
6986
|
+
value: z245.union([z245.string(), z245.number(), z245.boolean()]).optional(),
|
|
6987
|
+
valuePreview: z245.string().optional()
|
|
6988
|
+
});
|
|
6989
|
+
var DTOElementPropertyValueListResponse = z245.object({
|
|
6990
|
+
values: z245.array(DTOElementPropertyValue)
|
|
6991
|
+
});
|
|
6992
|
+
var DTOElementPropertyValueResponse = z245.object({
|
|
6975
6993
|
value: DTOElementPropertyValue
|
|
6976
6994
|
});
|
|
6977
|
-
var DTOElementPropertyValueUpsertPaylod =
|
|
6978
|
-
definitionId:
|
|
6979
|
-
targetElementId:
|
|
6980
|
-
value:
|
|
6995
|
+
var DTOElementPropertyValueUpsertPaylod = z245.object({
|
|
6996
|
+
definitionId: z245.string(),
|
|
6997
|
+
targetElementId: z245.string(),
|
|
6998
|
+
value: z245.string().or(z245.number()).or(z245.boolean())
|
|
6981
6999
|
});
|
|
6982
7000
|
|
|
6983
7001
|
// src/api/dto/elements/elements-action-v2.ts
|
|
6984
|
-
import { z as
|
|
6985
|
-
var DTOElementActionOutput =
|
|
7002
|
+
import { z as z246 } from "zod";
|
|
7003
|
+
var DTOElementActionOutput = z246.discriminatedUnion("type", [
|
|
6986
7004
|
// Documentation pages
|
|
6987
7005
|
DTODocumentationPageCreateActionOutputV2,
|
|
6988
7006
|
DTODocumentationPageUpdateActionOutputV2,
|
|
@@ -7005,7 +7023,7 @@ var DTOElementActionOutput = z245.discriminatedUnion("type", [
|
|
|
7005
7023
|
// Approvals
|
|
7006
7024
|
DTODocumentationPageApprovalStateChangeActionOutput
|
|
7007
7025
|
]);
|
|
7008
|
-
var DTOElementActionInput =
|
|
7026
|
+
var DTOElementActionInput = z246.discriminatedUnion("type", [
|
|
7009
7027
|
// Documentation pages
|
|
7010
7028
|
DTODocumentationPageCreateActionInputV2,
|
|
7011
7029
|
DTODocumentationPageUpdateActionInputV2,
|
|
@@ -7030,80 +7048,80 @@ var DTOElementActionInput = z245.discriminatedUnion("type", [
|
|
|
7030
7048
|
]);
|
|
7031
7049
|
|
|
7032
7050
|
// src/api/dto/elements/get-elements-v2.ts
|
|
7033
|
-
import { z as
|
|
7034
|
-
var DTOElementsGetTypeFilter =
|
|
7035
|
-
var DTOElementsGetQuerySchema =
|
|
7036
|
-
types:
|
|
7051
|
+
import { z as z247 } from "zod";
|
|
7052
|
+
var DTOElementsGetTypeFilter = z247.enum(["FigmaNode"]);
|
|
7053
|
+
var DTOElementsGetQuerySchema = z247.object({
|
|
7054
|
+
types: z247.string().transform((val) => val.split(",").map((v) => DTOElementsGetTypeFilter.parse(v)))
|
|
7037
7055
|
});
|
|
7038
|
-
var DTOElementsGetOutput =
|
|
7039
|
-
figmaNodes:
|
|
7056
|
+
var DTOElementsGetOutput = z247.object({
|
|
7057
|
+
figmaNodes: z247.array(DTOFigmaNode).optional()
|
|
7040
7058
|
});
|
|
7041
7059
|
|
|
7042
7060
|
// 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:
|
|
7061
|
+
import { z as z248 } from "zod";
|
|
7062
|
+
var DTOAssetRenderConfiguration = z248.object({
|
|
7063
|
+
prefix: z248.string().optional(),
|
|
7064
|
+
suffix: z248.string().optional(),
|
|
7065
|
+
scale: z248.enum(["x1", "x2", "x3", "x4"]),
|
|
7066
|
+
format: z248.enum(["png", "pdf", "svg"])
|
|
7067
|
+
});
|
|
7068
|
+
var DTORenderedAssetFile = z248.object({
|
|
7069
|
+
assetId: z248.string(),
|
|
7070
|
+
fileName: z248.string(),
|
|
7071
|
+
sourceUrl: z248.string(),
|
|
7054
7072
|
settings: DTOAssetRenderConfiguration,
|
|
7055
|
-
originalName:
|
|
7073
|
+
originalName: z248.string()
|
|
7056
7074
|
});
|
|
7057
|
-
var DTODownloadAssetsRequest =
|
|
7058
|
-
persistentIds:
|
|
7075
|
+
var DTODownloadAssetsRequest = z248.object({
|
|
7076
|
+
persistentIds: z248.array(z248.string().uuid()).optional(),
|
|
7059
7077
|
settings: DTOAssetRenderConfiguration.array()
|
|
7060
7078
|
});
|
|
7061
|
-
var DTODownloadAssetsResponse =
|
|
7079
|
+
var DTODownloadAssetsResponse = z248.object({
|
|
7062
7080
|
items: DTORenderedAssetFile.array()
|
|
7063
7081
|
});
|
|
7064
7082
|
|
|
7065
7083
|
// src/api/dto/liveblocks/auth-response.ts
|
|
7066
|
-
import { z as
|
|
7067
|
-
var DTOLiveblocksAuthResponse =
|
|
7068
|
-
token:
|
|
7084
|
+
import { z as z249 } from "zod";
|
|
7085
|
+
var DTOLiveblocksAuthResponse = z249.object({
|
|
7086
|
+
token: z249.string()
|
|
7069
7087
|
});
|
|
7070
7088
|
|
|
7071
7089
|
// src/api/dto/themes/override.ts
|
|
7072
|
-
import { z as
|
|
7090
|
+
import { z as z250 } from "zod";
|
|
7073
7091
|
var DTOThemeOverride = DesignTokenTypedData.and(
|
|
7074
|
-
|
|
7075
|
-
tokenPersistentId:
|
|
7092
|
+
z250.object({
|
|
7093
|
+
tokenPersistentId: z250.string(),
|
|
7076
7094
|
origin: ThemeOverrideOrigin.optional()
|
|
7077
7095
|
})
|
|
7078
7096
|
);
|
|
7079
7097
|
var DTOThemeOverrideCreatePayload = DesignTokenTypedData.and(
|
|
7080
|
-
|
|
7081
|
-
tokenPersistentId:
|
|
7098
|
+
z250.object({
|
|
7099
|
+
tokenPersistentId: z250.string()
|
|
7082
7100
|
})
|
|
7083
7101
|
);
|
|
7084
7102
|
|
|
7085
7103
|
// src/api/dto/themes/theme.ts
|
|
7086
|
-
import { z as
|
|
7087
|
-
var DTOTheme =
|
|
7088
|
-
id:
|
|
7089
|
-
persistentId:
|
|
7090
|
-
designSystemVersionId:
|
|
7091
|
-
brandId:
|
|
7104
|
+
import { z as z251 } from "zod";
|
|
7105
|
+
var DTOTheme = z251.object({
|
|
7106
|
+
id: z251.string(),
|
|
7107
|
+
persistentId: z251.string(),
|
|
7108
|
+
designSystemVersionId: z251.string(),
|
|
7109
|
+
brandId: z251.string(),
|
|
7092
7110
|
meta: ObjectMeta,
|
|
7093
|
-
codeName:
|
|
7111
|
+
codeName: z251.string(),
|
|
7094
7112
|
overrides: DTOThemeOverride.array()
|
|
7095
7113
|
});
|
|
7096
|
-
var DTOThemeResponse =
|
|
7114
|
+
var DTOThemeResponse = z251.object({
|
|
7097
7115
|
theme: DTOTheme
|
|
7098
7116
|
});
|
|
7099
|
-
var DTOThemeListResponse =
|
|
7117
|
+
var DTOThemeListResponse = z251.object({
|
|
7100
7118
|
themes: DTOTheme.array()
|
|
7101
7119
|
});
|
|
7102
|
-
var DTOThemeCreatePayload =
|
|
7120
|
+
var DTOThemeCreatePayload = z251.object({
|
|
7103
7121
|
meta: ObjectMeta,
|
|
7104
|
-
persistentId:
|
|
7105
|
-
brandId:
|
|
7106
|
-
codeName:
|
|
7122
|
+
persistentId: z251.string(),
|
|
7123
|
+
brandId: z251.string(),
|
|
7124
|
+
codeName: z251.string(),
|
|
7107
7125
|
overrides: DTOThemeOverride.array()
|
|
7108
7126
|
});
|
|
7109
7127
|
|
|
@@ -7270,7 +7288,7 @@ var CodegenEndpoint = class {
|
|
|
7270
7288
|
};
|
|
7271
7289
|
|
|
7272
7290
|
// src/api/endpoints/design-system/versions/brands.ts
|
|
7273
|
-
import { z as
|
|
7291
|
+
import { z as z252 } from "zod";
|
|
7274
7292
|
var BrandsEndpoint = class {
|
|
7275
7293
|
constructor(requestExecutor) {
|
|
7276
7294
|
this.requestExecutor = requestExecutor;
|
|
@@ -7304,7 +7322,7 @@ var BrandsEndpoint = class {
|
|
|
7304
7322
|
});
|
|
7305
7323
|
}
|
|
7306
7324
|
delete(dsId, vId, brandId) {
|
|
7307
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${vId}/brands/${brandId}`,
|
|
7325
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${vId}/brands/${brandId}`, z252.any(), {
|
|
7308
7326
|
method: "DELETE"
|
|
7309
7327
|
});
|
|
7310
7328
|
}
|
|
@@ -7315,8 +7333,8 @@ var DocumentationEndpoint = class {
|
|
|
7315
7333
|
constructor(requestExecutor) {
|
|
7316
7334
|
this.requestExecutor = requestExecutor;
|
|
7317
7335
|
}
|
|
7318
|
-
getStructure(designSystemId, versionId) {
|
|
7319
|
-
return this.requestExecutor.json(
|
|
7336
|
+
async getStructure(designSystemId, versionId) {
|
|
7337
|
+
return await this.requestExecutor.json(
|
|
7320
7338
|
`/design-systems/${designSystemId}/versions/${versionId}/documentation/structure`,
|
|
7321
7339
|
DTODocumentationStructure
|
|
7322
7340
|
);
|
|
@@ -7324,10 +7342,13 @@ var DocumentationEndpoint = class {
|
|
|
7324
7342
|
async getDocStructure(dsId, vId) {
|
|
7325
7343
|
return await this.requestExecutor.json(
|
|
7326
7344
|
`/design-systems/${dsId}/versions/${vId}/documentation/structure`,
|
|
7327
|
-
DTODocumentationStructure
|
|
7328
|
-
|
|
7329
|
-
|
|
7330
|
-
|
|
7345
|
+
DTODocumentationStructure
|
|
7346
|
+
);
|
|
7347
|
+
}
|
|
7348
|
+
async getPageRoom(dsId, vId, pageId) {
|
|
7349
|
+
return await this.requestExecutor.json(
|
|
7350
|
+
`/design-systems/${dsId}/versions/${vId}/documentation/pages/${pageId}/room`,
|
|
7351
|
+
DTODocumentationPageRoomResponse
|
|
7331
7352
|
);
|
|
7332
7353
|
}
|
|
7333
7354
|
};
|
|
@@ -7458,7 +7479,7 @@ var ImportJobsEndpoint = class {
|
|
|
7458
7479
|
};
|
|
7459
7480
|
|
|
7460
7481
|
// src/api/endpoints/design-system/versions/overrides.ts
|
|
7461
|
-
import { z as
|
|
7482
|
+
import { z as z253 } from "zod";
|
|
7462
7483
|
var OverridesEndpoint = class {
|
|
7463
7484
|
constructor(requestExecutor) {
|
|
7464
7485
|
this.requestExecutor = requestExecutor;
|
|
@@ -7466,7 +7487,7 @@ var OverridesEndpoint = class {
|
|
|
7466
7487
|
create(dsId, versionId, themeId, body) {
|
|
7467
7488
|
return this.requestExecutor.json(
|
|
7468
7489
|
`/design-systems/${dsId}/versions/${versionId}/themes/${themeId}/overrides`,
|
|
7469
|
-
|
|
7490
|
+
z253.any(),
|
|
7470
7491
|
{
|
|
7471
7492
|
method: "POST",
|
|
7472
7493
|
body
|
|
@@ -7476,7 +7497,7 @@ var OverridesEndpoint = class {
|
|
|
7476
7497
|
};
|
|
7477
7498
|
|
|
7478
7499
|
// src/api/endpoints/design-system/versions/property-definitions.ts
|
|
7479
|
-
import { z as
|
|
7500
|
+
import { z as z254 } from "zod";
|
|
7480
7501
|
var ElementPropertyDefinitionsEndpoint = class {
|
|
7481
7502
|
constructor(requestExecutor) {
|
|
7482
7503
|
this.requestExecutor = requestExecutor;
|
|
@@ -7504,7 +7525,7 @@ var ElementPropertyDefinitionsEndpoint = class {
|
|
|
7504
7525
|
delete(designSystemId, versionId, defId) {
|
|
7505
7526
|
return this.requestExecutor.json(
|
|
7506
7527
|
`/design-systems/${designSystemId}/versions/${versionId}/element-properties/definitions/${defId}`,
|
|
7507
|
-
|
|
7528
|
+
z254.any(),
|
|
7508
7529
|
{ method: "DELETE" }
|
|
7509
7530
|
);
|
|
7510
7531
|
}
|
|
@@ -7543,7 +7564,7 @@ var VersionStatsEndpoint = class {
|
|
|
7543
7564
|
};
|
|
7544
7565
|
|
|
7545
7566
|
// src/api/endpoints/design-system/versions/themes.ts
|
|
7546
|
-
import { z as
|
|
7567
|
+
import { z as z255 } from "zod";
|
|
7547
7568
|
var ThemesEndpoint = class {
|
|
7548
7569
|
constructor(requestExecutor) {
|
|
7549
7570
|
this.requestExecutor = requestExecutor;
|
|
@@ -7566,7 +7587,7 @@ var ThemesEndpoint = class {
|
|
|
7566
7587
|
});
|
|
7567
7588
|
}
|
|
7568
7589
|
delete(dsId, versionId, themeId) {
|
|
7569
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${versionId}/themes/${themeId}`,
|
|
7590
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${versionId}/themes/${themeId}`, z255.any(), {
|
|
7570
7591
|
method: "DELETE"
|
|
7571
7592
|
});
|
|
7572
7593
|
}
|
|
@@ -7713,7 +7734,7 @@ var DesignSystemContactsEndpoint = class {
|
|
|
7713
7734
|
};
|
|
7714
7735
|
|
|
7715
7736
|
// src/api/endpoints/design-system/design-systems.ts
|
|
7716
|
-
import { z as
|
|
7737
|
+
import { z as z257 } from "zod";
|
|
7717
7738
|
|
|
7718
7739
|
// src/api/endpoints/design-system/members.ts
|
|
7719
7740
|
var DesignSystemMembersEndpoint = class {
|
|
@@ -7734,7 +7755,7 @@ var DesignSystemMembersEndpoint = class {
|
|
|
7734
7755
|
};
|
|
7735
7756
|
|
|
7736
7757
|
// src/api/endpoints/design-system/sources.ts
|
|
7737
|
-
import { z as
|
|
7758
|
+
import { z as z256 } from "zod";
|
|
7738
7759
|
var DesignSystemSourcesEndpoint = class {
|
|
7739
7760
|
constructor(requestExecutor) {
|
|
7740
7761
|
this.requestExecutor = requestExecutor;
|
|
@@ -7749,7 +7770,7 @@ var DesignSystemSourcesEndpoint = class {
|
|
|
7749
7770
|
return this.requestExecutor.json(`/design-systems/${dsId}/sources`, DTODataSourcesListResponse);
|
|
7750
7771
|
}
|
|
7751
7772
|
delete(dsId, sourceId) {
|
|
7752
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/sources/${sourceId}`,
|
|
7773
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/sources/${sourceId}`, z256.any(), { method: "DELETE" });
|
|
7753
7774
|
}
|
|
7754
7775
|
figmaImport(dsId, payload) {
|
|
7755
7776
|
return this.requestExecutor.json(`/design-systems/${dsId}/versions/head/cloud-import`, DTOImportJobResponse, {
|
|
@@ -7784,7 +7805,7 @@ var DesignSystemsEndpoint = class {
|
|
|
7784
7805
|
return this.requestExecutor.json(`/design-systems/${dsId}`, DTODesignSystemResponse);
|
|
7785
7806
|
}
|
|
7786
7807
|
delete(dsId) {
|
|
7787
|
-
return this.requestExecutor.json(`/design-systems/${dsId}`,
|
|
7808
|
+
return this.requestExecutor.json(`/design-systems/${dsId}`, z257.any(), { method: "DELETE" });
|
|
7788
7809
|
}
|
|
7789
7810
|
update(dsId, body) {
|
|
7790
7811
|
return this.requestExecutor.json(`/design-systems/${dsId}`, DTODesignSystemResponse, {
|
|
@@ -7828,7 +7849,7 @@ var WorkspaceInvitationsEndpoint = class {
|
|
|
7828
7849
|
};
|
|
7829
7850
|
|
|
7830
7851
|
// src/api/endpoints/workspaces/workspace-members.ts
|
|
7831
|
-
import { z as
|
|
7852
|
+
import { z as z258 } from "zod";
|
|
7832
7853
|
var WorkspaceMembersEndpoint = class {
|
|
7833
7854
|
constructor(requestExecutor) {
|
|
7834
7855
|
this.requestExecutor = requestExecutor;
|
|
@@ -7845,7 +7866,7 @@ var WorkspaceMembersEndpoint = class {
|
|
|
7845
7866
|
});
|
|
7846
7867
|
}
|
|
7847
7868
|
invite(workspaceId, body) {
|
|
7848
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}/members`,
|
|
7869
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/members`, z258.any(), { method: "POST", body });
|
|
7849
7870
|
}
|
|
7850
7871
|
delete(workspaceId, userId) {
|
|
7851
7872
|
return this.requestExecutor.json(`/workspaces/${workspaceId}/members/${userId}`, DTOWorkspaceResponse, {
|
|
@@ -7855,7 +7876,7 @@ var WorkspaceMembersEndpoint = class {
|
|
|
7855
7876
|
};
|
|
7856
7877
|
|
|
7857
7878
|
// src/api/endpoints/workspaces/workspaces.ts
|
|
7858
|
-
import { z as
|
|
7879
|
+
import { z as z259 } from "zod";
|
|
7859
7880
|
var WorkspacesEndpoint = class {
|
|
7860
7881
|
constructor(requestExecutor) {
|
|
7861
7882
|
this.requestExecutor = requestExecutor;
|
|
@@ -7878,10 +7899,10 @@ var WorkspacesEndpoint = class {
|
|
|
7878
7899
|
return this.requestExecutor.json(`/workspaces/${workspaceId}`, DTOWorkspaceResponse, { method: "GET" });
|
|
7879
7900
|
}
|
|
7880
7901
|
delete(workspaceId) {
|
|
7881
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}`,
|
|
7902
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}`, z259.any(), { method: "DELETE" });
|
|
7882
7903
|
}
|
|
7883
7904
|
subscription(workspaceId) {
|
|
7884
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}/subscription`,
|
|
7905
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/subscription`, z259.any(), { method: "GET" });
|
|
7885
7906
|
}
|
|
7886
7907
|
transferOwnership(workspaceId, body) {
|
|
7887
7908
|
return this.requestExecutor.json(`/workspaces/${workspaceId}/ownership`, DTOWorkspaceResponse, {
|
|
@@ -7891,6 +7912,19 @@ var WorkspacesEndpoint = class {
|
|
|
7891
7912
|
}
|
|
7892
7913
|
};
|
|
7893
7914
|
|
|
7915
|
+
// src/api/endpoints/liveblocks.ts
|
|
7916
|
+
var LiveblocksEndpoint = class {
|
|
7917
|
+
constructor(requestExecutor) {
|
|
7918
|
+
this.requestExecutor = requestExecutor;
|
|
7919
|
+
}
|
|
7920
|
+
auth(body) {
|
|
7921
|
+
return this.requestExecutor.json("/liveblocks/auth", DTOLiveblocksAuthResponse, {
|
|
7922
|
+
method: "POST",
|
|
7923
|
+
body
|
|
7924
|
+
});
|
|
7925
|
+
}
|
|
7926
|
+
};
|
|
7927
|
+
|
|
7894
7928
|
// src/api/endpoints/users.ts
|
|
7895
7929
|
var UsersEndpoint = class {
|
|
7896
7930
|
constructor(requestExecutor) {
|
|
@@ -7968,9 +8002,9 @@ ${bodyText}`,
|
|
|
7968
8002
|
|
|
7969
8003
|
// src/api/transport/request-executor.ts
|
|
7970
8004
|
import fetch from "node-fetch";
|
|
7971
|
-
import { z as
|
|
7972
|
-
var ResponseWrapper =
|
|
7973
|
-
result:
|
|
8005
|
+
import { z as z260 } from "zod";
|
|
8006
|
+
var ResponseWrapper = z260.object({
|
|
8007
|
+
result: z260.record(z260.any())
|
|
7974
8008
|
});
|
|
7975
8009
|
var RequestExecutor = class {
|
|
7976
8010
|
constructor(testServerConfig) {
|
|
@@ -8033,6 +8067,7 @@ var SupernovaApiClient = class {
|
|
|
8033
8067
|
__publicField(this, "workspaces");
|
|
8034
8068
|
__publicField(this, "designSystems");
|
|
8035
8069
|
__publicField(this, "codegen");
|
|
8070
|
+
__publicField(this, "liveblocks");
|
|
8036
8071
|
const requestExecutor = new RequestExecutor({
|
|
8037
8072
|
host: config.host,
|
|
8038
8073
|
accessToken: config.accessToken
|
|
@@ -8041,11 +8076,12 @@ var SupernovaApiClient = class {
|
|
|
8041
8076
|
this.workspaces = new WorkspacesEndpoint(requestExecutor);
|
|
8042
8077
|
this.designSystems = new DesignSystemsEndpoint(requestExecutor);
|
|
8043
8078
|
this.codegen = new CodegenEndpoint(requestExecutor);
|
|
8079
|
+
this.liveblocks = new LiveblocksEndpoint(requestExecutor);
|
|
8044
8080
|
}
|
|
8045
8081
|
};
|
|
8046
8082
|
|
|
8047
8083
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
8048
|
-
import { z as
|
|
8084
|
+
import { z as z261 } from "zod";
|
|
8049
8085
|
|
|
8050
8086
|
// src/yjs/version-room/base.ts
|
|
8051
8087
|
var VersionRoomBaseYDoc = class {
|
|
@@ -8575,24 +8611,24 @@ var FrontendVersionRoomYDoc = class {
|
|
|
8575
8611
|
};
|
|
8576
8612
|
|
|
8577
8613
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
8578
|
-
var DocumentationHierarchySettings =
|
|
8579
|
-
routingVersion:
|
|
8580
|
-
isDraftFeatureAdopted:
|
|
8581
|
-
isApprovalFeatureEnabled:
|
|
8582
|
-
approvalRequiredForPublishing:
|
|
8614
|
+
var DocumentationHierarchySettings = z261.object({
|
|
8615
|
+
routingVersion: z261.string(),
|
|
8616
|
+
isDraftFeatureAdopted: z261.boolean(),
|
|
8617
|
+
isApprovalFeatureEnabled: z261.boolean(),
|
|
8618
|
+
approvalRequiredForPublishing: z261.boolean()
|
|
8583
8619
|
});
|
|
8584
8620
|
function yjsToDocumentationHierarchy(doc) {
|
|
8585
8621
|
return new FrontendVersionRoomYDoc(doc).getDocumentationHierarchy();
|
|
8586
8622
|
}
|
|
8587
8623
|
|
|
8588
8624
|
// src/yjs/design-system-content/item-configuration.ts
|
|
8589
|
-
import { z as
|
|
8590
|
-
var DTODocumentationPageRoomHeaderData =
|
|
8591
|
-
title:
|
|
8625
|
+
import { z as z262 } from "zod";
|
|
8626
|
+
var DTODocumentationPageRoomHeaderData = z262.object({
|
|
8627
|
+
title: z262.string(),
|
|
8592
8628
|
configuration: DTODocumentationItemConfigurationV2
|
|
8593
8629
|
});
|
|
8594
|
-
var DTODocumentationPageRoomHeaderDataUpdate =
|
|
8595
|
-
title:
|
|
8630
|
+
var DTODocumentationPageRoomHeaderDataUpdate = z262.object({
|
|
8631
|
+
title: z262.string().optional(),
|
|
8596
8632
|
configuration: DTODocumentationItemConfigurationV2.omit({ header: true }).extend({ header: DocumentationItemHeaderV2.partial() }).optional()
|
|
8597
8633
|
});
|
|
8598
8634
|
function itemConfigurationToYjs(yDoc, item) {
|
|
@@ -8643,7 +8679,7 @@ function yjsToItemConfiguration(yDoc) {
|
|
|
8643
8679
|
header: rawHeader
|
|
8644
8680
|
};
|
|
8645
8681
|
return {
|
|
8646
|
-
title:
|
|
8682
|
+
title: z262.string().parse(title),
|
|
8647
8683
|
configuration: DTODocumentationItemConfigurationV2.parse(rawConfig)
|
|
8648
8684
|
};
|
|
8649
8685
|
}
|
|
@@ -8653,9 +8689,9 @@ var PageBlockEditorModel = PageBlockEditorModelV2;
|
|
|
8653
8689
|
var PageSectionEditorModel = PageSectionEditorModelV2;
|
|
8654
8690
|
|
|
8655
8691
|
// src/yjs/docs-editor/model/page.ts
|
|
8656
|
-
import { z as
|
|
8657
|
-
var DocumentationPageEditorModel =
|
|
8658
|
-
blocks:
|
|
8692
|
+
import { z as z263 } from "zod";
|
|
8693
|
+
var DocumentationPageEditorModel = z263.object({
|
|
8694
|
+
blocks: z263.array(DocumentationPageContentItem)
|
|
8659
8695
|
});
|
|
8660
8696
|
|
|
8661
8697
|
// src/yjs/docs-editor/prosemirror/inner-editor-schema.ts
|
|
@@ -12176,7 +12212,7 @@ var blocks = [
|
|
|
12176
12212
|
|
|
12177
12213
|
// src/yjs/docs-editor/prosemirror-to-blocks.ts
|
|
12178
12214
|
import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
|
|
12179
|
-
import { z as
|
|
12215
|
+
import { z as z264 } from "zod";
|
|
12180
12216
|
function yDocToPage(yDoc, definitions) {
|
|
12181
12217
|
return yXmlFragmentToPage(yDoc.getXmlFragment("default"), definitions);
|
|
12182
12218
|
}
|
|
@@ -12256,7 +12292,7 @@ function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
|
|
|
12256
12292
|
return null;
|
|
12257
12293
|
return {
|
|
12258
12294
|
id,
|
|
12259
|
-
title: getProsemirrorAttribute(prosemirrorNode, "title",
|
|
12295
|
+
title: getProsemirrorAttribute(prosemirrorNode, "title", z264.string()) ?? "",
|
|
12260
12296
|
columns: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(nonNullFilter)
|
|
12261
12297
|
};
|
|
12262
12298
|
}
|
|
@@ -12291,7 +12327,7 @@ function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap, dept
|
|
|
12291
12327
|
});
|
|
12292
12328
|
}
|
|
12293
12329
|
function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap, depth) {
|
|
12294
|
-
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId",
|
|
12330
|
+
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z264.string());
|
|
12295
12331
|
if (!definitionId) {
|
|
12296
12332
|
console.warn(`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`);
|
|
12297
12333
|
return [];
|
|
@@ -12333,7 +12369,7 @@ function parseAsRichText(prosemirrorNode, definition, property) {
|
|
|
12333
12369
|
if (!id)
|
|
12334
12370
|
return null;
|
|
12335
12371
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
12336
|
-
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type",
|
|
12372
|
+
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z264.string().optional()));
|
|
12337
12373
|
return {
|
|
12338
12374
|
id,
|
|
12339
12375
|
type: "Block",
|
|
@@ -12461,10 +12497,10 @@ function parseRichTextAttribute(mark) {
|
|
|
12461
12497
|
return null;
|
|
12462
12498
|
}
|
|
12463
12499
|
function parseProsemirrorLink(mark) {
|
|
12464
|
-
const href = getProsemirrorAttribute(mark, "href",
|
|
12500
|
+
const href = getProsemirrorAttribute(mark, "href", z264.string().optional());
|
|
12465
12501
|
if (!href)
|
|
12466
12502
|
return null;
|
|
12467
|
-
const target = getProsemirrorAttribute(mark, "target",
|
|
12503
|
+
const target = getProsemirrorAttribute(mark, "target", z264.string().optional());
|
|
12468
12504
|
const openInNewTab = target === "_blank";
|
|
12469
12505
|
if (href.startsWith("@")) {
|
|
12470
12506
|
return {
|
|
@@ -12483,10 +12519,10 @@ function parseProsemirrorLink(mark) {
|
|
|
12483
12519
|
}
|
|
12484
12520
|
}
|
|
12485
12521
|
function parseProsemirrorCommentHighlight(mark) {
|
|
12486
|
-
const highlightId = getProsemirrorAttribute(mark, "highlightId",
|
|
12522
|
+
const highlightId = getProsemirrorAttribute(mark, "highlightId", z264.string().optional());
|
|
12487
12523
|
if (!highlightId)
|
|
12488
12524
|
return null;
|
|
12489
|
-
const isResolved = getProsemirrorAttribute(mark, "resolved",
|
|
12525
|
+
const isResolved = getProsemirrorAttribute(mark, "resolved", z264.boolean().optional()) ?? false;
|
|
12490
12526
|
return {
|
|
12491
12527
|
type: "Comment",
|
|
12492
12528
|
commentHighlightId: highlightId,
|
|
@@ -12498,7 +12534,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
12498
12534
|
if (!id)
|
|
12499
12535
|
return null;
|
|
12500
12536
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
12501
|
-
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder",
|
|
12537
|
+
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z264.boolean().optional()) !== false;
|
|
12502
12538
|
const tableChild = prosemirrorNode.content?.find((c) => c.type === "table");
|
|
12503
12539
|
if (!tableChild) {
|
|
12504
12540
|
return emptyTable(id, variantId, 0);
|
|
@@ -12545,9 +12581,9 @@ function parseAsTableCell(prosemirrorNode) {
|
|
|
12545
12581
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
12546
12582
|
if (!id)
|
|
12547
12583
|
return null;
|
|
12548
|
-
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign",
|
|
12584
|
+
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z264.string().optional());
|
|
12549
12585
|
let columnWidth;
|
|
12550
|
-
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth",
|
|
12586
|
+
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z264.array(z264.number()).nullish());
|
|
12551
12587
|
if (columnWidthArray) {
|
|
12552
12588
|
columnWidth = roundDimension(columnWidthArray[0]);
|
|
12553
12589
|
}
|
|
@@ -12585,7 +12621,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
12585
12621
|
value: parseRichText(prosemirrorNode.content ?? [])
|
|
12586
12622
|
};
|
|
12587
12623
|
case "image":
|
|
12588
|
-
const items = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
12624
|
+
const items = getProsemirrorAttribute(prosemirrorNode, "items", z264.string());
|
|
12589
12625
|
if (!items)
|
|
12590
12626
|
return null;
|
|
12591
12627
|
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
@@ -12705,7 +12741,7 @@ function definitionExpectsPlaceholderItem(definition) {
|
|
|
12705
12741
|
);
|
|
12706
12742
|
}
|
|
12707
12743
|
function parseBlockItems(prosemirrorNode, definition) {
|
|
12708
|
-
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
12744
|
+
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z264.string());
|
|
12709
12745
|
if (!itemsString)
|
|
12710
12746
|
return null;
|
|
12711
12747
|
const itemsJson = JSON.parse(itemsString);
|
|
@@ -12717,18 +12753,18 @@ function parseBlockItems(prosemirrorNode, definition) {
|
|
|
12717
12753
|
}
|
|
12718
12754
|
function parseAppearance(prosemirrorNode) {
|
|
12719
12755
|
let appearance = {};
|
|
12720
|
-
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance",
|
|
12756
|
+
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance", z264.string().optional());
|
|
12721
12757
|
if (rawAppearanceString) {
|
|
12722
12758
|
const parsedAppearance = PageBlockAppearanceV2.safeParse(JSON.parse(rawAppearanceString));
|
|
12723
12759
|
if (parsedAppearance.success) {
|
|
12724
12760
|
appearance = parsedAppearance.data;
|
|
12725
12761
|
}
|
|
12726
12762
|
}
|
|
12727
|
-
const columns = getProsemirrorAttribute(prosemirrorNode, "columns",
|
|
12763
|
+
const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z264.number().optional());
|
|
12728
12764
|
if (columns) {
|
|
12729
12765
|
appearance.numberOfColumns = columns;
|
|
12730
12766
|
}
|
|
12731
|
-
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor",
|
|
12767
|
+
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z264.string().optional());
|
|
12732
12768
|
if (backgroundColor) {
|
|
12733
12769
|
const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
|
|
12734
12770
|
if (parsedColor.success) {
|
|
@@ -12823,13 +12859,13 @@ function valueSchemaForPropertyType(type) {
|
|
|
12823
12859
|
}
|
|
12824
12860
|
}
|
|
12825
12861
|
function getProsemirrorBlockId(prosemirrorNode) {
|
|
12826
|
-
const id = getProsemirrorAttribute(prosemirrorNode, "id",
|
|
12862
|
+
const id = getProsemirrorAttribute(prosemirrorNode, "id", z264.string());
|
|
12827
12863
|
if (!id)
|
|
12828
12864
|
console.warn(`Prosemirror attribute "id" on ${prosemirrorNode.type} is required`);
|
|
12829
12865
|
return id;
|
|
12830
12866
|
}
|
|
12831
12867
|
function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
12832
|
-
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(
|
|
12868
|
+
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z264.string()));
|
|
12833
12869
|
}
|
|
12834
12870
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
12835
12871
|
const parsedAttr = validationSchema.safeParse(prosemirrorNode.attrs?.[attributeName]);
|
|
@@ -13005,8 +13041,10 @@ export {
|
|
|
13005
13041
|
DTODocumentationPageMoveActionOutputV2,
|
|
13006
13042
|
DTODocumentationPageRestoreActionInput,
|
|
13007
13043
|
DTODocumentationPageRestoreActionOutput,
|
|
13044
|
+
DTODocumentationPageRoom,
|
|
13008
13045
|
DTODocumentationPageRoomHeaderData,
|
|
13009
13046
|
DTODocumentationPageRoomHeaderDataUpdate,
|
|
13047
|
+
DTODocumentationPageRoomResponse,
|
|
13010
13048
|
DTODocumentationPageSnapshot,
|
|
13011
13049
|
DTODocumentationPageUpdateActionInputV2,
|
|
13012
13050
|
DTODocumentationPageUpdateActionOutputV2,
|
|
@@ -13198,6 +13236,7 @@ export {
|
|
|
13198
13236
|
FrontendVersionRoomYDoc,
|
|
13199
13237
|
ImportJobsEndpoint,
|
|
13200
13238
|
ListTreeBuilder,
|
|
13239
|
+
LiveblocksEndpoint,
|
|
13201
13240
|
NpmRegistryInput,
|
|
13202
13241
|
ObjectMeta2 as ObjectMeta,
|
|
13203
13242
|
OverridesEndpoint,
|