@supernova-studio/model 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +17 -17
- package/dist/index.d.ts +17 -17
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1142 -1139
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/helpers/db.ts +59 -0
package/dist/index.mjs
CHANGED
|
@@ -354,7 +354,7 @@ var ImportJob = Entity.extend({
|
|
|
354
354
|
});
|
|
355
355
|
|
|
356
356
|
// src/dsm/data-sources/import-summary.ts
|
|
357
|
-
import { z as
|
|
357
|
+
import { z as z83 } from "zod";
|
|
358
358
|
|
|
359
359
|
// src/dsm/elements/data/base.ts
|
|
360
360
|
import { z as z18 } from "zod";
|
|
@@ -457,7 +457,7 @@ var ComponentElementData = z26.object({
|
|
|
457
457
|
});
|
|
458
458
|
|
|
459
459
|
// src/dsm/elements/data/documentation-block-v1.ts
|
|
460
|
-
import { z as
|
|
460
|
+
import { z as z33 } from "zod";
|
|
461
461
|
|
|
462
462
|
// src/dsm/elements/raw-element.ts
|
|
463
463
|
import { z as z27 } from "zod";
|
|
@@ -611,6 +611,9 @@ var SizeOrUndefined = Size.optional().transform((v) => {
|
|
|
611
611
|
});
|
|
612
612
|
|
|
613
613
|
// src/helpers/db.ts
|
|
614
|
+
import {
|
|
615
|
+
z as z32
|
|
616
|
+
} from "zod";
|
|
614
617
|
function zodCreateInputOmit() {
|
|
615
618
|
return {
|
|
616
619
|
id: true,
|
|
@@ -633,8 +636,8 @@ function nullishToOptional(type) {
|
|
|
633
636
|
}
|
|
634
637
|
|
|
635
638
|
// src/dsm/elements/data/documentation-block-v1.ts
|
|
636
|
-
var PageBlockCalloutType =
|
|
637
|
-
var PageBlockTypeV1 =
|
|
639
|
+
var PageBlockCalloutType = z33.enum(["Info", "Primary", "Success", "Warning", "Error"]);
|
|
640
|
+
var PageBlockTypeV1 = z33.enum([
|
|
638
641
|
"Text",
|
|
639
642
|
"Heading",
|
|
640
643
|
"Code",
|
|
@@ -667,7 +670,7 @@ var PageBlockTypeV1 = z32.enum([
|
|
|
667
670
|
"TableRow",
|
|
668
671
|
"TableCell"
|
|
669
672
|
]);
|
|
670
|
-
var PageBlockCodeLanguage =
|
|
673
|
+
var PageBlockCodeLanguage = z33.enum([
|
|
671
674
|
"Angular",
|
|
672
675
|
"Bash",
|
|
673
676
|
"C",
|
|
@@ -701,68 +704,68 @@ var PageBlockCodeLanguage = z32.enum([
|
|
|
701
704
|
"XML",
|
|
702
705
|
"YAML"
|
|
703
706
|
]);
|
|
704
|
-
var PageBlockAlignment =
|
|
705
|
-
var PageBlockThemeType =
|
|
706
|
-
var PageBlockAssetType =
|
|
707
|
-
var PageBlockTilesAlignment =
|
|
708
|
-
var PageBlockTilesLayout =
|
|
709
|
-
var PageBlockTheme =
|
|
710
|
-
themeIds:
|
|
707
|
+
var PageBlockAlignment = z33.enum(["Left", "Center", "Stretch", "Right"]);
|
|
708
|
+
var PageBlockThemeType = z33.enum(["Override", "Comparison"]);
|
|
709
|
+
var PageBlockAssetType = z33.enum(["image", "figmaFrame"]);
|
|
710
|
+
var PageBlockTilesAlignment = z33.enum(["Center", "FrameHeight"]);
|
|
711
|
+
var PageBlockTilesLayout = z33.enum(["C8", "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C1_75"]);
|
|
712
|
+
var PageBlockTheme = z33.object({
|
|
713
|
+
themeIds: z33.array(z33.string()),
|
|
711
714
|
type: PageBlockThemeType
|
|
712
715
|
});
|
|
713
|
-
var PageBlockUrlPreview =
|
|
714
|
-
title: nullishToOptional(
|
|
715
|
-
description: nullishToOptional(
|
|
716
|
-
thumbnailUrl: nullishToOptional(
|
|
717
|
-
});
|
|
718
|
-
var PageBlockFrameOrigin =
|
|
719
|
-
sourceFileName: nullishToOptional(
|
|
720
|
-
title: nullishToOptional(
|
|
721
|
-
previewUrl: nullishToOptional(
|
|
722
|
-
valid: nullishToOptional(
|
|
723
|
-
referenceId: nullishToOptional(
|
|
724
|
-
assetId: nullishToOptional(
|
|
725
|
-
assetScale: nullishToOptional(
|
|
726
|
-
width: nullishToOptional(
|
|
727
|
-
height: nullishToOptional(
|
|
728
|
-
});
|
|
729
|
-
var PageBlockFrame =
|
|
730
|
-
persistentId:
|
|
731
|
-
sourceId:
|
|
732
|
-
sourceFrameId:
|
|
733
|
-
title: nullishToOptional(
|
|
734
|
-
description: nullishToOptional(
|
|
716
|
+
var PageBlockUrlPreview = z33.object({
|
|
717
|
+
title: nullishToOptional(z33.string()),
|
|
718
|
+
description: nullishToOptional(z33.string()),
|
|
719
|
+
thumbnailUrl: nullishToOptional(z33.string())
|
|
720
|
+
});
|
|
721
|
+
var PageBlockFrameOrigin = z33.object({
|
|
722
|
+
sourceFileName: nullishToOptional(z33.string()),
|
|
723
|
+
title: nullishToOptional(z33.string()),
|
|
724
|
+
previewUrl: nullishToOptional(z33.string()),
|
|
725
|
+
valid: nullishToOptional(z33.boolean()),
|
|
726
|
+
referenceId: nullishToOptional(z33.string()),
|
|
727
|
+
assetId: nullishToOptional(z33.string()),
|
|
728
|
+
assetScale: nullishToOptional(z33.number()),
|
|
729
|
+
width: nullishToOptional(z33.number()),
|
|
730
|
+
height: nullishToOptional(z33.number())
|
|
731
|
+
});
|
|
732
|
+
var PageBlockFrame = z33.object({
|
|
733
|
+
persistentId: z33.string(),
|
|
734
|
+
sourceId: z33.string(),
|
|
735
|
+
sourceFrameId: z33.string(),
|
|
736
|
+
title: nullishToOptional(z33.string()),
|
|
737
|
+
description: nullishToOptional(z33.string()),
|
|
735
738
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
736
739
|
origin: nullishToOptional(PageBlockFrameOrigin)
|
|
737
740
|
});
|
|
738
|
-
var PageBlockAsset =
|
|
741
|
+
var PageBlockAsset = z33.object({
|
|
739
742
|
type: PageBlockAssetType,
|
|
740
|
-
id: nullishToOptional(
|
|
741
|
-
url: nullishToOptional(
|
|
743
|
+
id: nullishToOptional(z33.string()),
|
|
744
|
+
url: nullishToOptional(z33.string()),
|
|
742
745
|
figmaFrame: nullishToOptional(PageBlockFrame)
|
|
743
746
|
});
|
|
744
|
-
var PageBlockLinkPreview =
|
|
745
|
-
title: nullishToOptional(
|
|
746
|
-
valid: nullishToOptional(
|
|
747
|
+
var PageBlockLinkPreview = z33.object({
|
|
748
|
+
title: nullishToOptional(z33.string()),
|
|
749
|
+
valid: nullishToOptional(z33.boolean())
|
|
747
750
|
});
|
|
748
|
-
var PageBlockShortcut =
|
|
749
|
-
persistentId:
|
|
750
|
-
title: nullishToOptional(
|
|
751
|
-
description: nullishToOptional(
|
|
751
|
+
var PageBlockShortcut = z33.object({
|
|
752
|
+
persistentId: z33.string(),
|
|
753
|
+
title: nullishToOptional(z33.string()),
|
|
754
|
+
description: nullishToOptional(z33.string()),
|
|
752
755
|
asset: nullishToOptional(PageBlockAsset),
|
|
753
|
-
documentationItemId: nullishToOptional(
|
|
754
|
-
url: nullishToOptional(
|
|
756
|
+
documentationItemId: nullishToOptional(z33.string()),
|
|
757
|
+
url: nullishToOptional(z33.string()),
|
|
755
758
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
756
759
|
documentationItemPreview: nullishToOptional(PageBlockLinkPreview)
|
|
757
760
|
});
|
|
758
|
-
var PageBlockCustomBlockPropertyImageValue =
|
|
761
|
+
var PageBlockCustomBlockPropertyImageValue = z33.object({
|
|
759
762
|
asset: nullishToOptional(PageBlockAsset),
|
|
760
|
-
assetId: nullishToOptional(
|
|
761
|
-
assetUrl: nullishToOptional(
|
|
763
|
+
assetId: nullishToOptional(z33.string()),
|
|
764
|
+
assetUrl: nullishToOptional(z33.string())
|
|
762
765
|
});
|
|
763
|
-
var PageBlockCustomBlockPropertyValue =
|
|
764
|
-
key:
|
|
765
|
-
value:
|
|
766
|
+
var PageBlockCustomBlockPropertyValue = z33.object({
|
|
767
|
+
key: z33.string(),
|
|
768
|
+
value: z33.any()
|
|
766
769
|
// TODO Artem: for some reason there are cases when there's an array here in the DB
|
|
767
770
|
// e.g. element id 67451 in the dev db
|
|
768
771
|
// value: z
|
|
@@ -773,99 +776,99 @@ var PageBlockCustomBlockPropertyValue = z32.object({
|
|
|
773
776
|
// .or(TypographyTokenData)
|
|
774
777
|
// .or(PageBlockCustomBlockPropertyImageValue),
|
|
775
778
|
});
|
|
776
|
-
var PageBlockFigmaFrameProperties =
|
|
779
|
+
var PageBlockFigmaFrameProperties = z33.object({
|
|
777
780
|
color: nullishToOptional(
|
|
778
|
-
|
|
779
|
-
value:
|
|
781
|
+
z33.object({
|
|
782
|
+
value: z33.string()
|
|
780
783
|
})
|
|
781
784
|
),
|
|
782
785
|
alignment: PageBlockTilesAlignment,
|
|
783
786
|
layout: PageBlockTilesLayout,
|
|
784
787
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
785
|
-
showTitles:
|
|
788
|
+
showTitles: z33.boolean()
|
|
786
789
|
});
|
|
787
|
-
var PageBlockRenderCodeProperties =
|
|
788
|
-
showCode:
|
|
790
|
+
var PageBlockRenderCodeProperties = z33.object({
|
|
791
|
+
showCode: z33.boolean()
|
|
789
792
|
});
|
|
790
|
-
var PageBlockAssetComponent =
|
|
791
|
-
persistentId:
|
|
792
|
-
componentAssetId:
|
|
793
|
-
title: nullishToOptional(
|
|
794
|
-
description: nullishToOptional(
|
|
793
|
+
var PageBlockAssetComponent = z33.object({
|
|
794
|
+
persistentId: z33.string(),
|
|
795
|
+
componentAssetId: z33.string(),
|
|
796
|
+
title: nullishToOptional(z33.string()),
|
|
797
|
+
description: nullishToOptional(z33.string()),
|
|
795
798
|
backgroundColor: nullishToOptional(ColorTokenInlineData)
|
|
796
799
|
});
|
|
797
|
-
var PageBlockTableColumn =
|
|
798
|
-
id:
|
|
800
|
+
var PageBlockTableColumn = z33.object({
|
|
801
|
+
id: z33.string(),
|
|
799
802
|
width: DimensionTokenData
|
|
800
803
|
});
|
|
801
|
-
var PageBlockTableProperties =
|
|
802
|
-
showBorders:
|
|
803
|
-
showHeaderRow:
|
|
804
|
-
showHeaderColumn:
|
|
805
|
-
columns:
|
|
804
|
+
var PageBlockTableProperties = z33.object({
|
|
805
|
+
showBorders: z33.boolean(),
|
|
806
|
+
showHeaderRow: z33.boolean(),
|
|
807
|
+
showHeaderColumn: z33.boolean(),
|
|
808
|
+
columns: z33.array(PageBlockTableColumn)
|
|
806
809
|
});
|
|
807
|
-
var PageBlockTextSpanAttributeType =
|
|
808
|
-
var PageBlockTextSpanAttribute =
|
|
810
|
+
var PageBlockTextSpanAttributeType = z33.enum(["Bold", "Italic", "Link", "Strikethrough", "Code"]);
|
|
811
|
+
var PageBlockTextSpanAttribute = z33.object({
|
|
809
812
|
type: PageBlockTextSpanAttributeType,
|
|
810
|
-
link: nullishToOptional(
|
|
811
|
-
documentationItemId: nullishToOptional(
|
|
812
|
-
openInNewWindow: nullishToOptional(
|
|
813
|
+
link: nullishToOptional(z33.string()),
|
|
814
|
+
documentationItemId: nullishToOptional(z33.string()),
|
|
815
|
+
openInNewWindow: nullishToOptional(z33.boolean())
|
|
813
816
|
});
|
|
814
|
-
var PageBlockTextSpan =
|
|
815
|
-
text:
|
|
816
|
-
attributes:
|
|
817
|
+
var PageBlockTextSpan = z33.object({
|
|
818
|
+
text: z33.string(),
|
|
819
|
+
attributes: z33.array(PageBlockTextSpanAttribute)
|
|
817
820
|
});
|
|
818
|
-
var PageBlockText =
|
|
819
|
-
spans:
|
|
821
|
+
var PageBlockText = z33.object({
|
|
822
|
+
spans: z33.array(PageBlockTextSpan)
|
|
820
823
|
});
|
|
821
|
-
var PageBlockBaseV1 =
|
|
822
|
-
persistentId:
|
|
824
|
+
var PageBlockBaseV1 = z33.object({
|
|
825
|
+
persistentId: z33.string(),
|
|
823
826
|
type: PageBlockTypeV1,
|
|
824
827
|
// Element linking
|
|
825
|
-
designObjectId: nullishToOptional(
|
|
826
|
-
designObjectIds: nullishToOptional(
|
|
827
|
-
tokenType: nullishToOptional(DesignTokenType.or(
|
|
828
|
-
showNestedGroups: nullishToOptional(
|
|
829
|
-
brandId: nullishToOptional(
|
|
828
|
+
designObjectId: nullishToOptional(z33.string()),
|
|
829
|
+
designObjectIds: nullishToOptional(z33.array(z33.string())),
|
|
830
|
+
tokenType: nullishToOptional(DesignTokenType.or(z33.literal("Font"))),
|
|
831
|
+
showNestedGroups: nullishToOptional(z33.boolean()),
|
|
832
|
+
brandId: nullishToOptional(z33.string()),
|
|
830
833
|
// Rich text
|
|
831
834
|
text: nullishToOptional(PageBlockText),
|
|
832
|
-
caption: nullishToOptional(
|
|
833
|
-
headingType: nullishToOptional(
|
|
835
|
+
caption: nullishToOptional(z33.string()),
|
|
836
|
+
headingType: nullishToOptional(z33.number().min(1).max(3)),
|
|
834
837
|
codeLanguage: nullishToOptional(PageBlockCodeLanguage),
|
|
835
838
|
calloutType: nullishToOptional(PageBlockCalloutType),
|
|
836
|
-
urlInput: nullishToOptional(
|
|
837
|
-
url: nullishToOptional(
|
|
839
|
+
urlInput: nullishToOptional(z33.string()),
|
|
840
|
+
url: nullishToOptional(z33.string()),
|
|
838
841
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
839
842
|
// Image
|
|
840
843
|
asset: nullishToOptional(PageBlockAsset),
|
|
841
844
|
alignment: nullishToOptional(PageBlockAlignment),
|
|
842
845
|
// Shortcuts block
|
|
843
|
-
shortcuts: nullishToOptional(
|
|
846
|
+
shortcuts: nullishToOptional(z33.array(PageBlockShortcut)),
|
|
844
847
|
// Custom blocks
|
|
845
|
-
customBlockKey: nullishToOptional(
|
|
846
|
-
customBlockProperties: nullishToOptional(
|
|
847
|
-
variantKey: nullishToOptional(
|
|
848
|
+
customBlockKey: nullishToOptional(z33.string()),
|
|
849
|
+
customBlockProperties: nullishToOptional(z33.array(PageBlockCustomBlockPropertyValue)),
|
|
850
|
+
variantKey: nullishToOptional(z33.string()),
|
|
848
851
|
// Figma frames
|
|
849
852
|
figmaFrameProperties: nullishToOptional(PageBlockFigmaFrameProperties),
|
|
850
|
-
figmaFrames: nullishToOptional(
|
|
853
|
+
figmaFrames: nullishToOptional(z33.array(PageBlockFrame)),
|
|
851
854
|
// Generic
|
|
852
855
|
size: nullishToOptional(Size),
|
|
853
856
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
854
857
|
// Render code
|
|
855
858
|
renderCodeProperties: nullishToOptional(PageBlockRenderCodeProperties),
|
|
856
859
|
// Component assets
|
|
857
|
-
componentAssets: nullishToOptional(
|
|
860
|
+
componentAssets: nullishToOptional(z33.array(PageBlockAssetComponent)),
|
|
858
861
|
// Tables
|
|
859
862
|
tableProperties: nullishToOptional(PageBlockTableProperties),
|
|
860
|
-
columnId: nullishToOptional(
|
|
863
|
+
columnId: nullishToOptional(z33.string()),
|
|
861
864
|
// Token spreadsheet
|
|
862
865
|
theme: nullishToOptional(PageBlockTheme),
|
|
863
|
-
blacklistedElementProperties: nullishToOptional(
|
|
866
|
+
blacklistedElementProperties: nullishToOptional(z33.array(z33.string())),
|
|
864
867
|
// Arbitrary
|
|
865
|
-
userMetadata: nullishToOptional(
|
|
868
|
+
userMetadata: nullishToOptional(z33.string())
|
|
866
869
|
});
|
|
867
870
|
var PageBlockV1 = PageBlockBaseV1.extend({
|
|
868
|
-
children:
|
|
871
|
+
children: z33.lazy(
|
|
869
872
|
() => PageBlockV1.array().nullish().transform((t) => t ?? [])
|
|
870
873
|
)
|
|
871
874
|
});
|
|
@@ -877,235 +880,235 @@ function traversePageBlocksV1(blocks, action) {
|
|
|
877
880
|
}
|
|
878
881
|
|
|
879
882
|
// src/dsm/elements/data/documentation-block-v2.ts
|
|
880
|
-
import { z as
|
|
881
|
-
var PageBlockLinkType =
|
|
882
|
-
var PageBlockImageType =
|
|
883
|
-
var PageBlockImageAlignment =
|
|
884
|
-
var PageBlockTableCellAlignment =
|
|
885
|
-
var PageBlockPreviewContainerSize =
|
|
886
|
-
var PageBlockThemeDisplayMode =
|
|
887
|
-
var PageBlockColorV2 =
|
|
888
|
-
value:
|
|
889
|
-
referencedTokenId:
|
|
890
|
-
});
|
|
891
|
-
var PageBlockAppearanceV2 =
|
|
883
|
+
import { z as z34 } from "zod";
|
|
884
|
+
var PageBlockLinkType = z34.enum(["DocumentationItem", "PageHeading", "Url"]);
|
|
885
|
+
var PageBlockImageType = z34.enum(["Upload", "Asset", "FigmaNode"]);
|
|
886
|
+
var PageBlockImageAlignment = z34.enum(["Left", "Center", "Stretch"]);
|
|
887
|
+
var PageBlockTableCellAlignment = z34.enum(["Left", "Center", "Right"]);
|
|
888
|
+
var PageBlockPreviewContainerSize = z34.enum(["Centered", "NaturalHeight"]);
|
|
889
|
+
var PageBlockThemeDisplayMode = z34.enum(["Split", "Override"]);
|
|
890
|
+
var PageBlockColorV2 = z34.object({
|
|
891
|
+
value: z34.string(),
|
|
892
|
+
referencedTokenId: z34.string().optional()
|
|
893
|
+
});
|
|
894
|
+
var PageBlockAppearanceV2 = z34.object({
|
|
892
895
|
itemBackgroundColor: PageBlockColorV2.optional(),
|
|
893
|
-
numberOfColumns:
|
|
896
|
+
numberOfColumns: z34.number().optional()
|
|
894
897
|
});
|
|
895
|
-
var PageBlockItemUntypedValue =
|
|
896
|
-
value:
|
|
897
|
-
}).and(
|
|
898
|
-
var PageBlockLinkV2 =
|
|
898
|
+
var PageBlockItemUntypedValue = z34.object({
|
|
899
|
+
value: z34.any()
|
|
900
|
+
}).and(z34.record(z34.any()));
|
|
901
|
+
var PageBlockLinkV2 = z34.object({
|
|
899
902
|
type: PageBlockLinkType,
|
|
900
|
-
documentationItemId:
|
|
901
|
-
pageHeadingId:
|
|
902
|
-
url:
|
|
903
|
-
openInNewTab:
|
|
903
|
+
documentationItemId: z34.string().optional(),
|
|
904
|
+
pageHeadingId: z34.string().optional(),
|
|
905
|
+
url: z34.string().optional(),
|
|
906
|
+
openInNewTab: z34.boolean().optional()
|
|
904
907
|
});
|
|
905
|
-
var PageBlockItemV2 =
|
|
906
|
-
id:
|
|
908
|
+
var PageBlockItemV2 = z34.object({
|
|
909
|
+
id: z34.string(),
|
|
907
910
|
linksTo: PageBlockLinkV2.optional(),
|
|
908
|
-
props:
|
|
911
|
+
props: z34.record(PageBlockItemUntypedValue)
|
|
909
912
|
});
|
|
910
|
-
var PageBlockDataV2 =
|
|
911
|
-
packageId:
|
|
912
|
-
variantId:
|
|
913
|
-
indentLevel:
|
|
913
|
+
var PageBlockDataV2 = z34.object({
|
|
914
|
+
packageId: z34.string(),
|
|
915
|
+
variantId: z34.string().optional(),
|
|
916
|
+
indentLevel: z34.number(),
|
|
914
917
|
appearance: PageBlockAppearanceV2.optional(),
|
|
915
|
-
items:
|
|
918
|
+
items: z34.array(PageBlockItemV2)
|
|
916
919
|
});
|
|
917
|
-
var PageBlockItemImageReference =
|
|
920
|
+
var PageBlockItemImageReference = z34.object({
|
|
918
921
|
type: PageBlockImageType,
|
|
919
|
-
url:
|
|
920
|
-
assetId:
|
|
922
|
+
url: z34.string(),
|
|
923
|
+
assetId: z34.string().optional(),
|
|
921
924
|
size: Size.optional(),
|
|
922
|
-
figmaFile:
|
|
923
|
-
sourceId:
|
|
924
|
-
frameId:
|
|
925
|
-
frameReferenceId:
|
|
926
|
-
origin:
|
|
927
|
-
title:
|
|
928
|
-
sourceFileName:
|
|
925
|
+
figmaFile: z34.object({
|
|
926
|
+
sourceId: z34.string(),
|
|
927
|
+
frameId: z34.string(),
|
|
928
|
+
frameReferenceId: z34.string(),
|
|
929
|
+
origin: z34.object({
|
|
930
|
+
title: z34.string().optional(),
|
|
931
|
+
sourceFileName: z34.string().optional()
|
|
929
932
|
})
|
|
930
933
|
}).optional()
|
|
931
934
|
});
|
|
932
|
-
var PageBlockItemAssetValue =
|
|
933
|
-
selectedPropertyIds:
|
|
934
|
-
showSearch:
|
|
935
|
+
var PageBlockItemAssetValue = z34.object({
|
|
936
|
+
selectedPropertyIds: z34.array(z34.string()).optional(),
|
|
937
|
+
showSearch: z34.boolean().optional(),
|
|
935
938
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
936
939
|
backgroundColor: PageBlockColorV2.optional(),
|
|
937
|
-
value:
|
|
938
|
-
|
|
939
|
-
entityId:
|
|
940
|
-
entityType:
|
|
941
|
-
entityMeta:
|
|
942
|
-
title:
|
|
943
|
-
description:
|
|
940
|
+
value: z34.array(
|
|
941
|
+
z34.object({
|
|
942
|
+
entityId: z34.string(),
|
|
943
|
+
entityType: z34.enum(["Asset", "AssetGroup"]),
|
|
944
|
+
entityMeta: z34.object({
|
|
945
|
+
title: z34.string().optional(),
|
|
946
|
+
description: z34.string().optional()
|
|
944
947
|
}).optional()
|
|
945
948
|
})
|
|
946
949
|
)
|
|
947
950
|
});
|
|
948
|
-
var PageBlockItemAssetPropertyValue =
|
|
949
|
-
value:
|
|
951
|
+
var PageBlockItemAssetPropertyValue = z34.object({
|
|
952
|
+
value: z34.array(z34.string())
|
|
950
953
|
});
|
|
951
|
-
var PageBlockItemBooleanValue =
|
|
952
|
-
value:
|
|
954
|
+
var PageBlockItemBooleanValue = z34.object({
|
|
955
|
+
value: z34.boolean()
|
|
953
956
|
});
|
|
954
|
-
var PageBlockItemCodeValue =
|
|
957
|
+
var PageBlockItemCodeValue = z34.object({
|
|
955
958
|
format: PageBlockCodeLanguage.optional(),
|
|
956
|
-
caption:
|
|
957
|
-
value:
|
|
958
|
-
});
|
|
959
|
-
var PageBlockItemSandboxValue =
|
|
960
|
-
showCode:
|
|
961
|
-
backgroundColor:
|
|
962
|
-
alignPreview:
|
|
963
|
-
previewHeight:
|
|
964
|
-
value:
|
|
965
|
-
});
|
|
966
|
-
var PageBlockItemColorValue =
|
|
967
|
-
var PageBlockItemComponentValue =
|
|
968
|
-
selectedPropertyIds:
|
|
969
|
-
value:
|
|
970
|
-
|
|
971
|
-
entityId:
|
|
972
|
-
entityType:
|
|
959
|
+
caption: z34.string().optional(),
|
|
960
|
+
value: z34.string()
|
|
961
|
+
});
|
|
962
|
+
var PageBlockItemSandboxValue = z34.object({
|
|
963
|
+
showCode: z34.boolean().optional(),
|
|
964
|
+
backgroundColor: z34.string().optional(),
|
|
965
|
+
alignPreview: z34.enum(["Left", "Center"]).optional(),
|
|
966
|
+
previewHeight: z34.number().optional(),
|
|
967
|
+
value: z34.string()
|
|
968
|
+
});
|
|
969
|
+
var PageBlockItemColorValue = z34.record(z34.any());
|
|
970
|
+
var PageBlockItemComponentValue = z34.object({
|
|
971
|
+
selectedPropertyIds: z34.array(z34.string()).optional(),
|
|
972
|
+
value: z34.array(
|
|
973
|
+
z34.object({
|
|
974
|
+
entityId: z34.string(),
|
|
975
|
+
entityType: z34.enum(["Component", "ComponentGroup"])
|
|
973
976
|
})
|
|
974
977
|
)
|
|
975
978
|
});
|
|
976
|
-
var PageBlockItemComponentPropertyValue =
|
|
977
|
-
value:
|
|
979
|
+
var PageBlockItemComponentPropertyValue = z34.object({
|
|
980
|
+
value: z34.string()
|
|
978
981
|
});
|
|
979
|
-
var PageBlockItemDividerValue =
|
|
980
|
-
var PageBlockItemEmbedValue =
|
|
981
|
-
value:
|
|
982
|
-
caption:
|
|
983
|
-
height:
|
|
982
|
+
var PageBlockItemDividerValue = z34.object({});
|
|
983
|
+
var PageBlockItemEmbedValue = z34.object({
|
|
984
|
+
value: z34.string().optional(),
|
|
985
|
+
caption: z34.string().optional(),
|
|
986
|
+
height: z34.number().optional()
|
|
984
987
|
});
|
|
985
|
-
var PageBlockItemFigmaNodeValue =
|
|
986
|
-
selectedPropertyIds:
|
|
987
|
-
showSearch:
|
|
988
|
+
var PageBlockItemFigmaNodeValue = z34.object({
|
|
989
|
+
selectedPropertyIds: z34.array(z34.string()).optional(),
|
|
990
|
+
showSearch: z34.boolean().optional(),
|
|
988
991
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
989
|
-
backgroundColor:
|
|
990
|
-
value:
|
|
991
|
-
|
|
992
|
-
entityId:
|
|
993
|
-
entityMeta:
|
|
994
|
-
title:
|
|
995
|
-
description:
|
|
992
|
+
backgroundColor: z34.string().optional(),
|
|
993
|
+
value: z34.array(
|
|
994
|
+
z34.object({
|
|
995
|
+
entityId: z34.string(),
|
|
996
|
+
entityMeta: z34.object({
|
|
997
|
+
title: z34.string().optional(),
|
|
998
|
+
description: z34.string().optional()
|
|
996
999
|
}).optional()
|
|
997
1000
|
})
|
|
998
1001
|
)
|
|
999
1002
|
});
|
|
1000
|
-
var PageBlockItemImageValue =
|
|
1001
|
-
alt:
|
|
1002
|
-
caption:
|
|
1003
|
+
var PageBlockItemImageValue = z34.object({
|
|
1004
|
+
alt: z34.string().optional(),
|
|
1005
|
+
caption: z34.string().optional(),
|
|
1003
1006
|
alignment: PageBlockImageAlignment.optional(),
|
|
1004
1007
|
value: PageBlockItemImageReference.optional()
|
|
1005
1008
|
});
|
|
1006
|
-
var PageBlockItemMarkdownValue =
|
|
1007
|
-
value:
|
|
1009
|
+
var PageBlockItemMarkdownValue = z34.object({
|
|
1010
|
+
value: z34.string()
|
|
1008
1011
|
});
|
|
1009
|
-
var PageBlockItemMultiRichTextValue =
|
|
1012
|
+
var PageBlockItemMultiRichTextValue = z34.object({
|
|
1010
1013
|
value: PageBlockText.array()
|
|
1011
1014
|
});
|
|
1012
|
-
var PageBlockItemMultiSelectValue =
|
|
1013
|
-
value:
|
|
1015
|
+
var PageBlockItemMultiSelectValue = z34.object({
|
|
1016
|
+
value: z34.array(z34.string())
|
|
1014
1017
|
});
|
|
1015
|
-
var PageBlockItemNumberValue =
|
|
1016
|
-
value:
|
|
1018
|
+
var PageBlockItemNumberValue = z34.object({
|
|
1019
|
+
value: z34.number()
|
|
1017
1020
|
});
|
|
1018
|
-
var PageBlockItemRichTextValue =
|
|
1021
|
+
var PageBlockItemRichTextValue = z34.object({
|
|
1019
1022
|
value: PageBlockText,
|
|
1020
1023
|
calloutType: PageBlockCalloutType.optional()
|
|
1021
1024
|
});
|
|
1022
|
-
var PageBlockItemSingleSelectValue =
|
|
1023
|
-
value:
|
|
1025
|
+
var PageBlockItemSingleSelectValue = z34.object({
|
|
1026
|
+
value: z34.string()
|
|
1024
1027
|
});
|
|
1025
|
-
var PageBlockItemStorybookValue =
|
|
1026
|
-
caption:
|
|
1027
|
-
height:
|
|
1028
|
-
showAddons:
|
|
1029
|
-
value:
|
|
1028
|
+
var PageBlockItemStorybookValue = z34.object({
|
|
1029
|
+
caption: z34.string().optional(),
|
|
1030
|
+
height: z34.number().optional(),
|
|
1031
|
+
showAddons: z34.boolean().optional(),
|
|
1032
|
+
value: z34.string()
|
|
1030
1033
|
});
|
|
1031
|
-
var PageBlockItemTextValue =
|
|
1032
|
-
value:
|
|
1034
|
+
var PageBlockItemTextValue = z34.object({
|
|
1035
|
+
value: z34.string()
|
|
1033
1036
|
});
|
|
1034
|
-
var PageBlockItemTokenValue =
|
|
1035
|
-
selectedPropertyIds:
|
|
1036
|
-
selectedThemeIds:
|
|
1037
|
+
var PageBlockItemTokenValue = z34.object({
|
|
1038
|
+
selectedPropertyIds: z34.array(z34.string()).optional(),
|
|
1039
|
+
selectedThemeIds: z34.array(z34.string()).optional(),
|
|
1037
1040
|
themeDisplayMode: PageBlockThemeDisplayMode.optional(),
|
|
1038
|
-
value:
|
|
1039
|
-
|
|
1040
|
-
entityId:
|
|
1041
|
-
entityType:
|
|
1042
|
-
entityMeta:
|
|
1043
|
-
showNestedGroups:
|
|
1041
|
+
value: z34.array(
|
|
1042
|
+
z34.object({
|
|
1043
|
+
entityId: z34.string(),
|
|
1044
|
+
entityType: z34.enum(["Token", "TokenGroup"]),
|
|
1045
|
+
entityMeta: z34.object({
|
|
1046
|
+
showNestedGroups: z34.boolean().optional()
|
|
1044
1047
|
}).optional()
|
|
1045
1048
|
})
|
|
1046
1049
|
)
|
|
1047
1050
|
});
|
|
1048
|
-
var PageBlockItemTokenPropertyValue =
|
|
1049
|
-
selectedPropertyIds:
|
|
1050
|
-
selectedThemeIds:
|
|
1051
|
-
value:
|
|
1051
|
+
var PageBlockItemTokenPropertyValue = z34.object({
|
|
1052
|
+
selectedPropertyIds: z34.array(z34.string()).optional(),
|
|
1053
|
+
selectedThemeIds: z34.array(z34.string()).optional(),
|
|
1054
|
+
value: z34.array(z34.string())
|
|
1052
1055
|
});
|
|
1053
|
-
var PageBlockItemTokenTypeValue =
|
|
1054
|
-
value:
|
|
1056
|
+
var PageBlockItemTokenTypeValue = z34.object({
|
|
1057
|
+
value: z34.array(DesignTokenType)
|
|
1055
1058
|
});
|
|
1056
|
-
var PageBlockItemUrlValue =
|
|
1057
|
-
value:
|
|
1059
|
+
var PageBlockItemUrlValue = z34.object({
|
|
1060
|
+
value: z34.string()
|
|
1058
1061
|
});
|
|
1059
|
-
var PageBlockItemTableRichTextNode =
|
|
1060
|
-
type:
|
|
1062
|
+
var PageBlockItemTableRichTextNode = z34.object({
|
|
1063
|
+
type: z34.literal("RichText"),
|
|
1061
1064
|
value: PageBlockItemRichTextValue.shape.value
|
|
1062
1065
|
});
|
|
1063
|
-
var PageBlockItemTableMultiRichTextNode =
|
|
1064
|
-
type:
|
|
1066
|
+
var PageBlockItemTableMultiRichTextNode = z34.object({
|
|
1067
|
+
type: z34.literal("MultiRichText"),
|
|
1065
1068
|
value: PageBlockItemMultiRichTextValue.shape.value
|
|
1066
1069
|
});
|
|
1067
|
-
var PageBlockItemTableImageNode =
|
|
1068
|
-
type:
|
|
1070
|
+
var PageBlockItemTableImageNode = z34.object({
|
|
1071
|
+
type: z34.literal("Image"),
|
|
1069
1072
|
caption: PageBlockItemImageValue.shape.caption,
|
|
1070
1073
|
value: PageBlockItemImageValue.shape.value
|
|
1071
1074
|
});
|
|
1072
|
-
var PageBlockItemTableNode =
|
|
1075
|
+
var PageBlockItemTableNode = z34.discriminatedUnion("type", [
|
|
1073
1076
|
PageBlockItemTableRichTextNode,
|
|
1074
1077
|
// PageBlockItemTableMultiRichTextNode,
|
|
1075
1078
|
PageBlockItemTableImageNode
|
|
1076
1079
|
]);
|
|
1077
|
-
var PageBlockItemTableCell =
|
|
1078
|
-
id:
|
|
1079
|
-
nodes:
|
|
1080
|
-
columnWidth:
|
|
1080
|
+
var PageBlockItemTableCell = z34.object({
|
|
1081
|
+
id: z34.string(),
|
|
1082
|
+
nodes: z34.array(PageBlockItemTableNode),
|
|
1083
|
+
columnWidth: z34.number().optional(),
|
|
1081
1084
|
alignment: PageBlockTableCellAlignment
|
|
1082
1085
|
});
|
|
1083
|
-
var PageBlockItemTableRow =
|
|
1084
|
-
cells:
|
|
1086
|
+
var PageBlockItemTableRow = z34.object({
|
|
1087
|
+
cells: z34.array(PageBlockItemTableCell)
|
|
1085
1088
|
});
|
|
1086
|
-
var PageBlockItemTableValue =
|
|
1087
|
-
highlightHeaderColumn:
|
|
1088
|
-
highlightHeaderRow:
|
|
1089
|
-
showBorder:
|
|
1090
|
-
value:
|
|
1089
|
+
var PageBlockItemTableValue = z34.object({
|
|
1090
|
+
highlightHeaderColumn: z34.boolean().optional(),
|
|
1091
|
+
highlightHeaderRow: z34.boolean().optional(),
|
|
1092
|
+
showBorder: z34.boolean().optional(),
|
|
1093
|
+
value: z34.array(PageBlockItemTableRow)
|
|
1091
1094
|
});
|
|
1092
1095
|
|
|
1093
1096
|
// src/dsm/elements/data/documentation-page-v1.ts
|
|
1094
|
-
import { z as
|
|
1097
|
+
import { z as z39 } from "zod";
|
|
1095
1098
|
|
|
1096
1099
|
// src/dsm/elements/data/documentation.ts
|
|
1097
|
-
import { z as
|
|
1100
|
+
import { z as z38 } from "zod";
|
|
1098
1101
|
|
|
1099
1102
|
// src/dsm/elements/data/item-header.ts
|
|
1100
|
-
import { z as
|
|
1103
|
+
import { z as z37 } from "zod";
|
|
1101
1104
|
|
|
1102
1105
|
// src/dsm/elements/data/page-asset.ts
|
|
1103
|
-
import { z as
|
|
1106
|
+
import { z as z36 } from "zod";
|
|
1104
1107
|
|
|
1105
1108
|
// src/dsm/elements/data/safe-id.ts
|
|
1106
|
-
import { z as
|
|
1109
|
+
import { z as z35 } from "zod";
|
|
1107
1110
|
var RESERVED_OBJECT_ID_PREFIX = "x-sn-reserved-";
|
|
1108
|
-
var SafeIdSchema =
|
|
1111
|
+
var SafeIdSchema = z35.string().refine(
|
|
1109
1112
|
(value) => {
|
|
1110
1113
|
return !value.startsWith(RESERVED_OBJECT_ID_PREFIX);
|
|
1111
1114
|
},
|
|
@@ -1115,18 +1118,18 @@ var SafeIdSchema = z34.string().refine(
|
|
|
1115
1118
|
);
|
|
1116
1119
|
|
|
1117
1120
|
// src/dsm/elements/data/page-asset.ts
|
|
1118
|
-
var DocumentationPageAssetType =
|
|
1119
|
-
var DocumentationPageImageAsset =
|
|
1120
|
-
type:
|
|
1121
|
-
url:
|
|
1121
|
+
var DocumentationPageAssetType = z36.enum(["image", "figmaFrame"]);
|
|
1122
|
+
var DocumentationPageImageAsset = z36.object({
|
|
1123
|
+
type: z36.literal(DocumentationPageAssetType.Enum.image),
|
|
1124
|
+
url: z36.string().optional(),
|
|
1122
1125
|
id: SafeIdSchema
|
|
1123
1126
|
});
|
|
1124
|
-
var DocumentationPageFrameAsset =
|
|
1125
|
-
type:
|
|
1126
|
-
url:
|
|
1127
|
+
var DocumentationPageFrameAsset = z36.object({
|
|
1128
|
+
type: z36.literal(DocumentationPageAssetType.Enum.figmaFrame),
|
|
1129
|
+
url: z36.string().optional(),
|
|
1127
1130
|
figmaFrame: PageBlockFrame
|
|
1128
1131
|
});
|
|
1129
|
-
var DocumentationPageAsset =
|
|
1132
|
+
var DocumentationPageAsset = z36.discriminatedUnion("type", [
|
|
1130
1133
|
DocumentationPageImageAsset,
|
|
1131
1134
|
DocumentationPageFrameAsset
|
|
1132
1135
|
]);
|
|
@@ -1134,20 +1137,20 @@ var DocumentationPageAsset = z35.discriminatedUnion("type", [
|
|
|
1134
1137
|
// src/dsm/elements/data/item-header.ts
|
|
1135
1138
|
var colorValueRegex = /^#[a-f0-9]{8}$/;
|
|
1136
1139
|
var colorValueFormatDescription = "Must match /^#[a-f0-9]{8}$/";
|
|
1137
|
-
var DocumentationItemHeaderAlignmentSchema =
|
|
1138
|
-
var DocumentationItemHeaderImageScaleTypeSchema =
|
|
1140
|
+
var DocumentationItemHeaderAlignmentSchema = z37.enum(["Left", "Center"]);
|
|
1141
|
+
var DocumentationItemHeaderImageScaleTypeSchema = z37.enum(["AspectFill", "AspectFit"]);
|
|
1139
1142
|
var DocumentationItemHeaderAlignment = DocumentationItemHeaderAlignmentSchema.enum;
|
|
1140
1143
|
var DocumentationItemHeaderImageScaleType = DocumentationItemHeaderImageScaleTypeSchema.enum;
|
|
1141
|
-
var DocumentationItemHeader =
|
|
1142
|
-
description:
|
|
1144
|
+
var DocumentationItemHeader = z37.object({
|
|
1145
|
+
description: z37.string(),
|
|
1143
1146
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1144
1147
|
foregroundColor: ColorTokenData.nullish(),
|
|
1145
1148
|
backgroundColor: ColorTokenData.nullish(),
|
|
1146
1149
|
backgroundImageAsset: DocumentationPageAsset.nullish(),
|
|
1147
1150
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1148
|
-
showBackgroundOverlay:
|
|
1149
|
-
showCoverText:
|
|
1150
|
-
minHeight:
|
|
1151
|
+
showBackgroundOverlay: z37.boolean(),
|
|
1152
|
+
showCoverText: z37.boolean(),
|
|
1153
|
+
minHeight: z37.number().nullish()
|
|
1151
1154
|
});
|
|
1152
1155
|
var defaultDocumentationItemHeader = {
|
|
1153
1156
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -1158,8 +1161,8 @@ var defaultDocumentationItemHeader = {
|
|
|
1158
1161
|
};
|
|
1159
1162
|
|
|
1160
1163
|
// src/dsm/elements/data/documentation.ts
|
|
1161
|
-
var DocumentationItemConfiguration =
|
|
1162
|
-
showSidebar:
|
|
1164
|
+
var DocumentationItemConfiguration = z38.object({
|
|
1165
|
+
showSidebar: z38.boolean(),
|
|
1163
1166
|
header: DocumentationItemHeader
|
|
1164
1167
|
});
|
|
1165
1168
|
var defaultDocumentationItemConfiguration = {
|
|
@@ -1168,52 +1171,52 @@ var defaultDocumentationItemConfiguration = {
|
|
|
1168
1171
|
};
|
|
1169
1172
|
|
|
1170
1173
|
// src/dsm/elements/data/documentation-page-v1.ts
|
|
1171
|
-
var DocumentationPageDataV1 =
|
|
1172
|
-
blocks:
|
|
1174
|
+
var DocumentationPageDataV1 = z39.object({
|
|
1175
|
+
blocks: z39.array(PageBlockV1),
|
|
1173
1176
|
configuration: nullishToOptional(DocumentationItemConfiguration)
|
|
1174
1177
|
});
|
|
1175
|
-
var DocumentationPageElementDataV1 =
|
|
1178
|
+
var DocumentationPageElementDataV1 = z39.object({
|
|
1176
1179
|
value: DocumentationPageDataV1
|
|
1177
1180
|
});
|
|
1178
1181
|
|
|
1179
1182
|
// src/dsm/elements/data/documentation-page-v2.ts
|
|
1180
|
-
import { z as
|
|
1181
|
-
var DocumentationPageDataV2 =
|
|
1183
|
+
import { z as z40 } from "zod";
|
|
1184
|
+
var DocumentationPageDataV2 = z40.object({
|
|
1182
1185
|
configuration: nullishToOptional(DocumentationItemConfiguration)
|
|
1183
1186
|
});
|
|
1184
|
-
var DocumentationPageElementDataV2 =
|
|
1187
|
+
var DocumentationPageElementDataV2 = z40.object({
|
|
1185
1188
|
value: DocumentationPageDataV2
|
|
1186
1189
|
});
|
|
1187
1190
|
|
|
1188
1191
|
// src/dsm/elements/data/duration.ts
|
|
1189
|
-
import { z as
|
|
1190
|
-
var DurationUnit =
|
|
1191
|
-
var DurationValue =
|
|
1192
|
+
import { z as z41 } from "zod";
|
|
1193
|
+
var DurationUnit = z41.enum(["Ms"]);
|
|
1194
|
+
var DurationValue = z41.object({
|
|
1192
1195
|
unit: DurationUnit,
|
|
1193
|
-
measure:
|
|
1196
|
+
measure: z41.number()
|
|
1194
1197
|
});
|
|
1195
1198
|
var DurationTokenData = tokenAliasOrValue(DurationValue);
|
|
1196
1199
|
|
|
1197
1200
|
// src/dsm/elements/data/figma-file-structure.ts
|
|
1198
|
-
import { z as
|
|
1199
|
-
var FigmaFileStructureNodeType =
|
|
1200
|
-
var FigmaFileStructureNodeBase =
|
|
1201
|
-
id:
|
|
1202
|
-
name:
|
|
1201
|
+
import { z as z42 } from "zod";
|
|
1202
|
+
var FigmaFileStructureNodeType = z42.enum(["DOCUMENT", "CANVAS", "FRAME", "COMPONENT", "COMPONENT_SET"]);
|
|
1203
|
+
var FigmaFileStructureNodeBase = z42.object({
|
|
1204
|
+
id: z42.string(),
|
|
1205
|
+
name: z42.string(),
|
|
1203
1206
|
type: FigmaFileStructureNodeType,
|
|
1204
1207
|
size: SizeOrUndefined,
|
|
1205
|
-
parentComponentSetId:
|
|
1208
|
+
parentComponentSetId: z42.string().optional()
|
|
1206
1209
|
});
|
|
1207
1210
|
var FigmaFileStructureNode = FigmaFileStructureNodeBase.extend({
|
|
1208
|
-
children:
|
|
1211
|
+
children: z42.lazy(() => FigmaFileStructureNode.array())
|
|
1209
1212
|
});
|
|
1210
|
-
var FigmaFileStructureStatistics =
|
|
1211
|
-
frames:
|
|
1212
|
-
components:
|
|
1213
|
-
componentSets:
|
|
1213
|
+
var FigmaFileStructureStatistics = z42.object({
|
|
1214
|
+
frames: z42.number().nullable().optional().transform((v) => v ?? 0),
|
|
1215
|
+
components: z42.number().nullable().optional().transform((v) => v ?? 0),
|
|
1216
|
+
componentSets: z42.number().nullable().optional().transform((v) => v ?? 0)
|
|
1214
1217
|
});
|
|
1215
|
-
var FigmaFileStructureElementData =
|
|
1216
|
-
value:
|
|
1218
|
+
var FigmaFileStructureElementData = z42.object({
|
|
1219
|
+
value: z42.object({
|
|
1217
1220
|
structure: FigmaFileStructureNode,
|
|
1218
1221
|
assetsInFile: FigmaFileStructureStatistics
|
|
1219
1222
|
})
|
|
@@ -1230,165 +1233,165 @@ function recursiveFigmaFileStructureToMap(node, map) {
|
|
|
1230
1233
|
}
|
|
1231
1234
|
|
|
1232
1235
|
// src/dsm/elements/data/figma-node-reference.ts
|
|
1233
|
-
import { z as
|
|
1234
|
-
var FigmaNodeReferenceData =
|
|
1235
|
-
structureElementId:
|
|
1236
|
-
nodeId:
|
|
1237
|
-
fileId:
|
|
1238
|
-
valid:
|
|
1239
|
-
assetId:
|
|
1240
|
-
assetScale:
|
|
1241
|
-
assetWidth:
|
|
1242
|
-
assetHeight:
|
|
1243
|
-
assetUrl:
|
|
1244
|
-
});
|
|
1245
|
-
var FigmaNodeReferenceElementData =
|
|
1236
|
+
import { z as z43 } from "zod";
|
|
1237
|
+
var FigmaNodeReferenceData = z43.object({
|
|
1238
|
+
structureElementId: z43.string(),
|
|
1239
|
+
nodeId: z43.string(),
|
|
1240
|
+
fileId: z43.string().optional(),
|
|
1241
|
+
valid: z43.boolean(),
|
|
1242
|
+
assetId: z43.string().optional(),
|
|
1243
|
+
assetScale: z43.number().optional(),
|
|
1244
|
+
assetWidth: z43.number().optional(),
|
|
1245
|
+
assetHeight: z43.number().optional(),
|
|
1246
|
+
assetUrl: z43.string().optional()
|
|
1247
|
+
});
|
|
1248
|
+
var FigmaNodeReferenceElementData = z43.object({
|
|
1246
1249
|
value: FigmaNodeReferenceData
|
|
1247
1250
|
});
|
|
1248
1251
|
|
|
1249
1252
|
// src/dsm/elements/data/font-family.ts
|
|
1250
|
-
import { z as
|
|
1251
|
-
var FontFamilyValue =
|
|
1253
|
+
import { z as z44 } from "zod";
|
|
1254
|
+
var FontFamilyValue = z44.string();
|
|
1252
1255
|
var FontFamilyTokenData = tokenAliasOrValue(FontFamilyValue);
|
|
1253
1256
|
|
|
1254
1257
|
// src/dsm/elements/data/font-size.ts
|
|
1255
|
-
import { z as
|
|
1256
|
-
var FontSizeUnit =
|
|
1257
|
-
var FontSizeValue =
|
|
1258
|
+
import { z as z45 } from "zod";
|
|
1259
|
+
var FontSizeUnit = z45.enum(["Pixels", "Rem", "Percent"]);
|
|
1260
|
+
var FontSizeValue = z45.object({
|
|
1258
1261
|
unit: FontSizeUnit,
|
|
1259
|
-
measure:
|
|
1262
|
+
measure: z45.number()
|
|
1260
1263
|
});
|
|
1261
1264
|
var FontSizeTokenData = tokenAliasOrValue(FontSizeValue);
|
|
1262
1265
|
|
|
1263
1266
|
// src/dsm/elements/data/font-weight.ts
|
|
1264
|
-
import { z as
|
|
1265
|
-
var FontWeightValue =
|
|
1267
|
+
import { z as z46 } from "zod";
|
|
1268
|
+
var FontWeightValue = z46.string();
|
|
1266
1269
|
var FontWeightTokenData = tokenAliasOrValue(FontWeightValue);
|
|
1267
1270
|
|
|
1268
1271
|
// src/dsm/elements/data/gradient.ts
|
|
1269
|
-
import { z as
|
|
1270
|
-
var GradientType =
|
|
1271
|
-
var GradientStop =
|
|
1272
|
-
position:
|
|
1272
|
+
import { z as z47 } from "zod";
|
|
1273
|
+
var GradientType = z47.enum(["Linear", "Radial", "Angular"]);
|
|
1274
|
+
var GradientStop = z47.object({
|
|
1275
|
+
position: z47.number(),
|
|
1273
1276
|
color: ColorTokenData
|
|
1274
1277
|
});
|
|
1275
|
-
var GradientLayerValue =
|
|
1278
|
+
var GradientLayerValue = z47.object({
|
|
1276
1279
|
from: Point2D,
|
|
1277
1280
|
to: Point2D,
|
|
1278
1281
|
type: GradientType,
|
|
1279
|
-
aspectRatio: nullishToOptional(
|
|
1282
|
+
aspectRatio: nullishToOptional(z47.number()),
|
|
1280
1283
|
// z.number(),
|
|
1281
|
-
stops:
|
|
1284
|
+
stops: z47.array(GradientStop).min(2)
|
|
1282
1285
|
});
|
|
1283
1286
|
var GradientLayerData = tokenAliasOrValue(GradientLayerValue);
|
|
1284
|
-
var GradientTokenValue =
|
|
1287
|
+
var GradientTokenValue = z47.array(GradientLayerData);
|
|
1285
1288
|
var GradientTokenData = tokenAliasOrValue(GradientTokenValue);
|
|
1286
1289
|
|
|
1287
1290
|
// src/dsm/elements/data/group.ts
|
|
1288
|
-
import { z as
|
|
1289
|
-
var DocumentationGroupBehavior =
|
|
1290
|
-
var ElementGroupData =
|
|
1291
|
+
import { z as z48 } from "zod";
|
|
1292
|
+
var DocumentationGroupBehavior = z48.enum(["Group", "Tabs"]);
|
|
1293
|
+
var ElementGroupData = z48.object({
|
|
1291
1294
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1292
1295
|
configuration: nullishToOptional(DocumentationItemConfiguration)
|
|
1293
1296
|
});
|
|
1294
|
-
var ElementGroupElementData =
|
|
1297
|
+
var ElementGroupElementData = z48.object({
|
|
1295
1298
|
value: ElementGroupData.optional()
|
|
1296
1299
|
});
|
|
1297
1300
|
|
|
1298
1301
|
// src/dsm/elements/data/letter-spacing.ts
|
|
1299
|
-
import { z as
|
|
1300
|
-
var LetterSpacingUnit =
|
|
1301
|
-
var LetterSpacingValue =
|
|
1302
|
+
import { z as z49 } from "zod";
|
|
1303
|
+
var LetterSpacingUnit = z49.enum(["Pixels", "Rem", "Percent"]);
|
|
1304
|
+
var LetterSpacingValue = z49.object({
|
|
1302
1305
|
unit: LetterSpacingUnit,
|
|
1303
|
-
measure:
|
|
1306
|
+
measure: z49.number()
|
|
1304
1307
|
});
|
|
1305
1308
|
var LetterSpacingTokenData = tokenAliasOrValue(LetterSpacingValue);
|
|
1306
1309
|
|
|
1307
1310
|
// src/dsm/elements/data/line-height.ts
|
|
1308
|
-
import { z as
|
|
1309
|
-
var LineHeightUnit =
|
|
1310
|
-
var LineHeightValue =
|
|
1311
|
+
import { z as z50 } from "zod";
|
|
1312
|
+
var LineHeightUnit = z50.enum(["Pixels", "Rem", "Percent", "Raw"]);
|
|
1313
|
+
var LineHeightValue = z50.object({
|
|
1311
1314
|
unit: LineHeightUnit,
|
|
1312
|
-
measure:
|
|
1315
|
+
measure: z50.number()
|
|
1313
1316
|
});
|
|
1314
1317
|
var LineHeightTokenData = tokenAliasOrValue(LineHeightValue);
|
|
1315
1318
|
|
|
1316
1319
|
// src/dsm/elements/data/paragraph-indent.ts
|
|
1317
|
-
import { z as
|
|
1318
|
-
var ParagraphIndentUnit =
|
|
1319
|
-
var ParagraphIndentValue =
|
|
1320
|
+
import { z as z51 } from "zod";
|
|
1321
|
+
var ParagraphIndentUnit = z51.enum(["Pixels", "Rem", "Percent"]);
|
|
1322
|
+
var ParagraphIndentValue = z51.object({
|
|
1320
1323
|
unit: ParagraphIndentUnit,
|
|
1321
|
-
measure:
|
|
1324
|
+
measure: z51.number()
|
|
1322
1325
|
});
|
|
1323
1326
|
var ParagraphIndentTokenData = tokenAliasOrValue(ParagraphIndentValue);
|
|
1324
1327
|
|
|
1325
1328
|
// src/dsm/elements/data/paragraph-spacing.ts
|
|
1326
|
-
import { z as
|
|
1327
|
-
var ParagraphSpacingUnit =
|
|
1328
|
-
var ParagraphSpacingValue =
|
|
1329
|
+
import { z as z52 } from "zod";
|
|
1330
|
+
var ParagraphSpacingUnit = z52.enum(["Pixels", "Rem", "Percent"]);
|
|
1331
|
+
var ParagraphSpacingValue = z52.object({
|
|
1329
1332
|
unit: ParagraphSpacingUnit,
|
|
1330
|
-
measure:
|
|
1333
|
+
measure: z52.number()
|
|
1331
1334
|
});
|
|
1332
1335
|
var ParagraphSpacingTokenData = tokenAliasOrValue(ParagraphSpacingValue);
|
|
1333
1336
|
|
|
1334
1337
|
// src/dsm/elements/data/product-copy.ts
|
|
1335
|
-
import { z as
|
|
1336
|
-
var ProductCopyValue =
|
|
1338
|
+
import { z as z53 } from "zod";
|
|
1339
|
+
var ProductCopyValue = z53.string();
|
|
1337
1340
|
var ProductCopyTokenData = tokenAliasOrValue(ProductCopyValue);
|
|
1338
1341
|
|
|
1339
1342
|
// src/dsm/elements/data/shadow.ts
|
|
1340
|
-
import { z as
|
|
1341
|
-
var ShadowType =
|
|
1342
|
-
var ShadowLayerValue =
|
|
1343
|
+
import { z as z54 } from "zod";
|
|
1344
|
+
var ShadowType = z54.enum(["Drop", "Inner"]);
|
|
1345
|
+
var ShadowLayerValue = z54.object({
|
|
1343
1346
|
color: ColorTokenData,
|
|
1344
|
-
x:
|
|
1345
|
-
y:
|
|
1346
|
-
radius:
|
|
1347
|
-
spread:
|
|
1347
|
+
x: z54.number(),
|
|
1348
|
+
y: z54.number(),
|
|
1349
|
+
radius: z54.number(),
|
|
1350
|
+
spread: z54.number(),
|
|
1348
1351
|
opacity: OpacityTokenData,
|
|
1349
1352
|
type: ShadowType
|
|
1350
1353
|
});
|
|
1351
1354
|
var ShadowTokenDataBase = tokenAliasOrValue(ShadowLayerValue);
|
|
1352
|
-
var ShadowTokenData = tokenAliasOrValue(
|
|
1355
|
+
var ShadowTokenData = tokenAliasOrValue(z54.array(ShadowTokenDataBase));
|
|
1353
1356
|
|
|
1354
1357
|
// src/dsm/elements/data/size.ts
|
|
1355
|
-
import { z as
|
|
1356
|
-
var SizeUnit =
|
|
1357
|
-
var SizeValue =
|
|
1358
|
+
import { z as z55 } from "zod";
|
|
1359
|
+
var SizeUnit = z55.enum(["Pixels", "Rem", "Percent"]);
|
|
1360
|
+
var SizeValue = z55.object({
|
|
1358
1361
|
unit: SizeUnit,
|
|
1359
|
-
measure:
|
|
1362
|
+
measure: z55.number()
|
|
1360
1363
|
});
|
|
1361
1364
|
var SizeTokenData = tokenAliasOrValue(SizeValue);
|
|
1362
1365
|
|
|
1363
1366
|
// src/dsm/elements/data/space.ts
|
|
1364
|
-
import { z as
|
|
1365
|
-
var SpaceUnit =
|
|
1366
|
-
var SpaceValue =
|
|
1367
|
+
import { z as z56 } from "zod";
|
|
1368
|
+
var SpaceUnit = z56.enum(["Pixels", "Rem", "Percent"]);
|
|
1369
|
+
var SpaceValue = z56.object({
|
|
1367
1370
|
unit: SpaceUnit,
|
|
1368
|
-
measure:
|
|
1371
|
+
measure: z56.number()
|
|
1369
1372
|
});
|
|
1370
1373
|
var SpaceTokenData = tokenAliasOrValue(SpaceValue);
|
|
1371
1374
|
|
|
1372
1375
|
// src/dsm/elements/data/string.ts
|
|
1373
|
-
import { z as
|
|
1374
|
-
var StringValue =
|
|
1376
|
+
import { z as z57 } from "zod";
|
|
1377
|
+
var StringValue = z57.string();
|
|
1375
1378
|
var StringTokenData = tokenAliasOrValue(StringValue);
|
|
1376
1379
|
|
|
1377
1380
|
// src/dsm/elements/data/text-case.ts
|
|
1378
|
-
import { z as
|
|
1379
|
-
var TextCase =
|
|
1381
|
+
import { z as z58 } from "zod";
|
|
1382
|
+
var TextCase = z58.enum(["Original", "Upper", "Lower", "Camel", "SmallCaps"]);
|
|
1380
1383
|
var TextCaseValue = TextCase;
|
|
1381
1384
|
var TextCaseTokenData = tokenAliasOrValue(TextCaseValue);
|
|
1382
1385
|
|
|
1383
1386
|
// src/dsm/elements/data/text-decoration.ts
|
|
1384
|
-
import { z as
|
|
1385
|
-
var TextDecoration =
|
|
1387
|
+
import { z as z59 } from "zod";
|
|
1388
|
+
var TextDecoration = z59.enum(["None", "Underline", "Strikethrough"]);
|
|
1386
1389
|
var TextDecorationValue = TextDecoration;
|
|
1387
1390
|
var TextDecorationTokenData = tokenAliasOrValue(TextDecorationValue);
|
|
1388
1391
|
|
|
1389
1392
|
// src/dsm/elements/data/typography.ts
|
|
1390
|
-
import { z as
|
|
1391
|
-
var TypographyValue =
|
|
1393
|
+
import { z as z60 } from "zod";
|
|
1394
|
+
var TypographyValue = z60.object({
|
|
1392
1395
|
fontSize: FontSizeTokenData,
|
|
1393
1396
|
fontFamily: FontFamilyTokenData,
|
|
1394
1397
|
fontWeight: FontWeightTokenData,
|
|
@@ -1402,97 +1405,97 @@ var TypographyValue = z59.object({
|
|
|
1402
1405
|
var TypographyTokenData = tokenAliasOrValue(TypographyValue);
|
|
1403
1406
|
|
|
1404
1407
|
// src/dsm/elements/data/visibility.ts
|
|
1405
|
-
import { z as
|
|
1406
|
-
var Visibility =
|
|
1408
|
+
import { z as z61 } from "zod";
|
|
1409
|
+
var Visibility = z61.enum(["Hidden", "Visible"]);
|
|
1407
1410
|
var VisibilityValue = Visibility;
|
|
1408
1411
|
var VisibilityTokenData = tokenAliasOrValue(VisibilityValue);
|
|
1409
1412
|
|
|
1410
1413
|
// src/dsm/elements/data/z-index.ts
|
|
1411
|
-
import { z as
|
|
1412
|
-
var ZIndexUnit =
|
|
1413
|
-
var ZIndexValue =
|
|
1414
|
+
import { z as z62 } from "zod";
|
|
1415
|
+
var ZIndexUnit = z62.enum(["Raw"]);
|
|
1416
|
+
var ZIndexValue = z62.object({
|
|
1414
1417
|
unit: ZIndexUnit,
|
|
1415
|
-
measure:
|
|
1418
|
+
measure: z62.number()
|
|
1416
1419
|
});
|
|
1417
1420
|
var ZIndexTokenData = tokenAliasOrValue(ZIndexValue);
|
|
1418
1421
|
|
|
1419
1422
|
// src/dsm/elements/base.ts
|
|
1420
|
-
import { z as
|
|
1421
|
-
var DesignElementOrigin =
|
|
1422
|
-
id:
|
|
1423
|
-
sourceId:
|
|
1424
|
-
name:
|
|
1425
|
-
});
|
|
1426
|
-
var DesignElementBase =
|
|
1427
|
-
id:
|
|
1428
|
-
persistentId:
|
|
1423
|
+
import { z as z63 } from "zod";
|
|
1424
|
+
var DesignElementOrigin = z63.object({
|
|
1425
|
+
id: z63.string(),
|
|
1426
|
+
sourceId: z63.string(),
|
|
1427
|
+
name: z63.string()
|
|
1428
|
+
});
|
|
1429
|
+
var DesignElementBase = z63.object({
|
|
1430
|
+
id: z63.string(),
|
|
1431
|
+
persistentId: z63.string(),
|
|
1429
1432
|
meta: ObjectMeta,
|
|
1430
|
-
designSystemVersionId:
|
|
1431
|
-
createdAt:
|
|
1432
|
-
updatedAt:
|
|
1433
|
+
designSystemVersionId: z63.string(),
|
|
1434
|
+
createdAt: z63.date(),
|
|
1435
|
+
updatedAt: z63.date()
|
|
1433
1436
|
});
|
|
1434
1437
|
var DesignElementImportedBase = DesignElementBase.extend({
|
|
1435
1438
|
origin: DesignElementOrigin
|
|
1436
1439
|
});
|
|
1437
|
-
var DesignElementGroupablePart =
|
|
1438
|
-
parentPersistentId:
|
|
1439
|
-
sortOrder:
|
|
1440
|
+
var DesignElementGroupablePart = z63.object({
|
|
1441
|
+
parentPersistentId: z63.string().optional(),
|
|
1442
|
+
sortOrder: z63.number()
|
|
1440
1443
|
});
|
|
1441
1444
|
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
1442
1445
|
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
1443
|
-
parentPersistentId:
|
|
1446
|
+
parentPersistentId: z63.string()
|
|
1444
1447
|
});
|
|
1445
|
-
var DesignElementBrandedPart =
|
|
1446
|
-
brandPersistentId:
|
|
1448
|
+
var DesignElementBrandedPart = z63.object({
|
|
1449
|
+
brandPersistentId: z63.string()
|
|
1447
1450
|
});
|
|
1448
|
-
var DesignElementSlugPart =
|
|
1449
|
-
slug:
|
|
1450
|
-
userSlug:
|
|
1451
|
+
var DesignElementSlugPart = z63.object({
|
|
1452
|
+
slug: z63.string().optional(),
|
|
1453
|
+
userSlug: z63.string().optional()
|
|
1451
1454
|
});
|
|
1452
1455
|
|
|
1453
1456
|
// src/dsm/elements/component.ts
|
|
1454
|
-
import { z as
|
|
1455
|
-
var ComponentOriginPart =
|
|
1456
|
-
nodeId:
|
|
1457
|
-
width:
|
|
1458
|
-
height:
|
|
1457
|
+
import { z as z64 } from "zod";
|
|
1458
|
+
var ComponentOriginPart = z64.object({
|
|
1459
|
+
nodeId: z64.string().optional(),
|
|
1460
|
+
width: z64.number().optional(),
|
|
1461
|
+
height: z64.number().optional()
|
|
1459
1462
|
});
|
|
1460
|
-
var ComponentAsset =
|
|
1461
|
-
assetId:
|
|
1462
|
-
assetPath:
|
|
1463
|
+
var ComponentAsset = z64.object({
|
|
1464
|
+
assetId: z64.string(),
|
|
1465
|
+
assetPath: z64.string()
|
|
1463
1466
|
});
|
|
1464
1467
|
var ComponentOrigin = DesignElementOrigin.extend(ComponentOriginPart.shape);
|
|
1465
1468
|
var Component = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
1466
1469
|
origin: ComponentOrigin.optional(),
|
|
1467
1470
|
thumbnail: ComponentAsset,
|
|
1468
1471
|
svg: ComponentAsset.optional(),
|
|
1469
|
-
isAsset:
|
|
1472
|
+
isAsset: z64.boolean()
|
|
1470
1473
|
});
|
|
1471
1474
|
function isImportedComponent(component) {
|
|
1472
1475
|
return !!component.origin;
|
|
1473
1476
|
}
|
|
1474
1477
|
|
|
1475
1478
|
// src/dsm/elements/documentation-page-v1.ts
|
|
1476
|
-
import { z as
|
|
1479
|
+
import { z as z65 } from "zod";
|
|
1477
1480
|
var DocumentationPageV1 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1478
|
-
shortPersistentId:
|
|
1481
|
+
shortPersistentId: z65.string(),
|
|
1479
1482
|
data: DocumentationPageDataV1
|
|
1480
1483
|
});
|
|
1481
1484
|
|
|
1482
1485
|
// src/dsm/elements/documentation-page-v2.ts
|
|
1483
|
-
import { z as
|
|
1486
|
+
import { z as z66 } from "zod";
|
|
1484
1487
|
var DocumentationPageV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1485
|
-
shortPersistentId:
|
|
1488
|
+
shortPersistentId: z66.string(),
|
|
1486
1489
|
data: DocumentationPageDataV2
|
|
1487
1490
|
});
|
|
1488
1491
|
|
|
1489
1492
|
// src/dsm/elements/figma-file-structures.ts
|
|
1490
|
-
import { z as
|
|
1491
|
-
var FigmaFileStructureOrigin =
|
|
1492
|
-
sourceId:
|
|
1493
|
-
fileId:
|
|
1493
|
+
import { z as z67 } from "zod";
|
|
1494
|
+
var FigmaFileStructureOrigin = z67.object({
|
|
1495
|
+
sourceId: z67.string(),
|
|
1496
|
+
fileId: z67.string().optional()
|
|
1494
1497
|
});
|
|
1495
|
-
var FigmaFileStructureData =
|
|
1498
|
+
var FigmaFileStructureData = z67.object({
|
|
1496
1499
|
rootNode: FigmaFileStructureNode,
|
|
1497
1500
|
assetsInFile: FigmaFileStructureStatistics
|
|
1498
1501
|
});
|
|
@@ -1513,32 +1516,32 @@ var FigmaNodeReference = DesignElementBase.extend({
|
|
|
1513
1516
|
});
|
|
1514
1517
|
|
|
1515
1518
|
// src/dsm/elements/group.ts
|
|
1516
|
-
import { z as
|
|
1519
|
+
import { z as z68 } from "zod";
|
|
1517
1520
|
var ElementGroup = DesignElementBase.extend(DesignElementGroupablePart.shape).extend(DesignElementSlugPart.shape).extend(DesignElementBrandedPart.partial().shape).extend({
|
|
1518
|
-
shortPersistentId:
|
|
1521
|
+
shortPersistentId: z68.string().optional(),
|
|
1519
1522
|
childType: DesignElementType,
|
|
1520
1523
|
data: ElementGroupData.optional()
|
|
1521
1524
|
});
|
|
1522
1525
|
var BrandedElementGroup = ElementGroup.extend(DesignElementBrandedPart.shape);
|
|
1523
1526
|
|
|
1524
1527
|
// src/dsm/elements/page-block-v2.ts
|
|
1525
|
-
import { z as
|
|
1528
|
+
import { z as z69 } from "zod";
|
|
1526
1529
|
var PageBlockV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend({
|
|
1527
1530
|
data: PageBlockDataV2
|
|
1528
1531
|
});
|
|
1529
|
-
var PageBlockEditorModelV2 =
|
|
1530
|
-
id:
|
|
1532
|
+
var PageBlockEditorModelV2 = z69.object({
|
|
1533
|
+
id: z69.string(),
|
|
1531
1534
|
data: PageBlockDataV2
|
|
1532
1535
|
});
|
|
1533
1536
|
|
|
1534
1537
|
// src/dsm/elements/theme.ts
|
|
1535
|
-
import { z as
|
|
1538
|
+
import { z as z71 } from "zod";
|
|
1536
1539
|
|
|
1537
1540
|
// src/dsm/elements/tokens.ts
|
|
1538
|
-
import { z as
|
|
1539
|
-
var DesignTokenOriginPart =
|
|
1540
|
-
referenceOriginId:
|
|
1541
|
-
referencePersistentId:
|
|
1541
|
+
import { z as z70 } from "zod";
|
|
1542
|
+
var DesignTokenOriginPart = z70.object({
|
|
1543
|
+
referenceOriginId: z70.string().optional(),
|
|
1544
|
+
referencePersistentId: z70.string().optional()
|
|
1542
1545
|
});
|
|
1543
1546
|
var DesignTokenOrigin = DesignElementOrigin.extend(DesignTokenOriginPart.shape);
|
|
1544
1547
|
var DesignTokenBase = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
@@ -1550,111 +1553,111 @@ var UpdateDesignTokenBase = DesignTokenBase.omit({
|
|
|
1550
1553
|
brandPersistentId: true,
|
|
1551
1554
|
designSystemVersionId: true
|
|
1552
1555
|
});
|
|
1553
|
-
var BlurTokenTypedData =
|
|
1554
|
-
type:
|
|
1556
|
+
var BlurTokenTypedData = z70.object({
|
|
1557
|
+
type: z70.literal("Blur"),
|
|
1555
1558
|
data: BlurTokenData
|
|
1556
1559
|
});
|
|
1557
|
-
var ColorTokenTypedData =
|
|
1558
|
-
type:
|
|
1560
|
+
var ColorTokenTypedData = z70.object({
|
|
1561
|
+
type: z70.literal("Color"),
|
|
1559
1562
|
data: ColorTokenData
|
|
1560
1563
|
});
|
|
1561
|
-
var GradientTokenTypedData =
|
|
1562
|
-
type:
|
|
1564
|
+
var GradientTokenTypedData = z70.object({
|
|
1565
|
+
type: z70.literal("Gradient"),
|
|
1563
1566
|
data: GradientTokenData
|
|
1564
1567
|
});
|
|
1565
|
-
var OpacityTokenTypedData =
|
|
1566
|
-
type:
|
|
1568
|
+
var OpacityTokenTypedData = z70.object({
|
|
1569
|
+
type: z70.literal("Opacity"),
|
|
1567
1570
|
data: OpacityTokenData
|
|
1568
1571
|
});
|
|
1569
|
-
var ShadowTokenTypedData =
|
|
1570
|
-
type:
|
|
1572
|
+
var ShadowTokenTypedData = z70.object({
|
|
1573
|
+
type: z70.literal("Shadow"),
|
|
1571
1574
|
data: ShadowTokenData
|
|
1572
1575
|
});
|
|
1573
|
-
var TypographyTokenTypedData =
|
|
1574
|
-
type:
|
|
1576
|
+
var TypographyTokenTypedData = z70.object({
|
|
1577
|
+
type: z70.literal("Typography"),
|
|
1575
1578
|
data: TypographyTokenData
|
|
1576
1579
|
});
|
|
1577
|
-
var StringTokenTypedData =
|
|
1578
|
-
type:
|
|
1580
|
+
var StringTokenTypedData = z70.object({
|
|
1581
|
+
type: z70.literal("String"),
|
|
1579
1582
|
data: StringTokenData
|
|
1580
1583
|
});
|
|
1581
|
-
var DimensionTokenTypedData =
|
|
1582
|
-
type:
|
|
1584
|
+
var DimensionTokenTypedData = z70.object({
|
|
1585
|
+
type: z70.literal("Dimension"),
|
|
1583
1586
|
data: DimensionTokenData
|
|
1584
1587
|
});
|
|
1585
|
-
var FontSizeTokenTypedData =
|
|
1586
|
-
type:
|
|
1588
|
+
var FontSizeTokenTypedData = z70.object({
|
|
1589
|
+
type: z70.literal("FontSize"),
|
|
1587
1590
|
data: FontSizeTokenData
|
|
1588
1591
|
});
|
|
1589
|
-
var FontFamilyTokenTypedData =
|
|
1590
|
-
type:
|
|
1592
|
+
var FontFamilyTokenTypedData = z70.object({
|
|
1593
|
+
type: z70.literal("FontFamily"),
|
|
1591
1594
|
data: FontFamilyTokenData
|
|
1592
1595
|
});
|
|
1593
|
-
var FontWeightTokenTypedData =
|
|
1594
|
-
type:
|
|
1596
|
+
var FontWeightTokenTypedData = z70.object({
|
|
1597
|
+
type: z70.literal("FontWeight"),
|
|
1595
1598
|
data: FontWeightTokenData
|
|
1596
1599
|
});
|
|
1597
|
-
var LetterSpacingTokenTypedData =
|
|
1598
|
-
type:
|
|
1600
|
+
var LetterSpacingTokenTypedData = z70.object({
|
|
1601
|
+
type: z70.literal("LetterSpacing"),
|
|
1599
1602
|
data: LetterSpacingTokenData
|
|
1600
1603
|
});
|
|
1601
|
-
var LineHeightTokenTypedData =
|
|
1602
|
-
type:
|
|
1604
|
+
var LineHeightTokenTypedData = z70.object({
|
|
1605
|
+
type: z70.literal("LineHeight"),
|
|
1603
1606
|
data: LineHeightTokenData
|
|
1604
1607
|
});
|
|
1605
|
-
var ParagraphSpacingTokenTypedData =
|
|
1606
|
-
type:
|
|
1608
|
+
var ParagraphSpacingTokenTypedData = z70.object({
|
|
1609
|
+
type: z70.literal("ParagraphSpacing"),
|
|
1607
1610
|
data: ParagraphSpacingTokenData
|
|
1608
1611
|
});
|
|
1609
|
-
var TextCaseTokenTypedData =
|
|
1610
|
-
type:
|
|
1612
|
+
var TextCaseTokenTypedData = z70.object({
|
|
1613
|
+
type: z70.literal("TextCase"),
|
|
1611
1614
|
data: TextCaseTokenData
|
|
1612
1615
|
});
|
|
1613
|
-
var TextDecorationTokenTypedData =
|
|
1614
|
-
type:
|
|
1616
|
+
var TextDecorationTokenTypedData = z70.object({
|
|
1617
|
+
type: z70.literal("TextDecoration"),
|
|
1615
1618
|
data: TextDecorationTokenData
|
|
1616
1619
|
});
|
|
1617
|
-
var BorderRadiusTokenTypedData =
|
|
1618
|
-
type:
|
|
1620
|
+
var BorderRadiusTokenTypedData = z70.object({
|
|
1621
|
+
type: z70.literal("BorderRadius"),
|
|
1619
1622
|
data: BorderRadiusTokenData
|
|
1620
1623
|
});
|
|
1621
|
-
var BorderWidthTokenTypedData =
|
|
1622
|
-
type:
|
|
1624
|
+
var BorderWidthTokenTypedData = z70.object({
|
|
1625
|
+
type: z70.literal("BorderWidth"),
|
|
1623
1626
|
data: BorderWidthTokenData
|
|
1624
1627
|
});
|
|
1625
|
-
var BorderTypedData =
|
|
1626
|
-
type:
|
|
1628
|
+
var BorderTypedData = z70.object({
|
|
1629
|
+
type: z70.literal("Border"),
|
|
1627
1630
|
data: BorderTokenData
|
|
1628
1631
|
});
|
|
1629
|
-
var ProductCopyTypedData =
|
|
1630
|
-
type:
|
|
1632
|
+
var ProductCopyTypedData = z70.object({
|
|
1633
|
+
type: z70.literal("ProductCopy"),
|
|
1631
1634
|
data: ProductCopyTokenData
|
|
1632
1635
|
});
|
|
1633
|
-
var SizeTypedData =
|
|
1634
|
-
type:
|
|
1636
|
+
var SizeTypedData = z70.object({
|
|
1637
|
+
type: z70.literal("Size"),
|
|
1635
1638
|
data: SizeTokenData
|
|
1636
1639
|
});
|
|
1637
|
-
var SpaceTypedData =
|
|
1638
|
-
type:
|
|
1640
|
+
var SpaceTypedData = z70.object({
|
|
1641
|
+
type: z70.literal("Space"),
|
|
1639
1642
|
data: SpaceTokenData
|
|
1640
1643
|
});
|
|
1641
|
-
var VisibilityTypedData =
|
|
1642
|
-
type:
|
|
1644
|
+
var VisibilityTypedData = z70.object({
|
|
1645
|
+
type: z70.literal("Visibility"),
|
|
1643
1646
|
data: VisibilityTokenData
|
|
1644
1647
|
});
|
|
1645
|
-
var ZIndexTypedData =
|
|
1646
|
-
type:
|
|
1648
|
+
var ZIndexTypedData = z70.object({
|
|
1649
|
+
type: z70.literal("ZIndex"),
|
|
1647
1650
|
data: ZIndexTokenData
|
|
1648
1651
|
});
|
|
1649
|
-
var DurationTypedData =
|
|
1650
|
-
type:
|
|
1652
|
+
var DurationTypedData = z70.object({
|
|
1653
|
+
type: z70.literal("Duration"),
|
|
1651
1654
|
data: DurationTokenData
|
|
1652
1655
|
});
|
|
1653
|
-
var FontTypedData =
|
|
1654
|
-
type:
|
|
1655
|
-
data:
|
|
1656
|
+
var FontTypedData = z70.object({
|
|
1657
|
+
type: z70.literal("Font"),
|
|
1658
|
+
data: z70.record(z70.any())
|
|
1656
1659
|
});
|
|
1657
|
-
var DesignTokenTypedData =
|
|
1660
|
+
var DesignTokenTypedData = z70.discriminatedUnion("type", [
|
|
1658
1661
|
BlurTokenTypedData,
|
|
1659
1662
|
BorderRadiusTokenTypedData,
|
|
1660
1663
|
BorderWidthTokenTypedData,
|
|
@@ -1704,72 +1707,72 @@ function designTokenTypeFilter(type) {
|
|
|
1704
1707
|
var ThemeOverrideOriginPart = DesignTokenOriginPart;
|
|
1705
1708
|
var ThemeOverrideOrigin = DesignTokenOrigin;
|
|
1706
1709
|
var ThemeOverride = DesignTokenTypedData.and(
|
|
1707
|
-
|
|
1708
|
-
tokenPersistentId:
|
|
1710
|
+
z71.object({
|
|
1711
|
+
tokenPersistentId: z71.string(),
|
|
1709
1712
|
origin: ThemeOverrideOrigin.optional().nullable().transform((v) => v ?? void 0)
|
|
1710
1713
|
})
|
|
1711
1714
|
);
|
|
1712
|
-
var ThemeElementData =
|
|
1713
|
-
value:
|
|
1714
|
-
overrides:
|
|
1715
|
+
var ThemeElementData = z71.object({
|
|
1716
|
+
value: z71.object({
|
|
1717
|
+
overrides: z71.array(ThemeOverride)
|
|
1715
1718
|
})
|
|
1716
1719
|
});
|
|
1717
|
-
var ThemeOriginPart =
|
|
1718
|
-
var ThemeOriginObject =
|
|
1719
|
-
id:
|
|
1720
|
-
name:
|
|
1720
|
+
var ThemeOriginPart = z71.object({});
|
|
1721
|
+
var ThemeOriginObject = z71.object({
|
|
1722
|
+
id: z71.string(),
|
|
1723
|
+
name: z71.string()
|
|
1721
1724
|
});
|
|
1722
|
-
var ThemeOriginSource =
|
|
1723
|
-
sourceId:
|
|
1724
|
-
sourceObjects:
|
|
1725
|
+
var ThemeOriginSource = z71.object({
|
|
1726
|
+
sourceId: z71.string(),
|
|
1727
|
+
sourceObjects: z71.array(ThemeOriginObject)
|
|
1725
1728
|
});
|
|
1726
|
-
var ThemeOrigin =
|
|
1727
|
-
sources:
|
|
1729
|
+
var ThemeOrigin = z71.object({
|
|
1730
|
+
sources: z71.array(ThemeOriginSource)
|
|
1728
1731
|
});
|
|
1729
1732
|
var Theme = DesignElementBase.extend(DesignElementBrandedPart.shape).extend({
|
|
1730
1733
|
origin: ThemeOrigin.optional(),
|
|
1731
|
-
overrides:
|
|
1734
|
+
overrides: z71.array(ThemeOverride)
|
|
1732
1735
|
});
|
|
1733
1736
|
|
|
1734
1737
|
// src/dsm/import/support/figma-files.ts
|
|
1735
|
-
import { z as
|
|
1736
|
-
var FigmaFileDownloadScope =
|
|
1737
|
-
styles:
|
|
1738
|
-
components:
|
|
1739
|
-
currentVersion:
|
|
1740
|
-
publishedVersion:
|
|
1741
|
-
downloadChunkSize:
|
|
1738
|
+
import { z as z72 } from "zod";
|
|
1739
|
+
var FigmaFileDownloadScope = z72.object({
|
|
1740
|
+
styles: z72.boolean(),
|
|
1741
|
+
components: z72.boolean(),
|
|
1742
|
+
currentVersion: z72.literal("__latest__").nullable(),
|
|
1743
|
+
publishedVersion: z72.string().nullable(),
|
|
1744
|
+
downloadChunkSize: z72.number().optional()
|
|
1742
1745
|
});
|
|
1743
|
-
var FigmaFileAccessData =
|
|
1744
|
-
accessToken:
|
|
1746
|
+
var FigmaFileAccessData = z72.object({
|
|
1747
|
+
accessToken: z72.string()
|
|
1745
1748
|
});
|
|
1746
1749
|
|
|
1747
1750
|
// src/dsm/import/support/import-context.ts
|
|
1748
|
-
import { z as
|
|
1749
|
-
var ImportFunctionInput =
|
|
1750
|
-
importJobId:
|
|
1751
|
-
importContextId:
|
|
1752
|
-
designSystemId:
|
|
1751
|
+
import { z as z73 } from "zod";
|
|
1752
|
+
var ImportFunctionInput = z73.object({
|
|
1753
|
+
importJobId: z73.string(),
|
|
1754
|
+
importContextId: z73.string(),
|
|
1755
|
+
designSystemId: z73.string().optional()
|
|
1753
1756
|
});
|
|
1754
|
-
var ImportedFigmaSourceData =
|
|
1755
|
-
sourceId:
|
|
1757
|
+
var ImportedFigmaSourceData = z73.object({
|
|
1758
|
+
sourceId: z73.string(),
|
|
1756
1759
|
figmaRemote: DataSourceFigmaRemote
|
|
1757
1760
|
});
|
|
1758
|
-
var FigmaImportBaseContext =
|
|
1759
|
-
designSystemId:
|
|
1761
|
+
var FigmaImportBaseContext = z73.object({
|
|
1762
|
+
designSystemId: z73.string(),
|
|
1760
1763
|
/**
|
|
1761
1764
|
* Data required for accessing Figma files. This should contain access data for all file ids
|
|
1762
1765
|
* mentioned in the `importedSourceDataBySourceId`
|
|
1763
1766
|
*
|
|
1764
1767
|
* fileId: file data
|
|
1765
1768
|
*/
|
|
1766
|
-
fileAccessByFileId:
|
|
1769
|
+
fileAccessByFileId: z73.record(FigmaFileAccessData),
|
|
1767
1770
|
/**
|
|
1768
1771
|
* Figma source data for which import was requested
|
|
1769
1772
|
*
|
|
1770
1773
|
* sourceId: source data
|
|
1771
1774
|
*/
|
|
1772
|
-
importedSourceDataBySourceId:
|
|
1775
|
+
importedSourceDataBySourceId: z73.record(ImportedFigmaSourceData)
|
|
1773
1776
|
});
|
|
1774
1777
|
var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
|
|
1775
1778
|
importMetadata: DataSourceFigmaImportMetadata
|
|
@@ -1781,79 +1784,79 @@ var FigmaImportContextWithDownloadScopes = FigmaImportBaseContext.extend({
|
|
|
1781
1784
|
*
|
|
1782
1785
|
* File id -> file download scope
|
|
1783
1786
|
*/
|
|
1784
|
-
fileDownloadScopesByFileId:
|
|
1787
|
+
fileDownloadScopesByFileId: z73.record(FigmaFileDownloadScope),
|
|
1785
1788
|
/**
|
|
1786
1789
|
* Sources filtered down to the ones that have changed since last import and therefore need to be
|
|
1787
1790
|
* imported again.
|
|
1788
1791
|
*
|
|
1789
1792
|
* Source id -> import metadata
|
|
1790
1793
|
*/
|
|
1791
|
-
changedImportedSourceDataBySourceId:
|
|
1794
|
+
changedImportedSourceDataBySourceId: z73.record(ChangedImportedFigmaSourceData)
|
|
1792
1795
|
});
|
|
1793
1796
|
|
|
1794
1797
|
// src/dsm/import/support/import-model-collections.ts
|
|
1795
|
-
import { z as
|
|
1798
|
+
import { z as z81 } from "zod";
|
|
1796
1799
|
|
|
1797
1800
|
// src/dsm/import/image.ts
|
|
1798
|
-
import { z as
|
|
1799
|
-
var ImageImportModelType =
|
|
1800
|
-
var ImageImportModelBase =
|
|
1801
|
+
import { z as z74 } from "zod";
|
|
1802
|
+
var ImageImportModelType = z74.enum(["Url", "FigmaRender"]);
|
|
1803
|
+
var ImageImportModelBase = z74.object({
|
|
1801
1804
|
scope: AssetScope
|
|
1802
1805
|
});
|
|
1803
1806
|
var UrlImageImportModel = ImageImportModelBase.extend({
|
|
1804
|
-
type:
|
|
1805
|
-
url:
|
|
1806
|
-
originKey:
|
|
1807
|
-
extension:
|
|
1807
|
+
type: z74.literal(ImageImportModelType.enum.Url),
|
|
1808
|
+
url: z74.string(),
|
|
1809
|
+
originKey: z74.string(),
|
|
1810
|
+
extension: z74.enum(["png", "svg", "jpg"])
|
|
1808
1811
|
});
|
|
1809
|
-
var FigmaRenderFormat =
|
|
1812
|
+
var FigmaRenderFormat = z74.enum(["Svg", "Png"]);
|
|
1810
1813
|
var FigmaRenderBase = ImageImportModelBase.extend({
|
|
1811
|
-
type:
|
|
1812
|
-
fileId:
|
|
1813
|
-
fileVersionId:
|
|
1814
|
-
nodeId:
|
|
1815
|
-
originKey:
|
|
1814
|
+
type: z74.literal(ImageImportModelType.enum.FigmaRender),
|
|
1815
|
+
fileId: z74.string(),
|
|
1816
|
+
fileVersionId: z74.string().optional(),
|
|
1817
|
+
nodeId: z74.string(),
|
|
1818
|
+
originKey: z74.string()
|
|
1816
1819
|
});
|
|
1817
1820
|
var FigmaPngRenderImportModel = FigmaRenderBase.extend({
|
|
1818
|
-
format:
|
|
1819
|
-
scale:
|
|
1821
|
+
format: z74.literal(FigmaRenderFormat.enum.Png),
|
|
1822
|
+
scale: z74.number()
|
|
1820
1823
|
});
|
|
1821
1824
|
var FigmaSvgRenderImportModel = FigmaRenderBase.extend({
|
|
1822
|
-
format:
|
|
1825
|
+
format: z74.literal(FigmaRenderFormat.enum.Svg)
|
|
1823
1826
|
});
|
|
1824
|
-
var FigmaRenderImportModel =
|
|
1827
|
+
var FigmaRenderImportModel = z74.discriminatedUnion("format", [
|
|
1825
1828
|
FigmaPngRenderImportModel,
|
|
1826
1829
|
FigmaSvgRenderImportModel
|
|
1827
1830
|
]);
|
|
1828
|
-
var ImageImportModel =
|
|
1831
|
+
var ImageImportModel = z74.union([UrlImageImportModel, FigmaRenderImportModel]);
|
|
1829
1832
|
|
|
1830
1833
|
// src/dsm/import/component.ts
|
|
1831
|
-
import { z as
|
|
1834
|
+
import { z as z76 } from "zod";
|
|
1832
1835
|
|
|
1833
1836
|
// src/dsm/import/base.ts
|
|
1834
|
-
import { z as
|
|
1835
|
-
var ImportModelBase =
|
|
1836
|
-
id:
|
|
1837
|
+
import { z as z75 } from "zod";
|
|
1838
|
+
var ImportModelBase = z75.object({
|
|
1839
|
+
id: z75.string(),
|
|
1837
1840
|
meta: ObjectMeta,
|
|
1838
1841
|
origin: DesignElementOrigin,
|
|
1839
|
-
brandPersistentId:
|
|
1840
|
-
sortOrder:
|
|
1842
|
+
brandPersistentId: z75.string(),
|
|
1843
|
+
sortOrder: z75.number()
|
|
1841
1844
|
});
|
|
1842
1845
|
var ImportModelInputBase = ImportModelBase.omit({
|
|
1843
1846
|
brandPersistentId: true,
|
|
1844
1847
|
origin: true,
|
|
1845
1848
|
sortOrder: true
|
|
1846
1849
|
}).extend({
|
|
1847
|
-
originId:
|
|
1848
|
-
originMetadata:
|
|
1850
|
+
originId: z75.string(),
|
|
1851
|
+
originMetadata: z75.record(z75.any())
|
|
1849
1852
|
});
|
|
1850
1853
|
|
|
1851
1854
|
// src/dsm/import/component.ts
|
|
1852
|
-
var ComponentImportModelPart =
|
|
1855
|
+
var ComponentImportModelPart = z76.object({
|
|
1853
1856
|
thumbnail: ImageImportModel
|
|
1854
1857
|
});
|
|
1855
1858
|
var ComponentImportModel = ImportModelBase.extend(ComponentImportModelPart.shape).extend({
|
|
1856
|
-
isAsset:
|
|
1859
|
+
isAsset: z76.boolean(),
|
|
1857
1860
|
svg: FigmaSvgRenderImportModel.optional(),
|
|
1858
1861
|
origin: ComponentOrigin
|
|
1859
1862
|
});
|
|
@@ -1866,49 +1869,49 @@ var AssetImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart
|
|
|
1866
1869
|
});
|
|
1867
1870
|
|
|
1868
1871
|
// src/dsm/import/theme.ts
|
|
1869
|
-
import { z as
|
|
1872
|
+
import { z as z77 } from "zod";
|
|
1870
1873
|
var ThemeOverrideImportModelBase = DesignTokenTypedData.and(
|
|
1871
|
-
|
|
1872
|
-
id:
|
|
1874
|
+
z77.object({
|
|
1875
|
+
id: z77.string(),
|
|
1873
1876
|
meta: ObjectMeta
|
|
1874
1877
|
})
|
|
1875
1878
|
);
|
|
1876
1879
|
var ThemeOverrideImportModel = ThemeOverrideImportModelBase.and(
|
|
1877
|
-
|
|
1880
|
+
z77.object({
|
|
1878
1881
|
origin: ThemeOverrideOrigin
|
|
1879
1882
|
})
|
|
1880
1883
|
);
|
|
1881
1884
|
var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
|
|
1882
|
-
|
|
1883
|
-
originId:
|
|
1885
|
+
z77.object({
|
|
1886
|
+
originId: z77.string(),
|
|
1884
1887
|
originMetadata: ThemeOverrideOriginPart
|
|
1885
1888
|
})
|
|
1886
1889
|
);
|
|
1887
|
-
var ThemeImportModel =
|
|
1890
|
+
var ThemeImportModel = z77.object({
|
|
1888
1891
|
meta: ObjectMeta,
|
|
1889
|
-
brandPersistentId:
|
|
1892
|
+
brandPersistentId: z77.string(),
|
|
1890
1893
|
originSource: ThemeOriginSource,
|
|
1891
|
-
overrides:
|
|
1892
|
-
sortOrder:
|
|
1894
|
+
overrides: z77.array(ThemeOverrideImportModel),
|
|
1895
|
+
sortOrder: z77.number()
|
|
1893
1896
|
});
|
|
1894
|
-
var ThemeImportModelInput =
|
|
1897
|
+
var ThemeImportModelInput = z77.object({
|
|
1895
1898
|
meta: ObjectMeta,
|
|
1896
|
-
originObjects:
|
|
1897
|
-
overrides:
|
|
1899
|
+
originObjects: z77.array(ThemeOriginObject),
|
|
1900
|
+
overrides: z77.array(ThemeOverrideImportModelInput)
|
|
1898
1901
|
});
|
|
1899
|
-
var ThemeUpdateImportModel =
|
|
1900
|
-
themePersistentId:
|
|
1901
|
-
overrides:
|
|
1902
|
+
var ThemeUpdateImportModel = z77.object({
|
|
1903
|
+
themePersistentId: z77.string(),
|
|
1904
|
+
overrides: z77.array(ThemeOverrideImportModel)
|
|
1902
1905
|
});
|
|
1903
|
-
var ThemeUpdateImportModelInput =
|
|
1904
|
-
themePersistentId:
|
|
1905
|
-
overrides:
|
|
1906
|
+
var ThemeUpdateImportModelInput = z77.object({
|
|
1907
|
+
themePersistentId: z77.string(),
|
|
1908
|
+
overrides: z77.array(ThemeOverrideImportModelInput)
|
|
1906
1909
|
});
|
|
1907
1910
|
|
|
1908
1911
|
// src/dsm/import/tokens.ts
|
|
1909
|
-
import { z as
|
|
1910
|
-
var DesignTokenImportModelPart =
|
|
1911
|
-
collection:
|
|
1912
|
+
import { z as z78 } from "zod";
|
|
1913
|
+
var DesignTokenImportModelPart = z78.object({
|
|
1914
|
+
collection: z78.string().optional()
|
|
1912
1915
|
});
|
|
1913
1916
|
var DesignTokenImportModelBase = ImportModelBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
1914
1917
|
origin: DesignTokenOrigin
|
|
@@ -1926,15 +1929,15 @@ function designTokenImportModelTypeFilter(type) {
|
|
|
1926
1929
|
}
|
|
1927
1930
|
|
|
1928
1931
|
// src/dsm/import/figma-frames.ts
|
|
1929
|
-
import { z as
|
|
1932
|
+
import { z as z79 } from "zod";
|
|
1930
1933
|
var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
|
|
1931
1934
|
image: FigmaPngRenderImportModel
|
|
1932
1935
|
});
|
|
1933
1936
|
var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
|
|
1934
|
-
children:
|
|
1937
|
+
children: z79.lazy(() => FigmaFileStructureNodeImportModel.array())
|
|
1935
1938
|
});
|
|
1936
|
-
var FigmaFileStructureImportModelPart =
|
|
1937
|
-
data:
|
|
1939
|
+
var FigmaFileStructureImportModelPart = z79.object({
|
|
1940
|
+
data: z79.object({
|
|
1938
1941
|
rootNode: FigmaFileStructureNodeImportModel,
|
|
1939
1942
|
assetsInFile: FigmaFileStructureStatistics
|
|
1940
1943
|
})
|
|
@@ -1945,7 +1948,7 @@ var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImp
|
|
|
1945
1948
|
var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
|
|
1946
1949
|
FigmaFileStructureImportModelPart.shape
|
|
1947
1950
|
).extend({
|
|
1948
|
-
fileVersionId:
|
|
1951
|
+
fileVersionId: z79.string()
|
|
1949
1952
|
});
|
|
1950
1953
|
function figmaFileStructureImportModelToMap(root) {
|
|
1951
1954
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -1959,30 +1962,30 @@ function recursiveFigmaFileStructureToMap2(node, map) {
|
|
|
1959
1962
|
}
|
|
1960
1963
|
|
|
1961
1964
|
// src/dsm/import/data-source.ts
|
|
1962
|
-
import { z as
|
|
1963
|
-
var DataSourceImportModel =
|
|
1964
|
-
id:
|
|
1965
|
-
fileName:
|
|
1966
|
-
thumbnailUrl:
|
|
1965
|
+
import { z as z80 } from "zod";
|
|
1966
|
+
var DataSourceImportModel = z80.object({
|
|
1967
|
+
id: z80.string(),
|
|
1968
|
+
fileName: z80.string().optional(),
|
|
1969
|
+
thumbnailUrl: z80.string().optional()
|
|
1967
1970
|
});
|
|
1968
1971
|
|
|
1969
1972
|
// src/dsm/import/support/import-model-collections.ts
|
|
1970
|
-
var ImportModelInputCollection =
|
|
1973
|
+
var ImportModelInputCollection = z81.object({
|
|
1971
1974
|
source: DataSourceImportModel,
|
|
1972
|
-
tokens:
|
|
1973
|
-
components:
|
|
1974
|
-
assets:
|
|
1975
|
-
themeUpdates:
|
|
1976
|
-
themes:
|
|
1975
|
+
tokens: z81.array(DesignTokenImportModelInput).default([]),
|
|
1976
|
+
components: z81.array(ComponentImportModelInput).default([]),
|
|
1977
|
+
assets: z81.array(AssetImportModelInput).default([]),
|
|
1978
|
+
themeUpdates: z81.array(ThemeUpdateImportModelInput).default([]),
|
|
1979
|
+
themes: z81.array(ThemeImportModelInput).default([]),
|
|
1977
1980
|
figmaFileStructure: FigmaFileStructureImportModelInput.optional()
|
|
1978
1981
|
});
|
|
1979
|
-
var ImportModelCollection =
|
|
1980
|
-
sources:
|
|
1981
|
-
tokens:
|
|
1982
|
-
components:
|
|
1983
|
-
themeUpdates:
|
|
1984
|
-
themes:
|
|
1985
|
-
figmaFileStructures:
|
|
1982
|
+
var ImportModelCollection = z81.object({
|
|
1983
|
+
sources: z81.array(DataSourceImportModel),
|
|
1984
|
+
tokens: z81.array(DesignTokenImportModel).default([]),
|
|
1985
|
+
components: z81.array(ComponentImportModel).default([]),
|
|
1986
|
+
themeUpdates: z81.array(ThemeUpdateImportModel).default([]),
|
|
1987
|
+
themes: z81.array(ThemeImportModel).default([]),
|
|
1988
|
+
figmaFileStructures: z81.array(FigmaFileStructureImportModel)
|
|
1986
1989
|
});
|
|
1987
1990
|
function addImportModelCollections(lhs, rhs) {
|
|
1988
1991
|
return {
|
|
@@ -1996,8 +1999,8 @@ function addImportModelCollections(lhs, rhs) {
|
|
|
1996
1999
|
}
|
|
1997
2000
|
|
|
1998
2001
|
// src/dsm/import/warning.ts
|
|
1999
|
-
import { z as
|
|
2000
|
-
var ImportWarningType =
|
|
2002
|
+
import { z as z82 } from "zod";
|
|
2003
|
+
var ImportWarningType = z82.enum([
|
|
2001
2004
|
"NoVersionFound",
|
|
2002
2005
|
"UnsupportedFill",
|
|
2003
2006
|
"UnsupportedStroke",
|
|
@@ -2011,27 +2014,27 @@ var ImportWarningType = z81.enum([
|
|
|
2011
2014
|
"DuplicateImportedStyleId",
|
|
2012
2015
|
"DuplicateImportedStylePath"
|
|
2013
2016
|
]);
|
|
2014
|
-
var ImportWarning =
|
|
2017
|
+
var ImportWarning = z82.object({
|
|
2015
2018
|
warningType: ImportWarningType,
|
|
2016
|
-
componentId:
|
|
2017
|
-
componentName:
|
|
2018
|
-
styleId:
|
|
2019
|
-
styleName:
|
|
2020
|
-
unsupportedStyleValueType:
|
|
2019
|
+
componentId: z82.string().optional(),
|
|
2020
|
+
componentName: z82.string().optional(),
|
|
2021
|
+
styleId: z82.string().optional(),
|
|
2022
|
+
styleName: z82.string().optional(),
|
|
2023
|
+
unsupportedStyleValueType: z82.string().optional()
|
|
2021
2024
|
});
|
|
2022
2025
|
|
|
2023
2026
|
// src/dsm/data-sources/import-summary.ts
|
|
2024
|
-
var FileStructureStats =
|
|
2027
|
+
var FileStructureStats = z83.object({
|
|
2025
2028
|
frames: zeroNumberByDefault2(),
|
|
2026
2029
|
components: zeroNumberByDefault2(),
|
|
2027
2030
|
componentSets: zeroNumberByDefault2()
|
|
2028
2031
|
});
|
|
2029
2032
|
var SourceImportSummaryByTokenTypeKey = DesignTokenType.or(
|
|
2030
2033
|
// Backward compatibility
|
|
2031
|
-
|
|
2034
|
+
z83.enum(["Measure", "Radius", "GenericToken", "Font", "Text"])
|
|
2032
2035
|
);
|
|
2033
|
-
var SourceImportSummaryByTokenType =
|
|
2034
|
-
var SourceImportTokenSummary =
|
|
2036
|
+
var SourceImportSummaryByTokenType = z83.record(SourceImportSummaryByTokenTypeKey, z83.number());
|
|
2037
|
+
var SourceImportTokenSummary = z83.object({
|
|
2035
2038
|
tokensCreated: zeroNumberByDefault2(),
|
|
2036
2039
|
tokensUpdated: zeroNumberByDefault2(),
|
|
2037
2040
|
tokensDeleted: zeroNumberByDefault2(),
|
|
@@ -2039,7 +2042,7 @@ var SourceImportTokenSummary = z82.object({
|
|
|
2039
2042
|
tokensUpdatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {}),
|
|
2040
2043
|
tokensDeletedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {})
|
|
2041
2044
|
});
|
|
2042
|
-
var SourceImportComponentSummary =
|
|
2045
|
+
var SourceImportComponentSummary = z83.object({
|
|
2043
2046
|
componentsCreated: zeroNumberByDefault2(),
|
|
2044
2047
|
componentsUpdated: zeroNumberByDefault2(),
|
|
2045
2048
|
componentsDeleted: zeroNumberByDefault2(),
|
|
@@ -2047,68 +2050,68 @@ var SourceImportComponentSummary = z82.object({
|
|
|
2047
2050
|
componentAssetsUpdated: zeroNumberByDefault2(),
|
|
2048
2051
|
componentAssetsDeleted: zeroNumberByDefault2()
|
|
2049
2052
|
});
|
|
2050
|
-
var SourceImportFrameSummary =
|
|
2053
|
+
var SourceImportFrameSummary = z83.object({
|
|
2051
2054
|
assetsInFile: nullishToOptional(FileStructureStats.optional()),
|
|
2052
|
-
invalidReferencesCount: nullishToOptional(
|
|
2053
|
-
});
|
|
2054
|
-
var SourceImportSummary =
|
|
2055
|
-
sourceId: nullishToOptional(
|
|
2056
|
-
brandId: nullishToOptional(
|
|
2057
|
-
versionId: nullishToOptional(
|
|
2058
|
-
error: nullishToOptional(
|
|
2059
|
-
isFailed:
|
|
2060
|
-
warnings:
|
|
2055
|
+
invalidReferencesCount: nullishToOptional(z83.number().optional())
|
|
2056
|
+
});
|
|
2057
|
+
var SourceImportSummary = z83.object({
|
|
2058
|
+
sourceId: nullishToOptional(z83.string()),
|
|
2059
|
+
brandId: nullishToOptional(z83.string()),
|
|
2060
|
+
versionId: nullishToOptional(z83.string()),
|
|
2061
|
+
error: nullishToOptional(z83.any()),
|
|
2062
|
+
isFailed: z83.boolean(),
|
|
2063
|
+
warnings: z83.array(ImportWarning).nullish().transform((v) => v ?? []),
|
|
2061
2064
|
...SourceImportTokenSummary.shape,
|
|
2062
2065
|
...SourceImportComponentSummary.shape,
|
|
2063
2066
|
...FileStructureStats.shape
|
|
2064
2067
|
});
|
|
2065
2068
|
function zeroNumberByDefault2() {
|
|
2066
|
-
return
|
|
2069
|
+
return z83.number().nullish().transform((v) => v ?? 0);
|
|
2067
2070
|
}
|
|
2068
2071
|
|
|
2069
2072
|
// src/dsm/documentation/block-definitions/aux.ts
|
|
2070
|
-
import { z as
|
|
2071
|
-
var PageBlockDefinitionAppearance =
|
|
2072
|
-
isBordered:
|
|
2073
|
-
hasBackground:
|
|
2074
|
-
isEditorPresentationDifferent:
|
|
2073
|
+
import { z as z84 } from "zod";
|
|
2074
|
+
var PageBlockDefinitionAppearance = z84.object({
|
|
2075
|
+
isBordered: z84.boolean().optional(),
|
|
2076
|
+
hasBackground: z84.boolean().optional(),
|
|
2077
|
+
isEditorPresentationDifferent: z84.boolean().optional()
|
|
2075
2078
|
});
|
|
2076
2079
|
|
|
2077
2080
|
// src/dsm/documentation/block-definitions/definition.ts
|
|
2078
|
-
import { z as
|
|
2081
|
+
import { z as z87 } from "zod";
|
|
2079
2082
|
|
|
2080
2083
|
// src/dsm/documentation/block-definitions/item.ts
|
|
2081
|
-
import { z as
|
|
2084
|
+
import { z as z86 } from "zod";
|
|
2082
2085
|
|
|
2083
2086
|
// src/dsm/documentation/block-definitions/variant.ts
|
|
2084
|
-
import { z as
|
|
2085
|
-
var PageBlockDefinitionLayoutType =
|
|
2086
|
-
var PageBlockDefinitionLayoutGap =
|
|
2087
|
-
var PageBlockDefinitionLayoutAlign =
|
|
2088
|
-
var PageBlockDefinitionLayoutResizing =
|
|
2089
|
-
var PageBlockDefinitionLayoutBase =
|
|
2087
|
+
import { z as z85 } from "zod";
|
|
2088
|
+
var PageBlockDefinitionLayoutType = z85.enum(["Column", "Row"]);
|
|
2089
|
+
var PageBlockDefinitionLayoutGap = z85.enum(["Small", "Medium", "Large", "None"]);
|
|
2090
|
+
var PageBlockDefinitionLayoutAlign = z85.enum(["Start", "Center", "End"]);
|
|
2091
|
+
var PageBlockDefinitionLayoutResizing = z85.enum(["Fill", "Hug"]);
|
|
2092
|
+
var PageBlockDefinitionLayoutBase = z85.object({
|
|
2090
2093
|
type: PageBlockDefinitionLayoutType,
|
|
2091
2094
|
gap: PageBlockDefinitionLayoutGap.optional(),
|
|
2092
2095
|
columnAlign: PageBlockDefinitionLayoutAlign.optional(),
|
|
2093
2096
|
columnResizing: PageBlockDefinitionLayoutResizing.optional()
|
|
2094
2097
|
});
|
|
2095
2098
|
var PageBlockDefinitionLayout = PageBlockDefinitionLayoutBase.extend({
|
|
2096
|
-
children:
|
|
2097
|
-
});
|
|
2098
|
-
var PageBlockDefinitionVariant =
|
|
2099
|
-
id:
|
|
2100
|
-
name:
|
|
2101
|
-
image:
|
|
2102
|
-
description:
|
|
2103
|
-
documentationLink:
|
|
2099
|
+
children: z85.lazy(() => z85.array(PageBlockDefinitionLayout.or(z85.string())))
|
|
2100
|
+
});
|
|
2101
|
+
var PageBlockDefinitionVariant = z85.object({
|
|
2102
|
+
id: z85.string(),
|
|
2103
|
+
name: z85.string(),
|
|
2104
|
+
image: z85.string().optional(),
|
|
2105
|
+
description: z85.string().optional(),
|
|
2106
|
+
documentationLink: z85.string().optional(),
|
|
2104
2107
|
layout: PageBlockDefinitionLayout,
|
|
2105
|
-
maxColumns:
|
|
2106
|
-
defaultColumns:
|
|
2108
|
+
maxColumns: z85.number().optional(),
|
|
2109
|
+
defaultColumns: z85.number().optional(),
|
|
2107
2110
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
2108
2111
|
});
|
|
2109
2112
|
|
|
2110
2113
|
// src/dsm/documentation/block-definitions/item.ts
|
|
2111
|
-
var PageBlockDefinitionPropertyType =
|
|
2114
|
+
var PageBlockDefinitionPropertyType = z86.enum([
|
|
2112
2115
|
"RichText",
|
|
2113
2116
|
"MultiRichText",
|
|
2114
2117
|
"Text",
|
|
@@ -2135,7 +2138,7 @@ var PageBlockDefinitionPropertyType = z85.enum([
|
|
|
2135
2138
|
"Storybook",
|
|
2136
2139
|
"Color"
|
|
2137
2140
|
]);
|
|
2138
|
-
var PageBlockDefinitionRichTextPropertyStyle =
|
|
2141
|
+
var PageBlockDefinitionRichTextPropertyStyle = z86.enum([
|
|
2139
2142
|
"Title1",
|
|
2140
2143
|
"Title2",
|
|
2141
2144
|
"Title3",
|
|
@@ -2145,8 +2148,8 @@ var PageBlockDefinitionRichTextPropertyStyle = z85.enum([
|
|
|
2145
2148
|
"Callout",
|
|
2146
2149
|
"Default"
|
|
2147
2150
|
]);
|
|
2148
|
-
var PageBlockDefinitionMultiRichTextPropertyStyle =
|
|
2149
|
-
var PageBlockDefinitionTextPropertyStyle =
|
|
2151
|
+
var PageBlockDefinitionMultiRichTextPropertyStyle = z86.enum(["OL", "UL", "Default"]);
|
|
2152
|
+
var PageBlockDefinitionTextPropertyStyle = z86.enum([
|
|
2150
2153
|
"Title1",
|
|
2151
2154
|
"Title2",
|
|
2152
2155
|
"Title3",
|
|
@@ -2159,79 +2162,79 @@ var PageBlockDefinitionTextPropertyStyle = z85.enum([
|
|
|
2159
2162
|
"SmallBold",
|
|
2160
2163
|
"SmallSemibold"
|
|
2161
2164
|
]);
|
|
2162
|
-
var PageBlockDefinitionTextPropertyColor =
|
|
2163
|
-
var PageBlockDefinitionBooleanPropertyStyle =
|
|
2164
|
-
var PageBlockDefinitionSingleSelectPropertyStyle =
|
|
2165
|
+
var PageBlockDefinitionTextPropertyColor = z86.enum(["Neutral", "NeutralFaded"]);
|
|
2166
|
+
var PageBlockDefinitionBooleanPropertyStyle = z86.enum(["SegmentedControl", "ToggleButton", "Checkbox"]);
|
|
2167
|
+
var PageBlockDefinitionSingleSelectPropertyStyle = z86.enum([
|
|
2165
2168
|
"SegmentedControl",
|
|
2166
2169
|
"ToggleButton",
|
|
2167
2170
|
"Select",
|
|
2168
2171
|
"Checkbox"
|
|
2169
2172
|
]);
|
|
2170
|
-
var PageBlockDefinitionMultiSelectPropertyStyle =
|
|
2171
|
-
var PageBlockDefinitionImageAspectRatio =
|
|
2172
|
-
var PageBlockDefinitionImageWidth =
|
|
2173
|
-
var PageBlockDefinitionSelectChoice =
|
|
2174
|
-
value:
|
|
2175
|
-
name:
|
|
2176
|
-
icon:
|
|
2173
|
+
var PageBlockDefinitionMultiSelectPropertyStyle = z86.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
2174
|
+
var PageBlockDefinitionImageAspectRatio = z86.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
|
|
2175
|
+
var PageBlockDefinitionImageWidth = z86.enum(["Full", "Icon", "Small", "Medium", "Large", "Poster"]);
|
|
2176
|
+
var PageBlockDefinitionSelectChoice = z86.object({
|
|
2177
|
+
value: z86.string(),
|
|
2178
|
+
name: z86.string(),
|
|
2179
|
+
icon: z86.string().optional()
|
|
2177
2180
|
});
|
|
2178
|
-
var PageBlockDefinitionUntypedPropertyOptions =
|
|
2179
|
-
var PageBlockDefinitionRichTextOptions =
|
|
2181
|
+
var PageBlockDefinitionUntypedPropertyOptions = z86.record(z86.any());
|
|
2182
|
+
var PageBlockDefinitionRichTextOptions = z86.object({
|
|
2180
2183
|
richTextStyle: PageBlockDefinitionRichTextPropertyStyle.optional()
|
|
2181
2184
|
});
|
|
2182
|
-
var PageBlockDefinitionMutiRichTextOptions =
|
|
2185
|
+
var PageBlockDefinitionMutiRichTextOptions = z86.object({
|
|
2183
2186
|
multiRichTextStyle: PageBlockDefinitionMultiRichTextPropertyStyle.optional()
|
|
2184
2187
|
});
|
|
2185
|
-
var PageBlockDefinitionTextOptions =
|
|
2186
|
-
placeholder:
|
|
2187
|
-
defaultValue:
|
|
2188
|
+
var PageBlockDefinitionTextOptions = z86.object({
|
|
2189
|
+
placeholder: z86.string().optional(),
|
|
2190
|
+
defaultValue: z86.string().optional(),
|
|
2188
2191
|
textStyle: PageBlockDefinitionTextPropertyStyle.optional(),
|
|
2189
2192
|
color: PageBlockDefinitionTextPropertyColor.optional()
|
|
2190
2193
|
});
|
|
2191
|
-
var PageBlockDefinitionSelectOptions =
|
|
2194
|
+
var PageBlockDefinitionSelectOptions = z86.object({
|
|
2192
2195
|
singleSelectStyle: PageBlockDefinitionSingleSelectPropertyStyle.optional(),
|
|
2193
|
-
defaultChoice:
|
|
2194
|
-
choices:
|
|
2196
|
+
defaultChoice: z86.string(),
|
|
2197
|
+
choices: z86.array(PageBlockDefinitionSelectChoice)
|
|
2195
2198
|
});
|
|
2196
|
-
var PageBlockDefinitionImageOptions =
|
|
2199
|
+
var PageBlockDefinitionImageOptions = z86.object({
|
|
2197
2200
|
width: PageBlockDefinitionImageWidth.optional(),
|
|
2198
2201
|
aspectRatio: PageBlockDefinitionImageAspectRatio.optional(),
|
|
2199
|
-
allowCaption:
|
|
2200
|
-
recommendation:
|
|
2202
|
+
allowCaption: z86.boolean().optional(),
|
|
2203
|
+
recommendation: z86.string().optional()
|
|
2201
2204
|
});
|
|
2202
|
-
var PageBlockDefinitionBooleanOptions =
|
|
2203
|
-
defaultvalue:
|
|
2205
|
+
var PageBlockDefinitionBooleanOptions = z86.object({
|
|
2206
|
+
defaultvalue: z86.boolean().optional(),
|
|
2204
2207
|
booleanStyle: PageBlockDefinitionBooleanPropertyStyle.optional()
|
|
2205
2208
|
});
|
|
2206
|
-
var PageBlockDefinitionNumberOptions =
|
|
2207
|
-
defaultValue:
|
|
2208
|
-
min:
|
|
2209
|
-
max:
|
|
2210
|
-
step:
|
|
2211
|
-
placeholder:
|
|
2209
|
+
var PageBlockDefinitionNumberOptions = z86.object({
|
|
2210
|
+
defaultValue: z86.number(),
|
|
2211
|
+
min: z86.number().optional(),
|
|
2212
|
+
max: z86.number().optional(),
|
|
2213
|
+
step: z86.number().optional(),
|
|
2214
|
+
placeholder: z86.string().optional()
|
|
2212
2215
|
});
|
|
2213
|
-
var PageBlockDefinitionComponentOptions =
|
|
2214
|
-
renderLayoutAs:
|
|
2215
|
-
allowPropertySelection:
|
|
2216
|
+
var PageBlockDefinitionComponentOptions = z86.object({
|
|
2217
|
+
renderLayoutAs: z86.enum(["List", "Table"]).optional(),
|
|
2218
|
+
allowPropertySelection: z86.boolean().optional()
|
|
2216
2219
|
});
|
|
2217
|
-
var PageBlockDefinitionProperty =
|
|
2218
|
-
id:
|
|
2219
|
-
name:
|
|
2220
|
+
var PageBlockDefinitionProperty = z86.object({
|
|
2221
|
+
id: z86.string(),
|
|
2222
|
+
name: z86.string(),
|
|
2220
2223
|
type: PageBlockDefinitionPropertyType,
|
|
2221
|
-
description:
|
|
2224
|
+
description: z86.string().optional(),
|
|
2222
2225
|
// TODO Docs
|
|
2223
2226
|
options: PageBlockDefinitionUntypedPropertyOptions.optional(),
|
|
2224
|
-
variantOptions:
|
|
2227
|
+
variantOptions: z86.record(PageBlockDefinitionUntypedPropertyOptions).optional()
|
|
2225
2228
|
});
|
|
2226
|
-
var PageBlockDefinitionItem =
|
|
2227
|
-
properties:
|
|
2229
|
+
var PageBlockDefinitionItem = z86.object({
|
|
2230
|
+
properties: z86.array(PageBlockDefinitionProperty),
|
|
2228
2231
|
appearance: PageBlockDefinitionAppearance.optional(),
|
|
2229
|
-
variants:
|
|
2230
|
-
defaultVariantKey:
|
|
2232
|
+
variants: z86.array(PageBlockDefinitionVariant),
|
|
2233
|
+
defaultVariantKey: z86.string()
|
|
2231
2234
|
});
|
|
2232
2235
|
|
|
2233
2236
|
// src/dsm/documentation/block-definitions/definition.ts
|
|
2234
|
-
var PageBlockCategory =
|
|
2237
|
+
var PageBlockCategory = z87.enum([
|
|
2235
2238
|
"Text",
|
|
2236
2239
|
"Layout",
|
|
2237
2240
|
"Media",
|
|
@@ -2245,61 +2248,44 @@ var PageBlockCategory = z86.enum([
|
|
|
2245
2248
|
"Data",
|
|
2246
2249
|
"Other"
|
|
2247
2250
|
]);
|
|
2248
|
-
var PageBlockBehaviorDataType =
|
|
2249
|
-
var PageBlockBehaviorSelectionType =
|
|
2250
|
-
var PageBlockDefinitionBehavior =
|
|
2251
|
+
var PageBlockBehaviorDataType = z87.enum(["Item", "Token", "Asset", "Component", "FigmaNode"]);
|
|
2252
|
+
var PageBlockBehaviorSelectionType = z87.enum(["Entity", "Group", "EntityAndGroup"]);
|
|
2253
|
+
var PageBlockDefinitionBehavior = z87.object({
|
|
2251
2254
|
dataType: PageBlockBehaviorDataType,
|
|
2252
|
-
items:
|
|
2253
|
-
numberOfItems:
|
|
2254
|
-
allowLinks:
|
|
2255
|
+
items: z87.object({
|
|
2256
|
+
numberOfItems: z87.number(),
|
|
2257
|
+
allowLinks: z87.boolean()
|
|
2255
2258
|
}).optional(),
|
|
2256
|
-
entities:
|
|
2259
|
+
entities: z87.object({
|
|
2257
2260
|
selectionType: PageBlockBehaviorSelectionType,
|
|
2258
|
-
maxSelected:
|
|
2261
|
+
maxSelected: z87.number()
|
|
2259
2262
|
}).optional()
|
|
2260
2263
|
});
|
|
2261
|
-
var PageBlockDefinitionOnboarding =
|
|
2262
|
-
helpText:
|
|
2263
|
-
documentationLink:
|
|
2264
|
+
var PageBlockDefinitionOnboarding = z87.object({
|
|
2265
|
+
helpText: z87.string(),
|
|
2266
|
+
documentationLink: z87.string().optional()
|
|
2264
2267
|
});
|
|
2265
|
-
var PageBlockDefinition =
|
|
2266
|
-
id:
|
|
2267
|
-
name:
|
|
2268
|
-
description:
|
|
2268
|
+
var PageBlockDefinition = z87.object({
|
|
2269
|
+
id: z87.string(),
|
|
2270
|
+
name: z87.string(),
|
|
2271
|
+
description: z87.string(),
|
|
2269
2272
|
category: PageBlockCategory,
|
|
2270
2273
|
icon: AssetValue.optional(),
|
|
2271
|
-
documentationLink:
|
|
2272
|
-
searchKeywords:
|
|
2274
|
+
documentationLink: z87.string().optional(),
|
|
2275
|
+
searchKeywords: z87.array(z87.string()).optional(),
|
|
2273
2276
|
item: PageBlockDefinitionItem,
|
|
2274
2277
|
behavior: PageBlockDefinitionBehavior,
|
|
2275
|
-
editorOptions:
|
|
2278
|
+
editorOptions: z87.object({
|
|
2276
2279
|
onboarding: PageBlockDefinitionOnboarding.optional()
|
|
2277
2280
|
}),
|
|
2278
2281
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
2279
2282
|
});
|
|
2280
2283
|
|
|
2281
2284
|
// src/dsm/documentation/group.ts
|
|
2282
|
-
import { z as z87 } from "zod";
|
|
2283
|
-
var DocumentationPageGroup = z87.object({
|
|
2284
|
-
type: z87.literal("ElementGroup"),
|
|
2285
|
-
childType: z87.literal("DocumentationPage"),
|
|
2286
|
-
id: z87.string(),
|
|
2287
|
-
persistentId: z87.string(),
|
|
2288
|
-
shortPersistentId: z87.string(),
|
|
2289
|
-
designSystemVersionId: z87.string(),
|
|
2290
|
-
parentPersistentId: z87.string().nullish(),
|
|
2291
|
-
sortOrder: z87.number(),
|
|
2292
|
-
title: z87.string(),
|
|
2293
|
-
slug: z87.string(),
|
|
2294
|
-
userSlug: z87.string().nullish(),
|
|
2295
|
-
createdAt: z87.date(),
|
|
2296
|
-
updatedAt: z87.date()
|
|
2297
|
-
});
|
|
2298
|
-
|
|
2299
|
-
// src/dsm/documentation/page.ts
|
|
2300
2285
|
import { z as z88 } from "zod";
|
|
2301
|
-
var
|
|
2302
|
-
type: z88.literal("
|
|
2286
|
+
var DocumentationPageGroup = z88.object({
|
|
2287
|
+
type: z88.literal("ElementGroup"),
|
|
2288
|
+
childType: z88.literal("DocumentationPage"),
|
|
2303
2289
|
id: z88.string(),
|
|
2304
2290
|
persistentId: z88.string(),
|
|
2305
2291
|
shortPersistentId: z88.string(),
|
|
@@ -2313,126 +2299,143 @@ var DocumentationPage = z88.object({
|
|
|
2313
2299
|
updatedAt: z88.date()
|
|
2314
2300
|
});
|
|
2315
2301
|
|
|
2302
|
+
// src/dsm/documentation/page.ts
|
|
2303
|
+
import { z as z89 } from "zod";
|
|
2304
|
+
var DocumentationPage = z89.object({
|
|
2305
|
+
type: z89.literal("DocumentationPage"),
|
|
2306
|
+
id: z89.string(),
|
|
2307
|
+
persistentId: z89.string(),
|
|
2308
|
+
shortPersistentId: z89.string(),
|
|
2309
|
+
designSystemVersionId: z89.string(),
|
|
2310
|
+
parentPersistentId: z89.string().nullish(),
|
|
2311
|
+
sortOrder: z89.number(),
|
|
2312
|
+
title: z89.string(),
|
|
2313
|
+
slug: z89.string(),
|
|
2314
|
+
userSlug: z89.string().nullish(),
|
|
2315
|
+
createdAt: z89.date(),
|
|
2316
|
+
updatedAt: z89.date()
|
|
2317
|
+
});
|
|
2318
|
+
|
|
2316
2319
|
// src/dsm/design-system.ts
|
|
2317
|
-
import { z as
|
|
2320
|
+
import { z as z99 } from "zod";
|
|
2318
2321
|
|
|
2319
2322
|
// src/workspace/npm-registry-settings.ts
|
|
2320
|
-
import { z as
|
|
2321
|
-
var NpmRegistryAuthType =
|
|
2323
|
+
import { z as z90 } from "zod";
|
|
2324
|
+
var NpmRegistryAuthType = z90.enum(["Basic", "Bearer", "None", "Custom"]);
|
|
2322
2325
|
var registryTypesWithoutAzure = ["NPMJS", "GitHub", "Artifactory", "Custom"];
|
|
2323
|
-
var NpmRegistryType =
|
|
2324
|
-
var NpmRegistryTypeWithoutAzure =
|
|
2325
|
-
var NpmRegistryBasicAuthConfig =
|
|
2326
|
+
var NpmRegistryType = z90.enum([...registryTypesWithoutAzure, "AzureDevOps"]);
|
|
2327
|
+
var NpmRegistryTypeWithoutAzure = z90.enum(registryTypesWithoutAzure);
|
|
2328
|
+
var NpmRegistryBasicAuthConfig = z90.object({
|
|
2326
2329
|
registryType: NpmRegistryType,
|
|
2327
|
-
authType:
|
|
2328
|
-
username:
|
|
2329
|
-
password:
|
|
2330
|
+
authType: z90.literal(NpmRegistryAuthType.Enum.Basic),
|
|
2331
|
+
username: z90.string(),
|
|
2332
|
+
password: z90.string()
|
|
2330
2333
|
});
|
|
2331
|
-
var NpmRegistryBearerAuthConfig =
|
|
2334
|
+
var NpmRegistryBearerAuthConfig = z90.object({
|
|
2332
2335
|
registryType: NpmRegistryTypeWithoutAzure,
|
|
2333
|
-
authType:
|
|
2334
|
-
accessToken:
|
|
2336
|
+
authType: z90.literal(NpmRegistryAuthType.Enum.Bearer),
|
|
2337
|
+
accessToken: z90.string()
|
|
2335
2338
|
});
|
|
2336
|
-
var NpmRegistryNoAuthConfig =
|
|
2339
|
+
var NpmRegistryNoAuthConfig = z90.object({
|
|
2337
2340
|
registryType: NpmRegistryTypeWithoutAzure,
|
|
2338
|
-
authType:
|
|
2341
|
+
authType: z90.literal(NpmRegistryAuthType.Enum.None)
|
|
2339
2342
|
});
|
|
2340
|
-
var NpmRegistrCustomAuthConfig =
|
|
2343
|
+
var NpmRegistrCustomAuthConfig = z90.object({
|
|
2341
2344
|
registryType: NpmRegistryTypeWithoutAzure,
|
|
2342
|
-
authType:
|
|
2343
|
-
authHeaderName:
|
|
2344
|
-
authHeaderValue:
|
|
2345
|
+
authType: z90.literal(NpmRegistryAuthType.Enum.Custom),
|
|
2346
|
+
authHeaderName: z90.string(),
|
|
2347
|
+
authHeaderValue: z90.string()
|
|
2345
2348
|
});
|
|
2346
|
-
var NpmRegistryAuthConfig =
|
|
2349
|
+
var NpmRegistryAuthConfig = z90.discriminatedUnion("authType", [
|
|
2347
2350
|
NpmRegistryBasicAuthConfig,
|
|
2348
2351
|
NpmRegistryBearerAuthConfig,
|
|
2349
2352
|
NpmRegistryNoAuthConfig,
|
|
2350
2353
|
NpmRegistrCustomAuthConfig
|
|
2351
2354
|
]);
|
|
2352
|
-
var NpmRegistryConfigBase =
|
|
2353
|
-
enabledScopes:
|
|
2354
|
-
customRegistryUrl:
|
|
2355
|
-
bypassProxy:
|
|
2356
|
-
npmProxyRegistryConfigId:
|
|
2357
|
-
npmProxyVersion:
|
|
2355
|
+
var NpmRegistryConfigBase = z90.object({
|
|
2356
|
+
enabledScopes: z90.array(z90.string()),
|
|
2357
|
+
customRegistryUrl: z90.string().optional(),
|
|
2358
|
+
bypassProxy: z90.boolean().default(false),
|
|
2359
|
+
npmProxyRegistryConfigId: z90.string().optional(),
|
|
2360
|
+
npmProxyVersion: z90.number().optional()
|
|
2358
2361
|
});
|
|
2359
2362
|
var NpmRegistryConfig = NpmRegistryConfigBase.and(NpmRegistryAuthConfig);
|
|
2360
2363
|
|
|
2361
2364
|
// src/workspace/sso-provider.ts
|
|
2362
|
-
import { z as
|
|
2363
|
-
var SsoProvider =
|
|
2364
|
-
providerId:
|
|
2365
|
-
defaultAutoInviteValue:
|
|
2366
|
-
autoInviteDomains:
|
|
2367
|
-
skipDocsSupernovaLogin:
|
|
2368
|
-
areInvitesDisabled:
|
|
2369
|
-
isTestMode:
|
|
2370
|
-
emailDomains:
|
|
2371
|
-
metadataXml:
|
|
2365
|
+
import { z as z91 } from "zod";
|
|
2366
|
+
var SsoProvider = z91.object({
|
|
2367
|
+
providerId: z91.string(),
|
|
2368
|
+
defaultAutoInviteValue: z91.boolean(),
|
|
2369
|
+
autoInviteDomains: z91.record(z91.string(), z91.boolean()),
|
|
2370
|
+
skipDocsSupernovaLogin: z91.boolean(),
|
|
2371
|
+
areInvitesDisabled: z91.boolean(),
|
|
2372
|
+
isTestMode: z91.boolean(),
|
|
2373
|
+
emailDomains: z91.array(z91.string()),
|
|
2374
|
+
metadataXml: z91.string().nullish()
|
|
2372
2375
|
});
|
|
2373
2376
|
|
|
2374
2377
|
// src/workspace/user-invite.ts
|
|
2375
|
-
import { z as
|
|
2378
|
+
import { z as z93 } from "zod";
|
|
2376
2379
|
|
|
2377
2380
|
// src/workspace/workspace-role.ts
|
|
2378
|
-
import { z as
|
|
2379
|
-
var WorkspaceRoleSchema =
|
|
2381
|
+
import { z as z92 } from "zod";
|
|
2382
|
+
var WorkspaceRoleSchema = z92.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest"]);
|
|
2380
2383
|
var WorkspaceRole = WorkspaceRoleSchema.enum;
|
|
2381
2384
|
|
|
2382
2385
|
// src/workspace/user-invite.ts
|
|
2383
2386
|
var MAX_MEMBERS_COUNT = 100;
|
|
2384
|
-
var UserInvite =
|
|
2385
|
-
email:
|
|
2387
|
+
var UserInvite = z93.object({
|
|
2388
|
+
email: z93.string().email().trim().transform((value) => value.toLowerCase()),
|
|
2386
2389
|
role: WorkspaceRoleSchema
|
|
2387
2390
|
});
|
|
2388
|
-
var UserInvites =
|
|
2391
|
+
var UserInvites = z93.array(UserInvite).max(MAX_MEMBERS_COUNT);
|
|
2389
2392
|
|
|
2390
2393
|
// src/workspace/workspace-context.ts
|
|
2391
|
-
import { z as
|
|
2394
|
+
import { z as z95 } from "zod";
|
|
2392
2395
|
|
|
2393
2396
|
// src/workspace/workspace.ts
|
|
2394
|
-
import { z as
|
|
2395
|
-
var WorkspaceIpWhitelistEntry =
|
|
2396
|
-
isEnabled:
|
|
2397
|
-
name:
|
|
2398
|
-
range:
|
|
2399
|
-
});
|
|
2400
|
-
var WorkspaceIpSettings =
|
|
2401
|
-
isEnabledForCloud:
|
|
2402
|
-
isEnabledForDocs:
|
|
2403
|
-
entries:
|
|
2397
|
+
import { z as z94 } from "zod";
|
|
2398
|
+
var WorkspaceIpWhitelistEntry = z94.object({
|
|
2399
|
+
isEnabled: z94.boolean(),
|
|
2400
|
+
name: z94.string(),
|
|
2401
|
+
range: z94.string()
|
|
2402
|
+
});
|
|
2403
|
+
var WorkspaceIpSettings = z94.object({
|
|
2404
|
+
isEnabledForCloud: z94.boolean(),
|
|
2405
|
+
isEnabledForDocs: z94.boolean(),
|
|
2406
|
+
entries: z94.array(WorkspaceIpWhitelistEntry)
|
|
2404
2407
|
}).nullish();
|
|
2405
|
-
var WorkspaceProfile =
|
|
2406
|
-
name:
|
|
2407
|
-
handle:
|
|
2408
|
-
color:
|
|
2409
|
-
avatar:
|
|
2408
|
+
var WorkspaceProfile = z94.object({
|
|
2409
|
+
name: z94.string(),
|
|
2410
|
+
handle: z94.string(),
|
|
2411
|
+
color: z94.string(),
|
|
2412
|
+
avatar: z94.string().optional(),
|
|
2410
2413
|
billingDetails: BillingDetails.optional()
|
|
2411
2414
|
});
|
|
2412
|
-
var Workspace =
|
|
2413
|
-
id:
|
|
2415
|
+
var Workspace = z94.object({
|
|
2416
|
+
id: z94.string(),
|
|
2414
2417
|
profile: WorkspaceProfile,
|
|
2415
2418
|
subscription: Subscription,
|
|
2416
2419
|
ipWhitelist: WorkspaceIpSettings,
|
|
2417
2420
|
sso: SsoProvider.nullish(),
|
|
2418
|
-
npmRegistrySettings:
|
|
2419
|
-
designSystems:
|
|
2421
|
+
npmRegistrySettings: z94.unknown().optional(),
|
|
2422
|
+
designSystems: z94.array(DesignSystem).nullish()
|
|
2420
2423
|
});
|
|
2421
|
-
var WorkspaceWithDesignSystems =
|
|
2424
|
+
var WorkspaceWithDesignSystems = z94.object({
|
|
2422
2425
|
workspace: Workspace,
|
|
2423
|
-
designSystems:
|
|
2426
|
+
designSystems: z94.array(DesignSystem)
|
|
2424
2427
|
});
|
|
2425
2428
|
|
|
2426
2429
|
// src/workspace/workspace-context.ts
|
|
2427
|
-
var WorkspaceContext =
|
|
2428
|
-
workspaceId:
|
|
2430
|
+
var WorkspaceContext = z95.object({
|
|
2431
|
+
workspaceId: z95.string(),
|
|
2429
2432
|
product: ProductCodeSchema,
|
|
2430
2433
|
ipWhitelist: WorkspaceIpSettings,
|
|
2431
|
-
publicDesignSystem:
|
|
2434
|
+
publicDesignSystem: z95.boolean().optional()
|
|
2432
2435
|
});
|
|
2433
2436
|
|
|
2434
2437
|
// src/workspace/workspace-create.ts
|
|
2435
|
-
import { z as
|
|
2438
|
+
import { z as z96 } from "zod";
|
|
2436
2439
|
|
|
2437
2440
|
// src/utils/validation.ts
|
|
2438
2441
|
var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
@@ -2442,111 +2445,111 @@ var WORKSPACE_NAME_MIN_LENGTH = 2;
|
|
|
2442
2445
|
var WORKSPACE_NAME_MAX_LENGTH = 64;
|
|
2443
2446
|
var HANDLE_MIN_LENGTH = 2;
|
|
2444
2447
|
var HANDLE_MAX_LENGTH = 64;
|
|
2445
|
-
var CreateWorkspaceInput =
|
|
2446
|
-
name:
|
|
2448
|
+
var CreateWorkspaceInput = z96.object({
|
|
2449
|
+
name: z96.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
|
|
2447
2450
|
product: ProductCodeSchema,
|
|
2448
|
-
priceId:
|
|
2449
|
-
billingEmail:
|
|
2450
|
-
handle:
|
|
2451
|
+
priceId: z96.string(),
|
|
2452
|
+
billingEmail: z96.string().email().optional(),
|
|
2453
|
+
handle: z96.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => value?.length > 0).optional(),
|
|
2451
2454
|
invites: UserInvites.optional(),
|
|
2452
|
-
promoCode:
|
|
2455
|
+
promoCode: z96.string().optional()
|
|
2453
2456
|
});
|
|
2454
2457
|
|
|
2455
2458
|
// src/workspace/workspace-invitations.ts
|
|
2456
|
-
import { z as z96 } from "zod";
|
|
2457
|
-
var WorkspaceInvitation = z96.object({
|
|
2458
|
-
id: z96.string(),
|
|
2459
|
-
email: z96.string().email(),
|
|
2460
|
-
createdAt: z96.date(),
|
|
2461
|
-
resentAt: z96.date().nullish(),
|
|
2462
|
-
role: z96.nativeEnum(WorkspaceRole),
|
|
2463
|
-
workspaceId: z96.string(),
|
|
2464
|
-
invitedBy: z96.string()
|
|
2465
|
-
});
|
|
2466
|
-
|
|
2467
|
-
// src/workspace/workspace-membership.ts
|
|
2468
2459
|
import { z as z97 } from "zod";
|
|
2469
|
-
var
|
|
2460
|
+
var WorkspaceInvitation = z97.object({
|
|
2470
2461
|
id: z97.string(),
|
|
2471
|
-
|
|
2462
|
+
email: z97.string().email(),
|
|
2463
|
+
createdAt: z97.date(),
|
|
2464
|
+
resentAt: z97.date().nullish(),
|
|
2465
|
+
role: z97.nativeEnum(WorkspaceRole),
|
|
2472
2466
|
workspaceId: z97.string(),
|
|
2473
|
-
|
|
2467
|
+
invitedBy: z97.string()
|
|
2468
|
+
});
|
|
2469
|
+
|
|
2470
|
+
// src/workspace/workspace-membership.ts
|
|
2471
|
+
import { z as z98 } from "zod";
|
|
2472
|
+
var WorkspaceMembership = z98.object({
|
|
2473
|
+
id: z98.string(),
|
|
2474
|
+
userId: z98.string(),
|
|
2475
|
+
workspaceId: z98.string(),
|
|
2476
|
+
workspaceRole: z98.nativeEnum(WorkspaceRole)
|
|
2474
2477
|
});
|
|
2475
|
-
var UpdateMembershipRolesInput =
|
|
2476
|
-
members:
|
|
2477
|
-
|
|
2478
|
-
userId:
|
|
2479
|
-
role:
|
|
2478
|
+
var UpdateMembershipRolesInput = z98.object({
|
|
2479
|
+
members: z98.array(
|
|
2480
|
+
z98.object({
|
|
2481
|
+
userId: z98.string(),
|
|
2482
|
+
role: z98.nativeEnum(WorkspaceRole)
|
|
2480
2483
|
})
|
|
2481
2484
|
)
|
|
2482
2485
|
});
|
|
2483
2486
|
|
|
2484
2487
|
// src/dsm/design-system.ts
|
|
2485
|
-
var DesignSystemSwitcher =
|
|
2486
|
-
isEnabled:
|
|
2487
|
-
designSystemIds:
|
|
2488
|
+
var DesignSystemSwitcher = z99.object({
|
|
2489
|
+
isEnabled: z99.boolean(),
|
|
2490
|
+
designSystemIds: z99.array(z99.string())
|
|
2488
2491
|
});
|
|
2489
|
-
var DesignSystem =
|
|
2490
|
-
id:
|
|
2491
|
-
workspaceId:
|
|
2492
|
-
name:
|
|
2493
|
-
description:
|
|
2494
|
-
docExporterId: nullishToOptional(
|
|
2495
|
-
docSlug:
|
|
2496
|
-
docUserSlug: nullishToOptional(
|
|
2497
|
-
docSlugDeprecated:
|
|
2498
|
-
isPublic:
|
|
2499
|
-
isMultibrand:
|
|
2500
|
-
docViewUrl: nullishToOptional(
|
|
2501
|
-
basePrefixes:
|
|
2492
|
+
var DesignSystem = z99.object({
|
|
2493
|
+
id: z99.string(),
|
|
2494
|
+
workspaceId: z99.string(),
|
|
2495
|
+
name: z99.string(),
|
|
2496
|
+
description: z99.string(),
|
|
2497
|
+
docExporterId: nullishToOptional(z99.string()),
|
|
2498
|
+
docSlug: z99.string(),
|
|
2499
|
+
docUserSlug: nullishToOptional(z99.string()),
|
|
2500
|
+
docSlugDeprecated: z99.string(),
|
|
2501
|
+
isPublic: z99.boolean(),
|
|
2502
|
+
isMultibrand: z99.boolean(),
|
|
2503
|
+
docViewUrl: nullishToOptional(z99.string()),
|
|
2504
|
+
basePrefixes: z99.array(z99.string()),
|
|
2502
2505
|
designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
|
|
2503
|
-
createdAt:
|
|
2504
|
-
updatedAt:
|
|
2506
|
+
createdAt: z99.date(),
|
|
2507
|
+
updatedAt: z99.date()
|
|
2505
2508
|
});
|
|
2506
|
-
var DesignSystemWithWorkspace =
|
|
2509
|
+
var DesignSystemWithWorkspace = z99.object({
|
|
2507
2510
|
designSystem: DesignSystem,
|
|
2508
2511
|
workspace: Workspace
|
|
2509
2512
|
});
|
|
2510
2513
|
|
|
2511
2514
|
// src/dsm/desing-system-create.ts
|
|
2512
|
-
import { z as
|
|
2515
|
+
import { z as z100 } from "zod";
|
|
2513
2516
|
var DS_NAME_MIN_LENGTH = 2;
|
|
2514
2517
|
var DS_NAME_MAX_LENGTH = 64;
|
|
2515
2518
|
var DS_DESC_MIN_LENGTH = 2;
|
|
2516
2519
|
var DS_DESC_MAX_LENGTH = 64;
|
|
2517
|
-
var DesignSystemCreateInputMetadata =
|
|
2518
|
-
name:
|
|
2519
|
-
description:
|
|
2520
|
+
var DesignSystemCreateInputMetadata = z100.object({
|
|
2521
|
+
name: z100.string().min(DS_NAME_MIN_LENGTH).max(DS_NAME_MAX_LENGTH).trim(),
|
|
2522
|
+
description: z100.string().min(DS_DESC_MIN_LENGTH).max(DS_DESC_MAX_LENGTH).trim()
|
|
2520
2523
|
});
|
|
2521
|
-
var DesignSystemCreateInput =
|
|
2524
|
+
var DesignSystemCreateInput = z100.object({
|
|
2522
2525
|
meta: DesignSystemCreateInputMetadata,
|
|
2523
|
-
workspaceId:
|
|
2524
|
-
isPublic:
|
|
2525
|
-
basePrefixes:
|
|
2526
|
-
docUserSlug:
|
|
2527
|
-
source:
|
|
2526
|
+
workspaceId: z100.string(),
|
|
2527
|
+
isPublic: z100.boolean().optional(),
|
|
2528
|
+
basePrefixes: z100.array(z100.string()).optional(),
|
|
2529
|
+
docUserSlug: z100.string().nullish().optional(),
|
|
2530
|
+
source: z100.array(z100.string()).optional()
|
|
2528
2531
|
});
|
|
2529
2532
|
|
|
2530
2533
|
// src/dsm/desing-system-update.ts
|
|
2531
|
-
import { z as
|
|
2534
|
+
import { z as z101 } from "zod";
|
|
2532
2535
|
var DS_NAME_MIN_LENGTH2 = 2;
|
|
2533
2536
|
var DS_NAME_MAX_LENGTH2 = 64;
|
|
2534
2537
|
var DS_DESC_MIN_LENGTH2 = 2;
|
|
2535
2538
|
var DS_DESC_MAX_LENGTH2 = 64;
|
|
2536
|
-
var DesignSystemUpdateInputMetadata =
|
|
2537
|
-
name:
|
|
2538
|
-
description:
|
|
2539
|
+
var DesignSystemUpdateInputMetadata = z101.object({
|
|
2540
|
+
name: z101.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
2541
|
+
description: z101.string().min(DS_DESC_MIN_LENGTH2).max(DS_DESC_MAX_LENGTH2).trim().optional()
|
|
2539
2542
|
});
|
|
2540
|
-
var DesignSystemUpdateInput =
|
|
2543
|
+
var DesignSystemUpdateInput = z101.object({
|
|
2541
2544
|
meta: DesignSystemUpdateInputMetadata.optional(),
|
|
2542
|
-
workspaceId:
|
|
2543
|
-
isPublic:
|
|
2544
|
-
basePrefixes:
|
|
2545
|
-
docUserSlug:
|
|
2546
|
-
source:
|
|
2547
|
-
name:
|
|
2548
|
-
description:
|
|
2549
|
-
docExporterId:
|
|
2545
|
+
workspaceId: z101.string().optional(),
|
|
2546
|
+
isPublic: z101.boolean().optional(),
|
|
2547
|
+
basePrefixes: z101.array(z101.string()).optional(),
|
|
2548
|
+
docUserSlug: z101.string().nullish().optional(),
|
|
2549
|
+
source: z101.array(z101.string()).optional(),
|
|
2550
|
+
name: z101.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
2551
|
+
description: z101.string().min(DS_DESC_MIN_LENGTH2).max(DS_DESC_MAX_LENGTH2).trim().optional(),
|
|
2552
|
+
docExporterId: z101.string().optional()
|
|
2550
2553
|
});
|
|
2551
2554
|
|
|
2552
2555
|
// src/dsm/published-doc-page.ts
|
|
@@ -2558,54 +2561,54 @@ function tryParseShortPersistentId(url = "/") {
|
|
|
2558
2561
|
}
|
|
2559
2562
|
|
|
2560
2563
|
// src/dsm/published-doc.ts
|
|
2561
|
-
import { z as
|
|
2564
|
+
import { z as z102 } from "zod";
|
|
2562
2565
|
var publishedDocEnvironments = ["Live", "Preview"];
|
|
2563
|
-
var PublishedDocEnvironment =
|
|
2564
|
-
var PublishedDocsChecksums =
|
|
2565
|
-
var PublishedDocRoutingVersion =
|
|
2566
|
-
var PublishedDoc =
|
|
2567
|
-
id:
|
|
2568
|
-
designSystemVersionId:
|
|
2569
|
-
createdAt:
|
|
2570
|
-
updatedAt:
|
|
2571
|
-
lastPublishedAt:
|
|
2572
|
-
isDefault:
|
|
2573
|
-
isPublic:
|
|
2566
|
+
var PublishedDocEnvironment = z102.enum(publishedDocEnvironments);
|
|
2567
|
+
var PublishedDocsChecksums = z102.record(z102.string());
|
|
2568
|
+
var PublishedDocRoutingVersion = z102.enum(["1", "2"]);
|
|
2569
|
+
var PublishedDoc = z102.object({
|
|
2570
|
+
id: z102.string(),
|
|
2571
|
+
designSystemVersionId: z102.string(),
|
|
2572
|
+
createdAt: z102.date(),
|
|
2573
|
+
updatedAt: z102.date(),
|
|
2574
|
+
lastPublishedAt: z102.date(),
|
|
2575
|
+
isDefault: z102.boolean(),
|
|
2576
|
+
isPublic: z102.boolean(),
|
|
2574
2577
|
environment: PublishedDocEnvironment,
|
|
2575
2578
|
checksums: PublishedDocsChecksums,
|
|
2576
|
-
storagePath:
|
|
2577
|
-
wasMigrated:
|
|
2579
|
+
storagePath: z102.string(),
|
|
2580
|
+
wasMigrated: z102.boolean(),
|
|
2578
2581
|
routingVersion: PublishedDocRoutingVersion,
|
|
2579
|
-
usesLocalizations:
|
|
2580
|
-
wasPublishedWithLocalizations:
|
|
2582
|
+
usesLocalizations: z102.boolean(),
|
|
2583
|
+
wasPublishedWithLocalizations: z102.boolean()
|
|
2581
2584
|
});
|
|
2582
2585
|
|
|
2583
2586
|
// src/codegen/export-jobs.ts
|
|
2584
|
-
import { z as
|
|
2585
|
-
var ExporterJobDestination =
|
|
2586
|
-
var ExporterJobStatus =
|
|
2587
|
-
var ExporterJobLogEntryType =
|
|
2588
|
-
var ExporterJobLogEntry =
|
|
2589
|
-
id:
|
|
2590
|
-
time:
|
|
2587
|
+
import { z as z103 } from "zod";
|
|
2588
|
+
var ExporterJobDestination = z103.enum(["s3", "webhookUrl", "github", "documentation", "azure", "gitlab"]);
|
|
2589
|
+
var ExporterJobStatus = z103.enum(["InProgress", "Success", "Failed", "Timeout"]);
|
|
2590
|
+
var ExporterJobLogEntryType = z103.enum(["success", "info", "warning", "error", "user"]);
|
|
2591
|
+
var ExporterJobLogEntry = z103.object({
|
|
2592
|
+
id: z103.string().optional(),
|
|
2593
|
+
time: z103.coerce.date(),
|
|
2591
2594
|
type: ExporterJobLogEntryType,
|
|
2592
|
-
message:
|
|
2595
|
+
message: z103.string()
|
|
2593
2596
|
});
|
|
2594
|
-
var ExporterJobResultPullRequestDestination =
|
|
2595
|
-
pullRequestUrl:
|
|
2597
|
+
var ExporterJobResultPullRequestDestination = z103.object({
|
|
2598
|
+
pullRequestUrl: z103.string()
|
|
2596
2599
|
});
|
|
2597
|
-
var ExporterJobResultS3Destination =
|
|
2598
|
-
bucket:
|
|
2599
|
-
urlPrefix:
|
|
2600
|
-
path:
|
|
2601
|
-
files:
|
|
2600
|
+
var ExporterJobResultS3Destination = z103.object({
|
|
2601
|
+
bucket: z103.string(),
|
|
2602
|
+
urlPrefix: z103.string().optional(),
|
|
2603
|
+
path: z103.string(),
|
|
2604
|
+
files: z103.array(z103.string())
|
|
2602
2605
|
});
|
|
2603
|
-
var ExporterJobResultDocsDestination =
|
|
2604
|
-
url:
|
|
2606
|
+
var ExporterJobResultDocsDestination = z103.object({
|
|
2607
|
+
url: z103.string()
|
|
2605
2608
|
});
|
|
2606
|
-
var ExporterJobResult =
|
|
2607
|
-
error:
|
|
2608
|
-
logs:
|
|
2609
|
+
var ExporterJobResult = z103.object({
|
|
2610
|
+
error: z103.string().optional(),
|
|
2611
|
+
logs: z103.array(ExporterJobLogEntry).optional(),
|
|
2609
2612
|
s3: ExporterJobResultS3Destination.optional(),
|
|
2610
2613
|
github: ExporterJobResultPullRequestDestination.optional(),
|
|
2611
2614
|
azure: ExporterJobResultPullRequestDestination.optional(),
|
|
@@ -2613,68 +2616,68 @@ var ExporterJobResult = z102.object({
|
|
|
2613
2616
|
bitbucket: ExporterJobResultPullRequestDestination.optional(),
|
|
2614
2617
|
sndocs: ExporterJobResultDocsDestination.optional()
|
|
2615
2618
|
});
|
|
2616
|
-
var ExporterDestinationSnDocs =
|
|
2619
|
+
var ExporterDestinationSnDocs = z103.object({
|
|
2617
2620
|
environment: PublishedDocEnvironment
|
|
2618
2621
|
});
|
|
2619
|
-
var ExporterDestinationS3 =
|
|
2620
|
-
var ExporterDestinationGithub =
|
|
2621
|
-
connectionId:
|
|
2622
|
-
url:
|
|
2623
|
-
branch:
|
|
2624
|
-
relativePath:
|
|
2622
|
+
var ExporterDestinationS3 = z103.object({});
|
|
2623
|
+
var ExporterDestinationGithub = z103.object({
|
|
2624
|
+
connectionId: z103.string(),
|
|
2625
|
+
url: z103.string(),
|
|
2626
|
+
branch: z103.string(),
|
|
2627
|
+
relativePath: z103.string(),
|
|
2625
2628
|
// +
|
|
2626
|
-
userId:
|
|
2627
|
-
});
|
|
2628
|
-
var ExporterDestinationAzure =
|
|
2629
|
-
connectionId:
|
|
2630
|
-
organizationId:
|
|
2631
|
-
projectId:
|
|
2632
|
-
repositoryId:
|
|
2633
|
-
branch:
|
|
2634
|
-
relativePath:
|
|
2629
|
+
userId: z103.coerce.string()
|
|
2630
|
+
});
|
|
2631
|
+
var ExporterDestinationAzure = z103.object({
|
|
2632
|
+
connectionId: z103.string(),
|
|
2633
|
+
organizationId: z103.string(),
|
|
2634
|
+
projectId: z103.string(),
|
|
2635
|
+
repositoryId: z103.string(),
|
|
2636
|
+
branch: z103.string(),
|
|
2637
|
+
relativePath: z103.string(),
|
|
2635
2638
|
// +
|
|
2636
|
-
userId:
|
|
2637
|
-
url:
|
|
2638
|
-
});
|
|
2639
|
-
var ExporterDestinationGitlab =
|
|
2640
|
-
connectionId:
|
|
2641
|
-
projectId:
|
|
2642
|
-
branch:
|
|
2643
|
-
relativePath:
|
|
2639
|
+
userId: z103.coerce.string(),
|
|
2640
|
+
url: z103.string()
|
|
2641
|
+
});
|
|
2642
|
+
var ExporterDestinationGitlab = z103.object({
|
|
2643
|
+
connectionId: z103.string(),
|
|
2644
|
+
projectId: z103.string(),
|
|
2645
|
+
branch: z103.string(),
|
|
2646
|
+
relativePath: z103.string(),
|
|
2644
2647
|
// +
|
|
2645
|
-
userId:
|
|
2646
|
-
url:
|
|
2648
|
+
userId: z103.coerce.string(),
|
|
2649
|
+
url: z103.string()
|
|
2647
2650
|
});
|
|
2648
2651
|
var BITBUCKET_SLUG = /^[-a-zA-Z0-9~]*$/;
|
|
2649
2652
|
var BITBUCKET_MAX_LENGTH = 64;
|
|
2650
|
-
var ExporterDestinationBitbucket =
|
|
2651
|
-
connectionId:
|
|
2652
|
-
workspaceSlug:
|
|
2653
|
-
projectKey:
|
|
2654
|
-
repoSlug:
|
|
2655
|
-
branch:
|
|
2656
|
-
relativePath:
|
|
2653
|
+
var ExporterDestinationBitbucket = z103.object({
|
|
2654
|
+
connectionId: z103.string(),
|
|
2655
|
+
workspaceSlug: z103.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2656
|
+
projectKey: z103.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2657
|
+
repoSlug: z103.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2658
|
+
branch: z103.string(),
|
|
2659
|
+
relativePath: z103.string(),
|
|
2657
2660
|
// +
|
|
2658
|
-
userId:
|
|
2659
|
-
url:
|
|
2660
|
-
});
|
|
2661
|
-
var ExporterJob =
|
|
2662
|
-
id:
|
|
2663
|
-
createdAt:
|
|
2664
|
-
finishedAt:
|
|
2665
|
-
designSystemId:
|
|
2666
|
-
designSystemVersionId:
|
|
2667
|
-
workspaceId:
|
|
2668
|
-
scheduleId:
|
|
2669
|
-
exporterId:
|
|
2670
|
-
brandId:
|
|
2671
|
-
themeId:
|
|
2672
|
-
estimatedExecutionTime:
|
|
2661
|
+
userId: z103.coerce.string(),
|
|
2662
|
+
url: z103.string()
|
|
2663
|
+
});
|
|
2664
|
+
var ExporterJob = z103.object({
|
|
2665
|
+
id: z103.coerce.string(),
|
|
2666
|
+
createdAt: z103.coerce.date(),
|
|
2667
|
+
finishedAt: z103.coerce.date().optional(),
|
|
2668
|
+
designSystemId: z103.coerce.string(),
|
|
2669
|
+
designSystemVersionId: z103.coerce.string(),
|
|
2670
|
+
workspaceId: z103.coerce.string(),
|
|
2671
|
+
scheduleId: z103.coerce.string().nullish(),
|
|
2672
|
+
exporterId: z103.coerce.string(),
|
|
2673
|
+
brandId: z103.coerce.string().optional(),
|
|
2674
|
+
themeId: z103.coerce.string().optional(),
|
|
2675
|
+
estimatedExecutionTime: z103.number().optional(),
|
|
2673
2676
|
status: ExporterJobStatus,
|
|
2674
2677
|
result: ExporterJobResult.optional(),
|
|
2675
|
-
createdByUserId:
|
|
2678
|
+
createdByUserId: z103.string().optional(),
|
|
2676
2679
|
// CodegenDestinationsModel
|
|
2677
|
-
webhookUrl:
|
|
2680
|
+
webhookUrl: z103.string().optional(),
|
|
2678
2681
|
destinationSnDocs: ExporterDestinationSnDocs.optional(),
|
|
2679
2682
|
destinationS3: ExporterDestinationS3.optional(),
|
|
2680
2683
|
destinationGithub: ExporterDestinationGithub.optional(),
|
|
@@ -2693,28 +2696,28 @@ var ExporterJobFindByFilter = ExporterJob.pick({
|
|
|
2693
2696
|
themeId: true,
|
|
2694
2697
|
brandId: true
|
|
2695
2698
|
}).extend({
|
|
2696
|
-
destinations:
|
|
2699
|
+
destinations: z103.array(ExporterJobDestination),
|
|
2697
2700
|
docsEnvironment: PublishedDocEnvironment
|
|
2698
2701
|
}).partial();
|
|
2699
2702
|
|
|
2700
2703
|
// src/codegen/exporter-workspace-membership-role.ts
|
|
2701
|
-
import { z as
|
|
2702
|
-
var ExporterWorkspaceMembershipRole =
|
|
2704
|
+
import { z as z104 } from "zod";
|
|
2705
|
+
var ExporterWorkspaceMembershipRole = z104.enum(["Owner", "OwnerArchived", "User"]);
|
|
2703
2706
|
|
|
2704
2707
|
// src/codegen/exporter-workspace-membership.ts
|
|
2705
|
-
import { z as
|
|
2706
|
-
var ExporterWorkspaceMembership =
|
|
2707
|
-
id:
|
|
2708
|
-
workspaceId:
|
|
2709
|
-
exporterId:
|
|
2708
|
+
import { z as z105 } from "zod";
|
|
2709
|
+
var ExporterWorkspaceMembership = z105.object({
|
|
2710
|
+
id: z105.string(),
|
|
2711
|
+
workspaceId: z105.string(),
|
|
2712
|
+
exporterId: z105.string(),
|
|
2710
2713
|
role: ExporterWorkspaceMembershipRole
|
|
2711
2714
|
});
|
|
2712
2715
|
|
|
2713
2716
|
// src/codegen/exporter.ts
|
|
2714
|
-
import { z as
|
|
2717
|
+
import { z as z108 } from "zod";
|
|
2715
2718
|
|
|
2716
2719
|
// src/codegen/git-providers.ts
|
|
2717
|
-
import { z as
|
|
2720
|
+
import { z as z106 } from "zod";
|
|
2718
2721
|
var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
2719
2722
|
GitProviderNames2["Azure"] = "azure";
|
|
2720
2723
|
GitProviderNames2["Github"] = "github";
|
|
@@ -2722,11 +2725,11 @@ var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
|
2722
2725
|
GitProviderNames2["Bitbucket"] = "bitbucket";
|
|
2723
2726
|
return GitProviderNames2;
|
|
2724
2727
|
})(GitProviderNames || {});
|
|
2725
|
-
var GitProvider =
|
|
2728
|
+
var GitProvider = z106.nativeEnum(GitProviderNames);
|
|
2726
2729
|
|
|
2727
2730
|
// src/codegen/pulsar.ts
|
|
2728
|
-
import { z as
|
|
2729
|
-
var PulsarPropertyType =
|
|
2731
|
+
import { z as z107 } from "zod";
|
|
2732
|
+
var PulsarPropertyType = z107.enum([
|
|
2730
2733
|
"string",
|
|
2731
2734
|
"number",
|
|
2732
2735
|
"boolean",
|
|
@@ -2739,108 +2742,108 @@ var PulsarPropertyType = z106.enum([
|
|
|
2739
2742
|
"tokenProperties",
|
|
2740
2743
|
"tokenType"
|
|
2741
2744
|
]);
|
|
2742
|
-
var PulsarBaseProperty =
|
|
2743
|
-
label:
|
|
2744
|
-
key:
|
|
2745
|
-
description:
|
|
2745
|
+
var PulsarBaseProperty = z107.object({
|
|
2746
|
+
label: z107.string(),
|
|
2747
|
+
key: z107.string(),
|
|
2748
|
+
description: z107.string().nullish(),
|
|
2746
2749
|
type: PulsarPropertyType,
|
|
2747
|
-
values:
|
|
2748
|
-
default:
|
|
2750
|
+
values: z107.array(z107.string()).nullish(),
|
|
2751
|
+
default: z107.union([z107.string(), z107.boolean(), z107.number()]).nullish(),
|
|
2749
2752
|
// PulsarPropertyValueType //is optional?
|
|
2750
|
-
inputType:
|
|
2753
|
+
inputType: z107.enum(["code", "plain"]).optional(),
|
|
2751
2754
|
//is optional?
|
|
2752
|
-
isMultiline:
|
|
2755
|
+
isMultiline: z107.boolean().nullish()
|
|
2753
2756
|
});
|
|
2754
2757
|
var PulsarContributionConfigurationProperty = PulsarBaseProperty.extend({
|
|
2755
|
-
category:
|
|
2758
|
+
category: z107.string()
|
|
2756
2759
|
});
|
|
2757
|
-
var PulsarContributionVariant =
|
|
2758
|
-
key:
|
|
2759
|
-
name:
|
|
2760
|
-
isDefault:
|
|
2761
|
-
description:
|
|
2762
|
-
thumbnailURL:
|
|
2760
|
+
var PulsarContributionVariant = z107.object({
|
|
2761
|
+
key: z107.string(),
|
|
2762
|
+
name: z107.string(),
|
|
2763
|
+
isDefault: z107.boolean().nullish(),
|
|
2764
|
+
description: z107.string().nullish(),
|
|
2765
|
+
thumbnailURL: z107.string().nullish()
|
|
2763
2766
|
});
|
|
2764
|
-
var PulsarCustomBlock =
|
|
2765
|
-
title:
|
|
2766
|
-
key:
|
|
2767
|
-
category:
|
|
2768
|
-
description: nullishToOptional(
|
|
2769
|
-
iconURL:
|
|
2770
|
-
mode:
|
|
2771
|
-
properties:
|
|
2767
|
+
var PulsarCustomBlock = z107.object({
|
|
2768
|
+
title: z107.string(),
|
|
2769
|
+
key: z107.string(),
|
|
2770
|
+
category: z107.string(),
|
|
2771
|
+
description: nullishToOptional(z107.string()),
|
|
2772
|
+
iconURL: z107.string(),
|
|
2773
|
+
mode: z107.enum(["array", "block"]),
|
|
2774
|
+
properties: z107.array(PulsarBaseProperty)
|
|
2772
2775
|
});
|
|
2773
2776
|
|
|
2774
2777
|
// src/codegen/exporter.ts
|
|
2775
|
-
var ExporterType =
|
|
2776
|
-
var ExporterSource =
|
|
2777
|
-
var ExporterTag =
|
|
2778
|
-
var ExporterDetails =
|
|
2779
|
-
description:
|
|
2780
|
-
version:
|
|
2781
|
-
routingVersion: nullishToOptional(
|
|
2782
|
-
author: nullishToOptional(
|
|
2783
|
-
organization: nullishToOptional(
|
|
2784
|
-
homepage: nullishToOptional(
|
|
2785
|
-
readme: nullishToOptional(
|
|
2786
|
-
tags: nullishToOptional(
|
|
2787
|
-
packageId: nullishToOptional(
|
|
2788
|
-
iconURL: nullishToOptional(
|
|
2789
|
-
configurationProperties: nullishToOptional(
|
|
2790
|
-
customBlocks: nullishToOptional(
|
|
2791
|
-
blockVariants: nullishToOptional(
|
|
2792
|
-
usesBrands: nullishToOptional(
|
|
2793
|
-
usesThemes: nullishToOptional(
|
|
2778
|
+
var ExporterType = z108.enum(["code", "documentation"]);
|
|
2779
|
+
var ExporterSource = z108.enum(["git", "upload"]);
|
|
2780
|
+
var ExporterTag = z108.string().regex(/^[0-9a-zA-Z]+(\s[0-9a-zA-Z]+)*$/);
|
|
2781
|
+
var ExporterDetails = z108.object({
|
|
2782
|
+
description: z108.string(),
|
|
2783
|
+
version: z108.string(),
|
|
2784
|
+
routingVersion: nullishToOptional(z108.string()),
|
|
2785
|
+
author: nullishToOptional(z108.string()),
|
|
2786
|
+
organization: nullishToOptional(z108.string()),
|
|
2787
|
+
homepage: nullishToOptional(z108.string()),
|
|
2788
|
+
readme: nullishToOptional(z108.string()),
|
|
2789
|
+
tags: nullishToOptional(z108.array(ExporterTag)).default([]),
|
|
2790
|
+
packageId: nullishToOptional(z108.string().max(255)),
|
|
2791
|
+
iconURL: nullishToOptional(z108.string()),
|
|
2792
|
+
configurationProperties: nullishToOptional(z108.array(PulsarContributionConfigurationProperty)).default([]),
|
|
2793
|
+
customBlocks: nullishToOptional(z108.array(PulsarCustomBlock)).default([]),
|
|
2794
|
+
blockVariants: nullishToOptional(z108.record(z108.string(), z108.array(PulsarContributionVariant))).default({}),
|
|
2795
|
+
usesBrands: nullishToOptional(z108.boolean()).default(false),
|
|
2796
|
+
usesThemes: nullishToOptional(z108.boolean()).default(false),
|
|
2794
2797
|
source: ExporterSource,
|
|
2795
2798
|
gitProvider: nullishToOptional(GitProvider),
|
|
2796
|
-
gitUrl: nullishToOptional(
|
|
2797
|
-
gitBranch: nullishToOptional(
|
|
2798
|
-
gitDirectory: nullishToOptional(
|
|
2799
|
+
gitUrl: nullishToOptional(z108.string()),
|
|
2800
|
+
gitBranch: nullishToOptional(z108.string()),
|
|
2801
|
+
gitDirectory: nullishToOptional(z108.string())
|
|
2799
2802
|
});
|
|
2800
|
-
var Exporter =
|
|
2801
|
-
id:
|
|
2802
|
-
createdAt:
|
|
2803
|
-
name:
|
|
2804
|
-
isPrivate:
|
|
2803
|
+
var Exporter = z108.object({
|
|
2804
|
+
id: z108.string(),
|
|
2805
|
+
createdAt: z108.coerce.date(),
|
|
2806
|
+
name: z108.string(),
|
|
2807
|
+
isPrivate: z108.boolean(),
|
|
2805
2808
|
details: ExporterDetails,
|
|
2806
2809
|
exporterType: nullishToOptional(ExporterType).default("code"),
|
|
2807
|
-
storagePath: nullishToOptional(
|
|
2810
|
+
storagePath: nullishToOptional(z108.string()).default("")
|
|
2808
2811
|
});
|
|
2809
2812
|
|
|
2810
2813
|
// src/custom-domains/custom-domains.ts
|
|
2811
|
-
import { z as
|
|
2812
|
-
var CustomDomain =
|
|
2813
|
-
id:
|
|
2814
|
-
designSystemId:
|
|
2815
|
-
state:
|
|
2816
|
-
supernovaDomain:
|
|
2817
|
-
customerDomain:
|
|
2818
|
-
error:
|
|
2819
|
-
errorCode:
|
|
2814
|
+
import { z as z109 } from "zod";
|
|
2815
|
+
var CustomDomain = z109.object({
|
|
2816
|
+
id: z109.string(),
|
|
2817
|
+
designSystemId: z109.string(),
|
|
2818
|
+
state: z109.string(),
|
|
2819
|
+
supernovaDomain: z109.string(),
|
|
2820
|
+
customerDomain: z109.string().nullish(),
|
|
2821
|
+
error: z109.string().nullish(),
|
|
2822
|
+
errorCode: z109.string().nullish()
|
|
2820
2823
|
});
|
|
2821
2824
|
|
|
2822
2825
|
// src/docs-server/session.ts
|
|
2823
|
-
import { z as
|
|
2826
|
+
import { z as z114 } from "zod";
|
|
2824
2827
|
|
|
2825
2828
|
// src/users/linked-integrations.ts
|
|
2826
|
-
import { z as
|
|
2827
|
-
var IntegrationAuthType =
|
|
2828
|
-
var ExternalServiceType =
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2829
|
+
import { z as z110 } from "zod";
|
|
2830
|
+
var IntegrationAuthType = z110.union([z110.literal("OAuth2"), z110.literal("PAT")]);
|
|
2831
|
+
var ExternalServiceType = z110.union([
|
|
2832
|
+
z110.literal("figma"),
|
|
2833
|
+
z110.literal("github"),
|
|
2834
|
+
z110.literal("azure"),
|
|
2835
|
+
z110.literal("gitlab"),
|
|
2836
|
+
z110.literal("bitbucket")
|
|
2834
2837
|
]);
|
|
2835
|
-
var IntegrationUserInfo =
|
|
2836
|
-
id:
|
|
2837
|
-
handle:
|
|
2838
|
-
avatarUrl:
|
|
2839
|
-
email:
|
|
2838
|
+
var IntegrationUserInfo = z110.object({
|
|
2839
|
+
id: z110.string(),
|
|
2840
|
+
handle: z110.string().optional(),
|
|
2841
|
+
avatarUrl: z110.string().optional(),
|
|
2842
|
+
email: z110.string().optional(),
|
|
2840
2843
|
authType: IntegrationAuthType.optional(),
|
|
2841
|
-
customUrl:
|
|
2844
|
+
customUrl: z110.string().optional()
|
|
2842
2845
|
});
|
|
2843
|
-
var UserLinkedIntegrations =
|
|
2846
|
+
var UserLinkedIntegrations = z110.object({
|
|
2844
2847
|
figma: IntegrationUserInfo.optional(),
|
|
2845
2848
|
github: IntegrationUserInfo.array().optional(),
|
|
2846
2849
|
azure: IntegrationUserInfo.array().optional(),
|
|
@@ -2849,86 +2852,86 @@ var UserLinkedIntegrations = z109.object({
|
|
|
2849
2852
|
});
|
|
2850
2853
|
|
|
2851
2854
|
// src/users/user-identity.ts
|
|
2852
|
-
import { z as
|
|
2853
|
-
var UserIdentity =
|
|
2854
|
-
id:
|
|
2855
|
-
userId:
|
|
2855
|
+
import { z as z111 } from "zod";
|
|
2856
|
+
var UserIdentity = z111.object({
|
|
2857
|
+
id: z111.string(),
|
|
2858
|
+
userId: z111.string()
|
|
2856
2859
|
});
|
|
2857
2860
|
|
|
2858
2861
|
// src/users/user-profile.ts
|
|
2859
|
-
import { z as
|
|
2860
|
-
var UserOnboardingDepartment =
|
|
2861
|
-
var UserOnboardingJobLevel =
|
|
2862
|
-
var UserOnboarding =
|
|
2863
|
-
companyName:
|
|
2864
|
-
numberOfPeopleInOrg:
|
|
2865
|
-
numberOfPeopleInDesignTeam:
|
|
2862
|
+
import { z as z112 } from "zod";
|
|
2863
|
+
var UserOnboardingDepartment = z112.enum(["Design", "Engineering", "Brand", "Other"]);
|
|
2864
|
+
var UserOnboardingJobLevel = z112.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
2865
|
+
var UserOnboarding = z112.object({
|
|
2866
|
+
companyName: z112.string().optional(),
|
|
2867
|
+
numberOfPeopleInOrg: z112.string().optional(),
|
|
2868
|
+
numberOfPeopleInDesignTeam: z112.string().optional(),
|
|
2866
2869
|
department: UserOnboardingDepartment.optional(),
|
|
2867
|
-
jobTitle:
|
|
2868
|
-
phase:
|
|
2870
|
+
jobTitle: z112.string().optional(),
|
|
2871
|
+
phase: z112.string().optional(),
|
|
2869
2872
|
jobLevel: UserOnboardingJobLevel.optional()
|
|
2870
2873
|
});
|
|
2871
|
-
var UserProfile =
|
|
2872
|
-
name:
|
|
2873
|
-
avatar:
|
|
2874
|
-
nickname:
|
|
2874
|
+
var UserProfile = z112.object({
|
|
2875
|
+
name: z112.string(),
|
|
2876
|
+
avatar: z112.string().optional(),
|
|
2877
|
+
nickname: z112.string().optional(),
|
|
2875
2878
|
onboarding: UserOnboarding.optional()
|
|
2876
2879
|
});
|
|
2877
2880
|
|
|
2878
2881
|
// src/users/user.ts
|
|
2879
|
-
import { z as
|
|
2880
|
-
var User =
|
|
2881
|
-
id:
|
|
2882
|
-
email:
|
|
2883
|
-
emailVerified:
|
|
2884
|
-
createdAt:
|
|
2885
|
-
trialExpiresAt:
|
|
2882
|
+
import { z as z113 } from "zod";
|
|
2883
|
+
var User = z113.object({
|
|
2884
|
+
id: z113.string(),
|
|
2885
|
+
email: z113.string(),
|
|
2886
|
+
emailVerified: z113.boolean(),
|
|
2887
|
+
createdAt: z113.date(),
|
|
2888
|
+
trialExpiresAt: z113.date().optional(),
|
|
2886
2889
|
profile: UserProfile,
|
|
2887
2890
|
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
2888
|
-
loggedOutAt:
|
|
2889
|
-
isProtected:
|
|
2891
|
+
loggedOutAt: z113.date().optional(),
|
|
2892
|
+
isProtected: z113.boolean()
|
|
2890
2893
|
});
|
|
2891
2894
|
|
|
2892
2895
|
// src/docs-server/session.ts
|
|
2893
|
-
var NpmProxyToken =
|
|
2894
|
-
access:
|
|
2895
|
-
expiresAt:
|
|
2896
|
+
var NpmProxyToken = z114.object({
|
|
2897
|
+
access: z114.string(),
|
|
2898
|
+
expiresAt: z114.number()
|
|
2896
2899
|
});
|
|
2897
|
-
var SessionData =
|
|
2898
|
-
returnToUrl:
|
|
2900
|
+
var SessionData = z114.object({
|
|
2901
|
+
returnToUrl: z114.string().optional(),
|
|
2899
2902
|
npmProxyToken: NpmProxyToken.optional()
|
|
2900
2903
|
});
|
|
2901
|
-
var Session =
|
|
2902
|
-
id:
|
|
2903
|
-
expiresAt:
|
|
2904
|
-
userId:
|
|
2904
|
+
var Session = z114.object({
|
|
2905
|
+
id: z114.string(),
|
|
2906
|
+
expiresAt: z114.date(),
|
|
2907
|
+
userId: z114.string().nullable(),
|
|
2905
2908
|
data: SessionData
|
|
2906
2909
|
});
|
|
2907
|
-
var AuthTokens =
|
|
2908
|
-
access:
|
|
2909
|
-
refresh:
|
|
2910
|
+
var AuthTokens = z114.object({
|
|
2911
|
+
access: z114.string(),
|
|
2912
|
+
refresh: z114.string()
|
|
2910
2913
|
});
|
|
2911
|
-
var UserSession =
|
|
2914
|
+
var UserSession = z114.object({
|
|
2912
2915
|
session: Session,
|
|
2913
2916
|
user: User.nullable()
|
|
2914
2917
|
});
|
|
2915
2918
|
|
|
2916
2919
|
// src/feature-flags/feature-flags.ts
|
|
2917
|
-
import { z as
|
|
2918
|
-
var FlaggedFeature =
|
|
2919
|
-
var FeatureFlagMap =
|
|
2920
|
-
var FeatureFlag =
|
|
2921
|
-
id:
|
|
2920
|
+
import { z as z115 } from "zod";
|
|
2921
|
+
var FlaggedFeature = z115.enum(["FigmaImporterV2"]);
|
|
2922
|
+
var FeatureFlagMap = z115.record(FlaggedFeature, z115.boolean());
|
|
2923
|
+
var FeatureFlag = z115.object({
|
|
2924
|
+
id: z115.string(),
|
|
2922
2925
|
feature: FlaggedFeature,
|
|
2923
|
-
createdAt:
|
|
2924
|
-
enabled:
|
|
2926
|
+
createdAt: z115.date(),
|
|
2927
|
+
enabled: z115.boolean()
|
|
2925
2928
|
});
|
|
2926
2929
|
|
|
2927
2930
|
// src/integrations/external-oauth-request.ts
|
|
2928
|
-
import { z as
|
|
2931
|
+
import { z as z117 } from "zod";
|
|
2929
2932
|
|
|
2930
2933
|
// src/integrations/oauth-providers.ts
|
|
2931
|
-
import { z as
|
|
2934
|
+
import { z as z116 } from "zod";
|
|
2932
2935
|
var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
2933
2936
|
OAuthProviderNames2["Figma"] = "figma";
|
|
2934
2937
|
OAuthProviderNames2["Azure"] = "azure";
|
|
@@ -2937,122 +2940,122 @@ var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
|
2937
2940
|
OAuthProviderNames2["Bitbucket"] = "bitbucket";
|
|
2938
2941
|
return OAuthProviderNames2;
|
|
2939
2942
|
})(OAuthProviderNames || {});
|
|
2940
|
-
var OAuthProviderSchema =
|
|
2943
|
+
var OAuthProviderSchema = z116.nativeEnum(OAuthProviderNames);
|
|
2941
2944
|
var OAuthProvider = OAuthProviderSchema.enum;
|
|
2942
2945
|
|
|
2943
2946
|
// src/integrations/external-oauth-request.ts
|
|
2944
|
-
var ExternalOAuthRequest =
|
|
2945
|
-
id:
|
|
2947
|
+
var ExternalOAuthRequest = z117.object({
|
|
2948
|
+
id: z117.string(),
|
|
2946
2949
|
provider: OAuthProviderSchema,
|
|
2947
|
-
userId:
|
|
2948
|
-
state:
|
|
2949
|
-
createdAt:
|
|
2950
|
+
userId: z117.string(),
|
|
2951
|
+
state: z117.string(),
|
|
2952
|
+
createdAt: z117.date()
|
|
2950
2953
|
});
|
|
2951
2954
|
|
|
2952
2955
|
// src/integrations/oauth-token.ts
|
|
2953
|
-
import { z as
|
|
2954
|
-
var IntegrationTokenSchema =
|
|
2955
|
-
id:
|
|
2956
|
+
import { z as z118 } from "zod";
|
|
2957
|
+
var IntegrationTokenSchema = z118.object({
|
|
2958
|
+
id: z118.string(),
|
|
2956
2959
|
provider: OAuthProviderSchema,
|
|
2957
|
-
scope:
|
|
2958
|
-
userId:
|
|
2959
|
-
accessToken:
|
|
2960
|
-
refreshToken:
|
|
2961
|
-
expiresAt:
|
|
2962
|
-
externalUserId:
|
|
2960
|
+
scope: z118.string(),
|
|
2961
|
+
userId: z118.string(),
|
|
2962
|
+
accessToken: z118.string(),
|
|
2963
|
+
refreshToken: z118.string(),
|
|
2964
|
+
expiresAt: z118.date(),
|
|
2965
|
+
externalUserId: z118.string().nullish()
|
|
2963
2966
|
});
|
|
2964
2967
|
|
|
2965
2968
|
// src/multiplayer/design-system-version-room.ts
|
|
2966
|
-
import { z as
|
|
2969
|
+
import { z as z119 } from "zod";
|
|
2967
2970
|
var DesignSystemVersionRoom = Entity.extend({
|
|
2968
|
-
designSystemVersionId:
|
|
2969
|
-
liveblocksId:
|
|
2971
|
+
designSystemVersionId: z119.string(),
|
|
2972
|
+
liveblocksId: z119.string()
|
|
2970
2973
|
});
|
|
2971
2974
|
|
|
2972
2975
|
// src/multiplayer/documentation-page-room.ts
|
|
2973
|
-
import { z as
|
|
2976
|
+
import { z as z120 } from "zod";
|
|
2974
2977
|
var DocumentationPageRoom = Entity.extend({
|
|
2975
|
-
designSystemVersionId:
|
|
2976
|
-
documentationPageId:
|
|
2977
|
-
liveblocksId:
|
|
2978
|
+
designSystemVersionId: z120.string(),
|
|
2979
|
+
documentationPageId: z120.string(),
|
|
2980
|
+
liveblocksId: z120.string()
|
|
2978
2981
|
});
|
|
2979
2982
|
|
|
2980
2983
|
// src/multiplayer/room-type.ts
|
|
2981
|
-
import { z as
|
|
2984
|
+
import { z as z121 } from "zod";
|
|
2982
2985
|
var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
2983
2986
|
RoomTypeEnum2["DocumentationPage"] = "documentation-page";
|
|
2984
2987
|
RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
|
|
2985
2988
|
return RoomTypeEnum2;
|
|
2986
2989
|
})(RoomTypeEnum || {});
|
|
2987
|
-
var RoomTypeSchema =
|
|
2990
|
+
var RoomTypeSchema = z121.nativeEnum(RoomTypeEnum);
|
|
2988
2991
|
var RoomType = RoomTypeSchema.enum;
|
|
2989
2992
|
|
|
2990
2993
|
// src/npm/npm-package.ts
|
|
2991
|
-
import { z as
|
|
2992
|
-
var AnyRecord =
|
|
2994
|
+
import { z as z122 } from "zod";
|
|
2995
|
+
var AnyRecord = z122.record(z122.any());
|
|
2993
2996
|
var NpmPackageVersionDist = AnyRecord.and(
|
|
2994
|
-
|
|
2995
|
-
tarball:
|
|
2997
|
+
z122.object({
|
|
2998
|
+
tarball: z122.string()
|
|
2996
2999
|
})
|
|
2997
3000
|
);
|
|
2998
3001
|
var NpmPackageVersion = AnyRecord.and(
|
|
2999
|
-
|
|
3002
|
+
z122.object({
|
|
3000
3003
|
dist: NpmPackageVersionDist
|
|
3001
3004
|
})
|
|
3002
3005
|
);
|
|
3003
3006
|
var NpmPackage = AnyRecord.and(
|
|
3004
|
-
|
|
3005
|
-
_id:
|
|
3006
|
-
name:
|
|
3007
|
+
z122.object({
|
|
3008
|
+
_id: z122.string(),
|
|
3009
|
+
name: z122.string(),
|
|
3007
3010
|
// e.g. "latest": "1.2.3"
|
|
3008
|
-
"dist-tags":
|
|
3011
|
+
"dist-tags": z122.record(z122.string(), z122.string()),
|
|
3009
3012
|
// "1.2.3": {...}
|
|
3010
|
-
versions:
|
|
3013
|
+
versions: z122.record(NpmPackageVersion)
|
|
3011
3014
|
})
|
|
3012
3015
|
);
|
|
3013
3016
|
|
|
3014
3017
|
// src/npm/npm-proxy-token-payload.ts
|
|
3015
|
-
import { z as
|
|
3016
|
-
var NpmProxyTokenPayload =
|
|
3017
|
-
npmProxyRegistryConfigId:
|
|
3018
|
+
import { z as z123 } from "zod";
|
|
3019
|
+
var NpmProxyTokenPayload = z123.object({
|
|
3020
|
+
npmProxyRegistryConfigId: z123.string()
|
|
3018
3021
|
});
|
|
3019
3022
|
|
|
3020
3023
|
// src/tokens/personal-access-token.ts
|
|
3021
|
-
import { z as
|
|
3022
|
-
var PersonalAccessToken =
|
|
3023
|
-
id:
|
|
3024
|
-
userId:
|
|
3025
|
-
name:
|
|
3026
|
-
token:
|
|
3027
|
-
createdAt:
|
|
3028
|
-
hidden:
|
|
3029
|
-
workspaceId:
|
|
3024
|
+
import { z as z124 } from "zod";
|
|
3025
|
+
var PersonalAccessToken = z124.object({
|
|
3026
|
+
id: z124.string(),
|
|
3027
|
+
userId: z124.string(),
|
|
3028
|
+
name: z124.string(),
|
|
3029
|
+
token: z124.string(),
|
|
3030
|
+
createdAt: z124.date(),
|
|
3031
|
+
hidden: z124.boolean(),
|
|
3032
|
+
workspaceId: z124.string().optional(),
|
|
3030
3033
|
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
3031
|
-
expireAt:
|
|
3032
|
-
scope:
|
|
3034
|
+
expireAt: z124.date().optional(),
|
|
3035
|
+
scope: z124.string().optional()
|
|
3033
3036
|
});
|
|
3034
3037
|
|
|
3035
3038
|
// src/utils/content-loader-instruction.ts
|
|
3036
|
-
import { z as
|
|
3037
|
-
var ContentLoadInstruction =
|
|
3038
|
-
from:
|
|
3039
|
-
to:
|
|
3040
|
-
authorizationHeaderKvsId:
|
|
3041
|
-
timeout:
|
|
3042
|
-
});
|
|
3043
|
-
var ContentLoaderPayload =
|
|
3044
|
-
type:
|
|
3039
|
+
import { z as z125 } from "zod";
|
|
3040
|
+
var ContentLoadInstruction = z125.object({
|
|
3041
|
+
from: z125.string(),
|
|
3042
|
+
to: z125.string(),
|
|
3043
|
+
authorizationHeaderKvsId: z125.string().optional(),
|
|
3044
|
+
timeout: z125.number().optional()
|
|
3045
|
+
});
|
|
3046
|
+
var ContentLoaderPayload = z125.object({
|
|
3047
|
+
type: z125.literal("Single"),
|
|
3045
3048
|
instruction: ContentLoadInstruction
|
|
3046
3049
|
}).or(
|
|
3047
|
-
|
|
3048
|
-
type:
|
|
3049
|
-
loadingChunkSize:
|
|
3050
|
-
instructions:
|
|
3050
|
+
z125.object({
|
|
3051
|
+
type: z125.literal("Multiple"),
|
|
3052
|
+
loadingChunkSize: z125.number().optional(),
|
|
3053
|
+
instructions: z125.array(ContentLoadInstruction)
|
|
3051
3054
|
})
|
|
3052
3055
|
).or(
|
|
3053
|
-
|
|
3054
|
-
type:
|
|
3055
|
-
location:
|
|
3056
|
+
z125.object({
|
|
3057
|
+
type: z125.literal("S3"),
|
|
3058
|
+
location: z125.string()
|
|
3056
3059
|
})
|
|
3057
3060
|
);
|
|
3058
3061
|
export {
|