@supernova-studio/client 0.52.11 → 0.52.13
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 +210 -33
- package/dist/index.d.ts +210 -33
- package/dist/index.js +146 -121
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +995 -970
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/dto/elements/components/figma-component.ts +26 -0
- package/src/api/dto/elements/components/index.ts +1 -0
- package/src/api/dto/elements/index.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -44,28 +44,28 @@ import { z as z28 } from "zod";
|
|
|
44
44
|
import { z as z31 } from "zod";
|
|
45
45
|
import { z as z30 } from "zod";
|
|
46
46
|
import { z as z29 } from "zod";
|
|
47
|
+
import { z as z33 } from "zod";
|
|
47
48
|
import { z as z32 } from "zod";
|
|
48
49
|
import deepEqual from "deep-equal";
|
|
49
|
-
import { z as
|
|
50
|
-
import { z as z33 } from "zod";
|
|
51
|
-
import slugifyImplementation from "@sindresorhus/slugify";
|
|
50
|
+
import { z as z40 } from "zod";
|
|
52
51
|
import { z as z34 } from "zod";
|
|
52
|
+
import slugifyImplementation from "@sindresorhus/slugify";
|
|
53
53
|
import { z as z35 } from "zod";
|
|
54
54
|
import { z as z36 } from "zod";
|
|
55
55
|
import { z as z37 } from "zod";
|
|
56
56
|
import { z as z38 } from "zod";
|
|
57
|
-
import { z as
|
|
57
|
+
import { z as z39 } from "zod";
|
|
58
|
+
import { z as z41 } from "zod";
|
|
59
|
+
import { z as z45 } from "zod";
|
|
58
60
|
import { z as z44 } from "zod";
|
|
59
61
|
import { z as z43 } from "zod";
|
|
60
62
|
import { z as z42 } from "zod";
|
|
61
|
-
import { z as
|
|
63
|
+
import { z as z48 } from "zod";
|
|
62
64
|
import { z as z47 } from "zod";
|
|
63
65
|
import { z as z46 } from "zod";
|
|
64
|
-
import { z as
|
|
66
|
+
import { z as z51 } from "zod";
|
|
65
67
|
import { z as z50 } from "zod";
|
|
66
68
|
import { z as z49 } from "zod";
|
|
67
|
-
import { z as z48 } from "zod";
|
|
68
|
-
import { z as z51 } from "zod";
|
|
69
69
|
import { z as z52 } from "zod";
|
|
70
70
|
import { z as z53 } from "zod";
|
|
71
71
|
import { z as z54 } from "zod";
|
|
@@ -89,9 +89,9 @@ import { z as z71 } from "zod";
|
|
|
89
89
|
import { z as z72 } from "zod";
|
|
90
90
|
import { z as z73 } from "zod";
|
|
91
91
|
import { z as z74 } from "zod";
|
|
92
|
+
import { z as z76 } from "zod";
|
|
92
93
|
import { z as z75 } from "zod";
|
|
93
94
|
import { z as z77 } from "zod";
|
|
94
|
-
import { z as z76 } from "zod";
|
|
95
95
|
import { z as z78 } from "zod";
|
|
96
96
|
import { z as z79 } from "zod";
|
|
97
97
|
import { z as z80 } from "zod";
|
|
@@ -99,8 +99,8 @@ import { z as z82 } from "zod";
|
|
|
99
99
|
import { z as z81 } from "zod";
|
|
100
100
|
import { z as z85 } from "zod";
|
|
101
101
|
import { z as z94 } from "zod";
|
|
102
|
-
import { z as z87 } from "zod";
|
|
103
102
|
import { z as z89 } from "zod";
|
|
103
|
+
import { z as z87 } from "zod";
|
|
104
104
|
import { z as z88 } from "zod";
|
|
105
105
|
import { z as z90 } from "zod";
|
|
106
106
|
import { z as z91 } from "zod";
|
|
@@ -557,6 +557,7 @@ var ResolvedAsset = Asset.extend({
|
|
|
557
557
|
var FigmaFileDownloadScope = z22.object({
|
|
558
558
|
styles: z22.boolean(),
|
|
559
559
|
components: z22.boolean(),
|
|
560
|
+
componentSets: z22.boolean(),
|
|
560
561
|
currentVersion: z22.literal("__latest__").nullable(),
|
|
561
562
|
publishedVersion: z22.string().nullable(),
|
|
562
563
|
downloadChunkSize: z22.number().optional(),
|
|
@@ -641,20 +642,59 @@ var BorderValue = z31.object({
|
|
|
641
642
|
style: BorderStyle.optional()
|
|
642
643
|
});
|
|
643
644
|
var BorderTokenData = tokenAliasOrValue(BorderValue);
|
|
644
|
-
var
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
645
|
+
var FigmaComponentPropertyType = z32.enum(["Boolean", "InstanceSwap", "Variant", "Text"]);
|
|
646
|
+
var FigmaComponentBooleanProperty = z32.object({
|
|
647
|
+
type: z32.literal(FigmaComponentPropertyType.enum.Boolean),
|
|
648
|
+
defaultValue: z32.boolean()
|
|
649
|
+
});
|
|
650
|
+
var FigmaComponentInstanceSwapProperty = z32.object({
|
|
651
|
+
type: z32.literal(FigmaComponentPropertyType.enum.InstanceSwap),
|
|
652
|
+
defaultValue: z32.string(),
|
|
653
|
+
preferredValues: z32.object({
|
|
654
|
+
type: z32.enum(["Component", "ComponentSet"]),
|
|
655
|
+
key: z32.string()
|
|
656
|
+
}).array()
|
|
657
|
+
});
|
|
658
|
+
var FigmaComponentVariantProperty = z32.object({
|
|
659
|
+
type: z32.literal(FigmaComponentPropertyType.enum.Variant),
|
|
660
|
+
defaultValue: z32.string(),
|
|
661
|
+
options: z32.array(z32.string())
|
|
662
|
+
});
|
|
663
|
+
var FigmaComponentTextProperty = z32.object({
|
|
664
|
+
type: z32.literal(FigmaComponentPropertyType.enum.Text),
|
|
665
|
+
defaultValue: z32.string()
|
|
666
|
+
});
|
|
667
|
+
var FigmaComponentProperty = z32.discriminatedUnion("type", [
|
|
668
|
+
FigmaComponentBooleanProperty,
|
|
669
|
+
FigmaComponentInstanceSwapProperty,
|
|
670
|
+
FigmaComponentTextProperty
|
|
671
|
+
]);
|
|
672
|
+
var FigmaComponentPropertyMap = z32.record(z32.string(), FigmaComponentProperty);
|
|
673
|
+
var FigmaComponentSetProperties = z32.record(
|
|
674
|
+
z32.string(),
|
|
675
|
+
z32.discriminatedUnion("type", [
|
|
676
|
+
FigmaComponentBooleanProperty,
|
|
677
|
+
FigmaComponentInstanceSwapProperty,
|
|
678
|
+
FigmaComponentTextProperty,
|
|
679
|
+
FigmaComponentVariantProperty
|
|
680
|
+
])
|
|
681
|
+
);
|
|
682
|
+
var ComponentElementData = z33.object({
|
|
683
|
+
value: z33.object({
|
|
684
|
+
thumbnailImage: z33.object({
|
|
685
|
+
value: z33.object({
|
|
686
|
+
url: z33.string(),
|
|
687
|
+
assetId: z33.string()
|
|
650
688
|
})
|
|
651
689
|
}),
|
|
652
|
-
svg:
|
|
653
|
-
value:
|
|
654
|
-
url:
|
|
655
|
-
assetId:
|
|
690
|
+
svg: z33.object({
|
|
691
|
+
value: z33.object({
|
|
692
|
+
url: z33.string(),
|
|
693
|
+
assetId: z33.string()
|
|
656
694
|
})
|
|
657
|
-
}).optional()
|
|
695
|
+
}).optional(),
|
|
696
|
+
parentComponentPersistentId: nullishToOptional(z33.string()),
|
|
697
|
+
componentPropertyDefinitions: nullishToOptional(FigmaComponentPropertyMap)
|
|
658
698
|
})
|
|
659
699
|
});
|
|
660
700
|
var SupernovaException = class _SupernovaException extends Error {
|
|
@@ -764,25 +804,25 @@ function groupBy(items, keyFn) {
|
|
|
764
804
|
}
|
|
765
805
|
return result;
|
|
766
806
|
}
|
|
767
|
-
var ContentLoadInstruction =
|
|
768
|
-
from:
|
|
769
|
-
to:
|
|
770
|
-
authorizationHeaderKvsId:
|
|
771
|
-
timeout:
|
|
807
|
+
var ContentLoadInstruction = z34.object({
|
|
808
|
+
from: z34.string(),
|
|
809
|
+
to: z34.string(),
|
|
810
|
+
authorizationHeaderKvsId: z34.string().optional(),
|
|
811
|
+
timeout: z34.number().optional()
|
|
772
812
|
});
|
|
773
|
-
var ContentLoaderPayload =
|
|
774
|
-
type:
|
|
813
|
+
var ContentLoaderPayload = z34.object({
|
|
814
|
+
type: z34.literal("Single"),
|
|
775
815
|
instruction: ContentLoadInstruction
|
|
776
816
|
}).or(
|
|
777
|
-
|
|
778
|
-
type:
|
|
779
|
-
loadingChunkSize:
|
|
780
|
-
instructions:
|
|
817
|
+
z34.object({
|
|
818
|
+
type: z34.literal("Multiple"),
|
|
819
|
+
loadingChunkSize: z34.number().optional(),
|
|
820
|
+
instructions: z34.array(ContentLoadInstruction)
|
|
781
821
|
})
|
|
782
822
|
).or(
|
|
783
|
-
|
|
784
|
-
type:
|
|
785
|
-
location:
|
|
823
|
+
z34.object({
|
|
824
|
+
type: z34.literal("S3"),
|
|
825
|
+
location: z34.string()
|
|
786
826
|
})
|
|
787
827
|
);
|
|
788
828
|
var RESERVED_SLUGS = [
|
|
@@ -1406,53 +1446,53 @@ var RESERVED_SLUGS = [
|
|
|
1406
1446
|
];
|
|
1407
1447
|
var RESERVED_SLUGS_SET = new Set(RESERVED_SLUGS);
|
|
1408
1448
|
var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
1409
|
-
var ElementPropertyTypeSchema =
|
|
1410
|
-
var ElementPropertyTargetType =
|
|
1411
|
-
var ElementPropertyLinkType =
|
|
1449
|
+
var ElementPropertyTypeSchema = z35.enum(["Text", "Number", "Boolean", "Select", "Generic", "Link", "URL"]);
|
|
1450
|
+
var ElementPropertyTargetType = z35.enum(["Token", "Component", "DocumentationPage"]);
|
|
1451
|
+
var ElementPropertyLinkType = z35.enum(["FigmaComponent", "DocumentationPage"]);
|
|
1412
1452
|
var CODE_NAME_REGEX = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
1413
|
-
var ColorTokenInlineData =
|
|
1414
|
-
value:
|
|
1453
|
+
var ColorTokenInlineData = z35.object({
|
|
1454
|
+
value: z35.string()
|
|
1415
1455
|
});
|
|
1416
|
-
var ElementPropertyDefinitionOption =
|
|
1417
|
-
id:
|
|
1418
|
-
name:
|
|
1456
|
+
var ElementPropertyDefinitionOption = z35.object({
|
|
1457
|
+
id: z35.string(),
|
|
1458
|
+
name: z35.string(),
|
|
1419
1459
|
backgroundColor: ColorTokenInlineData.optional()
|
|
1420
1460
|
});
|
|
1421
|
-
var ElementPropertyDefinition =
|
|
1422
|
-
id:
|
|
1423
|
-
designSystemVersionId:
|
|
1424
|
-
persistentId:
|
|
1425
|
-
name:
|
|
1426
|
-
codeName:
|
|
1427
|
-
description:
|
|
1461
|
+
var ElementPropertyDefinition = z35.object({
|
|
1462
|
+
id: z35.string(),
|
|
1463
|
+
designSystemVersionId: z35.string(),
|
|
1464
|
+
persistentId: z35.string(),
|
|
1465
|
+
name: z35.string(),
|
|
1466
|
+
codeName: z35.string().regex(CODE_NAME_REGEX),
|
|
1467
|
+
description: z35.string(),
|
|
1428
1468
|
type: ElementPropertyTypeSchema,
|
|
1429
1469
|
targetElementType: ElementPropertyTargetType,
|
|
1430
|
-
options:
|
|
1470
|
+
options: z35.array(ElementPropertyDefinitionOption).optional(),
|
|
1431
1471
|
linkElementType: ElementPropertyLinkType.optional()
|
|
1432
1472
|
});
|
|
1433
1473
|
var ElementPropertyType = ElementPropertyTypeSchema.enum;
|
|
1434
|
-
var ElementPropertyValue =
|
|
1435
|
-
id:
|
|
1436
|
-
designSystemVersionId:
|
|
1437
|
-
targetElementPersistentId:
|
|
1438
|
-
definitionPersistentId:
|
|
1439
|
-
stringValue:
|
|
1440
|
-
numberValue:
|
|
1441
|
-
booleanValue:
|
|
1442
|
-
referenceValue:
|
|
1443
|
-
referenceValuePreview:
|
|
1444
|
-
});
|
|
1445
|
-
var Point2D =
|
|
1446
|
-
x:
|
|
1447
|
-
y:
|
|
1474
|
+
var ElementPropertyValue = z36.object({
|
|
1475
|
+
id: z36.string(),
|
|
1476
|
+
designSystemVersionId: z36.string(),
|
|
1477
|
+
targetElementPersistentId: z36.string(),
|
|
1478
|
+
definitionPersistentId: z36.string(),
|
|
1479
|
+
stringValue: z36.string().nullish(),
|
|
1480
|
+
numberValue: z36.number().nullish(),
|
|
1481
|
+
booleanValue: z36.boolean().nullish(),
|
|
1482
|
+
referenceValue: z36.string().nullish(),
|
|
1483
|
+
referenceValuePreview: z36.string().optional()
|
|
1484
|
+
});
|
|
1485
|
+
var Point2D = z37.object({
|
|
1486
|
+
x: z37.number(),
|
|
1487
|
+
y: z37.number()
|
|
1448
1488
|
});
|
|
1449
1489
|
var nullSize = { height: -1, width: -1 };
|
|
1450
1490
|
function isNullSize(size) {
|
|
1451
1491
|
return size.height === nullSize.height && size.width === nullSize.width;
|
|
1452
1492
|
}
|
|
1453
|
-
var Size =
|
|
1454
|
-
width:
|
|
1455
|
-
height:
|
|
1493
|
+
var Size = z38.object({
|
|
1494
|
+
width: z38.number().nullish().transform((v) => v ?? nullSize.width),
|
|
1495
|
+
height: z38.number().nullish().transform((v) => v ?? nullSize.height)
|
|
1456
1496
|
});
|
|
1457
1497
|
var SizeOrUndefined = Size.optional().transform((v) => {
|
|
1458
1498
|
if (!v)
|
|
@@ -1461,7 +1501,7 @@ var SizeOrUndefined = Size.optional().transform((v) => {
|
|
|
1461
1501
|
return void 0;
|
|
1462
1502
|
return v;
|
|
1463
1503
|
});
|
|
1464
|
-
var DesignTokenType =
|
|
1504
|
+
var DesignTokenType = z39.enum([
|
|
1465
1505
|
"Color",
|
|
1466
1506
|
"Border",
|
|
1467
1507
|
"Gradient",
|
|
@@ -1493,7 +1533,7 @@ var DesignTokenType = z38.enum([
|
|
|
1493
1533
|
]);
|
|
1494
1534
|
var tokenElementTypes = [...DesignTokenType.options.filter((v) => v !== "Font")];
|
|
1495
1535
|
var DesignElementType = DesignTokenType.or(
|
|
1496
|
-
|
|
1536
|
+
z39.enum([
|
|
1497
1537
|
"Component",
|
|
1498
1538
|
"Theme",
|
|
1499
1539
|
"Documentation",
|
|
@@ -1505,7 +1545,7 @@ var DesignElementType = DesignTokenType.or(
|
|
|
1505
1545
|
"PageBlock"
|
|
1506
1546
|
])
|
|
1507
1547
|
);
|
|
1508
|
-
var DesignElementCategory =
|
|
1548
|
+
var DesignElementCategory = z39.enum([
|
|
1509
1549
|
"Token",
|
|
1510
1550
|
"Component",
|
|
1511
1551
|
"DesignSystemComponent",
|
|
@@ -1513,37 +1553,37 @@ var DesignElementCategory = z38.enum([
|
|
|
1513
1553
|
"Theme",
|
|
1514
1554
|
"PageBlock"
|
|
1515
1555
|
]);
|
|
1516
|
-
var DesignSystemElementExportProps =
|
|
1517
|
-
isAsset:
|
|
1518
|
-
codeName:
|
|
1519
|
-
});
|
|
1520
|
-
var ShallowDesignElement =
|
|
1521
|
-
id:
|
|
1522
|
-
persistentId:
|
|
1523
|
-
designSystemVersionId:
|
|
1556
|
+
var DesignSystemElementExportProps = z39.object({
|
|
1557
|
+
isAsset: z39.boolean().nullish().transform((v) => v ?? false),
|
|
1558
|
+
codeName: z39.string().nullish()
|
|
1559
|
+
});
|
|
1560
|
+
var ShallowDesignElement = z39.object({
|
|
1561
|
+
id: z39.string(),
|
|
1562
|
+
persistentId: z39.string(),
|
|
1563
|
+
designSystemVersionId: z39.string(),
|
|
1524
1564
|
type: DesignElementType,
|
|
1525
|
-
brandPersistentId:
|
|
1526
|
-
parentPersistentId:
|
|
1527
|
-
shortPersistentId:
|
|
1565
|
+
brandPersistentId: z39.string().optional(),
|
|
1566
|
+
parentPersistentId: z39.string().optional(),
|
|
1567
|
+
shortPersistentId: z39.string().optional(),
|
|
1528
1568
|
childType: DesignElementType.optional(),
|
|
1529
|
-
sortOrder:
|
|
1530
|
-
origin:
|
|
1531
|
-
createdAt:
|
|
1532
|
-
updatedAt:
|
|
1569
|
+
sortOrder: z39.number(),
|
|
1570
|
+
origin: z39.record(z39.any()).optional(),
|
|
1571
|
+
createdAt: z39.coerce.date(),
|
|
1572
|
+
updatedAt: z39.coerce.date()
|
|
1533
1573
|
});
|
|
1534
1574
|
var DesignElement = ShallowDesignElement.extend({
|
|
1535
1575
|
meta: ObjectMeta,
|
|
1536
|
-
slug:
|
|
1537
|
-
userSlug:
|
|
1576
|
+
slug: z39.string().optional(),
|
|
1577
|
+
userSlug: z39.string().optional(),
|
|
1538
1578
|
exportProperties: DesignSystemElementExportProps.optional(),
|
|
1539
|
-
data:
|
|
1540
|
-
origin:
|
|
1579
|
+
data: z39.record(z39.any()),
|
|
1580
|
+
origin: z39.record(z39.any()).optional()
|
|
1541
1581
|
});
|
|
1542
1582
|
var HierarchicalElements = DesignTokenType.or(
|
|
1543
|
-
|
|
1583
|
+
z39.enum(["Component", "DesignSystemComponent", "DocumentationPage"])
|
|
1544
1584
|
);
|
|
1545
|
-
var PageBlockCalloutType =
|
|
1546
|
-
var PageBlockTypeV1 =
|
|
1585
|
+
var PageBlockCalloutType = z40.enum(["Info", "Primary", "Success", "Warning", "Error"]);
|
|
1586
|
+
var PageBlockTypeV1 = z40.enum([
|
|
1547
1587
|
"Text",
|
|
1548
1588
|
"Heading",
|
|
1549
1589
|
"Code",
|
|
@@ -1577,7 +1617,7 @@ var PageBlockTypeV1 = z39.enum([
|
|
|
1577
1617
|
"TableCell",
|
|
1578
1618
|
"Guidelines"
|
|
1579
1619
|
]);
|
|
1580
|
-
var PageBlockCodeLanguage =
|
|
1620
|
+
var PageBlockCodeLanguage = z40.enum([
|
|
1581
1621
|
"Angular",
|
|
1582
1622
|
"Bash",
|
|
1583
1623
|
"C",
|
|
@@ -1611,70 +1651,70 @@ var PageBlockCodeLanguage = z39.enum([
|
|
|
1611
1651
|
"XML",
|
|
1612
1652
|
"YAML"
|
|
1613
1653
|
]);
|
|
1614
|
-
var PageBlockAlignment =
|
|
1615
|
-
var PageBlockThemeType =
|
|
1616
|
-
var PageBlockAssetType =
|
|
1617
|
-
var PageBlockTilesAlignment =
|
|
1618
|
-
var PageBlockTilesLayout =
|
|
1619
|
-
var PageBlockTheme =
|
|
1620
|
-
themeIds:
|
|
1654
|
+
var PageBlockAlignment = z40.enum(["Left", "Center", "Stretch", "Right"]);
|
|
1655
|
+
var PageBlockThemeType = z40.enum(["Override", "Comparison"]);
|
|
1656
|
+
var PageBlockAssetType = z40.enum(["image", "figmaFrame"]);
|
|
1657
|
+
var PageBlockTilesAlignment = z40.enum(["Center", "FrameHeight"]);
|
|
1658
|
+
var PageBlockTilesLayout = z40.enum(["C8", "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C1_75"]);
|
|
1659
|
+
var PageBlockTheme = z40.object({
|
|
1660
|
+
themeIds: z40.array(z40.string()),
|
|
1621
1661
|
type: PageBlockThemeType
|
|
1622
1662
|
});
|
|
1623
|
-
var PageBlockUrlPreview =
|
|
1624
|
-
title: nullishToOptional(
|
|
1625
|
-
description: nullishToOptional(
|
|
1626
|
-
thumbnailUrl: nullishToOptional(
|
|
1627
|
-
});
|
|
1628
|
-
var PageBlockFrameOrigin =
|
|
1629
|
-
sourceFileName: nullishToOptional(
|
|
1630
|
-
title: nullishToOptional(
|
|
1631
|
-
previewUrl: nullishToOptional(
|
|
1632
|
-
valid: nullishToOptional(
|
|
1633
|
-
referenceId: nullishToOptional(
|
|
1634
|
-
assetId: nullishToOptional(
|
|
1635
|
-
assetScale: nullishToOptional(
|
|
1636
|
-
width: nullishToOptional(
|
|
1637
|
-
height: nullishToOptional(
|
|
1638
|
-
});
|
|
1639
|
-
var PageBlockFrame =
|
|
1640
|
-
persistentId:
|
|
1641
|
-
sourceId:
|
|
1642
|
-
sourceFrameId:
|
|
1643
|
-
title: nullishToOptional(
|
|
1644
|
-
description: nullishToOptional(
|
|
1663
|
+
var PageBlockUrlPreview = z40.object({
|
|
1664
|
+
title: nullishToOptional(z40.string()),
|
|
1665
|
+
description: nullishToOptional(z40.string()),
|
|
1666
|
+
thumbnailUrl: nullishToOptional(z40.string())
|
|
1667
|
+
});
|
|
1668
|
+
var PageBlockFrameOrigin = z40.object({
|
|
1669
|
+
sourceFileName: nullishToOptional(z40.string()),
|
|
1670
|
+
title: nullishToOptional(z40.string()),
|
|
1671
|
+
previewUrl: nullishToOptional(z40.string()),
|
|
1672
|
+
valid: nullishToOptional(z40.boolean()),
|
|
1673
|
+
referenceId: nullishToOptional(z40.string()),
|
|
1674
|
+
assetId: nullishToOptional(z40.string()),
|
|
1675
|
+
assetScale: nullishToOptional(z40.number()),
|
|
1676
|
+
width: nullishToOptional(z40.number()),
|
|
1677
|
+
height: nullishToOptional(z40.number())
|
|
1678
|
+
});
|
|
1679
|
+
var PageBlockFrame = z40.object({
|
|
1680
|
+
persistentId: z40.string(),
|
|
1681
|
+
sourceId: z40.string(),
|
|
1682
|
+
sourceFrameId: z40.string(),
|
|
1683
|
+
title: nullishToOptional(z40.string()),
|
|
1684
|
+
description: nullishToOptional(z40.string()),
|
|
1645
1685
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
1646
1686
|
origin: nullishToOptional(PageBlockFrameOrigin)
|
|
1647
1687
|
});
|
|
1648
|
-
var PageBlockAsset =
|
|
1688
|
+
var PageBlockAsset = z40.object({
|
|
1649
1689
|
type: PageBlockAssetType,
|
|
1650
|
-
id: nullishToOptional(
|
|
1651
|
-
url: nullishToOptional(
|
|
1690
|
+
id: nullishToOptional(z40.string()),
|
|
1691
|
+
url: nullishToOptional(z40.string()),
|
|
1652
1692
|
figmaFrame: nullishToOptional(PageBlockFrame)
|
|
1653
1693
|
});
|
|
1654
|
-
var PageBlockLinkPreview =
|
|
1655
|
-
title: nullishToOptional(
|
|
1656
|
-
valid: nullishToOptional(
|
|
1694
|
+
var PageBlockLinkPreview = z40.object({
|
|
1695
|
+
title: nullishToOptional(z40.string()),
|
|
1696
|
+
valid: nullishToOptional(z40.boolean())
|
|
1657
1697
|
});
|
|
1658
|
-
var PageBlockShortcut =
|
|
1659
|
-
persistentId:
|
|
1660
|
-
title: nullishToOptional(
|
|
1661
|
-
description: nullishToOptional(
|
|
1698
|
+
var PageBlockShortcut = z40.object({
|
|
1699
|
+
persistentId: z40.string(),
|
|
1700
|
+
title: nullishToOptional(z40.string()),
|
|
1701
|
+
description: nullishToOptional(z40.string()),
|
|
1662
1702
|
asset: nullishToOptional(PageBlockAsset),
|
|
1663
|
-
documentationItemId: nullishToOptional(
|
|
1664
|
-
pageHeadingId: nullishToOptional(
|
|
1665
|
-
url: nullishToOptional(
|
|
1666
|
-
openInNewTab: nullishToOptional(
|
|
1703
|
+
documentationItemId: nullishToOptional(z40.string()),
|
|
1704
|
+
pageHeadingId: nullishToOptional(z40.string()),
|
|
1705
|
+
url: nullishToOptional(z40.string()),
|
|
1706
|
+
openInNewTab: nullishToOptional(z40.boolean()),
|
|
1667
1707
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
1668
1708
|
documentationItemPreview: nullishToOptional(PageBlockLinkPreview)
|
|
1669
1709
|
});
|
|
1670
|
-
var PageBlockCustomBlockPropertyImageValue =
|
|
1710
|
+
var PageBlockCustomBlockPropertyImageValue = z40.object({
|
|
1671
1711
|
asset: nullishToOptional(PageBlockAsset),
|
|
1672
|
-
assetId: nullishToOptional(
|
|
1673
|
-
assetUrl: nullishToOptional(
|
|
1712
|
+
assetId: nullishToOptional(z40.string()),
|
|
1713
|
+
assetUrl: nullishToOptional(z40.string())
|
|
1674
1714
|
});
|
|
1675
|
-
var PageBlockCustomBlockPropertyValue =
|
|
1676
|
-
key:
|
|
1677
|
-
value:
|
|
1715
|
+
var PageBlockCustomBlockPropertyValue = z40.object({
|
|
1716
|
+
key: z40.string(),
|
|
1717
|
+
value: z40.any()
|
|
1678
1718
|
// TODO Artem: for some reason there are cases when there's an array here in the DB
|
|
1679
1719
|
// e.g. element id 67451 in the dev db
|
|
1680
1720
|
// value: z
|
|
@@ -1685,117 +1725,117 @@ var PageBlockCustomBlockPropertyValue = z39.object({
|
|
|
1685
1725
|
// .or(TypographyTokenData)
|
|
1686
1726
|
// .or(PageBlockCustomBlockPropertyImageValue),
|
|
1687
1727
|
});
|
|
1688
|
-
var PageBlockFigmaFrameProperties =
|
|
1728
|
+
var PageBlockFigmaFrameProperties = z40.object({
|
|
1689
1729
|
color: nullishToOptional(
|
|
1690
|
-
|
|
1691
|
-
value:
|
|
1730
|
+
z40.object({
|
|
1731
|
+
value: z40.string()
|
|
1692
1732
|
})
|
|
1693
1733
|
),
|
|
1694
1734
|
alignment: PageBlockTilesAlignment,
|
|
1695
1735
|
layout: PageBlockTilesLayout,
|
|
1696
1736
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
1697
|
-
showTitles:
|
|
1737
|
+
showTitles: z40.boolean()
|
|
1698
1738
|
});
|
|
1699
|
-
var PageBlockRenderCodeProperties =
|
|
1700
|
-
showCode:
|
|
1701
|
-
showControls:
|
|
1739
|
+
var PageBlockRenderCodeProperties = z40.object({
|
|
1740
|
+
showCode: z40.boolean(),
|
|
1741
|
+
showControls: z40.boolean().optional()
|
|
1702
1742
|
});
|
|
1703
|
-
var PageBlockAssetComponent =
|
|
1704
|
-
persistentId:
|
|
1705
|
-
componentAssetId:
|
|
1706
|
-
title: nullishToOptional(
|
|
1707
|
-
description: nullishToOptional(
|
|
1743
|
+
var PageBlockAssetComponent = z40.object({
|
|
1744
|
+
persistentId: z40.string(),
|
|
1745
|
+
componentAssetId: z40.string(),
|
|
1746
|
+
title: nullishToOptional(z40.string()),
|
|
1747
|
+
description: nullishToOptional(z40.string()),
|
|
1708
1748
|
backgroundColor: nullishToOptional(ColorTokenInlineData)
|
|
1709
1749
|
});
|
|
1710
|
-
var PageBlockTableColumn =
|
|
1711
|
-
id:
|
|
1750
|
+
var PageBlockTableColumn = z40.object({
|
|
1751
|
+
id: z40.string(),
|
|
1712
1752
|
width: DimensionTokenData
|
|
1713
1753
|
});
|
|
1714
|
-
var PageBlockTableProperties =
|
|
1715
|
-
showBorders:
|
|
1716
|
-
showHeaderRow:
|
|
1717
|
-
showHeaderColumn:
|
|
1718
|
-
columns:
|
|
1754
|
+
var PageBlockTableProperties = z40.object({
|
|
1755
|
+
showBorders: z40.boolean(),
|
|
1756
|
+
showHeaderRow: z40.boolean(),
|
|
1757
|
+
showHeaderColumn: z40.boolean(),
|
|
1758
|
+
columns: z40.array(PageBlockTableColumn)
|
|
1719
1759
|
});
|
|
1720
|
-
var PageBlockTextSpanAttributeType =
|
|
1721
|
-
var PageBlockTextSpanAttribute =
|
|
1760
|
+
var PageBlockTextSpanAttributeType = z40.enum(["Bold", "Italic", "Link", "Strikethrough", "Code", "Comment"]);
|
|
1761
|
+
var PageBlockTextSpanAttribute = z40.object({
|
|
1722
1762
|
type: PageBlockTextSpanAttributeType,
|
|
1723
1763
|
// Link attributes
|
|
1724
|
-
link: nullishToOptional(
|
|
1725
|
-
documentationItemId: nullishToOptional(
|
|
1726
|
-
openInNewWindow: nullishToOptional(
|
|
1764
|
+
link: nullishToOptional(z40.string()),
|
|
1765
|
+
documentationItemId: nullishToOptional(z40.string()),
|
|
1766
|
+
openInNewWindow: nullishToOptional(z40.boolean()),
|
|
1727
1767
|
// deprecated. use openInNewTab
|
|
1728
|
-
openInNewTab: nullishToOptional(
|
|
1768
|
+
openInNewTab: nullishToOptional(z40.boolean()),
|
|
1729
1769
|
// Comment attributes
|
|
1730
|
-
commentHighlightId: nullishToOptional(
|
|
1731
|
-
commentIsResolved: nullishToOptional(
|
|
1770
|
+
commentHighlightId: nullishToOptional(z40.string()),
|
|
1771
|
+
commentIsResolved: nullishToOptional(z40.boolean())
|
|
1732
1772
|
});
|
|
1733
|
-
var PageBlockTextSpan =
|
|
1734
|
-
text:
|
|
1735
|
-
attributes:
|
|
1773
|
+
var PageBlockTextSpan = z40.object({
|
|
1774
|
+
text: z40.string(),
|
|
1775
|
+
attributes: z40.array(PageBlockTextSpanAttribute)
|
|
1736
1776
|
});
|
|
1737
|
-
var PageBlockText =
|
|
1738
|
-
spans:
|
|
1777
|
+
var PageBlockText = z40.object({
|
|
1778
|
+
spans: z40.array(PageBlockTextSpan)
|
|
1739
1779
|
});
|
|
1740
|
-
var PageBlockGuideline =
|
|
1741
|
-
description: nullishToOptional(
|
|
1780
|
+
var PageBlockGuideline = z40.object({
|
|
1781
|
+
description: nullishToOptional(z40.string()),
|
|
1742
1782
|
asset: nullishToOptional(PageBlockAsset),
|
|
1743
|
-
type:
|
|
1744
|
-
imageAlt: nullishToOptional(
|
|
1745
|
-
imageCaption: nullishToOptional(
|
|
1783
|
+
type: z40.string(),
|
|
1784
|
+
imageAlt: nullishToOptional(z40.string()),
|
|
1785
|
+
imageCaption: nullishToOptional(z40.string()),
|
|
1746
1786
|
imageAlignment: nullishToOptional(PageBlockAlignment)
|
|
1747
1787
|
});
|
|
1748
|
-
var PageBlockBaseV1 =
|
|
1749
|
-
persistentId:
|
|
1788
|
+
var PageBlockBaseV1 = z40.object({
|
|
1789
|
+
persistentId: z40.string(),
|
|
1750
1790
|
type: PageBlockTypeV1,
|
|
1751
|
-
numberOfColumns: nullishToOptional(
|
|
1791
|
+
numberOfColumns: nullishToOptional(z40.number()),
|
|
1752
1792
|
// Element linking
|
|
1753
|
-
designObjectId: nullishToOptional(
|
|
1754
|
-
designObjectIds: nullishToOptional(
|
|
1755
|
-
tokenType: nullishToOptional(DesignTokenType.or(
|
|
1756
|
-
showNestedGroups: nullishToOptional(
|
|
1757
|
-
brandId: nullishToOptional(
|
|
1793
|
+
designObjectId: nullishToOptional(z40.string()),
|
|
1794
|
+
designObjectIds: nullishToOptional(z40.array(z40.string())),
|
|
1795
|
+
tokenType: nullishToOptional(DesignTokenType.or(z40.literal("Font"))),
|
|
1796
|
+
showNestedGroups: nullishToOptional(z40.boolean()),
|
|
1797
|
+
brandId: nullishToOptional(z40.string()),
|
|
1758
1798
|
// Rich text
|
|
1759
1799
|
text: nullishToOptional(PageBlockText),
|
|
1760
|
-
caption: nullishToOptional(
|
|
1761
|
-
headingType: nullishToOptional(
|
|
1800
|
+
caption: nullishToOptional(z40.string()),
|
|
1801
|
+
headingType: nullishToOptional(z40.number().min(1).max(3)),
|
|
1762
1802
|
codeLanguage: nullishToOptional(PageBlockCodeLanguage),
|
|
1763
1803
|
calloutType: nullishToOptional(PageBlockCalloutType),
|
|
1764
|
-
urlInput: nullishToOptional(
|
|
1765
|
-
url: nullishToOptional(
|
|
1804
|
+
urlInput: nullishToOptional(z40.string()),
|
|
1805
|
+
url: nullishToOptional(z40.string()),
|
|
1766
1806
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
1767
1807
|
// Image
|
|
1768
1808
|
asset: nullishToOptional(PageBlockAsset),
|
|
1769
1809
|
alignment: nullishToOptional(PageBlockAlignment),
|
|
1770
1810
|
// Shortcuts block
|
|
1771
|
-
shortcuts: nullishToOptional(
|
|
1811
|
+
shortcuts: nullishToOptional(z40.array(PageBlockShortcut)),
|
|
1772
1812
|
// Guidelines
|
|
1773
1813
|
guidelines: nullishToOptional(PageBlockGuideline.array()),
|
|
1774
1814
|
// Custom blocks
|
|
1775
|
-
customBlockKey: nullishToOptional(
|
|
1776
|
-
customBlockProperties: nullishToOptional(
|
|
1777
|
-
variantKey: nullishToOptional(
|
|
1815
|
+
customBlockKey: nullishToOptional(z40.string()),
|
|
1816
|
+
customBlockProperties: nullishToOptional(z40.array(PageBlockCustomBlockPropertyValue)),
|
|
1817
|
+
variantKey: nullishToOptional(z40.string()),
|
|
1778
1818
|
// Figma frames
|
|
1779
1819
|
figmaFrameProperties: nullishToOptional(PageBlockFigmaFrameProperties),
|
|
1780
|
-
figmaFrames: nullishToOptional(
|
|
1820
|
+
figmaFrames: nullishToOptional(z40.array(PageBlockFrame)),
|
|
1781
1821
|
// Generic
|
|
1782
1822
|
size: nullishToOptional(Size),
|
|
1783
1823
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
1784
1824
|
// Render code
|
|
1785
1825
|
renderCodeProperties: nullishToOptional(PageBlockRenderCodeProperties),
|
|
1786
1826
|
// Component assets
|
|
1787
|
-
componentAssets: nullishToOptional(
|
|
1827
|
+
componentAssets: nullishToOptional(z40.array(PageBlockAssetComponent)),
|
|
1788
1828
|
// Tables
|
|
1789
1829
|
tableProperties: nullishToOptional(PageBlockTableProperties),
|
|
1790
|
-
columnId: nullishToOptional(
|
|
1830
|
+
columnId: nullishToOptional(z40.string()),
|
|
1791
1831
|
// Token spreadsheet
|
|
1792
1832
|
theme: nullishToOptional(PageBlockTheme),
|
|
1793
|
-
blacklistedElementProperties: nullishToOptional(
|
|
1833
|
+
blacklistedElementProperties: nullishToOptional(z40.array(z40.string())),
|
|
1794
1834
|
// Arbitrary
|
|
1795
|
-
userMetadata: nullishToOptional(
|
|
1835
|
+
userMetadata: nullishToOptional(z40.string())
|
|
1796
1836
|
});
|
|
1797
1837
|
var PageBlockV1 = PageBlockBaseV1.extend({
|
|
1798
|
-
children:
|
|
1838
|
+
children: z40.lazy(
|
|
1799
1839
|
() => PageBlockV1.array().nullish().transform((t) => t ?? [])
|
|
1800
1840
|
)
|
|
1801
1841
|
});
|
|
@@ -1889,265 +1929,265 @@ function sanitizeSpanAttribute(attribute) {
|
|
|
1889
1929
|
};
|
|
1890
1930
|
}
|
|
1891
1931
|
}
|
|
1892
|
-
var PageBlockLinkType =
|
|
1893
|
-
var PageBlockImageType =
|
|
1894
|
-
var PageBlockImageAlignment =
|
|
1895
|
-
var PageBlockTableCellAlignment =
|
|
1896
|
-
var PageBlockPreviewContainerSize =
|
|
1897
|
-
var PageBlockThemeDisplayMode =
|
|
1898
|
-
var PageBlockImageResourceReference =
|
|
1899
|
-
resourceId:
|
|
1900
|
-
url:
|
|
1932
|
+
var PageBlockLinkType = z41.enum(["DocumentationItem", "PageHeading", "Url"]);
|
|
1933
|
+
var PageBlockImageType = z41.enum(["Resource", "FigmaNode"]);
|
|
1934
|
+
var PageBlockImageAlignment = z41.enum(["Left", "Center", "Stretch"]);
|
|
1935
|
+
var PageBlockTableCellAlignment = z41.enum(["Left", "Center", "Right"]);
|
|
1936
|
+
var PageBlockPreviewContainerSize = z41.enum(["Centered", "NaturalHeight"]);
|
|
1937
|
+
var PageBlockThemeDisplayMode = z41.enum(["Split", "Override"]);
|
|
1938
|
+
var PageBlockImageResourceReference = z41.object({
|
|
1939
|
+
resourceId: z41.string(),
|
|
1940
|
+
url: z41.string()
|
|
1901
1941
|
});
|
|
1902
|
-
var PageBlockResourceFrameNodeReference =
|
|
1903
|
-
sourceId:
|
|
1904
|
-
frameReferenceId:
|
|
1942
|
+
var PageBlockResourceFrameNodeReference = z41.object({
|
|
1943
|
+
sourceId: z41.string(),
|
|
1944
|
+
frameReferenceId: z41.string()
|
|
1905
1945
|
});
|
|
1906
|
-
var PageBlockImageReference =
|
|
1946
|
+
var PageBlockImageReference = z41.object({
|
|
1907
1947
|
type: PageBlockImageType,
|
|
1908
1948
|
resource: PageBlockImageResourceReference.optional(),
|
|
1909
1949
|
figmaNode: PageBlockResourceFrameNodeReference.optional()
|
|
1910
1950
|
});
|
|
1911
|
-
var PageBlockColorV2 =
|
|
1912
|
-
value:
|
|
1913
|
-
referencedTokenId:
|
|
1951
|
+
var PageBlockColorV2 = z41.object({
|
|
1952
|
+
value: z41.string(),
|
|
1953
|
+
referencedTokenId: z41.string().optional()
|
|
1914
1954
|
});
|
|
1915
|
-
var PageBlockAssetEntityMeta =
|
|
1916
|
-
title:
|
|
1917
|
-
description:
|
|
1955
|
+
var PageBlockAssetEntityMeta = z41.object({
|
|
1956
|
+
title: z41.string().optional(),
|
|
1957
|
+
description: z41.string().optional(),
|
|
1918
1958
|
backgroundColor: PageBlockColorV2.optional()
|
|
1919
1959
|
});
|
|
1920
|
-
var PageBlockFigmaComponentEntityMeta =
|
|
1921
|
-
title:
|
|
1922
|
-
description:
|
|
1960
|
+
var PageBlockFigmaComponentEntityMeta = z41.object({
|
|
1961
|
+
title: z41.string().optional(),
|
|
1962
|
+
description: z41.string().optional(),
|
|
1923
1963
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1924
|
-
selectedComponentProperties:
|
|
1964
|
+
selectedComponentProperties: z41.array(z41.string()).optional()
|
|
1925
1965
|
});
|
|
1926
|
-
var PageBlockFigmaNodeEntityMeta =
|
|
1927
|
-
title:
|
|
1928
|
-
description:
|
|
1966
|
+
var PageBlockFigmaNodeEntityMeta = z41.object({
|
|
1967
|
+
title: z41.string().optional(),
|
|
1968
|
+
description: z41.string().optional(),
|
|
1929
1969
|
backgroundColor: PageBlockColorV2.optional()
|
|
1930
1970
|
});
|
|
1931
|
-
var PageBlockAppearanceV2 =
|
|
1971
|
+
var PageBlockAppearanceV2 = z41.object({
|
|
1932
1972
|
itemBackgroundColor: PageBlockColorV2.optional(),
|
|
1933
|
-
numberOfColumns:
|
|
1973
|
+
numberOfColumns: z41.number().optional()
|
|
1934
1974
|
});
|
|
1935
|
-
var PageBlockItemUntypedValue =
|
|
1936
|
-
value:
|
|
1937
|
-
}).and(
|
|
1938
|
-
var PageBlockLinkV2 =
|
|
1975
|
+
var PageBlockItemUntypedValue = z41.object({
|
|
1976
|
+
value: z41.any()
|
|
1977
|
+
}).and(z41.record(z41.any()));
|
|
1978
|
+
var PageBlockLinkV2 = z41.object({
|
|
1939
1979
|
type: PageBlockLinkType,
|
|
1940
|
-
documentationItemId:
|
|
1941
|
-
pageHeadingId:
|
|
1942
|
-
url:
|
|
1943
|
-
openInNewTab:
|
|
1980
|
+
documentationItemId: z41.string().optional(),
|
|
1981
|
+
pageHeadingId: z41.string().optional(),
|
|
1982
|
+
url: z41.string().optional(),
|
|
1983
|
+
openInNewTab: z41.boolean().optional()
|
|
1944
1984
|
});
|
|
1945
|
-
var PageBlockItemV2 =
|
|
1946
|
-
id:
|
|
1985
|
+
var PageBlockItemV2 = z41.object({
|
|
1986
|
+
id: z41.string(),
|
|
1947
1987
|
linksTo: PageBlockLinkV2.optional(),
|
|
1948
|
-
props:
|
|
1988
|
+
props: z41.record(PageBlockItemUntypedValue)
|
|
1949
1989
|
});
|
|
1950
|
-
var PageBlockDataV2 =
|
|
1951
|
-
packageId:
|
|
1952
|
-
variantId:
|
|
1953
|
-
indentLevel:
|
|
1990
|
+
var PageBlockDataV2 = z41.object({
|
|
1991
|
+
packageId: z41.string(),
|
|
1992
|
+
variantId: z41.string().optional(),
|
|
1993
|
+
indentLevel: z41.number(),
|
|
1954
1994
|
appearance: PageBlockAppearanceV2.optional(),
|
|
1955
|
-
items:
|
|
1995
|
+
items: z41.array(PageBlockItemV2)
|
|
1956
1996
|
});
|
|
1957
|
-
var PageBlockItemAssetValue =
|
|
1958
|
-
selectedPropertyIds:
|
|
1959
|
-
showSearch:
|
|
1997
|
+
var PageBlockItemAssetValue = z41.object({
|
|
1998
|
+
selectedPropertyIds: z41.array(z41.string()).optional(),
|
|
1999
|
+
showSearch: z41.boolean().optional(),
|
|
1960
2000
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1961
2001
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1962
|
-
value:
|
|
1963
|
-
|
|
1964
|
-
entityId:
|
|
1965
|
-
entityType:
|
|
2002
|
+
value: z41.array(
|
|
2003
|
+
z41.object({
|
|
2004
|
+
entityId: z41.string(),
|
|
2005
|
+
entityType: z41.enum(["Asset", "AssetGroup"]),
|
|
1966
2006
|
entityMeta: PageBlockAssetEntityMeta.optional()
|
|
1967
2007
|
})
|
|
1968
2008
|
).default([])
|
|
1969
2009
|
});
|
|
1970
|
-
var PageBlockItemAssetPropertyValue =
|
|
1971
|
-
value:
|
|
2010
|
+
var PageBlockItemAssetPropertyValue = z41.object({
|
|
2011
|
+
value: z41.array(z41.string()).default([])
|
|
1972
2012
|
});
|
|
1973
|
-
var PageBlockItemFigmaComponentValue =
|
|
1974
|
-
showComponentName:
|
|
1975
|
-
showComponentDescription:
|
|
1976
|
-
showPropertyList:
|
|
2013
|
+
var PageBlockItemFigmaComponentValue = z41.object({
|
|
2014
|
+
showComponentName: z41.boolean().optional(),
|
|
2015
|
+
showComponentDescription: z41.boolean().optional(),
|
|
2016
|
+
showPropertyList: z41.boolean().optional(),
|
|
1977
2017
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1978
2018
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1979
|
-
value:
|
|
1980
|
-
|
|
1981
|
-
entityId:
|
|
1982
|
-
entityType:
|
|
2019
|
+
value: z41.array(
|
|
2020
|
+
z41.object({
|
|
2021
|
+
entityId: z41.string(),
|
|
2022
|
+
entityType: z41.enum(["FigmaComponent"]),
|
|
1983
2023
|
entityMeta: PageBlockFigmaComponentEntityMeta.optional()
|
|
1984
2024
|
})
|
|
1985
2025
|
).default([])
|
|
1986
2026
|
});
|
|
1987
|
-
var PageBlockItemBooleanValue =
|
|
1988
|
-
value:
|
|
2027
|
+
var PageBlockItemBooleanValue = z41.object({
|
|
2028
|
+
value: z41.boolean()
|
|
1989
2029
|
});
|
|
1990
|
-
var PageBlockItemCodeValue =
|
|
2030
|
+
var PageBlockItemCodeValue = z41.object({
|
|
1991
2031
|
format: PageBlockCodeLanguage.optional(),
|
|
1992
|
-
caption:
|
|
1993
|
-
value:
|
|
1994
|
-
});
|
|
1995
|
-
var PageBlockItemSandboxValue =
|
|
1996
|
-
showCode:
|
|
1997
|
-
showControls:
|
|
1998
|
-
backgroundColor:
|
|
1999
|
-
alignPreview:
|
|
2000
|
-
previewHeight:
|
|
2001
|
-
value:
|
|
2002
|
-
});
|
|
2003
|
-
var PageBlockItemColorValue =
|
|
2004
|
-
var PageBlockItemComponentValue =
|
|
2005
|
-
selectedPropertyIds:
|
|
2006
|
-
selectedBrandId:
|
|
2007
|
-
value:
|
|
2008
|
-
|
|
2009
|
-
entityId:
|
|
2010
|
-
entityType:
|
|
2032
|
+
caption: z41.string().optional(),
|
|
2033
|
+
value: z41.string()
|
|
2034
|
+
});
|
|
2035
|
+
var PageBlockItemSandboxValue = z41.object({
|
|
2036
|
+
showCode: z41.boolean().optional(),
|
|
2037
|
+
showControls: z41.boolean().optional(),
|
|
2038
|
+
backgroundColor: z41.string().optional(),
|
|
2039
|
+
alignPreview: z41.enum(["Left", "Center"]).optional(),
|
|
2040
|
+
previewHeight: z41.number().optional(),
|
|
2041
|
+
value: z41.string()
|
|
2042
|
+
});
|
|
2043
|
+
var PageBlockItemColorValue = z41.record(z41.any());
|
|
2044
|
+
var PageBlockItemComponentValue = z41.object({
|
|
2045
|
+
selectedPropertyIds: z41.array(z41.string()).optional(),
|
|
2046
|
+
selectedBrandId: z41.string().optional(),
|
|
2047
|
+
value: z41.array(
|
|
2048
|
+
z41.object({
|
|
2049
|
+
entityId: z41.string(),
|
|
2050
|
+
entityType: z41.enum(["Component", "ComponentGroup"])
|
|
2011
2051
|
})
|
|
2012
2052
|
).default([])
|
|
2013
2053
|
});
|
|
2014
|
-
var PageBlockItemComponentPropertyValue =
|
|
2015
|
-
value:
|
|
2016
|
-
});
|
|
2017
|
-
var PageBlockItemDividerValue =
|
|
2018
|
-
var PageBlockItemEmbedValue =
|
|
2019
|
-
value:
|
|
2020
|
-
caption:
|
|
2021
|
-
height:
|
|
2022
|
-
openGraph:
|
|
2023
|
-
title:
|
|
2024
|
-
description:
|
|
2025
|
-
imageUrl:
|
|
2054
|
+
var PageBlockItemComponentPropertyValue = z41.object({
|
|
2055
|
+
value: z41.string()
|
|
2056
|
+
});
|
|
2057
|
+
var PageBlockItemDividerValue = z41.object({});
|
|
2058
|
+
var PageBlockItemEmbedValue = z41.object({
|
|
2059
|
+
value: z41.string().optional(),
|
|
2060
|
+
caption: z41.string().optional(),
|
|
2061
|
+
height: z41.number().optional(),
|
|
2062
|
+
openGraph: z41.object({
|
|
2063
|
+
title: z41.string().optional(),
|
|
2064
|
+
description: z41.string().optional(),
|
|
2065
|
+
imageUrl: z41.string().optional()
|
|
2026
2066
|
}).optional()
|
|
2027
2067
|
});
|
|
2028
|
-
var PageBlockItemFigmaNodeValue =
|
|
2029
|
-
showSearch:
|
|
2068
|
+
var PageBlockItemFigmaNodeValue = z41.object({
|
|
2069
|
+
showSearch: z41.boolean().optional(),
|
|
2030
2070
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
2031
2071
|
backgroundColor: PageBlockColorV2.optional(),
|
|
2032
|
-
showFrameDetails:
|
|
2033
|
-
value:
|
|
2034
|
-
|
|
2035
|
-
entityId:
|
|
2072
|
+
showFrameDetails: z41.boolean().optional(),
|
|
2073
|
+
value: z41.array(
|
|
2074
|
+
z41.object({
|
|
2075
|
+
entityId: z41.string(),
|
|
2036
2076
|
entityMeta: PageBlockFigmaNodeEntityMeta.optional()
|
|
2037
2077
|
})
|
|
2038
2078
|
).default([])
|
|
2039
2079
|
});
|
|
2040
|
-
var PageBlockItemImageValue =
|
|
2041
|
-
alt:
|
|
2042
|
-
caption:
|
|
2080
|
+
var PageBlockItemImageValue = z41.object({
|
|
2081
|
+
alt: z41.string().optional(),
|
|
2082
|
+
caption: z41.string().optional(),
|
|
2043
2083
|
alignment: PageBlockImageAlignment.optional(),
|
|
2044
2084
|
value: PageBlockImageReference.optional()
|
|
2045
2085
|
});
|
|
2046
|
-
var PageBlockItemMarkdownValue =
|
|
2047
|
-
value:
|
|
2086
|
+
var PageBlockItemMarkdownValue = z41.object({
|
|
2087
|
+
value: z41.string()
|
|
2048
2088
|
});
|
|
2049
|
-
var PageBlockItemMultiRichTextValue =
|
|
2089
|
+
var PageBlockItemMultiRichTextValue = z41.object({
|
|
2050
2090
|
value: PageBlockText.array()
|
|
2051
2091
|
});
|
|
2052
|
-
var PageBlockItemMultiSelectValue =
|
|
2053
|
-
value:
|
|
2092
|
+
var PageBlockItemMultiSelectValue = z41.object({
|
|
2093
|
+
value: z41.array(z41.string()).default([])
|
|
2054
2094
|
});
|
|
2055
|
-
var PageBlockItemNumberValue =
|
|
2056
|
-
value:
|
|
2095
|
+
var PageBlockItemNumberValue = z41.object({
|
|
2096
|
+
value: z41.number()
|
|
2057
2097
|
});
|
|
2058
|
-
var PageBlockItemRichTextValue =
|
|
2098
|
+
var PageBlockItemRichTextValue = z41.object({
|
|
2059
2099
|
value: PageBlockText,
|
|
2060
2100
|
calloutType: PageBlockCalloutType.optional()
|
|
2061
2101
|
});
|
|
2062
|
-
var PageBlockItemRichTextEditorValue =
|
|
2063
|
-
value:
|
|
2102
|
+
var PageBlockItemRichTextEditorValue = z41.object({
|
|
2103
|
+
value: z41.any()
|
|
2064
2104
|
});
|
|
2065
|
-
var PageBlockItemSingleSelectValue =
|
|
2066
|
-
value:
|
|
2105
|
+
var PageBlockItemSingleSelectValue = z41.object({
|
|
2106
|
+
value: z41.string()
|
|
2067
2107
|
});
|
|
2068
|
-
var PageBlockItemStorybookValue =
|
|
2069
|
-
caption:
|
|
2070
|
-
height:
|
|
2071
|
-
embedUrl:
|
|
2072
|
-
value:
|
|
2108
|
+
var PageBlockItemStorybookValue = z41.object({
|
|
2109
|
+
caption: z41.string().optional(),
|
|
2110
|
+
height: z41.number().optional(),
|
|
2111
|
+
embedUrl: z41.string().optional(),
|
|
2112
|
+
value: z41.string().optional()
|
|
2073
2113
|
});
|
|
2074
|
-
var PageBlockItemTextValue =
|
|
2075
|
-
value:
|
|
2114
|
+
var PageBlockItemTextValue = z41.object({
|
|
2115
|
+
value: z41.string()
|
|
2076
2116
|
});
|
|
2077
|
-
var PageBlockItemTokenValue =
|
|
2078
|
-
selectedPropertyIds:
|
|
2079
|
-
selectedThemeIds:
|
|
2117
|
+
var PageBlockItemTokenValue = z41.object({
|
|
2118
|
+
selectedPropertyIds: z41.array(z41.string()).optional(),
|
|
2119
|
+
selectedThemeIds: z41.array(z41.string()).optional(),
|
|
2080
2120
|
themeDisplayMode: PageBlockThemeDisplayMode.optional(),
|
|
2081
|
-
value:
|
|
2082
|
-
|
|
2083
|
-
entityId:
|
|
2084
|
-
entityType:
|
|
2085
|
-
entityMeta:
|
|
2086
|
-
showNestedGroups:
|
|
2121
|
+
value: z41.array(
|
|
2122
|
+
z41.object({
|
|
2123
|
+
entityId: z41.string(),
|
|
2124
|
+
entityType: z41.enum(["Token", "TokenGroup"]),
|
|
2125
|
+
entityMeta: z41.object({
|
|
2126
|
+
showNestedGroups: z41.boolean().optional()
|
|
2087
2127
|
}).optional()
|
|
2088
2128
|
})
|
|
2089
2129
|
).default([])
|
|
2090
2130
|
});
|
|
2091
|
-
var PageBlockItemTokenPropertyValue =
|
|
2092
|
-
selectedPropertyIds:
|
|
2093
|
-
selectedThemeIds:
|
|
2094
|
-
value:
|
|
2131
|
+
var PageBlockItemTokenPropertyValue = z41.object({
|
|
2132
|
+
selectedPropertyIds: z41.array(z41.string()).optional(),
|
|
2133
|
+
selectedThemeIds: z41.array(z41.string()).optional(),
|
|
2134
|
+
value: z41.array(z41.string()).default([])
|
|
2095
2135
|
});
|
|
2096
|
-
var PageBlockItemTokenTypeValue =
|
|
2097
|
-
value:
|
|
2136
|
+
var PageBlockItemTokenTypeValue = z41.object({
|
|
2137
|
+
value: z41.array(DesignTokenType).default([])
|
|
2098
2138
|
});
|
|
2099
|
-
var PageBlockItemUrlValue =
|
|
2100
|
-
value:
|
|
2139
|
+
var PageBlockItemUrlValue = z41.object({
|
|
2140
|
+
value: z41.string()
|
|
2101
2141
|
});
|
|
2102
|
-
var PageBlockItemTableRichTextNode =
|
|
2103
|
-
type:
|
|
2104
|
-
id:
|
|
2142
|
+
var PageBlockItemTableRichTextNode = z41.object({
|
|
2143
|
+
type: z41.literal("RichText"),
|
|
2144
|
+
id: z41.string(),
|
|
2105
2145
|
value: PageBlockItemRichTextValue.shape.value
|
|
2106
2146
|
});
|
|
2107
|
-
var PageBlockItemTableMultiRichTextNode =
|
|
2108
|
-
type:
|
|
2147
|
+
var PageBlockItemTableMultiRichTextNode = z41.object({
|
|
2148
|
+
type: z41.literal("MultiRichText"),
|
|
2109
2149
|
value: PageBlockItemMultiRichTextValue.shape.value
|
|
2110
2150
|
});
|
|
2111
|
-
var PageBlockItemTableImageNode =
|
|
2112
|
-
type:
|
|
2113
|
-
id:
|
|
2151
|
+
var PageBlockItemTableImageNode = z41.object({
|
|
2152
|
+
type: z41.literal("Image"),
|
|
2153
|
+
id: z41.string(),
|
|
2114
2154
|
caption: PageBlockItemImageValue.shape.caption,
|
|
2115
2155
|
value: PageBlockItemImageValue.shape.value
|
|
2116
2156
|
});
|
|
2117
|
-
var PageBlockItemTableNode =
|
|
2157
|
+
var PageBlockItemTableNode = z41.discriminatedUnion("type", [
|
|
2118
2158
|
PageBlockItemTableRichTextNode,
|
|
2119
2159
|
// PageBlockItemTableMultiRichTextNode,
|
|
2120
2160
|
PageBlockItemTableImageNode
|
|
2121
2161
|
]);
|
|
2122
|
-
var PageBlockItemTableCell =
|
|
2123
|
-
id:
|
|
2124
|
-
nodes:
|
|
2125
|
-
columnWidth:
|
|
2162
|
+
var PageBlockItemTableCell = z41.object({
|
|
2163
|
+
id: z41.string(),
|
|
2164
|
+
nodes: z41.array(PageBlockItemTableNode),
|
|
2165
|
+
columnWidth: z41.number().optional(),
|
|
2126
2166
|
alignment: PageBlockTableCellAlignment
|
|
2127
2167
|
});
|
|
2128
|
-
var PageBlockItemTableRow =
|
|
2129
|
-
cells:
|
|
2168
|
+
var PageBlockItemTableRow = z41.object({
|
|
2169
|
+
cells: z41.array(PageBlockItemTableCell)
|
|
2130
2170
|
});
|
|
2131
|
-
var PageBlockItemTableValue =
|
|
2132
|
-
highlightHeaderColumn:
|
|
2133
|
-
highlightHeaderRow:
|
|
2134
|
-
showBorder:
|
|
2135
|
-
value:
|
|
2171
|
+
var PageBlockItemTableValue = z41.object({
|
|
2172
|
+
highlightHeaderColumn: z41.boolean().optional(),
|
|
2173
|
+
highlightHeaderRow: z41.boolean().optional(),
|
|
2174
|
+
showBorder: z41.boolean().optional(),
|
|
2175
|
+
value: z41.array(PageBlockItemTableRow).default([])
|
|
2136
2176
|
});
|
|
2137
|
-
var DocumentationItemHeaderAlignmentSchema =
|
|
2138
|
-
var DocumentationItemHeaderImageScaleTypeSchema =
|
|
2177
|
+
var DocumentationItemHeaderAlignmentSchema = z42.enum(["Left", "Center"]);
|
|
2178
|
+
var DocumentationItemHeaderImageScaleTypeSchema = z42.enum(["AspectFill", "AspectFit"]);
|
|
2139
2179
|
var DocumentationItemHeaderAlignment = DocumentationItemHeaderAlignmentSchema.enum;
|
|
2140
2180
|
var DocumentationItemHeaderImageScaleType = DocumentationItemHeaderImageScaleTypeSchema.enum;
|
|
2141
|
-
var DocumentationItemHeaderV1 =
|
|
2142
|
-
description:
|
|
2181
|
+
var DocumentationItemHeaderV1 = z43.object({
|
|
2182
|
+
description: z43.string(),
|
|
2143
2183
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
2144
2184
|
foregroundColor: ColorTokenData.nullish(),
|
|
2145
2185
|
backgroundColor: ColorTokenData.nullish(),
|
|
2146
2186
|
backgroundImageAsset: PageBlockAsset.nullish(),
|
|
2147
2187
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
2148
|
-
showBackgroundOverlay:
|
|
2149
|
-
showCoverText:
|
|
2150
|
-
minHeight:
|
|
2188
|
+
showBackgroundOverlay: z43.boolean(),
|
|
2189
|
+
showCoverText: z43.boolean(),
|
|
2190
|
+
minHeight: z43.number().nullish()
|
|
2151
2191
|
});
|
|
2152
2192
|
var defaultDocumentationItemHeaderV1 = {
|
|
2153
2193
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -2156,26 +2196,26 @@ var defaultDocumentationItemHeaderV1 = {
|
|
|
2156
2196
|
showBackgroundOverlay: false,
|
|
2157
2197
|
showCoverText: true
|
|
2158
2198
|
};
|
|
2159
|
-
var DocumentationItemConfigurationV1 =
|
|
2160
|
-
showSidebar:
|
|
2161
|
-
isPrivate:
|
|
2162
|
-
isHidden:
|
|
2199
|
+
var DocumentationItemConfigurationV1 = z44.object({
|
|
2200
|
+
showSidebar: z44.boolean(),
|
|
2201
|
+
isPrivate: z44.boolean().optional(),
|
|
2202
|
+
isHidden: z44.boolean().optional(),
|
|
2163
2203
|
header: DocumentationItemHeaderV1
|
|
2164
2204
|
});
|
|
2165
|
-
var DocumentationPageDataV1 =
|
|
2166
|
-
blocks:
|
|
2205
|
+
var DocumentationPageDataV1 = z45.object({
|
|
2206
|
+
blocks: z45.array(PageBlockV1),
|
|
2167
2207
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
2168
2208
|
});
|
|
2169
|
-
var DocumentationItemHeaderV2 =
|
|
2170
|
-
description:
|
|
2209
|
+
var DocumentationItemHeaderV2 = z46.object({
|
|
2210
|
+
description: z46.string(),
|
|
2171
2211
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
2172
2212
|
foregroundColor: PageBlockColorV2.nullish(),
|
|
2173
2213
|
backgroundColor: PageBlockColorV2.nullish(),
|
|
2174
2214
|
backgroundImageAsset: PageBlockImageReference.nullish(),
|
|
2175
2215
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
2176
|
-
showBackgroundOverlay:
|
|
2177
|
-
showCoverText:
|
|
2178
|
-
minHeight:
|
|
2216
|
+
showBackgroundOverlay: z46.boolean(),
|
|
2217
|
+
showCoverText: z46.boolean(),
|
|
2218
|
+
minHeight: z46.number().nullish()
|
|
2179
2219
|
});
|
|
2180
2220
|
var defaultDocumentationItemHeaderV2 = {
|
|
2181
2221
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -2184,10 +2224,10 @@ var defaultDocumentationItemHeaderV2 = {
|
|
|
2184
2224
|
showBackgroundOverlay: false,
|
|
2185
2225
|
showCoverText: true
|
|
2186
2226
|
};
|
|
2187
|
-
var DocumentationItemConfigurationV2 =
|
|
2188
|
-
showSidebar:
|
|
2189
|
-
isPrivate:
|
|
2190
|
-
isHidden:
|
|
2227
|
+
var DocumentationItemConfigurationV2 = z47.object({
|
|
2228
|
+
showSidebar: z47.boolean(),
|
|
2229
|
+
isPrivate: z47.boolean().optional(),
|
|
2230
|
+
isHidden: z47.boolean().optional(),
|
|
2191
2231
|
header: DocumentationItemHeaderV2
|
|
2192
2232
|
});
|
|
2193
2233
|
var defaultDocumentationItemConfigurationV2 = {
|
|
@@ -2196,188 +2236,188 @@ var defaultDocumentationItemConfigurationV2 = {
|
|
|
2196
2236
|
isPrivate: false,
|
|
2197
2237
|
showSidebar: true
|
|
2198
2238
|
};
|
|
2199
|
-
var DocumentationPageDataV2 =
|
|
2239
|
+
var DocumentationPageDataV2 = z48.object({
|
|
2200
2240
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
2201
2241
|
});
|
|
2202
|
-
var DesignElementOrigin =
|
|
2203
|
-
id:
|
|
2204
|
-
sourceId:
|
|
2205
|
-
name:
|
|
2242
|
+
var DesignElementOrigin = z49.object({
|
|
2243
|
+
id: z49.string(),
|
|
2244
|
+
sourceId: z49.string(),
|
|
2245
|
+
name: z49.string()
|
|
2206
2246
|
});
|
|
2207
|
-
var DesignElementBase =
|
|
2208
|
-
id:
|
|
2209
|
-
persistentId:
|
|
2247
|
+
var DesignElementBase = z49.object({
|
|
2248
|
+
id: z49.string(),
|
|
2249
|
+
persistentId: z49.string(),
|
|
2210
2250
|
meta: ObjectMeta,
|
|
2211
|
-
designSystemVersionId:
|
|
2212
|
-
createdAt:
|
|
2213
|
-
updatedAt:
|
|
2251
|
+
designSystemVersionId: z49.string(),
|
|
2252
|
+
createdAt: z49.coerce.date(),
|
|
2253
|
+
updatedAt: z49.coerce.date()
|
|
2214
2254
|
});
|
|
2215
2255
|
var DesignElementImportedBase = DesignElementBase.extend({
|
|
2216
2256
|
origin: DesignElementOrigin
|
|
2217
2257
|
});
|
|
2218
|
-
var DesignElementGroupablePart =
|
|
2219
|
-
parentPersistentId:
|
|
2220
|
-
sortOrder:
|
|
2258
|
+
var DesignElementGroupablePart = z49.object({
|
|
2259
|
+
parentPersistentId: z49.string().optional(),
|
|
2260
|
+
sortOrder: z49.number()
|
|
2221
2261
|
});
|
|
2222
2262
|
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
2223
2263
|
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
2224
|
-
parentPersistentId:
|
|
2264
|
+
parentPersistentId: z49.string()
|
|
2225
2265
|
});
|
|
2226
|
-
var DesignElementBrandedPart =
|
|
2227
|
-
brandPersistentId:
|
|
2266
|
+
var DesignElementBrandedPart = z49.object({
|
|
2267
|
+
brandPersistentId: z49.string()
|
|
2228
2268
|
});
|
|
2229
|
-
var DesignElementSlugPart =
|
|
2230
|
-
slug:
|
|
2231
|
-
userSlug:
|
|
2269
|
+
var DesignElementSlugPart = z49.object({
|
|
2270
|
+
slug: z49.string().optional(),
|
|
2271
|
+
userSlug: z49.string().optional()
|
|
2232
2272
|
});
|
|
2233
2273
|
var PageBlockV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend({
|
|
2234
2274
|
data: PageBlockDataV2
|
|
2235
2275
|
});
|
|
2236
|
-
var PageBlockEditorModelV2 =
|
|
2237
|
-
id: z49.string(),
|
|
2238
|
-
type: z49.literal("Block"),
|
|
2239
|
-
data: PageBlockDataV2
|
|
2240
|
-
});
|
|
2241
|
-
var PageSectionTypeV2 = z50.enum(["Tabs"]);
|
|
2242
|
-
var PageSectionColumnV2 = z50.object({
|
|
2276
|
+
var PageBlockEditorModelV2 = z50.object({
|
|
2243
2277
|
id: z50.string(),
|
|
2244
|
-
|
|
2278
|
+
type: z50.literal("Block"),
|
|
2279
|
+
data: PageBlockDataV2
|
|
2245
2280
|
});
|
|
2246
|
-
var
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
});
|
|
2251
|
-
var
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2281
|
+
var PageSectionTypeV2 = z51.enum(["Tabs"]);
|
|
2282
|
+
var PageSectionColumnV2 = z51.object({
|
|
2283
|
+
id: z51.string(),
|
|
2284
|
+
blocks: z51.array(PageBlockEditorModelV2)
|
|
2285
|
+
});
|
|
2286
|
+
var PageSectionItemV2 = z51.object({
|
|
2287
|
+
id: z51.string(),
|
|
2288
|
+
title: z51.string(),
|
|
2289
|
+
columns: z51.array(PageSectionColumnV2)
|
|
2290
|
+
});
|
|
2291
|
+
var PageSectionPaddingV2 = z51.object({
|
|
2292
|
+
top: z51.number().optional(),
|
|
2293
|
+
bottom: z51.number().optional(),
|
|
2294
|
+
left: z51.number().optional(),
|
|
2295
|
+
right: z51.number().optional()
|
|
2296
|
+
});
|
|
2297
|
+
var PageSectionAppearanceV2 = z51.object({
|
|
2298
|
+
expandToEdges: z51.boolean(),
|
|
2299
|
+
contentExpandToEdges: z51.boolean(),
|
|
2260
2300
|
backgroundColor: PageBlockColorV2.optional(),
|
|
2261
2301
|
foregroundColor: PageBlockColorV2.optional(),
|
|
2262
2302
|
padding: PageSectionPaddingV2.optional()
|
|
2263
2303
|
});
|
|
2264
|
-
var PageSectionEditorModelV2 =
|
|
2265
|
-
id:
|
|
2266
|
-
type:
|
|
2267
|
-
variantId:
|
|
2304
|
+
var PageSectionEditorModelV2 = z51.object({
|
|
2305
|
+
id: z51.string(),
|
|
2306
|
+
type: z51.literal("Section"),
|
|
2307
|
+
variantId: z51.string().optional(),
|
|
2268
2308
|
sectionType: PageSectionTypeV2,
|
|
2269
2309
|
appearance: PageSectionAppearanceV2,
|
|
2270
|
-
items:
|
|
2310
|
+
items: z51.array(PageSectionItemV2)
|
|
2271
2311
|
});
|
|
2272
|
-
var DurationUnit =
|
|
2273
|
-
var DurationValue =
|
|
2312
|
+
var DurationUnit = z52.enum(["Ms"]);
|
|
2313
|
+
var DurationValue = z52.object({
|
|
2274
2314
|
unit: DurationUnit,
|
|
2275
|
-
measure:
|
|
2315
|
+
measure: z52.number()
|
|
2276
2316
|
});
|
|
2277
2317
|
var DurationTokenData = tokenAliasOrValue(DurationValue);
|
|
2278
|
-
var FigmaFileStructureNodeType =
|
|
2279
|
-
var FigmaFileStructureNodeBase =
|
|
2280
|
-
id:
|
|
2281
|
-
name:
|
|
2318
|
+
var FigmaFileStructureNodeType = z53.enum(["DOCUMENT", "CANVAS", "FRAME", "COMPONENT", "COMPONENT_SET"]);
|
|
2319
|
+
var FigmaFileStructureNodeBase = z53.object({
|
|
2320
|
+
id: z53.string(),
|
|
2321
|
+
name: z53.string(),
|
|
2282
2322
|
type: FigmaFileStructureNodeType,
|
|
2283
2323
|
size: SizeOrUndefined,
|
|
2284
|
-
parentComponentSetId:
|
|
2324
|
+
parentComponentSetId: z53.string().optional()
|
|
2285
2325
|
});
|
|
2286
2326
|
var FigmaFileStructureNode = FigmaFileStructureNodeBase.extend({
|
|
2287
|
-
children:
|
|
2327
|
+
children: z53.lazy(() => FigmaFileStructureNode.array())
|
|
2288
2328
|
});
|
|
2289
|
-
var FigmaFileStructureStatistics =
|
|
2290
|
-
frames:
|
|
2291
|
-
components:
|
|
2292
|
-
componentSets:
|
|
2329
|
+
var FigmaFileStructureStatistics = z53.object({
|
|
2330
|
+
frames: z53.number().nullable().optional().transform((v) => v ?? 0),
|
|
2331
|
+
components: z53.number().nullable().optional().transform((v) => v ?? 0),
|
|
2332
|
+
componentSets: z53.number().nullable().optional().transform((v) => v ?? 0)
|
|
2293
2333
|
});
|
|
2294
|
-
var FigmaFileStructureElementData =
|
|
2295
|
-
value:
|
|
2334
|
+
var FigmaFileStructureElementData = z53.object({
|
|
2335
|
+
value: z53.object({
|
|
2296
2336
|
structure: FigmaFileStructureNode,
|
|
2297
2337
|
assetsInFile: FigmaFileStructureStatistics
|
|
2298
2338
|
})
|
|
2299
2339
|
});
|
|
2300
|
-
var FigmaNodeRenderFormat =
|
|
2301
|
-
var FigmaNodeReferenceData =
|
|
2302
|
-
structureElementId:
|
|
2303
|
-
nodeId:
|
|
2304
|
-
fileId:
|
|
2305
|
-
valid:
|
|
2340
|
+
var FigmaNodeRenderFormat = z54.enum(["Png", "Svg"]);
|
|
2341
|
+
var FigmaNodeReferenceData = z54.object({
|
|
2342
|
+
structureElementId: z54.string(),
|
|
2343
|
+
nodeId: z54.string(),
|
|
2344
|
+
fileId: z54.string().optional(),
|
|
2345
|
+
valid: z54.boolean(),
|
|
2306
2346
|
format: FigmaNodeRenderFormat.default("Png"),
|
|
2307
2347
|
// Asset data
|
|
2308
|
-
assetId:
|
|
2309
|
-
assetScale:
|
|
2310
|
-
assetWidth:
|
|
2311
|
-
assetHeight:
|
|
2312
|
-
assetUrl:
|
|
2313
|
-
assetOriginKey:
|
|
2314
|
-
});
|
|
2315
|
-
var FigmaNodeReferenceElementData =
|
|
2348
|
+
assetId: z54.string().optional(),
|
|
2349
|
+
assetScale: z54.number().optional(),
|
|
2350
|
+
assetWidth: z54.number().optional(),
|
|
2351
|
+
assetHeight: z54.number().optional(),
|
|
2352
|
+
assetUrl: z54.string().optional(),
|
|
2353
|
+
assetOriginKey: z54.string().optional()
|
|
2354
|
+
});
|
|
2355
|
+
var FigmaNodeReferenceElementData = z54.object({
|
|
2316
2356
|
value: FigmaNodeReferenceData
|
|
2317
2357
|
});
|
|
2318
|
-
var FontFamilyValue =
|
|
2358
|
+
var FontFamilyValue = z55.string();
|
|
2319
2359
|
var FontFamilyTokenData = tokenAliasOrValue(FontFamilyValue);
|
|
2320
|
-
var FontSizeUnit =
|
|
2321
|
-
var FontSizeValue =
|
|
2360
|
+
var FontSizeUnit = z56.enum(["Pixels", "Rem", "Percent"]);
|
|
2361
|
+
var FontSizeValue = z56.object({
|
|
2322
2362
|
unit: FontSizeUnit,
|
|
2323
|
-
measure:
|
|
2363
|
+
measure: z56.number()
|
|
2324
2364
|
});
|
|
2325
2365
|
var FontSizeTokenData = tokenAliasOrValue(FontSizeValue);
|
|
2326
|
-
var FontWeightValue =
|
|
2366
|
+
var FontWeightValue = z57.string();
|
|
2327
2367
|
var FontWeightTokenData = tokenAliasOrValue(FontWeightValue);
|
|
2328
|
-
var GradientType =
|
|
2329
|
-
var GradientStop =
|
|
2330
|
-
position:
|
|
2368
|
+
var GradientType = z58.enum(["Linear", "Radial", "Angular"]);
|
|
2369
|
+
var GradientStop = z58.object({
|
|
2370
|
+
position: z58.number(),
|
|
2331
2371
|
color: ColorTokenData
|
|
2332
2372
|
});
|
|
2333
|
-
var GradientLayerValue =
|
|
2373
|
+
var GradientLayerValue = z58.object({
|
|
2334
2374
|
from: Point2D,
|
|
2335
2375
|
to: Point2D,
|
|
2336
2376
|
type: GradientType,
|
|
2337
|
-
aspectRatio: nullishToOptional(
|
|
2377
|
+
aspectRatio: nullishToOptional(z58.number()),
|
|
2338
2378
|
// z.number(),
|
|
2339
|
-
stops:
|
|
2379
|
+
stops: z58.array(GradientStop).min(2)
|
|
2340
2380
|
});
|
|
2341
2381
|
var GradientLayerData = tokenAliasOrValue(GradientLayerValue);
|
|
2342
|
-
var GradientTokenValue =
|
|
2382
|
+
var GradientTokenValue = z58.array(GradientLayerData);
|
|
2343
2383
|
var GradientTokenData = tokenAliasOrValue(GradientTokenValue);
|
|
2344
|
-
var DocumentationGroupBehavior =
|
|
2345
|
-
var ElementGroupDataV1 =
|
|
2384
|
+
var DocumentationGroupBehavior = z59.enum(["Group", "Tabs"]);
|
|
2385
|
+
var ElementGroupDataV1 = z59.object({
|
|
2346
2386
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
2347
2387
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
2348
2388
|
});
|
|
2349
|
-
var ElementGroupDataV2 =
|
|
2389
|
+
var ElementGroupDataV2 = z59.object({
|
|
2350
2390
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
2351
2391
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
2352
2392
|
});
|
|
2353
|
-
var LetterSpacingUnit =
|
|
2354
|
-
var LetterSpacingValue =
|
|
2393
|
+
var LetterSpacingUnit = z60.enum(["Pixels", "Rem", "Percent"]);
|
|
2394
|
+
var LetterSpacingValue = z60.object({
|
|
2355
2395
|
unit: LetterSpacingUnit,
|
|
2356
|
-
measure:
|
|
2396
|
+
measure: z60.number()
|
|
2357
2397
|
});
|
|
2358
2398
|
var LetterSpacingTokenData = tokenAliasOrValue(LetterSpacingValue);
|
|
2359
|
-
var LineHeightUnit =
|
|
2360
|
-
var LineHeightValue =
|
|
2399
|
+
var LineHeightUnit = z61.enum(["Pixels", "Rem", "Percent", "Raw"]);
|
|
2400
|
+
var LineHeightValue = z61.object({
|
|
2361
2401
|
unit: LineHeightUnit,
|
|
2362
|
-
measure:
|
|
2402
|
+
measure: z61.number()
|
|
2363
2403
|
});
|
|
2364
2404
|
var LineHeightTokenData = tokenAliasOrValue(LineHeightValue);
|
|
2365
|
-
var ParagraphIndentUnit =
|
|
2366
|
-
var ParagraphIndentValue =
|
|
2405
|
+
var ParagraphIndentUnit = z62.enum(["Pixels", "Rem", "Percent"]);
|
|
2406
|
+
var ParagraphIndentValue = z62.object({
|
|
2367
2407
|
unit: ParagraphIndentUnit,
|
|
2368
|
-
measure:
|
|
2408
|
+
measure: z62.number()
|
|
2369
2409
|
});
|
|
2370
2410
|
var ParagraphIndentTokenData = tokenAliasOrValue(ParagraphIndentValue);
|
|
2371
|
-
var ParagraphSpacingUnit =
|
|
2372
|
-
var ParagraphSpacingValue =
|
|
2411
|
+
var ParagraphSpacingUnit = z63.enum(["Pixels", "Rem", "Percent"]);
|
|
2412
|
+
var ParagraphSpacingValue = z63.object({
|
|
2373
2413
|
unit: ParagraphSpacingUnit,
|
|
2374
|
-
measure:
|
|
2414
|
+
measure: z63.number()
|
|
2375
2415
|
});
|
|
2376
2416
|
var ParagraphSpacingTokenData = tokenAliasOrValue(ParagraphSpacingValue);
|
|
2377
|
-
var ProductCopyValue =
|
|
2417
|
+
var ProductCopyValue = z64.string();
|
|
2378
2418
|
var ProductCopyTokenData = tokenAliasOrValue(ProductCopyValue);
|
|
2379
2419
|
var RESERVED_OBJECT_ID_PREFIX = "x-sn-reserved-";
|
|
2380
|
-
var SafeIdSchema =
|
|
2420
|
+
var SafeIdSchema = z65.string().refine(
|
|
2381
2421
|
(value) => {
|
|
2382
2422
|
return !value.startsWith(RESERVED_OBJECT_ID_PREFIX);
|
|
2383
2423
|
},
|
|
@@ -2385,39 +2425,39 @@ var SafeIdSchema = z64.string().refine(
|
|
|
2385
2425
|
message: `ID value can't start with ${RESERVED_OBJECT_ID_PREFIX}`
|
|
2386
2426
|
}
|
|
2387
2427
|
);
|
|
2388
|
-
var ShadowType =
|
|
2389
|
-
var ShadowLayerValue =
|
|
2428
|
+
var ShadowType = z66.enum(["Drop", "Inner"]);
|
|
2429
|
+
var ShadowLayerValue = z66.object({
|
|
2390
2430
|
color: ColorTokenData,
|
|
2391
|
-
x:
|
|
2392
|
-
y:
|
|
2393
|
-
radius:
|
|
2394
|
-
spread:
|
|
2431
|
+
x: z66.number(),
|
|
2432
|
+
y: z66.number(),
|
|
2433
|
+
radius: z66.number(),
|
|
2434
|
+
spread: z66.number(),
|
|
2395
2435
|
opacity: OpacityTokenData.optional(),
|
|
2396
2436
|
type: ShadowType
|
|
2397
2437
|
});
|
|
2398
2438
|
var ShadowTokenDataBase = tokenAliasOrValue(ShadowLayerValue);
|
|
2399
|
-
var ShadowTokenData = tokenAliasOrValue(
|
|
2400
|
-
var SizeUnit =
|
|
2401
|
-
var SizeValue =
|
|
2439
|
+
var ShadowTokenData = tokenAliasOrValue(z66.array(ShadowTokenDataBase));
|
|
2440
|
+
var SizeUnit = z67.enum(["Pixels", "Rem", "Percent"]);
|
|
2441
|
+
var SizeValue = z67.object({
|
|
2402
2442
|
unit: SizeUnit,
|
|
2403
|
-
measure:
|
|
2443
|
+
measure: z67.number()
|
|
2404
2444
|
});
|
|
2405
2445
|
var SizeTokenData = tokenAliasOrValue(SizeValue);
|
|
2406
|
-
var SpaceUnit =
|
|
2407
|
-
var SpaceValue =
|
|
2446
|
+
var SpaceUnit = z68.enum(["Pixels", "Rem", "Percent"]);
|
|
2447
|
+
var SpaceValue = z68.object({
|
|
2408
2448
|
unit: SpaceUnit,
|
|
2409
|
-
measure:
|
|
2449
|
+
measure: z68.number()
|
|
2410
2450
|
});
|
|
2411
2451
|
var SpaceTokenData = tokenAliasOrValue(SpaceValue);
|
|
2412
|
-
var StringValue =
|
|
2452
|
+
var StringValue = z69.string();
|
|
2413
2453
|
var StringTokenData = tokenAliasOrValue(StringValue);
|
|
2414
|
-
var TextCase =
|
|
2454
|
+
var TextCase = z70.enum(["Original", "Upper", "Lower", "Camel", "SmallCaps"]);
|
|
2415
2455
|
var TextCaseValue = TextCase;
|
|
2416
2456
|
var TextCaseTokenData = tokenAliasOrValue(TextCaseValue);
|
|
2417
|
-
var TextDecoration =
|
|
2457
|
+
var TextDecoration = z71.enum(["None", "Underline", "Strikethrough"]);
|
|
2418
2458
|
var TextDecorationValue = TextDecoration;
|
|
2419
2459
|
var TextDecorationTokenData = tokenAliasOrValue(TextDecorationValue);
|
|
2420
|
-
var TypographyValue =
|
|
2460
|
+
var TypographyValue = z72.object({
|
|
2421
2461
|
fontSize: FontSizeTokenData,
|
|
2422
2462
|
fontFamily: FontFamilyTokenData,
|
|
2423
2463
|
fontWeight: FontWeightTokenData,
|
|
@@ -2429,83 +2469,23 @@ var TypographyValue = z71.object({
|
|
|
2429
2469
|
paragraphSpacing: ParagraphSpacingTokenData.optional()
|
|
2430
2470
|
});
|
|
2431
2471
|
var TypographyTokenData = tokenAliasOrValue(TypographyValue);
|
|
2432
|
-
var Visibility =
|
|
2472
|
+
var Visibility = z73.enum(["Hidden", "Visible"]);
|
|
2433
2473
|
var VisibilityValue = Visibility;
|
|
2434
2474
|
var VisibilityTokenData = tokenAliasOrValue(VisibilityValue);
|
|
2435
|
-
var ZIndexUnit =
|
|
2436
|
-
var ZIndexValue =
|
|
2475
|
+
var ZIndexUnit = z74.enum(["Raw"]);
|
|
2476
|
+
var ZIndexValue = z74.object({
|
|
2437
2477
|
unit: ZIndexUnit,
|
|
2438
|
-
measure:
|
|
2478
|
+
measure: z74.number()
|
|
2439
2479
|
});
|
|
2440
2480
|
var ZIndexTokenData = tokenAliasOrValue(ZIndexValue);
|
|
2441
|
-
var FigmaComponentPropertyType = z74.enum(["Boolean", "InstanceSwap", "Variant", "Text"]);
|
|
2442
|
-
var FigmaComponentBooleanProperty = z74.object({
|
|
2443
|
-
type: z74.literal(FigmaComponentPropertyType.enum.Boolean),
|
|
2444
|
-
value: z74.boolean(),
|
|
2445
|
-
defaultValue: z74.boolean()
|
|
2446
|
-
});
|
|
2447
|
-
var FigmaComponentInstanceSwapProperty = z74.object({
|
|
2448
|
-
type: z74.literal(FigmaComponentPropertyType.enum.InstanceSwap),
|
|
2449
|
-
value: z74.string()
|
|
2450
|
-
// Persistent ID of a Component to swap??
|
|
2451
|
-
});
|
|
2452
|
-
var FigmaComponentVariantProperty = z74.object({
|
|
2453
|
-
type: z74.literal(FigmaComponentPropertyType.enum.Variant),
|
|
2454
|
-
value: z74.string(),
|
|
2455
|
-
options: z74.array(z74.string())
|
|
2456
|
-
});
|
|
2457
|
-
var FigmaComponentTextProperty = z74.object({
|
|
2458
|
-
type: z74.literal(FigmaComponentPropertyType.enum.Text),
|
|
2459
|
-
value: z74.string()
|
|
2460
|
-
});
|
|
2461
|
-
var FigmaComponentProperties = z74.record(
|
|
2462
|
-
z74.string(),
|
|
2463
|
-
z74.discriminatedUnion("type", [
|
|
2464
|
-
FigmaComponentBooleanProperty,
|
|
2465
|
-
FigmaComponentInstanceSwapProperty,
|
|
2466
|
-
FigmaComponentTextProperty
|
|
2467
|
-
])
|
|
2468
|
-
);
|
|
2469
|
-
var FigmaComponentSetProperties = z74.record(
|
|
2470
|
-
z74.string(),
|
|
2471
|
-
z74.discriminatedUnion("type", [
|
|
2472
|
-
FigmaComponentBooleanProperty,
|
|
2473
|
-
FigmaComponentInstanceSwapProperty,
|
|
2474
|
-
FigmaComponentTextProperty,
|
|
2475
|
-
FigmaComponentVariantProperty
|
|
2476
|
-
])
|
|
2477
|
-
);
|
|
2478
|
-
var ComponentOriginPart = z75.object({
|
|
2479
|
-
nodeId: z75.string().optional(),
|
|
2480
|
-
width: z75.number().optional(),
|
|
2481
|
-
height: z75.number().optional()
|
|
2482
|
-
});
|
|
2483
|
-
var ComponentAsset = z75.object({
|
|
2484
|
-
assetId: z75.string(),
|
|
2485
|
-
assetPath: z75.string()
|
|
2486
|
-
});
|
|
2487
|
-
var ComponentOrigin = DesignElementOrigin.extend(ComponentOriginPart.shape);
|
|
2488
|
-
var BaseComponent = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
2489
|
-
origin: ComponentOrigin.optional(),
|
|
2490
|
-
thumbnail: ComponentAsset
|
|
2491
|
-
});
|
|
2492
|
-
var Component = BaseComponent.extend({
|
|
2493
|
-
svg: ComponentAsset.optional(),
|
|
2494
|
-
isAsset: z75.boolean(),
|
|
2495
|
-
componentSetId: z75.string().optional(),
|
|
2496
|
-
properties: FigmaComponentProperties.optional()
|
|
2497
|
-
});
|
|
2498
|
-
var ComponentSet = BaseComponent.extend({
|
|
2499
|
-
properties: FigmaComponentSetProperties
|
|
2500
|
-
});
|
|
2501
2481
|
var ElementGroup = DesignElementBase.extend(DesignElementGroupablePart.shape).extend(DesignElementSlugPart.shape).extend(DesignElementBrandedPart.partial().shape).extend({
|
|
2502
|
-
shortPersistentId:
|
|
2482
|
+
shortPersistentId: z75.string().optional(),
|
|
2503
2483
|
childType: DesignElementType,
|
|
2504
2484
|
data: ElementGroupDataV2.optional()
|
|
2505
2485
|
});
|
|
2506
2486
|
var BrandedElementGroup = ElementGroup.extend(DesignElementBrandedPart.shape);
|
|
2507
2487
|
var DocumentationPageV1 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
2508
|
-
shortPersistentId:
|
|
2488
|
+
shortPersistentId: z76.string(),
|
|
2509
2489
|
data: DocumentationPageDataV1
|
|
2510
2490
|
});
|
|
2511
2491
|
var DocumentationGroupV1 = ElementGroup.omit({
|
|
@@ -2514,11 +2494,29 @@ var DocumentationGroupV1 = ElementGroup.omit({
|
|
|
2514
2494
|
data: ElementGroupDataV1.optional()
|
|
2515
2495
|
});
|
|
2516
2496
|
var DocumentationPageV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
2517
|
-
shortPersistentId:
|
|
2497
|
+
shortPersistentId: z77.string(),
|
|
2518
2498
|
data: DocumentationPageDataV2.extend({
|
|
2519
|
-
oldBlocks:
|
|
2499
|
+
oldBlocks: z77.array(PageBlockV1).optional()
|
|
2520
2500
|
})
|
|
2521
2501
|
});
|
|
2502
|
+
var FigmaComponentOriginPart = z78.object({
|
|
2503
|
+
nodeId: z78.string().optional(),
|
|
2504
|
+
width: z78.number().optional(),
|
|
2505
|
+
height: z78.number().optional()
|
|
2506
|
+
});
|
|
2507
|
+
var FigmaComponentAsset = z78.object({
|
|
2508
|
+
assetId: z78.string(),
|
|
2509
|
+
assetPath: z78.string()
|
|
2510
|
+
});
|
|
2511
|
+
var FigmaComponentOrigin = DesignElementOrigin.extend(FigmaComponentOriginPart.shape);
|
|
2512
|
+
var FigmaComponent = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
2513
|
+
origin: FigmaComponentOrigin.optional(),
|
|
2514
|
+
thumbnail: FigmaComponentAsset,
|
|
2515
|
+
componentPropertyDefinitions: FigmaComponentPropertyMap.optional(),
|
|
2516
|
+
svg: FigmaComponentAsset.optional(),
|
|
2517
|
+
isAsset: z78.boolean(),
|
|
2518
|
+
parentComponentPersistentId: nullishToOptional(z78.string())
|
|
2519
|
+
});
|
|
2522
2520
|
var FigmaFileStructureOrigin = z79.object({
|
|
2523
2521
|
sourceId: z79.string(),
|
|
2524
2522
|
fileId: z79.string().optional()
|
|
@@ -2972,106 +2970,134 @@ var FigmaImportContextWithDownloadScopes = FigmaImportContextWithSourcesState.ex
|
|
|
2972
2970
|
*/
|
|
2973
2971
|
changedImportedSourceDataBySourceId: z86.record(ChangedImportedFigmaSourceData)
|
|
2974
2972
|
});
|
|
2975
|
-
var
|
|
2976
|
-
|
|
2973
|
+
var ImportModelBase = z87.object({
|
|
2974
|
+
id: z87.string(),
|
|
2975
|
+
meta: ObjectMeta,
|
|
2976
|
+
origin: DesignElementOrigin,
|
|
2977
|
+
brandPersistentId: z87.string(),
|
|
2978
|
+
sortOrder: z87.number()
|
|
2979
|
+
});
|
|
2980
|
+
var ImportModelInputBase = ImportModelBase.omit({
|
|
2981
|
+
brandPersistentId: true,
|
|
2982
|
+
origin: true,
|
|
2983
|
+
sortOrder: true
|
|
2984
|
+
}).extend({
|
|
2985
|
+
originId: z87.string(),
|
|
2986
|
+
originMetadata: z87.record(z87.any())
|
|
2987
|
+
});
|
|
2988
|
+
var ImageImportModelType = z88.enum(["Url", "FigmaRender"]);
|
|
2989
|
+
var ImageImportModelBase = z88.object({
|
|
2977
2990
|
scope: AssetScope
|
|
2978
2991
|
});
|
|
2979
2992
|
var UrlImageImportModel = ImageImportModelBase.extend({
|
|
2980
|
-
type:
|
|
2981
|
-
url:
|
|
2982
|
-
originKey:
|
|
2983
|
-
extension:
|
|
2993
|
+
type: z88.literal(ImageImportModelType.enum.Url),
|
|
2994
|
+
url: z88.string(),
|
|
2995
|
+
originKey: z88.string(),
|
|
2996
|
+
extension: z88.string()
|
|
2984
2997
|
});
|
|
2985
|
-
var FigmaRenderFormat =
|
|
2998
|
+
var FigmaRenderFormat = z88.enum(["Svg", "Png", "Pdf"]);
|
|
2986
2999
|
var FigmaRenderBase = ImageImportModelBase.extend({
|
|
2987
|
-
type:
|
|
2988
|
-
fileId:
|
|
2989
|
-
fileVersionId:
|
|
2990
|
-
nodeId:
|
|
2991
|
-
originKey:
|
|
3000
|
+
type: z88.literal(ImageImportModelType.enum.FigmaRender),
|
|
3001
|
+
fileId: z88.string(),
|
|
3002
|
+
fileVersionId: z88.string().optional(),
|
|
3003
|
+
nodeId: z88.string(),
|
|
3004
|
+
originKey: z88.string()
|
|
2992
3005
|
});
|
|
2993
3006
|
var FigmaPngRenderImportModel = FigmaRenderBase.extend({
|
|
2994
|
-
format:
|
|
2995
|
-
scale:
|
|
3007
|
+
format: z88.literal(FigmaRenderFormat.enum.Png),
|
|
3008
|
+
scale: z88.number()
|
|
2996
3009
|
});
|
|
2997
3010
|
var FigmaSvgRenderImportModel = FigmaRenderBase.extend({
|
|
2998
|
-
format:
|
|
3011
|
+
format: z88.literal(FigmaRenderFormat.enum.Svg)
|
|
2999
3012
|
});
|
|
3000
|
-
var FigmaRenderImportModel =
|
|
3013
|
+
var FigmaRenderImportModel = z88.discriminatedUnion("format", [
|
|
3001
3014
|
FigmaPngRenderImportModel,
|
|
3002
3015
|
FigmaSvgRenderImportModel
|
|
3003
3016
|
]);
|
|
3004
|
-
var ImageImportModel =
|
|
3005
|
-
var
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
brandPersistentId: z88.string(),
|
|
3010
|
-
sortOrder: z88.number()
|
|
3011
|
-
});
|
|
3012
|
-
var ImportModelInputBase = ImportModelBase.omit({
|
|
3013
|
-
brandPersistentId: true,
|
|
3014
|
-
origin: true,
|
|
3015
|
-
sortOrder: true
|
|
3016
|
-
}).extend({
|
|
3017
|
-
originId: z88.string(),
|
|
3018
|
-
originMetadata: z88.record(z88.any())
|
|
3019
|
-
});
|
|
3020
|
-
var ComponentImportModelPart = z89.object({
|
|
3021
|
-
thumbnail: ImageImportModel
|
|
3017
|
+
var ImageImportModel = z88.union([UrlImageImportModel, FigmaRenderImportModel]);
|
|
3018
|
+
var FigmaComponentImportModelPart = z89.object({
|
|
3019
|
+
thumbnail: ImageImportModel,
|
|
3020
|
+
parentComponentId: z89.string().optional(),
|
|
3021
|
+
componentPropertyDefinitions: FigmaComponentPropertyMap.optional()
|
|
3022
3022
|
});
|
|
3023
|
-
var
|
|
3023
|
+
var FigmaComponentImportModel = ImportModelBase.extend(FigmaComponentImportModelPart.shape).extend({
|
|
3024
3024
|
isAsset: z89.boolean(),
|
|
3025
3025
|
svg: FigmaSvgRenderImportModel.optional(),
|
|
3026
|
-
origin:
|
|
3026
|
+
origin: FigmaComponentOrigin
|
|
3027
3027
|
});
|
|
3028
|
-
var
|
|
3029
|
-
originMetadata:
|
|
3028
|
+
var FigmaComponentImportModelInput = ImportModelInputBase.extend(FigmaComponentImportModelPart.shape).extend({
|
|
3029
|
+
originMetadata: FigmaComponentOriginPart
|
|
3030
3030
|
});
|
|
3031
|
-
var AssetImportModelInput = ImportModelInputBase.extend(
|
|
3031
|
+
var AssetImportModelInput = ImportModelInputBase.extend(FigmaComponentImportModelPart.shape).extend({
|
|
3032
3032
|
svg: FigmaSvgRenderImportModel,
|
|
3033
|
-
originMetadata:
|
|
3033
|
+
originMetadata: FigmaComponentOriginPart
|
|
3034
|
+
});
|
|
3035
|
+
var DataSourceImportModel = z90.object({
|
|
3036
|
+
id: z90.string(),
|
|
3037
|
+
fileName: z90.string().optional(),
|
|
3038
|
+
thumbnailUrl: z90.string().optional()
|
|
3039
|
+
});
|
|
3040
|
+
var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
|
|
3041
|
+
png: FigmaPngRenderImportModel,
|
|
3042
|
+
svg: FigmaSvgRenderImportModel
|
|
3043
|
+
});
|
|
3044
|
+
var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
|
|
3045
|
+
children: z91.lazy(() => FigmaFileStructureNodeImportModel.array())
|
|
3046
|
+
});
|
|
3047
|
+
var FigmaFileStructureImportModelPart = z91.object({
|
|
3048
|
+
data: z91.object({
|
|
3049
|
+
rootNode: FigmaFileStructureNodeImportModel,
|
|
3050
|
+
assetsInFile: FigmaFileStructureStatistics
|
|
3051
|
+
})
|
|
3052
|
+
});
|
|
3053
|
+
var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImportModelPart.shape).extend({
|
|
3054
|
+
origin: FigmaFileStructureOrigin
|
|
3055
|
+
});
|
|
3056
|
+
var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
|
|
3057
|
+
FigmaFileStructureImportModelPart.shape
|
|
3058
|
+
).extend({
|
|
3059
|
+
fileVersionId: z91.string()
|
|
3034
3060
|
});
|
|
3035
3061
|
var ThemeOverrideImportModelBase = DesignTokenTypedData.and(
|
|
3036
|
-
|
|
3037
|
-
id:
|
|
3062
|
+
z92.object({
|
|
3063
|
+
id: z92.string(),
|
|
3038
3064
|
meta: ObjectMeta
|
|
3039
3065
|
})
|
|
3040
3066
|
);
|
|
3041
3067
|
var ThemeOverrideImportModel = ThemeOverrideImportModelBase.and(
|
|
3042
|
-
|
|
3068
|
+
z92.object({
|
|
3043
3069
|
origin: ThemeOverrideOrigin
|
|
3044
3070
|
})
|
|
3045
3071
|
);
|
|
3046
3072
|
var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
|
|
3047
|
-
|
|
3048
|
-
originId:
|
|
3073
|
+
z92.object({
|
|
3074
|
+
originId: z92.string(),
|
|
3049
3075
|
originMetadata: ThemeOverrideOriginPart
|
|
3050
3076
|
})
|
|
3051
3077
|
);
|
|
3052
|
-
var ThemeImportModel =
|
|
3078
|
+
var ThemeImportModel = z92.object({
|
|
3053
3079
|
meta: ObjectMeta,
|
|
3054
|
-
brandPersistentId:
|
|
3080
|
+
brandPersistentId: z92.string(),
|
|
3055
3081
|
originSource: ThemeOriginSource,
|
|
3056
|
-
overrides:
|
|
3057
|
-
sortOrder:
|
|
3082
|
+
overrides: z92.array(ThemeOverrideImportModel),
|
|
3083
|
+
sortOrder: z92.number()
|
|
3058
3084
|
});
|
|
3059
|
-
var ThemeImportModelInput =
|
|
3085
|
+
var ThemeImportModelInput = z92.object({
|
|
3060
3086
|
meta: ObjectMeta,
|
|
3061
|
-
originObjects:
|
|
3062
|
-
overrides:
|
|
3087
|
+
originObjects: z92.array(ThemeOriginObject),
|
|
3088
|
+
overrides: z92.array(ThemeOverrideImportModelInput)
|
|
3063
3089
|
});
|
|
3064
|
-
var ThemeUpdateImportModel =
|
|
3065
|
-
themePersistentId:
|
|
3066
|
-
overrides:
|
|
3090
|
+
var ThemeUpdateImportModel = z92.object({
|
|
3091
|
+
themePersistentId: z92.string(),
|
|
3092
|
+
overrides: z92.array(ThemeOverrideImportModel)
|
|
3067
3093
|
});
|
|
3068
|
-
var ThemeUpdateImportModelInput =
|
|
3069
|
-
themePersistentId:
|
|
3070
|
-
overrides:
|
|
3094
|
+
var ThemeUpdateImportModelInput = z92.object({
|
|
3095
|
+
themePersistentId: z92.string(),
|
|
3096
|
+
overrides: z92.array(ThemeOverrideImportModelInput)
|
|
3071
3097
|
});
|
|
3072
|
-
var DesignTokenImportModelPart =
|
|
3073
|
-
collection:
|
|
3074
|
-
codeSyntax:
|
|
3098
|
+
var DesignTokenImportModelPart = z93.object({
|
|
3099
|
+
collection: z93.string().optional(),
|
|
3100
|
+
codeSyntax: z93.record(z93.coerce.string()).optional()
|
|
3075
3101
|
});
|
|
3076
3102
|
var DesignTokenImportModelBase = ImportModelBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
3077
3103
|
origin: DesignTokenOrigin
|
|
@@ -3081,36 +3107,10 @@ var DesignTokenImportModelInputBase = ImportModelInputBase.extend(DesignTokenImp
|
|
|
3081
3107
|
});
|
|
3082
3108
|
var DesignTokenImportModel = DesignTokenTypedData.and(DesignTokenImportModelBase);
|
|
3083
3109
|
var DesignTokenImportModelInput = DesignTokenTypedData.and(DesignTokenImportModelInputBase);
|
|
3084
|
-
var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
|
|
3085
|
-
png: FigmaPngRenderImportModel,
|
|
3086
|
-
svg: FigmaSvgRenderImportModel
|
|
3087
|
-
});
|
|
3088
|
-
var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
|
|
3089
|
-
children: z92.lazy(() => FigmaFileStructureNodeImportModel.array())
|
|
3090
|
-
});
|
|
3091
|
-
var FigmaFileStructureImportModelPart = z92.object({
|
|
3092
|
-
data: z92.object({
|
|
3093
|
-
rootNode: FigmaFileStructureNodeImportModel,
|
|
3094
|
-
assetsInFile: FigmaFileStructureStatistics
|
|
3095
|
-
})
|
|
3096
|
-
});
|
|
3097
|
-
var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImportModelPart.shape).extend({
|
|
3098
|
-
origin: FigmaFileStructureOrigin
|
|
3099
|
-
});
|
|
3100
|
-
var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
|
|
3101
|
-
FigmaFileStructureImportModelPart.shape
|
|
3102
|
-
).extend({
|
|
3103
|
-
fileVersionId: z92.string()
|
|
3104
|
-
});
|
|
3105
|
-
var DataSourceImportModel = z93.object({
|
|
3106
|
-
id: z93.string(),
|
|
3107
|
-
fileName: z93.string().optional(),
|
|
3108
|
-
thumbnailUrl: z93.string().optional()
|
|
3109
|
-
});
|
|
3110
3110
|
var ImportModelInputCollection = z94.object({
|
|
3111
3111
|
source: DataSourceImportModel,
|
|
3112
3112
|
tokens: z94.array(DesignTokenImportModelInput).default([]),
|
|
3113
|
-
components: z94.array(
|
|
3113
|
+
components: z94.array(FigmaComponentImportModelInput).default([]),
|
|
3114
3114
|
assets: z94.array(AssetImportModelInput).default([]),
|
|
3115
3115
|
themeUpdates: z94.array(ThemeUpdateImportModelInput).default([]),
|
|
3116
3116
|
themes: z94.array(ThemeImportModelInput).default([]),
|
|
@@ -3119,7 +3119,7 @@ var ImportModelInputCollection = z94.object({
|
|
|
3119
3119
|
var ImportModelCollection = z94.object({
|
|
3120
3120
|
sources: z94.array(DataSourceImportModel),
|
|
3121
3121
|
tokens: z94.array(DesignTokenImportModel).default([]),
|
|
3122
|
-
components: z94.array(
|
|
3122
|
+
components: z94.array(FigmaComponentImportModel).default([]),
|
|
3123
3123
|
themeUpdates: z94.array(ThemeUpdateImportModel).default([]),
|
|
3124
3124
|
themes: z94.array(ThemeImportModel).default([]),
|
|
3125
3125
|
figmaFileStructures: z94.array(FigmaFileStructureImportModel)
|
|
@@ -3219,7 +3219,15 @@ var PageBlockDefinitionRichTextPropertyStyle = z100.enum([
|
|
|
3219
3219
|
"Default"
|
|
3220
3220
|
]);
|
|
3221
3221
|
var PageBlockDefinitionMultiRichTextPropertyStyle = z100.enum(["OL", "UL", "Default"]);
|
|
3222
|
-
var PageBlockDefinitionRichTextEditorPropertyStyle = z100.enum([
|
|
3222
|
+
var PageBlockDefinitionRichTextEditorPropertyStyle = z100.enum([
|
|
3223
|
+
"OL",
|
|
3224
|
+
"UL",
|
|
3225
|
+
"Bold",
|
|
3226
|
+
"Italic",
|
|
3227
|
+
"Link",
|
|
3228
|
+
"Strikethrough",
|
|
3229
|
+
"InlineCode"
|
|
3230
|
+
]);
|
|
3223
3231
|
var PageBlockDefinitionTextPropertyStyle = z100.enum([
|
|
3224
3232
|
"Title1",
|
|
3225
3233
|
"Title2",
|
|
@@ -3257,11 +3265,7 @@ var PageBlockDefinitionSingleSelectPropertyColor = z100.enum([
|
|
|
3257
3265
|
"Cyan",
|
|
3258
3266
|
"Fuchsia"
|
|
3259
3267
|
]);
|
|
3260
|
-
var IconSet = z100.enum([
|
|
3261
|
-
"CheckCircle",
|
|
3262
|
-
"CrossCircle",
|
|
3263
|
-
"Alert"
|
|
3264
|
-
]);
|
|
3268
|
+
var IconSet = z100.enum(["CheckCircle", "CrossCircle", "Alert"]);
|
|
3265
3269
|
var PageBlockDefinitionMultiSelectPropertyStyle = z100.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
3266
3270
|
var PageBlockDefinitionImageAspectRatio = z100.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
|
|
3267
3271
|
var PageBlockDefinitionImageWidth = z100.enum(["Full", "Icon", "Small", "Medium", "Large", "Poster"]);
|
|
@@ -3753,7 +3757,7 @@ var PublishedDoc = z123.object({
|
|
|
3753
3757
|
var DesignSystemVersion = z124.object({
|
|
3754
3758
|
id: z124.string(),
|
|
3755
3759
|
version: z124.string(),
|
|
3756
|
-
createdAt: z124.date(),
|
|
3760
|
+
createdAt: z124.coerce.date(),
|
|
3757
3761
|
designSystemId: z124.string(),
|
|
3758
3762
|
name: z124.string(),
|
|
3759
3763
|
comment: z124.string(),
|
|
@@ -5621,11 +5625,31 @@ var DTOPublishDocumentationResponse = z200.object({
|
|
|
5621
5625
|
job: DTOExportJob
|
|
5622
5626
|
});
|
|
5623
5627
|
|
|
5628
|
+
// src/api/dto/elements/components/figma-component.ts
|
|
5629
|
+
import { z as z201 } from "zod";
|
|
5630
|
+
var DTOFigmaComponent = z201.object({
|
|
5631
|
+
id: z201.string(),
|
|
5632
|
+
persistentId: z201.string(),
|
|
5633
|
+
designSystemVersionId: z201.string(),
|
|
5634
|
+
brandId: z201.string(),
|
|
5635
|
+
parentComponentId: z201.string().optional(),
|
|
5636
|
+
thumbnailUrl: z201.string().optional(),
|
|
5637
|
+
svgUrl: z201.string().optional(),
|
|
5638
|
+
exportProperties: z201.object({
|
|
5639
|
+
isAsset: z201.boolean()
|
|
5640
|
+
}),
|
|
5641
|
+
createdAt: z201.coerce.date(),
|
|
5642
|
+
updatedAt: z201.coerce.date(),
|
|
5643
|
+
meta: ObjectMeta,
|
|
5644
|
+
originComponent: FigmaComponentOrigin.optional(),
|
|
5645
|
+
componentPropertyDefinitions: FigmaComponentPropertyMap.optional()
|
|
5646
|
+
});
|
|
5647
|
+
|
|
5624
5648
|
// src/api/dto/elements/documentation/group-action.ts
|
|
5625
|
-
import { z as
|
|
5649
|
+
import { z as z203 } from "zod";
|
|
5626
5650
|
|
|
5627
5651
|
// src/api/dto/elements/documentation/group-v2.ts
|
|
5628
|
-
import { z as
|
|
5652
|
+
import { z as z202 } from "zod";
|
|
5629
5653
|
var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
5630
5654
|
sortOrder: true,
|
|
5631
5655
|
parentPersistentId: true,
|
|
@@ -5635,13 +5659,13 @@ var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
|
5635
5659
|
data: true,
|
|
5636
5660
|
shortPersistentId: true
|
|
5637
5661
|
}).extend({
|
|
5638
|
-
title:
|
|
5639
|
-
isRoot:
|
|
5640
|
-
childrenIds:
|
|
5662
|
+
title: z202.string(),
|
|
5663
|
+
isRoot: z202.boolean(),
|
|
5664
|
+
childrenIds: z202.array(z202.string()),
|
|
5641
5665
|
groupBehavior: DocumentationGroupBehavior,
|
|
5642
|
-
shortPersistentId:
|
|
5666
|
+
shortPersistentId: z202.string(),
|
|
5643
5667
|
configuration: DTODocumentationItemConfigurationV2,
|
|
5644
|
-
type:
|
|
5668
|
+
type: z202.literal("Group"),
|
|
5645
5669
|
/** Defined when a group has changed since last publish and can be included into a partial publish */
|
|
5646
5670
|
draftState: DTODocumentationDraftState.optional(),
|
|
5647
5671
|
/** Defined if a group was published at least once and contains metadata about last publish */
|
|
@@ -5649,127 +5673,127 @@ var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
|
5649
5673
|
//** An approval state for frontend to utilize. */
|
|
5650
5674
|
approvalState: DTODocumentationGroupApprovalState.optional()
|
|
5651
5675
|
});
|
|
5652
|
-
var DTOCreateDocumentationGroupInput =
|
|
5676
|
+
var DTOCreateDocumentationGroupInput = z202.object({
|
|
5653
5677
|
// Identifier
|
|
5654
|
-
persistentId:
|
|
5678
|
+
persistentId: z202.string().uuid(),
|
|
5655
5679
|
// Group properties
|
|
5656
|
-
title:
|
|
5680
|
+
title: z202.string(),
|
|
5657
5681
|
configuration: DTODocumentationItemConfigurationV2.partial().optional(),
|
|
5658
5682
|
// Group placement properties
|
|
5659
|
-
afterPersistentId:
|
|
5660
|
-
parentPersistentId:
|
|
5683
|
+
afterPersistentId: z202.string().uuid().nullish(),
|
|
5684
|
+
parentPersistentId: z202.string().uuid()
|
|
5661
5685
|
});
|
|
5662
|
-
var DTOUpdateDocumentationGroupInput =
|
|
5686
|
+
var DTOUpdateDocumentationGroupInput = z202.object({
|
|
5663
5687
|
// Identifier of the group to update
|
|
5664
|
-
id:
|
|
5688
|
+
id: z202.string(),
|
|
5665
5689
|
// Group properties
|
|
5666
|
-
title:
|
|
5690
|
+
title: z202.string().optional(),
|
|
5667
5691
|
configuration: DTODocumentationItemConfigurationV2.partial().optional()
|
|
5668
5692
|
});
|
|
5669
|
-
var DTOMoveDocumentationGroupInput =
|
|
5693
|
+
var DTOMoveDocumentationGroupInput = z202.object({
|
|
5670
5694
|
// Identifier of the group to update
|
|
5671
|
-
id:
|
|
5695
|
+
id: z202.string(),
|
|
5672
5696
|
// Group placement properties
|
|
5673
|
-
parentPersistentId:
|
|
5674
|
-
afterPersistentId:
|
|
5697
|
+
parentPersistentId: z202.string().uuid(),
|
|
5698
|
+
afterPersistentId: z202.string().uuid().nullish()
|
|
5675
5699
|
});
|
|
5676
|
-
var DTODuplicateDocumentationGroupInput =
|
|
5700
|
+
var DTODuplicateDocumentationGroupInput = z202.object({
|
|
5677
5701
|
// Identifier of the group to duplicate from
|
|
5678
|
-
id:
|
|
5702
|
+
id: z202.string(),
|
|
5679
5703
|
// New group persistent id
|
|
5680
|
-
persistentId:
|
|
5704
|
+
persistentId: z202.string().uuid(),
|
|
5681
5705
|
// Group placement properties
|
|
5682
|
-
afterPersistentId:
|
|
5683
|
-
parentPersistentId:
|
|
5706
|
+
afterPersistentId: z202.string().uuid().nullish(),
|
|
5707
|
+
parentPersistentId: z202.string().uuid()
|
|
5684
5708
|
});
|
|
5685
|
-
var DTOCreateDocumentationTabInput =
|
|
5709
|
+
var DTOCreateDocumentationTabInput = z202.object({
|
|
5686
5710
|
// New group persistent id
|
|
5687
|
-
persistentId:
|
|
5711
|
+
persistentId: z202.string().uuid(),
|
|
5688
5712
|
// If this is page, we will attempt to convert it to tab
|
|
5689
5713
|
// If this is tab group, we will add a new tab to it
|
|
5690
|
-
fromItemPersistentId:
|
|
5691
|
-
tabName:
|
|
5714
|
+
fromItemPersistentId: z202.string(),
|
|
5715
|
+
tabName: z202.string()
|
|
5692
5716
|
});
|
|
5693
|
-
var DTODeleteDocumentationTabGroupInput =
|
|
5717
|
+
var DTODeleteDocumentationTabGroupInput = z202.object({
|
|
5694
5718
|
// Deleted group id
|
|
5695
|
-
id:
|
|
5719
|
+
id: z202.string()
|
|
5696
5720
|
});
|
|
5697
|
-
var DTODeleteDocumentationGroupInput =
|
|
5721
|
+
var DTODeleteDocumentationGroupInput = z202.object({
|
|
5698
5722
|
// Identifier
|
|
5699
|
-
id:
|
|
5723
|
+
id: z202.string(),
|
|
5700
5724
|
// Deletion options
|
|
5701
|
-
deleteSubtree:
|
|
5725
|
+
deleteSubtree: z202.boolean().default(false)
|
|
5702
5726
|
});
|
|
5703
5727
|
|
|
5704
5728
|
// src/api/dto/elements/documentation/group-action.ts
|
|
5705
|
-
var SuccessPayload =
|
|
5706
|
-
success:
|
|
5729
|
+
var SuccessPayload = z203.object({
|
|
5730
|
+
success: z203.literal(true)
|
|
5707
5731
|
});
|
|
5708
|
-
var DTODocumentationGroupCreateActionOutputV2 =
|
|
5709
|
-
type:
|
|
5732
|
+
var DTODocumentationGroupCreateActionOutputV2 = z203.object({
|
|
5733
|
+
type: z203.literal("DocumentationGroupCreate"),
|
|
5710
5734
|
output: SuccessPayload
|
|
5711
5735
|
});
|
|
5712
|
-
var DTODocumentationTabCreateActionOutputV2 =
|
|
5713
|
-
type:
|
|
5736
|
+
var DTODocumentationTabCreateActionOutputV2 = z203.object({
|
|
5737
|
+
type: z203.literal("DocumentationTabCreate"),
|
|
5714
5738
|
output: SuccessPayload
|
|
5715
5739
|
});
|
|
5716
|
-
var DTODocumentationGroupUpdateActionOutputV2 =
|
|
5717
|
-
type:
|
|
5740
|
+
var DTODocumentationGroupUpdateActionOutputV2 = z203.object({
|
|
5741
|
+
type: z203.literal("DocumentationGroupUpdate"),
|
|
5718
5742
|
output: SuccessPayload
|
|
5719
5743
|
});
|
|
5720
|
-
var DTODocumentationGroupMoveActionOutputV2 =
|
|
5721
|
-
type:
|
|
5744
|
+
var DTODocumentationGroupMoveActionOutputV2 = z203.object({
|
|
5745
|
+
type: z203.literal("DocumentationGroupMove"),
|
|
5722
5746
|
output: SuccessPayload
|
|
5723
5747
|
});
|
|
5724
|
-
var DTODocumentationGroupDuplicateActionOutputV2 =
|
|
5725
|
-
type:
|
|
5748
|
+
var DTODocumentationGroupDuplicateActionOutputV2 = z203.object({
|
|
5749
|
+
type: z203.literal("DocumentationGroupDuplicate"),
|
|
5726
5750
|
output: SuccessPayload
|
|
5727
5751
|
});
|
|
5728
|
-
var DTODocumentationGroupDeleteActionOutputV2 =
|
|
5729
|
-
type:
|
|
5752
|
+
var DTODocumentationGroupDeleteActionOutputV2 = z203.object({
|
|
5753
|
+
type: z203.literal("DocumentationGroupDelete"),
|
|
5730
5754
|
output: SuccessPayload
|
|
5731
5755
|
});
|
|
5732
|
-
var DTODocumentationTabGroupDeleteActionOutputV2 =
|
|
5733
|
-
type:
|
|
5756
|
+
var DTODocumentationTabGroupDeleteActionOutputV2 = z203.object({
|
|
5757
|
+
type: z203.literal("DocumentationTabGroupDelete"),
|
|
5734
5758
|
output: SuccessPayload
|
|
5735
5759
|
});
|
|
5736
|
-
var DTODocumentationGroupCreateActionInputV2 =
|
|
5737
|
-
type:
|
|
5760
|
+
var DTODocumentationGroupCreateActionInputV2 = z203.object({
|
|
5761
|
+
type: z203.literal("DocumentationGroupCreate"),
|
|
5738
5762
|
input: DTOCreateDocumentationGroupInput
|
|
5739
5763
|
});
|
|
5740
|
-
var DTODocumentationTabCreateActionInputV2 =
|
|
5741
|
-
type:
|
|
5764
|
+
var DTODocumentationTabCreateActionInputV2 = z203.object({
|
|
5765
|
+
type: z203.literal("DocumentationTabCreate"),
|
|
5742
5766
|
input: DTOCreateDocumentationTabInput
|
|
5743
5767
|
});
|
|
5744
|
-
var DTODocumentationGroupUpdateActionInputV2 =
|
|
5745
|
-
type:
|
|
5768
|
+
var DTODocumentationGroupUpdateActionInputV2 = z203.object({
|
|
5769
|
+
type: z203.literal("DocumentationGroupUpdate"),
|
|
5746
5770
|
input: DTOUpdateDocumentationGroupInput
|
|
5747
5771
|
});
|
|
5748
|
-
var DTODocumentationGroupMoveActionInputV2 =
|
|
5749
|
-
type:
|
|
5772
|
+
var DTODocumentationGroupMoveActionInputV2 = z203.object({
|
|
5773
|
+
type: z203.literal("DocumentationGroupMove"),
|
|
5750
5774
|
input: DTOMoveDocumentationGroupInput
|
|
5751
5775
|
});
|
|
5752
|
-
var DTODocumentationGroupDuplicateActionInputV2 =
|
|
5753
|
-
type:
|
|
5776
|
+
var DTODocumentationGroupDuplicateActionInputV2 = z203.object({
|
|
5777
|
+
type: z203.literal("DocumentationGroupDuplicate"),
|
|
5754
5778
|
input: DTODuplicateDocumentationGroupInput
|
|
5755
5779
|
});
|
|
5756
|
-
var DTODocumentationGroupDeleteActionInputV2 =
|
|
5757
|
-
type:
|
|
5780
|
+
var DTODocumentationGroupDeleteActionInputV2 = z203.object({
|
|
5781
|
+
type: z203.literal("DocumentationGroupDelete"),
|
|
5758
5782
|
input: DTODeleteDocumentationGroupInput
|
|
5759
5783
|
});
|
|
5760
|
-
var DTODocumentationTabGroupDeleteActionInputV2 =
|
|
5761
|
-
type:
|
|
5784
|
+
var DTODocumentationTabGroupDeleteActionInputV2 = z203.object({
|
|
5785
|
+
type: z203.literal("DocumentationTabGroupDelete"),
|
|
5762
5786
|
input: DTODeleteDocumentationTabGroupInput
|
|
5763
5787
|
});
|
|
5764
5788
|
|
|
5765
5789
|
// src/api/dto/elements/documentation/group-v1.ts
|
|
5766
|
-
import { z as
|
|
5790
|
+
import { z as z205 } from "zod";
|
|
5767
5791
|
|
|
5768
5792
|
// src/api/dto/elements/documentation/item-configuration-v1.ts
|
|
5769
|
-
import { z as
|
|
5770
|
-
var DocumentationColorV1 =
|
|
5771
|
-
aliasTo:
|
|
5772
|
-
value:
|
|
5793
|
+
import { z as z204 } from "zod";
|
|
5794
|
+
var DocumentationColorV1 = z204.object({
|
|
5795
|
+
aliasTo: z204.string().optional(),
|
|
5796
|
+
value: z204.string().optional()
|
|
5773
5797
|
});
|
|
5774
5798
|
var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
5775
5799
|
foregroundColor: true,
|
|
@@ -5778,10 +5802,10 @@ var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
|
5778
5802
|
foregroundColor: DocumentationColorV1.optional(),
|
|
5779
5803
|
backgroundColor: DocumentationColorV1.optional()
|
|
5780
5804
|
});
|
|
5781
|
-
var DTODocumentationItemConfigurationV1 =
|
|
5782
|
-
showSidebar:
|
|
5783
|
-
isPrivate:
|
|
5784
|
-
isHidden:
|
|
5805
|
+
var DTODocumentationItemConfigurationV1 = z204.object({
|
|
5806
|
+
showSidebar: z204.boolean(),
|
|
5807
|
+
isPrivate: z204.boolean(),
|
|
5808
|
+
isHidden: z204.boolean(),
|
|
5785
5809
|
header: DTODocumentationItemHeaderV1
|
|
5786
5810
|
});
|
|
5787
5811
|
|
|
@@ -5795,27 +5819,27 @@ var DTODocumentationGroupStructureV1 = ElementGroup.omit({
|
|
|
5795
5819
|
data: true,
|
|
5796
5820
|
shortPersistentId: true
|
|
5797
5821
|
}).extend({
|
|
5798
|
-
title:
|
|
5799
|
-
isRoot:
|
|
5800
|
-
childrenIds:
|
|
5822
|
+
title: z205.string(),
|
|
5823
|
+
isRoot: z205.boolean(),
|
|
5824
|
+
childrenIds: z205.array(z205.string()),
|
|
5801
5825
|
groupBehavior: DocumentationGroupBehavior,
|
|
5802
|
-
shortPersistentId:
|
|
5803
|
-
type:
|
|
5826
|
+
shortPersistentId: z205.string(),
|
|
5827
|
+
type: z205.literal("Group")
|
|
5804
5828
|
});
|
|
5805
5829
|
var DTODocumentationGroupV1 = DTODocumentationGroupStructureV1.extend({
|
|
5806
5830
|
configuration: DTODocumentationItemConfigurationV1
|
|
5807
5831
|
});
|
|
5808
5832
|
|
|
5809
5833
|
// src/api/dto/elements/documentation/hierarchy.ts
|
|
5810
|
-
import { z as
|
|
5811
|
-
var DTODocumentationHierarchyV2 =
|
|
5812
|
-
pages:
|
|
5834
|
+
import { z as z206 } from "zod";
|
|
5835
|
+
var DTODocumentationHierarchyV2 = z206.object({
|
|
5836
|
+
pages: z206.array(
|
|
5813
5837
|
DTODocumentationPageV2.extend({
|
|
5814
5838
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
5815
5839
|
draftState: DTODocumentationDraftState.optional()
|
|
5816
5840
|
})
|
|
5817
5841
|
),
|
|
5818
|
-
groups:
|
|
5842
|
+
groups: z206.array(
|
|
5819
5843
|
DTODocumentationGroupV2.extend({
|
|
5820
5844
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
5821
5845
|
draftState: DTODocumentationDraftState.optional()
|
|
@@ -5824,84 +5848,84 @@ var DTODocumentationHierarchyV2 = z205.object({
|
|
|
5824
5848
|
});
|
|
5825
5849
|
|
|
5826
5850
|
// src/api/dto/elements/documentation/page-actions-v2.ts
|
|
5827
|
-
import { z as
|
|
5828
|
-
var SuccessPayload2 =
|
|
5829
|
-
success:
|
|
5851
|
+
import { z as z207 } from "zod";
|
|
5852
|
+
var SuccessPayload2 = z207.object({
|
|
5853
|
+
success: z207.literal(true)
|
|
5830
5854
|
});
|
|
5831
|
-
var DTODocumentationPageCreateActionOutputV2 =
|
|
5832
|
-
type:
|
|
5855
|
+
var DTODocumentationPageCreateActionOutputV2 = z207.object({
|
|
5856
|
+
type: z207.literal("DocumentationPageCreate"),
|
|
5833
5857
|
output: SuccessPayload2
|
|
5834
5858
|
});
|
|
5835
|
-
var DTODocumentationPageUpdateActionOutputV2 =
|
|
5836
|
-
type:
|
|
5859
|
+
var DTODocumentationPageUpdateActionOutputV2 = z207.object({
|
|
5860
|
+
type: z207.literal("DocumentationPageUpdate"),
|
|
5837
5861
|
output: SuccessPayload2
|
|
5838
5862
|
});
|
|
5839
|
-
var DTODocumentationPageMoveActionOutputV2 =
|
|
5840
|
-
type:
|
|
5863
|
+
var DTODocumentationPageMoveActionOutputV2 = z207.object({
|
|
5864
|
+
type: z207.literal("DocumentationPageMove"),
|
|
5841
5865
|
output: SuccessPayload2
|
|
5842
5866
|
});
|
|
5843
|
-
var DTODocumentationPageDuplicateActionOutputV2 =
|
|
5844
|
-
type:
|
|
5867
|
+
var DTODocumentationPageDuplicateActionOutputV2 = z207.object({
|
|
5868
|
+
type: z207.literal("DocumentationPageDuplicate"),
|
|
5845
5869
|
output: SuccessPayload2
|
|
5846
5870
|
});
|
|
5847
|
-
var DTODocumentationPageDeleteActionOutputV2 =
|
|
5848
|
-
type:
|
|
5871
|
+
var DTODocumentationPageDeleteActionOutputV2 = z207.object({
|
|
5872
|
+
type: z207.literal("DocumentationPageDelete"),
|
|
5849
5873
|
output: SuccessPayload2
|
|
5850
5874
|
});
|
|
5851
|
-
var DTODocumentationPageRestoreActionOutput =
|
|
5852
|
-
type:
|
|
5875
|
+
var DTODocumentationPageRestoreActionOutput = z207.object({
|
|
5876
|
+
type: z207.literal("DocumentationPageRestore"),
|
|
5853
5877
|
output: SuccessPayload2
|
|
5854
5878
|
});
|
|
5855
|
-
var DTODocumentationGroupRestoreActionOutput =
|
|
5856
|
-
type:
|
|
5879
|
+
var DTODocumentationGroupRestoreActionOutput = z207.object({
|
|
5880
|
+
type: z207.literal("DocumentationGroupRestore"),
|
|
5857
5881
|
output: SuccessPayload2
|
|
5858
5882
|
});
|
|
5859
|
-
var DTODocumentationPageApprovalStateChangeActionOutput =
|
|
5860
|
-
type:
|
|
5883
|
+
var DTODocumentationPageApprovalStateChangeActionOutput = z207.object({
|
|
5884
|
+
type: z207.literal("DocumentationPageApprovalStateChange"),
|
|
5861
5885
|
output: SuccessPayload2
|
|
5862
5886
|
});
|
|
5863
|
-
var DTODocumentationPageCreateActionInputV2 =
|
|
5864
|
-
type:
|
|
5887
|
+
var DTODocumentationPageCreateActionInputV2 = z207.object({
|
|
5888
|
+
type: z207.literal("DocumentationPageCreate"),
|
|
5865
5889
|
input: DTOCreateDocumentationPageInputV2
|
|
5866
5890
|
});
|
|
5867
|
-
var DTODocumentationPageUpdateActionInputV2 =
|
|
5868
|
-
type:
|
|
5891
|
+
var DTODocumentationPageUpdateActionInputV2 = z207.object({
|
|
5892
|
+
type: z207.literal("DocumentationPageUpdate"),
|
|
5869
5893
|
input: DTOUpdateDocumentationPageInputV2
|
|
5870
5894
|
});
|
|
5871
|
-
var DTODocumentationPageMoveActionInputV2 =
|
|
5872
|
-
type:
|
|
5895
|
+
var DTODocumentationPageMoveActionInputV2 = z207.object({
|
|
5896
|
+
type: z207.literal("DocumentationPageMove"),
|
|
5873
5897
|
input: DTOMoveDocumentationPageInputV2
|
|
5874
5898
|
});
|
|
5875
|
-
var DTODocumentationPageDuplicateActionInputV2 =
|
|
5876
|
-
type:
|
|
5899
|
+
var DTODocumentationPageDuplicateActionInputV2 = z207.object({
|
|
5900
|
+
type: z207.literal("DocumentationPageDuplicate"),
|
|
5877
5901
|
input: DTODuplicateDocumentationPageInputV2
|
|
5878
5902
|
});
|
|
5879
|
-
var DTODocumentationPageDeleteActionInputV2 =
|
|
5880
|
-
type:
|
|
5903
|
+
var DTODocumentationPageDeleteActionInputV2 = z207.object({
|
|
5904
|
+
type: z207.literal("DocumentationPageDelete"),
|
|
5881
5905
|
input: DTODeleteDocumentationPageInputV2
|
|
5882
5906
|
});
|
|
5883
|
-
var DTODocumentationPageRestoreActionInput =
|
|
5884
|
-
type:
|
|
5907
|
+
var DTODocumentationPageRestoreActionInput = z207.object({
|
|
5908
|
+
type: z207.literal("DocumentationPageRestore"),
|
|
5885
5909
|
input: DTORestoreDocumentationPageInput
|
|
5886
5910
|
});
|
|
5887
|
-
var DTODocumentationGroupRestoreActionInput =
|
|
5888
|
-
type:
|
|
5911
|
+
var DTODocumentationGroupRestoreActionInput = z207.object({
|
|
5912
|
+
type: z207.literal("DocumentationGroupRestore"),
|
|
5889
5913
|
input: DTORestoreDocumentationGroupInput
|
|
5890
5914
|
});
|
|
5891
|
-
var DTODocumentationPageApprovalStateChangeActionInput =
|
|
5892
|
-
type:
|
|
5915
|
+
var DTODocumentationPageApprovalStateChangeActionInput = z207.object({
|
|
5916
|
+
type: z207.literal("DocumentationPageApprovalStateChange"),
|
|
5893
5917
|
input: DTODocumentationPageApprovalStateChangeInput
|
|
5894
5918
|
});
|
|
5895
5919
|
|
|
5896
5920
|
// src/api/dto/elements/documentation/page-content.ts
|
|
5897
|
-
import { z as
|
|
5921
|
+
import { z as z208 } from "zod";
|
|
5898
5922
|
var DTODocumentationPageContent = DocumentationPageContent;
|
|
5899
|
-
var DTODocumentationPageContentGetResponse =
|
|
5923
|
+
var DTODocumentationPageContentGetResponse = z208.object({
|
|
5900
5924
|
pageContent: DTODocumentationPageContent
|
|
5901
5925
|
});
|
|
5902
5926
|
|
|
5903
5927
|
// src/api/dto/elements/documentation/page-v1.ts
|
|
5904
|
-
import { z as
|
|
5928
|
+
import { z as z209 } from "zod";
|
|
5905
5929
|
var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
5906
5930
|
data: true,
|
|
5907
5931
|
meta: true,
|
|
@@ -5909,32 +5933,32 @@ var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
|
5909
5933
|
sortOrder: true
|
|
5910
5934
|
}).extend({
|
|
5911
5935
|
configuration: DTODocumentationItemConfigurationV1,
|
|
5912
|
-
blocks:
|
|
5913
|
-
title:
|
|
5914
|
-
path:
|
|
5936
|
+
blocks: z209.array(PageBlockV1),
|
|
5937
|
+
title: z209.string(),
|
|
5938
|
+
path: z209.string()
|
|
5915
5939
|
});
|
|
5916
5940
|
|
|
5917
5941
|
// src/api/dto/elements/figma-nodes/figma-node.ts
|
|
5918
|
-
import { z as
|
|
5942
|
+
import { z as z210 } from "zod";
|
|
5919
5943
|
var DTOFigmaNodeRenderFormat = FigmaNodeRenderFormat;
|
|
5920
|
-
var DTOFigmaNodeOrigin =
|
|
5921
|
-
sourceId:
|
|
5922
|
-
fileId:
|
|
5923
|
-
parentName:
|
|
5944
|
+
var DTOFigmaNodeOrigin = z210.object({
|
|
5945
|
+
sourceId: z210.string(),
|
|
5946
|
+
fileId: z210.string().optional(),
|
|
5947
|
+
parentName: z210.string().optional()
|
|
5924
5948
|
});
|
|
5925
|
-
var DTOFigmaNodeData =
|
|
5949
|
+
var DTOFigmaNodeData = z210.object({
|
|
5926
5950
|
// Id of the node in the Figma file
|
|
5927
|
-
figmaNodeId:
|
|
5951
|
+
figmaNodeId: z210.string(),
|
|
5928
5952
|
// Validity
|
|
5929
|
-
isValid:
|
|
5953
|
+
isValid: z210.boolean(),
|
|
5930
5954
|
// Asset data
|
|
5931
|
-
assetId:
|
|
5932
|
-
assetUrl:
|
|
5955
|
+
assetId: z210.string(),
|
|
5956
|
+
assetUrl: z210.string(),
|
|
5933
5957
|
assetFormat: DTOFigmaNodeRenderFormat,
|
|
5934
5958
|
// Asset metadata
|
|
5935
|
-
assetScale:
|
|
5936
|
-
assetWidth:
|
|
5937
|
-
assetHeight:
|
|
5959
|
+
assetScale: z210.number(),
|
|
5960
|
+
assetWidth: z210.number().optional(),
|
|
5961
|
+
assetHeight: z210.number().optional()
|
|
5938
5962
|
});
|
|
5939
5963
|
var DTOFigmaNode = FigmaNodeReference.omit({
|
|
5940
5964
|
data: true,
|
|
@@ -5943,15 +5967,15 @@ var DTOFigmaNode = FigmaNodeReference.omit({
|
|
|
5943
5967
|
data: DTOFigmaNodeData,
|
|
5944
5968
|
origin: DTOFigmaNodeOrigin
|
|
5945
5969
|
});
|
|
5946
|
-
var DTOFigmaNodeRenderInput =
|
|
5970
|
+
var DTOFigmaNodeRenderInput = z210.object({
|
|
5947
5971
|
/**
|
|
5948
5972
|
* Id of a design system's data source representing a linked Figma file
|
|
5949
5973
|
*/
|
|
5950
|
-
sourceId:
|
|
5974
|
+
sourceId: z210.string(),
|
|
5951
5975
|
/**
|
|
5952
5976
|
* Id of a node within the Figma file
|
|
5953
5977
|
*/
|
|
5954
|
-
figmaFileNodeId:
|
|
5978
|
+
figmaFileNodeId: z210.string(),
|
|
5955
5979
|
/**
|
|
5956
5980
|
* Format in which the node must be rendered, png by default.
|
|
5957
5981
|
*/
|
|
@@ -5959,97 +5983,97 @@ var DTOFigmaNodeRenderInput = z209.object({
|
|
|
5959
5983
|
});
|
|
5960
5984
|
|
|
5961
5985
|
// src/api/dto/elements/figma-nodes/node-actions-v2.ts
|
|
5962
|
-
import { z as
|
|
5963
|
-
var DTOFigmaNodeRenderActionOutput =
|
|
5964
|
-
type:
|
|
5965
|
-
figmaNodes:
|
|
5986
|
+
import { z as z211 } from "zod";
|
|
5987
|
+
var DTOFigmaNodeRenderActionOutput = z211.object({
|
|
5988
|
+
type: z211.literal("FigmaNodeRender"),
|
|
5989
|
+
figmaNodes: z211.array(DTOFigmaNode)
|
|
5966
5990
|
});
|
|
5967
|
-
var DTOFigmaNodeRenderActionInput =
|
|
5968
|
-
type:
|
|
5991
|
+
var DTOFigmaNodeRenderActionInput = z211.object({
|
|
5992
|
+
type: z211.literal("FigmaNodeRender"),
|
|
5969
5993
|
input: DTOFigmaNodeRenderInput.array()
|
|
5970
5994
|
});
|
|
5971
5995
|
|
|
5972
5996
|
// src/api/dto/elements/properties/property-definitions-actions-v2.ts
|
|
5973
|
-
import { z as
|
|
5997
|
+
import { z as z213 } from "zod";
|
|
5974
5998
|
|
|
5975
5999
|
// src/api/dto/elements/properties/property-definitions.ts
|
|
5976
|
-
import { z as
|
|
6000
|
+
import { z as z212 } from "zod";
|
|
5977
6001
|
var CODE_NAME_REGEX2 = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
5978
|
-
var DTOElementPropertyDefinition =
|
|
5979
|
-
id:
|
|
5980
|
-
designSystemVersionId:
|
|
6002
|
+
var DTOElementPropertyDefinition = z212.object({
|
|
6003
|
+
id: z212.string(),
|
|
6004
|
+
designSystemVersionId: z212.string(),
|
|
5981
6005
|
meta: ObjectMeta,
|
|
5982
|
-
persistentId:
|
|
6006
|
+
persistentId: z212.string(),
|
|
5983
6007
|
type: ElementPropertyTypeSchema,
|
|
5984
6008
|
targetElementType: ElementPropertyTargetType,
|
|
5985
|
-
codeName:
|
|
5986
|
-
options:
|
|
6009
|
+
codeName: z212.string().regex(CODE_NAME_REGEX2),
|
|
6010
|
+
options: z212.array(ElementPropertyDefinitionOption).optional(),
|
|
5987
6011
|
linkElementType: ElementPropertyLinkType.optional()
|
|
5988
6012
|
});
|
|
5989
|
-
var DTOElementPropertyDefinitionsGetResponse =
|
|
5990
|
-
definitions:
|
|
6013
|
+
var DTOElementPropertyDefinitionsGetResponse = z212.object({
|
|
6014
|
+
definitions: z212.array(DTOElementPropertyDefinition)
|
|
5991
6015
|
});
|
|
5992
6016
|
var DTOCreateElementPropertyDefinitionInputV2 = DTOElementPropertyDefinition.omit({
|
|
5993
6017
|
id: true,
|
|
5994
6018
|
designSystemVersionId: true
|
|
5995
6019
|
});
|
|
5996
|
-
var DTOUpdateElementPropertyDefinitionInputV2 =
|
|
5997
|
-
id:
|
|
5998
|
-
name:
|
|
5999
|
-
description:
|
|
6000
|
-
codeName:
|
|
6001
|
-
options:
|
|
6020
|
+
var DTOUpdateElementPropertyDefinitionInputV2 = z212.object({
|
|
6021
|
+
id: z212.string(),
|
|
6022
|
+
name: z212.string().optional(),
|
|
6023
|
+
description: z212.string().optional(),
|
|
6024
|
+
codeName: z212.string().regex(CODE_NAME_REGEX2).optional(),
|
|
6025
|
+
options: z212.array(ElementPropertyDefinitionOption).optional()
|
|
6002
6026
|
});
|
|
6003
|
-
var DTODeleteElementPropertyDefinitionInputV2 =
|
|
6004
|
-
id:
|
|
6027
|
+
var DTODeleteElementPropertyDefinitionInputV2 = z212.object({
|
|
6028
|
+
id: z212.string()
|
|
6005
6029
|
});
|
|
6006
6030
|
|
|
6007
6031
|
// src/api/dto/elements/properties/property-definitions-actions-v2.ts
|
|
6008
|
-
var SuccessPayload3 =
|
|
6009
|
-
success:
|
|
6032
|
+
var SuccessPayload3 = z213.object({
|
|
6033
|
+
success: z213.literal(true)
|
|
6010
6034
|
});
|
|
6011
|
-
var DTOPropertyDefinitionCreateActionOutputV2 =
|
|
6012
|
-
type:
|
|
6035
|
+
var DTOPropertyDefinitionCreateActionOutputV2 = z213.object({
|
|
6036
|
+
type: z213.literal("PropertyDefinitionCreate"),
|
|
6013
6037
|
definition: DTOElementPropertyDefinition
|
|
6014
6038
|
});
|
|
6015
|
-
var DTOPropertyDefinitionUpdateActionOutputV2 =
|
|
6016
|
-
type:
|
|
6039
|
+
var DTOPropertyDefinitionUpdateActionOutputV2 = z213.object({
|
|
6040
|
+
type: z213.literal("PropertyDefinitionUpdate"),
|
|
6017
6041
|
definition: DTOElementPropertyDefinition
|
|
6018
6042
|
});
|
|
6019
|
-
var DTOPropertyDefinitionDeleteActionOutputV2 =
|
|
6020
|
-
type:
|
|
6043
|
+
var DTOPropertyDefinitionDeleteActionOutputV2 = z213.object({
|
|
6044
|
+
type: z213.literal("PropertyDefinitionDelete"),
|
|
6021
6045
|
output: SuccessPayload3
|
|
6022
6046
|
});
|
|
6023
|
-
var DTOPropertyDefinitionCreateActionInputV2 =
|
|
6024
|
-
type:
|
|
6047
|
+
var DTOPropertyDefinitionCreateActionInputV2 = z213.object({
|
|
6048
|
+
type: z213.literal("PropertyDefinitionCreate"),
|
|
6025
6049
|
input: DTOCreateElementPropertyDefinitionInputV2
|
|
6026
6050
|
});
|
|
6027
|
-
var DTOPropertyDefinitionUpdateActionInputV2 =
|
|
6028
|
-
type:
|
|
6051
|
+
var DTOPropertyDefinitionUpdateActionInputV2 = z213.object({
|
|
6052
|
+
type: z213.literal("PropertyDefinitionUpdate"),
|
|
6029
6053
|
input: DTOUpdateElementPropertyDefinitionInputV2
|
|
6030
6054
|
});
|
|
6031
|
-
var DTOPropertyDefinitionDeleteActionInputV2 =
|
|
6032
|
-
type:
|
|
6055
|
+
var DTOPropertyDefinitionDeleteActionInputV2 = z213.object({
|
|
6056
|
+
type: z213.literal("PropertyDefinitionDelete"),
|
|
6033
6057
|
input: DTODeleteElementPropertyDefinitionInputV2
|
|
6034
6058
|
});
|
|
6035
6059
|
|
|
6036
6060
|
// src/api/dto/elements/properties/property-values.ts
|
|
6037
|
-
import { z as
|
|
6038
|
-
var DTOElementPropertyValue =
|
|
6039
|
-
id:
|
|
6040
|
-
designSystemVersionId:
|
|
6041
|
-
definitionId:
|
|
6042
|
-
targetElementId:
|
|
6043
|
-
value:
|
|
6044
|
-
valuePreview:
|
|
6061
|
+
import { z as z214 } from "zod";
|
|
6062
|
+
var DTOElementPropertyValue = z214.object({
|
|
6063
|
+
id: z214.string(),
|
|
6064
|
+
designSystemVersionId: z214.string(),
|
|
6065
|
+
definitionId: z214.string(),
|
|
6066
|
+
targetElementId: z214.string(),
|
|
6067
|
+
value: z214.union([z214.string(), z214.number(), z214.boolean()]).optional(),
|
|
6068
|
+
valuePreview: z214.string().optional()
|
|
6045
6069
|
});
|
|
6046
|
-
var DTOElementPropertyValuesGetResponse =
|
|
6047
|
-
values:
|
|
6070
|
+
var DTOElementPropertyValuesGetResponse = z214.object({
|
|
6071
|
+
values: z214.array(DTOElementPropertyValue)
|
|
6048
6072
|
});
|
|
6049
6073
|
|
|
6050
6074
|
// src/api/dto/elements/elements-action-v2.ts
|
|
6051
|
-
import { z as
|
|
6052
|
-
var DTOElementActionOutput =
|
|
6075
|
+
import { z as z215 } from "zod";
|
|
6076
|
+
var DTOElementActionOutput = z215.discriminatedUnion("type", [
|
|
6053
6077
|
// Documentation pages
|
|
6054
6078
|
DTODocumentationPageCreateActionOutputV2,
|
|
6055
6079
|
DTODocumentationPageUpdateActionOutputV2,
|
|
@@ -6076,7 +6100,7 @@ var DTOElementActionOutput = z214.discriminatedUnion("type", [
|
|
|
6076
6100
|
// Approvals
|
|
6077
6101
|
DTODocumentationPageApprovalStateChangeActionOutput
|
|
6078
6102
|
]);
|
|
6079
|
-
var DTOElementActionInput =
|
|
6103
|
+
var DTOElementActionInput = z215.discriminatedUnion("type", [
|
|
6080
6104
|
// Documentation pages
|
|
6081
6105
|
DTODocumentationPageCreateActionInputV2,
|
|
6082
6106
|
DTODocumentationPageUpdateActionInputV2,
|
|
@@ -6105,141 +6129,141 @@ var DTOElementActionInput = z214.discriminatedUnion("type", [
|
|
|
6105
6129
|
]);
|
|
6106
6130
|
|
|
6107
6131
|
// src/api/dto/elements/get-elements-v2.ts
|
|
6108
|
-
import { z as
|
|
6109
|
-
var DTOElementsGetTypeFilter =
|
|
6110
|
-
var DTOElementsGetQuerySchema =
|
|
6111
|
-
types:
|
|
6132
|
+
import { z as z216 } from "zod";
|
|
6133
|
+
var DTOElementsGetTypeFilter = z216.enum(["FigmaNode"]);
|
|
6134
|
+
var DTOElementsGetQuerySchema = z216.object({
|
|
6135
|
+
types: z216.string().transform((val) => val.split(",").map((v) => DTOElementsGetTypeFilter.parse(v)))
|
|
6112
6136
|
});
|
|
6113
|
-
var DTOElementsGetOutput =
|
|
6114
|
-
figmaNodes:
|
|
6137
|
+
var DTOElementsGetOutput = z216.object({
|
|
6138
|
+
figmaNodes: z216.array(DTOFigmaNode).optional()
|
|
6115
6139
|
});
|
|
6116
6140
|
|
|
6117
6141
|
// src/api/dto/figma-components/assets/download.ts
|
|
6118
|
-
import { z as
|
|
6119
|
-
var DTOAssetRenderConfiguration =
|
|
6120
|
-
prefix:
|
|
6121
|
-
suffix:
|
|
6122
|
-
scale:
|
|
6123
|
-
format:
|
|
6124
|
-
});
|
|
6125
|
-
var DTORenderedAssetFile =
|
|
6126
|
-
assetId:
|
|
6127
|
-
fileName:
|
|
6128
|
-
sourceUrl:
|
|
6142
|
+
import { z as z217 } from "zod";
|
|
6143
|
+
var DTOAssetRenderConfiguration = z217.object({
|
|
6144
|
+
prefix: z217.string().optional(),
|
|
6145
|
+
suffix: z217.string().optional(),
|
|
6146
|
+
scale: z217.enum(["x1", "x2", "x3", "x4"]),
|
|
6147
|
+
format: z217.enum(["png", "pdf", "svg"])
|
|
6148
|
+
});
|
|
6149
|
+
var DTORenderedAssetFile = z217.object({
|
|
6150
|
+
assetId: z217.string(),
|
|
6151
|
+
fileName: z217.string(),
|
|
6152
|
+
sourceUrl: z217.string(),
|
|
6129
6153
|
settings: DTOAssetRenderConfiguration,
|
|
6130
|
-
originalName:
|
|
6154
|
+
originalName: z217.string()
|
|
6131
6155
|
});
|
|
6132
|
-
var DTODownloadAssetsRequest =
|
|
6133
|
-
persistentIds:
|
|
6156
|
+
var DTODownloadAssetsRequest = z217.object({
|
|
6157
|
+
persistentIds: z217.array(z217.string().uuid()).optional(),
|
|
6134
6158
|
settings: DTOAssetRenderConfiguration.array()
|
|
6135
6159
|
});
|
|
6136
|
-
var DTODownloadAssetsResponse =
|
|
6160
|
+
var DTODownloadAssetsResponse = z217.object({
|
|
6137
6161
|
items: DTORenderedAssetFile.array()
|
|
6138
6162
|
});
|
|
6139
6163
|
|
|
6140
6164
|
// src/api/dto/liveblocks/auth-response.ts
|
|
6141
|
-
import { z as
|
|
6142
|
-
var DTOLiveblocksAuthResponse =
|
|
6143
|
-
token:
|
|
6165
|
+
import { z as z218 } from "zod";
|
|
6166
|
+
var DTOLiveblocksAuthResponse = z218.object({
|
|
6167
|
+
token: z218.string()
|
|
6144
6168
|
});
|
|
6145
6169
|
|
|
6146
6170
|
// src/api/dto/users/profile/update.ts
|
|
6147
|
-
import { z as
|
|
6148
|
-
var DTOUserProfileUpdateResponse =
|
|
6171
|
+
import { z as z219 } from "zod";
|
|
6172
|
+
var DTOUserProfileUpdateResponse = z219.object({
|
|
6149
6173
|
user: User
|
|
6150
6174
|
});
|
|
6151
6175
|
|
|
6152
6176
|
// src/api/dto/workspaces/git.ts
|
|
6153
|
-
import { z as
|
|
6154
|
-
var DTOGitOrganization =
|
|
6155
|
-
id:
|
|
6156
|
-
name:
|
|
6157
|
-
url:
|
|
6158
|
-
slug:
|
|
6159
|
-
});
|
|
6160
|
-
var DTOGitProject =
|
|
6161
|
-
id:
|
|
6162
|
-
name:
|
|
6163
|
-
url:
|
|
6164
|
-
slug:
|
|
6165
|
-
});
|
|
6166
|
-
var DTOGitRepository =
|
|
6167
|
-
id:
|
|
6168
|
-
name:
|
|
6169
|
-
url:
|
|
6170
|
-
slug:
|
|
6171
|
-
defaultBranch:
|
|
6172
|
-
});
|
|
6173
|
-
var DTOGitBranch =
|
|
6174
|
-
name:
|
|
6175
|
-
lastCommitId:
|
|
6177
|
+
import { z as z220 } from "zod";
|
|
6178
|
+
var DTOGitOrganization = z220.object({
|
|
6179
|
+
id: z220.string(),
|
|
6180
|
+
name: z220.string(),
|
|
6181
|
+
url: z220.string(),
|
|
6182
|
+
slug: z220.string()
|
|
6183
|
+
});
|
|
6184
|
+
var DTOGitProject = z220.object({
|
|
6185
|
+
id: z220.string(),
|
|
6186
|
+
name: z220.string(),
|
|
6187
|
+
url: z220.string(),
|
|
6188
|
+
slug: z220.string()
|
|
6189
|
+
});
|
|
6190
|
+
var DTOGitRepository = z220.object({
|
|
6191
|
+
id: z220.string(),
|
|
6192
|
+
name: z220.string(),
|
|
6193
|
+
url: z220.string(),
|
|
6194
|
+
slug: z220.string(),
|
|
6195
|
+
defaultBranch: z220.string().optional()
|
|
6196
|
+
});
|
|
6197
|
+
var DTOGitBranch = z220.object({
|
|
6198
|
+
name: z220.string(),
|
|
6199
|
+
lastCommitId: z220.string()
|
|
6176
6200
|
});
|
|
6177
6201
|
|
|
6178
6202
|
// src/api/dto/workspaces/integrations.ts
|
|
6179
|
-
import { z as
|
|
6203
|
+
import { z as z221 } from "zod";
|
|
6180
6204
|
var DTOIntegrationCredentials = IntegrationCredentials.omit({
|
|
6181
6205
|
accessToken: true,
|
|
6182
6206
|
refreshToken: true
|
|
6183
6207
|
});
|
|
6184
|
-
var DTOIntegration =
|
|
6185
|
-
id:
|
|
6186
|
-
workspaceId:
|
|
6208
|
+
var DTOIntegration = z221.object({
|
|
6209
|
+
id: z221.string(),
|
|
6210
|
+
workspaceId: z221.string(),
|
|
6187
6211
|
type: ExtendedIntegrationType,
|
|
6188
|
-
createdAt:
|
|
6189
|
-
integrationCredentials:
|
|
6190
|
-
integrationDesignSystems:
|
|
6212
|
+
createdAt: z221.coerce.date(),
|
|
6213
|
+
integrationCredentials: z221.array(DTOIntegrationCredentials).optional(),
|
|
6214
|
+
integrationDesignSystems: z221.array(IntegrationDesignSystem).optional()
|
|
6191
6215
|
});
|
|
6192
|
-
var DTOIntegrationOAuthGetResponse =
|
|
6193
|
-
url:
|
|
6216
|
+
var DTOIntegrationOAuthGetResponse = z221.object({
|
|
6217
|
+
url: z221.string()
|
|
6194
6218
|
});
|
|
6195
|
-
var DTOIntegrationPostResponse =
|
|
6219
|
+
var DTOIntegrationPostResponse = z221.object({
|
|
6196
6220
|
integration: DTOIntegration
|
|
6197
6221
|
});
|
|
6198
|
-
var DTOIntegrationsGetListResponse =
|
|
6222
|
+
var DTOIntegrationsGetListResponse = z221.object({
|
|
6199
6223
|
integrations: DTOIntegration.array()
|
|
6200
6224
|
});
|
|
6201
6225
|
|
|
6202
6226
|
// src/api/dto/workspaces/membership.ts
|
|
6203
|
-
import { z as
|
|
6227
|
+
import { z as z224 } from "zod";
|
|
6204
6228
|
|
|
6205
6229
|
// src/api/dto/workspaces/workspace.ts
|
|
6206
|
-
import { z as
|
|
6230
|
+
import { z as z223 } from "zod";
|
|
6207
6231
|
|
|
6208
6232
|
// src/api/dto/workspaces/npm-registry.ts
|
|
6209
|
-
import { z as
|
|
6233
|
+
import { z as z222 } from "zod";
|
|
6210
6234
|
var DTONpmRegistryConfigConstants = {
|
|
6211
6235
|
passwordPlaceholder: "redacted"
|
|
6212
6236
|
};
|
|
6213
|
-
var DTONpmRegistryConfig =
|
|
6237
|
+
var DTONpmRegistryConfig = z222.object({
|
|
6214
6238
|
// Registry basic configuration
|
|
6215
6239
|
registryType: NpmRegistryType,
|
|
6216
|
-
registryUrl:
|
|
6217
|
-
customRegistryUrl:
|
|
6240
|
+
registryUrl: z222.string(),
|
|
6241
|
+
customRegistryUrl: z222.string().optional(),
|
|
6218
6242
|
// URL of Supernova NPM packages proxy
|
|
6219
|
-
proxyUrl:
|
|
6243
|
+
proxyUrl: z222.string(),
|
|
6220
6244
|
// Auth configuration
|
|
6221
6245
|
authType: NpmRegistryAuthType,
|
|
6222
|
-
accessToken:
|
|
6223
|
-
username:
|
|
6224
|
-
password:
|
|
6246
|
+
accessToken: z222.literal(DTONpmRegistryConfigConstants.passwordPlaceholder).optional(),
|
|
6247
|
+
username: z222.string().optional(),
|
|
6248
|
+
password: z222.literal(DTONpmRegistryConfigConstants.passwordPlaceholder).optional(),
|
|
6225
6249
|
// NPM package scopes for whih the proxy should be enabled
|
|
6226
|
-
enabledScopes:
|
|
6250
|
+
enabledScopes: z222.array(z222.string()),
|
|
6227
6251
|
// True if client should bypass Supernova proxy and connect directly to the registry
|
|
6228
6252
|
// (e.g. when the NPM registry is behind a VPN or firewall which prevents Supernova from accessing it)
|
|
6229
|
-
bypassProxy:
|
|
6253
|
+
bypassProxy: z222.boolean()
|
|
6230
6254
|
});
|
|
6231
6255
|
|
|
6232
6256
|
// src/api/dto/workspaces/workspace.ts
|
|
6233
|
-
var DTOWorkspace =
|
|
6234
|
-
id:
|
|
6257
|
+
var DTOWorkspace = z223.object({
|
|
6258
|
+
id: z223.string(),
|
|
6235
6259
|
profile: WorkspaceProfile,
|
|
6236
6260
|
subscription: Subscription,
|
|
6237
6261
|
npmRegistry: DTONpmRegistryConfig.optional()
|
|
6238
6262
|
});
|
|
6239
6263
|
|
|
6240
6264
|
// src/api/dto/workspaces/membership.ts
|
|
6241
|
-
var DTOWorkspaceRole =
|
|
6242
|
-
var DTOUserWorkspaceMembership =
|
|
6265
|
+
var DTOWorkspaceRole = z224.enum(["Owner", "Admin", "Creator", "Viewer", "Billing"]);
|
|
6266
|
+
var DTOUserWorkspaceMembership = z224.object({
|
|
6243
6267
|
// Workspace the user is a member of
|
|
6244
6268
|
workspace: DTOWorkspace,
|
|
6245
6269
|
// Assigned role the user has in the workspace
|
|
@@ -6249,8 +6273,8 @@ var DTOUserWorkspaceMembership = z223.object({
|
|
|
6249
6273
|
// when a workspace's subscription is downgraded to free tier
|
|
6250
6274
|
effectiveRole: DTOWorkspaceRole
|
|
6251
6275
|
});
|
|
6252
|
-
var DTOUserWorkspaceMembershipsResponse =
|
|
6253
|
-
membership:
|
|
6276
|
+
var DTOUserWorkspaceMembershipsResponse = z224.object({
|
|
6277
|
+
membership: z224.array(DTOUserWorkspaceMembership)
|
|
6254
6278
|
});
|
|
6255
6279
|
|
|
6256
6280
|
// src/utils/hash.ts
|
|
@@ -6312,7 +6336,7 @@ function generateHash(input, debug = false) {
|
|
|
6312
6336
|
}
|
|
6313
6337
|
|
|
6314
6338
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
6315
|
-
import { z as
|
|
6339
|
+
import { z as z225 } from "zod";
|
|
6316
6340
|
|
|
6317
6341
|
// src/yjs/version-room/base.ts
|
|
6318
6342
|
var VersionRoomBaseYDoc = class {
|
|
@@ -6841,24 +6865,24 @@ var FrontendVersionRoomYDoc = class {
|
|
|
6841
6865
|
};
|
|
6842
6866
|
|
|
6843
6867
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
6844
|
-
var DocumentationHierarchySettings =
|
|
6845
|
-
routingVersion:
|
|
6846
|
-
isDraftFeatureAdopted:
|
|
6847
|
-
isApprovalFeatureEnabled:
|
|
6848
|
-
approvalRequiredForPublishing:
|
|
6868
|
+
var DocumentationHierarchySettings = z225.object({
|
|
6869
|
+
routingVersion: z225.string(),
|
|
6870
|
+
isDraftFeatureAdopted: z225.boolean(),
|
|
6871
|
+
isApprovalFeatureEnabled: z225.boolean(),
|
|
6872
|
+
approvalRequiredForPublishing: z225.boolean()
|
|
6849
6873
|
});
|
|
6850
6874
|
function yjsToDocumentationHierarchy(doc) {
|
|
6851
6875
|
return new FrontendVersionRoomYDoc(doc).getDocumentationHierarchy();
|
|
6852
6876
|
}
|
|
6853
6877
|
|
|
6854
6878
|
// src/yjs/design-system-content/item-configuration.ts
|
|
6855
|
-
import { z as
|
|
6856
|
-
var DTODocumentationPageRoomHeaderData =
|
|
6857
|
-
title:
|
|
6879
|
+
import { z as z226 } from "zod";
|
|
6880
|
+
var DTODocumentationPageRoomHeaderData = z226.object({
|
|
6881
|
+
title: z226.string(),
|
|
6858
6882
|
configuration: DTODocumentationItemConfigurationV2
|
|
6859
6883
|
});
|
|
6860
|
-
var DTODocumentationPageRoomHeaderDataUpdate =
|
|
6861
|
-
title:
|
|
6884
|
+
var DTODocumentationPageRoomHeaderDataUpdate = z226.object({
|
|
6885
|
+
title: z226.string().optional(),
|
|
6862
6886
|
configuration: DTODocumentationItemConfigurationV2.omit({ header: true }).extend({ header: DocumentationItemHeaderV2.partial() }).optional()
|
|
6863
6887
|
});
|
|
6864
6888
|
function itemConfigurationToYjs(yDoc, item) {
|
|
@@ -6909,7 +6933,7 @@ function yjsToItemConfiguration(yDoc) {
|
|
|
6909
6933
|
header: rawHeader
|
|
6910
6934
|
};
|
|
6911
6935
|
return {
|
|
6912
|
-
title:
|
|
6936
|
+
title: z226.string().parse(title),
|
|
6913
6937
|
configuration: DTODocumentationItemConfigurationV2.parse(rawConfig)
|
|
6914
6938
|
};
|
|
6915
6939
|
}
|
|
@@ -6919,9 +6943,9 @@ var PageBlockEditorModel = PageBlockEditorModelV2;
|
|
|
6919
6943
|
var PageSectionEditorModel = PageSectionEditorModelV2;
|
|
6920
6944
|
|
|
6921
6945
|
// src/yjs/docs-editor/model/page.ts
|
|
6922
|
-
import { z as
|
|
6923
|
-
var DocumentationPageEditorModel =
|
|
6924
|
-
blocks:
|
|
6946
|
+
import { z as z227 } from "zod";
|
|
6947
|
+
var DocumentationPageEditorModel = z227.object({
|
|
6948
|
+
blocks: z227.array(DocumentationPageContentItem)
|
|
6925
6949
|
});
|
|
6926
6950
|
|
|
6927
6951
|
// src/yjs/docs-editor/prosemirror/schema.ts
|
|
@@ -10594,7 +10618,7 @@ var blocks = [
|
|
|
10594
10618
|
|
|
10595
10619
|
// src/yjs/docs-editor/prosemirror-to-blocks.ts
|
|
10596
10620
|
import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
|
|
10597
|
-
import { z as
|
|
10621
|
+
import { z as z228 } from "zod";
|
|
10598
10622
|
function yDocToPage(yDoc, definitions) {
|
|
10599
10623
|
return yXmlFragmentToPage(yDoc.getXmlFragment("default"), definitions);
|
|
10600
10624
|
}
|
|
@@ -10637,7 +10661,7 @@ function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
|
|
|
10637
10661
|
return null;
|
|
10638
10662
|
return {
|
|
10639
10663
|
id,
|
|
10640
|
-
title: getProsemirrorAttribute(prosemirrorNode, "title",
|
|
10664
|
+
title: getProsemirrorAttribute(prosemirrorNode, "title", z228.string()) ?? "",
|
|
10641
10665
|
columns: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(nonNullFilter)
|
|
10642
10666
|
};
|
|
10643
10667
|
}
|
|
@@ -10672,7 +10696,7 @@ function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap, dept
|
|
|
10672
10696
|
});
|
|
10673
10697
|
}
|
|
10674
10698
|
function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap, depth) {
|
|
10675
|
-
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId",
|
|
10699
|
+
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z228.string());
|
|
10676
10700
|
if (!definitionId) {
|
|
10677
10701
|
console.warn(`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`);
|
|
10678
10702
|
return [];
|
|
@@ -10714,7 +10738,7 @@ function parseAsRichText(prosemirrorNode, definition, property) {
|
|
|
10714
10738
|
if (!id)
|
|
10715
10739
|
return null;
|
|
10716
10740
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
10717
|
-
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type",
|
|
10741
|
+
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z228.string().optional()));
|
|
10718
10742
|
return {
|
|
10719
10743
|
id,
|
|
10720
10744
|
type: "Block",
|
|
@@ -10842,10 +10866,10 @@ function parseRichTextAttribute(mark) {
|
|
|
10842
10866
|
return null;
|
|
10843
10867
|
}
|
|
10844
10868
|
function parseProsemirrorLink(mark) {
|
|
10845
|
-
const href = getProsemirrorAttribute(mark, "href",
|
|
10869
|
+
const href = getProsemirrorAttribute(mark, "href", z228.string().optional());
|
|
10846
10870
|
if (!href)
|
|
10847
10871
|
return null;
|
|
10848
|
-
const target = getProsemirrorAttribute(mark, "target",
|
|
10872
|
+
const target = getProsemirrorAttribute(mark, "target", z228.string().optional());
|
|
10849
10873
|
const openInNewTab = target === "_blank";
|
|
10850
10874
|
if (href.startsWith("@")) {
|
|
10851
10875
|
return {
|
|
@@ -10864,10 +10888,10 @@ function parseProsemirrorLink(mark) {
|
|
|
10864
10888
|
}
|
|
10865
10889
|
}
|
|
10866
10890
|
function parseProsemirrorCommentHighlight(mark) {
|
|
10867
|
-
const highlightId = getProsemirrorAttribute(mark, "highlightId",
|
|
10891
|
+
const highlightId = getProsemirrorAttribute(mark, "highlightId", z228.string().optional());
|
|
10868
10892
|
if (!highlightId)
|
|
10869
10893
|
return null;
|
|
10870
|
-
const isResolved = getProsemirrorAttribute(mark, "resolved",
|
|
10894
|
+
const isResolved = getProsemirrorAttribute(mark, "resolved", z228.boolean().optional()) ?? false;
|
|
10871
10895
|
return {
|
|
10872
10896
|
type: "Comment",
|
|
10873
10897
|
commentHighlightId: highlightId,
|
|
@@ -10879,7 +10903,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
10879
10903
|
if (!id)
|
|
10880
10904
|
return null;
|
|
10881
10905
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
10882
|
-
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder",
|
|
10906
|
+
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z228.boolean().optional()) !== false;
|
|
10883
10907
|
const tableChild = prosemirrorNode.content?.find((c) => c.type === "table");
|
|
10884
10908
|
if (!tableChild) {
|
|
10885
10909
|
return emptyTable(id, variantId, 0);
|
|
@@ -10926,9 +10950,9 @@ function parseAsTableCell(prosemirrorNode) {
|
|
|
10926
10950
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
10927
10951
|
if (!id)
|
|
10928
10952
|
return null;
|
|
10929
|
-
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign",
|
|
10953
|
+
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z228.string().optional());
|
|
10930
10954
|
let columnWidth;
|
|
10931
|
-
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth",
|
|
10955
|
+
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z228.array(z228.number()).optional());
|
|
10932
10956
|
if (columnWidthArray) {
|
|
10933
10957
|
columnWidth = roundDimension(columnWidthArray[0]);
|
|
10934
10958
|
}
|
|
@@ -10966,7 +10990,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
10966
10990
|
value: parseRichText(prosemirrorNode.content ?? [])
|
|
10967
10991
|
};
|
|
10968
10992
|
case "image":
|
|
10969
|
-
const items = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
10993
|
+
const items = getProsemirrorAttribute(prosemirrorNode, "items", z228.string());
|
|
10970
10994
|
if (!items)
|
|
10971
10995
|
return null;
|
|
10972
10996
|
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
@@ -11083,7 +11107,7 @@ function definitionExpectsPlaceholderItem(definition) {
|
|
|
11083
11107
|
);
|
|
11084
11108
|
}
|
|
11085
11109
|
function parseBlockItems(prosemirrorNode, definition) {
|
|
11086
|
-
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
11110
|
+
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z228.string());
|
|
11087
11111
|
if (!itemsString)
|
|
11088
11112
|
return null;
|
|
11089
11113
|
const itemsJson = JSON.parse(itemsString);
|
|
@@ -11095,18 +11119,18 @@ function parseBlockItems(prosemirrorNode, definition) {
|
|
|
11095
11119
|
}
|
|
11096
11120
|
function parseAppearance(prosemirrorNode) {
|
|
11097
11121
|
let appearance = {};
|
|
11098
|
-
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance",
|
|
11122
|
+
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance", z228.string().optional());
|
|
11099
11123
|
if (rawAppearanceString) {
|
|
11100
11124
|
const parsedAppearance = PageBlockAppearanceV2.safeParse(JSON.parse(rawAppearanceString));
|
|
11101
11125
|
if (parsedAppearance.success) {
|
|
11102
11126
|
appearance = parsedAppearance.data;
|
|
11103
11127
|
}
|
|
11104
11128
|
}
|
|
11105
|
-
const columns = getProsemirrorAttribute(prosemirrorNode, "columns",
|
|
11129
|
+
const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z228.number().optional());
|
|
11106
11130
|
if (columns) {
|
|
11107
11131
|
appearance.numberOfColumns = columns;
|
|
11108
11132
|
}
|
|
11109
|
-
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor",
|
|
11133
|
+
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z228.string().optional());
|
|
11110
11134
|
if (backgroundColor) {
|
|
11111
11135
|
const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
|
|
11112
11136
|
if (parsedColor.success) {
|
|
@@ -11201,13 +11225,13 @@ function valueSchemaForPropertyType(type) {
|
|
|
11201
11225
|
}
|
|
11202
11226
|
}
|
|
11203
11227
|
function getProsemirrorBlockId(prosemirrorNode) {
|
|
11204
|
-
const id = getProsemirrorAttribute(prosemirrorNode, "id",
|
|
11228
|
+
const id = getProsemirrorAttribute(prosemirrorNode, "id", z228.string());
|
|
11205
11229
|
if (!id)
|
|
11206
11230
|
console.warn(`Prosemirror attribute "id" on ${prosemirrorNode.type} is required`);
|
|
11207
11231
|
return id;
|
|
11208
11232
|
}
|
|
11209
11233
|
function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
11210
|
-
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(
|
|
11234
|
+
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z228.string()));
|
|
11211
11235
|
}
|
|
11212
11236
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
11213
11237
|
const parsedAttr = validationSchema.safeParse(prosemirrorNode.attrs?.[attributeName]);
|
|
@@ -11388,6 +11412,7 @@ export {
|
|
|
11388
11412
|
DTOExporterSource,
|
|
11389
11413
|
DTOExporterType,
|
|
11390
11414
|
DTOExporterUpdateInput,
|
|
11415
|
+
DTOFigmaComponent,
|
|
11391
11416
|
DTOFigmaNode,
|
|
11392
11417
|
DTOFigmaNodeData,
|
|
11393
11418
|
DTOFigmaNodeOrigin,
|