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