@supernova-studio/client 0.48.28 → 0.48.29
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.js +2010 -2009
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2030 -2029
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -45,8 +45,10 @@ var _zod = require('zod');
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
48
|
+
var _deepequal = require('deep-equal'); var _deepequal2 = _interopRequireDefault(_deepequal);
|
|
48
49
|
|
|
49
50
|
|
|
51
|
+
var _slugify = require('@sindresorhus/slugify'); var _slugify2 = _interopRequireDefault(_slugify);
|
|
50
52
|
|
|
51
53
|
|
|
52
54
|
|
|
@@ -116,7 +118,6 @@ var _zod = require('zod');
|
|
|
116
118
|
|
|
117
119
|
|
|
118
120
|
|
|
119
|
-
var _slugify = require('@sindresorhus/slugify'); var _slugify2 = _interopRequireDefault(_slugify);
|
|
120
121
|
|
|
121
122
|
|
|
122
123
|
|
|
@@ -645,2016 +646,133 @@ var ComponentElementData = _zod.z.object({
|
|
|
645
646
|
}).optional()
|
|
646
647
|
})
|
|
647
648
|
});
|
|
648
|
-
var
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
649
|
+
var SupernovaException = class _SupernovaException extends Error {
|
|
650
|
+
//
|
|
651
|
+
// Properties
|
|
652
|
+
//
|
|
653
|
+
constructor(type, message) {
|
|
654
|
+
super(`${type}: ${message}`);
|
|
655
|
+
this.type = type;
|
|
656
|
+
}
|
|
657
|
+
static wrongFormat(message) {
|
|
658
|
+
return new _SupernovaException("WrongFormat", message);
|
|
659
|
+
}
|
|
660
|
+
static validationError(message) {
|
|
661
|
+
return new _SupernovaException("ValidationError", message);
|
|
662
|
+
}
|
|
663
|
+
static accessDenied(message) {
|
|
664
|
+
return new _SupernovaException("AccessDenied", message);
|
|
665
|
+
}
|
|
666
|
+
static tooMuchWork(message) {
|
|
667
|
+
return new _SupernovaException("TooMuchWork", message);
|
|
668
|
+
}
|
|
669
|
+
static notFound(message) {
|
|
670
|
+
return new _SupernovaException("ResourceNotFound", message);
|
|
671
|
+
}
|
|
672
|
+
static timeout(message) {
|
|
673
|
+
return new _SupernovaException("Timeout", message);
|
|
674
|
+
}
|
|
675
|
+
static conflict(message) {
|
|
676
|
+
return new _SupernovaException("Conflict", message);
|
|
677
|
+
}
|
|
678
|
+
static notImplemented(message) {
|
|
679
|
+
return new _SupernovaException("NotImplemented", message);
|
|
680
|
+
}
|
|
681
|
+
static wrongActionOrder(message) {
|
|
682
|
+
return new _SupernovaException("WrongActionOrder", message);
|
|
683
|
+
}
|
|
684
|
+
static invalidOperation(message) {
|
|
685
|
+
return new _SupernovaException("InvalidOperation", message);
|
|
686
|
+
}
|
|
687
|
+
static shouldNotHappen(message) {
|
|
688
|
+
return new _SupernovaException("UnexpectedError", message);
|
|
689
|
+
}
|
|
690
|
+
static ipRestricted(message) {
|
|
691
|
+
return new _SupernovaException("IPRestricted", message);
|
|
692
|
+
}
|
|
693
|
+
static planRestricted(message) {
|
|
694
|
+
return new _SupernovaException("PlanRestricted", message);
|
|
695
|
+
}
|
|
696
|
+
static missingWorkspacePermission(message) {
|
|
697
|
+
return new _SupernovaException("MissingWorkspacePermission", message);
|
|
698
|
+
}
|
|
699
|
+
static missingExporterPermission(message) {
|
|
700
|
+
return new _SupernovaException("MissingExporterPermission", message);
|
|
701
|
+
}
|
|
702
|
+
static missingIntegration(message) {
|
|
703
|
+
return new _SupernovaException("MissingIntegration", message);
|
|
704
|
+
}
|
|
705
|
+
static missingIntegrationAccess(message) {
|
|
706
|
+
return new _SupernovaException("MissingIntegrationAccess", message);
|
|
707
|
+
}
|
|
708
|
+
static noAccess(message) {
|
|
709
|
+
return new _SupernovaException("NoAccess", message);
|
|
710
|
+
}
|
|
711
|
+
static missingCredentials(message) {
|
|
712
|
+
return new _SupernovaException("MissingCredentials", message);
|
|
713
|
+
}
|
|
714
|
+
static thirdPartyError(message) {
|
|
715
|
+
return new _SupernovaException("ThirdPartyError", message);
|
|
716
|
+
}
|
|
717
|
+
//
|
|
718
|
+
// To refactor
|
|
719
|
+
//
|
|
720
|
+
static badRequest(message) {
|
|
721
|
+
return new _SupernovaException("BadRequest", message);
|
|
722
|
+
}
|
|
723
|
+
};
|
|
724
|
+
function tryParseUrl(url) {
|
|
725
|
+
try {
|
|
726
|
+
return parseUrl(url);
|
|
727
|
+
} catch (e) {
|
|
728
|
+
console.error(`Error parsing URL ${url}`);
|
|
729
|
+
console.error(e);
|
|
730
|
+
return null;
|
|
731
|
+
}
|
|
691
732
|
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
733
|
+
function parseUrl(url) {
|
|
734
|
+
return new URL(url.startsWith("https://") || url.startsWith("http://") ? url : `https://${url}`);
|
|
735
|
+
}
|
|
736
|
+
function mapByUnique(items, keyFn) {
|
|
737
|
+
const result = /* @__PURE__ */ new Map();
|
|
738
|
+
for (const item of items) {
|
|
739
|
+
result.set(keyFn(item), item);
|
|
740
|
+
}
|
|
741
|
+
return result;
|
|
742
|
+
}
|
|
743
|
+
function groupBy(items, keyFn) {
|
|
744
|
+
const result = /* @__PURE__ */ new Map();
|
|
745
|
+
for (const item of items) {
|
|
746
|
+
const key = keyFn(item);
|
|
747
|
+
const array = result.get(key);
|
|
748
|
+
if (array) {
|
|
749
|
+
array.push(item);
|
|
750
|
+
} else {
|
|
751
|
+
result.set(key, [item]);
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
return result;
|
|
755
|
+
}
|
|
756
|
+
var ContentLoadInstruction = _zod.z.object({
|
|
757
|
+
from: _zod.z.string(),
|
|
758
|
+
to: _zod.z.string(),
|
|
759
|
+
authorizationHeaderKvsId: _zod.z.string().optional(),
|
|
760
|
+
timeout: _zod.z.number().optional()
|
|
702
761
|
});
|
|
703
|
-
var
|
|
704
|
-
"
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
"BorderWidth",
|
|
718
|
-
"BorderRadius",
|
|
719
|
-
"Duration",
|
|
720
|
-
"ZIndex",
|
|
721
|
-
"Image",
|
|
722
|
-
"String",
|
|
723
|
-
"ProductCopy",
|
|
724
|
-
"FontFamily",
|
|
725
|
-
"FontWeight",
|
|
726
|
-
"TextDecoration",
|
|
727
|
-
"TextCase",
|
|
728
|
-
"Visibility",
|
|
729
|
-
"Typography",
|
|
730
|
-
"Blur",
|
|
731
|
-
"Font"
|
|
732
|
-
]);
|
|
733
|
-
var tokenElementTypes = [...DesignTokenType.options.filter((v) => v !== "Font")];
|
|
734
|
-
var DesignElementType = DesignTokenType.or(
|
|
735
|
-
_zod.z.enum([
|
|
736
|
-
"Component",
|
|
737
|
-
"Theme",
|
|
738
|
-
"Documentation",
|
|
739
|
-
"DocumentationPage",
|
|
740
|
-
"DesignSystemComponent",
|
|
741
|
-
"ElementGroup",
|
|
742
|
-
"FigmaNodeStructure",
|
|
743
|
-
"FigmaNodeReference",
|
|
744
|
-
"PageBlock"
|
|
745
|
-
])
|
|
746
|
-
);
|
|
747
|
-
var DesignElementCategory = _zod.z.enum([
|
|
748
|
-
"Token",
|
|
749
|
-
"Component",
|
|
750
|
-
"DesignSystemComponent",
|
|
751
|
-
"DocumentationPage",
|
|
752
|
-
"Theme",
|
|
753
|
-
"PageBlock"
|
|
754
|
-
]);
|
|
755
|
-
var DesignSystemElementExportProps = _zod.z.object({
|
|
756
|
-
isAsset: _zod.z.boolean().nullish().transform((v) => _nullishCoalesce(v, () => ( false))),
|
|
757
|
-
codeName: _zod.z.string().nullish()
|
|
758
|
-
});
|
|
759
|
-
var ShallowDesignElement = _zod.z.object({
|
|
760
|
-
id: _zod.z.string(),
|
|
761
|
-
persistentId: _zod.z.string(),
|
|
762
|
-
designSystemVersionId: _zod.z.string(),
|
|
763
|
-
type: DesignElementType,
|
|
764
|
-
brandPersistentId: _zod.z.string().optional(),
|
|
765
|
-
parentPersistentId: _zod.z.string().optional(),
|
|
766
|
-
shortPersistentId: _zod.z.string().optional(),
|
|
767
|
-
childType: DesignElementType.optional(),
|
|
768
|
-
sortOrder: _zod.z.number(),
|
|
769
|
-
origin: _zod.z.record(_zod.z.any()).optional(),
|
|
770
|
-
createdAt: _zod.z.coerce.date(),
|
|
771
|
-
updatedAt: _zod.z.coerce.date()
|
|
772
|
-
});
|
|
773
|
-
var DesignElement = ShallowDesignElement.extend({
|
|
774
|
-
meta: ObjectMeta,
|
|
775
|
-
slug: _zod.z.string().optional(),
|
|
776
|
-
userSlug: _zod.z.string().optional(),
|
|
777
|
-
exportProperties: DesignSystemElementExportProps.optional(),
|
|
778
|
-
data: _zod.z.record(_zod.z.any()),
|
|
779
|
-
origin: _zod.z.record(_zod.z.any()).optional()
|
|
780
|
-
});
|
|
781
|
-
var HierarchicalElements = DesignTokenType.or(
|
|
782
|
-
_zod.z.enum(["Component", "DesignSystemComponent", "DocumentationPage"])
|
|
783
|
-
);
|
|
784
|
-
var PageBlockCalloutType = _zod.z.enum(["Info", "Primary", "Success", "Warning", "Error"]);
|
|
785
|
-
var PageBlockTypeV1 = _zod.z.enum([
|
|
786
|
-
"Text",
|
|
787
|
-
"Heading",
|
|
788
|
-
"Code",
|
|
789
|
-
"UnorderedList",
|
|
790
|
-
"OrderedList",
|
|
791
|
-
"Quote",
|
|
792
|
-
"Callout",
|
|
793
|
-
"Divider",
|
|
794
|
-
"Image",
|
|
795
|
-
"Embed",
|
|
796
|
-
"Link",
|
|
797
|
-
"Shortcuts",
|
|
798
|
-
"FigmaEmbed",
|
|
799
|
-
"YoutubeEmbed",
|
|
800
|
-
"StorybookEmbed",
|
|
801
|
-
"Token",
|
|
802
|
-
"TokenGroup",
|
|
803
|
-
"TokenList",
|
|
804
|
-
"Component",
|
|
805
|
-
"ComponentGroup",
|
|
806
|
-
"Theme",
|
|
807
|
-
"ComponentSandbox",
|
|
808
|
-
"Custom",
|
|
809
|
-
"FigmaFrames",
|
|
810
|
-
"ComponentAssets",
|
|
811
|
-
"RenderCode",
|
|
812
|
-
"Tabs",
|
|
813
|
-
"TabItem",
|
|
814
|
-
"Table",
|
|
815
|
-
"TableRow",
|
|
816
|
-
"TableCell",
|
|
817
|
-
"Guidelines"
|
|
818
|
-
]);
|
|
819
|
-
var PageBlockCodeLanguage = _zod.z.enum([
|
|
820
|
-
"Angular",
|
|
821
|
-
"Bash",
|
|
822
|
-
"C",
|
|
823
|
-
"Cpp",
|
|
824
|
-
"Csharp",
|
|
825
|
-
"CSS",
|
|
826
|
-
"Dart",
|
|
827
|
-
"Handlebars",
|
|
828
|
-
"HTML",
|
|
829
|
-
"Java",
|
|
830
|
-
"Javascript",
|
|
831
|
-
"JSON",
|
|
832
|
-
"ReactJSX",
|
|
833
|
-
"ReactTSX",
|
|
834
|
-
"Kotlin",
|
|
835
|
-
"Lua",
|
|
836
|
-
"Markdown",
|
|
837
|
-
"ObjectiveC",
|
|
838
|
-
"PHP",
|
|
839
|
-
"Plain",
|
|
840
|
-
"Python",
|
|
841
|
-
"Ruby",
|
|
842
|
-
"Rust",
|
|
843
|
-
"Sass",
|
|
844
|
-
"SCSS",
|
|
845
|
-
"Svetle",
|
|
846
|
-
"Swift",
|
|
847
|
-
"Twig",
|
|
848
|
-
"Typescript",
|
|
849
|
-
"Vue",
|
|
850
|
-
"XML",
|
|
851
|
-
"YAML"
|
|
852
|
-
]);
|
|
853
|
-
var PageBlockAlignment = _zod.z.enum(["Left", "Center", "Stretch", "Right"]);
|
|
854
|
-
var PageBlockThemeType = _zod.z.enum(["Override", "Comparison"]);
|
|
855
|
-
var PageBlockAssetType = _zod.z.enum(["image", "figmaFrame"]);
|
|
856
|
-
var PageBlockTilesAlignment = _zod.z.enum(["Center", "FrameHeight"]);
|
|
857
|
-
var PageBlockTilesLayout = _zod.z.enum(["C8", "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C1_75"]);
|
|
858
|
-
var PageBlockTheme = _zod.z.object({
|
|
859
|
-
themeIds: _zod.z.array(_zod.z.string()),
|
|
860
|
-
type: PageBlockThemeType
|
|
861
|
-
});
|
|
862
|
-
var PageBlockUrlPreview = _zod.z.object({
|
|
863
|
-
title: nullishToOptional(_zod.z.string()),
|
|
864
|
-
description: nullishToOptional(_zod.z.string()),
|
|
865
|
-
thumbnailUrl: nullishToOptional(_zod.z.string())
|
|
866
|
-
});
|
|
867
|
-
var PageBlockFrameOrigin = _zod.z.object({
|
|
868
|
-
sourceFileName: nullishToOptional(_zod.z.string()),
|
|
869
|
-
title: nullishToOptional(_zod.z.string()),
|
|
870
|
-
previewUrl: nullishToOptional(_zod.z.string()),
|
|
871
|
-
valid: nullishToOptional(_zod.z.boolean()),
|
|
872
|
-
referenceId: nullishToOptional(_zod.z.string()),
|
|
873
|
-
assetId: nullishToOptional(_zod.z.string()),
|
|
874
|
-
assetScale: nullishToOptional(_zod.z.number()),
|
|
875
|
-
width: nullishToOptional(_zod.z.number()),
|
|
876
|
-
height: nullishToOptional(_zod.z.number())
|
|
877
|
-
});
|
|
878
|
-
var PageBlockFrame = _zod.z.object({
|
|
879
|
-
persistentId: _zod.z.string(),
|
|
880
|
-
sourceId: _zod.z.string(),
|
|
881
|
-
sourceFrameId: _zod.z.string(),
|
|
882
|
-
title: nullishToOptional(_zod.z.string()),
|
|
883
|
-
description: nullishToOptional(_zod.z.string()),
|
|
884
|
-
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
885
|
-
origin: nullishToOptional(PageBlockFrameOrigin)
|
|
886
|
-
});
|
|
887
|
-
var PageBlockAsset = _zod.z.object({
|
|
888
|
-
type: PageBlockAssetType,
|
|
889
|
-
id: nullishToOptional(_zod.z.string()),
|
|
890
|
-
url: nullishToOptional(_zod.z.string()),
|
|
891
|
-
figmaFrame: nullishToOptional(PageBlockFrame)
|
|
892
|
-
});
|
|
893
|
-
var PageBlockLinkPreview = _zod.z.object({
|
|
894
|
-
title: nullishToOptional(_zod.z.string()),
|
|
895
|
-
valid: nullishToOptional(_zod.z.boolean())
|
|
896
|
-
});
|
|
897
|
-
var PageBlockShortcut = _zod.z.object({
|
|
898
|
-
persistentId: _zod.z.string(),
|
|
899
|
-
title: nullishToOptional(_zod.z.string()),
|
|
900
|
-
description: nullishToOptional(_zod.z.string()),
|
|
901
|
-
asset: nullishToOptional(PageBlockAsset),
|
|
902
|
-
documentationItemId: nullishToOptional(_zod.z.string()),
|
|
903
|
-
pageHeadingId: nullishToOptional(_zod.z.string()),
|
|
904
|
-
url: nullishToOptional(_zod.z.string()),
|
|
905
|
-
openInNewTab: nullishToOptional(_zod.z.boolean()),
|
|
906
|
-
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
907
|
-
documentationItemPreview: nullishToOptional(PageBlockLinkPreview)
|
|
908
|
-
});
|
|
909
|
-
var PageBlockCustomBlockPropertyImageValue = _zod.z.object({
|
|
910
|
-
asset: nullishToOptional(PageBlockAsset),
|
|
911
|
-
assetId: nullishToOptional(_zod.z.string()),
|
|
912
|
-
assetUrl: nullishToOptional(_zod.z.string())
|
|
913
|
-
});
|
|
914
|
-
var PageBlockCustomBlockPropertyValue = _zod.z.object({
|
|
915
|
-
key: _zod.z.string(),
|
|
916
|
-
value: _zod.z.any()
|
|
917
|
-
// TODO Artem: for some reason there are cases when there's an array here in the DB
|
|
918
|
-
// e.g. element id 67451 in the dev db
|
|
919
|
-
// value: z
|
|
920
|
-
// .boolean()
|
|
921
|
-
// .or(z.number())
|
|
922
|
-
// .or(z.string())
|
|
923
|
-
// .or(ColorTokenData)
|
|
924
|
-
// .or(TypographyTokenData)
|
|
925
|
-
// .or(PageBlockCustomBlockPropertyImageValue),
|
|
926
|
-
});
|
|
927
|
-
var PageBlockFigmaFrameProperties = _zod.z.object({
|
|
928
|
-
color: nullishToOptional(
|
|
929
|
-
_zod.z.object({
|
|
930
|
-
value: _zod.z.string()
|
|
931
|
-
})
|
|
932
|
-
),
|
|
933
|
-
alignment: PageBlockTilesAlignment,
|
|
934
|
-
layout: PageBlockTilesLayout,
|
|
935
|
-
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
936
|
-
showTitles: _zod.z.boolean()
|
|
937
|
-
});
|
|
938
|
-
var PageBlockRenderCodeProperties = _zod.z.object({
|
|
939
|
-
showCode: _zod.z.boolean(),
|
|
940
|
-
showControls: _zod.z.boolean().optional()
|
|
941
|
-
});
|
|
942
|
-
var PageBlockAssetComponent = _zod.z.object({
|
|
943
|
-
persistentId: _zod.z.string(),
|
|
944
|
-
componentAssetId: _zod.z.string(),
|
|
945
|
-
title: nullishToOptional(_zod.z.string()),
|
|
946
|
-
description: nullishToOptional(_zod.z.string()),
|
|
947
|
-
backgroundColor: nullishToOptional(ColorTokenInlineData)
|
|
948
|
-
});
|
|
949
|
-
var PageBlockTableColumn = _zod.z.object({
|
|
950
|
-
id: _zod.z.string(),
|
|
951
|
-
width: DimensionTokenData
|
|
952
|
-
});
|
|
953
|
-
var PageBlockTableProperties = _zod.z.object({
|
|
954
|
-
showBorders: _zod.z.boolean(),
|
|
955
|
-
showHeaderRow: _zod.z.boolean(),
|
|
956
|
-
showHeaderColumn: _zod.z.boolean(),
|
|
957
|
-
columns: _zod.z.array(PageBlockTableColumn)
|
|
958
|
-
});
|
|
959
|
-
var PageBlockTextSpanAttributeType = _zod.z.enum(["Bold", "Italic", "Link", "Strikethrough", "Code", "Comment"]);
|
|
960
|
-
var PageBlockTextSpanAttribute = _zod.z.object({
|
|
961
|
-
type: PageBlockTextSpanAttributeType,
|
|
962
|
-
// Link attributes
|
|
963
|
-
link: nullishToOptional(_zod.z.string()),
|
|
964
|
-
documentationItemId: nullishToOptional(_zod.z.string()),
|
|
965
|
-
openInNewWindow: nullishToOptional(_zod.z.boolean()),
|
|
966
|
-
// deprecated. use openInNewTab
|
|
967
|
-
openInNewTab: nullishToOptional(_zod.z.boolean()),
|
|
968
|
-
// Comment attributes
|
|
969
|
-
commentHighlightId: nullishToOptional(_zod.z.string()),
|
|
970
|
-
commentIsResolved: nullishToOptional(_zod.z.boolean())
|
|
971
|
-
});
|
|
972
|
-
var PageBlockTextSpan = _zod.z.object({
|
|
973
|
-
text: _zod.z.string(),
|
|
974
|
-
attributes: _zod.z.array(PageBlockTextSpanAttribute)
|
|
975
|
-
});
|
|
976
|
-
var PageBlockText = _zod.z.object({
|
|
977
|
-
spans: _zod.z.array(PageBlockTextSpan)
|
|
978
|
-
});
|
|
979
|
-
var PageBlockGuideline = _zod.z.object({
|
|
980
|
-
description: nullishToOptional(_zod.z.string()),
|
|
981
|
-
asset: nullishToOptional(PageBlockAsset),
|
|
982
|
-
type: _zod.z.string()
|
|
983
|
-
});
|
|
984
|
-
var PageBlockBaseV1 = _zod.z.object({
|
|
985
|
-
persistentId: _zod.z.string(),
|
|
986
|
-
type: PageBlockTypeV1,
|
|
987
|
-
numberOfColumns: nullishToOptional(_zod.z.number()),
|
|
988
|
-
// Element linking
|
|
989
|
-
designObjectId: nullishToOptional(_zod.z.string()),
|
|
990
|
-
designObjectIds: nullishToOptional(_zod.z.array(_zod.z.string())),
|
|
991
|
-
tokenType: nullishToOptional(DesignTokenType.or(_zod.z.literal("Font"))),
|
|
992
|
-
showNestedGroups: nullishToOptional(_zod.z.boolean()),
|
|
993
|
-
brandId: nullishToOptional(_zod.z.string()),
|
|
994
|
-
// Rich text
|
|
995
|
-
text: nullishToOptional(PageBlockText),
|
|
996
|
-
caption: nullishToOptional(_zod.z.string()),
|
|
997
|
-
headingType: nullishToOptional(_zod.z.number().min(1).max(3)),
|
|
998
|
-
codeLanguage: nullishToOptional(PageBlockCodeLanguage),
|
|
999
|
-
calloutType: nullishToOptional(PageBlockCalloutType),
|
|
1000
|
-
urlInput: nullishToOptional(_zod.z.string()),
|
|
1001
|
-
url: nullishToOptional(_zod.z.string()),
|
|
1002
|
-
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
1003
|
-
// Image
|
|
1004
|
-
asset: nullishToOptional(PageBlockAsset),
|
|
1005
|
-
alignment: nullishToOptional(PageBlockAlignment),
|
|
1006
|
-
// Shortcuts block
|
|
1007
|
-
shortcuts: nullishToOptional(_zod.z.array(PageBlockShortcut)),
|
|
1008
|
-
// Guidelines
|
|
1009
|
-
guidelines: nullishToOptional(PageBlockGuideline.array()),
|
|
1010
|
-
// Custom blocks
|
|
1011
|
-
customBlockKey: nullishToOptional(_zod.z.string()),
|
|
1012
|
-
customBlockProperties: nullishToOptional(_zod.z.array(PageBlockCustomBlockPropertyValue)),
|
|
1013
|
-
variantKey: nullishToOptional(_zod.z.string()),
|
|
1014
|
-
// Figma frames
|
|
1015
|
-
figmaFrameProperties: nullishToOptional(PageBlockFigmaFrameProperties),
|
|
1016
|
-
figmaFrames: nullishToOptional(_zod.z.array(PageBlockFrame)),
|
|
1017
|
-
// Generic
|
|
1018
|
-
size: nullishToOptional(Size),
|
|
1019
|
-
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
1020
|
-
// Render code
|
|
1021
|
-
renderCodeProperties: nullishToOptional(PageBlockRenderCodeProperties),
|
|
1022
|
-
// Component assets
|
|
1023
|
-
componentAssets: nullishToOptional(_zod.z.array(PageBlockAssetComponent)),
|
|
1024
|
-
// Tables
|
|
1025
|
-
tableProperties: nullishToOptional(PageBlockTableProperties),
|
|
1026
|
-
columnId: nullishToOptional(_zod.z.string()),
|
|
1027
|
-
// Token spreadsheet
|
|
1028
|
-
theme: nullishToOptional(PageBlockTheme),
|
|
1029
|
-
blacklistedElementProperties: nullishToOptional(_zod.z.array(_zod.z.string())),
|
|
1030
|
-
// Arbitrary
|
|
1031
|
-
userMetadata: nullishToOptional(_zod.z.string())
|
|
1032
|
-
});
|
|
1033
|
-
var PageBlockV1 = PageBlockBaseV1.extend({
|
|
1034
|
-
children: _zod.z.lazy(
|
|
1035
|
-
() => PageBlockV1.array().nullish().transform((t) => _nullishCoalesce(t, () => ( [])))
|
|
1036
|
-
)
|
|
1037
|
-
});
|
|
1038
|
-
var PageBlockLinkType = _zod.z.enum(["DocumentationItem", "PageHeading", "Url"]);
|
|
1039
|
-
var PageBlockImageType = _zod.z.enum(["Resource", "FigmaNode"]);
|
|
1040
|
-
var PageBlockImageAlignment = _zod.z.enum(["Left", "Center", "Stretch"]);
|
|
1041
|
-
var PageBlockTableCellAlignment = _zod.z.enum(["Left", "Center", "Right"]);
|
|
1042
|
-
var PageBlockPreviewContainerSize = _zod.z.enum(["Centered", "NaturalHeight"]);
|
|
1043
|
-
var PageBlockThemeDisplayMode = _zod.z.enum(["Split", "Override"]);
|
|
1044
|
-
var PageBlockImageResourceReference = _zod.z.object({
|
|
1045
|
-
resourceId: _zod.z.string(),
|
|
1046
|
-
url: _zod.z.string()
|
|
1047
|
-
});
|
|
1048
|
-
var PageBlockResourceFrameNodeReference = _zod.z.object({
|
|
1049
|
-
sourceId: _zod.z.string(),
|
|
1050
|
-
frameReferenceId: _zod.z.string()
|
|
1051
|
-
});
|
|
1052
|
-
var PageBlockImageReference = _zod.z.object({
|
|
1053
|
-
type: PageBlockImageType,
|
|
1054
|
-
resource: PageBlockImageResourceReference.optional(),
|
|
1055
|
-
figmaNode: PageBlockResourceFrameNodeReference.optional()
|
|
1056
|
-
});
|
|
1057
|
-
var PageBlockColorV2 = _zod.z.object({
|
|
1058
|
-
value: _zod.z.string(),
|
|
1059
|
-
referencedTokenId: _zod.z.string().optional()
|
|
1060
|
-
});
|
|
1061
|
-
var PageBlockAssetEntityMeta = _zod.z.object({
|
|
1062
|
-
title: _zod.z.string().optional(),
|
|
1063
|
-
description: _zod.z.string().optional(),
|
|
1064
|
-
backgroundColor: PageBlockColorV2.optional()
|
|
1065
|
-
});
|
|
1066
|
-
var PageBlockFigmaComponentEntityMeta = _zod.z.object({
|
|
1067
|
-
title: _zod.z.string().optional(),
|
|
1068
|
-
description: _zod.z.string().optional(),
|
|
1069
|
-
backgroundColor: PageBlockColorV2.optional(),
|
|
1070
|
-
selectedComponentProperties: _zod.z.array(_zod.z.string()).optional()
|
|
1071
|
-
});
|
|
1072
|
-
var PageBlockFigmaNodeEntityMeta = _zod.z.object({
|
|
1073
|
-
title: _zod.z.string().optional(),
|
|
1074
|
-
description: _zod.z.string().optional(),
|
|
1075
|
-
backgroundColor: PageBlockColorV2.optional()
|
|
1076
|
-
});
|
|
1077
|
-
var PageBlockAppearanceV2 = _zod.z.object({
|
|
1078
|
-
itemBackgroundColor: PageBlockColorV2.optional(),
|
|
1079
|
-
numberOfColumns: _zod.z.number().optional()
|
|
1080
|
-
});
|
|
1081
|
-
var PageBlockItemUntypedValue = _zod.z.object({
|
|
1082
|
-
value: _zod.z.any()
|
|
1083
|
-
}).and(_zod.z.record(_zod.z.any()));
|
|
1084
|
-
var PageBlockLinkV2 = _zod.z.object({
|
|
1085
|
-
type: PageBlockLinkType,
|
|
1086
|
-
documentationItemId: _zod.z.string().optional(),
|
|
1087
|
-
pageHeadingId: _zod.z.string().optional(),
|
|
1088
|
-
url: _zod.z.string().optional(),
|
|
1089
|
-
openInNewTab: _zod.z.boolean().optional()
|
|
1090
|
-
});
|
|
1091
|
-
var PageBlockItemV2 = _zod.z.object({
|
|
1092
|
-
id: _zod.z.string(),
|
|
1093
|
-
linksTo: PageBlockLinkV2.optional(),
|
|
1094
|
-
props: _zod.z.record(PageBlockItemUntypedValue)
|
|
1095
|
-
});
|
|
1096
|
-
var PageBlockDataV2 = _zod.z.object({
|
|
1097
|
-
packageId: _zod.z.string(),
|
|
1098
|
-
variantId: _zod.z.string().optional(),
|
|
1099
|
-
indentLevel: _zod.z.number(),
|
|
1100
|
-
appearance: PageBlockAppearanceV2.optional(),
|
|
1101
|
-
items: _zod.z.array(PageBlockItemV2)
|
|
1102
|
-
});
|
|
1103
|
-
var PageBlockItemAssetValue = _zod.z.object({
|
|
1104
|
-
selectedPropertyIds: _zod.z.array(_zod.z.string()).optional(),
|
|
1105
|
-
showSearch: _zod.z.boolean().optional(),
|
|
1106
|
-
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1107
|
-
backgroundColor: PageBlockColorV2.optional(),
|
|
1108
|
-
value: _zod.z.array(
|
|
1109
|
-
_zod.z.object({
|
|
1110
|
-
entityId: _zod.z.string(),
|
|
1111
|
-
entityType: _zod.z.enum(["Asset", "AssetGroup"]),
|
|
1112
|
-
entityMeta: PageBlockAssetEntityMeta.optional()
|
|
1113
|
-
})
|
|
1114
|
-
).default([])
|
|
1115
|
-
});
|
|
1116
|
-
var PageBlockItemAssetPropertyValue = _zod.z.object({
|
|
1117
|
-
value: _zod.z.array(_zod.z.string()).default([])
|
|
1118
|
-
});
|
|
1119
|
-
var PageBlockItemFigmaComponentValue = _zod.z.object({
|
|
1120
|
-
showComponentName: _zod.z.boolean().optional(),
|
|
1121
|
-
showComponentDescription: _zod.z.boolean().optional(),
|
|
1122
|
-
showPropertyList: _zod.z.boolean().optional(),
|
|
1123
|
-
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1124
|
-
backgroundColor: PageBlockColorV2.optional(),
|
|
1125
|
-
value: _zod.z.array(
|
|
1126
|
-
_zod.z.object({
|
|
1127
|
-
entityId: _zod.z.string(),
|
|
1128
|
-
entityType: _zod.z.enum(["FigmaComponent"]),
|
|
1129
|
-
entityMeta: PageBlockFigmaComponentEntityMeta.optional()
|
|
1130
|
-
})
|
|
1131
|
-
).default([])
|
|
1132
|
-
});
|
|
1133
|
-
var PageBlockItemBooleanValue = _zod.z.object({
|
|
1134
|
-
value: _zod.z.boolean()
|
|
1135
|
-
});
|
|
1136
|
-
var PageBlockItemCodeValue = _zod.z.object({
|
|
1137
|
-
format: PageBlockCodeLanguage.optional(),
|
|
1138
|
-
caption: _zod.z.string().optional(),
|
|
1139
|
-
value: _zod.z.string()
|
|
1140
|
-
});
|
|
1141
|
-
var PageBlockItemSandboxValue = _zod.z.object({
|
|
1142
|
-
showCode: _zod.z.boolean().optional(),
|
|
1143
|
-
showControls: _zod.z.boolean().optional(),
|
|
1144
|
-
backgroundColor: _zod.z.string().optional(),
|
|
1145
|
-
alignPreview: _zod.z.enum(["Left", "Center"]).optional(),
|
|
1146
|
-
previewHeight: _zod.z.number().optional(),
|
|
1147
|
-
value: _zod.z.string()
|
|
1148
|
-
});
|
|
1149
|
-
var PageBlockItemColorValue = _zod.z.record(_zod.z.any());
|
|
1150
|
-
var PageBlockItemComponentValue = _zod.z.object({
|
|
1151
|
-
selectedPropertyIds: _zod.z.array(_zod.z.string()).optional(),
|
|
1152
|
-
value: _zod.z.array(
|
|
1153
|
-
_zod.z.object({
|
|
1154
|
-
entityId: _zod.z.string(),
|
|
1155
|
-
entityType: _zod.z.enum(["Component", "ComponentGroup"])
|
|
1156
|
-
})
|
|
1157
|
-
).default([])
|
|
1158
|
-
});
|
|
1159
|
-
var PageBlockItemComponentPropertyValue = _zod.z.object({
|
|
1160
|
-
value: _zod.z.string()
|
|
1161
|
-
});
|
|
1162
|
-
var PageBlockItemDividerValue = _zod.z.object({});
|
|
1163
|
-
var PageBlockItemEmbedValue = _zod.z.object({
|
|
1164
|
-
value: _zod.z.string().optional(),
|
|
1165
|
-
caption: _zod.z.string().optional(),
|
|
1166
|
-
height: _zod.z.number().optional(),
|
|
1167
|
-
openGraph: _zod.z.object({
|
|
1168
|
-
title: _zod.z.string().optional(),
|
|
1169
|
-
description: _zod.z.string().optional(),
|
|
1170
|
-
imageUrl: _zod.z.string().optional()
|
|
1171
|
-
}).optional()
|
|
1172
|
-
});
|
|
1173
|
-
var PageBlockItemFigmaNodeValue = _zod.z.object({
|
|
1174
|
-
showSearch: _zod.z.boolean().optional(),
|
|
1175
|
-
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1176
|
-
backgroundColor: PageBlockColorV2.optional(),
|
|
1177
|
-
showFrameDetails: _zod.z.boolean().optional(),
|
|
1178
|
-
value: _zod.z.array(
|
|
1179
|
-
_zod.z.object({
|
|
1180
|
-
entityId: _zod.z.string(),
|
|
1181
|
-
entityMeta: PageBlockFigmaNodeEntityMeta.optional()
|
|
1182
|
-
})
|
|
1183
|
-
).default([])
|
|
1184
|
-
});
|
|
1185
|
-
var PageBlockItemImageValue = _zod.z.object({
|
|
1186
|
-
alt: _zod.z.string().optional(),
|
|
1187
|
-
caption: _zod.z.string().optional(),
|
|
1188
|
-
alignment: PageBlockImageAlignment.optional(),
|
|
1189
|
-
value: PageBlockImageReference.optional()
|
|
1190
|
-
});
|
|
1191
|
-
var PageBlockItemMarkdownValue = _zod.z.object({
|
|
1192
|
-
value: _zod.z.string()
|
|
1193
|
-
});
|
|
1194
|
-
var PageBlockItemMultiRichTextValue = _zod.z.object({
|
|
1195
|
-
value: PageBlockText.array()
|
|
1196
|
-
});
|
|
1197
|
-
var PageBlockItemMultiSelectValue = _zod.z.object({
|
|
1198
|
-
value: _zod.z.array(_zod.z.string()).default([])
|
|
1199
|
-
});
|
|
1200
|
-
var PageBlockItemNumberValue = _zod.z.object({
|
|
1201
|
-
value: _zod.z.number()
|
|
1202
|
-
});
|
|
1203
|
-
var PageBlockItemRichTextValue = _zod.z.object({
|
|
1204
|
-
value: PageBlockText,
|
|
1205
|
-
calloutType: PageBlockCalloutType.optional()
|
|
1206
|
-
});
|
|
1207
|
-
var PageBlockItemSingleSelectValue = _zod.z.object({
|
|
1208
|
-
value: _zod.z.string()
|
|
1209
|
-
});
|
|
1210
|
-
var PageBlockItemStorybookValue = _zod.z.object({
|
|
1211
|
-
caption: _zod.z.string().optional(),
|
|
1212
|
-
height: _zod.z.number().optional(),
|
|
1213
|
-
embedUrl: _zod.z.string().optional(),
|
|
1214
|
-
value: _zod.z.string().optional()
|
|
1215
|
-
});
|
|
1216
|
-
var PageBlockItemTextValue = _zod.z.object({
|
|
1217
|
-
value: _zod.z.string()
|
|
1218
|
-
});
|
|
1219
|
-
var PageBlockItemTokenValue = _zod.z.object({
|
|
1220
|
-
selectedPropertyIds: _zod.z.array(_zod.z.string()).optional(),
|
|
1221
|
-
selectedThemeIds: _zod.z.array(_zod.z.string()).optional(),
|
|
1222
|
-
themeDisplayMode: PageBlockThemeDisplayMode.optional(),
|
|
1223
|
-
value: _zod.z.array(
|
|
1224
|
-
_zod.z.object({
|
|
1225
|
-
entityId: _zod.z.string(),
|
|
1226
|
-
entityType: _zod.z.enum(["Token", "TokenGroup"]),
|
|
1227
|
-
entityMeta: _zod.z.object({
|
|
1228
|
-
showNestedGroups: _zod.z.boolean().optional()
|
|
1229
|
-
}).optional()
|
|
1230
|
-
})
|
|
1231
|
-
).default([])
|
|
1232
|
-
});
|
|
1233
|
-
var PageBlockItemTokenPropertyValue = _zod.z.object({
|
|
1234
|
-
selectedPropertyIds: _zod.z.array(_zod.z.string()).optional(),
|
|
1235
|
-
selectedThemeIds: _zod.z.array(_zod.z.string()).optional(),
|
|
1236
|
-
value: _zod.z.array(_zod.z.string()).default([])
|
|
1237
|
-
});
|
|
1238
|
-
var PageBlockItemTokenTypeValue = _zod.z.object({
|
|
1239
|
-
value: _zod.z.array(DesignTokenType).default([])
|
|
1240
|
-
});
|
|
1241
|
-
var PageBlockItemUrlValue = _zod.z.object({
|
|
1242
|
-
value: _zod.z.string()
|
|
1243
|
-
});
|
|
1244
|
-
var PageBlockItemTableRichTextNode = _zod.z.object({
|
|
1245
|
-
type: _zod.z.literal("RichText"),
|
|
1246
|
-
id: _zod.z.string(),
|
|
1247
|
-
value: PageBlockItemRichTextValue.shape.value
|
|
1248
|
-
});
|
|
1249
|
-
var PageBlockItemTableMultiRichTextNode = _zod.z.object({
|
|
1250
|
-
type: _zod.z.literal("MultiRichText"),
|
|
1251
|
-
value: PageBlockItemMultiRichTextValue.shape.value
|
|
1252
|
-
});
|
|
1253
|
-
var PageBlockItemTableImageNode = _zod.z.object({
|
|
1254
|
-
type: _zod.z.literal("Image"),
|
|
1255
|
-
id: _zod.z.string(),
|
|
1256
|
-
caption: PageBlockItemImageValue.shape.caption,
|
|
1257
|
-
value: PageBlockItemImageValue.shape.value
|
|
1258
|
-
});
|
|
1259
|
-
var PageBlockItemTableNode = _zod.z.discriminatedUnion("type", [
|
|
1260
|
-
PageBlockItemTableRichTextNode,
|
|
1261
|
-
// PageBlockItemTableMultiRichTextNode,
|
|
1262
|
-
PageBlockItemTableImageNode
|
|
1263
|
-
]);
|
|
1264
|
-
var PageBlockItemTableCell = _zod.z.object({
|
|
1265
|
-
id: _zod.z.string(),
|
|
1266
|
-
nodes: _zod.z.array(PageBlockItemTableNode),
|
|
1267
|
-
columnWidth: _zod.z.number().optional(),
|
|
1268
|
-
alignment: PageBlockTableCellAlignment
|
|
1269
|
-
});
|
|
1270
|
-
var PageBlockItemTableRow = _zod.z.object({
|
|
1271
|
-
cells: _zod.z.array(PageBlockItemTableCell)
|
|
1272
|
-
});
|
|
1273
|
-
var PageBlockItemTableValue = _zod.z.object({
|
|
1274
|
-
highlightHeaderColumn: _zod.z.boolean().optional(),
|
|
1275
|
-
highlightHeaderRow: _zod.z.boolean().optional(),
|
|
1276
|
-
showBorder: _zod.z.boolean().optional(),
|
|
1277
|
-
value: _zod.z.array(PageBlockItemTableRow).default([])
|
|
1278
|
-
});
|
|
1279
|
-
var DocumentationItemHeaderAlignmentSchema = _zod.z.enum(["Left", "Center"]);
|
|
1280
|
-
var DocumentationItemHeaderImageScaleTypeSchema = _zod.z.enum(["AspectFill", "AspectFit"]);
|
|
1281
|
-
var DocumentationItemHeaderAlignment = DocumentationItemHeaderAlignmentSchema.enum;
|
|
1282
|
-
var DocumentationItemHeaderImageScaleType = DocumentationItemHeaderImageScaleTypeSchema.enum;
|
|
1283
|
-
var DocumentationItemHeaderV1 = _zod.z.object({
|
|
1284
|
-
description: _zod.z.string(),
|
|
1285
|
-
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1286
|
-
foregroundColor: ColorTokenData.nullish(),
|
|
1287
|
-
backgroundColor: ColorTokenData.nullish(),
|
|
1288
|
-
backgroundImageAsset: PageBlockAsset.nullish(),
|
|
1289
|
-
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1290
|
-
showBackgroundOverlay: _zod.z.boolean(),
|
|
1291
|
-
showCoverText: _zod.z.boolean(),
|
|
1292
|
-
minHeight: _zod.z.number().nullish()
|
|
1293
|
-
});
|
|
1294
|
-
var defaultDocumentationItemHeaderV1 = {
|
|
1295
|
-
alignment: DocumentationItemHeaderAlignment.Left,
|
|
1296
|
-
backgroundImageScaleType: DocumentationItemHeaderImageScaleType.AspectFill,
|
|
1297
|
-
description: "",
|
|
1298
|
-
showBackgroundOverlay: false,
|
|
1299
|
-
showCoverText: true
|
|
1300
|
-
};
|
|
1301
|
-
var DocumentationItemConfigurationV1 = _zod.z.object({
|
|
1302
|
-
showSidebar: _zod.z.boolean(),
|
|
1303
|
-
isPrivate: _zod.z.boolean().optional(),
|
|
1304
|
-
isHidden: _zod.z.boolean().optional(),
|
|
1305
|
-
header: DocumentationItemHeaderV1
|
|
1306
|
-
});
|
|
1307
|
-
var DocumentationPageDataV1 = _zod.z.object({
|
|
1308
|
-
blocks: _zod.z.array(PageBlockV1),
|
|
1309
|
-
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1310
|
-
});
|
|
1311
|
-
var DocumentationItemHeaderV2 = _zod.z.object({
|
|
1312
|
-
description: _zod.z.string(),
|
|
1313
|
-
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1314
|
-
foregroundColor: PageBlockColorV2.nullish(),
|
|
1315
|
-
backgroundColor: PageBlockColorV2.nullish(),
|
|
1316
|
-
backgroundImageAsset: PageBlockImageReference.nullish(),
|
|
1317
|
-
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1318
|
-
showBackgroundOverlay: _zod.z.boolean(),
|
|
1319
|
-
showCoverText: _zod.z.boolean(),
|
|
1320
|
-
minHeight: _zod.z.number().nullish()
|
|
1321
|
-
});
|
|
1322
|
-
var defaultDocumentationItemHeaderV2 = {
|
|
1323
|
-
alignment: DocumentationItemHeaderAlignment.Left,
|
|
1324
|
-
backgroundImageScaleType: DocumentationItemHeaderImageScaleType.AspectFill,
|
|
1325
|
-
description: "",
|
|
1326
|
-
showBackgroundOverlay: false,
|
|
1327
|
-
showCoverText: true
|
|
1328
|
-
};
|
|
1329
|
-
var DocumentationItemConfigurationV2 = _zod.z.object({
|
|
1330
|
-
showSidebar: _zod.z.boolean(),
|
|
1331
|
-
isPrivate: _zod.z.boolean().optional(),
|
|
1332
|
-
isHidden: _zod.z.boolean().optional(),
|
|
1333
|
-
header: DocumentationItemHeaderV2
|
|
1334
|
-
});
|
|
1335
|
-
var defaultDocumentationItemConfigurationV2 = {
|
|
1336
|
-
header: defaultDocumentationItemHeaderV2,
|
|
1337
|
-
isHidden: false,
|
|
1338
|
-
isPrivate: false,
|
|
1339
|
-
showSidebar: true
|
|
1340
|
-
};
|
|
1341
|
-
var DocumentationPageDataV2 = _zod.z.object({
|
|
1342
|
-
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1343
|
-
});
|
|
1344
|
-
var DesignElementOrigin = _zod.z.object({
|
|
1345
|
-
id: _zod.z.string(),
|
|
1346
|
-
sourceId: _zod.z.string(),
|
|
1347
|
-
name: _zod.z.string()
|
|
1348
|
-
});
|
|
1349
|
-
var DesignElementBase = _zod.z.object({
|
|
1350
|
-
id: _zod.z.string(),
|
|
1351
|
-
persistentId: _zod.z.string(),
|
|
1352
|
-
meta: ObjectMeta,
|
|
1353
|
-
designSystemVersionId: _zod.z.string(),
|
|
1354
|
-
createdAt: _zod.z.coerce.date(),
|
|
1355
|
-
updatedAt: _zod.z.coerce.date()
|
|
1356
|
-
});
|
|
1357
|
-
var DesignElementImportedBase = DesignElementBase.extend({
|
|
1358
|
-
origin: DesignElementOrigin
|
|
1359
|
-
});
|
|
1360
|
-
var DesignElementGroupablePart = _zod.z.object({
|
|
1361
|
-
parentPersistentId: _zod.z.string().optional(),
|
|
1362
|
-
sortOrder: _zod.z.number()
|
|
1363
|
-
});
|
|
1364
|
-
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
1365
|
-
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
1366
|
-
parentPersistentId: _zod.z.string()
|
|
1367
|
-
});
|
|
1368
|
-
var DesignElementBrandedPart = _zod.z.object({
|
|
1369
|
-
brandPersistentId: _zod.z.string()
|
|
1370
|
-
});
|
|
1371
|
-
var DesignElementSlugPart = _zod.z.object({
|
|
1372
|
-
slug: _zod.z.string().optional(),
|
|
1373
|
-
userSlug: _zod.z.string().optional()
|
|
1374
|
-
});
|
|
1375
|
-
var PageBlockV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend({
|
|
1376
|
-
data: PageBlockDataV2
|
|
1377
|
-
});
|
|
1378
|
-
var PageBlockEditorModelV2 = _zod.z.object({
|
|
1379
|
-
id: _zod.z.string(),
|
|
1380
|
-
type: _zod.z.literal("Block"),
|
|
1381
|
-
data: PageBlockDataV2
|
|
1382
|
-
});
|
|
1383
|
-
var PageSectionTypeV2 = _zod.z.enum(["Tabs"]);
|
|
1384
|
-
var PageSectionColumnV2 = _zod.z.object({
|
|
1385
|
-
id: _zod.z.string(),
|
|
1386
|
-
blocks: _zod.z.array(PageBlockEditorModelV2)
|
|
1387
|
-
});
|
|
1388
|
-
var PageSectionItemV2 = _zod.z.object({
|
|
1389
|
-
id: _zod.z.string(),
|
|
1390
|
-
title: _zod.z.string(),
|
|
1391
|
-
columns: _zod.z.array(PageSectionColumnV2)
|
|
1392
|
-
});
|
|
1393
|
-
var PageSectionPaddingV2 = _zod.z.object({
|
|
1394
|
-
top: _zod.z.number().optional(),
|
|
1395
|
-
bottom: _zod.z.number().optional(),
|
|
1396
|
-
left: _zod.z.number().optional(),
|
|
1397
|
-
right: _zod.z.number().optional()
|
|
1398
|
-
});
|
|
1399
|
-
var PageSectionAppearanceV2 = _zod.z.object({
|
|
1400
|
-
expandToEdges: _zod.z.boolean(),
|
|
1401
|
-
contentExpandToEdges: _zod.z.boolean(),
|
|
1402
|
-
backgroundColor: PageBlockColorV2.optional(),
|
|
1403
|
-
foregroundColor: PageBlockColorV2.optional(),
|
|
1404
|
-
padding: PageSectionPaddingV2.optional()
|
|
1405
|
-
});
|
|
1406
|
-
var PageSectionEditorModelV2 = _zod.z.object({
|
|
1407
|
-
id: _zod.z.string(),
|
|
1408
|
-
type: _zod.z.literal("Section"),
|
|
1409
|
-
variantId: _zod.z.string().optional(),
|
|
1410
|
-
sectionType: PageSectionTypeV2,
|
|
1411
|
-
appearance: PageSectionAppearanceV2,
|
|
1412
|
-
items: _zod.z.array(PageSectionItemV2)
|
|
1413
|
-
});
|
|
1414
|
-
var DurationUnit = _zod.z.enum(["Ms"]);
|
|
1415
|
-
var DurationValue = _zod.z.object({
|
|
1416
|
-
unit: DurationUnit,
|
|
1417
|
-
measure: _zod.z.number()
|
|
1418
|
-
});
|
|
1419
|
-
var DurationTokenData = tokenAliasOrValue(DurationValue);
|
|
1420
|
-
var FigmaFileStructureNodeType = _zod.z.enum(["DOCUMENT", "CANVAS", "FRAME", "COMPONENT", "COMPONENT_SET"]);
|
|
1421
|
-
var FigmaFileStructureNodeBase = _zod.z.object({
|
|
1422
|
-
id: _zod.z.string(),
|
|
1423
|
-
name: _zod.z.string(),
|
|
1424
|
-
type: FigmaFileStructureNodeType,
|
|
1425
|
-
size: SizeOrUndefined,
|
|
1426
|
-
parentComponentSetId: _zod.z.string().optional()
|
|
1427
|
-
});
|
|
1428
|
-
var FigmaFileStructureNode = FigmaFileStructureNodeBase.extend({
|
|
1429
|
-
children: _zod.z.lazy(() => FigmaFileStructureNode.array())
|
|
1430
|
-
});
|
|
1431
|
-
var FigmaFileStructureStatistics = _zod.z.object({
|
|
1432
|
-
frames: _zod.z.number().nullable().optional().transform((v) => _nullishCoalesce(v, () => ( 0))),
|
|
1433
|
-
components: _zod.z.number().nullable().optional().transform((v) => _nullishCoalesce(v, () => ( 0))),
|
|
1434
|
-
componentSets: _zod.z.number().nullable().optional().transform((v) => _nullishCoalesce(v, () => ( 0)))
|
|
1435
|
-
});
|
|
1436
|
-
var FigmaFileStructureElementData = _zod.z.object({
|
|
1437
|
-
value: _zod.z.object({
|
|
1438
|
-
structure: FigmaFileStructureNode,
|
|
1439
|
-
assetsInFile: FigmaFileStructureStatistics
|
|
1440
|
-
})
|
|
1441
|
-
});
|
|
1442
|
-
var FigmaNodeReferenceData = _zod.z.object({
|
|
1443
|
-
structureElementId: _zod.z.string(),
|
|
1444
|
-
nodeId: _zod.z.string(),
|
|
1445
|
-
fileId: _zod.z.string().optional(),
|
|
1446
|
-
valid: _zod.z.boolean(),
|
|
1447
|
-
// Asset data
|
|
1448
|
-
assetId: _zod.z.string().optional(),
|
|
1449
|
-
assetScale: _zod.z.number().optional(),
|
|
1450
|
-
assetWidth: _zod.z.number().optional(),
|
|
1451
|
-
assetHeight: _zod.z.number().optional(),
|
|
1452
|
-
assetUrl: _zod.z.string().optional(),
|
|
1453
|
-
assetOriginKey: _zod.z.string().optional()
|
|
1454
|
-
});
|
|
1455
|
-
var FigmaNodeReferenceElementData = _zod.z.object({
|
|
1456
|
-
value: FigmaNodeReferenceData
|
|
1457
|
-
});
|
|
1458
|
-
var FontFamilyValue = _zod.z.string();
|
|
1459
|
-
var FontFamilyTokenData = tokenAliasOrValue(FontFamilyValue);
|
|
1460
|
-
var FontSizeUnit = _zod.z.enum(["Pixels", "Rem", "Percent"]);
|
|
1461
|
-
var FontSizeValue = _zod.z.object({
|
|
1462
|
-
unit: FontSizeUnit,
|
|
1463
|
-
measure: _zod.z.number()
|
|
1464
|
-
});
|
|
1465
|
-
var FontSizeTokenData = tokenAliasOrValue(FontSizeValue);
|
|
1466
|
-
var FontWeightValue = _zod.z.string();
|
|
1467
|
-
var FontWeightTokenData = tokenAliasOrValue(FontWeightValue);
|
|
1468
|
-
var GradientType = _zod.z.enum(["Linear", "Radial", "Angular"]);
|
|
1469
|
-
var GradientStop = _zod.z.object({
|
|
1470
|
-
position: _zod.z.number(),
|
|
1471
|
-
color: ColorTokenData
|
|
1472
|
-
});
|
|
1473
|
-
var GradientLayerValue = _zod.z.object({
|
|
1474
|
-
from: Point2D,
|
|
1475
|
-
to: Point2D,
|
|
1476
|
-
type: GradientType,
|
|
1477
|
-
aspectRatio: nullishToOptional(_zod.z.number()),
|
|
1478
|
-
// z.number(),
|
|
1479
|
-
stops: _zod.z.array(GradientStop).min(2)
|
|
1480
|
-
});
|
|
1481
|
-
var GradientLayerData = tokenAliasOrValue(GradientLayerValue);
|
|
1482
|
-
var GradientTokenValue = _zod.z.array(GradientLayerData);
|
|
1483
|
-
var GradientTokenData = tokenAliasOrValue(GradientTokenValue);
|
|
1484
|
-
var DocumentationGroupBehavior = _zod.z.enum(["Group", "Tabs"]);
|
|
1485
|
-
var ElementGroupDataV1 = _zod.z.object({
|
|
1486
|
-
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1487
|
-
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1488
|
-
});
|
|
1489
|
-
var ElementGroupDataV2 = _zod.z.object({
|
|
1490
|
-
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1491
|
-
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1492
|
-
});
|
|
1493
|
-
var LetterSpacingUnit = _zod.z.enum(["Pixels", "Rem", "Percent"]);
|
|
1494
|
-
var LetterSpacingValue = _zod.z.object({
|
|
1495
|
-
unit: LetterSpacingUnit,
|
|
1496
|
-
measure: _zod.z.number()
|
|
1497
|
-
});
|
|
1498
|
-
var LetterSpacingTokenData = tokenAliasOrValue(LetterSpacingValue);
|
|
1499
|
-
var LineHeightUnit = _zod.z.enum(["Pixels", "Rem", "Percent", "Raw"]);
|
|
1500
|
-
var LineHeightValue = _zod.z.object({
|
|
1501
|
-
unit: LineHeightUnit,
|
|
1502
|
-
measure: _zod.z.number()
|
|
1503
|
-
});
|
|
1504
|
-
var LineHeightTokenData = tokenAliasOrValue(LineHeightValue);
|
|
1505
|
-
var ParagraphIndentUnit = _zod.z.enum(["Pixels", "Rem", "Percent"]);
|
|
1506
|
-
var ParagraphIndentValue = _zod.z.object({
|
|
1507
|
-
unit: ParagraphIndentUnit,
|
|
1508
|
-
measure: _zod.z.number()
|
|
1509
|
-
});
|
|
1510
|
-
var ParagraphIndentTokenData = tokenAliasOrValue(ParagraphIndentValue);
|
|
1511
|
-
var ParagraphSpacingUnit = _zod.z.enum(["Pixels", "Rem", "Percent"]);
|
|
1512
|
-
var ParagraphSpacingValue = _zod.z.object({
|
|
1513
|
-
unit: ParagraphSpacingUnit,
|
|
1514
|
-
measure: _zod.z.number()
|
|
1515
|
-
});
|
|
1516
|
-
var ParagraphSpacingTokenData = tokenAliasOrValue(ParagraphSpacingValue);
|
|
1517
|
-
var ProductCopyValue = _zod.z.string();
|
|
1518
|
-
var ProductCopyTokenData = tokenAliasOrValue(ProductCopyValue);
|
|
1519
|
-
var RESERVED_OBJECT_ID_PREFIX = "x-sn-reserved-";
|
|
1520
|
-
var SafeIdSchema = _zod.z.string().refine(
|
|
1521
|
-
(value) => {
|
|
1522
|
-
return !value.startsWith(RESERVED_OBJECT_ID_PREFIX);
|
|
1523
|
-
},
|
|
1524
|
-
{
|
|
1525
|
-
message: `ID value can't start with ${RESERVED_OBJECT_ID_PREFIX}`
|
|
1526
|
-
}
|
|
1527
|
-
);
|
|
1528
|
-
var ShadowType = _zod.z.enum(["Drop", "Inner"]);
|
|
1529
|
-
var ShadowLayerValue = _zod.z.object({
|
|
1530
|
-
color: ColorTokenData,
|
|
1531
|
-
x: _zod.z.number(),
|
|
1532
|
-
y: _zod.z.number(),
|
|
1533
|
-
radius: _zod.z.number(),
|
|
1534
|
-
spread: _zod.z.number(),
|
|
1535
|
-
opacity: OpacityTokenData.optional(),
|
|
1536
|
-
type: ShadowType
|
|
1537
|
-
});
|
|
1538
|
-
var ShadowTokenDataBase = tokenAliasOrValue(ShadowLayerValue);
|
|
1539
|
-
var ShadowTokenData = tokenAliasOrValue(_zod.z.array(ShadowTokenDataBase));
|
|
1540
|
-
var SizeUnit = _zod.z.enum(["Pixels", "Rem", "Percent"]);
|
|
1541
|
-
var SizeValue = _zod.z.object({
|
|
1542
|
-
unit: SizeUnit,
|
|
1543
|
-
measure: _zod.z.number()
|
|
1544
|
-
});
|
|
1545
|
-
var SizeTokenData = tokenAliasOrValue(SizeValue);
|
|
1546
|
-
var SpaceUnit = _zod.z.enum(["Pixels", "Rem", "Percent"]);
|
|
1547
|
-
var SpaceValue = _zod.z.object({
|
|
1548
|
-
unit: SpaceUnit,
|
|
1549
|
-
measure: _zod.z.number()
|
|
1550
|
-
});
|
|
1551
|
-
var SpaceTokenData = tokenAliasOrValue(SpaceValue);
|
|
1552
|
-
var StringValue = _zod.z.string();
|
|
1553
|
-
var StringTokenData = tokenAliasOrValue(StringValue);
|
|
1554
|
-
var TextCase = _zod.z.enum(["Original", "Upper", "Lower", "Camel", "SmallCaps"]);
|
|
1555
|
-
var TextCaseValue = TextCase;
|
|
1556
|
-
var TextCaseTokenData = tokenAliasOrValue(TextCaseValue);
|
|
1557
|
-
var TextDecoration = _zod.z.enum(["None", "Underline", "Strikethrough"]);
|
|
1558
|
-
var TextDecorationValue = TextDecoration;
|
|
1559
|
-
var TextDecorationTokenData = tokenAliasOrValue(TextDecorationValue);
|
|
1560
|
-
var TypographyValue = _zod.z.object({
|
|
1561
|
-
fontSize: FontSizeTokenData,
|
|
1562
|
-
fontFamily: FontFamilyTokenData,
|
|
1563
|
-
fontWeight: FontWeightTokenData,
|
|
1564
|
-
textDecoration: TextDecorationTokenData,
|
|
1565
|
-
textCase: TextCaseTokenData,
|
|
1566
|
-
letterSpacing: LetterSpacingTokenData.optional(),
|
|
1567
|
-
lineHeight: LineHeightTokenData.optional(),
|
|
1568
|
-
paragraphIndent: ParagraphIndentTokenData.optional(),
|
|
1569
|
-
paragraphSpacing: ParagraphSpacingTokenData.optional()
|
|
1570
|
-
});
|
|
1571
|
-
var TypographyTokenData = tokenAliasOrValue(TypographyValue);
|
|
1572
|
-
var Visibility = _zod.z.enum(["Hidden", "Visible"]);
|
|
1573
|
-
var VisibilityValue = Visibility;
|
|
1574
|
-
var VisibilityTokenData = tokenAliasOrValue(VisibilityValue);
|
|
1575
|
-
var ZIndexUnit = _zod.z.enum(["Raw"]);
|
|
1576
|
-
var ZIndexValue = _zod.z.object({
|
|
1577
|
-
unit: ZIndexUnit,
|
|
1578
|
-
measure: _zod.z.number()
|
|
1579
|
-
});
|
|
1580
|
-
var ZIndexTokenData = tokenAliasOrValue(ZIndexValue);
|
|
1581
|
-
var FigmaComponentPropertyType = _zod.z.enum(["Boolean", "InstanceSwap", "Variant", "Text"]);
|
|
1582
|
-
var FigmaComponentBooleanProperty = _zod.z.object({
|
|
1583
|
-
type: _zod.z.literal(FigmaComponentPropertyType.enum.Boolean),
|
|
1584
|
-
value: _zod.z.boolean(),
|
|
1585
|
-
defaultValue: _zod.z.boolean()
|
|
1586
|
-
});
|
|
1587
|
-
var FigmaComponentInstanceSwapProperty = _zod.z.object({
|
|
1588
|
-
type: _zod.z.literal(FigmaComponentPropertyType.enum.InstanceSwap),
|
|
1589
|
-
value: _zod.z.string()
|
|
1590
|
-
// Persistent ID of a Component to swap?
|
|
1591
|
-
});
|
|
1592
|
-
var FigmaComponentVariantProperty = _zod.z.object({
|
|
1593
|
-
type: _zod.z.literal(FigmaComponentPropertyType.enum.Variant),
|
|
1594
|
-
value: _zod.z.string(),
|
|
1595
|
-
options: _zod.z.array(_zod.z.string())
|
|
1596
|
-
});
|
|
1597
|
-
var FigmaComponentTextProperty = _zod.z.object({
|
|
1598
|
-
type: _zod.z.literal(FigmaComponentPropertyType.enum.Text),
|
|
1599
|
-
value: _zod.z.string()
|
|
1600
|
-
});
|
|
1601
|
-
var FigmaComponentProperties = _zod.z.record(
|
|
1602
|
-
_zod.z.string(),
|
|
1603
|
-
_zod.z.discriminatedUnion("type", [
|
|
1604
|
-
FigmaComponentBooleanProperty,
|
|
1605
|
-
FigmaComponentInstanceSwapProperty,
|
|
1606
|
-
FigmaComponentTextProperty
|
|
1607
|
-
])
|
|
1608
|
-
);
|
|
1609
|
-
var FigmaComponentSetProperties = _zod.z.record(
|
|
1610
|
-
_zod.z.string(),
|
|
1611
|
-
_zod.z.discriminatedUnion("type", [
|
|
1612
|
-
FigmaComponentBooleanProperty,
|
|
1613
|
-
FigmaComponentInstanceSwapProperty,
|
|
1614
|
-
FigmaComponentTextProperty,
|
|
1615
|
-
FigmaComponentVariantProperty
|
|
1616
|
-
])
|
|
1617
|
-
);
|
|
1618
|
-
var ComponentOriginPart = _zod.z.object({
|
|
1619
|
-
nodeId: _zod.z.string().optional(),
|
|
1620
|
-
width: _zod.z.number().optional(),
|
|
1621
|
-
height: _zod.z.number().optional()
|
|
1622
|
-
});
|
|
1623
|
-
var ComponentAsset = _zod.z.object({
|
|
1624
|
-
assetId: _zod.z.string(),
|
|
1625
|
-
assetPath: _zod.z.string()
|
|
1626
|
-
});
|
|
1627
|
-
var ComponentOrigin = DesignElementOrigin.extend(ComponentOriginPart.shape);
|
|
1628
|
-
var BaseComponent = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
1629
|
-
origin: ComponentOrigin.optional(),
|
|
1630
|
-
thumbnail: ComponentAsset
|
|
1631
|
-
});
|
|
1632
|
-
var Component = BaseComponent.extend({
|
|
1633
|
-
svg: ComponentAsset.optional(),
|
|
1634
|
-
isAsset: _zod.z.boolean(),
|
|
1635
|
-
componentSetId: _zod.z.string().optional(),
|
|
1636
|
-
properties: FigmaComponentProperties.optional()
|
|
1637
|
-
});
|
|
1638
|
-
var ComponentSet = BaseComponent.extend({
|
|
1639
|
-
properties: FigmaComponentSetProperties
|
|
1640
|
-
});
|
|
1641
|
-
var ElementGroup = DesignElementBase.extend(DesignElementGroupablePart.shape).extend(DesignElementSlugPart.shape).extend(DesignElementBrandedPart.partial().shape).extend({
|
|
1642
|
-
shortPersistentId: _zod.z.string().optional(),
|
|
1643
|
-
childType: DesignElementType,
|
|
1644
|
-
data: ElementGroupDataV2.optional()
|
|
1645
|
-
});
|
|
1646
|
-
var BrandedElementGroup = ElementGroup.extend(DesignElementBrandedPart.shape);
|
|
1647
|
-
var DocumentationPageV1 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1648
|
-
shortPersistentId: _zod.z.string(),
|
|
1649
|
-
data: DocumentationPageDataV1
|
|
1650
|
-
});
|
|
1651
|
-
var DocumentationGroupV1 = ElementGroup.omit({
|
|
1652
|
-
data: true
|
|
1653
|
-
}).extend({
|
|
1654
|
-
data: ElementGroupDataV1.optional()
|
|
1655
|
-
});
|
|
1656
|
-
var DocumentationPageV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1657
|
-
shortPersistentId: _zod.z.string(),
|
|
1658
|
-
data: DocumentationPageDataV2.extend({
|
|
1659
|
-
oldBlocks: _zod.z.array(PageBlockV1).optional()
|
|
1660
|
-
})
|
|
1661
|
-
});
|
|
1662
|
-
var FigmaFileStructureOrigin = _zod.z.object({
|
|
1663
|
-
sourceId: _zod.z.string(),
|
|
1664
|
-
fileId: _zod.z.string().optional()
|
|
1665
|
-
});
|
|
1666
|
-
var FigmaFileStructureData = _zod.z.object({
|
|
1667
|
-
rootNode: FigmaFileStructureNode,
|
|
1668
|
-
assetsInFile: FigmaFileStructureStatistics
|
|
1669
|
-
});
|
|
1670
|
-
var FigmaFileStructure = DesignElementBase.extend({
|
|
1671
|
-
origin: FigmaFileStructureOrigin,
|
|
1672
|
-
data: FigmaFileStructureData
|
|
1673
|
-
});
|
|
1674
|
-
var FigmaNodeReferenceOrigin = _zod.z.object({
|
|
1675
|
-
sourceId: _zod.z.string(),
|
|
1676
|
-
parentName: _zod.z.string().optional()
|
|
1677
|
-
});
|
|
1678
|
-
var FigmaNodeReference = DesignElementBase.extend({
|
|
1679
|
-
data: FigmaNodeReferenceData,
|
|
1680
|
-
origin: FigmaNodeReferenceOrigin
|
|
1681
|
-
});
|
|
1682
|
-
var DesignTokenOriginPart = _zod.z.object({
|
|
1683
|
-
referenceOriginId: _zod.z.string().optional(),
|
|
1684
|
-
referenceOriginKey: _zod.z.string().optional(),
|
|
1685
|
-
referencePersistentId: _zod.z.string().optional(),
|
|
1686
|
-
referenceResolutionFailed: _zod.z.boolean().optional(),
|
|
1687
|
-
key: _zod.z.string().optional()
|
|
1688
|
-
});
|
|
1689
|
-
var DesignTokenOrigin = DesignElementOrigin.extend(DesignTokenOriginPart.shape);
|
|
1690
|
-
var DesignTokenBase = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
1691
|
-
origin: DesignTokenOrigin.optional()
|
|
1692
|
-
});
|
|
1693
|
-
var CreateDesignTokenBase = DesignTokenBase.omit(zodCreateInputOmit());
|
|
1694
|
-
var UpdateDesignTokenBase = DesignTokenBase.omit({
|
|
1695
|
-
...zodUpdateInputOmit(),
|
|
1696
|
-
brandPersistentId: true,
|
|
1697
|
-
designSystemVersionId: true
|
|
1698
|
-
});
|
|
1699
|
-
var BlurTokenTypedData = _zod.z.object({
|
|
1700
|
-
type: _zod.z.literal("Blur"),
|
|
1701
|
-
data: BlurTokenData
|
|
1702
|
-
});
|
|
1703
|
-
var ColorTokenTypedData = _zod.z.object({
|
|
1704
|
-
type: _zod.z.literal("Color"),
|
|
1705
|
-
data: ColorTokenData
|
|
1706
|
-
});
|
|
1707
|
-
var GradientTokenTypedData = _zod.z.object({
|
|
1708
|
-
type: _zod.z.literal("Gradient"),
|
|
1709
|
-
data: GradientTokenData
|
|
1710
|
-
});
|
|
1711
|
-
var OpacityTokenTypedData = _zod.z.object({
|
|
1712
|
-
type: _zod.z.literal("Opacity"),
|
|
1713
|
-
data: OpacityTokenData
|
|
1714
|
-
});
|
|
1715
|
-
var ShadowTokenTypedData = _zod.z.object({
|
|
1716
|
-
type: _zod.z.literal("Shadow"),
|
|
1717
|
-
data: ShadowTokenData
|
|
1718
|
-
});
|
|
1719
|
-
var TypographyTokenTypedData = _zod.z.object({
|
|
1720
|
-
type: _zod.z.literal("Typography"),
|
|
1721
|
-
data: TypographyTokenData
|
|
1722
|
-
});
|
|
1723
|
-
var StringTokenTypedData = _zod.z.object({
|
|
1724
|
-
type: _zod.z.literal("String"),
|
|
1725
|
-
data: StringTokenData
|
|
1726
|
-
});
|
|
1727
|
-
var DimensionTokenTypedData = _zod.z.object({
|
|
1728
|
-
type: _zod.z.literal("Dimension"),
|
|
1729
|
-
data: DimensionTokenData
|
|
1730
|
-
});
|
|
1731
|
-
var FontSizeTokenTypedData = _zod.z.object({
|
|
1732
|
-
type: _zod.z.literal("FontSize"),
|
|
1733
|
-
data: FontSizeTokenData
|
|
1734
|
-
});
|
|
1735
|
-
var FontFamilyTokenTypedData = _zod.z.object({
|
|
1736
|
-
type: _zod.z.literal("FontFamily"),
|
|
1737
|
-
data: FontFamilyTokenData
|
|
1738
|
-
});
|
|
1739
|
-
var FontWeightTokenTypedData = _zod.z.object({
|
|
1740
|
-
type: _zod.z.literal("FontWeight"),
|
|
1741
|
-
data: FontWeightTokenData
|
|
1742
|
-
});
|
|
1743
|
-
var LetterSpacingTokenTypedData = _zod.z.object({
|
|
1744
|
-
type: _zod.z.literal("LetterSpacing"),
|
|
1745
|
-
data: LetterSpacingTokenData
|
|
1746
|
-
});
|
|
1747
|
-
var LineHeightTokenTypedData = _zod.z.object({
|
|
1748
|
-
type: _zod.z.literal("LineHeight"),
|
|
1749
|
-
data: LineHeightTokenData
|
|
1750
|
-
});
|
|
1751
|
-
var ParagraphSpacingTokenTypedData = _zod.z.object({
|
|
1752
|
-
type: _zod.z.literal("ParagraphSpacing"),
|
|
1753
|
-
data: ParagraphSpacingTokenData
|
|
1754
|
-
});
|
|
1755
|
-
var TextCaseTokenTypedData = _zod.z.object({
|
|
1756
|
-
type: _zod.z.literal("TextCase"),
|
|
1757
|
-
data: TextCaseTokenData
|
|
1758
|
-
});
|
|
1759
|
-
var TextDecorationTokenTypedData = _zod.z.object({
|
|
1760
|
-
type: _zod.z.literal("TextDecoration"),
|
|
1761
|
-
data: TextDecorationTokenData
|
|
1762
|
-
});
|
|
1763
|
-
var BorderRadiusTokenTypedData = _zod.z.object({
|
|
1764
|
-
type: _zod.z.literal("BorderRadius"),
|
|
1765
|
-
data: BorderRadiusTokenData
|
|
1766
|
-
});
|
|
1767
|
-
var BorderWidthTokenTypedData = _zod.z.object({
|
|
1768
|
-
type: _zod.z.literal("BorderWidth"),
|
|
1769
|
-
data: BorderWidthTokenData
|
|
1770
|
-
});
|
|
1771
|
-
var BorderTypedData = _zod.z.object({
|
|
1772
|
-
type: _zod.z.literal("Border"),
|
|
1773
|
-
data: BorderTokenData
|
|
1774
|
-
});
|
|
1775
|
-
var ProductCopyTypedData = _zod.z.object({
|
|
1776
|
-
type: _zod.z.literal("ProductCopy"),
|
|
1777
|
-
data: ProductCopyTokenData
|
|
1778
|
-
});
|
|
1779
|
-
var SizeTypedData = _zod.z.object({
|
|
1780
|
-
type: _zod.z.literal("Size"),
|
|
1781
|
-
data: SizeTokenData
|
|
1782
|
-
});
|
|
1783
|
-
var SpaceTypedData = _zod.z.object({
|
|
1784
|
-
type: _zod.z.literal("Space"),
|
|
1785
|
-
data: SpaceTokenData
|
|
1786
|
-
});
|
|
1787
|
-
var VisibilityTypedData = _zod.z.object({
|
|
1788
|
-
type: _zod.z.literal("Visibility"),
|
|
1789
|
-
data: VisibilityTokenData
|
|
1790
|
-
});
|
|
1791
|
-
var ZIndexTypedData = _zod.z.object({
|
|
1792
|
-
type: _zod.z.literal("ZIndex"),
|
|
1793
|
-
data: ZIndexTokenData
|
|
1794
|
-
});
|
|
1795
|
-
var DurationTypedData = _zod.z.object({
|
|
1796
|
-
type: _zod.z.literal("Duration"),
|
|
1797
|
-
data: DurationTokenData
|
|
1798
|
-
});
|
|
1799
|
-
var FontTypedData = _zod.z.object({
|
|
1800
|
-
type: _zod.z.literal("Font"),
|
|
1801
|
-
data: _zod.z.record(_zod.z.any())
|
|
1802
|
-
});
|
|
1803
|
-
var DesignTokenTypedData = _zod.z.discriminatedUnion("type", [
|
|
1804
|
-
BlurTokenTypedData,
|
|
1805
|
-
BorderRadiusTokenTypedData,
|
|
1806
|
-
BorderWidthTokenTypedData,
|
|
1807
|
-
BorderTypedData,
|
|
1808
|
-
ColorTokenTypedData,
|
|
1809
|
-
DimensionTokenTypedData,
|
|
1810
|
-
DurationTypedData,
|
|
1811
|
-
FontSizeTokenTypedData,
|
|
1812
|
-
FontFamilyTokenTypedData,
|
|
1813
|
-
FontWeightTokenTypedData,
|
|
1814
|
-
GradientTokenTypedData,
|
|
1815
|
-
LetterSpacingTokenTypedData,
|
|
1816
|
-
LineHeightTokenTypedData,
|
|
1817
|
-
OpacityTokenTypedData,
|
|
1818
|
-
ParagraphSpacingTokenTypedData,
|
|
1819
|
-
ProductCopyTypedData,
|
|
1820
|
-
ShadowTokenTypedData,
|
|
1821
|
-
SizeTypedData,
|
|
1822
|
-
SpaceTypedData,
|
|
1823
|
-
StringTokenTypedData,
|
|
1824
|
-
TextCaseTokenTypedData,
|
|
1825
|
-
TextDecorationTokenTypedData,
|
|
1826
|
-
TypographyTokenTypedData,
|
|
1827
|
-
VisibilityTypedData,
|
|
1828
|
-
ZIndexTypedData,
|
|
1829
|
-
FontTypedData
|
|
1830
|
-
]);
|
|
1831
|
-
var DesignToken = DesignTokenTypedData.and(DesignTokenBase);
|
|
1832
|
-
var CreateDesignToken = DesignTokenTypedData.and(CreateDesignTokenBase);
|
|
1833
|
-
var ThemeOverrideOriginPart = DesignTokenOriginPart;
|
|
1834
|
-
var ThemeOverrideOrigin = DesignTokenOrigin;
|
|
1835
|
-
var ThemeOverride = DesignTokenTypedData.and(
|
|
1836
|
-
_zod.z.object({
|
|
1837
|
-
tokenPersistentId: _zod.z.string(),
|
|
1838
|
-
origin: ThemeOverrideOrigin.optional().nullable().transform((v) => _nullishCoalesce(v, () => ( void 0)))
|
|
1839
|
-
})
|
|
1840
|
-
);
|
|
1841
|
-
var ThemeElementData = _zod.z.object({
|
|
1842
|
-
value: _zod.z.object({
|
|
1843
|
-
overrides: _zod.z.array(ThemeOverride)
|
|
1844
|
-
})
|
|
1845
|
-
});
|
|
1846
|
-
var ThemeOriginPart = _zod.z.object({});
|
|
1847
|
-
var ThemeOriginObject = _zod.z.object({
|
|
1848
|
-
id: _zod.z.string(),
|
|
1849
|
-
name: _zod.z.string()
|
|
1850
|
-
});
|
|
1851
|
-
var ThemeOriginSource = _zod.z.object({
|
|
1852
|
-
sourceId: _zod.z.string(),
|
|
1853
|
-
sourceObjects: _zod.z.array(ThemeOriginObject)
|
|
1854
|
-
});
|
|
1855
|
-
var ThemeOrigin = _zod.z.object({
|
|
1856
|
-
sources: _zod.z.array(ThemeOriginSource)
|
|
1857
|
-
});
|
|
1858
|
-
var Theme = DesignElementBase.extend(DesignElementBrandedPart.shape).extend({
|
|
1859
|
-
origin: ThemeOrigin.optional(),
|
|
1860
|
-
overrides: _zod.z.array(ThemeOverride),
|
|
1861
|
-
codeName: _zod.z.string()
|
|
1862
|
-
});
|
|
1863
|
-
var FileStructureStats = _zod.z.object({
|
|
1864
|
-
frames: zeroNumberByDefault(),
|
|
1865
|
-
components: zeroNumberByDefault(),
|
|
1866
|
-
componentSets: zeroNumberByDefault()
|
|
1867
|
-
});
|
|
1868
|
-
var SourceImportSummaryByTokenTypeKey = DesignTokenType.or(
|
|
1869
|
-
// Backward compatibility
|
|
1870
|
-
_zod.z.enum(["Measure", "Radius", "GenericToken", "Font", "Text"])
|
|
1871
|
-
);
|
|
1872
|
-
var SourceImportSummaryByTokenType = _zod.z.record(SourceImportSummaryByTokenTypeKey, _zod.z.number());
|
|
1873
|
-
var SourceImportTokenSummary = _zod.z.object({
|
|
1874
|
-
tokensCreated: zeroNumberByDefault(),
|
|
1875
|
-
tokensUpdated: zeroNumberByDefault(),
|
|
1876
|
-
tokensDeleted: zeroNumberByDefault(),
|
|
1877
|
-
tokensCreatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => _nullishCoalesce(v, () => ( {}))),
|
|
1878
|
-
tokensUpdatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => _nullishCoalesce(v, () => ( {}))),
|
|
1879
|
-
tokensDeletedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => _nullishCoalesce(v, () => ( {})))
|
|
1880
|
-
});
|
|
1881
|
-
var SourceImportComponentSummary = _zod.z.object({
|
|
1882
|
-
componentsCreated: zeroNumberByDefault(),
|
|
1883
|
-
componentsUpdated: zeroNumberByDefault(),
|
|
1884
|
-
componentsDeleted: zeroNumberByDefault(),
|
|
1885
|
-
componentAssetsCreated: zeroNumberByDefault(),
|
|
1886
|
-
componentAssetsUpdated: zeroNumberByDefault(),
|
|
1887
|
-
componentAssetsDeleted: zeroNumberByDefault()
|
|
1888
|
-
});
|
|
1889
|
-
var SourceImportFrameSummary = _zod.z.object({
|
|
1890
|
-
assetsInFile: nullishToOptional(FileStructureStats.optional()),
|
|
1891
|
-
invalidReferencesCount: nullishToOptional(_zod.z.number().optional())
|
|
1892
|
-
});
|
|
1893
|
-
var SourceImportSummary = _zod.z.object({
|
|
1894
|
-
sourceId: nullishToOptional(_zod.z.string()),
|
|
1895
|
-
brandId: nullishToOptional(_zod.z.string()),
|
|
1896
|
-
versionId: nullishToOptional(_zod.z.string()),
|
|
1897
|
-
error: nullishToOptional(_zod.z.any()),
|
|
1898
|
-
isFailed: _zod.z.boolean(),
|
|
1899
|
-
warnings: _zod.z.array(ImportWarning).nullish().transform((v) => _nullishCoalesce(v, () => ( []))),
|
|
1900
|
-
...SourceImportTokenSummary.shape,
|
|
1901
|
-
...SourceImportComponentSummary.shape,
|
|
1902
|
-
...FileStructureStats.shape
|
|
1903
|
-
});
|
|
1904
|
-
function zeroNumberByDefault() {
|
|
1905
|
-
return _zod.z.number().nullish().transform((v) => _nullishCoalesce(v, () => ( 0)));
|
|
1906
|
-
}
|
|
1907
|
-
var DataSourceRemoteType = _zod.z.enum(["Figma", "TokenStudio", "FigmaVariablesPlugin"]);
|
|
1908
|
-
var DataSourceUploadRemoteSource = _zod.z.enum(["TokenStudio", "FigmaVariablesPlugin", "Custom"]);
|
|
1909
|
-
var DataSourceFigmaState = _zod.z.enum(["Active", "MissingIntegration", "MissingFileAccess", "MissingFileOwner"]);
|
|
1910
|
-
var DataSourceAutoImportMode = _zod.z.enum(["Never", "Hourly"]);
|
|
1911
|
-
var DataSourceStats = _zod.z.object({
|
|
1912
|
-
tokens: zeroNumberByDefault2(),
|
|
1913
|
-
components: zeroNumberByDefault2(),
|
|
1914
|
-
assets: zeroNumberByDefault2(),
|
|
1915
|
-
frames: zeroNumberByDefault2()
|
|
1916
|
-
});
|
|
1917
|
-
var DataSourceFigmaFileData = _zod.z.object({
|
|
1918
|
-
lastUpdatedAt: _zod.z.coerce.date()
|
|
1919
|
-
});
|
|
1920
|
-
var DataSourceFigmaFileVersionData = _zod.z.object({
|
|
1921
|
-
id: _zod.z.string(),
|
|
1922
|
-
label: _zod.z.string().optional(),
|
|
1923
|
-
description: _zod.z.string().optional(),
|
|
1924
|
-
createdAt: _zod.z.coerce.date()
|
|
1925
|
-
});
|
|
1926
|
-
var DataSourceFigmaScope = _zod.z.object({
|
|
1927
|
-
assets: _zod.z.boolean(),
|
|
1928
|
-
components: _zod.z.boolean(),
|
|
1929
|
-
documentationFrames: _zod.z.boolean(),
|
|
1930
|
-
tokens: _zod.z.boolean(),
|
|
1931
|
-
themePersistentId: _zod.z.string().optional(),
|
|
1932
|
-
isUnpublishedContentFallbackEnabled: _zod.z.boolean()
|
|
1933
|
-
});
|
|
1934
|
-
var DataSourceFigmaImportMetadata = _zod.z.object({
|
|
1935
|
-
fileData: DataSourceFigmaFileData.optional(),
|
|
1936
|
-
importedPublishedVersion: DataSourceFigmaFileVersionData.optional()
|
|
1937
|
-
});
|
|
1938
|
-
var DataSourceFigmaRemote = _zod.z.object({
|
|
1939
|
-
type: _zod.z.literal(DataSourceRemoteType.Enum.Figma),
|
|
1940
|
-
fileId: _zod.z.string(),
|
|
1941
|
-
preferredCredentialId: _zod.z.string().optional(),
|
|
1942
|
-
ownerId: _zod.z.string(),
|
|
1943
|
-
// todo remove or keep to reference who created data source
|
|
1944
|
-
ownerName: _zod.z.string(),
|
|
1945
|
-
// todo probably remove
|
|
1946
|
-
scope: DataSourceFigmaScope,
|
|
1947
|
-
state: DataSourceFigmaState,
|
|
1948
|
-
requiresSync: _zod.z.boolean().optional().transform((v) => _nullishCoalesce(v, () => ( false))),
|
|
1949
|
-
lastImportMetadata: DataSourceFigmaImportMetadata.optional(),
|
|
1950
|
-
downloadChunkSize: _zod.z.number().optional(),
|
|
1951
|
-
figmaRenderChunkSize: _zod.z.number().optional(),
|
|
1952
|
-
maxFileDepth: _zod.z.number().optional()
|
|
1953
|
-
});
|
|
1954
|
-
var DataSourceTokenStudioRemote = _zod.z.object({
|
|
1955
|
-
type: _zod.z.literal(DataSourceRemoteType.Enum.TokenStudio)
|
|
1956
|
-
});
|
|
1957
|
-
var DataSourceUploadImportMetadata = _zod.z.record(_zod.z.any());
|
|
1958
|
-
var DataSourceUploadRemote = _zod.z.object({
|
|
1959
|
-
type: _zod.z.literal(DataSourceRemoteType.Enum.FigmaVariablesPlugin),
|
|
1960
|
-
remoteId: _zod.z.string(),
|
|
1961
|
-
remoteSourceType: DataSourceUploadRemoteSource,
|
|
1962
|
-
lastImportMetadata: DataSourceUploadImportMetadata.optional(),
|
|
1963
|
-
warnings: nullishToOptional(ImportWarning.array())
|
|
1964
|
-
});
|
|
1965
|
-
var DataSourceRemote = _zod.z.discriminatedUnion("type", [
|
|
1966
|
-
DataSourceFigmaRemote,
|
|
1967
|
-
DataSourceUploadRemote,
|
|
1968
|
-
DataSourceTokenStudioRemote
|
|
1969
|
-
]);
|
|
1970
|
-
var DataSource = _zod.z.object({
|
|
1971
|
-
id: _zod.z.string(),
|
|
1972
|
-
name: _zod.z.string(),
|
|
1973
|
-
thumbnailUrl: _zod.z.string().optional(),
|
|
1974
|
-
createdAt: _zod.z.coerce.date().optional(),
|
|
1975
|
-
lastImportedAt: _zod.z.coerce.date().optional(),
|
|
1976
|
-
lastImportSummary: SourceImportSummary.optional(),
|
|
1977
|
-
designSystemId: _zod.z.string(),
|
|
1978
|
-
brandPersistentId: _zod.z.string(),
|
|
1979
|
-
autoImportMode: DataSourceAutoImportMode,
|
|
1980
|
-
stats: DataSourceStats,
|
|
1981
|
-
remote: DataSourceRemote,
|
|
1982
|
-
sortOrder: _zod.z.number()
|
|
1983
|
-
});
|
|
1984
|
-
var DataSourceVersion = _zod.z.object({
|
|
1985
|
-
id: _zod.z.string(),
|
|
1986
|
-
createdAt: _zod.z.coerce.date(),
|
|
1987
|
-
label: _zod.z.string().nullish(),
|
|
1988
|
-
description: _zod.z.string().nullish()
|
|
1989
|
-
});
|
|
1990
|
-
function zeroNumberByDefault2() {
|
|
1991
|
-
return _zod.z.number().nullish().transform((v) => _nullishCoalesce(v, () => ( 0)));
|
|
1992
|
-
}
|
|
1993
|
-
var ImportJobState = _zod.z.enum(["PendingInput", "Queued", "InProgress", "Failed", "Success"]);
|
|
1994
|
-
var ImportJobOperation = _zod.z.enum(["Check", "Import"]);
|
|
1995
|
-
var ImportJob = Entity.extend({
|
|
1996
|
-
designSystemId: _zod.z.string(),
|
|
1997
|
-
designSystemVersionId: _zod.z.string(),
|
|
1998
|
-
sourceIds: _zod.z.array(_zod.z.string()),
|
|
1999
|
-
state: ImportJobState,
|
|
2000
|
-
createdByUserId: _zod.z.string().optional(),
|
|
2001
|
-
importContextId: _zod.z.string(),
|
|
2002
|
-
error: _zod.z.string().optional(),
|
|
2003
|
-
sourceType: DataSourceRemoteType,
|
|
2004
|
-
importContextCleanedUp: _zod.z.boolean()
|
|
2005
|
-
});
|
|
2006
|
-
var ImportFunctionInput = _zod.z.object({
|
|
2007
|
-
importJobId: _zod.z.string(),
|
|
2008
|
-
importContextId: _zod.z.string(),
|
|
2009
|
-
designSystemId: _zod.z.string().optional()
|
|
2010
|
-
});
|
|
2011
|
-
var ImportedFigmaSourceData = _zod.z.object({
|
|
2012
|
-
sourceId: _zod.z.string(),
|
|
2013
|
-
figmaRemote: DataSourceFigmaRemote
|
|
2014
|
-
});
|
|
2015
|
-
var FigmaImportBaseContext = _zod.z.object({
|
|
2016
|
-
designSystemId: _zod.z.string(),
|
|
2017
|
-
/**
|
|
2018
|
-
* Data required for accessing Figma files. This should contain access data for all file ids
|
|
2019
|
-
* mentioned in the `importedSourceDataBySourceId`
|
|
2020
|
-
*
|
|
2021
|
-
* fileId: file data
|
|
2022
|
-
*/
|
|
2023
|
-
fileAccessByFileId: _zod.z.record(FigmaFileAccessData),
|
|
2024
|
-
/**
|
|
2025
|
-
* Figma source data for which import was requested
|
|
2026
|
-
*
|
|
2027
|
-
* sourceId: source data
|
|
2028
|
-
*/
|
|
2029
|
-
importedSourceDataBySourceId: _zod.z.record(ImportedFigmaSourceData),
|
|
2030
|
-
/**
|
|
2031
|
-
* Array of warnings that will be written into the import result summary at the end
|
|
2032
|
-
* of import job execution and displayed by the client.
|
|
2033
|
-
*/
|
|
2034
|
-
importWarnings: _zod.z.record(ImportWarning.array()).default({})
|
|
2035
|
-
});
|
|
2036
|
-
var FigmaImportContextWithSourcesState = FigmaImportBaseContext.extend({
|
|
2037
|
-
sourcesWithMissingAccess: _zod.z.array(_zod.z.string()).default([]),
|
|
2038
|
-
shadowOpacityOptional: _zod.z.boolean().default(false)
|
|
2039
|
-
});
|
|
2040
|
-
var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
|
|
2041
|
-
importMetadata: DataSourceFigmaImportMetadata
|
|
2042
|
-
});
|
|
2043
|
-
var FigmaImportContextWithDownloadScopes = FigmaImportContextWithSourcesState.extend({
|
|
2044
|
-
/**
|
|
2045
|
-
* Describes what to download from each file, this should contain all file id mentioned in
|
|
2046
|
-
* importMetadataBySourceId.
|
|
2047
|
-
*
|
|
2048
|
-
* File id -> file download scope
|
|
2049
|
-
*/
|
|
2050
|
-
fileDownloadScopesByFileId: _zod.z.record(FigmaFileDownloadScope),
|
|
2051
|
-
/**
|
|
2052
|
-
* Sources filtered down to the ones that have changed since last import and therefore need to be
|
|
2053
|
-
* imported again.
|
|
2054
|
-
*
|
|
2055
|
-
* Source id -> import metadata
|
|
2056
|
-
*/
|
|
2057
|
-
changedImportedSourceDataBySourceId: _zod.z.record(ChangedImportedFigmaSourceData)
|
|
2058
|
-
});
|
|
2059
|
-
var ImageImportModelType = _zod.z.enum(["Url", "FigmaRender"]);
|
|
2060
|
-
var ImageImportModelBase = _zod.z.object({
|
|
2061
|
-
scope: AssetScope
|
|
2062
|
-
});
|
|
2063
|
-
var UrlImageImportModel = ImageImportModelBase.extend({
|
|
2064
|
-
type: _zod.z.literal(ImageImportModelType.enum.Url),
|
|
2065
|
-
url: _zod.z.string(),
|
|
2066
|
-
originKey: _zod.z.string(),
|
|
2067
|
-
extension: _zod.z.string()
|
|
2068
|
-
});
|
|
2069
|
-
var FigmaRenderFormat = _zod.z.enum(["Svg", "Png", "Pdf"]);
|
|
2070
|
-
var FigmaRenderBase = ImageImportModelBase.extend({
|
|
2071
|
-
type: _zod.z.literal(ImageImportModelType.enum.FigmaRender),
|
|
2072
|
-
fileId: _zod.z.string(),
|
|
2073
|
-
fileVersionId: _zod.z.string().optional(),
|
|
2074
|
-
nodeId: _zod.z.string(),
|
|
2075
|
-
originKey: _zod.z.string()
|
|
2076
|
-
});
|
|
2077
|
-
var FigmaPngRenderImportModel = FigmaRenderBase.extend({
|
|
2078
|
-
format: _zod.z.literal(FigmaRenderFormat.enum.Png),
|
|
2079
|
-
scale: _zod.z.number()
|
|
2080
|
-
});
|
|
2081
|
-
var FigmaSvgRenderImportModel = FigmaRenderBase.extend({
|
|
2082
|
-
format: _zod.z.literal(FigmaRenderFormat.enum.Svg)
|
|
2083
|
-
});
|
|
2084
|
-
var FigmaRenderImportModel = _zod.z.discriminatedUnion("format", [
|
|
2085
|
-
FigmaPngRenderImportModel,
|
|
2086
|
-
FigmaSvgRenderImportModel
|
|
2087
|
-
]);
|
|
2088
|
-
var ImageImportModel = _zod.z.union([UrlImageImportModel, FigmaRenderImportModel]);
|
|
2089
|
-
var ImportModelBase = _zod.z.object({
|
|
2090
|
-
id: _zod.z.string(),
|
|
2091
|
-
meta: ObjectMeta,
|
|
2092
|
-
origin: DesignElementOrigin,
|
|
2093
|
-
brandPersistentId: _zod.z.string(),
|
|
2094
|
-
sortOrder: _zod.z.number()
|
|
2095
|
-
});
|
|
2096
|
-
var ImportModelInputBase = ImportModelBase.omit({
|
|
2097
|
-
brandPersistentId: true,
|
|
2098
|
-
origin: true,
|
|
2099
|
-
sortOrder: true
|
|
2100
|
-
}).extend({
|
|
2101
|
-
originId: _zod.z.string(),
|
|
2102
|
-
originMetadata: _zod.z.record(_zod.z.any())
|
|
2103
|
-
});
|
|
2104
|
-
var ComponentImportModelPart = _zod.z.object({
|
|
2105
|
-
thumbnail: ImageImportModel
|
|
2106
|
-
});
|
|
2107
|
-
var ComponentImportModel = ImportModelBase.extend(ComponentImportModelPart.shape).extend({
|
|
2108
|
-
isAsset: _zod.z.boolean(),
|
|
2109
|
-
svg: FigmaSvgRenderImportModel.optional(),
|
|
2110
|
-
origin: ComponentOrigin
|
|
2111
|
-
});
|
|
2112
|
-
var ComponentImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart.shape).extend({
|
|
2113
|
-
originMetadata: ComponentOriginPart
|
|
2114
|
-
});
|
|
2115
|
-
var AssetImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart.shape).extend({
|
|
2116
|
-
svg: FigmaSvgRenderImportModel,
|
|
2117
|
-
originMetadata: ComponentOriginPart
|
|
2118
|
-
});
|
|
2119
|
-
var ThemeOverrideImportModelBase = DesignTokenTypedData.and(
|
|
2120
|
-
_zod.z.object({
|
|
2121
|
-
id: _zod.z.string(),
|
|
2122
|
-
meta: ObjectMeta
|
|
2123
|
-
})
|
|
2124
|
-
);
|
|
2125
|
-
var ThemeOverrideImportModel = ThemeOverrideImportModelBase.and(
|
|
2126
|
-
_zod.z.object({
|
|
2127
|
-
origin: ThemeOverrideOrigin
|
|
2128
|
-
})
|
|
2129
|
-
);
|
|
2130
|
-
var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
|
|
2131
|
-
_zod.z.object({
|
|
2132
|
-
originId: _zod.z.string(),
|
|
2133
|
-
originMetadata: ThemeOverrideOriginPart
|
|
2134
|
-
})
|
|
2135
|
-
);
|
|
2136
|
-
var ThemeImportModel = _zod.z.object({
|
|
2137
|
-
meta: ObjectMeta,
|
|
2138
|
-
brandPersistentId: _zod.z.string(),
|
|
2139
|
-
originSource: ThemeOriginSource,
|
|
2140
|
-
overrides: _zod.z.array(ThemeOverrideImportModel),
|
|
2141
|
-
sortOrder: _zod.z.number()
|
|
2142
|
-
});
|
|
2143
|
-
var ThemeImportModelInput = _zod.z.object({
|
|
2144
|
-
meta: ObjectMeta,
|
|
2145
|
-
originObjects: _zod.z.array(ThemeOriginObject),
|
|
2146
|
-
overrides: _zod.z.array(ThemeOverrideImportModelInput)
|
|
2147
|
-
});
|
|
2148
|
-
var ThemeUpdateImportModel = _zod.z.object({
|
|
2149
|
-
themePersistentId: _zod.z.string(),
|
|
2150
|
-
overrides: _zod.z.array(ThemeOverrideImportModel)
|
|
2151
|
-
});
|
|
2152
|
-
var ThemeUpdateImportModelInput = _zod.z.object({
|
|
2153
|
-
themePersistentId: _zod.z.string(),
|
|
2154
|
-
overrides: _zod.z.array(ThemeOverrideImportModelInput)
|
|
2155
|
-
});
|
|
2156
|
-
var DesignTokenImportModelPart = _zod.z.object({
|
|
2157
|
-
collection: _zod.z.string().optional(),
|
|
2158
|
-
codeSyntax: _zod.z.record(_zod.z.coerce.string()).optional()
|
|
2159
|
-
});
|
|
2160
|
-
var DesignTokenImportModelBase = ImportModelBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
2161
|
-
origin: DesignTokenOrigin
|
|
2162
|
-
});
|
|
2163
|
-
var DesignTokenImportModelInputBase = ImportModelInputBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
2164
|
-
originMetadata: DesignTokenOriginPart
|
|
2165
|
-
});
|
|
2166
|
-
var DesignTokenImportModel = DesignTokenTypedData.and(DesignTokenImportModelBase);
|
|
2167
|
-
var DesignTokenImportModelInput = DesignTokenTypedData.and(DesignTokenImportModelInputBase);
|
|
2168
|
-
var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
|
|
2169
|
-
image: FigmaPngRenderImportModel
|
|
2170
|
-
});
|
|
2171
|
-
var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
|
|
2172
|
-
children: _zod.z.lazy(() => FigmaFileStructureNodeImportModel.array())
|
|
2173
|
-
});
|
|
2174
|
-
var FigmaFileStructureImportModelPart = _zod.z.object({
|
|
2175
|
-
data: _zod.z.object({
|
|
2176
|
-
rootNode: FigmaFileStructureNodeImportModel,
|
|
2177
|
-
assetsInFile: FigmaFileStructureStatistics
|
|
2178
|
-
})
|
|
2179
|
-
});
|
|
2180
|
-
var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImportModelPart.shape).extend({
|
|
2181
|
-
origin: FigmaFileStructureOrigin
|
|
2182
|
-
});
|
|
2183
|
-
var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
|
|
2184
|
-
FigmaFileStructureImportModelPart.shape
|
|
2185
|
-
).extend({
|
|
2186
|
-
fileVersionId: _zod.z.string()
|
|
2187
|
-
});
|
|
2188
|
-
var DataSourceImportModel = _zod.z.object({
|
|
2189
|
-
id: _zod.z.string(),
|
|
2190
|
-
fileName: _zod.z.string().optional(),
|
|
2191
|
-
thumbnailUrl: _zod.z.string().optional()
|
|
2192
|
-
});
|
|
2193
|
-
var ImportModelInputCollection = _zod.z.object({
|
|
2194
|
-
source: DataSourceImportModel,
|
|
2195
|
-
tokens: _zod.z.array(DesignTokenImportModelInput).default([]),
|
|
2196
|
-
components: _zod.z.array(ComponentImportModelInput).default([]),
|
|
2197
|
-
assets: _zod.z.array(AssetImportModelInput).default([]),
|
|
2198
|
-
themeUpdates: _zod.z.array(ThemeUpdateImportModelInput).default([]),
|
|
2199
|
-
themes: _zod.z.array(ThemeImportModelInput).default([]),
|
|
2200
|
-
figmaFileStructure: FigmaFileStructureImportModelInput.optional()
|
|
2201
|
-
});
|
|
2202
|
-
var ImportModelCollection = _zod.z.object({
|
|
2203
|
-
sources: _zod.z.array(DataSourceImportModel),
|
|
2204
|
-
tokens: _zod.z.array(DesignTokenImportModel).default([]),
|
|
2205
|
-
components: _zod.z.array(ComponentImportModel).default([]),
|
|
2206
|
-
themeUpdates: _zod.z.array(ThemeUpdateImportModel).default([]),
|
|
2207
|
-
themes: _zod.z.array(ThemeImportModel).default([]),
|
|
2208
|
-
figmaFileStructures: _zod.z.array(FigmaFileStructureImportModel)
|
|
2209
|
-
});
|
|
2210
|
-
var AssetRenderConfiguration = _zod.z.object({
|
|
2211
|
-
prefix: _zod.z.string().optional(),
|
|
2212
|
-
suffix: _zod.z.string().optional(),
|
|
2213
|
-
scale: _zod.z.number(),
|
|
2214
|
-
format: FigmaRenderFormat
|
|
2215
|
-
});
|
|
2216
|
-
var RenderedAssetFile = _zod.z.object({
|
|
2217
|
-
assetPersistentId: _zod.z.string(),
|
|
2218
|
-
assetName: _zod.z.string(),
|
|
2219
|
-
renderedImageFileName: _zod.z.string(),
|
|
2220
|
-
renderedImageUrl: _zod.z.string(),
|
|
2221
|
-
settings: AssetRenderConfiguration
|
|
2222
|
-
});
|
|
2223
|
-
var PageBlockDefinitionAppearance = _zod.z.object({
|
|
2224
|
-
isBordered: _zod.z.boolean().optional(),
|
|
2225
|
-
hasBackground: _zod.z.boolean().optional(),
|
|
2226
|
-
isEditorPresentationDifferent: _zod.z.boolean().optional(),
|
|
2227
|
-
showBlockHeaderInEditor: _zod.z.boolean().optional()
|
|
2228
|
-
});
|
|
2229
|
-
var PageBlockDefinitionLayoutType = _zod.z.enum(["Column", "Row"]);
|
|
2230
|
-
var PageBlockDefinitionLayoutGap = _zod.z.enum(["Small", "Medium", "Large", "None"]);
|
|
2231
|
-
var PageBlockDefinitionLayoutAlign = _zod.z.enum(["Start", "Center", "End"]);
|
|
2232
|
-
var PageBlockDefinitionLayoutResizing = _zod.z.enum(["Fill", "Hug"]);
|
|
2233
|
-
var PageBlockDefinitionLayoutBase = _zod.z.object({
|
|
2234
|
-
type: PageBlockDefinitionLayoutType,
|
|
2235
|
-
gap: PageBlockDefinitionLayoutGap.optional(),
|
|
2236
|
-
columnAlign: PageBlockDefinitionLayoutAlign.optional(),
|
|
2237
|
-
columnResizing: PageBlockDefinitionLayoutResizing.optional()
|
|
2238
|
-
});
|
|
2239
|
-
var PageBlockDefinitionLayout = PageBlockDefinitionLayoutBase.extend({
|
|
2240
|
-
children: _zod.z.lazy(() => _zod.z.array(PageBlockDefinitionLayout.or(_zod.z.string())))
|
|
2241
|
-
});
|
|
2242
|
-
var PageBlockDefinitionVariant = _zod.z.object({
|
|
2243
|
-
id: _zod.z.string(),
|
|
2244
|
-
name: _zod.z.string(),
|
|
2245
|
-
image: _zod.z.string().optional(),
|
|
2246
|
-
description: _zod.z.string().optional(),
|
|
2247
|
-
documentationLink: _zod.z.string().optional(),
|
|
2248
|
-
layout: PageBlockDefinitionLayout,
|
|
2249
|
-
maxColumns: _zod.z.number().optional(),
|
|
2250
|
-
defaultColumns: _zod.z.number().optional(),
|
|
2251
|
-
appearance: PageBlockDefinitionAppearance.optional()
|
|
2252
|
-
});
|
|
2253
|
-
var PageBlockDefinitionPropertyType = _zod.z.enum([
|
|
2254
|
-
"RichText",
|
|
2255
|
-
"MultiRichText",
|
|
2256
|
-
"Text",
|
|
2257
|
-
"Boolean",
|
|
2258
|
-
"Number",
|
|
2259
|
-
"SingleSelect",
|
|
2260
|
-
"MultiSelect",
|
|
2261
|
-
"Image",
|
|
2262
|
-
"Token",
|
|
2263
|
-
"TokenType",
|
|
2264
|
-
"TokenProperty",
|
|
2265
|
-
"Component",
|
|
2266
|
-
"ComponentProperty",
|
|
2267
|
-
"Asset",
|
|
2268
|
-
"AssetProperty",
|
|
2269
|
-
"FigmaNode",
|
|
2270
|
-
"EmbedURL",
|
|
2271
|
-
"URL",
|
|
2272
|
-
"Markdown",
|
|
2273
|
-
"Code",
|
|
2274
|
-
"CodeSandbox",
|
|
2275
|
-
"Table",
|
|
2276
|
-
"Divider",
|
|
2277
|
-
"Storybook",
|
|
2278
|
-
"Color",
|
|
2279
|
-
"FigmaComponent"
|
|
2280
|
-
]);
|
|
2281
|
-
var PageBlockDefinitionRichTextPropertyStyle = _zod.z.enum([
|
|
2282
|
-
"Title1",
|
|
2283
|
-
"Title2",
|
|
2284
|
-
"Title3",
|
|
2285
|
-
"Title4",
|
|
2286
|
-
"Title5",
|
|
2287
|
-
"Quote",
|
|
2288
|
-
"Callout",
|
|
2289
|
-
"Default"
|
|
2290
|
-
]);
|
|
2291
|
-
var PageBlockDefinitionMultiRichTextPropertyStyle = _zod.z.enum(["OL", "UL", "Default"]);
|
|
2292
|
-
var PageBlockDefinitionTextPropertyStyle = _zod.z.enum([
|
|
2293
|
-
"Title1",
|
|
2294
|
-
"Title2",
|
|
2295
|
-
"Title3",
|
|
2296
|
-
"Title4",
|
|
2297
|
-
"Title5",
|
|
2298
|
-
"Default",
|
|
2299
|
-
"DefaultBold",
|
|
2300
|
-
"DefaultSemibold",
|
|
2301
|
-
"Small",
|
|
2302
|
-
"SmallBold",
|
|
2303
|
-
"SmallSemibold",
|
|
2304
|
-
"Custom"
|
|
2305
|
-
]);
|
|
2306
|
-
var PageBlockDefinitionTextPropertyColor = _zod.z.enum(["Neutral", "NeutralFaded"]);
|
|
2307
|
-
var PageBlockDefinitionBooleanPropertyStyle = _zod.z.enum(["SegmentedControl", "ToggleButton", "Checkbox"]);
|
|
2308
|
-
var PageBlockDefinitionSingleSelectPropertyStyle = _zod.z.enum([
|
|
2309
|
-
"SegmentedControl",
|
|
2310
|
-
"ToggleButton",
|
|
2311
|
-
"Select",
|
|
2312
|
-
"Checkbox"
|
|
2313
|
-
]);
|
|
2314
|
-
var PageBlockDefinitionSingleSelectPropertyColor = _zod.z.enum([
|
|
2315
|
-
"Green",
|
|
2316
|
-
"Red",
|
|
2317
|
-
"Yellow",
|
|
2318
|
-
"Blue",
|
|
2319
|
-
"Purple",
|
|
2320
|
-
"Orange",
|
|
2321
|
-
"Pink",
|
|
2322
|
-
"Teal",
|
|
2323
|
-
"Brown",
|
|
2324
|
-
"Grey",
|
|
2325
|
-
"LightGrey",
|
|
2326
|
-
"Cyan",
|
|
2327
|
-
"Fuchsia"
|
|
2328
|
-
]);
|
|
2329
|
-
var IconSet = _zod.z.enum([
|
|
2330
|
-
"CheckCircle",
|
|
2331
|
-
"CrossCircle",
|
|
2332
|
-
"Alert"
|
|
2333
|
-
]);
|
|
2334
|
-
var PageBlockDefinitionMultiSelectPropertyStyle = _zod.z.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
2335
|
-
var PageBlockDefinitionImageAspectRatio = _zod.z.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
|
|
2336
|
-
var PageBlockDefinitionImageWidth = _zod.z.enum(["Full", "Icon", "Small", "Medium", "Large", "Poster"]);
|
|
2337
|
-
var PageBlockDefinitionSelectChoice = _zod.z.object({
|
|
2338
|
-
value: _zod.z.string(),
|
|
2339
|
-
name: _zod.z.string(),
|
|
2340
|
-
icon: IconSet.optional(),
|
|
2341
|
-
customIconUrl: _zod.z.string().optional(),
|
|
2342
|
-
color: PageBlockDefinitionSingleSelectPropertyColor.optional()
|
|
2343
|
-
});
|
|
2344
|
-
var PageBlockDefinitionUntypedPropertyOptions = _zod.z.record(_zod.z.any());
|
|
2345
|
-
var PageBlockDefinitionRichTextOptions = _zod.z.object({
|
|
2346
|
-
richTextStyle: PageBlockDefinitionRichTextPropertyStyle.optional()
|
|
2347
|
-
});
|
|
2348
|
-
var PageBlockDefinitionMutiRichTextOptions = _zod.z.object({
|
|
2349
|
-
multiRichTextStyle: PageBlockDefinitionMultiRichTextPropertyStyle.optional()
|
|
2350
|
-
});
|
|
2351
|
-
var PageBlockDefinitionTextOptions = _zod.z.object({
|
|
2352
|
-
placeholder: _zod.z.string().optional(),
|
|
2353
|
-
defaultValue: _zod.z.string().optional(),
|
|
2354
|
-
textStyle: PageBlockDefinitionTextPropertyStyle.optional(),
|
|
2355
|
-
color: PageBlockDefinitionTextPropertyColor.optional(),
|
|
2356
|
-
allowLineBreaks: _zod.z.boolean().optional()
|
|
2357
|
-
});
|
|
2358
|
-
var PageBlockDefinitionSelectOptions = _zod.z.object({
|
|
2359
|
-
singleSelectStyle: PageBlockDefinitionSingleSelectPropertyStyle.optional(),
|
|
2360
|
-
defaultChoice: _zod.z.string(),
|
|
2361
|
-
choices: _zod.z.array(PageBlockDefinitionSelectChoice)
|
|
2362
|
-
});
|
|
2363
|
-
var PageBlockDefinitionImageOptions = _zod.z.object({
|
|
2364
|
-
width: PageBlockDefinitionImageWidth.optional(),
|
|
2365
|
-
aspectRatio: PageBlockDefinitionImageAspectRatio.optional(),
|
|
2366
|
-
allowCaption: _zod.z.boolean().optional(),
|
|
2367
|
-
recommendation: _zod.z.string().optional()
|
|
2368
|
-
});
|
|
2369
|
-
var PageBlockDefinitionBooleanOptions = _zod.z.object({
|
|
2370
|
-
defaultvalue: _zod.z.boolean().optional(),
|
|
2371
|
-
booleanStyle: PageBlockDefinitionBooleanPropertyStyle.optional()
|
|
2372
|
-
});
|
|
2373
|
-
var PageBlockDefinitionNumberOptions = _zod.z.object({
|
|
2374
|
-
defaultValue: _zod.z.number(),
|
|
2375
|
-
min: _zod.z.number().optional(),
|
|
2376
|
-
max: _zod.z.number().optional(),
|
|
2377
|
-
step: _zod.z.number().optional(),
|
|
2378
|
-
placeholder: _zod.z.string().optional()
|
|
2379
|
-
});
|
|
2380
|
-
var PageBlockDefinitionComponentOptions = _zod.z.object({
|
|
2381
|
-
renderLayoutAs: _zod.z.enum(["List", "Table"]).optional(),
|
|
2382
|
-
allowPropertySelection: _zod.z.boolean().optional()
|
|
2383
|
-
});
|
|
2384
|
-
var PageBlockDefinitionProperty = _zod.z.object({
|
|
2385
|
-
id: _zod.z.string(),
|
|
2386
|
-
name: _zod.z.string(),
|
|
2387
|
-
type: PageBlockDefinitionPropertyType,
|
|
2388
|
-
description: _zod.z.string().optional(),
|
|
2389
|
-
options: PageBlockDefinitionUntypedPropertyOptions.optional(),
|
|
2390
|
-
variantOptions: _zod.z.record(PageBlockDefinitionUntypedPropertyOptions).optional()
|
|
2391
|
-
});
|
|
2392
|
-
var PageBlockDefinitionItem = _zod.z.object({
|
|
2393
|
-
properties: _zod.z.array(PageBlockDefinitionProperty),
|
|
2394
|
-
appearance: PageBlockDefinitionAppearance.optional(),
|
|
2395
|
-
variants: _zod.z.array(PageBlockDefinitionVariant),
|
|
2396
|
-
defaultVariantKey: _zod.z.string()
|
|
2397
|
-
});
|
|
2398
|
-
var PageBlockCategory = _zod.z.enum([
|
|
2399
|
-
"Text",
|
|
2400
|
-
"Layout",
|
|
2401
|
-
"Media",
|
|
2402
|
-
"Embed",
|
|
2403
|
-
"Figma",
|
|
2404
|
-
"Code",
|
|
2405
|
-
"Guidelines",
|
|
2406
|
-
"Tokens",
|
|
2407
|
-
"Components",
|
|
2408
|
-
"Assets",
|
|
2409
|
-
"Data",
|
|
2410
|
-
"Other"
|
|
2411
|
-
]);
|
|
2412
|
-
var PageBlockBehaviorDataType = _zod.z.enum(["Item", "Token", "Asset", "Component", "FigmaNode", "FigmaComponent"]);
|
|
2413
|
-
var PageBlockBehaviorSelectionType = _zod.z.enum(["Entity", "Group", "EntityAndGroup"]);
|
|
2414
|
-
var PageBlockDefinitionBehavior = _zod.z.object({
|
|
2415
|
-
dataType: PageBlockBehaviorDataType,
|
|
2416
|
-
items: _zod.z.object({
|
|
2417
|
-
numberOfItems: _zod.z.number(),
|
|
2418
|
-
allowLinks: _zod.z.boolean(),
|
|
2419
|
-
newItemLabel: _zod.z.string().optional()
|
|
2420
|
-
}).optional(),
|
|
2421
|
-
entities: _zod.z.object({
|
|
2422
|
-
selectionType: PageBlockBehaviorSelectionType,
|
|
2423
|
-
maxSelected: _zod.z.number()
|
|
2424
|
-
}).optional()
|
|
2425
|
-
});
|
|
2426
|
-
var PageBlockDefinitionOnboarding = _zod.z.object({
|
|
2427
|
-
helpText: _zod.z.string(),
|
|
2428
|
-
documentationLink: _zod.z.string().optional()
|
|
2429
|
-
});
|
|
2430
|
-
var PageBlockDefinition = _zod.z.object({
|
|
2431
|
-
id: _zod.z.string(),
|
|
2432
|
-
name: _zod.z.string(),
|
|
2433
|
-
description: _zod.z.string(),
|
|
2434
|
-
category: PageBlockCategory,
|
|
2435
|
-
icon: _zod.z.string().optional(),
|
|
2436
|
-
documentationLink: _zod.z.string().optional(),
|
|
2437
|
-
searchKeywords: _zod.z.array(_zod.z.string()).optional(),
|
|
2438
|
-
item: PageBlockDefinitionItem,
|
|
2439
|
-
behavior: PageBlockDefinitionBehavior,
|
|
2440
|
-
editorOptions: _zod.z.object({
|
|
2441
|
-
onboarding: PageBlockDefinitionOnboarding.optional(),
|
|
2442
|
-
newItemLabel: _zod.z.string().optional()
|
|
2443
|
-
}),
|
|
2444
|
-
appearance: PageBlockDefinitionAppearance.optional()
|
|
2445
|
-
});
|
|
2446
|
-
var DocumentationPageGroup = _zod.z.object({
|
|
2447
|
-
type: _zod.z.literal("ElementGroup"),
|
|
2448
|
-
childType: _zod.z.literal("DocumentationPage"),
|
|
2449
|
-
id: _zod.z.string(),
|
|
2450
|
-
persistentId: _zod.z.string(),
|
|
2451
|
-
shortPersistentId: _zod.z.string(),
|
|
2452
|
-
designSystemVersionId: _zod.z.string(),
|
|
2453
|
-
parentPersistentId: _zod.z.string().nullish(),
|
|
2454
|
-
sortOrder: _zod.z.number(),
|
|
2455
|
-
title: _zod.z.string(),
|
|
2456
|
-
slug: _zod.z.string(),
|
|
2457
|
-
userSlug: _zod.z.string().nullish(),
|
|
2458
|
-
createdAt: _zod.z.coerce.date(),
|
|
2459
|
-
updatedAt: _zod.z.coerce.date()
|
|
2460
|
-
});
|
|
2461
|
-
var DocumentationLinkPreview = _zod.z.object({
|
|
2462
|
-
title: _zod.z.string().optional(),
|
|
2463
|
-
description: _zod.z.string().optional(),
|
|
2464
|
-
thumbnail: PageBlockImageReference.optional()
|
|
2465
|
-
});
|
|
2466
|
-
var DocumentationPageAnchor = _zod.z.object({
|
|
2467
|
-
blockId: _zod.z.string(),
|
|
2468
|
-
level: _zod.z.number(),
|
|
2469
|
-
text: _zod.z.string()
|
|
2470
|
-
});
|
|
2471
|
-
var DocumentationPageContentBackup = _zod.z.object({
|
|
2472
|
-
id: _zod.z.string(),
|
|
2473
|
-
designSystemVersionId: _zod.z.string(),
|
|
2474
|
-
createdAt: _zod.z.coerce.date(),
|
|
2475
|
-
updatedAt: _zod.z.coerce.date(),
|
|
2476
|
-
documentationPageId: _zod.z.string(),
|
|
2477
|
-
documentationPageName: _zod.z.string(),
|
|
2478
|
-
storagePath: _zod.z.string()
|
|
2479
|
-
});
|
|
2480
|
-
var DocumentationPageContentItem = _zod.z.discriminatedUnion("type", [
|
|
2481
|
-
PageBlockEditorModelV2,
|
|
2482
|
-
PageSectionEditorModelV2
|
|
2483
|
-
]);
|
|
2484
|
-
var DocumentationPageContentData = _zod.z.object({
|
|
2485
|
-
items: _zod.z.array(DocumentationPageContentItem)
|
|
2486
|
-
});
|
|
2487
|
-
var DocumentationPageContent = _zod.z.object({
|
|
2488
|
-
id: _zod.z.string(),
|
|
2489
|
-
designSystemVersionId: _zod.z.string(),
|
|
2490
|
-
createdAt: _zod.z.coerce.date(),
|
|
2491
|
-
updatedAt: _zod.z.coerce.date(),
|
|
2492
|
-
documentationPageId: _zod.z.string(),
|
|
2493
|
-
data: DocumentationPageContentData
|
|
2494
|
-
});
|
|
2495
|
-
var DocumentationPage = _zod.z.object({
|
|
2496
|
-
type: _zod.z.literal("DocumentationPage"),
|
|
2497
|
-
id: _zod.z.string(),
|
|
2498
|
-
persistentId: _zod.z.string(),
|
|
2499
|
-
shortPersistentId: _zod.z.string(),
|
|
2500
|
-
designSystemVersionId: _zod.z.string(),
|
|
2501
|
-
parentPersistentId: _zod.z.string().nullish(),
|
|
2502
|
-
sortOrder: _zod.z.number(),
|
|
2503
|
-
title: _zod.z.string(),
|
|
2504
|
-
slug: _zod.z.string(),
|
|
2505
|
-
userSlug: _zod.z.string().nullish(),
|
|
2506
|
-
createdAt: _zod.z.coerce.date(),
|
|
2507
|
-
updatedAt: _zod.z.coerce.date()
|
|
2508
|
-
});
|
|
2509
|
-
var DocumentationComment = _zod.z.object({
|
|
2510
|
-
id: _zod.z.string(),
|
|
2511
|
-
authorId: _zod.z.string(),
|
|
2512
|
-
threadId: _zod.z.string(),
|
|
2513
|
-
roomId: _zod.z.string(),
|
|
2514
|
-
createdAt: _zod.z.coerce.date(),
|
|
2515
|
-
editedAt: _zod.z.coerce.date().optional(),
|
|
2516
|
-
deletedAt: _zod.z.coerce.date().optional(),
|
|
2517
|
-
body: _zod.z.string()
|
|
2518
|
-
});
|
|
2519
|
-
var DocumentationCommentThread = _zod.z.object({
|
|
2520
|
-
id: _zod.z.string(),
|
|
2521
|
-
roomId: _zod.z.string(),
|
|
2522
|
-
pagePersistentId: _zod.z.string(),
|
|
2523
|
-
brandId: _zod.z.string(),
|
|
2524
|
-
designSystemVersionId: _zod.z.string(),
|
|
2525
|
-
designSystemId: _zod.z.string(),
|
|
2526
|
-
blockId: _zod.z.string().optional(),
|
|
2527
|
-
resolved: _zod.z.boolean(),
|
|
2528
|
-
createdAt: _zod.z.coerce.date(),
|
|
2529
|
-
updatedAt: _zod.z.coerce.date()
|
|
2530
|
-
});
|
|
2531
|
-
var SupernovaException = class _SupernovaException extends Error {
|
|
2532
|
-
//
|
|
2533
|
-
// Properties
|
|
2534
|
-
//
|
|
2535
|
-
constructor(type, message) {
|
|
2536
|
-
super(`${type}: ${message}`);
|
|
2537
|
-
this.type = type;
|
|
2538
|
-
}
|
|
2539
|
-
static wrongFormat(message) {
|
|
2540
|
-
return new _SupernovaException("WrongFormat", message);
|
|
2541
|
-
}
|
|
2542
|
-
static validationError(message) {
|
|
2543
|
-
return new _SupernovaException("ValidationError", message);
|
|
2544
|
-
}
|
|
2545
|
-
static accessDenied(message) {
|
|
2546
|
-
return new _SupernovaException("AccessDenied", message);
|
|
2547
|
-
}
|
|
2548
|
-
static tooMuchWork(message) {
|
|
2549
|
-
return new _SupernovaException("TooMuchWork", message);
|
|
2550
|
-
}
|
|
2551
|
-
static notFound(message) {
|
|
2552
|
-
return new _SupernovaException("ResourceNotFound", message);
|
|
2553
|
-
}
|
|
2554
|
-
static timeout(message) {
|
|
2555
|
-
return new _SupernovaException("Timeout", message);
|
|
2556
|
-
}
|
|
2557
|
-
static conflict(message) {
|
|
2558
|
-
return new _SupernovaException("Conflict", message);
|
|
2559
|
-
}
|
|
2560
|
-
static notImplemented(message) {
|
|
2561
|
-
return new _SupernovaException("NotImplemented", message);
|
|
2562
|
-
}
|
|
2563
|
-
static wrongActionOrder(message) {
|
|
2564
|
-
return new _SupernovaException("WrongActionOrder", message);
|
|
2565
|
-
}
|
|
2566
|
-
static invalidOperation(message) {
|
|
2567
|
-
return new _SupernovaException("InvalidOperation", message);
|
|
2568
|
-
}
|
|
2569
|
-
static shouldNotHappen(message) {
|
|
2570
|
-
return new _SupernovaException("UnexpectedError", message);
|
|
2571
|
-
}
|
|
2572
|
-
static ipRestricted(message) {
|
|
2573
|
-
return new _SupernovaException("IPRestricted", message);
|
|
2574
|
-
}
|
|
2575
|
-
static planRestricted(message) {
|
|
2576
|
-
return new _SupernovaException("PlanRestricted", message);
|
|
2577
|
-
}
|
|
2578
|
-
static missingWorkspacePermission(message) {
|
|
2579
|
-
return new _SupernovaException("MissingWorkspacePermission", message);
|
|
2580
|
-
}
|
|
2581
|
-
static missingExporterPermission(message) {
|
|
2582
|
-
return new _SupernovaException("MissingExporterPermission", message);
|
|
2583
|
-
}
|
|
2584
|
-
static missingIntegration(message) {
|
|
2585
|
-
return new _SupernovaException("MissingIntegration", message);
|
|
2586
|
-
}
|
|
2587
|
-
static missingIntegrationAccess(message) {
|
|
2588
|
-
return new _SupernovaException("MissingIntegrationAccess", message);
|
|
2589
|
-
}
|
|
2590
|
-
static noAccess(message) {
|
|
2591
|
-
return new _SupernovaException("NoAccess", message);
|
|
2592
|
-
}
|
|
2593
|
-
static missingCredentials(message) {
|
|
2594
|
-
return new _SupernovaException("MissingCredentials", message);
|
|
2595
|
-
}
|
|
2596
|
-
static thirdPartyError(message) {
|
|
2597
|
-
return new _SupernovaException("ThirdPartyError", message);
|
|
2598
|
-
}
|
|
2599
|
-
//
|
|
2600
|
-
// To refactor
|
|
2601
|
-
//
|
|
2602
|
-
static badRequest(message) {
|
|
2603
|
-
return new _SupernovaException("BadRequest", message);
|
|
2604
|
-
}
|
|
2605
|
-
};
|
|
2606
|
-
function tryParseUrl(url) {
|
|
2607
|
-
try {
|
|
2608
|
-
return parseUrl(url);
|
|
2609
|
-
} catch (e) {
|
|
2610
|
-
console.error(`Error parsing URL ${url}`);
|
|
2611
|
-
console.error(e);
|
|
2612
|
-
return null;
|
|
2613
|
-
}
|
|
2614
|
-
}
|
|
2615
|
-
function parseUrl(url) {
|
|
2616
|
-
return new URL(url.startsWith("https://") || url.startsWith("http://") ? url : `https://${url}`);
|
|
2617
|
-
}
|
|
2618
|
-
function mapByUnique(items, keyFn) {
|
|
2619
|
-
const result = /* @__PURE__ */ new Map();
|
|
2620
|
-
for (const item of items) {
|
|
2621
|
-
result.set(keyFn(item), item);
|
|
2622
|
-
}
|
|
2623
|
-
return result;
|
|
2624
|
-
}
|
|
2625
|
-
function groupBy(items, keyFn) {
|
|
2626
|
-
const result = /* @__PURE__ */ new Map();
|
|
2627
|
-
for (const item of items) {
|
|
2628
|
-
const key = keyFn(item);
|
|
2629
|
-
const array = result.get(key);
|
|
2630
|
-
if (array) {
|
|
2631
|
-
array.push(item);
|
|
2632
|
-
} else {
|
|
2633
|
-
result.set(key, [item]);
|
|
2634
|
-
}
|
|
2635
|
-
}
|
|
2636
|
-
return result;
|
|
2637
|
-
}
|
|
2638
|
-
var ContentLoadInstruction = _zod.z.object({
|
|
2639
|
-
from: _zod.z.string(),
|
|
2640
|
-
to: _zod.z.string(),
|
|
2641
|
-
authorizationHeaderKvsId: _zod.z.string().optional(),
|
|
2642
|
-
timeout: _zod.z.number().optional()
|
|
2643
|
-
});
|
|
2644
|
-
var ContentLoaderPayload = _zod.z.object({
|
|
2645
|
-
type: _zod.z.literal("Single"),
|
|
2646
|
-
instruction: ContentLoadInstruction
|
|
2647
|
-
}).or(
|
|
2648
|
-
_zod.z.object({
|
|
2649
|
-
type: _zod.z.literal("Multiple"),
|
|
2650
|
-
loadingChunkSize: _zod.z.number().optional(),
|
|
2651
|
-
instructions: _zod.z.array(ContentLoadInstruction)
|
|
2652
|
-
})
|
|
2653
|
-
).or(
|
|
2654
|
-
_zod.z.object({
|
|
2655
|
-
type: _zod.z.literal("S3"),
|
|
2656
|
-
location: _zod.z.string()
|
|
2657
|
-
})
|
|
762
|
+
var ContentLoaderPayload = _zod.z.object({
|
|
763
|
+
type: _zod.z.literal("Single"),
|
|
764
|
+
instruction: ContentLoadInstruction
|
|
765
|
+
}).or(
|
|
766
|
+
_zod.z.object({
|
|
767
|
+
type: _zod.z.literal("Multiple"),
|
|
768
|
+
loadingChunkSize: _zod.z.number().optional(),
|
|
769
|
+
instructions: _zod.z.array(ContentLoadInstruction)
|
|
770
|
+
})
|
|
771
|
+
).or(
|
|
772
|
+
_zod.z.object({
|
|
773
|
+
type: _zod.z.literal("S3"),
|
|
774
|
+
location: _zod.z.string()
|
|
775
|
+
})
|
|
2658
776
|
);
|
|
2659
777
|
function slugify(str, options) {
|
|
2660
778
|
const slug = _slugify2.default.call(void 0, _nullishCoalesce(str, () => ( "")), options);
|
|
@@ -3281,6 +1399,1889 @@ var RESERVED_SLUGS = [
|
|
|
3281
1399
|
];
|
|
3282
1400
|
var RESERVED_SLUGS_SET = new Set(RESERVED_SLUGS);
|
|
3283
1401
|
var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
1402
|
+
var ElementPropertyTypeSchema = _zod.z.enum(["Text", "Number", "Boolean", "Select", "Generic", "Link", "URL"]);
|
|
1403
|
+
var ElementPropertyTargetType = _zod.z.enum(["Token", "Component", "DocumentationPage"]);
|
|
1404
|
+
var ElementPropertyLinkType = _zod.z.enum(["FigmaComponent", "DocumentationPage"]);
|
|
1405
|
+
var CODE_NAME_REGEX = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
1406
|
+
var ColorTokenInlineData = _zod.z.object({
|
|
1407
|
+
value: _zod.z.string()
|
|
1408
|
+
});
|
|
1409
|
+
var ElementPropertyDefinitionOption = _zod.z.object({
|
|
1410
|
+
id: _zod.z.string(),
|
|
1411
|
+
name: _zod.z.string(),
|
|
1412
|
+
backgroundColor: ColorTokenInlineData.optional()
|
|
1413
|
+
});
|
|
1414
|
+
var ElementPropertyDefinition = _zod.z.object({
|
|
1415
|
+
id: _zod.z.string(),
|
|
1416
|
+
designSystemVersionId: _zod.z.string(),
|
|
1417
|
+
persistentId: _zod.z.string(),
|
|
1418
|
+
name: _zod.z.string(),
|
|
1419
|
+
codeName: _zod.z.string().regex(CODE_NAME_REGEX),
|
|
1420
|
+
description: _zod.z.string(),
|
|
1421
|
+
type: ElementPropertyTypeSchema,
|
|
1422
|
+
targetElementType: ElementPropertyTargetType,
|
|
1423
|
+
options: _zod.z.array(ElementPropertyDefinitionOption).optional(),
|
|
1424
|
+
linkElementType: ElementPropertyLinkType.optional()
|
|
1425
|
+
});
|
|
1426
|
+
var ElementPropertyType = ElementPropertyTypeSchema.enum;
|
|
1427
|
+
var ElementPropertyValue = _zod.z.object({
|
|
1428
|
+
id: _zod.z.string(),
|
|
1429
|
+
designSystemVersionId: _zod.z.string(),
|
|
1430
|
+
targetElementPersistentId: _zod.z.string(),
|
|
1431
|
+
definitionPersistentId: _zod.z.string(),
|
|
1432
|
+
stringValue: _zod.z.string().nullish(),
|
|
1433
|
+
numberValue: _zod.z.number().nullish(),
|
|
1434
|
+
booleanValue: _zod.z.boolean().nullish(),
|
|
1435
|
+
referenceValue: _zod.z.string().nullish(),
|
|
1436
|
+
referenceValuePreview: _zod.z.string().optional()
|
|
1437
|
+
});
|
|
1438
|
+
var Point2D = _zod.z.object({
|
|
1439
|
+
x: _zod.z.number(),
|
|
1440
|
+
y: _zod.z.number()
|
|
1441
|
+
});
|
|
1442
|
+
var nullSize = { height: -1, width: -1 };
|
|
1443
|
+
function isNullSize(size) {
|
|
1444
|
+
return size.height === nullSize.height && size.width === nullSize.width;
|
|
1445
|
+
}
|
|
1446
|
+
var Size = _zod.z.object({
|
|
1447
|
+
width: _zod.z.number().nullish().transform((v) => _nullishCoalesce(v, () => ( nullSize.width))),
|
|
1448
|
+
height: _zod.z.number().nullish().transform((v) => _nullishCoalesce(v, () => ( nullSize.height)))
|
|
1449
|
+
});
|
|
1450
|
+
var SizeOrUndefined = Size.optional().transform((v) => {
|
|
1451
|
+
if (!v)
|
|
1452
|
+
return void 0;
|
|
1453
|
+
if (isNullSize(v))
|
|
1454
|
+
return void 0;
|
|
1455
|
+
return v;
|
|
1456
|
+
});
|
|
1457
|
+
var DesignTokenType = _zod.z.enum([
|
|
1458
|
+
"Color",
|
|
1459
|
+
"Border",
|
|
1460
|
+
"Gradient",
|
|
1461
|
+
"Shadow",
|
|
1462
|
+
"Dimension",
|
|
1463
|
+
"Duration",
|
|
1464
|
+
"Size",
|
|
1465
|
+
"Space",
|
|
1466
|
+
"Opacity",
|
|
1467
|
+
"FontSize",
|
|
1468
|
+
"LineHeight",
|
|
1469
|
+
"LetterSpacing",
|
|
1470
|
+
"ParagraphSpacing",
|
|
1471
|
+
"BorderWidth",
|
|
1472
|
+
"BorderRadius",
|
|
1473
|
+
"Duration",
|
|
1474
|
+
"ZIndex",
|
|
1475
|
+
"Image",
|
|
1476
|
+
"String",
|
|
1477
|
+
"ProductCopy",
|
|
1478
|
+
"FontFamily",
|
|
1479
|
+
"FontWeight",
|
|
1480
|
+
"TextDecoration",
|
|
1481
|
+
"TextCase",
|
|
1482
|
+
"Visibility",
|
|
1483
|
+
"Typography",
|
|
1484
|
+
"Blur",
|
|
1485
|
+
"Font"
|
|
1486
|
+
]);
|
|
1487
|
+
var tokenElementTypes = [...DesignTokenType.options.filter((v) => v !== "Font")];
|
|
1488
|
+
var DesignElementType = DesignTokenType.or(
|
|
1489
|
+
_zod.z.enum([
|
|
1490
|
+
"Component",
|
|
1491
|
+
"Theme",
|
|
1492
|
+
"Documentation",
|
|
1493
|
+
"DocumentationPage",
|
|
1494
|
+
"DesignSystemComponent",
|
|
1495
|
+
"ElementGroup",
|
|
1496
|
+
"FigmaNodeStructure",
|
|
1497
|
+
"FigmaNodeReference",
|
|
1498
|
+
"PageBlock"
|
|
1499
|
+
])
|
|
1500
|
+
);
|
|
1501
|
+
var DesignElementCategory = _zod.z.enum([
|
|
1502
|
+
"Token",
|
|
1503
|
+
"Component",
|
|
1504
|
+
"DesignSystemComponent",
|
|
1505
|
+
"DocumentationPage",
|
|
1506
|
+
"Theme",
|
|
1507
|
+
"PageBlock"
|
|
1508
|
+
]);
|
|
1509
|
+
var DesignSystemElementExportProps = _zod.z.object({
|
|
1510
|
+
isAsset: _zod.z.boolean().nullish().transform((v) => _nullishCoalesce(v, () => ( false))),
|
|
1511
|
+
codeName: _zod.z.string().nullish()
|
|
1512
|
+
});
|
|
1513
|
+
var ShallowDesignElement = _zod.z.object({
|
|
1514
|
+
id: _zod.z.string(),
|
|
1515
|
+
persistentId: _zod.z.string(),
|
|
1516
|
+
designSystemVersionId: _zod.z.string(),
|
|
1517
|
+
type: DesignElementType,
|
|
1518
|
+
brandPersistentId: _zod.z.string().optional(),
|
|
1519
|
+
parentPersistentId: _zod.z.string().optional(),
|
|
1520
|
+
shortPersistentId: _zod.z.string().optional(),
|
|
1521
|
+
childType: DesignElementType.optional(),
|
|
1522
|
+
sortOrder: _zod.z.number(),
|
|
1523
|
+
origin: _zod.z.record(_zod.z.any()).optional(),
|
|
1524
|
+
createdAt: _zod.z.coerce.date(),
|
|
1525
|
+
updatedAt: _zod.z.coerce.date()
|
|
1526
|
+
});
|
|
1527
|
+
var DesignElement = ShallowDesignElement.extend({
|
|
1528
|
+
meta: ObjectMeta,
|
|
1529
|
+
slug: _zod.z.string().optional(),
|
|
1530
|
+
userSlug: _zod.z.string().optional(),
|
|
1531
|
+
exportProperties: DesignSystemElementExportProps.optional(),
|
|
1532
|
+
data: _zod.z.record(_zod.z.any()),
|
|
1533
|
+
origin: _zod.z.record(_zod.z.any()).optional()
|
|
1534
|
+
});
|
|
1535
|
+
var HierarchicalElements = DesignTokenType.or(
|
|
1536
|
+
_zod.z.enum(["Component", "DesignSystemComponent", "DocumentationPage"])
|
|
1537
|
+
);
|
|
1538
|
+
var PageBlockCalloutType = _zod.z.enum(["Info", "Primary", "Success", "Warning", "Error"]);
|
|
1539
|
+
var PageBlockTypeV1 = _zod.z.enum([
|
|
1540
|
+
"Text",
|
|
1541
|
+
"Heading",
|
|
1542
|
+
"Code",
|
|
1543
|
+
"UnorderedList",
|
|
1544
|
+
"OrderedList",
|
|
1545
|
+
"Quote",
|
|
1546
|
+
"Callout",
|
|
1547
|
+
"Divider",
|
|
1548
|
+
"Image",
|
|
1549
|
+
"Embed",
|
|
1550
|
+
"Link",
|
|
1551
|
+
"Shortcuts",
|
|
1552
|
+
"FigmaEmbed",
|
|
1553
|
+
"YoutubeEmbed",
|
|
1554
|
+
"StorybookEmbed",
|
|
1555
|
+
"Token",
|
|
1556
|
+
"TokenGroup",
|
|
1557
|
+
"TokenList",
|
|
1558
|
+
"Component",
|
|
1559
|
+
"ComponentGroup",
|
|
1560
|
+
"Theme",
|
|
1561
|
+
"ComponentSandbox",
|
|
1562
|
+
"Custom",
|
|
1563
|
+
"FigmaFrames",
|
|
1564
|
+
"ComponentAssets",
|
|
1565
|
+
"RenderCode",
|
|
1566
|
+
"Tabs",
|
|
1567
|
+
"TabItem",
|
|
1568
|
+
"Table",
|
|
1569
|
+
"TableRow",
|
|
1570
|
+
"TableCell",
|
|
1571
|
+
"Guidelines"
|
|
1572
|
+
]);
|
|
1573
|
+
var PageBlockCodeLanguage = _zod.z.enum([
|
|
1574
|
+
"Angular",
|
|
1575
|
+
"Bash",
|
|
1576
|
+
"C",
|
|
1577
|
+
"Cpp",
|
|
1578
|
+
"Csharp",
|
|
1579
|
+
"CSS",
|
|
1580
|
+
"Dart",
|
|
1581
|
+
"Handlebars",
|
|
1582
|
+
"HTML",
|
|
1583
|
+
"Java",
|
|
1584
|
+
"Javascript",
|
|
1585
|
+
"JSON",
|
|
1586
|
+
"ReactJSX",
|
|
1587
|
+
"ReactTSX",
|
|
1588
|
+
"Kotlin",
|
|
1589
|
+
"Lua",
|
|
1590
|
+
"Markdown",
|
|
1591
|
+
"ObjectiveC",
|
|
1592
|
+
"PHP",
|
|
1593
|
+
"Plain",
|
|
1594
|
+
"Python",
|
|
1595
|
+
"Ruby",
|
|
1596
|
+
"Rust",
|
|
1597
|
+
"Sass",
|
|
1598
|
+
"SCSS",
|
|
1599
|
+
"Svetle",
|
|
1600
|
+
"Swift",
|
|
1601
|
+
"Twig",
|
|
1602
|
+
"Typescript",
|
|
1603
|
+
"Vue",
|
|
1604
|
+
"XML",
|
|
1605
|
+
"YAML"
|
|
1606
|
+
]);
|
|
1607
|
+
var PageBlockAlignment = _zod.z.enum(["Left", "Center", "Stretch", "Right"]);
|
|
1608
|
+
var PageBlockThemeType = _zod.z.enum(["Override", "Comparison"]);
|
|
1609
|
+
var PageBlockAssetType = _zod.z.enum(["image", "figmaFrame"]);
|
|
1610
|
+
var PageBlockTilesAlignment = _zod.z.enum(["Center", "FrameHeight"]);
|
|
1611
|
+
var PageBlockTilesLayout = _zod.z.enum(["C8", "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C1_75"]);
|
|
1612
|
+
var PageBlockTheme = _zod.z.object({
|
|
1613
|
+
themeIds: _zod.z.array(_zod.z.string()),
|
|
1614
|
+
type: PageBlockThemeType
|
|
1615
|
+
});
|
|
1616
|
+
var PageBlockUrlPreview = _zod.z.object({
|
|
1617
|
+
title: nullishToOptional(_zod.z.string()),
|
|
1618
|
+
description: nullishToOptional(_zod.z.string()),
|
|
1619
|
+
thumbnailUrl: nullishToOptional(_zod.z.string())
|
|
1620
|
+
});
|
|
1621
|
+
var PageBlockFrameOrigin = _zod.z.object({
|
|
1622
|
+
sourceFileName: nullishToOptional(_zod.z.string()),
|
|
1623
|
+
title: nullishToOptional(_zod.z.string()),
|
|
1624
|
+
previewUrl: nullishToOptional(_zod.z.string()),
|
|
1625
|
+
valid: nullishToOptional(_zod.z.boolean()),
|
|
1626
|
+
referenceId: nullishToOptional(_zod.z.string()),
|
|
1627
|
+
assetId: nullishToOptional(_zod.z.string()),
|
|
1628
|
+
assetScale: nullishToOptional(_zod.z.number()),
|
|
1629
|
+
width: nullishToOptional(_zod.z.number()),
|
|
1630
|
+
height: nullishToOptional(_zod.z.number())
|
|
1631
|
+
});
|
|
1632
|
+
var PageBlockFrame = _zod.z.object({
|
|
1633
|
+
persistentId: _zod.z.string(),
|
|
1634
|
+
sourceId: _zod.z.string(),
|
|
1635
|
+
sourceFrameId: _zod.z.string(),
|
|
1636
|
+
title: nullishToOptional(_zod.z.string()),
|
|
1637
|
+
description: nullishToOptional(_zod.z.string()),
|
|
1638
|
+
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
1639
|
+
origin: nullishToOptional(PageBlockFrameOrigin)
|
|
1640
|
+
});
|
|
1641
|
+
var PageBlockAsset = _zod.z.object({
|
|
1642
|
+
type: PageBlockAssetType,
|
|
1643
|
+
id: nullishToOptional(_zod.z.string()),
|
|
1644
|
+
url: nullishToOptional(_zod.z.string()),
|
|
1645
|
+
figmaFrame: nullishToOptional(PageBlockFrame)
|
|
1646
|
+
});
|
|
1647
|
+
var PageBlockLinkPreview = _zod.z.object({
|
|
1648
|
+
title: nullishToOptional(_zod.z.string()),
|
|
1649
|
+
valid: nullishToOptional(_zod.z.boolean())
|
|
1650
|
+
});
|
|
1651
|
+
var PageBlockShortcut = _zod.z.object({
|
|
1652
|
+
persistentId: _zod.z.string(),
|
|
1653
|
+
title: nullishToOptional(_zod.z.string()),
|
|
1654
|
+
description: nullishToOptional(_zod.z.string()),
|
|
1655
|
+
asset: nullishToOptional(PageBlockAsset),
|
|
1656
|
+
documentationItemId: nullishToOptional(_zod.z.string()),
|
|
1657
|
+
pageHeadingId: nullishToOptional(_zod.z.string()),
|
|
1658
|
+
url: nullishToOptional(_zod.z.string()),
|
|
1659
|
+
openInNewTab: nullishToOptional(_zod.z.boolean()),
|
|
1660
|
+
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
1661
|
+
documentationItemPreview: nullishToOptional(PageBlockLinkPreview)
|
|
1662
|
+
});
|
|
1663
|
+
var PageBlockCustomBlockPropertyImageValue = _zod.z.object({
|
|
1664
|
+
asset: nullishToOptional(PageBlockAsset),
|
|
1665
|
+
assetId: nullishToOptional(_zod.z.string()),
|
|
1666
|
+
assetUrl: nullishToOptional(_zod.z.string())
|
|
1667
|
+
});
|
|
1668
|
+
var PageBlockCustomBlockPropertyValue = _zod.z.object({
|
|
1669
|
+
key: _zod.z.string(),
|
|
1670
|
+
value: _zod.z.any()
|
|
1671
|
+
// TODO Artem: for some reason there are cases when there's an array here in the DB
|
|
1672
|
+
// e.g. element id 67451 in the dev db
|
|
1673
|
+
// value: z
|
|
1674
|
+
// .boolean()
|
|
1675
|
+
// .or(z.number())
|
|
1676
|
+
// .or(z.string())
|
|
1677
|
+
// .or(ColorTokenData)
|
|
1678
|
+
// .or(TypographyTokenData)
|
|
1679
|
+
// .or(PageBlockCustomBlockPropertyImageValue),
|
|
1680
|
+
});
|
|
1681
|
+
var PageBlockFigmaFrameProperties = _zod.z.object({
|
|
1682
|
+
color: nullishToOptional(
|
|
1683
|
+
_zod.z.object({
|
|
1684
|
+
value: _zod.z.string()
|
|
1685
|
+
})
|
|
1686
|
+
),
|
|
1687
|
+
alignment: PageBlockTilesAlignment,
|
|
1688
|
+
layout: PageBlockTilesLayout,
|
|
1689
|
+
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
1690
|
+
showTitles: _zod.z.boolean()
|
|
1691
|
+
});
|
|
1692
|
+
var PageBlockRenderCodeProperties = _zod.z.object({
|
|
1693
|
+
showCode: _zod.z.boolean(),
|
|
1694
|
+
showControls: _zod.z.boolean().optional()
|
|
1695
|
+
});
|
|
1696
|
+
var PageBlockAssetComponent = _zod.z.object({
|
|
1697
|
+
persistentId: _zod.z.string(),
|
|
1698
|
+
componentAssetId: _zod.z.string(),
|
|
1699
|
+
title: nullishToOptional(_zod.z.string()),
|
|
1700
|
+
description: nullishToOptional(_zod.z.string()),
|
|
1701
|
+
backgroundColor: nullishToOptional(ColorTokenInlineData)
|
|
1702
|
+
});
|
|
1703
|
+
var PageBlockTableColumn = _zod.z.object({
|
|
1704
|
+
id: _zod.z.string(),
|
|
1705
|
+
width: DimensionTokenData
|
|
1706
|
+
});
|
|
1707
|
+
var PageBlockTableProperties = _zod.z.object({
|
|
1708
|
+
showBorders: _zod.z.boolean(),
|
|
1709
|
+
showHeaderRow: _zod.z.boolean(),
|
|
1710
|
+
showHeaderColumn: _zod.z.boolean(),
|
|
1711
|
+
columns: _zod.z.array(PageBlockTableColumn)
|
|
1712
|
+
});
|
|
1713
|
+
var PageBlockTextSpanAttributeType = _zod.z.enum(["Bold", "Italic", "Link", "Strikethrough", "Code", "Comment"]);
|
|
1714
|
+
var PageBlockTextSpanAttribute = _zod.z.object({
|
|
1715
|
+
type: PageBlockTextSpanAttributeType,
|
|
1716
|
+
// Link attributes
|
|
1717
|
+
link: nullishToOptional(_zod.z.string()),
|
|
1718
|
+
documentationItemId: nullishToOptional(_zod.z.string()),
|
|
1719
|
+
openInNewWindow: nullishToOptional(_zod.z.boolean()),
|
|
1720
|
+
// deprecated. use openInNewTab
|
|
1721
|
+
openInNewTab: nullishToOptional(_zod.z.boolean()),
|
|
1722
|
+
// Comment attributes
|
|
1723
|
+
commentHighlightId: nullishToOptional(_zod.z.string()),
|
|
1724
|
+
commentIsResolved: nullishToOptional(_zod.z.boolean())
|
|
1725
|
+
});
|
|
1726
|
+
var PageBlockTextSpan = _zod.z.object({
|
|
1727
|
+
text: _zod.z.string(),
|
|
1728
|
+
attributes: _zod.z.array(PageBlockTextSpanAttribute)
|
|
1729
|
+
});
|
|
1730
|
+
var PageBlockText = _zod.z.object({
|
|
1731
|
+
spans: _zod.z.array(PageBlockTextSpan)
|
|
1732
|
+
});
|
|
1733
|
+
var PageBlockGuideline = _zod.z.object({
|
|
1734
|
+
description: nullishToOptional(_zod.z.string()),
|
|
1735
|
+
asset: nullishToOptional(PageBlockAsset),
|
|
1736
|
+
type: _zod.z.string()
|
|
1737
|
+
});
|
|
1738
|
+
var PageBlockBaseV1 = _zod.z.object({
|
|
1739
|
+
persistentId: _zod.z.string(),
|
|
1740
|
+
type: PageBlockTypeV1,
|
|
1741
|
+
numberOfColumns: nullishToOptional(_zod.z.number()),
|
|
1742
|
+
// Element linking
|
|
1743
|
+
designObjectId: nullishToOptional(_zod.z.string()),
|
|
1744
|
+
designObjectIds: nullishToOptional(_zod.z.array(_zod.z.string())),
|
|
1745
|
+
tokenType: nullishToOptional(DesignTokenType.or(_zod.z.literal("Font"))),
|
|
1746
|
+
showNestedGroups: nullishToOptional(_zod.z.boolean()),
|
|
1747
|
+
brandId: nullishToOptional(_zod.z.string()),
|
|
1748
|
+
// Rich text
|
|
1749
|
+
text: nullishToOptional(PageBlockText),
|
|
1750
|
+
caption: nullishToOptional(_zod.z.string()),
|
|
1751
|
+
headingType: nullishToOptional(_zod.z.number().min(1).max(3)),
|
|
1752
|
+
codeLanguage: nullishToOptional(PageBlockCodeLanguage),
|
|
1753
|
+
calloutType: nullishToOptional(PageBlockCalloutType),
|
|
1754
|
+
urlInput: nullishToOptional(_zod.z.string()),
|
|
1755
|
+
url: nullishToOptional(_zod.z.string()),
|
|
1756
|
+
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
1757
|
+
// Image
|
|
1758
|
+
asset: nullishToOptional(PageBlockAsset),
|
|
1759
|
+
alignment: nullishToOptional(PageBlockAlignment),
|
|
1760
|
+
// Shortcuts block
|
|
1761
|
+
shortcuts: nullishToOptional(_zod.z.array(PageBlockShortcut)),
|
|
1762
|
+
// Guidelines
|
|
1763
|
+
guidelines: nullishToOptional(PageBlockGuideline.array()),
|
|
1764
|
+
// Custom blocks
|
|
1765
|
+
customBlockKey: nullishToOptional(_zod.z.string()),
|
|
1766
|
+
customBlockProperties: nullishToOptional(_zod.z.array(PageBlockCustomBlockPropertyValue)),
|
|
1767
|
+
variantKey: nullishToOptional(_zod.z.string()),
|
|
1768
|
+
// Figma frames
|
|
1769
|
+
figmaFrameProperties: nullishToOptional(PageBlockFigmaFrameProperties),
|
|
1770
|
+
figmaFrames: nullishToOptional(_zod.z.array(PageBlockFrame)),
|
|
1771
|
+
// Generic
|
|
1772
|
+
size: nullishToOptional(Size),
|
|
1773
|
+
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
1774
|
+
// Render code
|
|
1775
|
+
renderCodeProperties: nullishToOptional(PageBlockRenderCodeProperties),
|
|
1776
|
+
// Component assets
|
|
1777
|
+
componentAssets: nullishToOptional(_zod.z.array(PageBlockAssetComponent)),
|
|
1778
|
+
// Tables
|
|
1779
|
+
tableProperties: nullishToOptional(PageBlockTableProperties),
|
|
1780
|
+
columnId: nullishToOptional(_zod.z.string()),
|
|
1781
|
+
// Token spreadsheet
|
|
1782
|
+
theme: nullishToOptional(PageBlockTheme),
|
|
1783
|
+
blacklistedElementProperties: nullishToOptional(_zod.z.array(_zod.z.string())),
|
|
1784
|
+
// Arbitrary
|
|
1785
|
+
userMetadata: nullishToOptional(_zod.z.string())
|
|
1786
|
+
});
|
|
1787
|
+
var PageBlockV1 = PageBlockBaseV1.extend({
|
|
1788
|
+
children: _zod.z.lazy(
|
|
1789
|
+
() => PageBlockV1.array().nullish().transform((t) => _nullishCoalesce(t, () => ( [])))
|
|
1790
|
+
)
|
|
1791
|
+
});
|
|
1792
|
+
var PageBlockLinkType = _zod.z.enum(["DocumentationItem", "PageHeading", "Url"]);
|
|
1793
|
+
var PageBlockImageType = _zod.z.enum(["Resource", "FigmaNode"]);
|
|
1794
|
+
var PageBlockImageAlignment = _zod.z.enum(["Left", "Center", "Stretch"]);
|
|
1795
|
+
var PageBlockTableCellAlignment = _zod.z.enum(["Left", "Center", "Right"]);
|
|
1796
|
+
var PageBlockPreviewContainerSize = _zod.z.enum(["Centered", "NaturalHeight"]);
|
|
1797
|
+
var PageBlockThemeDisplayMode = _zod.z.enum(["Split", "Override"]);
|
|
1798
|
+
var PageBlockImageResourceReference = _zod.z.object({
|
|
1799
|
+
resourceId: _zod.z.string(),
|
|
1800
|
+
url: _zod.z.string()
|
|
1801
|
+
});
|
|
1802
|
+
var PageBlockResourceFrameNodeReference = _zod.z.object({
|
|
1803
|
+
sourceId: _zod.z.string(),
|
|
1804
|
+
frameReferenceId: _zod.z.string()
|
|
1805
|
+
});
|
|
1806
|
+
var PageBlockImageReference = _zod.z.object({
|
|
1807
|
+
type: PageBlockImageType,
|
|
1808
|
+
resource: PageBlockImageResourceReference.optional(),
|
|
1809
|
+
figmaNode: PageBlockResourceFrameNodeReference.optional()
|
|
1810
|
+
});
|
|
1811
|
+
var PageBlockColorV2 = _zod.z.object({
|
|
1812
|
+
value: _zod.z.string(),
|
|
1813
|
+
referencedTokenId: _zod.z.string().optional()
|
|
1814
|
+
});
|
|
1815
|
+
var PageBlockAssetEntityMeta = _zod.z.object({
|
|
1816
|
+
title: _zod.z.string().optional(),
|
|
1817
|
+
description: _zod.z.string().optional(),
|
|
1818
|
+
backgroundColor: PageBlockColorV2.optional()
|
|
1819
|
+
});
|
|
1820
|
+
var PageBlockFigmaComponentEntityMeta = _zod.z.object({
|
|
1821
|
+
title: _zod.z.string().optional(),
|
|
1822
|
+
description: _zod.z.string().optional(),
|
|
1823
|
+
backgroundColor: PageBlockColorV2.optional(),
|
|
1824
|
+
selectedComponentProperties: _zod.z.array(_zod.z.string()).optional()
|
|
1825
|
+
});
|
|
1826
|
+
var PageBlockFigmaNodeEntityMeta = _zod.z.object({
|
|
1827
|
+
title: _zod.z.string().optional(),
|
|
1828
|
+
description: _zod.z.string().optional(),
|
|
1829
|
+
backgroundColor: PageBlockColorV2.optional()
|
|
1830
|
+
});
|
|
1831
|
+
var PageBlockAppearanceV2 = _zod.z.object({
|
|
1832
|
+
itemBackgroundColor: PageBlockColorV2.optional(),
|
|
1833
|
+
numberOfColumns: _zod.z.number().optional()
|
|
1834
|
+
});
|
|
1835
|
+
var PageBlockItemUntypedValue = _zod.z.object({
|
|
1836
|
+
value: _zod.z.any()
|
|
1837
|
+
}).and(_zod.z.record(_zod.z.any()));
|
|
1838
|
+
var PageBlockLinkV2 = _zod.z.object({
|
|
1839
|
+
type: PageBlockLinkType,
|
|
1840
|
+
documentationItemId: _zod.z.string().optional(),
|
|
1841
|
+
pageHeadingId: _zod.z.string().optional(),
|
|
1842
|
+
url: _zod.z.string().optional(),
|
|
1843
|
+
openInNewTab: _zod.z.boolean().optional()
|
|
1844
|
+
});
|
|
1845
|
+
var PageBlockItemV2 = _zod.z.object({
|
|
1846
|
+
id: _zod.z.string(),
|
|
1847
|
+
linksTo: PageBlockLinkV2.optional(),
|
|
1848
|
+
props: _zod.z.record(PageBlockItemUntypedValue)
|
|
1849
|
+
});
|
|
1850
|
+
var PageBlockDataV2 = _zod.z.object({
|
|
1851
|
+
packageId: _zod.z.string(),
|
|
1852
|
+
variantId: _zod.z.string().optional(),
|
|
1853
|
+
indentLevel: _zod.z.number(),
|
|
1854
|
+
appearance: PageBlockAppearanceV2.optional(),
|
|
1855
|
+
items: _zod.z.array(PageBlockItemV2)
|
|
1856
|
+
});
|
|
1857
|
+
var PageBlockItemAssetValue = _zod.z.object({
|
|
1858
|
+
selectedPropertyIds: _zod.z.array(_zod.z.string()).optional(),
|
|
1859
|
+
showSearch: _zod.z.boolean().optional(),
|
|
1860
|
+
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1861
|
+
backgroundColor: PageBlockColorV2.optional(),
|
|
1862
|
+
value: _zod.z.array(
|
|
1863
|
+
_zod.z.object({
|
|
1864
|
+
entityId: _zod.z.string(),
|
|
1865
|
+
entityType: _zod.z.enum(["Asset", "AssetGroup"]),
|
|
1866
|
+
entityMeta: PageBlockAssetEntityMeta.optional()
|
|
1867
|
+
})
|
|
1868
|
+
).default([])
|
|
1869
|
+
});
|
|
1870
|
+
var PageBlockItemAssetPropertyValue = _zod.z.object({
|
|
1871
|
+
value: _zod.z.array(_zod.z.string()).default([])
|
|
1872
|
+
});
|
|
1873
|
+
var PageBlockItemFigmaComponentValue = _zod.z.object({
|
|
1874
|
+
showComponentName: _zod.z.boolean().optional(),
|
|
1875
|
+
showComponentDescription: _zod.z.boolean().optional(),
|
|
1876
|
+
showPropertyList: _zod.z.boolean().optional(),
|
|
1877
|
+
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1878
|
+
backgroundColor: PageBlockColorV2.optional(),
|
|
1879
|
+
value: _zod.z.array(
|
|
1880
|
+
_zod.z.object({
|
|
1881
|
+
entityId: _zod.z.string(),
|
|
1882
|
+
entityType: _zod.z.enum(["FigmaComponent"]),
|
|
1883
|
+
entityMeta: PageBlockFigmaComponentEntityMeta.optional()
|
|
1884
|
+
})
|
|
1885
|
+
).default([])
|
|
1886
|
+
});
|
|
1887
|
+
var PageBlockItemBooleanValue = _zod.z.object({
|
|
1888
|
+
value: _zod.z.boolean()
|
|
1889
|
+
});
|
|
1890
|
+
var PageBlockItemCodeValue = _zod.z.object({
|
|
1891
|
+
format: PageBlockCodeLanguage.optional(),
|
|
1892
|
+
caption: _zod.z.string().optional(),
|
|
1893
|
+
value: _zod.z.string()
|
|
1894
|
+
});
|
|
1895
|
+
var PageBlockItemSandboxValue = _zod.z.object({
|
|
1896
|
+
showCode: _zod.z.boolean().optional(),
|
|
1897
|
+
showControls: _zod.z.boolean().optional(),
|
|
1898
|
+
backgroundColor: _zod.z.string().optional(),
|
|
1899
|
+
alignPreview: _zod.z.enum(["Left", "Center"]).optional(),
|
|
1900
|
+
previewHeight: _zod.z.number().optional(),
|
|
1901
|
+
value: _zod.z.string()
|
|
1902
|
+
});
|
|
1903
|
+
var PageBlockItemColorValue = _zod.z.record(_zod.z.any());
|
|
1904
|
+
var PageBlockItemComponentValue = _zod.z.object({
|
|
1905
|
+
selectedPropertyIds: _zod.z.array(_zod.z.string()).optional(),
|
|
1906
|
+
value: _zod.z.array(
|
|
1907
|
+
_zod.z.object({
|
|
1908
|
+
entityId: _zod.z.string(),
|
|
1909
|
+
entityType: _zod.z.enum(["Component", "ComponentGroup"])
|
|
1910
|
+
})
|
|
1911
|
+
).default([])
|
|
1912
|
+
});
|
|
1913
|
+
var PageBlockItemComponentPropertyValue = _zod.z.object({
|
|
1914
|
+
value: _zod.z.string()
|
|
1915
|
+
});
|
|
1916
|
+
var PageBlockItemDividerValue = _zod.z.object({});
|
|
1917
|
+
var PageBlockItemEmbedValue = _zod.z.object({
|
|
1918
|
+
value: _zod.z.string().optional(),
|
|
1919
|
+
caption: _zod.z.string().optional(),
|
|
1920
|
+
height: _zod.z.number().optional(),
|
|
1921
|
+
openGraph: _zod.z.object({
|
|
1922
|
+
title: _zod.z.string().optional(),
|
|
1923
|
+
description: _zod.z.string().optional(),
|
|
1924
|
+
imageUrl: _zod.z.string().optional()
|
|
1925
|
+
}).optional()
|
|
1926
|
+
});
|
|
1927
|
+
var PageBlockItemFigmaNodeValue = _zod.z.object({
|
|
1928
|
+
showSearch: _zod.z.boolean().optional(),
|
|
1929
|
+
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1930
|
+
backgroundColor: PageBlockColorV2.optional(),
|
|
1931
|
+
showFrameDetails: _zod.z.boolean().optional(),
|
|
1932
|
+
value: _zod.z.array(
|
|
1933
|
+
_zod.z.object({
|
|
1934
|
+
entityId: _zod.z.string(),
|
|
1935
|
+
entityMeta: PageBlockFigmaNodeEntityMeta.optional()
|
|
1936
|
+
})
|
|
1937
|
+
).default([])
|
|
1938
|
+
});
|
|
1939
|
+
var PageBlockItemImageValue = _zod.z.object({
|
|
1940
|
+
alt: _zod.z.string().optional(),
|
|
1941
|
+
caption: _zod.z.string().optional(),
|
|
1942
|
+
alignment: PageBlockImageAlignment.optional(),
|
|
1943
|
+
value: PageBlockImageReference.optional()
|
|
1944
|
+
});
|
|
1945
|
+
var PageBlockItemMarkdownValue = _zod.z.object({
|
|
1946
|
+
value: _zod.z.string()
|
|
1947
|
+
});
|
|
1948
|
+
var PageBlockItemMultiRichTextValue = _zod.z.object({
|
|
1949
|
+
value: PageBlockText.array()
|
|
1950
|
+
});
|
|
1951
|
+
var PageBlockItemMultiSelectValue = _zod.z.object({
|
|
1952
|
+
value: _zod.z.array(_zod.z.string()).default([])
|
|
1953
|
+
});
|
|
1954
|
+
var PageBlockItemNumberValue = _zod.z.object({
|
|
1955
|
+
value: _zod.z.number()
|
|
1956
|
+
});
|
|
1957
|
+
var PageBlockItemRichTextValue = _zod.z.object({
|
|
1958
|
+
value: PageBlockText,
|
|
1959
|
+
calloutType: PageBlockCalloutType.optional()
|
|
1960
|
+
});
|
|
1961
|
+
var PageBlockItemSingleSelectValue = _zod.z.object({
|
|
1962
|
+
value: _zod.z.string()
|
|
1963
|
+
});
|
|
1964
|
+
var PageBlockItemStorybookValue = _zod.z.object({
|
|
1965
|
+
caption: _zod.z.string().optional(),
|
|
1966
|
+
height: _zod.z.number().optional(),
|
|
1967
|
+
embedUrl: _zod.z.string().optional(),
|
|
1968
|
+
value: _zod.z.string().optional()
|
|
1969
|
+
});
|
|
1970
|
+
var PageBlockItemTextValue = _zod.z.object({
|
|
1971
|
+
value: _zod.z.string()
|
|
1972
|
+
});
|
|
1973
|
+
var PageBlockItemTokenValue = _zod.z.object({
|
|
1974
|
+
selectedPropertyIds: _zod.z.array(_zod.z.string()).optional(),
|
|
1975
|
+
selectedThemeIds: _zod.z.array(_zod.z.string()).optional(),
|
|
1976
|
+
themeDisplayMode: PageBlockThemeDisplayMode.optional(),
|
|
1977
|
+
value: _zod.z.array(
|
|
1978
|
+
_zod.z.object({
|
|
1979
|
+
entityId: _zod.z.string(),
|
|
1980
|
+
entityType: _zod.z.enum(["Token", "TokenGroup"]),
|
|
1981
|
+
entityMeta: _zod.z.object({
|
|
1982
|
+
showNestedGroups: _zod.z.boolean().optional()
|
|
1983
|
+
}).optional()
|
|
1984
|
+
})
|
|
1985
|
+
).default([])
|
|
1986
|
+
});
|
|
1987
|
+
var PageBlockItemTokenPropertyValue = _zod.z.object({
|
|
1988
|
+
selectedPropertyIds: _zod.z.array(_zod.z.string()).optional(),
|
|
1989
|
+
selectedThemeIds: _zod.z.array(_zod.z.string()).optional(),
|
|
1990
|
+
value: _zod.z.array(_zod.z.string()).default([])
|
|
1991
|
+
});
|
|
1992
|
+
var PageBlockItemTokenTypeValue = _zod.z.object({
|
|
1993
|
+
value: _zod.z.array(DesignTokenType).default([])
|
|
1994
|
+
});
|
|
1995
|
+
var PageBlockItemUrlValue = _zod.z.object({
|
|
1996
|
+
value: _zod.z.string()
|
|
1997
|
+
});
|
|
1998
|
+
var PageBlockItemTableRichTextNode = _zod.z.object({
|
|
1999
|
+
type: _zod.z.literal("RichText"),
|
|
2000
|
+
id: _zod.z.string(),
|
|
2001
|
+
value: PageBlockItemRichTextValue.shape.value
|
|
2002
|
+
});
|
|
2003
|
+
var PageBlockItemTableMultiRichTextNode = _zod.z.object({
|
|
2004
|
+
type: _zod.z.literal("MultiRichText"),
|
|
2005
|
+
value: PageBlockItemMultiRichTextValue.shape.value
|
|
2006
|
+
});
|
|
2007
|
+
var PageBlockItemTableImageNode = _zod.z.object({
|
|
2008
|
+
type: _zod.z.literal("Image"),
|
|
2009
|
+
id: _zod.z.string(),
|
|
2010
|
+
caption: PageBlockItemImageValue.shape.caption,
|
|
2011
|
+
value: PageBlockItemImageValue.shape.value
|
|
2012
|
+
});
|
|
2013
|
+
var PageBlockItemTableNode = _zod.z.discriminatedUnion("type", [
|
|
2014
|
+
PageBlockItemTableRichTextNode,
|
|
2015
|
+
// PageBlockItemTableMultiRichTextNode,
|
|
2016
|
+
PageBlockItemTableImageNode
|
|
2017
|
+
]);
|
|
2018
|
+
var PageBlockItemTableCell = _zod.z.object({
|
|
2019
|
+
id: _zod.z.string(),
|
|
2020
|
+
nodes: _zod.z.array(PageBlockItemTableNode),
|
|
2021
|
+
columnWidth: _zod.z.number().optional(),
|
|
2022
|
+
alignment: PageBlockTableCellAlignment
|
|
2023
|
+
});
|
|
2024
|
+
var PageBlockItemTableRow = _zod.z.object({
|
|
2025
|
+
cells: _zod.z.array(PageBlockItemTableCell)
|
|
2026
|
+
});
|
|
2027
|
+
var PageBlockItemTableValue = _zod.z.object({
|
|
2028
|
+
highlightHeaderColumn: _zod.z.boolean().optional(),
|
|
2029
|
+
highlightHeaderRow: _zod.z.boolean().optional(),
|
|
2030
|
+
showBorder: _zod.z.boolean().optional(),
|
|
2031
|
+
value: _zod.z.array(PageBlockItemTableRow).default([])
|
|
2032
|
+
});
|
|
2033
|
+
var DocumentationItemHeaderAlignmentSchema = _zod.z.enum(["Left", "Center"]);
|
|
2034
|
+
var DocumentationItemHeaderImageScaleTypeSchema = _zod.z.enum(["AspectFill", "AspectFit"]);
|
|
2035
|
+
var DocumentationItemHeaderAlignment = DocumentationItemHeaderAlignmentSchema.enum;
|
|
2036
|
+
var DocumentationItemHeaderImageScaleType = DocumentationItemHeaderImageScaleTypeSchema.enum;
|
|
2037
|
+
var DocumentationItemHeaderV1 = _zod.z.object({
|
|
2038
|
+
description: _zod.z.string(),
|
|
2039
|
+
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
2040
|
+
foregroundColor: ColorTokenData.nullish(),
|
|
2041
|
+
backgroundColor: ColorTokenData.nullish(),
|
|
2042
|
+
backgroundImageAsset: PageBlockAsset.nullish(),
|
|
2043
|
+
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
2044
|
+
showBackgroundOverlay: _zod.z.boolean(),
|
|
2045
|
+
showCoverText: _zod.z.boolean(),
|
|
2046
|
+
minHeight: _zod.z.number().nullish()
|
|
2047
|
+
});
|
|
2048
|
+
var defaultDocumentationItemHeaderV1 = {
|
|
2049
|
+
alignment: DocumentationItemHeaderAlignment.Left,
|
|
2050
|
+
backgroundImageScaleType: DocumentationItemHeaderImageScaleType.AspectFill,
|
|
2051
|
+
description: "",
|
|
2052
|
+
showBackgroundOverlay: false,
|
|
2053
|
+
showCoverText: true
|
|
2054
|
+
};
|
|
2055
|
+
var DocumentationItemConfigurationV1 = _zod.z.object({
|
|
2056
|
+
showSidebar: _zod.z.boolean(),
|
|
2057
|
+
isPrivate: _zod.z.boolean().optional(),
|
|
2058
|
+
isHidden: _zod.z.boolean().optional(),
|
|
2059
|
+
header: DocumentationItemHeaderV1
|
|
2060
|
+
});
|
|
2061
|
+
var DocumentationPageDataV1 = _zod.z.object({
|
|
2062
|
+
blocks: _zod.z.array(PageBlockV1),
|
|
2063
|
+
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
2064
|
+
});
|
|
2065
|
+
var DocumentationItemHeaderV2 = _zod.z.object({
|
|
2066
|
+
description: _zod.z.string(),
|
|
2067
|
+
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
2068
|
+
foregroundColor: PageBlockColorV2.nullish(),
|
|
2069
|
+
backgroundColor: PageBlockColorV2.nullish(),
|
|
2070
|
+
backgroundImageAsset: PageBlockImageReference.nullish(),
|
|
2071
|
+
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
2072
|
+
showBackgroundOverlay: _zod.z.boolean(),
|
|
2073
|
+
showCoverText: _zod.z.boolean(),
|
|
2074
|
+
minHeight: _zod.z.number().nullish()
|
|
2075
|
+
});
|
|
2076
|
+
var defaultDocumentationItemHeaderV2 = {
|
|
2077
|
+
alignment: DocumentationItemHeaderAlignment.Left,
|
|
2078
|
+
backgroundImageScaleType: DocumentationItemHeaderImageScaleType.AspectFill,
|
|
2079
|
+
description: "",
|
|
2080
|
+
showBackgroundOverlay: false,
|
|
2081
|
+
showCoverText: true
|
|
2082
|
+
};
|
|
2083
|
+
var DocumentationItemConfigurationV2 = _zod.z.object({
|
|
2084
|
+
showSidebar: _zod.z.boolean(),
|
|
2085
|
+
isPrivate: _zod.z.boolean().optional(),
|
|
2086
|
+
isHidden: _zod.z.boolean().optional(),
|
|
2087
|
+
header: DocumentationItemHeaderV2
|
|
2088
|
+
});
|
|
2089
|
+
var defaultDocumentationItemConfigurationV2 = {
|
|
2090
|
+
header: defaultDocumentationItemHeaderV2,
|
|
2091
|
+
isHidden: false,
|
|
2092
|
+
isPrivate: false,
|
|
2093
|
+
showSidebar: true
|
|
2094
|
+
};
|
|
2095
|
+
var DocumentationPageDataV2 = _zod.z.object({
|
|
2096
|
+
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
2097
|
+
});
|
|
2098
|
+
var DesignElementOrigin = _zod.z.object({
|
|
2099
|
+
id: _zod.z.string(),
|
|
2100
|
+
sourceId: _zod.z.string(),
|
|
2101
|
+
name: _zod.z.string()
|
|
2102
|
+
});
|
|
2103
|
+
var DesignElementBase = _zod.z.object({
|
|
2104
|
+
id: _zod.z.string(),
|
|
2105
|
+
persistentId: _zod.z.string(),
|
|
2106
|
+
meta: ObjectMeta,
|
|
2107
|
+
designSystemVersionId: _zod.z.string(),
|
|
2108
|
+
createdAt: _zod.z.coerce.date(),
|
|
2109
|
+
updatedAt: _zod.z.coerce.date()
|
|
2110
|
+
});
|
|
2111
|
+
var DesignElementImportedBase = DesignElementBase.extend({
|
|
2112
|
+
origin: DesignElementOrigin
|
|
2113
|
+
});
|
|
2114
|
+
var DesignElementGroupablePart = _zod.z.object({
|
|
2115
|
+
parentPersistentId: _zod.z.string().optional(),
|
|
2116
|
+
sortOrder: _zod.z.number()
|
|
2117
|
+
});
|
|
2118
|
+
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
2119
|
+
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
2120
|
+
parentPersistentId: _zod.z.string()
|
|
2121
|
+
});
|
|
2122
|
+
var DesignElementBrandedPart = _zod.z.object({
|
|
2123
|
+
brandPersistentId: _zod.z.string()
|
|
2124
|
+
});
|
|
2125
|
+
var DesignElementSlugPart = _zod.z.object({
|
|
2126
|
+
slug: _zod.z.string().optional(),
|
|
2127
|
+
userSlug: _zod.z.string().optional()
|
|
2128
|
+
});
|
|
2129
|
+
var PageBlockV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend({
|
|
2130
|
+
data: PageBlockDataV2
|
|
2131
|
+
});
|
|
2132
|
+
var PageBlockEditorModelV2 = _zod.z.object({
|
|
2133
|
+
id: _zod.z.string(),
|
|
2134
|
+
type: _zod.z.literal("Block"),
|
|
2135
|
+
data: PageBlockDataV2
|
|
2136
|
+
});
|
|
2137
|
+
var PageSectionTypeV2 = _zod.z.enum(["Tabs"]);
|
|
2138
|
+
var PageSectionColumnV2 = _zod.z.object({
|
|
2139
|
+
id: _zod.z.string(),
|
|
2140
|
+
blocks: _zod.z.array(PageBlockEditorModelV2)
|
|
2141
|
+
});
|
|
2142
|
+
var PageSectionItemV2 = _zod.z.object({
|
|
2143
|
+
id: _zod.z.string(),
|
|
2144
|
+
title: _zod.z.string(),
|
|
2145
|
+
columns: _zod.z.array(PageSectionColumnV2)
|
|
2146
|
+
});
|
|
2147
|
+
var PageSectionPaddingV2 = _zod.z.object({
|
|
2148
|
+
top: _zod.z.number().optional(),
|
|
2149
|
+
bottom: _zod.z.number().optional(),
|
|
2150
|
+
left: _zod.z.number().optional(),
|
|
2151
|
+
right: _zod.z.number().optional()
|
|
2152
|
+
});
|
|
2153
|
+
var PageSectionAppearanceV2 = _zod.z.object({
|
|
2154
|
+
expandToEdges: _zod.z.boolean(),
|
|
2155
|
+
contentExpandToEdges: _zod.z.boolean(),
|
|
2156
|
+
backgroundColor: PageBlockColorV2.optional(),
|
|
2157
|
+
foregroundColor: PageBlockColorV2.optional(),
|
|
2158
|
+
padding: PageSectionPaddingV2.optional()
|
|
2159
|
+
});
|
|
2160
|
+
var PageSectionEditorModelV2 = _zod.z.object({
|
|
2161
|
+
id: _zod.z.string(),
|
|
2162
|
+
type: _zod.z.literal("Section"),
|
|
2163
|
+
variantId: _zod.z.string().optional(),
|
|
2164
|
+
sectionType: PageSectionTypeV2,
|
|
2165
|
+
appearance: PageSectionAppearanceV2,
|
|
2166
|
+
items: _zod.z.array(PageSectionItemV2)
|
|
2167
|
+
});
|
|
2168
|
+
var DurationUnit = _zod.z.enum(["Ms"]);
|
|
2169
|
+
var DurationValue = _zod.z.object({
|
|
2170
|
+
unit: DurationUnit,
|
|
2171
|
+
measure: _zod.z.number()
|
|
2172
|
+
});
|
|
2173
|
+
var DurationTokenData = tokenAliasOrValue(DurationValue);
|
|
2174
|
+
var FigmaFileStructureNodeType = _zod.z.enum(["DOCUMENT", "CANVAS", "FRAME", "COMPONENT", "COMPONENT_SET"]);
|
|
2175
|
+
var FigmaFileStructureNodeBase = _zod.z.object({
|
|
2176
|
+
id: _zod.z.string(),
|
|
2177
|
+
name: _zod.z.string(),
|
|
2178
|
+
type: FigmaFileStructureNodeType,
|
|
2179
|
+
size: SizeOrUndefined,
|
|
2180
|
+
parentComponentSetId: _zod.z.string().optional()
|
|
2181
|
+
});
|
|
2182
|
+
var FigmaFileStructureNode = FigmaFileStructureNodeBase.extend({
|
|
2183
|
+
children: _zod.z.lazy(() => FigmaFileStructureNode.array())
|
|
2184
|
+
});
|
|
2185
|
+
var FigmaFileStructureStatistics = _zod.z.object({
|
|
2186
|
+
frames: _zod.z.number().nullable().optional().transform((v) => _nullishCoalesce(v, () => ( 0))),
|
|
2187
|
+
components: _zod.z.number().nullable().optional().transform((v) => _nullishCoalesce(v, () => ( 0))),
|
|
2188
|
+
componentSets: _zod.z.number().nullable().optional().transform((v) => _nullishCoalesce(v, () => ( 0)))
|
|
2189
|
+
});
|
|
2190
|
+
var FigmaFileStructureElementData = _zod.z.object({
|
|
2191
|
+
value: _zod.z.object({
|
|
2192
|
+
structure: FigmaFileStructureNode,
|
|
2193
|
+
assetsInFile: FigmaFileStructureStatistics
|
|
2194
|
+
})
|
|
2195
|
+
});
|
|
2196
|
+
var FigmaNodeReferenceData = _zod.z.object({
|
|
2197
|
+
structureElementId: _zod.z.string(),
|
|
2198
|
+
nodeId: _zod.z.string(),
|
|
2199
|
+
fileId: _zod.z.string().optional(),
|
|
2200
|
+
valid: _zod.z.boolean(),
|
|
2201
|
+
// Asset data
|
|
2202
|
+
assetId: _zod.z.string().optional(),
|
|
2203
|
+
assetScale: _zod.z.number().optional(),
|
|
2204
|
+
assetWidth: _zod.z.number().optional(),
|
|
2205
|
+
assetHeight: _zod.z.number().optional(),
|
|
2206
|
+
assetUrl: _zod.z.string().optional(),
|
|
2207
|
+
assetOriginKey: _zod.z.string().optional()
|
|
2208
|
+
});
|
|
2209
|
+
var FigmaNodeReferenceElementData = _zod.z.object({
|
|
2210
|
+
value: FigmaNodeReferenceData
|
|
2211
|
+
});
|
|
2212
|
+
var FontFamilyValue = _zod.z.string();
|
|
2213
|
+
var FontFamilyTokenData = tokenAliasOrValue(FontFamilyValue);
|
|
2214
|
+
var FontSizeUnit = _zod.z.enum(["Pixels", "Rem", "Percent"]);
|
|
2215
|
+
var FontSizeValue = _zod.z.object({
|
|
2216
|
+
unit: FontSizeUnit,
|
|
2217
|
+
measure: _zod.z.number()
|
|
2218
|
+
});
|
|
2219
|
+
var FontSizeTokenData = tokenAliasOrValue(FontSizeValue);
|
|
2220
|
+
var FontWeightValue = _zod.z.string();
|
|
2221
|
+
var FontWeightTokenData = tokenAliasOrValue(FontWeightValue);
|
|
2222
|
+
var GradientType = _zod.z.enum(["Linear", "Radial", "Angular"]);
|
|
2223
|
+
var GradientStop = _zod.z.object({
|
|
2224
|
+
position: _zod.z.number(),
|
|
2225
|
+
color: ColorTokenData
|
|
2226
|
+
});
|
|
2227
|
+
var GradientLayerValue = _zod.z.object({
|
|
2228
|
+
from: Point2D,
|
|
2229
|
+
to: Point2D,
|
|
2230
|
+
type: GradientType,
|
|
2231
|
+
aspectRatio: nullishToOptional(_zod.z.number()),
|
|
2232
|
+
// z.number(),
|
|
2233
|
+
stops: _zod.z.array(GradientStop).min(2)
|
|
2234
|
+
});
|
|
2235
|
+
var GradientLayerData = tokenAliasOrValue(GradientLayerValue);
|
|
2236
|
+
var GradientTokenValue = _zod.z.array(GradientLayerData);
|
|
2237
|
+
var GradientTokenData = tokenAliasOrValue(GradientTokenValue);
|
|
2238
|
+
var DocumentationGroupBehavior = _zod.z.enum(["Group", "Tabs"]);
|
|
2239
|
+
var ElementGroupDataV1 = _zod.z.object({
|
|
2240
|
+
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
2241
|
+
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
2242
|
+
});
|
|
2243
|
+
var ElementGroupDataV2 = _zod.z.object({
|
|
2244
|
+
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
2245
|
+
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
2246
|
+
});
|
|
2247
|
+
var LetterSpacingUnit = _zod.z.enum(["Pixels", "Rem", "Percent"]);
|
|
2248
|
+
var LetterSpacingValue = _zod.z.object({
|
|
2249
|
+
unit: LetterSpacingUnit,
|
|
2250
|
+
measure: _zod.z.number()
|
|
2251
|
+
});
|
|
2252
|
+
var LetterSpacingTokenData = tokenAliasOrValue(LetterSpacingValue);
|
|
2253
|
+
var LineHeightUnit = _zod.z.enum(["Pixels", "Rem", "Percent", "Raw"]);
|
|
2254
|
+
var LineHeightValue = _zod.z.object({
|
|
2255
|
+
unit: LineHeightUnit,
|
|
2256
|
+
measure: _zod.z.number()
|
|
2257
|
+
});
|
|
2258
|
+
var LineHeightTokenData = tokenAliasOrValue(LineHeightValue);
|
|
2259
|
+
var ParagraphIndentUnit = _zod.z.enum(["Pixels", "Rem", "Percent"]);
|
|
2260
|
+
var ParagraphIndentValue = _zod.z.object({
|
|
2261
|
+
unit: ParagraphIndentUnit,
|
|
2262
|
+
measure: _zod.z.number()
|
|
2263
|
+
});
|
|
2264
|
+
var ParagraphIndentTokenData = tokenAliasOrValue(ParagraphIndentValue);
|
|
2265
|
+
var ParagraphSpacingUnit = _zod.z.enum(["Pixels", "Rem", "Percent"]);
|
|
2266
|
+
var ParagraphSpacingValue = _zod.z.object({
|
|
2267
|
+
unit: ParagraphSpacingUnit,
|
|
2268
|
+
measure: _zod.z.number()
|
|
2269
|
+
});
|
|
2270
|
+
var ParagraphSpacingTokenData = tokenAliasOrValue(ParagraphSpacingValue);
|
|
2271
|
+
var ProductCopyValue = _zod.z.string();
|
|
2272
|
+
var ProductCopyTokenData = tokenAliasOrValue(ProductCopyValue);
|
|
2273
|
+
var RESERVED_OBJECT_ID_PREFIX = "x-sn-reserved-";
|
|
2274
|
+
var SafeIdSchema = _zod.z.string().refine(
|
|
2275
|
+
(value) => {
|
|
2276
|
+
return !value.startsWith(RESERVED_OBJECT_ID_PREFIX);
|
|
2277
|
+
},
|
|
2278
|
+
{
|
|
2279
|
+
message: `ID value can't start with ${RESERVED_OBJECT_ID_PREFIX}`
|
|
2280
|
+
}
|
|
2281
|
+
);
|
|
2282
|
+
var ShadowType = _zod.z.enum(["Drop", "Inner"]);
|
|
2283
|
+
var ShadowLayerValue = _zod.z.object({
|
|
2284
|
+
color: ColorTokenData,
|
|
2285
|
+
x: _zod.z.number(),
|
|
2286
|
+
y: _zod.z.number(),
|
|
2287
|
+
radius: _zod.z.number(),
|
|
2288
|
+
spread: _zod.z.number(),
|
|
2289
|
+
opacity: OpacityTokenData.optional(),
|
|
2290
|
+
type: ShadowType
|
|
2291
|
+
});
|
|
2292
|
+
var ShadowTokenDataBase = tokenAliasOrValue(ShadowLayerValue);
|
|
2293
|
+
var ShadowTokenData = tokenAliasOrValue(_zod.z.array(ShadowTokenDataBase));
|
|
2294
|
+
var SizeUnit = _zod.z.enum(["Pixels", "Rem", "Percent"]);
|
|
2295
|
+
var SizeValue = _zod.z.object({
|
|
2296
|
+
unit: SizeUnit,
|
|
2297
|
+
measure: _zod.z.number()
|
|
2298
|
+
});
|
|
2299
|
+
var SizeTokenData = tokenAliasOrValue(SizeValue);
|
|
2300
|
+
var SpaceUnit = _zod.z.enum(["Pixels", "Rem", "Percent"]);
|
|
2301
|
+
var SpaceValue = _zod.z.object({
|
|
2302
|
+
unit: SpaceUnit,
|
|
2303
|
+
measure: _zod.z.number()
|
|
2304
|
+
});
|
|
2305
|
+
var SpaceTokenData = tokenAliasOrValue(SpaceValue);
|
|
2306
|
+
var StringValue = _zod.z.string();
|
|
2307
|
+
var StringTokenData = tokenAliasOrValue(StringValue);
|
|
2308
|
+
var TextCase = _zod.z.enum(["Original", "Upper", "Lower", "Camel", "SmallCaps"]);
|
|
2309
|
+
var TextCaseValue = TextCase;
|
|
2310
|
+
var TextCaseTokenData = tokenAliasOrValue(TextCaseValue);
|
|
2311
|
+
var TextDecoration = _zod.z.enum(["None", "Underline", "Strikethrough"]);
|
|
2312
|
+
var TextDecorationValue = TextDecoration;
|
|
2313
|
+
var TextDecorationTokenData = tokenAliasOrValue(TextDecorationValue);
|
|
2314
|
+
var TypographyValue = _zod.z.object({
|
|
2315
|
+
fontSize: FontSizeTokenData,
|
|
2316
|
+
fontFamily: FontFamilyTokenData,
|
|
2317
|
+
fontWeight: FontWeightTokenData,
|
|
2318
|
+
textDecoration: TextDecorationTokenData,
|
|
2319
|
+
textCase: TextCaseTokenData,
|
|
2320
|
+
letterSpacing: LetterSpacingTokenData.optional(),
|
|
2321
|
+
lineHeight: LineHeightTokenData.optional(),
|
|
2322
|
+
paragraphIndent: ParagraphIndentTokenData.optional(),
|
|
2323
|
+
paragraphSpacing: ParagraphSpacingTokenData.optional()
|
|
2324
|
+
});
|
|
2325
|
+
var TypographyTokenData = tokenAliasOrValue(TypographyValue);
|
|
2326
|
+
var Visibility = _zod.z.enum(["Hidden", "Visible"]);
|
|
2327
|
+
var VisibilityValue = Visibility;
|
|
2328
|
+
var VisibilityTokenData = tokenAliasOrValue(VisibilityValue);
|
|
2329
|
+
var ZIndexUnit = _zod.z.enum(["Raw"]);
|
|
2330
|
+
var ZIndexValue = _zod.z.object({
|
|
2331
|
+
unit: ZIndexUnit,
|
|
2332
|
+
measure: _zod.z.number()
|
|
2333
|
+
});
|
|
2334
|
+
var ZIndexTokenData = tokenAliasOrValue(ZIndexValue);
|
|
2335
|
+
var FigmaComponentPropertyType = _zod.z.enum(["Boolean", "InstanceSwap", "Variant", "Text"]);
|
|
2336
|
+
var FigmaComponentBooleanProperty = _zod.z.object({
|
|
2337
|
+
type: _zod.z.literal(FigmaComponentPropertyType.enum.Boolean),
|
|
2338
|
+
value: _zod.z.boolean(),
|
|
2339
|
+
defaultValue: _zod.z.boolean()
|
|
2340
|
+
});
|
|
2341
|
+
var FigmaComponentInstanceSwapProperty = _zod.z.object({
|
|
2342
|
+
type: _zod.z.literal(FigmaComponentPropertyType.enum.InstanceSwap),
|
|
2343
|
+
value: _zod.z.string()
|
|
2344
|
+
// Persistent ID of a Component to swap?
|
|
2345
|
+
});
|
|
2346
|
+
var FigmaComponentVariantProperty = _zod.z.object({
|
|
2347
|
+
type: _zod.z.literal(FigmaComponentPropertyType.enum.Variant),
|
|
2348
|
+
value: _zod.z.string(),
|
|
2349
|
+
options: _zod.z.array(_zod.z.string())
|
|
2350
|
+
});
|
|
2351
|
+
var FigmaComponentTextProperty = _zod.z.object({
|
|
2352
|
+
type: _zod.z.literal(FigmaComponentPropertyType.enum.Text),
|
|
2353
|
+
value: _zod.z.string()
|
|
2354
|
+
});
|
|
2355
|
+
var FigmaComponentProperties = _zod.z.record(
|
|
2356
|
+
_zod.z.string(),
|
|
2357
|
+
_zod.z.discriminatedUnion("type", [
|
|
2358
|
+
FigmaComponentBooleanProperty,
|
|
2359
|
+
FigmaComponentInstanceSwapProperty,
|
|
2360
|
+
FigmaComponentTextProperty
|
|
2361
|
+
])
|
|
2362
|
+
);
|
|
2363
|
+
var FigmaComponentSetProperties = _zod.z.record(
|
|
2364
|
+
_zod.z.string(),
|
|
2365
|
+
_zod.z.discriminatedUnion("type", [
|
|
2366
|
+
FigmaComponentBooleanProperty,
|
|
2367
|
+
FigmaComponentInstanceSwapProperty,
|
|
2368
|
+
FigmaComponentTextProperty,
|
|
2369
|
+
FigmaComponentVariantProperty
|
|
2370
|
+
])
|
|
2371
|
+
);
|
|
2372
|
+
var ComponentOriginPart = _zod.z.object({
|
|
2373
|
+
nodeId: _zod.z.string().optional(),
|
|
2374
|
+
width: _zod.z.number().optional(),
|
|
2375
|
+
height: _zod.z.number().optional()
|
|
2376
|
+
});
|
|
2377
|
+
var ComponentAsset = _zod.z.object({
|
|
2378
|
+
assetId: _zod.z.string(),
|
|
2379
|
+
assetPath: _zod.z.string()
|
|
2380
|
+
});
|
|
2381
|
+
var ComponentOrigin = DesignElementOrigin.extend(ComponentOriginPart.shape);
|
|
2382
|
+
var BaseComponent = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
2383
|
+
origin: ComponentOrigin.optional(),
|
|
2384
|
+
thumbnail: ComponentAsset
|
|
2385
|
+
});
|
|
2386
|
+
var Component = BaseComponent.extend({
|
|
2387
|
+
svg: ComponentAsset.optional(),
|
|
2388
|
+
isAsset: _zod.z.boolean(),
|
|
2389
|
+
componentSetId: _zod.z.string().optional(),
|
|
2390
|
+
properties: FigmaComponentProperties.optional()
|
|
2391
|
+
});
|
|
2392
|
+
var ComponentSet = BaseComponent.extend({
|
|
2393
|
+
properties: FigmaComponentSetProperties
|
|
2394
|
+
});
|
|
2395
|
+
var ElementGroup = DesignElementBase.extend(DesignElementGroupablePart.shape).extend(DesignElementSlugPart.shape).extend(DesignElementBrandedPart.partial().shape).extend({
|
|
2396
|
+
shortPersistentId: _zod.z.string().optional(),
|
|
2397
|
+
childType: DesignElementType,
|
|
2398
|
+
data: ElementGroupDataV2.optional()
|
|
2399
|
+
});
|
|
2400
|
+
var BrandedElementGroup = ElementGroup.extend(DesignElementBrandedPart.shape);
|
|
2401
|
+
var DocumentationPageV1 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
2402
|
+
shortPersistentId: _zod.z.string(),
|
|
2403
|
+
data: DocumentationPageDataV1
|
|
2404
|
+
});
|
|
2405
|
+
var DocumentationGroupV1 = ElementGroup.omit({
|
|
2406
|
+
data: true
|
|
2407
|
+
}).extend({
|
|
2408
|
+
data: ElementGroupDataV1.optional()
|
|
2409
|
+
});
|
|
2410
|
+
var DocumentationPageV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
2411
|
+
shortPersistentId: _zod.z.string(),
|
|
2412
|
+
data: DocumentationPageDataV2.extend({
|
|
2413
|
+
oldBlocks: _zod.z.array(PageBlockV1).optional()
|
|
2414
|
+
})
|
|
2415
|
+
});
|
|
2416
|
+
var FigmaFileStructureOrigin = _zod.z.object({
|
|
2417
|
+
sourceId: _zod.z.string(),
|
|
2418
|
+
fileId: _zod.z.string().optional()
|
|
2419
|
+
});
|
|
2420
|
+
var FigmaFileStructureData = _zod.z.object({
|
|
2421
|
+
rootNode: FigmaFileStructureNode,
|
|
2422
|
+
assetsInFile: FigmaFileStructureStatistics
|
|
2423
|
+
});
|
|
2424
|
+
var FigmaFileStructure = DesignElementBase.extend({
|
|
2425
|
+
origin: FigmaFileStructureOrigin,
|
|
2426
|
+
data: FigmaFileStructureData
|
|
2427
|
+
});
|
|
2428
|
+
var FigmaNodeReferenceOrigin = _zod.z.object({
|
|
2429
|
+
sourceId: _zod.z.string(),
|
|
2430
|
+
parentName: _zod.z.string().optional()
|
|
2431
|
+
});
|
|
2432
|
+
var FigmaNodeReference = DesignElementBase.extend({
|
|
2433
|
+
data: FigmaNodeReferenceData,
|
|
2434
|
+
origin: FigmaNodeReferenceOrigin
|
|
2435
|
+
});
|
|
2436
|
+
var DesignTokenOriginPart = _zod.z.object({
|
|
2437
|
+
referenceOriginId: _zod.z.string().optional(),
|
|
2438
|
+
referenceOriginKey: _zod.z.string().optional(),
|
|
2439
|
+
referencePersistentId: _zod.z.string().optional(),
|
|
2440
|
+
referenceResolutionFailed: _zod.z.boolean().optional(),
|
|
2441
|
+
key: _zod.z.string().optional()
|
|
2442
|
+
});
|
|
2443
|
+
var DesignTokenOrigin = DesignElementOrigin.extend(DesignTokenOriginPart.shape);
|
|
2444
|
+
var DesignTokenBase = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
2445
|
+
origin: DesignTokenOrigin.optional()
|
|
2446
|
+
});
|
|
2447
|
+
var CreateDesignTokenBase = DesignTokenBase.omit(zodCreateInputOmit());
|
|
2448
|
+
var UpdateDesignTokenBase = DesignTokenBase.omit({
|
|
2449
|
+
...zodUpdateInputOmit(),
|
|
2450
|
+
brandPersistentId: true,
|
|
2451
|
+
designSystemVersionId: true
|
|
2452
|
+
});
|
|
2453
|
+
var BlurTokenTypedData = _zod.z.object({
|
|
2454
|
+
type: _zod.z.literal("Blur"),
|
|
2455
|
+
data: BlurTokenData
|
|
2456
|
+
});
|
|
2457
|
+
var ColorTokenTypedData = _zod.z.object({
|
|
2458
|
+
type: _zod.z.literal("Color"),
|
|
2459
|
+
data: ColorTokenData
|
|
2460
|
+
});
|
|
2461
|
+
var GradientTokenTypedData = _zod.z.object({
|
|
2462
|
+
type: _zod.z.literal("Gradient"),
|
|
2463
|
+
data: GradientTokenData
|
|
2464
|
+
});
|
|
2465
|
+
var OpacityTokenTypedData = _zod.z.object({
|
|
2466
|
+
type: _zod.z.literal("Opacity"),
|
|
2467
|
+
data: OpacityTokenData
|
|
2468
|
+
});
|
|
2469
|
+
var ShadowTokenTypedData = _zod.z.object({
|
|
2470
|
+
type: _zod.z.literal("Shadow"),
|
|
2471
|
+
data: ShadowTokenData
|
|
2472
|
+
});
|
|
2473
|
+
var TypographyTokenTypedData = _zod.z.object({
|
|
2474
|
+
type: _zod.z.literal("Typography"),
|
|
2475
|
+
data: TypographyTokenData
|
|
2476
|
+
});
|
|
2477
|
+
var StringTokenTypedData = _zod.z.object({
|
|
2478
|
+
type: _zod.z.literal("String"),
|
|
2479
|
+
data: StringTokenData
|
|
2480
|
+
});
|
|
2481
|
+
var DimensionTokenTypedData = _zod.z.object({
|
|
2482
|
+
type: _zod.z.literal("Dimension"),
|
|
2483
|
+
data: DimensionTokenData
|
|
2484
|
+
});
|
|
2485
|
+
var FontSizeTokenTypedData = _zod.z.object({
|
|
2486
|
+
type: _zod.z.literal("FontSize"),
|
|
2487
|
+
data: FontSizeTokenData
|
|
2488
|
+
});
|
|
2489
|
+
var FontFamilyTokenTypedData = _zod.z.object({
|
|
2490
|
+
type: _zod.z.literal("FontFamily"),
|
|
2491
|
+
data: FontFamilyTokenData
|
|
2492
|
+
});
|
|
2493
|
+
var FontWeightTokenTypedData = _zod.z.object({
|
|
2494
|
+
type: _zod.z.literal("FontWeight"),
|
|
2495
|
+
data: FontWeightTokenData
|
|
2496
|
+
});
|
|
2497
|
+
var LetterSpacingTokenTypedData = _zod.z.object({
|
|
2498
|
+
type: _zod.z.literal("LetterSpacing"),
|
|
2499
|
+
data: LetterSpacingTokenData
|
|
2500
|
+
});
|
|
2501
|
+
var LineHeightTokenTypedData = _zod.z.object({
|
|
2502
|
+
type: _zod.z.literal("LineHeight"),
|
|
2503
|
+
data: LineHeightTokenData
|
|
2504
|
+
});
|
|
2505
|
+
var ParagraphSpacingTokenTypedData = _zod.z.object({
|
|
2506
|
+
type: _zod.z.literal("ParagraphSpacing"),
|
|
2507
|
+
data: ParagraphSpacingTokenData
|
|
2508
|
+
});
|
|
2509
|
+
var TextCaseTokenTypedData = _zod.z.object({
|
|
2510
|
+
type: _zod.z.literal("TextCase"),
|
|
2511
|
+
data: TextCaseTokenData
|
|
2512
|
+
});
|
|
2513
|
+
var TextDecorationTokenTypedData = _zod.z.object({
|
|
2514
|
+
type: _zod.z.literal("TextDecoration"),
|
|
2515
|
+
data: TextDecorationTokenData
|
|
2516
|
+
});
|
|
2517
|
+
var BorderRadiusTokenTypedData = _zod.z.object({
|
|
2518
|
+
type: _zod.z.literal("BorderRadius"),
|
|
2519
|
+
data: BorderRadiusTokenData
|
|
2520
|
+
});
|
|
2521
|
+
var BorderWidthTokenTypedData = _zod.z.object({
|
|
2522
|
+
type: _zod.z.literal("BorderWidth"),
|
|
2523
|
+
data: BorderWidthTokenData
|
|
2524
|
+
});
|
|
2525
|
+
var BorderTypedData = _zod.z.object({
|
|
2526
|
+
type: _zod.z.literal("Border"),
|
|
2527
|
+
data: BorderTokenData
|
|
2528
|
+
});
|
|
2529
|
+
var ProductCopyTypedData = _zod.z.object({
|
|
2530
|
+
type: _zod.z.literal("ProductCopy"),
|
|
2531
|
+
data: ProductCopyTokenData
|
|
2532
|
+
});
|
|
2533
|
+
var SizeTypedData = _zod.z.object({
|
|
2534
|
+
type: _zod.z.literal("Size"),
|
|
2535
|
+
data: SizeTokenData
|
|
2536
|
+
});
|
|
2537
|
+
var SpaceTypedData = _zod.z.object({
|
|
2538
|
+
type: _zod.z.literal("Space"),
|
|
2539
|
+
data: SpaceTokenData
|
|
2540
|
+
});
|
|
2541
|
+
var VisibilityTypedData = _zod.z.object({
|
|
2542
|
+
type: _zod.z.literal("Visibility"),
|
|
2543
|
+
data: VisibilityTokenData
|
|
2544
|
+
});
|
|
2545
|
+
var ZIndexTypedData = _zod.z.object({
|
|
2546
|
+
type: _zod.z.literal("ZIndex"),
|
|
2547
|
+
data: ZIndexTokenData
|
|
2548
|
+
});
|
|
2549
|
+
var DurationTypedData = _zod.z.object({
|
|
2550
|
+
type: _zod.z.literal("Duration"),
|
|
2551
|
+
data: DurationTokenData
|
|
2552
|
+
});
|
|
2553
|
+
var FontTypedData = _zod.z.object({
|
|
2554
|
+
type: _zod.z.literal("Font"),
|
|
2555
|
+
data: _zod.z.record(_zod.z.any())
|
|
2556
|
+
});
|
|
2557
|
+
var DesignTokenTypedData = _zod.z.discriminatedUnion("type", [
|
|
2558
|
+
BlurTokenTypedData,
|
|
2559
|
+
BorderRadiusTokenTypedData,
|
|
2560
|
+
BorderWidthTokenTypedData,
|
|
2561
|
+
BorderTypedData,
|
|
2562
|
+
ColorTokenTypedData,
|
|
2563
|
+
DimensionTokenTypedData,
|
|
2564
|
+
DurationTypedData,
|
|
2565
|
+
FontSizeTokenTypedData,
|
|
2566
|
+
FontFamilyTokenTypedData,
|
|
2567
|
+
FontWeightTokenTypedData,
|
|
2568
|
+
GradientTokenTypedData,
|
|
2569
|
+
LetterSpacingTokenTypedData,
|
|
2570
|
+
LineHeightTokenTypedData,
|
|
2571
|
+
OpacityTokenTypedData,
|
|
2572
|
+
ParagraphSpacingTokenTypedData,
|
|
2573
|
+
ProductCopyTypedData,
|
|
2574
|
+
ShadowTokenTypedData,
|
|
2575
|
+
SizeTypedData,
|
|
2576
|
+
SpaceTypedData,
|
|
2577
|
+
StringTokenTypedData,
|
|
2578
|
+
TextCaseTokenTypedData,
|
|
2579
|
+
TextDecorationTokenTypedData,
|
|
2580
|
+
TypographyTokenTypedData,
|
|
2581
|
+
VisibilityTypedData,
|
|
2582
|
+
ZIndexTypedData,
|
|
2583
|
+
FontTypedData
|
|
2584
|
+
]);
|
|
2585
|
+
var DesignToken = DesignTokenTypedData.and(DesignTokenBase);
|
|
2586
|
+
var CreateDesignToken = DesignTokenTypedData.and(CreateDesignTokenBase);
|
|
2587
|
+
var ThemeOverrideOriginPart = DesignTokenOriginPart;
|
|
2588
|
+
var ThemeOverrideOrigin = DesignTokenOrigin;
|
|
2589
|
+
var ThemeOverride = DesignTokenTypedData.and(
|
|
2590
|
+
_zod.z.object({
|
|
2591
|
+
tokenPersistentId: _zod.z.string(),
|
|
2592
|
+
origin: ThemeOverrideOrigin.optional().nullable().transform((v) => _nullishCoalesce(v, () => ( void 0)))
|
|
2593
|
+
})
|
|
2594
|
+
);
|
|
2595
|
+
var ThemeElementData = _zod.z.object({
|
|
2596
|
+
value: _zod.z.object({
|
|
2597
|
+
overrides: _zod.z.array(ThemeOverride)
|
|
2598
|
+
})
|
|
2599
|
+
});
|
|
2600
|
+
var ThemeOriginPart = _zod.z.object({});
|
|
2601
|
+
var ThemeOriginObject = _zod.z.object({
|
|
2602
|
+
id: _zod.z.string(),
|
|
2603
|
+
name: _zod.z.string()
|
|
2604
|
+
});
|
|
2605
|
+
var ThemeOriginSource = _zod.z.object({
|
|
2606
|
+
sourceId: _zod.z.string(),
|
|
2607
|
+
sourceObjects: _zod.z.array(ThemeOriginObject)
|
|
2608
|
+
});
|
|
2609
|
+
var ThemeOrigin = _zod.z.object({
|
|
2610
|
+
sources: _zod.z.array(ThemeOriginSource)
|
|
2611
|
+
});
|
|
2612
|
+
var Theme = DesignElementBase.extend(DesignElementBrandedPart.shape).extend({
|
|
2613
|
+
origin: ThemeOrigin.optional(),
|
|
2614
|
+
overrides: _zod.z.array(ThemeOverride),
|
|
2615
|
+
codeName: _zod.z.string()
|
|
2616
|
+
});
|
|
2617
|
+
var FileStructureStats = _zod.z.object({
|
|
2618
|
+
frames: zeroNumberByDefault(),
|
|
2619
|
+
components: zeroNumberByDefault(),
|
|
2620
|
+
componentSets: zeroNumberByDefault()
|
|
2621
|
+
});
|
|
2622
|
+
var SourceImportSummaryByTokenTypeKey = DesignTokenType.or(
|
|
2623
|
+
// Backward compatibility
|
|
2624
|
+
_zod.z.enum(["Measure", "Radius", "GenericToken", "Font", "Text"])
|
|
2625
|
+
);
|
|
2626
|
+
var SourceImportSummaryByTokenType = _zod.z.record(SourceImportSummaryByTokenTypeKey, _zod.z.number());
|
|
2627
|
+
var SourceImportTokenSummary = _zod.z.object({
|
|
2628
|
+
tokensCreated: zeroNumberByDefault(),
|
|
2629
|
+
tokensUpdated: zeroNumberByDefault(),
|
|
2630
|
+
tokensDeleted: zeroNumberByDefault(),
|
|
2631
|
+
tokensCreatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => _nullishCoalesce(v, () => ( {}))),
|
|
2632
|
+
tokensUpdatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => _nullishCoalesce(v, () => ( {}))),
|
|
2633
|
+
tokensDeletedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => _nullishCoalesce(v, () => ( {})))
|
|
2634
|
+
});
|
|
2635
|
+
var SourceImportComponentSummary = _zod.z.object({
|
|
2636
|
+
componentsCreated: zeroNumberByDefault(),
|
|
2637
|
+
componentsUpdated: zeroNumberByDefault(),
|
|
2638
|
+
componentsDeleted: zeroNumberByDefault(),
|
|
2639
|
+
componentAssetsCreated: zeroNumberByDefault(),
|
|
2640
|
+
componentAssetsUpdated: zeroNumberByDefault(),
|
|
2641
|
+
componentAssetsDeleted: zeroNumberByDefault()
|
|
2642
|
+
});
|
|
2643
|
+
var SourceImportFrameSummary = _zod.z.object({
|
|
2644
|
+
assetsInFile: nullishToOptional(FileStructureStats.optional()),
|
|
2645
|
+
invalidReferencesCount: nullishToOptional(_zod.z.number().optional())
|
|
2646
|
+
});
|
|
2647
|
+
var SourceImportSummary = _zod.z.object({
|
|
2648
|
+
sourceId: nullishToOptional(_zod.z.string()),
|
|
2649
|
+
brandId: nullishToOptional(_zod.z.string()),
|
|
2650
|
+
versionId: nullishToOptional(_zod.z.string()),
|
|
2651
|
+
error: nullishToOptional(_zod.z.any()),
|
|
2652
|
+
isFailed: _zod.z.boolean(),
|
|
2653
|
+
warnings: _zod.z.array(ImportWarning).nullish().transform((v) => _nullishCoalesce(v, () => ( []))),
|
|
2654
|
+
...SourceImportTokenSummary.shape,
|
|
2655
|
+
...SourceImportComponentSummary.shape,
|
|
2656
|
+
...FileStructureStats.shape
|
|
2657
|
+
});
|
|
2658
|
+
function zeroNumberByDefault() {
|
|
2659
|
+
return _zod.z.number().nullish().transform((v) => _nullishCoalesce(v, () => ( 0)));
|
|
2660
|
+
}
|
|
2661
|
+
var DataSourceRemoteType = _zod.z.enum(["Figma", "TokenStudio", "FigmaVariablesPlugin"]);
|
|
2662
|
+
var DataSourceUploadRemoteSource = _zod.z.enum(["TokenStudio", "FigmaVariablesPlugin", "Custom"]);
|
|
2663
|
+
var DataSourceFigmaState = _zod.z.enum(["Active", "MissingIntegration", "MissingFileAccess", "MissingFileOwner"]);
|
|
2664
|
+
var DataSourceAutoImportMode = _zod.z.enum(["Never", "Hourly"]);
|
|
2665
|
+
var DataSourceStats = _zod.z.object({
|
|
2666
|
+
tokens: zeroNumberByDefault2(),
|
|
2667
|
+
components: zeroNumberByDefault2(),
|
|
2668
|
+
assets: zeroNumberByDefault2(),
|
|
2669
|
+
frames: zeroNumberByDefault2()
|
|
2670
|
+
});
|
|
2671
|
+
var DataSourceFigmaFileData = _zod.z.object({
|
|
2672
|
+
lastUpdatedAt: _zod.z.coerce.date()
|
|
2673
|
+
});
|
|
2674
|
+
var DataSourceFigmaFileVersionData = _zod.z.object({
|
|
2675
|
+
id: _zod.z.string(),
|
|
2676
|
+
label: _zod.z.string().optional(),
|
|
2677
|
+
description: _zod.z.string().optional(),
|
|
2678
|
+
createdAt: _zod.z.coerce.date()
|
|
2679
|
+
});
|
|
2680
|
+
var DataSourceFigmaScope = _zod.z.object({
|
|
2681
|
+
assets: _zod.z.boolean(),
|
|
2682
|
+
components: _zod.z.boolean(),
|
|
2683
|
+
documentationFrames: _zod.z.boolean(),
|
|
2684
|
+
tokens: _zod.z.boolean(),
|
|
2685
|
+
themePersistentId: _zod.z.string().optional(),
|
|
2686
|
+
isUnpublishedContentFallbackEnabled: _zod.z.boolean()
|
|
2687
|
+
});
|
|
2688
|
+
var DataSourceFigmaImportMetadata = _zod.z.object({
|
|
2689
|
+
fileData: DataSourceFigmaFileData.optional(),
|
|
2690
|
+
importedPublishedVersion: DataSourceFigmaFileVersionData.optional()
|
|
2691
|
+
});
|
|
2692
|
+
var DataSourceFigmaRemote = _zod.z.object({
|
|
2693
|
+
type: _zod.z.literal(DataSourceRemoteType.Enum.Figma),
|
|
2694
|
+
fileId: _zod.z.string(),
|
|
2695
|
+
preferredCredentialId: _zod.z.string().optional(),
|
|
2696
|
+
ownerId: _zod.z.string(),
|
|
2697
|
+
// todo remove or keep to reference who created data source
|
|
2698
|
+
ownerName: _zod.z.string(),
|
|
2699
|
+
// todo probably remove
|
|
2700
|
+
scope: DataSourceFigmaScope,
|
|
2701
|
+
state: DataSourceFigmaState,
|
|
2702
|
+
requiresSync: _zod.z.boolean().optional().transform((v) => _nullishCoalesce(v, () => ( false))),
|
|
2703
|
+
lastImportMetadata: DataSourceFigmaImportMetadata.optional(),
|
|
2704
|
+
downloadChunkSize: _zod.z.number().optional(),
|
|
2705
|
+
figmaRenderChunkSize: _zod.z.number().optional(),
|
|
2706
|
+
maxFileDepth: _zod.z.number().optional()
|
|
2707
|
+
});
|
|
2708
|
+
var DataSourceTokenStudioRemote = _zod.z.object({
|
|
2709
|
+
type: _zod.z.literal(DataSourceRemoteType.Enum.TokenStudio)
|
|
2710
|
+
});
|
|
2711
|
+
var DataSourceUploadImportMetadata = _zod.z.record(_zod.z.any());
|
|
2712
|
+
var DataSourceUploadRemote = _zod.z.object({
|
|
2713
|
+
type: _zod.z.literal(DataSourceRemoteType.Enum.FigmaVariablesPlugin),
|
|
2714
|
+
remoteId: _zod.z.string(),
|
|
2715
|
+
remoteSourceType: DataSourceUploadRemoteSource,
|
|
2716
|
+
lastImportMetadata: DataSourceUploadImportMetadata.optional(),
|
|
2717
|
+
warnings: nullishToOptional(ImportWarning.array())
|
|
2718
|
+
});
|
|
2719
|
+
var DataSourceRemote = _zod.z.discriminatedUnion("type", [
|
|
2720
|
+
DataSourceFigmaRemote,
|
|
2721
|
+
DataSourceUploadRemote,
|
|
2722
|
+
DataSourceTokenStudioRemote
|
|
2723
|
+
]);
|
|
2724
|
+
var DataSource = _zod.z.object({
|
|
2725
|
+
id: _zod.z.string(),
|
|
2726
|
+
name: _zod.z.string(),
|
|
2727
|
+
thumbnailUrl: _zod.z.string().optional(),
|
|
2728
|
+
createdAt: _zod.z.coerce.date().optional(),
|
|
2729
|
+
lastImportedAt: _zod.z.coerce.date().optional(),
|
|
2730
|
+
lastImportSummary: SourceImportSummary.optional(),
|
|
2731
|
+
designSystemId: _zod.z.string(),
|
|
2732
|
+
brandPersistentId: _zod.z.string(),
|
|
2733
|
+
autoImportMode: DataSourceAutoImportMode,
|
|
2734
|
+
stats: DataSourceStats,
|
|
2735
|
+
remote: DataSourceRemote,
|
|
2736
|
+
sortOrder: _zod.z.number()
|
|
2737
|
+
});
|
|
2738
|
+
var DataSourceVersion = _zod.z.object({
|
|
2739
|
+
id: _zod.z.string(),
|
|
2740
|
+
createdAt: _zod.z.coerce.date(),
|
|
2741
|
+
label: _zod.z.string().nullish(),
|
|
2742
|
+
description: _zod.z.string().nullish()
|
|
2743
|
+
});
|
|
2744
|
+
function zeroNumberByDefault2() {
|
|
2745
|
+
return _zod.z.number().nullish().transform((v) => _nullishCoalesce(v, () => ( 0)));
|
|
2746
|
+
}
|
|
2747
|
+
var ImportJobState = _zod.z.enum(["PendingInput", "Queued", "InProgress", "Failed", "Success"]);
|
|
2748
|
+
var ImportJobOperation = _zod.z.enum(["Check", "Import"]);
|
|
2749
|
+
var ImportJob = Entity.extend({
|
|
2750
|
+
designSystemId: _zod.z.string(),
|
|
2751
|
+
designSystemVersionId: _zod.z.string(),
|
|
2752
|
+
sourceIds: _zod.z.array(_zod.z.string()),
|
|
2753
|
+
state: ImportJobState,
|
|
2754
|
+
createdByUserId: _zod.z.string().optional(),
|
|
2755
|
+
importContextId: _zod.z.string(),
|
|
2756
|
+
error: _zod.z.string().optional(),
|
|
2757
|
+
sourceType: DataSourceRemoteType,
|
|
2758
|
+
importContextCleanedUp: _zod.z.boolean()
|
|
2759
|
+
});
|
|
2760
|
+
var ImportFunctionInput = _zod.z.object({
|
|
2761
|
+
importJobId: _zod.z.string(),
|
|
2762
|
+
importContextId: _zod.z.string(),
|
|
2763
|
+
designSystemId: _zod.z.string().optional()
|
|
2764
|
+
});
|
|
2765
|
+
var ImportedFigmaSourceData = _zod.z.object({
|
|
2766
|
+
sourceId: _zod.z.string(),
|
|
2767
|
+
figmaRemote: DataSourceFigmaRemote
|
|
2768
|
+
});
|
|
2769
|
+
var FigmaImportBaseContext = _zod.z.object({
|
|
2770
|
+
designSystemId: _zod.z.string(),
|
|
2771
|
+
/**
|
|
2772
|
+
* Data required for accessing Figma files. This should contain access data for all file ids
|
|
2773
|
+
* mentioned in the `importedSourceDataBySourceId`
|
|
2774
|
+
*
|
|
2775
|
+
* fileId: file data
|
|
2776
|
+
*/
|
|
2777
|
+
fileAccessByFileId: _zod.z.record(FigmaFileAccessData),
|
|
2778
|
+
/**
|
|
2779
|
+
* Figma source data for which import was requested
|
|
2780
|
+
*
|
|
2781
|
+
* sourceId: source data
|
|
2782
|
+
*/
|
|
2783
|
+
importedSourceDataBySourceId: _zod.z.record(ImportedFigmaSourceData),
|
|
2784
|
+
/**
|
|
2785
|
+
* Array of warnings that will be written into the import result summary at the end
|
|
2786
|
+
* of import job execution and displayed by the client.
|
|
2787
|
+
*/
|
|
2788
|
+
importWarnings: _zod.z.record(ImportWarning.array()).default({})
|
|
2789
|
+
});
|
|
2790
|
+
var FigmaImportContextWithSourcesState = FigmaImportBaseContext.extend({
|
|
2791
|
+
sourcesWithMissingAccess: _zod.z.array(_zod.z.string()).default([]),
|
|
2792
|
+
shadowOpacityOptional: _zod.z.boolean().default(false)
|
|
2793
|
+
});
|
|
2794
|
+
var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
|
|
2795
|
+
importMetadata: DataSourceFigmaImportMetadata
|
|
2796
|
+
});
|
|
2797
|
+
var FigmaImportContextWithDownloadScopes = FigmaImportContextWithSourcesState.extend({
|
|
2798
|
+
/**
|
|
2799
|
+
* Describes what to download from each file, this should contain all file id mentioned in
|
|
2800
|
+
* importMetadataBySourceId.
|
|
2801
|
+
*
|
|
2802
|
+
* File id -> file download scope
|
|
2803
|
+
*/
|
|
2804
|
+
fileDownloadScopesByFileId: _zod.z.record(FigmaFileDownloadScope),
|
|
2805
|
+
/**
|
|
2806
|
+
* Sources filtered down to the ones that have changed since last import and therefore need to be
|
|
2807
|
+
* imported again.
|
|
2808
|
+
*
|
|
2809
|
+
* Source id -> import metadata
|
|
2810
|
+
*/
|
|
2811
|
+
changedImportedSourceDataBySourceId: _zod.z.record(ChangedImportedFigmaSourceData)
|
|
2812
|
+
});
|
|
2813
|
+
var ImageImportModelType = _zod.z.enum(["Url", "FigmaRender"]);
|
|
2814
|
+
var ImageImportModelBase = _zod.z.object({
|
|
2815
|
+
scope: AssetScope
|
|
2816
|
+
});
|
|
2817
|
+
var UrlImageImportModel = ImageImportModelBase.extend({
|
|
2818
|
+
type: _zod.z.literal(ImageImportModelType.enum.Url),
|
|
2819
|
+
url: _zod.z.string(),
|
|
2820
|
+
originKey: _zod.z.string(),
|
|
2821
|
+
extension: _zod.z.string()
|
|
2822
|
+
});
|
|
2823
|
+
var FigmaRenderFormat = _zod.z.enum(["Svg", "Png", "Pdf"]);
|
|
2824
|
+
var FigmaRenderBase = ImageImportModelBase.extend({
|
|
2825
|
+
type: _zod.z.literal(ImageImportModelType.enum.FigmaRender),
|
|
2826
|
+
fileId: _zod.z.string(),
|
|
2827
|
+
fileVersionId: _zod.z.string().optional(),
|
|
2828
|
+
nodeId: _zod.z.string(),
|
|
2829
|
+
originKey: _zod.z.string()
|
|
2830
|
+
});
|
|
2831
|
+
var FigmaPngRenderImportModel = FigmaRenderBase.extend({
|
|
2832
|
+
format: _zod.z.literal(FigmaRenderFormat.enum.Png),
|
|
2833
|
+
scale: _zod.z.number()
|
|
2834
|
+
});
|
|
2835
|
+
var FigmaSvgRenderImportModel = FigmaRenderBase.extend({
|
|
2836
|
+
format: _zod.z.literal(FigmaRenderFormat.enum.Svg)
|
|
2837
|
+
});
|
|
2838
|
+
var FigmaRenderImportModel = _zod.z.discriminatedUnion("format", [
|
|
2839
|
+
FigmaPngRenderImportModel,
|
|
2840
|
+
FigmaSvgRenderImportModel
|
|
2841
|
+
]);
|
|
2842
|
+
var ImageImportModel = _zod.z.union([UrlImageImportModel, FigmaRenderImportModel]);
|
|
2843
|
+
var ImportModelBase = _zod.z.object({
|
|
2844
|
+
id: _zod.z.string(),
|
|
2845
|
+
meta: ObjectMeta,
|
|
2846
|
+
origin: DesignElementOrigin,
|
|
2847
|
+
brandPersistentId: _zod.z.string(),
|
|
2848
|
+
sortOrder: _zod.z.number()
|
|
2849
|
+
});
|
|
2850
|
+
var ImportModelInputBase = ImportModelBase.omit({
|
|
2851
|
+
brandPersistentId: true,
|
|
2852
|
+
origin: true,
|
|
2853
|
+
sortOrder: true
|
|
2854
|
+
}).extend({
|
|
2855
|
+
originId: _zod.z.string(),
|
|
2856
|
+
originMetadata: _zod.z.record(_zod.z.any())
|
|
2857
|
+
});
|
|
2858
|
+
var ComponentImportModelPart = _zod.z.object({
|
|
2859
|
+
thumbnail: ImageImportModel
|
|
2860
|
+
});
|
|
2861
|
+
var ComponentImportModel = ImportModelBase.extend(ComponentImportModelPart.shape).extend({
|
|
2862
|
+
isAsset: _zod.z.boolean(),
|
|
2863
|
+
svg: FigmaSvgRenderImportModel.optional(),
|
|
2864
|
+
origin: ComponentOrigin
|
|
2865
|
+
});
|
|
2866
|
+
var ComponentImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart.shape).extend({
|
|
2867
|
+
originMetadata: ComponentOriginPart
|
|
2868
|
+
});
|
|
2869
|
+
var AssetImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart.shape).extend({
|
|
2870
|
+
svg: FigmaSvgRenderImportModel,
|
|
2871
|
+
originMetadata: ComponentOriginPart
|
|
2872
|
+
});
|
|
2873
|
+
var ThemeOverrideImportModelBase = DesignTokenTypedData.and(
|
|
2874
|
+
_zod.z.object({
|
|
2875
|
+
id: _zod.z.string(),
|
|
2876
|
+
meta: ObjectMeta
|
|
2877
|
+
})
|
|
2878
|
+
);
|
|
2879
|
+
var ThemeOverrideImportModel = ThemeOverrideImportModelBase.and(
|
|
2880
|
+
_zod.z.object({
|
|
2881
|
+
origin: ThemeOverrideOrigin
|
|
2882
|
+
})
|
|
2883
|
+
);
|
|
2884
|
+
var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
|
|
2885
|
+
_zod.z.object({
|
|
2886
|
+
originId: _zod.z.string(),
|
|
2887
|
+
originMetadata: ThemeOverrideOriginPart
|
|
2888
|
+
})
|
|
2889
|
+
);
|
|
2890
|
+
var ThemeImportModel = _zod.z.object({
|
|
2891
|
+
meta: ObjectMeta,
|
|
2892
|
+
brandPersistentId: _zod.z.string(),
|
|
2893
|
+
originSource: ThemeOriginSource,
|
|
2894
|
+
overrides: _zod.z.array(ThemeOverrideImportModel),
|
|
2895
|
+
sortOrder: _zod.z.number()
|
|
2896
|
+
});
|
|
2897
|
+
var ThemeImportModelInput = _zod.z.object({
|
|
2898
|
+
meta: ObjectMeta,
|
|
2899
|
+
originObjects: _zod.z.array(ThemeOriginObject),
|
|
2900
|
+
overrides: _zod.z.array(ThemeOverrideImportModelInput)
|
|
2901
|
+
});
|
|
2902
|
+
var ThemeUpdateImportModel = _zod.z.object({
|
|
2903
|
+
themePersistentId: _zod.z.string(),
|
|
2904
|
+
overrides: _zod.z.array(ThemeOverrideImportModel)
|
|
2905
|
+
});
|
|
2906
|
+
var ThemeUpdateImportModelInput = _zod.z.object({
|
|
2907
|
+
themePersistentId: _zod.z.string(),
|
|
2908
|
+
overrides: _zod.z.array(ThemeOverrideImportModelInput)
|
|
2909
|
+
});
|
|
2910
|
+
var DesignTokenImportModelPart = _zod.z.object({
|
|
2911
|
+
collection: _zod.z.string().optional(),
|
|
2912
|
+
codeSyntax: _zod.z.record(_zod.z.coerce.string()).optional()
|
|
2913
|
+
});
|
|
2914
|
+
var DesignTokenImportModelBase = ImportModelBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
2915
|
+
origin: DesignTokenOrigin
|
|
2916
|
+
});
|
|
2917
|
+
var DesignTokenImportModelInputBase = ImportModelInputBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
2918
|
+
originMetadata: DesignTokenOriginPart
|
|
2919
|
+
});
|
|
2920
|
+
var DesignTokenImportModel = DesignTokenTypedData.and(DesignTokenImportModelBase);
|
|
2921
|
+
var DesignTokenImportModelInput = DesignTokenTypedData.and(DesignTokenImportModelInputBase);
|
|
2922
|
+
var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
|
|
2923
|
+
image: FigmaPngRenderImportModel
|
|
2924
|
+
});
|
|
2925
|
+
var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
|
|
2926
|
+
children: _zod.z.lazy(() => FigmaFileStructureNodeImportModel.array())
|
|
2927
|
+
});
|
|
2928
|
+
var FigmaFileStructureImportModelPart = _zod.z.object({
|
|
2929
|
+
data: _zod.z.object({
|
|
2930
|
+
rootNode: FigmaFileStructureNodeImportModel,
|
|
2931
|
+
assetsInFile: FigmaFileStructureStatistics
|
|
2932
|
+
})
|
|
2933
|
+
});
|
|
2934
|
+
var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImportModelPart.shape).extend({
|
|
2935
|
+
origin: FigmaFileStructureOrigin
|
|
2936
|
+
});
|
|
2937
|
+
var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
|
|
2938
|
+
FigmaFileStructureImportModelPart.shape
|
|
2939
|
+
).extend({
|
|
2940
|
+
fileVersionId: _zod.z.string()
|
|
2941
|
+
});
|
|
2942
|
+
var DataSourceImportModel = _zod.z.object({
|
|
2943
|
+
id: _zod.z.string(),
|
|
2944
|
+
fileName: _zod.z.string().optional(),
|
|
2945
|
+
thumbnailUrl: _zod.z.string().optional()
|
|
2946
|
+
});
|
|
2947
|
+
var ImportModelInputCollection = _zod.z.object({
|
|
2948
|
+
source: DataSourceImportModel,
|
|
2949
|
+
tokens: _zod.z.array(DesignTokenImportModelInput).default([]),
|
|
2950
|
+
components: _zod.z.array(ComponentImportModelInput).default([]),
|
|
2951
|
+
assets: _zod.z.array(AssetImportModelInput).default([]),
|
|
2952
|
+
themeUpdates: _zod.z.array(ThemeUpdateImportModelInput).default([]),
|
|
2953
|
+
themes: _zod.z.array(ThemeImportModelInput).default([]),
|
|
2954
|
+
figmaFileStructure: FigmaFileStructureImportModelInput.optional()
|
|
2955
|
+
});
|
|
2956
|
+
var ImportModelCollection = _zod.z.object({
|
|
2957
|
+
sources: _zod.z.array(DataSourceImportModel),
|
|
2958
|
+
tokens: _zod.z.array(DesignTokenImportModel).default([]),
|
|
2959
|
+
components: _zod.z.array(ComponentImportModel).default([]),
|
|
2960
|
+
themeUpdates: _zod.z.array(ThemeUpdateImportModel).default([]),
|
|
2961
|
+
themes: _zod.z.array(ThemeImportModel).default([]),
|
|
2962
|
+
figmaFileStructures: _zod.z.array(FigmaFileStructureImportModel)
|
|
2963
|
+
});
|
|
2964
|
+
var AssetRenderConfiguration = _zod.z.object({
|
|
2965
|
+
prefix: _zod.z.string().optional(),
|
|
2966
|
+
suffix: _zod.z.string().optional(),
|
|
2967
|
+
scale: _zod.z.number(),
|
|
2968
|
+
format: FigmaRenderFormat
|
|
2969
|
+
});
|
|
2970
|
+
var RenderedAssetFile = _zod.z.object({
|
|
2971
|
+
assetPersistentId: _zod.z.string(),
|
|
2972
|
+
assetName: _zod.z.string(),
|
|
2973
|
+
renderedImageFileName: _zod.z.string(),
|
|
2974
|
+
renderedImageUrl: _zod.z.string(),
|
|
2975
|
+
settings: AssetRenderConfiguration
|
|
2976
|
+
});
|
|
2977
|
+
var PageBlockDefinitionAppearance = _zod.z.object({
|
|
2978
|
+
isBordered: _zod.z.boolean().optional(),
|
|
2979
|
+
hasBackground: _zod.z.boolean().optional(),
|
|
2980
|
+
isEditorPresentationDifferent: _zod.z.boolean().optional(),
|
|
2981
|
+
showBlockHeaderInEditor: _zod.z.boolean().optional()
|
|
2982
|
+
});
|
|
2983
|
+
var PageBlockDefinitionLayoutType = _zod.z.enum(["Column", "Row"]);
|
|
2984
|
+
var PageBlockDefinitionLayoutGap = _zod.z.enum(["Small", "Medium", "Large", "None"]);
|
|
2985
|
+
var PageBlockDefinitionLayoutAlign = _zod.z.enum(["Start", "Center", "End"]);
|
|
2986
|
+
var PageBlockDefinitionLayoutResizing = _zod.z.enum(["Fill", "Hug"]);
|
|
2987
|
+
var PageBlockDefinitionLayoutBase = _zod.z.object({
|
|
2988
|
+
type: PageBlockDefinitionLayoutType,
|
|
2989
|
+
gap: PageBlockDefinitionLayoutGap.optional(),
|
|
2990
|
+
columnAlign: PageBlockDefinitionLayoutAlign.optional(),
|
|
2991
|
+
columnResizing: PageBlockDefinitionLayoutResizing.optional()
|
|
2992
|
+
});
|
|
2993
|
+
var PageBlockDefinitionLayout = PageBlockDefinitionLayoutBase.extend({
|
|
2994
|
+
children: _zod.z.lazy(() => _zod.z.array(PageBlockDefinitionLayout.or(_zod.z.string())))
|
|
2995
|
+
});
|
|
2996
|
+
var PageBlockDefinitionVariant = _zod.z.object({
|
|
2997
|
+
id: _zod.z.string(),
|
|
2998
|
+
name: _zod.z.string(),
|
|
2999
|
+
image: _zod.z.string().optional(),
|
|
3000
|
+
description: _zod.z.string().optional(),
|
|
3001
|
+
documentationLink: _zod.z.string().optional(),
|
|
3002
|
+
layout: PageBlockDefinitionLayout,
|
|
3003
|
+
maxColumns: _zod.z.number().optional(),
|
|
3004
|
+
defaultColumns: _zod.z.number().optional(),
|
|
3005
|
+
appearance: PageBlockDefinitionAppearance.optional()
|
|
3006
|
+
});
|
|
3007
|
+
var PageBlockDefinitionPropertyType = _zod.z.enum([
|
|
3008
|
+
"RichText",
|
|
3009
|
+
"MultiRichText",
|
|
3010
|
+
"Text",
|
|
3011
|
+
"Boolean",
|
|
3012
|
+
"Number",
|
|
3013
|
+
"SingleSelect",
|
|
3014
|
+
"MultiSelect",
|
|
3015
|
+
"Image",
|
|
3016
|
+
"Token",
|
|
3017
|
+
"TokenType",
|
|
3018
|
+
"TokenProperty",
|
|
3019
|
+
"Component",
|
|
3020
|
+
"ComponentProperty",
|
|
3021
|
+
"Asset",
|
|
3022
|
+
"AssetProperty",
|
|
3023
|
+
"FigmaNode",
|
|
3024
|
+
"EmbedURL",
|
|
3025
|
+
"URL",
|
|
3026
|
+
"Markdown",
|
|
3027
|
+
"Code",
|
|
3028
|
+
"CodeSandbox",
|
|
3029
|
+
"Table",
|
|
3030
|
+
"Divider",
|
|
3031
|
+
"Storybook",
|
|
3032
|
+
"Color",
|
|
3033
|
+
"FigmaComponent"
|
|
3034
|
+
]);
|
|
3035
|
+
var PageBlockDefinitionRichTextPropertyStyle = _zod.z.enum([
|
|
3036
|
+
"Title1",
|
|
3037
|
+
"Title2",
|
|
3038
|
+
"Title3",
|
|
3039
|
+
"Title4",
|
|
3040
|
+
"Title5",
|
|
3041
|
+
"Quote",
|
|
3042
|
+
"Callout",
|
|
3043
|
+
"Default"
|
|
3044
|
+
]);
|
|
3045
|
+
var PageBlockDefinitionMultiRichTextPropertyStyle = _zod.z.enum(["OL", "UL", "Default"]);
|
|
3046
|
+
var PageBlockDefinitionTextPropertyStyle = _zod.z.enum([
|
|
3047
|
+
"Title1",
|
|
3048
|
+
"Title2",
|
|
3049
|
+
"Title3",
|
|
3050
|
+
"Title4",
|
|
3051
|
+
"Title5",
|
|
3052
|
+
"Default",
|
|
3053
|
+
"DefaultBold",
|
|
3054
|
+
"DefaultSemibold",
|
|
3055
|
+
"Small",
|
|
3056
|
+
"SmallBold",
|
|
3057
|
+
"SmallSemibold",
|
|
3058
|
+
"Custom"
|
|
3059
|
+
]);
|
|
3060
|
+
var PageBlockDefinitionTextPropertyColor = _zod.z.enum(["Neutral", "NeutralFaded"]);
|
|
3061
|
+
var PageBlockDefinitionBooleanPropertyStyle = _zod.z.enum(["SegmentedControl", "ToggleButton", "Checkbox"]);
|
|
3062
|
+
var PageBlockDefinitionSingleSelectPropertyStyle = _zod.z.enum([
|
|
3063
|
+
"SegmentedControl",
|
|
3064
|
+
"ToggleButton",
|
|
3065
|
+
"Select",
|
|
3066
|
+
"Checkbox"
|
|
3067
|
+
]);
|
|
3068
|
+
var PageBlockDefinitionSingleSelectPropertyColor = _zod.z.enum([
|
|
3069
|
+
"Green",
|
|
3070
|
+
"Red",
|
|
3071
|
+
"Yellow",
|
|
3072
|
+
"Blue",
|
|
3073
|
+
"Purple",
|
|
3074
|
+
"Orange",
|
|
3075
|
+
"Pink",
|
|
3076
|
+
"Teal",
|
|
3077
|
+
"Brown",
|
|
3078
|
+
"Grey",
|
|
3079
|
+
"LightGrey",
|
|
3080
|
+
"Cyan",
|
|
3081
|
+
"Fuchsia"
|
|
3082
|
+
]);
|
|
3083
|
+
var IconSet = _zod.z.enum([
|
|
3084
|
+
"CheckCircle",
|
|
3085
|
+
"CrossCircle",
|
|
3086
|
+
"Alert"
|
|
3087
|
+
]);
|
|
3088
|
+
var PageBlockDefinitionMultiSelectPropertyStyle = _zod.z.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
3089
|
+
var PageBlockDefinitionImageAspectRatio = _zod.z.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
|
|
3090
|
+
var PageBlockDefinitionImageWidth = _zod.z.enum(["Full", "Icon", "Small", "Medium", "Large", "Poster"]);
|
|
3091
|
+
var PageBlockDefinitionSelectChoice = _zod.z.object({
|
|
3092
|
+
value: _zod.z.string(),
|
|
3093
|
+
name: _zod.z.string(),
|
|
3094
|
+
icon: IconSet.optional(),
|
|
3095
|
+
customIconUrl: _zod.z.string().optional(),
|
|
3096
|
+
color: PageBlockDefinitionSingleSelectPropertyColor.optional()
|
|
3097
|
+
});
|
|
3098
|
+
var PageBlockDefinitionUntypedPropertyOptions = _zod.z.record(_zod.z.any());
|
|
3099
|
+
var PageBlockDefinitionRichTextOptions = _zod.z.object({
|
|
3100
|
+
richTextStyle: PageBlockDefinitionRichTextPropertyStyle.optional()
|
|
3101
|
+
});
|
|
3102
|
+
var PageBlockDefinitionMutiRichTextOptions = _zod.z.object({
|
|
3103
|
+
multiRichTextStyle: PageBlockDefinitionMultiRichTextPropertyStyle.optional()
|
|
3104
|
+
});
|
|
3105
|
+
var PageBlockDefinitionTextOptions = _zod.z.object({
|
|
3106
|
+
placeholder: _zod.z.string().optional(),
|
|
3107
|
+
defaultValue: _zod.z.string().optional(),
|
|
3108
|
+
textStyle: PageBlockDefinitionTextPropertyStyle.optional(),
|
|
3109
|
+
color: PageBlockDefinitionTextPropertyColor.optional(),
|
|
3110
|
+
allowLineBreaks: _zod.z.boolean().optional()
|
|
3111
|
+
});
|
|
3112
|
+
var PageBlockDefinitionSelectOptions = _zod.z.object({
|
|
3113
|
+
singleSelectStyle: PageBlockDefinitionSingleSelectPropertyStyle.optional(),
|
|
3114
|
+
defaultChoice: _zod.z.string(),
|
|
3115
|
+
choices: _zod.z.array(PageBlockDefinitionSelectChoice)
|
|
3116
|
+
});
|
|
3117
|
+
var PageBlockDefinitionImageOptions = _zod.z.object({
|
|
3118
|
+
width: PageBlockDefinitionImageWidth.optional(),
|
|
3119
|
+
aspectRatio: PageBlockDefinitionImageAspectRatio.optional(),
|
|
3120
|
+
allowCaption: _zod.z.boolean().optional(),
|
|
3121
|
+
recommendation: _zod.z.string().optional()
|
|
3122
|
+
});
|
|
3123
|
+
var PageBlockDefinitionBooleanOptions = _zod.z.object({
|
|
3124
|
+
defaultvalue: _zod.z.boolean().optional(),
|
|
3125
|
+
booleanStyle: PageBlockDefinitionBooleanPropertyStyle.optional()
|
|
3126
|
+
});
|
|
3127
|
+
var PageBlockDefinitionNumberOptions = _zod.z.object({
|
|
3128
|
+
defaultValue: _zod.z.number(),
|
|
3129
|
+
min: _zod.z.number().optional(),
|
|
3130
|
+
max: _zod.z.number().optional(),
|
|
3131
|
+
step: _zod.z.number().optional(),
|
|
3132
|
+
placeholder: _zod.z.string().optional()
|
|
3133
|
+
});
|
|
3134
|
+
var PageBlockDefinitionComponentOptions = _zod.z.object({
|
|
3135
|
+
renderLayoutAs: _zod.z.enum(["List", "Table"]).optional(),
|
|
3136
|
+
allowPropertySelection: _zod.z.boolean().optional()
|
|
3137
|
+
});
|
|
3138
|
+
var PageBlockDefinitionProperty = _zod.z.object({
|
|
3139
|
+
id: _zod.z.string(),
|
|
3140
|
+
name: _zod.z.string(),
|
|
3141
|
+
type: PageBlockDefinitionPropertyType,
|
|
3142
|
+
description: _zod.z.string().optional(),
|
|
3143
|
+
options: PageBlockDefinitionUntypedPropertyOptions.optional(),
|
|
3144
|
+
variantOptions: _zod.z.record(PageBlockDefinitionUntypedPropertyOptions).optional()
|
|
3145
|
+
});
|
|
3146
|
+
var PageBlockDefinitionItem = _zod.z.object({
|
|
3147
|
+
properties: _zod.z.array(PageBlockDefinitionProperty),
|
|
3148
|
+
appearance: PageBlockDefinitionAppearance.optional(),
|
|
3149
|
+
variants: _zod.z.array(PageBlockDefinitionVariant),
|
|
3150
|
+
defaultVariantKey: _zod.z.string()
|
|
3151
|
+
});
|
|
3152
|
+
var PageBlockCategory = _zod.z.enum([
|
|
3153
|
+
"Text",
|
|
3154
|
+
"Layout",
|
|
3155
|
+
"Media",
|
|
3156
|
+
"Embed",
|
|
3157
|
+
"Figma",
|
|
3158
|
+
"Code",
|
|
3159
|
+
"Guidelines",
|
|
3160
|
+
"Tokens",
|
|
3161
|
+
"Components",
|
|
3162
|
+
"Assets",
|
|
3163
|
+
"Data",
|
|
3164
|
+
"Other"
|
|
3165
|
+
]);
|
|
3166
|
+
var PageBlockBehaviorDataType = _zod.z.enum(["Item", "Token", "Asset", "Component", "FigmaNode", "FigmaComponent"]);
|
|
3167
|
+
var PageBlockBehaviorSelectionType = _zod.z.enum(["Entity", "Group", "EntityAndGroup"]);
|
|
3168
|
+
var PageBlockDefinitionBehavior = _zod.z.object({
|
|
3169
|
+
dataType: PageBlockBehaviorDataType,
|
|
3170
|
+
items: _zod.z.object({
|
|
3171
|
+
numberOfItems: _zod.z.number(),
|
|
3172
|
+
allowLinks: _zod.z.boolean(),
|
|
3173
|
+
newItemLabel: _zod.z.string().optional()
|
|
3174
|
+
}).optional(),
|
|
3175
|
+
entities: _zod.z.object({
|
|
3176
|
+
selectionType: PageBlockBehaviorSelectionType,
|
|
3177
|
+
maxSelected: _zod.z.number()
|
|
3178
|
+
}).optional()
|
|
3179
|
+
});
|
|
3180
|
+
var PageBlockDefinitionOnboarding = _zod.z.object({
|
|
3181
|
+
helpText: _zod.z.string(),
|
|
3182
|
+
documentationLink: _zod.z.string().optional()
|
|
3183
|
+
});
|
|
3184
|
+
var PageBlockDefinition = _zod.z.object({
|
|
3185
|
+
id: _zod.z.string(),
|
|
3186
|
+
name: _zod.z.string(),
|
|
3187
|
+
description: _zod.z.string(),
|
|
3188
|
+
category: PageBlockCategory,
|
|
3189
|
+
icon: _zod.z.string().optional(),
|
|
3190
|
+
documentationLink: _zod.z.string().optional(),
|
|
3191
|
+
searchKeywords: _zod.z.array(_zod.z.string()).optional(),
|
|
3192
|
+
item: PageBlockDefinitionItem,
|
|
3193
|
+
behavior: PageBlockDefinitionBehavior,
|
|
3194
|
+
editorOptions: _zod.z.object({
|
|
3195
|
+
onboarding: PageBlockDefinitionOnboarding.optional(),
|
|
3196
|
+
newItemLabel: _zod.z.string().optional()
|
|
3197
|
+
}),
|
|
3198
|
+
appearance: PageBlockDefinitionAppearance.optional()
|
|
3199
|
+
});
|
|
3200
|
+
var DocumentationPageGroup = _zod.z.object({
|
|
3201
|
+
type: _zod.z.literal("ElementGroup"),
|
|
3202
|
+
childType: _zod.z.literal("DocumentationPage"),
|
|
3203
|
+
id: _zod.z.string(),
|
|
3204
|
+
persistentId: _zod.z.string(),
|
|
3205
|
+
shortPersistentId: _zod.z.string(),
|
|
3206
|
+
designSystemVersionId: _zod.z.string(),
|
|
3207
|
+
parentPersistentId: _zod.z.string().nullish(),
|
|
3208
|
+
sortOrder: _zod.z.number(),
|
|
3209
|
+
title: _zod.z.string(),
|
|
3210
|
+
slug: _zod.z.string(),
|
|
3211
|
+
userSlug: _zod.z.string().nullish(),
|
|
3212
|
+
createdAt: _zod.z.coerce.date(),
|
|
3213
|
+
updatedAt: _zod.z.coerce.date()
|
|
3214
|
+
});
|
|
3215
|
+
var DocumentationLinkPreview = _zod.z.object({
|
|
3216
|
+
title: _zod.z.string().optional(),
|
|
3217
|
+
description: _zod.z.string().optional(),
|
|
3218
|
+
thumbnail: PageBlockImageReference.optional()
|
|
3219
|
+
});
|
|
3220
|
+
var DocumentationPageAnchor = _zod.z.object({
|
|
3221
|
+
blockId: _zod.z.string(),
|
|
3222
|
+
level: _zod.z.number(),
|
|
3223
|
+
text: _zod.z.string()
|
|
3224
|
+
});
|
|
3225
|
+
var DocumentationPageContentBackup = _zod.z.object({
|
|
3226
|
+
id: _zod.z.string(),
|
|
3227
|
+
designSystemVersionId: _zod.z.string(),
|
|
3228
|
+
createdAt: _zod.z.coerce.date(),
|
|
3229
|
+
updatedAt: _zod.z.coerce.date(),
|
|
3230
|
+
documentationPageId: _zod.z.string(),
|
|
3231
|
+
documentationPageName: _zod.z.string(),
|
|
3232
|
+
storagePath: _zod.z.string()
|
|
3233
|
+
});
|
|
3234
|
+
var DocumentationPageContentItem = _zod.z.discriminatedUnion("type", [
|
|
3235
|
+
PageBlockEditorModelV2,
|
|
3236
|
+
PageSectionEditorModelV2
|
|
3237
|
+
]);
|
|
3238
|
+
var DocumentationPageContentData = _zod.z.object({
|
|
3239
|
+
items: _zod.z.array(DocumentationPageContentItem)
|
|
3240
|
+
});
|
|
3241
|
+
var DocumentationPageContent = _zod.z.object({
|
|
3242
|
+
id: _zod.z.string(),
|
|
3243
|
+
designSystemVersionId: _zod.z.string(),
|
|
3244
|
+
createdAt: _zod.z.coerce.date(),
|
|
3245
|
+
updatedAt: _zod.z.coerce.date(),
|
|
3246
|
+
documentationPageId: _zod.z.string(),
|
|
3247
|
+
data: DocumentationPageContentData
|
|
3248
|
+
});
|
|
3249
|
+
var DocumentationPage = _zod.z.object({
|
|
3250
|
+
type: _zod.z.literal("DocumentationPage"),
|
|
3251
|
+
id: _zod.z.string(),
|
|
3252
|
+
persistentId: _zod.z.string(),
|
|
3253
|
+
shortPersistentId: _zod.z.string(),
|
|
3254
|
+
designSystemVersionId: _zod.z.string(),
|
|
3255
|
+
parentPersistentId: _zod.z.string().nullish(),
|
|
3256
|
+
sortOrder: _zod.z.number(),
|
|
3257
|
+
title: _zod.z.string(),
|
|
3258
|
+
slug: _zod.z.string(),
|
|
3259
|
+
userSlug: _zod.z.string().nullish(),
|
|
3260
|
+
createdAt: _zod.z.coerce.date(),
|
|
3261
|
+
updatedAt: _zod.z.coerce.date()
|
|
3262
|
+
});
|
|
3263
|
+
var DocumentationComment = _zod.z.object({
|
|
3264
|
+
id: _zod.z.string(),
|
|
3265
|
+
authorId: _zod.z.string(),
|
|
3266
|
+
threadId: _zod.z.string(),
|
|
3267
|
+
roomId: _zod.z.string(),
|
|
3268
|
+
createdAt: _zod.z.coerce.date(),
|
|
3269
|
+
editedAt: _zod.z.coerce.date().optional(),
|
|
3270
|
+
deletedAt: _zod.z.coerce.date().optional(),
|
|
3271
|
+
body: _zod.z.string()
|
|
3272
|
+
});
|
|
3273
|
+
var DocumentationCommentThread = _zod.z.object({
|
|
3274
|
+
id: _zod.z.string(),
|
|
3275
|
+
roomId: _zod.z.string(),
|
|
3276
|
+
pagePersistentId: _zod.z.string(),
|
|
3277
|
+
brandId: _zod.z.string(),
|
|
3278
|
+
designSystemVersionId: _zod.z.string(),
|
|
3279
|
+
designSystemId: _zod.z.string(),
|
|
3280
|
+
blockId: _zod.z.string().optional(),
|
|
3281
|
+
resolved: _zod.z.boolean(),
|
|
3282
|
+
createdAt: _zod.z.coerce.date(),
|
|
3283
|
+
updatedAt: _zod.z.coerce.date()
|
|
3284
|
+
});
|
|
3284
3285
|
var DesignElementSnapshotReason = _zod.z.enum(["Publish", "Deletion"]);
|
|
3285
3286
|
var DesignElementSnapshotBase = _zod.z.object({
|
|
3286
3287
|
id: _zod.z.string(),
|