@supernova-studio/client 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1981 -18
- package/dist/index.d.ts +1981 -18
- package/dist/index.js +34 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1166 -1151
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/requests/elements/elements-transaction-v2.ts +53 -0
- package/src/api/requests/elements/index.ts +1 -0
- package/src/api/requests/index.ts +1 -1
- package/src/api/responses/elements/elements-transaction-v2.ts +11 -0
- package/src/api/responses/elements/index.ts +1 -0
- package/src/api/responses/index.ts +1 -0
- package/src/design-system-content/documentation-hierarchy.ts +39 -6
- package/src/design-system-content/item-configuration.ts +1 -1
- package/src/api/requests/post-bulk-doc-page-elements.ts +0 -47
package/dist/index.mjs
CHANGED
|
@@ -16,7 +16,7 @@ import { z as z14 } from "zod";
|
|
|
16
16
|
import { z as z17 } from "zod";
|
|
17
17
|
import { z as z15 } from "zod";
|
|
18
18
|
import { z as z16 } from "zod";
|
|
19
|
-
import { z as
|
|
19
|
+
import { z as z83 } from "zod";
|
|
20
20
|
import { z as z18 } from "zod";
|
|
21
21
|
import { z as z20 } from "zod";
|
|
22
22
|
import { z as z19 } from "zod";
|
|
@@ -26,19 +26,21 @@ import { z as z25 } from "zod";
|
|
|
26
26
|
import { z as z24 } from "zod";
|
|
27
27
|
import { z as z23 } from "zod";
|
|
28
28
|
import { z as z26 } from "zod";
|
|
29
|
-
import { z as
|
|
29
|
+
import { z as z33 } from "zod";
|
|
30
30
|
import { z as z27 } from "zod";
|
|
31
31
|
import { z as z28 } from "zod";
|
|
32
32
|
import { z as z29 } from "zod";
|
|
33
33
|
import { z as z30 } from "zod";
|
|
34
34
|
import { z as z31 } from "zod";
|
|
35
|
-
import {
|
|
35
|
+
import {
|
|
36
|
+
z as z32
|
|
37
|
+
} from "zod";
|
|
38
|
+
import { z as z34 } from "zod";
|
|
39
|
+
import { z as z39 } from "zod";
|
|
36
40
|
import { z as z38 } from "zod";
|
|
37
41
|
import { z as z37 } from "zod";
|
|
38
42
|
import { z as z36 } from "zod";
|
|
39
43
|
import { z as z35 } from "zod";
|
|
40
|
-
import { z as z34 } from "zod";
|
|
41
|
-
import { z as z39 } from "zod";
|
|
42
44
|
import { z as z40 } from "zod";
|
|
43
45
|
import { z as z41 } from "zod";
|
|
44
46
|
import { z as z42 } from "zod";
|
|
@@ -68,54 +70,54 @@ import { z as z65 } from "zod";
|
|
|
68
70
|
import { z as z66 } from "zod";
|
|
69
71
|
import { z as z67 } from "zod";
|
|
70
72
|
import { z as z68 } from "zod";
|
|
71
|
-
import { z as z70 } from "zod";
|
|
72
73
|
import { z as z69 } from "zod";
|
|
73
74
|
import { z as z71 } from "zod";
|
|
75
|
+
import { z as z70 } from "zod";
|
|
74
76
|
import { z as z72 } from "zod";
|
|
75
|
-
import { z as z80 } from "zod";
|
|
76
77
|
import { z as z73 } from "zod";
|
|
77
|
-
import { z as
|
|
78
|
+
import { z as z81 } from "zod";
|
|
78
79
|
import { z as z74 } from "zod";
|
|
79
80
|
import { z as z76 } from "zod";
|
|
81
|
+
import { z as z75 } from "zod";
|
|
80
82
|
import { z as z77 } from "zod";
|
|
81
83
|
import { z as z78 } from "zod";
|
|
82
84
|
import { z as z79 } from "zod";
|
|
83
|
-
import { z as
|
|
84
|
-
import { z as
|
|
85
|
-
import { z as z86 } from "zod";
|
|
86
|
-
import { z as z85 } from "zod";
|
|
85
|
+
import { z as z80 } from "zod";
|
|
86
|
+
import { z as z82 } from "zod";
|
|
87
87
|
import { z as z84 } from "zod";
|
|
88
88
|
import { z as z87 } from "zod";
|
|
89
|
+
import { z as z86 } from "zod";
|
|
90
|
+
import { z as z85 } from "zod";
|
|
89
91
|
import { z as z88 } from "zod";
|
|
90
|
-
import { z as z98 } from "zod";
|
|
91
92
|
import { z as z89 } from "zod";
|
|
93
|
+
import { z as z99 } from "zod";
|
|
92
94
|
import { z as z90 } from "zod";
|
|
93
|
-
import { z as z92 } from "zod";
|
|
94
95
|
import { z as z91 } from "zod";
|
|
95
|
-
import { z as z94 } from "zod";
|
|
96
96
|
import { z as z93 } from "zod";
|
|
97
|
+
import { z as z92 } from "zod";
|
|
97
98
|
import { z as z95 } from "zod";
|
|
99
|
+
import { z as z94 } from "zod";
|
|
98
100
|
import { z as z96 } from "zod";
|
|
99
101
|
import { z as z97 } from "zod";
|
|
100
|
-
import { z as
|
|
102
|
+
import { z as z98 } from "zod";
|
|
101
103
|
import { z as z100 } from "zod";
|
|
102
104
|
import { z as z101 } from "zod";
|
|
103
105
|
import { z as z102 } from "zod";
|
|
104
106
|
import { z as z103 } from "zod";
|
|
105
107
|
import { z as z104 } from "zod";
|
|
106
|
-
import { z as z107 } from "zod";
|
|
107
108
|
import { z as z105 } from "zod";
|
|
108
|
-
import { z as z106 } from "zod";
|
|
109
109
|
import { z as z108 } from "zod";
|
|
110
|
-
import { z as
|
|
110
|
+
import { z as z106 } from "zod";
|
|
111
|
+
import { z as z107 } from "zod";
|
|
111
112
|
import { z as z109 } from "zod";
|
|
113
|
+
import { z as z114 } from "zod";
|
|
112
114
|
import { z as z110 } from "zod";
|
|
113
115
|
import { z as z111 } from "zod";
|
|
114
116
|
import { z as z112 } from "zod";
|
|
115
|
-
import { z as
|
|
116
|
-
import { z as z116 } from "zod";
|
|
117
|
+
import { z as z113 } from "zod";
|
|
117
118
|
import { z as z115 } from "zod";
|
|
118
119
|
import { z as z117 } from "zod";
|
|
120
|
+
import { z as z116 } from "zod";
|
|
119
121
|
import { z as z118 } from "zod";
|
|
120
122
|
import { z as z119 } from "zod";
|
|
121
123
|
import { z as z120 } from "zod";
|
|
@@ -123,6 +125,7 @@ import { z as z121 } from "zod";
|
|
|
123
125
|
import { z as z122 } from "zod";
|
|
124
126
|
import { z as z123 } from "zod";
|
|
125
127
|
import { z as z124 } from "zod";
|
|
128
|
+
import { z as z125 } from "zod";
|
|
126
129
|
var PluginOAuthRequestSchema = z.object({
|
|
127
130
|
id: z.string(),
|
|
128
131
|
codeChallenge: z.string(),
|
|
@@ -640,8 +643,8 @@ function zodUpdateInputOmit() {
|
|
|
640
643
|
function nullishToOptional(type) {
|
|
641
644
|
return type.nullish().transform((t) => t ?? void 0);
|
|
642
645
|
}
|
|
643
|
-
var PageBlockCalloutType =
|
|
644
|
-
var PageBlockTypeV1 =
|
|
646
|
+
var PageBlockCalloutType = z33.enum(["Info", "Primary", "Success", "Warning", "Error"]);
|
|
647
|
+
var PageBlockTypeV1 = z33.enum([
|
|
645
648
|
"Text",
|
|
646
649
|
"Heading",
|
|
647
650
|
"Code",
|
|
@@ -674,7 +677,7 @@ var PageBlockTypeV1 = z32.enum([
|
|
|
674
677
|
"TableRow",
|
|
675
678
|
"TableCell"
|
|
676
679
|
]);
|
|
677
|
-
var PageBlockCodeLanguage =
|
|
680
|
+
var PageBlockCodeLanguage = z33.enum([
|
|
678
681
|
"Angular",
|
|
679
682
|
"Bash",
|
|
680
683
|
"C",
|
|
@@ -708,68 +711,68 @@ var PageBlockCodeLanguage = z32.enum([
|
|
|
708
711
|
"XML",
|
|
709
712
|
"YAML"
|
|
710
713
|
]);
|
|
711
|
-
var PageBlockAlignment =
|
|
712
|
-
var PageBlockThemeType =
|
|
713
|
-
var PageBlockAssetType =
|
|
714
|
-
var PageBlockTilesAlignment =
|
|
715
|
-
var PageBlockTilesLayout =
|
|
716
|
-
var PageBlockTheme =
|
|
717
|
-
themeIds:
|
|
714
|
+
var PageBlockAlignment = z33.enum(["Left", "Center", "Stretch", "Right"]);
|
|
715
|
+
var PageBlockThemeType = z33.enum(["Override", "Comparison"]);
|
|
716
|
+
var PageBlockAssetType = z33.enum(["image", "figmaFrame"]);
|
|
717
|
+
var PageBlockTilesAlignment = z33.enum(["Center", "FrameHeight"]);
|
|
718
|
+
var PageBlockTilesLayout = z33.enum(["C8", "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C1_75"]);
|
|
719
|
+
var PageBlockTheme = z33.object({
|
|
720
|
+
themeIds: z33.array(z33.string()),
|
|
718
721
|
type: PageBlockThemeType
|
|
719
722
|
});
|
|
720
|
-
var PageBlockUrlPreview =
|
|
721
|
-
title: nullishToOptional(
|
|
722
|
-
description: nullishToOptional(
|
|
723
|
-
thumbnailUrl: nullishToOptional(
|
|
724
|
-
});
|
|
725
|
-
var PageBlockFrameOrigin =
|
|
726
|
-
sourceFileName: nullishToOptional(
|
|
727
|
-
title: nullishToOptional(
|
|
728
|
-
previewUrl: nullishToOptional(
|
|
729
|
-
valid: nullishToOptional(
|
|
730
|
-
referenceId: nullishToOptional(
|
|
731
|
-
assetId: nullishToOptional(
|
|
732
|
-
assetScale: nullishToOptional(
|
|
733
|
-
width: nullishToOptional(
|
|
734
|
-
height: nullishToOptional(
|
|
735
|
-
});
|
|
736
|
-
var PageBlockFrame =
|
|
737
|
-
persistentId:
|
|
738
|
-
sourceId:
|
|
739
|
-
sourceFrameId:
|
|
740
|
-
title: nullishToOptional(
|
|
741
|
-
description: nullishToOptional(
|
|
723
|
+
var PageBlockUrlPreview = z33.object({
|
|
724
|
+
title: nullishToOptional(z33.string()),
|
|
725
|
+
description: nullishToOptional(z33.string()),
|
|
726
|
+
thumbnailUrl: nullishToOptional(z33.string())
|
|
727
|
+
});
|
|
728
|
+
var PageBlockFrameOrigin = z33.object({
|
|
729
|
+
sourceFileName: nullishToOptional(z33.string()),
|
|
730
|
+
title: nullishToOptional(z33.string()),
|
|
731
|
+
previewUrl: nullishToOptional(z33.string()),
|
|
732
|
+
valid: nullishToOptional(z33.boolean()),
|
|
733
|
+
referenceId: nullishToOptional(z33.string()),
|
|
734
|
+
assetId: nullishToOptional(z33.string()),
|
|
735
|
+
assetScale: nullishToOptional(z33.number()),
|
|
736
|
+
width: nullishToOptional(z33.number()),
|
|
737
|
+
height: nullishToOptional(z33.number())
|
|
738
|
+
});
|
|
739
|
+
var PageBlockFrame = z33.object({
|
|
740
|
+
persistentId: z33.string(),
|
|
741
|
+
sourceId: z33.string(),
|
|
742
|
+
sourceFrameId: z33.string(),
|
|
743
|
+
title: nullishToOptional(z33.string()),
|
|
744
|
+
description: nullishToOptional(z33.string()),
|
|
742
745
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
743
746
|
origin: nullishToOptional(PageBlockFrameOrigin)
|
|
744
747
|
});
|
|
745
|
-
var PageBlockAsset =
|
|
748
|
+
var PageBlockAsset = z33.object({
|
|
746
749
|
type: PageBlockAssetType,
|
|
747
|
-
id: nullishToOptional(
|
|
748
|
-
url: nullishToOptional(
|
|
750
|
+
id: nullishToOptional(z33.string()),
|
|
751
|
+
url: nullishToOptional(z33.string()),
|
|
749
752
|
figmaFrame: nullishToOptional(PageBlockFrame)
|
|
750
753
|
});
|
|
751
|
-
var PageBlockLinkPreview =
|
|
752
|
-
title: nullishToOptional(
|
|
753
|
-
valid: nullishToOptional(
|
|
754
|
+
var PageBlockLinkPreview = z33.object({
|
|
755
|
+
title: nullishToOptional(z33.string()),
|
|
756
|
+
valid: nullishToOptional(z33.boolean())
|
|
754
757
|
});
|
|
755
|
-
var PageBlockShortcut =
|
|
756
|
-
persistentId:
|
|
757
|
-
title: nullishToOptional(
|
|
758
|
-
description: nullishToOptional(
|
|
758
|
+
var PageBlockShortcut = z33.object({
|
|
759
|
+
persistentId: z33.string(),
|
|
760
|
+
title: nullishToOptional(z33.string()),
|
|
761
|
+
description: nullishToOptional(z33.string()),
|
|
759
762
|
asset: nullishToOptional(PageBlockAsset),
|
|
760
|
-
documentationItemId: nullishToOptional(
|
|
761
|
-
url: nullishToOptional(
|
|
763
|
+
documentationItemId: nullishToOptional(z33.string()),
|
|
764
|
+
url: nullishToOptional(z33.string()),
|
|
762
765
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
763
766
|
documentationItemPreview: nullishToOptional(PageBlockLinkPreview)
|
|
764
767
|
});
|
|
765
|
-
var PageBlockCustomBlockPropertyImageValue =
|
|
768
|
+
var PageBlockCustomBlockPropertyImageValue = z33.object({
|
|
766
769
|
asset: nullishToOptional(PageBlockAsset),
|
|
767
|
-
assetId: nullishToOptional(
|
|
768
|
-
assetUrl: nullishToOptional(
|
|
770
|
+
assetId: nullishToOptional(z33.string()),
|
|
771
|
+
assetUrl: nullishToOptional(z33.string())
|
|
769
772
|
});
|
|
770
|
-
var PageBlockCustomBlockPropertyValue =
|
|
771
|
-
key:
|
|
772
|
-
value:
|
|
773
|
+
var PageBlockCustomBlockPropertyValue = z33.object({
|
|
774
|
+
key: z33.string(),
|
|
775
|
+
value: z33.any()
|
|
773
776
|
// TODO Artem: for some reason there are cases when there's an array here in the DB
|
|
774
777
|
// e.g. element id 67451 in the dev db
|
|
775
778
|
// value: z
|
|
@@ -780,315 +783,315 @@ var PageBlockCustomBlockPropertyValue = z32.object({
|
|
|
780
783
|
// .or(TypographyTokenData)
|
|
781
784
|
// .or(PageBlockCustomBlockPropertyImageValue),
|
|
782
785
|
});
|
|
783
|
-
var PageBlockFigmaFrameProperties =
|
|
786
|
+
var PageBlockFigmaFrameProperties = z33.object({
|
|
784
787
|
color: nullishToOptional(
|
|
785
|
-
|
|
786
|
-
value:
|
|
788
|
+
z33.object({
|
|
789
|
+
value: z33.string()
|
|
787
790
|
})
|
|
788
791
|
),
|
|
789
792
|
alignment: PageBlockTilesAlignment,
|
|
790
793
|
layout: PageBlockTilesLayout,
|
|
791
794
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
792
|
-
showTitles:
|
|
795
|
+
showTitles: z33.boolean()
|
|
793
796
|
});
|
|
794
|
-
var PageBlockRenderCodeProperties =
|
|
795
|
-
showCode:
|
|
797
|
+
var PageBlockRenderCodeProperties = z33.object({
|
|
798
|
+
showCode: z33.boolean()
|
|
796
799
|
});
|
|
797
|
-
var PageBlockAssetComponent =
|
|
798
|
-
persistentId:
|
|
799
|
-
componentAssetId:
|
|
800
|
-
title: nullishToOptional(
|
|
801
|
-
description: nullishToOptional(
|
|
800
|
+
var PageBlockAssetComponent = z33.object({
|
|
801
|
+
persistentId: z33.string(),
|
|
802
|
+
componentAssetId: z33.string(),
|
|
803
|
+
title: nullishToOptional(z33.string()),
|
|
804
|
+
description: nullishToOptional(z33.string()),
|
|
802
805
|
backgroundColor: nullishToOptional(ColorTokenInlineData)
|
|
803
806
|
});
|
|
804
|
-
var PageBlockTableColumn =
|
|
805
|
-
id:
|
|
807
|
+
var PageBlockTableColumn = z33.object({
|
|
808
|
+
id: z33.string(),
|
|
806
809
|
width: DimensionTokenData
|
|
807
810
|
});
|
|
808
|
-
var PageBlockTableProperties =
|
|
809
|
-
showBorders:
|
|
810
|
-
showHeaderRow:
|
|
811
|
-
showHeaderColumn:
|
|
812
|
-
columns:
|
|
811
|
+
var PageBlockTableProperties = z33.object({
|
|
812
|
+
showBorders: z33.boolean(),
|
|
813
|
+
showHeaderRow: z33.boolean(),
|
|
814
|
+
showHeaderColumn: z33.boolean(),
|
|
815
|
+
columns: z33.array(PageBlockTableColumn)
|
|
813
816
|
});
|
|
814
|
-
var PageBlockTextSpanAttributeType =
|
|
815
|
-
var PageBlockTextSpanAttribute =
|
|
817
|
+
var PageBlockTextSpanAttributeType = z33.enum(["Bold", "Italic", "Link", "Strikethrough", "Code"]);
|
|
818
|
+
var PageBlockTextSpanAttribute = z33.object({
|
|
816
819
|
type: PageBlockTextSpanAttributeType,
|
|
817
|
-
link: nullishToOptional(
|
|
818
|
-
documentationItemId: nullishToOptional(
|
|
819
|
-
openInNewWindow: nullishToOptional(
|
|
820
|
+
link: nullishToOptional(z33.string()),
|
|
821
|
+
documentationItemId: nullishToOptional(z33.string()),
|
|
822
|
+
openInNewWindow: nullishToOptional(z33.boolean())
|
|
820
823
|
});
|
|
821
|
-
var PageBlockTextSpan =
|
|
822
|
-
text:
|
|
823
|
-
attributes:
|
|
824
|
+
var PageBlockTextSpan = z33.object({
|
|
825
|
+
text: z33.string(),
|
|
826
|
+
attributes: z33.array(PageBlockTextSpanAttribute)
|
|
824
827
|
});
|
|
825
|
-
var PageBlockText =
|
|
826
|
-
spans:
|
|
828
|
+
var PageBlockText = z33.object({
|
|
829
|
+
spans: z33.array(PageBlockTextSpan)
|
|
827
830
|
});
|
|
828
|
-
var PageBlockBaseV1 =
|
|
829
|
-
persistentId:
|
|
831
|
+
var PageBlockBaseV1 = z33.object({
|
|
832
|
+
persistentId: z33.string(),
|
|
830
833
|
type: PageBlockTypeV1,
|
|
831
834
|
// Element linking
|
|
832
|
-
designObjectId: nullishToOptional(
|
|
833
|
-
designObjectIds: nullishToOptional(
|
|
834
|
-
tokenType: nullishToOptional(DesignTokenType.or(
|
|
835
|
-
showNestedGroups: nullishToOptional(
|
|
836
|
-
brandId: nullishToOptional(
|
|
835
|
+
designObjectId: nullishToOptional(z33.string()),
|
|
836
|
+
designObjectIds: nullishToOptional(z33.array(z33.string())),
|
|
837
|
+
tokenType: nullishToOptional(DesignTokenType.or(z33.literal("Font"))),
|
|
838
|
+
showNestedGroups: nullishToOptional(z33.boolean()),
|
|
839
|
+
brandId: nullishToOptional(z33.string()),
|
|
837
840
|
// Rich text
|
|
838
841
|
text: nullishToOptional(PageBlockText),
|
|
839
|
-
caption: nullishToOptional(
|
|
840
|
-
headingType: nullishToOptional(
|
|
842
|
+
caption: nullishToOptional(z33.string()),
|
|
843
|
+
headingType: nullishToOptional(z33.number().min(1).max(3)),
|
|
841
844
|
codeLanguage: nullishToOptional(PageBlockCodeLanguage),
|
|
842
845
|
calloutType: nullishToOptional(PageBlockCalloutType),
|
|
843
|
-
urlInput: nullishToOptional(
|
|
844
|
-
url: nullishToOptional(
|
|
846
|
+
urlInput: nullishToOptional(z33.string()),
|
|
847
|
+
url: nullishToOptional(z33.string()),
|
|
845
848
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
846
849
|
// Image
|
|
847
850
|
asset: nullishToOptional(PageBlockAsset),
|
|
848
851
|
alignment: nullishToOptional(PageBlockAlignment),
|
|
849
852
|
// Shortcuts block
|
|
850
|
-
shortcuts: nullishToOptional(
|
|
853
|
+
shortcuts: nullishToOptional(z33.array(PageBlockShortcut)),
|
|
851
854
|
// Custom blocks
|
|
852
|
-
customBlockKey: nullishToOptional(
|
|
853
|
-
customBlockProperties: nullishToOptional(
|
|
854
|
-
variantKey: nullishToOptional(
|
|
855
|
+
customBlockKey: nullishToOptional(z33.string()),
|
|
856
|
+
customBlockProperties: nullishToOptional(z33.array(PageBlockCustomBlockPropertyValue)),
|
|
857
|
+
variantKey: nullishToOptional(z33.string()),
|
|
855
858
|
// Figma frames
|
|
856
859
|
figmaFrameProperties: nullishToOptional(PageBlockFigmaFrameProperties),
|
|
857
|
-
figmaFrames: nullishToOptional(
|
|
860
|
+
figmaFrames: nullishToOptional(z33.array(PageBlockFrame)),
|
|
858
861
|
// Generic
|
|
859
862
|
size: nullishToOptional(Size),
|
|
860
863
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
861
864
|
// Render code
|
|
862
865
|
renderCodeProperties: nullishToOptional(PageBlockRenderCodeProperties),
|
|
863
866
|
// Component assets
|
|
864
|
-
componentAssets: nullishToOptional(
|
|
867
|
+
componentAssets: nullishToOptional(z33.array(PageBlockAssetComponent)),
|
|
865
868
|
// Tables
|
|
866
869
|
tableProperties: nullishToOptional(PageBlockTableProperties),
|
|
867
|
-
columnId: nullishToOptional(
|
|
870
|
+
columnId: nullishToOptional(z33.string()),
|
|
868
871
|
// Token spreadsheet
|
|
869
872
|
theme: nullishToOptional(PageBlockTheme),
|
|
870
|
-
blacklistedElementProperties: nullishToOptional(
|
|
873
|
+
blacklistedElementProperties: nullishToOptional(z33.array(z33.string())),
|
|
871
874
|
// Arbitrary
|
|
872
|
-
userMetadata: nullishToOptional(
|
|
875
|
+
userMetadata: nullishToOptional(z33.string())
|
|
873
876
|
});
|
|
874
877
|
var PageBlockV1 = PageBlockBaseV1.extend({
|
|
875
|
-
children:
|
|
878
|
+
children: z33.lazy(
|
|
876
879
|
() => PageBlockV1.array().nullish().transform((t) => t ?? [])
|
|
877
880
|
)
|
|
878
881
|
});
|
|
879
|
-
var PageBlockLinkType =
|
|
880
|
-
var PageBlockImageType =
|
|
881
|
-
var PageBlockImageAlignment =
|
|
882
|
-
var PageBlockTableCellAlignment =
|
|
883
|
-
var PageBlockPreviewContainerSize =
|
|
884
|
-
var PageBlockThemeDisplayMode =
|
|
885
|
-
var PageBlockColorV2 =
|
|
886
|
-
value:
|
|
887
|
-
referencedTokenId:
|
|
888
|
-
});
|
|
889
|
-
var PageBlockAppearanceV2 =
|
|
882
|
+
var PageBlockLinkType = z34.enum(["DocumentationItem", "PageHeading", "Url"]);
|
|
883
|
+
var PageBlockImageType = z34.enum(["Upload", "Asset", "FigmaNode"]);
|
|
884
|
+
var PageBlockImageAlignment = z34.enum(["Left", "Center", "Stretch"]);
|
|
885
|
+
var PageBlockTableCellAlignment = z34.enum(["Left", "Center", "Right"]);
|
|
886
|
+
var PageBlockPreviewContainerSize = z34.enum(["Centered", "NaturalHeight"]);
|
|
887
|
+
var PageBlockThemeDisplayMode = z34.enum(["Split", "Override"]);
|
|
888
|
+
var PageBlockColorV2 = z34.object({
|
|
889
|
+
value: z34.string(),
|
|
890
|
+
referencedTokenId: z34.string().optional()
|
|
891
|
+
});
|
|
892
|
+
var PageBlockAppearanceV2 = z34.object({
|
|
890
893
|
itemBackgroundColor: PageBlockColorV2.optional(),
|
|
891
|
-
numberOfColumns:
|
|
894
|
+
numberOfColumns: z34.number().optional()
|
|
892
895
|
});
|
|
893
|
-
var PageBlockItemUntypedValue =
|
|
894
|
-
value:
|
|
895
|
-
}).and(
|
|
896
|
-
var PageBlockLinkV2 =
|
|
896
|
+
var PageBlockItemUntypedValue = z34.object({
|
|
897
|
+
value: z34.any()
|
|
898
|
+
}).and(z34.record(z34.any()));
|
|
899
|
+
var PageBlockLinkV2 = z34.object({
|
|
897
900
|
type: PageBlockLinkType,
|
|
898
|
-
documentationItemId:
|
|
899
|
-
pageHeadingId:
|
|
900
|
-
url:
|
|
901
|
-
openInNewTab:
|
|
901
|
+
documentationItemId: z34.string().optional(),
|
|
902
|
+
pageHeadingId: z34.string().optional(),
|
|
903
|
+
url: z34.string().optional(),
|
|
904
|
+
openInNewTab: z34.boolean().optional()
|
|
902
905
|
});
|
|
903
|
-
var PageBlockItemV2 =
|
|
904
|
-
id:
|
|
906
|
+
var PageBlockItemV2 = z34.object({
|
|
907
|
+
id: z34.string(),
|
|
905
908
|
linksTo: PageBlockLinkV2.optional(),
|
|
906
|
-
props:
|
|
909
|
+
props: z34.record(PageBlockItemUntypedValue)
|
|
907
910
|
});
|
|
908
|
-
var PageBlockDataV2 =
|
|
909
|
-
packageId:
|
|
910
|
-
variantId:
|
|
911
|
-
indentLevel:
|
|
911
|
+
var PageBlockDataV2 = z34.object({
|
|
912
|
+
packageId: z34.string(),
|
|
913
|
+
variantId: z34.string().optional(),
|
|
914
|
+
indentLevel: z34.number(),
|
|
912
915
|
appearance: PageBlockAppearanceV2.optional(),
|
|
913
|
-
items:
|
|
916
|
+
items: z34.array(PageBlockItemV2)
|
|
914
917
|
});
|
|
915
|
-
var PageBlockItemImageReference =
|
|
918
|
+
var PageBlockItemImageReference = z34.object({
|
|
916
919
|
type: PageBlockImageType,
|
|
917
|
-
url:
|
|
918
|
-
assetId:
|
|
920
|
+
url: z34.string(),
|
|
921
|
+
assetId: z34.string().optional(),
|
|
919
922
|
size: Size.optional(),
|
|
920
|
-
figmaFile:
|
|
921
|
-
sourceId:
|
|
922
|
-
frameId:
|
|
923
|
-
frameReferenceId:
|
|
924
|
-
origin:
|
|
925
|
-
title:
|
|
926
|
-
sourceFileName:
|
|
923
|
+
figmaFile: z34.object({
|
|
924
|
+
sourceId: z34.string(),
|
|
925
|
+
frameId: z34.string(),
|
|
926
|
+
frameReferenceId: z34.string(),
|
|
927
|
+
origin: z34.object({
|
|
928
|
+
title: z34.string().optional(),
|
|
929
|
+
sourceFileName: z34.string().optional()
|
|
927
930
|
})
|
|
928
931
|
}).optional()
|
|
929
932
|
});
|
|
930
|
-
var PageBlockItemAssetValue =
|
|
931
|
-
selectedPropertyIds:
|
|
932
|
-
showSearch:
|
|
933
|
+
var PageBlockItemAssetValue = z34.object({
|
|
934
|
+
selectedPropertyIds: z34.array(z34.string()).optional(),
|
|
935
|
+
showSearch: z34.boolean().optional(),
|
|
933
936
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
934
937
|
backgroundColor: PageBlockColorV2.optional(),
|
|
935
|
-
value:
|
|
936
|
-
|
|
937
|
-
entityId:
|
|
938
|
-
entityType:
|
|
939
|
-
entityMeta:
|
|
940
|
-
title:
|
|
941
|
-
description:
|
|
938
|
+
value: z34.array(
|
|
939
|
+
z34.object({
|
|
940
|
+
entityId: z34.string(),
|
|
941
|
+
entityType: z34.enum(["Asset", "AssetGroup"]),
|
|
942
|
+
entityMeta: z34.object({
|
|
943
|
+
title: z34.string().optional(),
|
|
944
|
+
description: z34.string().optional()
|
|
942
945
|
}).optional()
|
|
943
946
|
})
|
|
944
947
|
)
|
|
945
948
|
});
|
|
946
|
-
var PageBlockItemAssetPropertyValue =
|
|
947
|
-
value:
|
|
949
|
+
var PageBlockItemAssetPropertyValue = z34.object({
|
|
950
|
+
value: z34.array(z34.string())
|
|
948
951
|
});
|
|
949
|
-
var PageBlockItemBooleanValue =
|
|
950
|
-
value:
|
|
952
|
+
var PageBlockItemBooleanValue = z34.object({
|
|
953
|
+
value: z34.boolean()
|
|
951
954
|
});
|
|
952
|
-
var PageBlockItemCodeValue =
|
|
955
|
+
var PageBlockItemCodeValue = z34.object({
|
|
953
956
|
format: PageBlockCodeLanguage.optional(),
|
|
954
|
-
caption:
|
|
955
|
-
value:
|
|
956
|
-
});
|
|
957
|
-
var PageBlockItemSandboxValue =
|
|
958
|
-
showCode:
|
|
959
|
-
backgroundColor:
|
|
960
|
-
alignPreview:
|
|
961
|
-
previewHeight:
|
|
962
|
-
value:
|
|
963
|
-
});
|
|
964
|
-
var PageBlockItemColorValue =
|
|
965
|
-
var PageBlockItemComponentValue =
|
|
966
|
-
selectedPropertyIds:
|
|
967
|
-
value:
|
|
968
|
-
|
|
969
|
-
entityId:
|
|
970
|
-
entityType:
|
|
957
|
+
caption: z34.string().optional(),
|
|
958
|
+
value: z34.string()
|
|
959
|
+
});
|
|
960
|
+
var PageBlockItemSandboxValue = z34.object({
|
|
961
|
+
showCode: z34.boolean().optional(),
|
|
962
|
+
backgroundColor: z34.string().optional(),
|
|
963
|
+
alignPreview: z34.enum(["Left", "Center"]).optional(),
|
|
964
|
+
previewHeight: z34.number().optional(),
|
|
965
|
+
value: z34.string()
|
|
966
|
+
});
|
|
967
|
+
var PageBlockItemColorValue = z34.record(z34.any());
|
|
968
|
+
var PageBlockItemComponentValue = z34.object({
|
|
969
|
+
selectedPropertyIds: z34.array(z34.string()).optional(),
|
|
970
|
+
value: z34.array(
|
|
971
|
+
z34.object({
|
|
972
|
+
entityId: z34.string(),
|
|
973
|
+
entityType: z34.enum(["Component", "ComponentGroup"])
|
|
971
974
|
})
|
|
972
975
|
)
|
|
973
976
|
});
|
|
974
|
-
var PageBlockItemComponentPropertyValue =
|
|
975
|
-
value:
|
|
977
|
+
var PageBlockItemComponentPropertyValue = z34.object({
|
|
978
|
+
value: z34.string()
|
|
976
979
|
});
|
|
977
|
-
var PageBlockItemDividerValue =
|
|
978
|
-
var PageBlockItemEmbedValue =
|
|
979
|
-
value:
|
|
980
|
-
caption:
|
|
981
|
-
height:
|
|
980
|
+
var PageBlockItemDividerValue = z34.object({});
|
|
981
|
+
var PageBlockItemEmbedValue = z34.object({
|
|
982
|
+
value: z34.string().optional(),
|
|
983
|
+
caption: z34.string().optional(),
|
|
984
|
+
height: z34.number().optional()
|
|
982
985
|
});
|
|
983
|
-
var PageBlockItemFigmaNodeValue =
|
|
984
|
-
selectedPropertyIds:
|
|
985
|
-
showSearch:
|
|
986
|
+
var PageBlockItemFigmaNodeValue = z34.object({
|
|
987
|
+
selectedPropertyIds: z34.array(z34.string()).optional(),
|
|
988
|
+
showSearch: z34.boolean().optional(),
|
|
986
989
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
987
|
-
backgroundColor:
|
|
988
|
-
value:
|
|
989
|
-
|
|
990
|
-
entityId:
|
|
991
|
-
entityMeta:
|
|
992
|
-
title:
|
|
993
|
-
description:
|
|
990
|
+
backgroundColor: z34.string().optional(),
|
|
991
|
+
value: z34.array(
|
|
992
|
+
z34.object({
|
|
993
|
+
entityId: z34.string(),
|
|
994
|
+
entityMeta: z34.object({
|
|
995
|
+
title: z34.string().optional(),
|
|
996
|
+
description: z34.string().optional()
|
|
994
997
|
}).optional()
|
|
995
998
|
})
|
|
996
999
|
)
|
|
997
1000
|
});
|
|
998
|
-
var PageBlockItemImageValue =
|
|
999
|
-
alt:
|
|
1000
|
-
caption:
|
|
1001
|
+
var PageBlockItemImageValue = z34.object({
|
|
1002
|
+
alt: z34.string().optional(),
|
|
1003
|
+
caption: z34.string().optional(),
|
|
1001
1004
|
alignment: PageBlockImageAlignment.optional(),
|
|
1002
1005
|
value: PageBlockItemImageReference.optional()
|
|
1003
1006
|
});
|
|
1004
|
-
var PageBlockItemMarkdownValue =
|
|
1005
|
-
value:
|
|
1007
|
+
var PageBlockItemMarkdownValue = z34.object({
|
|
1008
|
+
value: z34.string()
|
|
1006
1009
|
});
|
|
1007
|
-
var PageBlockItemMultiRichTextValue =
|
|
1010
|
+
var PageBlockItemMultiRichTextValue = z34.object({
|
|
1008
1011
|
value: PageBlockText.array()
|
|
1009
1012
|
});
|
|
1010
|
-
var PageBlockItemMultiSelectValue =
|
|
1011
|
-
value:
|
|
1013
|
+
var PageBlockItemMultiSelectValue = z34.object({
|
|
1014
|
+
value: z34.array(z34.string())
|
|
1012
1015
|
});
|
|
1013
|
-
var PageBlockItemNumberValue =
|
|
1014
|
-
value:
|
|
1016
|
+
var PageBlockItemNumberValue = z34.object({
|
|
1017
|
+
value: z34.number()
|
|
1015
1018
|
});
|
|
1016
|
-
var PageBlockItemRichTextValue =
|
|
1019
|
+
var PageBlockItemRichTextValue = z34.object({
|
|
1017
1020
|
value: PageBlockText,
|
|
1018
1021
|
calloutType: PageBlockCalloutType.optional()
|
|
1019
1022
|
});
|
|
1020
|
-
var PageBlockItemSingleSelectValue =
|
|
1021
|
-
value:
|
|
1023
|
+
var PageBlockItemSingleSelectValue = z34.object({
|
|
1024
|
+
value: z34.string()
|
|
1022
1025
|
});
|
|
1023
|
-
var PageBlockItemStorybookValue =
|
|
1024
|
-
caption:
|
|
1025
|
-
height:
|
|
1026
|
-
showAddons:
|
|
1027
|
-
value:
|
|
1026
|
+
var PageBlockItemStorybookValue = z34.object({
|
|
1027
|
+
caption: z34.string().optional(),
|
|
1028
|
+
height: z34.number().optional(),
|
|
1029
|
+
showAddons: z34.boolean().optional(),
|
|
1030
|
+
value: z34.string()
|
|
1028
1031
|
});
|
|
1029
|
-
var PageBlockItemTextValue =
|
|
1030
|
-
value:
|
|
1032
|
+
var PageBlockItemTextValue = z34.object({
|
|
1033
|
+
value: z34.string()
|
|
1031
1034
|
});
|
|
1032
|
-
var PageBlockItemTokenValue =
|
|
1033
|
-
selectedPropertyIds:
|
|
1034
|
-
selectedThemeIds:
|
|
1035
|
+
var PageBlockItemTokenValue = z34.object({
|
|
1036
|
+
selectedPropertyIds: z34.array(z34.string()).optional(),
|
|
1037
|
+
selectedThemeIds: z34.array(z34.string()).optional(),
|
|
1035
1038
|
themeDisplayMode: PageBlockThemeDisplayMode.optional(),
|
|
1036
|
-
value:
|
|
1037
|
-
|
|
1038
|
-
entityId:
|
|
1039
|
-
entityType:
|
|
1040
|
-
entityMeta:
|
|
1041
|
-
showNestedGroups:
|
|
1039
|
+
value: z34.array(
|
|
1040
|
+
z34.object({
|
|
1041
|
+
entityId: z34.string(),
|
|
1042
|
+
entityType: z34.enum(["Token", "TokenGroup"]),
|
|
1043
|
+
entityMeta: z34.object({
|
|
1044
|
+
showNestedGroups: z34.boolean().optional()
|
|
1042
1045
|
}).optional()
|
|
1043
1046
|
})
|
|
1044
1047
|
)
|
|
1045
1048
|
});
|
|
1046
|
-
var PageBlockItemTokenPropertyValue =
|
|
1047
|
-
selectedPropertyIds:
|
|
1048
|
-
selectedThemeIds:
|
|
1049
|
-
value:
|
|
1049
|
+
var PageBlockItemTokenPropertyValue = z34.object({
|
|
1050
|
+
selectedPropertyIds: z34.array(z34.string()).optional(),
|
|
1051
|
+
selectedThemeIds: z34.array(z34.string()).optional(),
|
|
1052
|
+
value: z34.array(z34.string())
|
|
1050
1053
|
});
|
|
1051
|
-
var PageBlockItemTokenTypeValue =
|
|
1052
|
-
value:
|
|
1054
|
+
var PageBlockItemTokenTypeValue = z34.object({
|
|
1055
|
+
value: z34.array(DesignTokenType)
|
|
1053
1056
|
});
|
|
1054
|
-
var PageBlockItemUrlValue =
|
|
1055
|
-
value:
|
|
1057
|
+
var PageBlockItemUrlValue = z34.object({
|
|
1058
|
+
value: z34.string()
|
|
1056
1059
|
});
|
|
1057
|
-
var PageBlockItemTableRichTextNode =
|
|
1058
|
-
type:
|
|
1060
|
+
var PageBlockItemTableRichTextNode = z34.object({
|
|
1061
|
+
type: z34.literal("RichText"),
|
|
1059
1062
|
value: PageBlockItemRichTextValue.shape.value
|
|
1060
1063
|
});
|
|
1061
|
-
var PageBlockItemTableMultiRichTextNode =
|
|
1062
|
-
type:
|
|
1064
|
+
var PageBlockItemTableMultiRichTextNode = z34.object({
|
|
1065
|
+
type: z34.literal("MultiRichText"),
|
|
1063
1066
|
value: PageBlockItemMultiRichTextValue.shape.value
|
|
1064
1067
|
});
|
|
1065
|
-
var PageBlockItemTableImageNode =
|
|
1066
|
-
type:
|
|
1068
|
+
var PageBlockItemTableImageNode = z34.object({
|
|
1069
|
+
type: z34.literal("Image"),
|
|
1067
1070
|
caption: PageBlockItemImageValue.shape.caption,
|
|
1068
1071
|
value: PageBlockItemImageValue.shape.value
|
|
1069
1072
|
});
|
|
1070
|
-
var PageBlockItemTableNode =
|
|
1073
|
+
var PageBlockItemTableNode = z34.discriminatedUnion("type", [
|
|
1071
1074
|
PageBlockItemTableRichTextNode,
|
|
1072
1075
|
// PageBlockItemTableMultiRichTextNode,
|
|
1073
1076
|
PageBlockItemTableImageNode
|
|
1074
1077
|
]);
|
|
1075
|
-
var PageBlockItemTableCell =
|
|
1076
|
-
id:
|
|
1077
|
-
nodes:
|
|
1078
|
-
columnWidth:
|
|
1078
|
+
var PageBlockItemTableCell = z34.object({
|
|
1079
|
+
id: z34.string(),
|
|
1080
|
+
nodes: z34.array(PageBlockItemTableNode),
|
|
1081
|
+
columnWidth: z34.number().optional(),
|
|
1079
1082
|
alignment: PageBlockTableCellAlignment
|
|
1080
1083
|
});
|
|
1081
|
-
var PageBlockItemTableRow =
|
|
1082
|
-
cells:
|
|
1084
|
+
var PageBlockItemTableRow = z34.object({
|
|
1085
|
+
cells: z34.array(PageBlockItemTableCell)
|
|
1083
1086
|
});
|
|
1084
|
-
var PageBlockItemTableValue =
|
|
1085
|
-
highlightHeaderColumn:
|
|
1086
|
-
highlightHeaderRow:
|
|
1087
|
-
showBorder:
|
|
1088
|
-
value:
|
|
1087
|
+
var PageBlockItemTableValue = z34.object({
|
|
1088
|
+
highlightHeaderColumn: z34.boolean().optional(),
|
|
1089
|
+
highlightHeaderRow: z34.boolean().optional(),
|
|
1090
|
+
showBorder: z34.boolean().optional(),
|
|
1091
|
+
value: z34.array(PageBlockItemTableRow)
|
|
1089
1092
|
});
|
|
1090
1093
|
var RESERVED_OBJECT_ID_PREFIX = "x-sn-reserved-";
|
|
1091
|
-
var SafeIdSchema =
|
|
1094
|
+
var SafeIdSchema = z35.string().refine(
|
|
1092
1095
|
(value) => {
|
|
1093
1096
|
return !value.startsWith(RESERVED_OBJECT_ID_PREFIX);
|
|
1094
1097
|
},
|
|
@@ -1096,35 +1099,35 @@ var SafeIdSchema = z34.string().refine(
|
|
|
1096
1099
|
message: `ID value can't start with ${RESERVED_OBJECT_ID_PREFIX}`
|
|
1097
1100
|
}
|
|
1098
1101
|
);
|
|
1099
|
-
var DocumentationPageAssetType =
|
|
1100
|
-
var DocumentationPageImageAsset =
|
|
1101
|
-
type:
|
|
1102
|
-
url:
|
|
1102
|
+
var DocumentationPageAssetType = z36.enum(["image", "figmaFrame"]);
|
|
1103
|
+
var DocumentationPageImageAsset = z36.object({
|
|
1104
|
+
type: z36.literal(DocumentationPageAssetType.Enum.image),
|
|
1105
|
+
url: z36.string().optional(),
|
|
1103
1106
|
id: SafeIdSchema
|
|
1104
1107
|
});
|
|
1105
|
-
var DocumentationPageFrameAsset =
|
|
1106
|
-
type:
|
|
1107
|
-
url:
|
|
1108
|
+
var DocumentationPageFrameAsset = z36.object({
|
|
1109
|
+
type: z36.literal(DocumentationPageAssetType.Enum.figmaFrame),
|
|
1110
|
+
url: z36.string().optional(),
|
|
1108
1111
|
figmaFrame: PageBlockFrame
|
|
1109
1112
|
});
|
|
1110
|
-
var DocumentationPageAsset =
|
|
1113
|
+
var DocumentationPageAsset = z36.discriminatedUnion("type", [
|
|
1111
1114
|
DocumentationPageImageAsset,
|
|
1112
1115
|
DocumentationPageFrameAsset
|
|
1113
1116
|
]);
|
|
1114
|
-
var DocumentationItemHeaderAlignmentSchema =
|
|
1115
|
-
var DocumentationItemHeaderImageScaleTypeSchema =
|
|
1117
|
+
var DocumentationItemHeaderAlignmentSchema = z37.enum(["Left", "Center"]);
|
|
1118
|
+
var DocumentationItemHeaderImageScaleTypeSchema = z37.enum(["AspectFill", "AspectFit"]);
|
|
1116
1119
|
var DocumentationItemHeaderAlignment = DocumentationItemHeaderAlignmentSchema.enum;
|
|
1117
1120
|
var DocumentationItemHeaderImageScaleType = DocumentationItemHeaderImageScaleTypeSchema.enum;
|
|
1118
|
-
var DocumentationItemHeader =
|
|
1119
|
-
description:
|
|
1121
|
+
var DocumentationItemHeader = z37.object({
|
|
1122
|
+
description: z37.string(),
|
|
1120
1123
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1121
1124
|
foregroundColor: ColorTokenData.nullish(),
|
|
1122
1125
|
backgroundColor: ColorTokenData.nullish(),
|
|
1123
1126
|
backgroundImageAsset: DocumentationPageAsset.nullish(),
|
|
1124
1127
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1125
|
-
showBackgroundOverlay:
|
|
1126
|
-
showCoverText:
|
|
1127
|
-
minHeight:
|
|
1128
|
+
showBackgroundOverlay: z37.boolean(),
|
|
1129
|
+
showCoverText: z37.boolean(),
|
|
1130
|
+
minHeight: z37.number().nullish()
|
|
1128
1131
|
});
|
|
1129
1132
|
var defaultDocumentationItemHeader = {
|
|
1130
1133
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -1133,158 +1136,158 @@ var defaultDocumentationItemHeader = {
|
|
|
1133
1136
|
showBackgroundOverlay: false,
|
|
1134
1137
|
showCoverText: true
|
|
1135
1138
|
};
|
|
1136
|
-
var DocumentationItemConfiguration =
|
|
1137
|
-
showSidebar:
|
|
1139
|
+
var DocumentationItemConfiguration = z38.object({
|
|
1140
|
+
showSidebar: z38.boolean(),
|
|
1138
1141
|
header: DocumentationItemHeader
|
|
1139
1142
|
});
|
|
1140
|
-
var DocumentationPageDataV1 =
|
|
1141
|
-
blocks:
|
|
1143
|
+
var DocumentationPageDataV1 = z39.object({
|
|
1144
|
+
blocks: z39.array(PageBlockV1),
|
|
1142
1145
|
configuration: nullishToOptional(DocumentationItemConfiguration)
|
|
1143
1146
|
});
|
|
1144
|
-
var DocumentationPageElementDataV1 =
|
|
1147
|
+
var DocumentationPageElementDataV1 = z39.object({
|
|
1145
1148
|
value: DocumentationPageDataV1
|
|
1146
1149
|
});
|
|
1147
|
-
var DocumentationPageDataV2 =
|
|
1150
|
+
var DocumentationPageDataV2 = z40.object({
|
|
1148
1151
|
configuration: nullishToOptional(DocumentationItemConfiguration)
|
|
1149
1152
|
});
|
|
1150
|
-
var DocumentationPageElementDataV2 =
|
|
1153
|
+
var DocumentationPageElementDataV2 = z40.object({
|
|
1151
1154
|
value: DocumentationPageDataV2
|
|
1152
1155
|
});
|
|
1153
|
-
var DurationUnit =
|
|
1154
|
-
var DurationValue =
|
|
1156
|
+
var DurationUnit = z41.enum(["Ms"]);
|
|
1157
|
+
var DurationValue = z41.object({
|
|
1155
1158
|
unit: DurationUnit,
|
|
1156
|
-
measure:
|
|
1159
|
+
measure: z41.number()
|
|
1157
1160
|
});
|
|
1158
1161
|
var DurationTokenData = tokenAliasOrValue(DurationValue);
|
|
1159
|
-
var FigmaFileStructureNodeType =
|
|
1160
|
-
var FigmaFileStructureNodeBase =
|
|
1161
|
-
id:
|
|
1162
|
-
name:
|
|
1162
|
+
var FigmaFileStructureNodeType = z42.enum(["DOCUMENT", "CANVAS", "FRAME", "COMPONENT", "COMPONENT_SET"]);
|
|
1163
|
+
var FigmaFileStructureNodeBase = z42.object({
|
|
1164
|
+
id: z42.string(),
|
|
1165
|
+
name: z42.string(),
|
|
1163
1166
|
type: FigmaFileStructureNodeType,
|
|
1164
1167
|
size: SizeOrUndefined,
|
|
1165
|
-
parentComponentSetId:
|
|
1168
|
+
parentComponentSetId: z42.string().optional()
|
|
1166
1169
|
});
|
|
1167
1170
|
var FigmaFileStructureNode = FigmaFileStructureNodeBase.extend({
|
|
1168
|
-
children:
|
|
1171
|
+
children: z42.lazy(() => FigmaFileStructureNode.array())
|
|
1169
1172
|
});
|
|
1170
|
-
var FigmaFileStructureStatistics =
|
|
1171
|
-
frames:
|
|
1172
|
-
components:
|
|
1173
|
-
componentSets:
|
|
1173
|
+
var FigmaFileStructureStatistics = z42.object({
|
|
1174
|
+
frames: z42.number().nullable().optional().transform((v) => v ?? 0),
|
|
1175
|
+
components: z42.number().nullable().optional().transform((v) => v ?? 0),
|
|
1176
|
+
componentSets: z42.number().nullable().optional().transform((v) => v ?? 0)
|
|
1174
1177
|
});
|
|
1175
|
-
var FigmaFileStructureElementData =
|
|
1176
|
-
value:
|
|
1178
|
+
var FigmaFileStructureElementData = z42.object({
|
|
1179
|
+
value: z42.object({
|
|
1177
1180
|
structure: FigmaFileStructureNode,
|
|
1178
1181
|
assetsInFile: FigmaFileStructureStatistics
|
|
1179
1182
|
})
|
|
1180
1183
|
});
|
|
1181
|
-
var FigmaNodeReferenceData =
|
|
1182
|
-
structureElementId:
|
|
1183
|
-
nodeId:
|
|
1184
|
-
fileId:
|
|
1185
|
-
valid:
|
|
1186
|
-
assetId:
|
|
1187
|
-
assetScale:
|
|
1188
|
-
assetWidth:
|
|
1189
|
-
assetHeight:
|
|
1190
|
-
assetUrl:
|
|
1191
|
-
});
|
|
1192
|
-
var FigmaNodeReferenceElementData =
|
|
1184
|
+
var FigmaNodeReferenceData = z43.object({
|
|
1185
|
+
structureElementId: z43.string(),
|
|
1186
|
+
nodeId: z43.string(),
|
|
1187
|
+
fileId: z43.string().optional(),
|
|
1188
|
+
valid: z43.boolean(),
|
|
1189
|
+
assetId: z43.string().optional(),
|
|
1190
|
+
assetScale: z43.number().optional(),
|
|
1191
|
+
assetWidth: z43.number().optional(),
|
|
1192
|
+
assetHeight: z43.number().optional(),
|
|
1193
|
+
assetUrl: z43.string().optional()
|
|
1194
|
+
});
|
|
1195
|
+
var FigmaNodeReferenceElementData = z43.object({
|
|
1193
1196
|
value: FigmaNodeReferenceData
|
|
1194
1197
|
});
|
|
1195
|
-
var FontFamilyValue =
|
|
1198
|
+
var FontFamilyValue = z44.string();
|
|
1196
1199
|
var FontFamilyTokenData = tokenAliasOrValue(FontFamilyValue);
|
|
1197
|
-
var FontSizeUnit =
|
|
1198
|
-
var FontSizeValue =
|
|
1200
|
+
var FontSizeUnit = z45.enum(["Pixels", "Rem", "Percent"]);
|
|
1201
|
+
var FontSizeValue = z45.object({
|
|
1199
1202
|
unit: FontSizeUnit,
|
|
1200
|
-
measure:
|
|
1203
|
+
measure: z45.number()
|
|
1201
1204
|
});
|
|
1202
1205
|
var FontSizeTokenData = tokenAliasOrValue(FontSizeValue);
|
|
1203
|
-
var FontWeightValue =
|
|
1206
|
+
var FontWeightValue = z46.string();
|
|
1204
1207
|
var FontWeightTokenData = tokenAliasOrValue(FontWeightValue);
|
|
1205
|
-
var GradientType =
|
|
1206
|
-
var GradientStop =
|
|
1207
|
-
position:
|
|
1208
|
+
var GradientType = z47.enum(["Linear", "Radial", "Angular"]);
|
|
1209
|
+
var GradientStop = z47.object({
|
|
1210
|
+
position: z47.number(),
|
|
1208
1211
|
color: ColorTokenData
|
|
1209
1212
|
});
|
|
1210
|
-
var GradientLayerValue =
|
|
1213
|
+
var GradientLayerValue = z47.object({
|
|
1211
1214
|
from: Point2D,
|
|
1212
1215
|
to: Point2D,
|
|
1213
1216
|
type: GradientType,
|
|
1214
|
-
aspectRatio: nullishToOptional(
|
|
1217
|
+
aspectRatio: nullishToOptional(z47.number()),
|
|
1215
1218
|
// z.number(),
|
|
1216
|
-
stops:
|
|
1219
|
+
stops: z47.array(GradientStop).min(2)
|
|
1217
1220
|
});
|
|
1218
1221
|
var GradientLayerData = tokenAliasOrValue(GradientLayerValue);
|
|
1219
|
-
var GradientTokenValue =
|
|
1222
|
+
var GradientTokenValue = z47.array(GradientLayerData);
|
|
1220
1223
|
var GradientTokenData = tokenAliasOrValue(GradientTokenValue);
|
|
1221
|
-
var DocumentationGroupBehavior =
|
|
1222
|
-
var ElementGroupData =
|
|
1224
|
+
var DocumentationGroupBehavior = z48.enum(["Group", "Tabs"]);
|
|
1225
|
+
var ElementGroupData = z48.object({
|
|
1223
1226
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1224
1227
|
configuration: nullishToOptional(DocumentationItemConfiguration)
|
|
1225
1228
|
});
|
|
1226
|
-
var ElementGroupElementData =
|
|
1229
|
+
var ElementGroupElementData = z48.object({
|
|
1227
1230
|
value: ElementGroupData.optional()
|
|
1228
1231
|
});
|
|
1229
|
-
var LetterSpacingUnit =
|
|
1230
|
-
var LetterSpacingValue =
|
|
1232
|
+
var LetterSpacingUnit = z49.enum(["Pixels", "Rem", "Percent"]);
|
|
1233
|
+
var LetterSpacingValue = z49.object({
|
|
1231
1234
|
unit: LetterSpacingUnit,
|
|
1232
|
-
measure:
|
|
1235
|
+
measure: z49.number()
|
|
1233
1236
|
});
|
|
1234
1237
|
var LetterSpacingTokenData = tokenAliasOrValue(LetterSpacingValue);
|
|
1235
|
-
var LineHeightUnit =
|
|
1236
|
-
var LineHeightValue =
|
|
1238
|
+
var LineHeightUnit = z50.enum(["Pixels", "Rem", "Percent", "Raw"]);
|
|
1239
|
+
var LineHeightValue = z50.object({
|
|
1237
1240
|
unit: LineHeightUnit,
|
|
1238
|
-
measure:
|
|
1241
|
+
measure: z50.number()
|
|
1239
1242
|
});
|
|
1240
1243
|
var LineHeightTokenData = tokenAliasOrValue(LineHeightValue);
|
|
1241
|
-
var ParagraphIndentUnit =
|
|
1242
|
-
var ParagraphIndentValue =
|
|
1244
|
+
var ParagraphIndentUnit = z51.enum(["Pixels", "Rem", "Percent"]);
|
|
1245
|
+
var ParagraphIndentValue = z51.object({
|
|
1243
1246
|
unit: ParagraphIndentUnit,
|
|
1244
|
-
measure:
|
|
1247
|
+
measure: z51.number()
|
|
1245
1248
|
});
|
|
1246
1249
|
var ParagraphIndentTokenData = tokenAliasOrValue(ParagraphIndentValue);
|
|
1247
|
-
var ParagraphSpacingUnit =
|
|
1248
|
-
var ParagraphSpacingValue =
|
|
1250
|
+
var ParagraphSpacingUnit = z52.enum(["Pixels", "Rem", "Percent"]);
|
|
1251
|
+
var ParagraphSpacingValue = z52.object({
|
|
1249
1252
|
unit: ParagraphSpacingUnit,
|
|
1250
|
-
measure:
|
|
1253
|
+
measure: z52.number()
|
|
1251
1254
|
});
|
|
1252
1255
|
var ParagraphSpacingTokenData = tokenAliasOrValue(ParagraphSpacingValue);
|
|
1253
|
-
var ProductCopyValue =
|
|
1256
|
+
var ProductCopyValue = z53.string();
|
|
1254
1257
|
var ProductCopyTokenData = tokenAliasOrValue(ProductCopyValue);
|
|
1255
|
-
var ShadowType =
|
|
1256
|
-
var ShadowLayerValue =
|
|
1258
|
+
var ShadowType = z54.enum(["Drop", "Inner"]);
|
|
1259
|
+
var ShadowLayerValue = z54.object({
|
|
1257
1260
|
color: ColorTokenData,
|
|
1258
|
-
x:
|
|
1259
|
-
y:
|
|
1260
|
-
radius:
|
|
1261
|
-
spread:
|
|
1261
|
+
x: z54.number(),
|
|
1262
|
+
y: z54.number(),
|
|
1263
|
+
radius: z54.number(),
|
|
1264
|
+
spread: z54.number(),
|
|
1262
1265
|
opacity: OpacityTokenData,
|
|
1263
1266
|
type: ShadowType
|
|
1264
1267
|
});
|
|
1265
1268
|
var ShadowTokenDataBase = tokenAliasOrValue(ShadowLayerValue);
|
|
1266
|
-
var ShadowTokenData = tokenAliasOrValue(
|
|
1267
|
-
var SizeUnit =
|
|
1268
|
-
var SizeValue =
|
|
1269
|
+
var ShadowTokenData = tokenAliasOrValue(z54.array(ShadowTokenDataBase));
|
|
1270
|
+
var SizeUnit = z55.enum(["Pixels", "Rem", "Percent"]);
|
|
1271
|
+
var SizeValue = z55.object({
|
|
1269
1272
|
unit: SizeUnit,
|
|
1270
|
-
measure:
|
|
1273
|
+
measure: z55.number()
|
|
1271
1274
|
});
|
|
1272
1275
|
var SizeTokenData = tokenAliasOrValue(SizeValue);
|
|
1273
|
-
var SpaceUnit =
|
|
1274
|
-
var SpaceValue =
|
|
1276
|
+
var SpaceUnit = z56.enum(["Pixels", "Rem", "Percent"]);
|
|
1277
|
+
var SpaceValue = z56.object({
|
|
1275
1278
|
unit: SpaceUnit,
|
|
1276
|
-
measure:
|
|
1279
|
+
measure: z56.number()
|
|
1277
1280
|
});
|
|
1278
1281
|
var SpaceTokenData = tokenAliasOrValue(SpaceValue);
|
|
1279
|
-
var StringValue =
|
|
1282
|
+
var StringValue = z57.string();
|
|
1280
1283
|
var StringTokenData = tokenAliasOrValue(StringValue);
|
|
1281
|
-
var TextCase =
|
|
1284
|
+
var TextCase = z58.enum(["Original", "Upper", "Lower", "Camel", "SmallCaps"]);
|
|
1282
1285
|
var TextCaseValue = TextCase;
|
|
1283
1286
|
var TextCaseTokenData = tokenAliasOrValue(TextCaseValue);
|
|
1284
|
-
var TextDecoration =
|
|
1287
|
+
var TextDecoration = z59.enum(["None", "Underline", "Strikethrough"]);
|
|
1285
1288
|
var TextDecorationValue = TextDecoration;
|
|
1286
1289
|
var TextDecorationTokenData = tokenAliasOrValue(TextDecorationValue);
|
|
1287
|
-
var TypographyValue =
|
|
1290
|
+
var TypographyValue = z60.object({
|
|
1288
1291
|
fontSize: FontSizeTokenData,
|
|
1289
1292
|
fontFamily: FontFamilyTokenData,
|
|
1290
1293
|
fontWeight: FontWeightTokenData,
|
|
@@ -1296,75 +1299,75 @@ var TypographyValue = z59.object({
|
|
|
1296
1299
|
paragraphSpacing: ParagraphSpacingTokenData.optional()
|
|
1297
1300
|
});
|
|
1298
1301
|
var TypographyTokenData = tokenAliasOrValue(TypographyValue);
|
|
1299
|
-
var Visibility =
|
|
1302
|
+
var Visibility = z61.enum(["Hidden", "Visible"]);
|
|
1300
1303
|
var VisibilityValue = Visibility;
|
|
1301
1304
|
var VisibilityTokenData = tokenAliasOrValue(VisibilityValue);
|
|
1302
|
-
var ZIndexUnit =
|
|
1303
|
-
var ZIndexValue =
|
|
1305
|
+
var ZIndexUnit = z62.enum(["Raw"]);
|
|
1306
|
+
var ZIndexValue = z62.object({
|
|
1304
1307
|
unit: ZIndexUnit,
|
|
1305
|
-
measure:
|
|
1308
|
+
measure: z62.number()
|
|
1306
1309
|
});
|
|
1307
1310
|
var ZIndexTokenData = tokenAliasOrValue(ZIndexValue);
|
|
1308
|
-
var DesignElementOrigin =
|
|
1309
|
-
id:
|
|
1310
|
-
sourceId:
|
|
1311
|
-
name:
|
|
1312
|
-
});
|
|
1313
|
-
var DesignElementBase =
|
|
1314
|
-
id:
|
|
1315
|
-
persistentId:
|
|
1311
|
+
var DesignElementOrigin = z63.object({
|
|
1312
|
+
id: z63.string(),
|
|
1313
|
+
sourceId: z63.string(),
|
|
1314
|
+
name: z63.string()
|
|
1315
|
+
});
|
|
1316
|
+
var DesignElementBase = z63.object({
|
|
1317
|
+
id: z63.string(),
|
|
1318
|
+
persistentId: z63.string(),
|
|
1316
1319
|
meta: ObjectMeta,
|
|
1317
|
-
designSystemVersionId:
|
|
1318
|
-
createdAt:
|
|
1319
|
-
updatedAt:
|
|
1320
|
+
designSystemVersionId: z63.string(),
|
|
1321
|
+
createdAt: z63.date(),
|
|
1322
|
+
updatedAt: z63.date()
|
|
1320
1323
|
});
|
|
1321
1324
|
var DesignElementImportedBase = DesignElementBase.extend({
|
|
1322
1325
|
origin: DesignElementOrigin
|
|
1323
1326
|
});
|
|
1324
|
-
var DesignElementGroupablePart =
|
|
1325
|
-
parentPersistentId:
|
|
1326
|
-
sortOrder:
|
|
1327
|
+
var DesignElementGroupablePart = z63.object({
|
|
1328
|
+
parentPersistentId: z63.string().optional(),
|
|
1329
|
+
sortOrder: z63.number()
|
|
1327
1330
|
});
|
|
1328
1331
|
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
1329
1332
|
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
1330
|
-
parentPersistentId:
|
|
1333
|
+
parentPersistentId: z63.string()
|
|
1331
1334
|
});
|
|
1332
|
-
var DesignElementBrandedPart =
|
|
1333
|
-
brandPersistentId:
|
|
1335
|
+
var DesignElementBrandedPart = z63.object({
|
|
1336
|
+
brandPersistentId: z63.string()
|
|
1334
1337
|
});
|
|
1335
|
-
var DesignElementSlugPart =
|
|
1336
|
-
slug:
|
|
1337
|
-
userSlug:
|
|
1338
|
+
var DesignElementSlugPart = z63.object({
|
|
1339
|
+
slug: z63.string().optional(),
|
|
1340
|
+
userSlug: z63.string().optional()
|
|
1338
1341
|
});
|
|
1339
|
-
var ComponentOriginPart =
|
|
1340
|
-
nodeId:
|
|
1341
|
-
width:
|
|
1342
|
-
height:
|
|
1342
|
+
var ComponentOriginPart = z64.object({
|
|
1343
|
+
nodeId: z64.string().optional(),
|
|
1344
|
+
width: z64.number().optional(),
|
|
1345
|
+
height: z64.number().optional()
|
|
1343
1346
|
});
|
|
1344
|
-
var ComponentAsset =
|
|
1345
|
-
assetId:
|
|
1346
|
-
assetPath:
|
|
1347
|
+
var ComponentAsset = z64.object({
|
|
1348
|
+
assetId: z64.string(),
|
|
1349
|
+
assetPath: z64.string()
|
|
1347
1350
|
});
|
|
1348
1351
|
var ComponentOrigin = DesignElementOrigin.extend(ComponentOriginPart.shape);
|
|
1349
1352
|
var Component = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
1350
1353
|
origin: ComponentOrigin.optional(),
|
|
1351
1354
|
thumbnail: ComponentAsset,
|
|
1352
1355
|
svg: ComponentAsset.optional(),
|
|
1353
|
-
isAsset:
|
|
1356
|
+
isAsset: z64.boolean()
|
|
1354
1357
|
});
|
|
1355
1358
|
var DocumentationPageV1 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1356
|
-
shortPersistentId:
|
|
1359
|
+
shortPersistentId: z65.string(),
|
|
1357
1360
|
data: DocumentationPageDataV1
|
|
1358
1361
|
});
|
|
1359
1362
|
var DocumentationPageV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1360
|
-
shortPersistentId:
|
|
1363
|
+
shortPersistentId: z66.string(),
|
|
1361
1364
|
data: DocumentationPageDataV2
|
|
1362
1365
|
});
|
|
1363
|
-
var FigmaFileStructureOrigin =
|
|
1364
|
-
sourceId:
|
|
1365
|
-
fileId:
|
|
1366
|
+
var FigmaFileStructureOrigin = z67.object({
|
|
1367
|
+
sourceId: z67.string(),
|
|
1368
|
+
fileId: z67.string().optional()
|
|
1366
1369
|
});
|
|
1367
|
-
var FigmaFileStructureData =
|
|
1370
|
+
var FigmaFileStructureData = z67.object({
|
|
1368
1371
|
rootNode: FigmaFileStructureNode,
|
|
1369
1372
|
assetsInFile: FigmaFileStructureStatistics
|
|
1370
1373
|
});
|
|
@@ -1376,7 +1379,7 @@ var FigmaNodeReference = DesignElementBase.extend({
|
|
|
1376
1379
|
data: FigmaNodeReferenceData
|
|
1377
1380
|
});
|
|
1378
1381
|
var ElementGroup = DesignElementBase.extend(DesignElementGroupablePart.shape).extend(DesignElementSlugPart.shape).extend(DesignElementBrandedPart.partial().shape).extend({
|
|
1379
|
-
shortPersistentId:
|
|
1382
|
+
shortPersistentId: z68.string().optional(),
|
|
1380
1383
|
childType: DesignElementType,
|
|
1381
1384
|
data: ElementGroupData.optional()
|
|
1382
1385
|
});
|
|
@@ -1384,13 +1387,13 @@ var BrandedElementGroup = ElementGroup.extend(DesignElementBrandedPart.shape);
|
|
|
1384
1387
|
var PageBlockV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend({
|
|
1385
1388
|
data: PageBlockDataV2
|
|
1386
1389
|
});
|
|
1387
|
-
var PageBlockEditorModelV2 =
|
|
1388
|
-
id:
|
|
1390
|
+
var PageBlockEditorModelV2 = z69.object({
|
|
1391
|
+
id: z69.string(),
|
|
1389
1392
|
data: PageBlockDataV2
|
|
1390
1393
|
});
|
|
1391
|
-
var DesignTokenOriginPart =
|
|
1392
|
-
referenceOriginId:
|
|
1393
|
-
referencePersistentId:
|
|
1394
|
+
var DesignTokenOriginPart = z70.object({
|
|
1395
|
+
referenceOriginId: z70.string().optional(),
|
|
1396
|
+
referencePersistentId: z70.string().optional()
|
|
1394
1397
|
});
|
|
1395
1398
|
var DesignTokenOrigin = DesignElementOrigin.extend(DesignTokenOriginPart.shape);
|
|
1396
1399
|
var DesignTokenBase = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
@@ -1402,111 +1405,111 @@ var UpdateDesignTokenBase = DesignTokenBase.omit({
|
|
|
1402
1405
|
brandPersistentId: true,
|
|
1403
1406
|
designSystemVersionId: true
|
|
1404
1407
|
});
|
|
1405
|
-
var BlurTokenTypedData =
|
|
1406
|
-
type:
|
|
1408
|
+
var BlurTokenTypedData = z70.object({
|
|
1409
|
+
type: z70.literal("Blur"),
|
|
1407
1410
|
data: BlurTokenData
|
|
1408
1411
|
});
|
|
1409
|
-
var ColorTokenTypedData =
|
|
1410
|
-
type:
|
|
1412
|
+
var ColorTokenTypedData = z70.object({
|
|
1413
|
+
type: z70.literal("Color"),
|
|
1411
1414
|
data: ColorTokenData
|
|
1412
1415
|
});
|
|
1413
|
-
var GradientTokenTypedData =
|
|
1414
|
-
type:
|
|
1416
|
+
var GradientTokenTypedData = z70.object({
|
|
1417
|
+
type: z70.literal("Gradient"),
|
|
1415
1418
|
data: GradientTokenData
|
|
1416
1419
|
});
|
|
1417
|
-
var OpacityTokenTypedData =
|
|
1418
|
-
type:
|
|
1420
|
+
var OpacityTokenTypedData = z70.object({
|
|
1421
|
+
type: z70.literal("Opacity"),
|
|
1419
1422
|
data: OpacityTokenData
|
|
1420
1423
|
});
|
|
1421
|
-
var ShadowTokenTypedData =
|
|
1422
|
-
type:
|
|
1424
|
+
var ShadowTokenTypedData = z70.object({
|
|
1425
|
+
type: z70.literal("Shadow"),
|
|
1423
1426
|
data: ShadowTokenData
|
|
1424
1427
|
});
|
|
1425
|
-
var TypographyTokenTypedData =
|
|
1426
|
-
type:
|
|
1428
|
+
var TypographyTokenTypedData = z70.object({
|
|
1429
|
+
type: z70.literal("Typography"),
|
|
1427
1430
|
data: TypographyTokenData
|
|
1428
1431
|
});
|
|
1429
|
-
var StringTokenTypedData =
|
|
1430
|
-
type:
|
|
1432
|
+
var StringTokenTypedData = z70.object({
|
|
1433
|
+
type: z70.literal("String"),
|
|
1431
1434
|
data: StringTokenData
|
|
1432
1435
|
});
|
|
1433
|
-
var DimensionTokenTypedData =
|
|
1434
|
-
type:
|
|
1436
|
+
var DimensionTokenTypedData = z70.object({
|
|
1437
|
+
type: z70.literal("Dimension"),
|
|
1435
1438
|
data: DimensionTokenData
|
|
1436
1439
|
});
|
|
1437
|
-
var FontSizeTokenTypedData =
|
|
1438
|
-
type:
|
|
1440
|
+
var FontSizeTokenTypedData = z70.object({
|
|
1441
|
+
type: z70.literal("FontSize"),
|
|
1439
1442
|
data: FontSizeTokenData
|
|
1440
1443
|
});
|
|
1441
|
-
var FontFamilyTokenTypedData =
|
|
1442
|
-
type:
|
|
1444
|
+
var FontFamilyTokenTypedData = z70.object({
|
|
1445
|
+
type: z70.literal("FontFamily"),
|
|
1443
1446
|
data: FontFamilyTokenData
|
|
1444
1447
|
});
|
|
1445
|
-
var FontWeightTokenTypedData =
|
|
1446
|
-
type:
|
|
1448
|
+
var FontWeightTokenTypedData = z70.object({
|
|
1449
|
+
type: z70.literal("FontWeight"),
|
|
1447
1450
|
data: FontWeightTokenData
|
|
1448
1451
|
});
|
|
1449
|
-
var LetterSpacingTokenTypedData =
|
|
1450
|
-
type:
|
|
1452
|
+
var LetterSpacingTokenTypedData = z70.object({
|
|
1453
|
+
type: z70.literal("LetterSpacing"),
|
|
1451
1454
|
data: LetterSpacingTokenData
|
|
1452
1455
|
});
|
|
1453
|
-
var LineHeightTokenTypedData =
|
|
1454
|
-
type:
|
|
1456
|
+
var LineHeightTokenTypedData = z70.object({
|
|
1457
|
+
type: z70.literal("LineHeight"),
|
|
1455
1458
|
data: LineHeightTokenData
|
|
1456
1459
|
});
|
|
1457
|
-
var ParagraphSpacingTokenTypedData =
|
|
1458
|
-
type:
|
|
1460
|
+
var ParagraphSpacingTokenTypedData = z70.object({
|
|
1461
|
+
type: z70.literal("ParagraphSpacing"),
|
|
1459
1462
|
data: ParagraphSpacingTokenData
|
|
1460
1463
|
});
|
|
1461
|
-
var TextCaseTokenTypedData =
|
|
1462
|
-
type:
|
|
1464
|
+
var TextCaseTokenTypedData = z70.object({
|
|
1465
|
+
type: z70.literal("TextCase"),
|
|
1463
1466
|
data: TextCaseTokenData
|
|
1464
1467
|
});
|
|
1465
|
-
var TextDecorationTokenTypedData =
|
|
1466
|
-
type:
|
|
1468
|
+
var TextDecorationTokenTypedData = z70.object({
|
|
1469
|
+
type: z70.literal("TextDecoration"),
|
|
1467
1470
|
data: TextDecorationTokenData
|
|
1468
1471
|
});
|
|
1469
|
-
var BorderRadiusTokenTypedData =
|
|
1470
|
-
type:
|
|
1472
|
+
var BorderRadiusTokenTypedData = z70.object({
|
|
1473
|
+
type: z70.literal("BorderRadius"),
|
|
1471
1474
|
data: BorderRadiusTokenData
|
|
1472
1475
|
});
|
|
1473
|
-
var BorderWidthTokenTypedData =
|
|
1474
|
-
type:
|
|
1476
|
+
var BorderWidthTokenTypedData = z70.object({
|
|
1477
|
+
type: z70.literal("BorderWidth"),
|
|
1475
1478
|
data: BorderWidthTokenData
|
|
1476
1479
|
});
|
|
1477
|
-
var BorderTypedData =
|
|
1478
|
-
type:
|
|
1480
|
+
var BorderTypedData = z70.object({
|
|
1481
|
+
type: z70.literal("Border"),
|
|
1479
1482
|
data: BorderTokenData
|
|
1480
1483
|
});
|
|
1481
|
-
var ProductCopyTypedData =
|
|
1482
|
-
type:
|
|
1484
|
+
var ProductCopyTypedData = z70.object({
|
|
1485
|
+
type: z70.literal("ProductCopy"),
|
|
1483
1486
|
data: ProductCopyTokenData
|
|
1484
1487
|
});
|
|
1485
|
-
var SizeTypedData =
|
|
1486
|
-
type:
|
|
1488
|
+
var SizeTypedData = z70.object({
|
|
1489
|
+
type: z70.literal("Size"),
|
|
1487
1490
|
data: SizeTokenData
|
|
1488
1491
|
});
|
|
1489
|
-
var SpaceTypedData =
|
|
1490
|
-
type:
|
|
1492
|
+
var SpaceTypedData = z70.object({
|
|
1493
|
+
type: z70.literal("Space"),
|
|
1491
1494
|
data: SpaceTokenData
|
|
1492
1495
|
});
|
|
1493
|
-
var VisibilityTypedData =
|
|
1494
|
-
type:
|
|
1496
|
+
var VisibilityTypedData = z70.object({
|
|
1497
|
+
type: z70.literal("Visibility"),
|
|
1495
1498
|
data: VisibilityTokenData
|
|
1496
1499
|
});
|
|
1497
|
-
var ZIndexTypedData =
|
|
1498
|
-
type:
|
|
1500
|
+
var ZIndexTypedData = z70.object({
|
|
1501
|
+
type: z70.literal("ZIndex"),
|
|
1499
1502
|
data: ZIndexTokenData
|
|
1500
1503
|
});
|
|
1501
|
-
var DurationTypedData =
|
|
1502
|
-
type:
|
|
1504
|
+
var DurationTypedData = z70.object({
|
|
1505
|
+
type: z70.literal("Duration"),
|
|
1503
1506
|
data: DurationTokenData
|
|
1504
1507
|
});
|
|
1505
|
-
var FontTypedData =
|
|
1506
|
-
type:
|
|
1507
|
-
data:
|
|
1508
|
+
var FontTypedData = z70.object({
|
|
1509
|
+
type: z70.literal("Font"),
|
|
1510
|
+
data: z70.record(z70.any())
|
|
1508
1511
|
});
|
|
1509
|
-
var DesignTokenTypedData =
|
|
1512
|
+
var DesignTokenTypedData = z70.discriminatedUnion("type", [
|
|
1510
1513
|
BlurTokenTypedData,
|
|
1511
1514
|
BorderRadiusTokenTypedData,
|
|
1512
1515
|
BorderWidthTokenTypedData,
|
|
@@ -1539,66 +1542,66 @@ var CreateDesignToken = DesignTokenTypedData.and(CreateDesignTokenBase);
|
|
|
1539
1542
|
var ThemeOverrideOriginPart = DesignTokenOriginPart;
|
|
1540
1543
|
var ThemeOverrideOrigin = DesignTokenOrigin;
|
|
1541
1544
|
var ThemeOverride = DesignTokenTypedData.and(
|
|
1542
|
-
|
|
1543
|
-
tokenPersistentId:
|
|
1545
|
+
z71.object({
|
|
1546
|
+
tokenPersistentId: z71.string(),
|
|
1544
1547
|
origin: ThemeOverrideOrigin.optional().nullable().transform((v) => v ?? void 0)
|
|
1545
1548
|
})
|
|
1546
1549
|
);
|
|
1547
|
-
var ThemeElementData =
|
|
1548
|
-
value:
|
|
1549
|
-
overrides:
|
|
1550
|
+
var ThemeElementData = z71.object({
|
|
1551
|
+
value: z71.object({
|
|
1552
|
+
overrides: z71.array(ThemeOverride)
|
|
1550
1553
|
})
|
|
1551
1554
|
});
|
|
1552
|
-
var ThemeOriginPart =
|
|
1553
|
-
var ThemeOriginObject =
|
|
1554
|
-
id:
|
|
1555
|
-
name:
|
|
1555
|
+
var ThemeOriginPart = z71.object({});
|
|
1556
|
+
var ThemeOriginObject = z71.object({
|
|
1557
|
+
id: z71.string(),
|
|
1558
|
+
name: z71.string()
|
|
1556
1559
|
});
|
|
1557
|
-
var ThemeOriginSource =
|
|
1558
|
-
sourceId:
|
|
1559
|
-
sourceObjects:
|
|
1560
|
+
var ThemeOriginSource = z71.object({
|
|
1561
|
+
sourceId: z71.string(),
|
|
1562
|
+
sourceObjects: z71.array(ThemeOriginObject)
|
|
1560
1563
|
});
|
|
1561
|
-
var ThemeOrigin =
|
|
1562
|
-
sources:
|
|
1564
|
+
var ThemeOrigin = z71.object({
|
|
1565
|
+
sources: z71.array(ThemeOriginSource)
|
|
1563
1566
|
});
|
|
1564
1567
|
var Theme = DesignElementBase.extend(DesignElementBrandedPart.shape).extend({
|
|
1565
1568
|
origin: ThemeOrigin.optional(),
|
|
1566
|
-
overrides:
|
|
1569
|
+
overrides: z71.array(ThemeOverride)
|
|
1567
1570
|
});
|
|
1568
|
-
var FigmaFileDownloadScope =
|
|
1569
|
-
styles:
|
|
1570
|
-
components:
|
|
1571
|
-
currentVersion:
|
|
1572
|
-
publishedVersion:
|
|
1573
|
-
downloadChunkSize:
|
|
1571
|
+
var FigmaFileDownloadScope = z72.object({
|
|
1572
|
+
styles: z72.boolean(),
|
|
1573
|
+
components: z72.boolean(),
|
|
1574
|
+
currentVersion: z72.literal("__latest__").nullable(),
|
|
1575
|
+
publishedVersion: z72.string().nullable(),
|
|
1576
|
+
downloadChunkSize: z72.number().optional()
|
|
1574
1577
|
});
|
|
1575
|
-
var FigmaFileAccessData =
|
|
1576
|
-
accessToken:
|
|
1578
|
+
var FigmaFileAccessData = z72.object({
|
|
1579
|
+
accessToken: z72.string()
|
|
1577
1580
|
});
|
|
1578
|
-
var ImportFunctionInput =
|
|
1579
|
-
importJobId:
|
|
1580
|
-
importContextId:
|
|
1581
|
-
designSystemId:
|
|
1581
|
+
var ImportFunctionInput = z73.object({
|
|
1582
|
+
importJobId: z73.string(),
|
|
1583
|
+
importContextId: z73.string(),
|
|
1584
|
+
designSystemId: z73.string().optional()
|
|
1582
1585
|
});
|
|
1583
|
-
var ImportedFigmaSourceData =
|
|
1584
|
-
sourceId:
|
|
1586
|
+
var ImportedFigmaSourceData = z73.object({
|
|
1587
|
+
sourceId: z73.string(),
|
|
1585
1588
|
figmaRemote: DataSourceFigmaRemote
|
|
1586
1589
|
});
|
|
1587
|
-
var FigmaImportBaseContext =
|
|
1588
|
-
designSystemId:
|
|
1590
|
+
var FigmaImportBaseContext = z73.object({
|
|
1591
|
+
designSystemId: z73.string(),
|
|
1589
1592
|
/**
|
|
1590
1593
|
* Data required for accessing Figma files. This should contain access data for all file ids
|
|
1591
1594
|
* mentioned in the `importedSourceDataBySourceId`
|
|
1592
1595
|
*
|
|
1593
1596
|
* fileId: file data
|
|
1594
1597
|
*/
|
|
1595
|
-
fileAccessByFileId:
|
|
1598
|
+
fileAccessByFileId: z73.record(FigmaFileAccessData),
|
|
1596
1599
|
/**
|
|
1597
1600
|
* Figma source data for which import was requested
|
|
1598
1601
|
*
|
|
1599
1602
|
* sourceId: source data
|
|
1600
1603
|
*/
|
|
1601
|
-
importedSourceDataBySourceId:
|
|
1604
|
+
importedSourceDataBySourceId: z73.record(ImportedFigmaSourceData)
|
|
1602
1605
|
});
|
|
1603
1606
|
var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
|
|
1604
1607
|
importMetadata: DataSourceFigmaImportMetadata
|
|
@@ -1610,65 +1613,65 @@ var FigmaImportContextWithDownloadScopes = FigmaImportBaseContext.extend({
|
|
|
1610
1613
|
*
|
|
1611
1614
|
* File id -> file download scope
|
|
1612
1615
|
*/
|
|
1613
|
-
fileDownloadScopesByFileId:
|
|
1616
|
+
fileDownloadScopesByFileId: z73.record(FigmaFileDownloadScope),
|
|
1614
1617
|
/**
|
|
1615
1618
|
* Sources filtered down to the ones that have changed since last import and therefore need to be
|
|
1616
1619
|
* imported again.
|
|
1617
1620
|
*
|
|
1618
1621
|
* Source id -> import metadata
|
|
1619
1622
|
*/
|
|
1620
|
-
changedImportedSourceDataBySourceId:
|
|
1623
|
+
changedImportedSourceDataBySourceId: z73.record(ChangedImportedFigmaSourceData)
|
|
1621
1624
|
});
|
|
1622
|
-
var ImageImportModelType =
|
|
1623
|
-
var ImageImportModelBase =
|
|
1625
|
+
var ImageImportModelType = z74.enum(["Url", "FigmaRender"]);
|
|
1626
|
+
var ImageImportModelBase = z74.object({
|
|
1624
1627
|
scope: AssetScope
|
|
1625
1628
|
});
|
|
1626
1629
|
var UrlImageImportModel = ImageImportModelBase.extend({
|
|
1627
|
-
type:
|
|
1628
|
-
url:
|
|
1629
|
-
originKey:
|
|
1630
|
-
extension:
|
|
1630
|
+
type: z74.literal(ImageImportModelType.enum.Url),
|
|
1631
|
+
url: z74.string(),
|
|
1632
|
+
originKey: z74.string(),
|
|
1633
|
+
extension: z74.enum(["png", "svg", "jpg"])
|
|
1631
1634
|
});
|
|
1632
|
-
var FigmaRenderFormat =
|
|
1635
|
+
var FigmaRenderFormat = z74.enum(["Svg", "Png"]);
|
|
1633
1636
|
var FigmaRenderBase = ImageImportModelBase.extend({
|
|
1634
|
-
type:
|
|
1635
|
-
fileId:
|
|
1636
|
-
fileVersionId:
|
|
1637
|
-
nodeId:
|
|
1638
|
-
originKey:
|
|
1637
|
+
type: z74.literal(ImageImportModelType.enum.FigmaRender),
|
|
1638
|
+
fileId: z74.string(),
|
|
1639
|
+
fileVersionId: z74.string().optional(),
|
|
1640
|
+
nodeId: z74.string(),
|
|
1641
|
+
originKey: z74.string()
|
|
1639
1642
|
});
|
|
1640
1643
|
var FigmaPngRenderImportModel = FigmaRenderBase.extend({
|
|
1641
|
-
format:
|
|
1642
|
-
scale:
|
|
1644
|
+
format: z74.literal(FigmaRenderFormat.enum.Png),
|
|
1645
|
+
scale: z74.number()
|
|
1643
1646
|
});
|
|
1644
1647
|
var FigmaSvgRenderImportModel = FigmaRenderBase.extend({
|
|
1645
|
-
format:
|
|
1648
|
+
format: z74.literal(FigmaRenderFormat.enum.Svg)
|
|
1646
1649
|
});
|
|
1647
|
-
var FigmaRenderImportModel =
|
|
1650
|
+
var FigmaRenderImportModel = z74.discriminatedUnion("format", [
|
|
1648
1651
|
FigmaPngRenderImportModel,
|
|
1649
1652
|
FigmaSvgRenderImportModel
|
|
1650
1653
|
]);
|
|
1651
|
-
var ImageImportModel =
|
|
1652
|
-
var ImportModelBase =
|
|
1653
|
-
id:
|
|
1654
|
+
var ImageImportModel = z74.union([UrlImageImportModel, FigmaRenderImportModel]);
|
|
1655
|
+
var ImportModelBase = z75.object({
|
|
1656
|
+
id: z75.string(),
|
|
1654
1657
|
meta: ObjectMeta,
|
|
1655
1658
|
origin: DesignElementOrigin,
|
|
1656
|
-
brandPersistentId:
|
|
1657
|
-
sortOrder:
|
|
1659
|
+
brandPersistentId: z75.string(),
|
|
1660
|
+
sortOrder: z75.number()
|
|
1658
1661
|
});
|
|
1659
1662
|
var ImportModelInputBase = ImportModelBase.omit({
|
|
1660
1663
|
brandPersistentId: true,
|
|
1661
1664
|
origin: true,
|
|
1662
1665
|
sortOrder: true
|
|
1663
1666
|
}).extend({
|
|
1664
|
-
originId:
|
|
1665
|
-
originMetadata:
|
|
1667
|
+
originId: z75.string(),
|
|
1668
|
+
originMetadata: z75.record(z75.any())
|
|
1666
1669
|
});
|
|
1667
|
-
var ComponentImportModelPart =
|
|
1670
|
+
var ComponentImportModelPart = z76.object({
|
|
1668
1671
|
thumbnail: ImageImportModel
|
|
1669
1672
|
});
|
|
1670
1673
|
var ComponentImportModel = ImportModelBase.extend(ComponentImportModelPart.shape).extend({
|
|
1671
|
-
isAsset:
|
|
1674
|
+
isAsset: z76.boolean(),
|
|
1672
1675
|
svg: FigmaSvgRenderImportModel.optional(),
|
|
1673
1676
|
origin: ComponentOrigin
|
|
1674
1677
|
});
|
|
@@ -1680,44 +1683,44 @@ var AssetImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart
|
|
|
1680
1683
|
originMetadata: ComponentOriginPart
|
|
1681
1684
|
});
|
|
1682
1685
|
var ThemeOverrideImportModelBase = DesignTokenTypedData.and(
|
|
1683
|
-
|
|
1684
|
-
id:
|
|
1686
|
+
z77.object({
|
|
1687
|
+
id: z77.string(),
|
|
1685
1688
|
meta: ObjectMeta
|
|
1686
1689
|
})
|
|
1687
1690
|
);
|
|
1688
1691
|
var ThemeOverrideImportModel = ThemeOverrideImportModelBase.and(
|
|
1689
|
-
|
|
1692
|
+
z77.object({
|
|
1690
1693
|
origin: ThemeOverrideOrigin
|
|
1691
1694
|
})
|
|
1692
1695
|
);
|
|
1693
1696
|
var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
|
|
1694
|
-
|
|
1695
|
-
originId:
|
|
1697
|
+
z77.object({
|
|
1698
|
+
originId: z77.string(),
|
|
1696
1699
|
originMetadata: ThemeOverrideOriginPart
|
|
1697
1700
|
})
|
|
1698
1701
|
);
|
|
1699
|
-
var ThemeImportModel =
|
|
1702
|
+
var ThemeImportModel = z77.object({
|
|
1700
1703
|
meta: ObjectMeta,
|
|
1701
|
-
brandPersistentId:
|
|
1704
|
+
brandPersistentId: z77.string(),
|
|
1702
1705
|
originSource: ThemeOriginSource,
|
|
1703
|
-
overrides:
|
|
1704
|
-
sortOrder:
|
|
1706
|
+
overrides: z77.array(ThemeOverrideImportModel),
|
|
1707
|
+
sortOrder: z77.number()
|
|
1705
1708
|
});
|
|
1706
|
-
var ThemeImportModelInput =
|
|
1709
|
+
var ThemeImportModelInput = z77.object({
|
|
1707
1710
|
meta: ObjectMeta,
|
|
1708
|
-
originObjects:
|
|
1709
|
-
overrides:
|
|
1711
|
+
originObjects: z77.array(ThemeOriginObject),
|
|
1712
|
+
overrides: z77.array(ThemeOverrideImportModelInput)
|
|
1710
1713
|
});
|
|
1711
|
-
var ThemeUpdateImportModel =
|
|
1712
|
-
themePersistentId:
|
|
1713
|
-
overrides:
|
|
1714
|
+
var ThemeUpdateImportModel = z77.object({
|
|
1715
|
+
themePersistentId: z77.string(),
|
|
1716
|
+
overrides: z77.array(ThemeOverrideImportModel)
|
|
1714
1717
|
});
|
|
1715
|
-
var ThemeUpdateImportModelInput =
|
|
1716
|
-
themePersistentId:
|
|
1717
|
-
overrides:
|
|
1718
|
+
var ThemeUpdateImportModelInput = z77.object({
|
|
1719
|
+
themePersistentId: z77.string(),
|
|
1720
|
+
overrides: z77.array(ThemeOverrideImportModelInput)
|
|
1718
1721
|
});
|
|
1719
|
-
var DesignTokenImportModelPart =
|
|
1720
|
-
collection:
|
|
1722
|
+
var DesignTokenImportModelPart = z78.object({
|
|
1723
|
+
collection: z78.string().optional()
|
|
1721
1724
|
});
|
|
1722
1725
|
var DesignTokenImportModelBase = ImportModelBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
1723
1726
|
origin: DesignTokenOrigin
|
|
@@ -1731,10 +1734,10 @@ var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
|
|
|
1731
1734
|
image: FigmaPngRenderImportModel
|
|
1732
1735
|
});
|
|
1733
1736
|
var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
|
|
1734
|
-
children:
|
|
1737
|
+
children: z79.lazy(() => FigmaFileStructureNodeImportModel.array())
|
|
1735
1738
|
});
|
|
1736
|
-
var FigmaFileStructureImportModelPart =
|
|
1737
|
-
data:
|
|
1739
|
+
var FigmaFileStructureImportModelPart = z79.object({
|
|
1740
|
+
data: z79.object({
|
|
1738
1741
|
rootNode: FigmaFileStructureNodeImportModel,
|
|
1739
1742
|
assetsInFile: FigmaFileStructureStatistics
|
|
1740
1743
|
})
|
|
@@ -1745,31 +1748,31 @@ var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImp
|
|
|
1745
1748
|
var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
|
|
1746
1749
|
FigmaFileStructureImportModelPart.shape
|
|
1747
1750
|
).extend({
|
|
1748
|
-
fileVersionId:
|
|
1751
|
+
fileVersionId: z79.string()
|
|
1749
1752
|
});
|
|
1750
|
-
var DataSourceImportModel =
|
|
1751
|
-
id:
|
|
1752
|
-
fileName:
|
|
1753
|
-
thumbnailUrl:
|
|
1753
|
+
var DataSourceImportModel = z80.object({
|
|
1754
|
+
id: z80.string(),
|
|
1755
|
+
fileName: z80.string().optional(),
|
|
1756
|
+
thumbnailUrl: z80.string().optional()
|
|
1754
1757
|
});
|
|
1755
|
-
var ImportModelInputCollection =
|
|
1758
|
+
var ImportModelInputCollection = z81.object({
|
|
1756
1759
|
source: DataSourceImportModel,
|
|
1757
|
-
tokens:
|
|
1758
|
-
components:
|
|
1759
|
-
assets:
|
|
1760
|
-
themeUpdates:
|
|
1761
|
-
themes:
|
|
1760
|
+
tokens: z81.array(DesignTokenImportModelInput).default([]),
|
|
1761
|
+
components: z81.array(ComponentImportModelInput).default([]),
|
|
1762
|
+
assets: z81.array(AssetImportModelInput).default([]),
|
|
1763
|
+
themeUpdates: z81.array(ThemeUpdateImportModelInput).default([]),
|
|
1764
|
+
themes: z81.array(ThemeImportModelInput).default([]),
|
|
1762
1765
|
figmaFileStructure: FigmaFileStructureImportModelInput.optional()
|
|
1763
1766
|
});
|
|
1764
|
-
var ImportModelCollection =
|
|
1765
|
-
sources:
|
|
1766
|
-
tokens:
|
|
1767
|
-
components:
|
|
1768
|
-
themeUpdates:
|
|
1769
|
-
themes:
|
|
1770
|
-
figmaFileStructures:
|
|
1767
|
+
var ImportModelCollection = z81.object({
|
|
1768
|
+
sources: z81.array(DataSourceImportModel),
|
|
1769
|
+
tokens: z81.array(DesignTokenImportModel).default([]),
|
|
1770
|
+
components: z81.array(ComponentImportModel).default([]),
|
|
1771
|
+
themeUpdates: z81.array(ThemeUpdateImportModel).default([]),
|
|
1772
|
+
themes: z81.array(ThemeImportModel).default([]),
|
|
1773
|
+
figmaFileStructures: z81.array(FigmaFileStructureImportModel)
|
|
1771
1774
|
});
|
|
1772
|
-
var ImportWarningType =
|
|
1775
|
+
var ImportWarningType = z82.enum([
|
|
1773
1776
|
"NoVersionFound",
|
|
1774
1777
|
"UnsupportedFill",
|
|
1775
1778
|
"UnsupportedStroke",
|
|
@@ -1783,25 +1786,25 @@ var ImportWarningType = z81.enum([
|
|
|
1783
1786
|
"DuplicateImportedStyleId",
|
|
1784
1787
|
"DuplicateImportedStylePath"
|
|
1785
1788
|
]);
|
|
1786
|
-
var ImportWarning =
|
|
1789
|
+
var ImportWarning = z82.object({
|
|
1787
1790
|
warningType: ImportWarningType,
|
|
1788
|
-
componentId:
|
|
1789
|
-
componentName:
|
|
1790
|
-
styleId:
|
|
1791
|
-
styleName:
|
|
1792
|
-
unsupportedStyleValueType:
|
|
1791
|
+
componentId: z82.string().optional(),
|
|
1792
|
+
componentName: z82.string().optional(),
|
|
1793
|
+
styleId: z82.string().optional(),
|
|
1794
|
+
styleName: z82.string().optional(),
|
|
1795
|
+
unsupportedStyleValueType: z82.string().optional()
|
|
1793
1796
|
});
|
|
1794
|
-
var FileStructureStats =
|
|
1797
|
+
var FileStructureStats = z83.object({
|
|
1795
1798
|
frames: zeroNumberByDefault2(),
|
|
1796
1799
|
components: zeroNumberByDefault2(),
|
|
1797
1800
|
componentSets: zeroNumberByDefault2()
|
|
1798
1801
|
});
|
|
1799
1802
|
var SourceImportSummaryByTokenTypeKey = DesignTokenType.or(
|
|
1800
1803
|
// Backward compatibility
|
|
1801
|
-
|
|
1804
|
+
z83.enum(["Measure", "Radius", "GenericToken", "Font", "Text"])
|
|
1802
1805
|
);
|
|
1803
|
-
var SourceImportSummaryByTokenType =
|
|
1804
|
-
var SourceImportTokenSummary =
|
|
1806
|
+
var SourceImportSummaryByTokenType = z83.record(SourceImportSummaryByTokenTypeKey, z83.number());
|
|
1807
|
+
var SourceImportTokenSummary = z83.object({
|
|
1805
1808
|
tokensCreated: zeroNumberByDefault2(),
|
|
1806
1809
|
tokensUpdated: zeroNumberByDefault2(),
|
|
1807
1810
|
tokensDeleted: zeroNumberByDefault2(),
|
|
@@ -1809,7 +1812,7 @@ var SourceImportTokenSummary = z82.object({
|
|
|
1809
1812
|
tokensUpdatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {}),
|
|
1810
1813
|
tokensDeletedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {})
|
|
1811
1814
|
});
|
|
1812
|
-
var SourceImportComponentSummary =
|
|
1815
|
+
var SourceImportComponentSummary = z83.object({
|
|
1813
1816
|
componentsCreated: zeroNumberByDefault2(),
|
|
1814
1817
|
componentsUpdated: zeroNumberByDefault2(),
|
|
1815
1818
|
componentsDeleted: zeroNumberByDefault2(),
|
|
@@ -1817,54 +1820,54 @@ var SourceImportComponentSummary = z82.object({
|
|
|
1817
1820
|
componentAssetsUpdated: zeroNumberByDefault2(),
|
|
1818
1821
|
componentAssetsDeleted: zeroNumberByDefault2()
|
|
1819
1822
|
});
|
|
1820
|
-
var SourceImportFrameSummary =
|
|
1823
|
+
var SourceImportFrameSummary = z83.object({
|
|
1821
1824
|
assetsInFile: nullishToOptional(FileStructureStats.optional()),
|
|
1822
|
-
invalidReferencesCount: nullishToOptional(
|
|
1823
|
-
});
|
|
1824
|
-
var SourceImportSummary =
|
|
1825
|
-
sourceId: nullishToOptional(
|
|
1826
|
-
brandId: nullishToOptional(
|
|
1827
|
-
versionId: nullishToOptional(
|
|
1828
|
-
error: nullishToOptional(
|
|
1829
|
-
isFailed:
|
|
1830
|
-
warnings:
|
|
1825
|
+
invalidReferencesCount: nullishToOptional(z83.number().optional())
|
|
1826
|
+
});
|
|
1827
|
+
var SourceImportSummary = z83.object({
|
|
1828
|
+
sourceId: nullishToOptional(z83.string()),
|
|
1829
|
+
brandId: nullishToOptional(z83.string()),
|
|
1830
|
+
versionId: nullishToOptional(z83.string()),
|
|
1831
|
+
error: nullishToOptional(z83.any()),
|
|
1832
|
+
isFailed: z83.boolean(),
|
|
1833
|
+
warnings: z83.array(ImportWarning).nullish().transform((v) => v ?? []),
|
|
1831
1834
|
...SourceImportTokenSummary.shape,
|
|
1832
1835
|
...SourceImportComponentSummary.shape,
|
|
1833
1836
|
...FileStructureStats.shape
|
|
1834
1837
|
});
|
|
1835
1838
|
function zeroNumberByDefault2() {
|
|
1836
|
-
return
|
|
1839
|
+
return z83.number().nullish().transform((v) => v ?? 0);
|
|
1837
1840
|
}
|
|
1838
|
-
var PageBlockDefinitionAppearance =
|
|
1839
|
-
isBordered:
|
|
1840
|
-
hasBackground:
|
|
1841
|
-
isEditorPresentationDifferent:
|
|
1842
|
-
});
|
|
1843
|
-
var PageBlockDefinitionLayoutType =
|
|
1844
|
-
var PageBlockDefinitionLayoutGap =
|
|
1845
|
-
var PageBlockDefinitionLayoutAlign =
|
|
1846
|
-
var PageBlockDefinitionLayoutResizing =
|
|
1847
|
-
var PageBlockDefinitionLayoutBase =
|
|
1841
|
+
var PageBlockDefinitionAppearance = z84.object({
|
|
1842
|
+
isBordered: z84.boolean().optional(),
|
|
1843
|
+
hasBackground: z84.boolean().optional(),
|
|
1844
|
+
isEditorPresentationDifferent: z84.boolean().optional()
|
|
1845
|
+
});
|
|
1846
|
+
var PageBlockDefinitionLayoutType = z85.enum(["Column", "Row"]);
|
|
1847
|
+
var PageBlockDefinitionLayoutGap = z85.enum(["Small", "Medium", "Large", "None"]);
|
|
1848
|
+
var PageBlockDefinitionLayoutAlign = z85.enum(["Start", "Center", "End"]);
|
|
1849
|
+
var PageBlockDefinitionLayoutResizing = z85.enum(["Fill", "Hug"]);
|
|
1850
|
+
var PageBlockDefinitionLayoutBase = z85.object({
|
|
1848
1851
|
type: PageBlockDefinitionLayoutType,
|
|
1849
1852
|
gap: PageBlockDefinitionLayoutGap.optional(),
|
|
1850
1853
|
columnAlign: PageBlockDefinitionLayoutAlign.optional(),
|
|
1851
1854
|
columnResizing: PageBlockDefinitionLayoutResizing.optional()
|
|
1852
1855
|
});
|
|
1853
1856
|
var PageBlockDefinitionLayout = PageBlockDefinitionLayoutBase.extend({
|
|
1854
|
-
children:
|
|
1855
|
-
});
|
|
1856
|
-
var PageBlockDefinitionVariant =
|
|
1857
|
-
id:
|
|
1858
|
-
name:
|
|
1859
|
-
image:
|
|
1860
|
-
description:
|
|
1861
|
-
documentationLink:
|
|
1857
|
+
children: z85.lazy(() => z85.array(PageBlockDefinitionLayout.or(z85.string())))
|
|
1858
|
+
});
|
|
1859
|
+
var PageBlockDefinitionVariant = z85.object({
|
|
1860
|
+
id: z85.string(),
|
|
1861
|
+
name: z85.string(),
|
|
1862
|
+
image: z85.string().optional(),
|
|
1863
|
+
description: z85.string().optional(),
|
|
1864
|
+
documentationLink: z85.string().optional(),
|
|
1862
1865
|
layout: PageBlockDefinitionLayout,
|
|
1863
|
-
maxColumns:
|
|
1864
|
-
defaultColumns:
|
|
1866
|
+
maxColumns: z85.number().optional(),
|
|
1867
|
+
defaultColumns: z85.number().optional(),
|
|
1865
1868
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
1866
1869
|
});
|
|
1867
|
-
var PageBlockDefinitionPropertyType =
|
|
1870
|
+
var PageBlockDefinitionPropertyType = z86.enum([
|
|
1868
1871
|
"RichText",
|
|
1869
1872
|
"MultiRichText",
|
|
1870
1873
|
"Text",
|
|
@@ -1891,7 +1894,7 @@ var PageBlockDefinitionPropertyType = z85.enum([
|
|
|
1891
1894
|
"Storybook",
|
|
1892
1895
|
"Color"
|
|
1893
1896
|
]);
|
|
1894
|
-
var PageBlockDefinitionRichTextPropertyStyle =
|
|
1897
|
+
var PageBlockDefinitionRichTextPropertyStyle = z86.enum([
|
|
1895
1898
|
"Title1",
|
|
1896
1899
|
"Title2",
|
|
1897
1900
|
"Title3",
|
|
@@ -1901,8 +1904,8 @@ var PageBlockDefinitionRichTextPropertyStyle = z85.enum([
|
|
|
1901
1904
|
"Callout",
|
|
1902
1905
|
"Default"
|
|
1903
1906
|
]);
|
|
1904
|
-
var PageBlockDefinitionMultiRichTextPropertyStyle =
|
|
1905
|
-
var PageBlockDefinitionTextPropertyStyle =
|
|
1907
|
+
var PageBlockDefinitionMultiRichTextPropertyStyle = z86.enum(["OL", "UL", "Default"]);
|
|
1908
|
+
var PageBlockDefinitionTextPropertyStyle = z86.enum([
|
|
1906
1909
|
"Title1",
|
|
1907
1910
|
"Title2",
|
|
1908
1911
|
"Title3",
|
|
@@ -1915,77 +1918,77 @@ var PageBlockDefinitionTextPropertyStyle = z85.enum([
|
|
|
1915
1918
|
"SmallBold",
|
|
1916
1919
|
"SmallSemibold"
|
|
1917
1920
|
]);
|
|
1918
|
-
var PageBlockDefinitionTextPropertyColor =
|
|
1919
|
-
var PageBlockDefinitionBooleanPropertyStyle =
|
|
1920
|
-
var PageBlockDefinitionSingleSelectPropertyStyle =
|
|
1921
|
+
var PageBlockDefinitionTextPropertyColor = z86.enum(["Neutral", "NeutralFaded"]);
|
|
1922
|
+
var PageBlockDefinitionBooleanPropertyStyle = z86.enum(["SegmentedControl", "ToggleButton", "Checkbox"]);
|
|
1923
|
+
var PageBlockDefinitionSingleSelectPropertyStyle = z86.enum([
|
|
1921
1924
|
"SegmentedControl",
|
|
1922
1925
|
"ToggleButton",
|
|
1923
1926
|
"Select",
|
|
1924
1927
|
"Checkbox"
|
|
1925
1928
|
]);
|
|
1926
|
-
var PageBlockDefinitionMultiSelectPropertyStyle =
|
|
1927
|
-
var PageBlockDefinitionImageAspectRatio =
|
|
1928
|
-
var PageBlockDefinitionImageWidth =
|
|
1929
|
-
var PageBlockDefinitionSelectChoice =
|
|
1930
|
-
value:
|
|
1931
|
-
name:
|
|
1932
|
-
icon:
|
|
1929
|
+
var PageBlockDefinitionMultiSelectPropertyStyle = z86.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
1930
|
+
var PageBlockDefinitionImageAspectRatio = z86.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
|
|
1931
|
+
var PageBlockDefinitionImageWidth = z86.enum(["Full", "Icon", "Small", "Medium", "Large", "Poster"]);
|
|
1932
|
+
var PageBlockDefinitionSelectChoice = z86.object({
|
|
1933
|
+
value: z86.string(),
|
|
1934
|
+
name: z86.string(),
|
|
1935
|
+
icon: z86.string().optional()
|
|
1933
1936
|
});
|
|
1934
|
-
var PageBlockDefinitionUntypedPropertyOptions =
|
|
1935
|
-
var PageBlockDefinitionRichTextOptions =
|
|
1937
|
+
var PageBlockDefinitionUntypedPropertyOptions = z86.record(z86.any());
|
|
1938
|
+
var PageBlockDefinitionRichTextOptions = z86.object({
|
|
1936
1939
|
richTextStyle: PageBlockDefinitionRichTextPropertyStyle.optional()
|
|
1937
1940
|
});
|
|
1938
|
-
var PageBlockDefinitionMutiRichTextOptions =
|
|
1941
|
+
var PageBlockDefinitionMutiRichTextOptions = z86.object({
|
|
1939
1942
|
multiRichTextStyle: PageBlockDefinitionMultiRichTextPropertyStyle.optional()
|
|
1940
1943
|
});
|
|
1941
|
-
var PageBlockDefinitionTextOptions =
|
|
1942
|
-
placeholder:
|
|
1943
|
-
defaultValue:
|
|
1944
|
+
var PageBlockDefinitionTextOptions = z86.object({
|
|
1945
|
+
placeholder: z86.string().optional(),
|
|
1946
|
+
defaultValue: z86.string().optional(),
|
|
1944
1947
|
textStyle: PageBlockDefinitionTextPropertyStyle.optional(),
|
|
1945
1948
|
color: PageBlockDefinitionTextPropertyColor.optional()
|
|
1946
1949
|
});
|
|
1947
|
-
var PageBlockDefinitionSelectOptions =
|
|
1950
|
+
var PageBlockDefinitionSelectOptions = z86.object({
|
|
1948
1951
|
singleSelectStyle: PageBlockDefinitionSingleSelectPropertyStyle.optional(),
|
|
1949
|
-
defaultChoice:
|
|
1950
|
-
choices:
|
|
1952
|
+
defaultChoice: z86.string(),
|
|
1953
|
+
choices: z86.array(PageBlockDefinitionSelectChoice)
|
|
1951
1954
|
});
|
|
1952
|
-
var PageBlockDefinitionImageOptions =
|
|
1955
|
+
var PageBlockDefinitionImageOptions = z86.object({
|
|
1953
1956
|
width: PageBlockDefinitionImageWidth.optional(),
|
|
1954
1957
|
aspectRatio: PageBlockDefinitionImageAspectRatio.optional(),
|
|
1955
|
-
allowCaption:
|
|
1956
|
-
recommendation:
|
|
1958
|
+
allowCaption: z86.boolean().optional(),
|
|
1959
|
+
recommendation: z86.string().optional()
|
|
1957
1960
|
});
|
|
1958
|
-
var PageBlockDefinitionBooleanOptions =
|
|
1959
|
-
defaultvalue:
|
|
1961
|
+
var PageBlockDefinitionBooleanOptions = z86.object({
|
|
1962
|
+
defaultvalue: z86.boolean().optional(),
|
|
1960
1963
|
booleanStyle: PageBlockDefinitionBooleanPropertyStyle.optional()
|
|
1961
1964
|
});
|
|
1962
|
-
var PageBlockDefinitionNumberOptions =
|
|
1963
|
-
defaultValue:
|
|
1964
|
-
min:
|
|
1965
|
-
max:
|
|
1966
|
-
step:
|
|
1967
|
-
placeholder:
|
|
1965
|
+
var PageBlockDefinitionNumberOptions = z86.object({
|
|
1966
|
+
defaultValue: z86.number(),
|
|
1967
|
+
min: z86.number().optional(),
|
|
1968
|
+
max: z86.number().optional(),
|
|
1969
|
+
step: z86.number().optional(),
|
|
1970
|
+
placeholder: z86.string().optional()
|
|
1968
1971
|
});
|
|
1969
|
-
var PageBlockDefinitionComponentOptions =
|
|
1970
|
-
renderLayoutAs:
|
|
1971
|
-
allowPropertySelection:
|
|
1972
|
+
var PageBlockDefinitionComponentOptions = z86.object({
|
|
1973
|
+
renderLayoutAs: z86.enum(["List", "Table"]).optional(),
|
|
1974
|
+
allowPropertySelection: z86.boolean().optional()
|
|
1972
1975
|
});
|
|
1973
|
-
var PageBlockDefinitionProperty =
|
|
1974
|
-
id:
|
|
1975
|
-
name:
|
|
1976
|
+
var PageBlockDefinitionProperty = z86.object({
|
|
1977
|
+
id: z86.string(),
|
|
1978
|
+
name: z86.string(),
|
|
1976
1979
|
type: PageBlockDefinitionPropertyType,
|
|
1977
|
-
description:
|
|
1980
|
+
description: z86.string().optional(),
|
|
1978
1981
|
// TODO Docs
|
|
1979
1982
|
options: PageBlockDefinitionUntypedPropertyOptions.optional(),
|
|
1980
|
-
variantOptions:
|
|
1983
|
+
variantOptions: z86.record(PageBlockDefinitionUntypedPropertyOptions).optional()
|
|
1981
1984
|
});
|
|
1982
|
-
var PageBlockDefinitionItem =
|
|
1983
|
-
properties:
|
|
1985
|
+
var PageBlockDefinitionItem = z86.object({
|
|
1986
|
+
properties: z86.array(PageBlockDefinitionProperty),
|
|
1984
1987
|
appearance: PageBlockDefinitionAppearance.optional(),
|
|
1985
|
-
variants:
|
|
1986
|
-
defaultVariantKey:
|
|
1988
|
+
variants: z86.array(PageBlockDefinitionVariant),
|
|
1989
|
+
defaultVariantKey: z86.string()
|
|
1987
1990
|
});
|
|
1988
|
-
var PageBlockCategory =
|
|
1991
|
+
var PageBlockCategory = z87.enum([
|
|
1989
1992
|
"Text",
|
|
1990
1993
|
"Layout",
|
|
1991
1994
|
"Media",
|
|
@@ -1999,55 +2002,41 @@ var PageBlockCategory = z86.enum([
|
|
|
1999
2002
|
"Data",
|
|
2000
2003
|
"Other"
|
|
2001
2004
|
]);
|
|
2002
|
-
var PageBlockBehaviorDataType =
|
|
2003
|
-
var PageBlockBehaviorSelectionType =
|
|
2004
|
-
var PageBlockDefinitionBehavior =
|
|
2005
|
+
var PageBlockBehaviorDataType = z87.enum(["Item", "Token", "Asset", "Component", "FigmaNode"]);
|
|
2006
|
+
var PageBlockBehaviorSelectionType = z87.enum(["Entity", "Group", "EntityAndGroup"]);
|
|
2007
|
+
var PageBlockDefinitionBehavior = z87.object({
|
|
2005
2008
|
dataType: PageBlockBehaviorDataType,
|
|
2006
|
-
items:
|
|
2007
|
-
numberOfItems:
|
|
2008
|
-
allowLinks:
|
|
2009
|
+
items: z87.object({
|
|
2010
|
+
numberOfItems: z87.number(),
|
|
2011
|
+
allowLinks: z87.boolean()
|
|
2009
2012
|
}).optional(),
|
|
2010
|
-
entities:
|
|
2013
|
+
entities: z87.object({
|
|
2011
2014
|
selectionType: PageBlockBehaviorSelectionType,
|
|
2012
|
-
maxSelected:
|
|
2015
|
+
maxSelected: z87.number()
|
|
2013
2016
|
}).optional()
|
|
2014
2017
|
});
|
|
2015
|
-
var PageBlockDefinitionOnboarding =
|
|
2016
|
-
helpText:
|
|
2017
|
-
documentationLink:
|
|
2018
|
+
var PageBlockDefinitionOnboarding = z87.object({
|
|
2019
|
+
helpText: z87.string(),
|
|
2020
|
+
documentationLink: z87.string().optional()
|
|
2018
2021
|
});
|
|
2019
|
-
var PageBlockDefinition =
|
|
2020
|
-
id:
|
|
2021
|
-
name:
|
|
2022
|
-
description:
|
|
2022
|
+
var PageBlockDefinition = z87.object({
|
|
2023
|
+
id: z87.string(),
|
|
2024
|
+
name: z87.string(),
|
|
2025
|
+
description: z87.string(),
|
|
2023
2026
|
category: PageBlockCategory,
|
|
2024
2027
|
icon: AssetValue.optional(),
|
|
2025
|
-
documentationLink:
|
|
2026
|
-
searchKeywords:
|
|
2028
|
+
documentationLink: z87.string().optional(),
|
|
2029
|
+
searchKeywords: z87.array(z87.string()).optional(),
|
|
2027
2030
|
item: PageBlockDefinitionItem,
|
|
2028
2031
|
behavior: PageBlockDefinitionBehavior,
|
|
2029
|
-
editorOptions:
|
|
2032
|
+
editorOptions: z87.object({
|
|
2030
2033
|
onboarding: PageBlockDefinitionOnboarding.optional()
|
|
2031
2034
|
}),
|
|
2032
2035
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
2033
2036
|
});
|
|
2034
|
-
var DocumentationPageGroup =
|
|
2035
|
-
type:
|
|
2036
|
-
childType:
|
|
2037
|
-
id: z87.string(),
|
|
2038
|
-
persistentId: z87.string(),
|
|
2039
|
-
shortPersistentId: z87.string(),
|
|
2040
|
-
designSystemVersionId: z87.string(),
|
|
2041
|
-
parentPersistentId: z87.string().nullish(),
|
|
2042
|
-
sortOrder: z87.number(),
|
|
2043
|
-
title: z87.string(),
|
|
2044
|
-
slug: z87.string(),
|
|
2045
|
-
userSlug: z87.string().nullish(),
|
|
2046
|
-
createdAt: z87.date(),
|
|
2047
|
-
updatedAt: z87.date()
|
|
2048
|
-
});
|
|
2049
|
-
var DocumentationPage = z88.object({
|
|
2050
|
-
type: z88.literal("DocumentationPage"),
|
|
2037
|
+
var DocumentationPageGroup = z88.object({
|
|
2038
|
+
type: z88.literal("ElementGroup"),
|
|
2039
|
+
childType: z88.literal("DocumentationPage"),
|
|
2051
2040
|
id: z88.string(),
|
|
2052
2041
|
persistentId: z88.string(),
|
|
2053
2042
|
shortPersistentId: z88.string(),
|
|
@@ -2060,158 +2049,172 @@ var DocumentationPage = z88.object({
|
|
|
2060
2049
|
createdAt: z88.date(),
|
|
2061
2050
|
updatedAt: z88.date()
|
|
2062
2051
|
});
|
|
2063
|
-
var
|
|
2052
|
+
var DocumentationPage = z89.object({
|
|
2053
|
+
type: z89.literal("DocumentationPage"),
|
|
2054
|
+
id: z89.string(),
|
|
2055
|
+
persistentId: z89.string(),
|
|
2056
|
+
shortPersistentId: z89.string(),
|
|
2057
|
+
designSystemVersionId: z89.string(),
|
|
2058
|
+
parentPersistentId: z89.string().nullish(),
|
|
2059
|
+
sortOrder: z89.number(),
|
|
2060
|
+
title: z89.string(),
|
|
2061
|
+
slug: z89.string(),
|
|
2062
|
+
userSlug: z89.string().nullish(),
|
|
2063
|
+
createdAt: z89.date(),
|
|
2064
|
+
updatedAt: z89.date()
|
|
2065
|
+
});
|
|
2066
|
+
var NpmRegistryAuthType = z90.enum(["Basic", "Bearer", "None", "Custom"]);
|
|
2064
2067
|
var registryTypesWithoutAzure = ["NPMJS", "GitHub", "Artifactory", "Custom"];
|
|
2065
|
-
var NpmRegistryType =
|
|
2066
|
-
var NpmRegistryTypeWithoutAzure =
|
|
2067
|
-
var NpmRegistryBasicAuthConfig =
|
|
2068
|
+
var NpmRegistryType = z90.enum([...registryTypesWithoutAzure, "AzureDevOps"]);
|
|
2069
|
+
var NpmRegistryTypeWithoutAzure = z90.enum(registryTypesWithoutAzure);
|
|
2070
|
+
var NpmRegistryBasicAuthConfig = z90.object({
|
|
2068
2071
|
registryType: NpmRegistryType,
|
|
2069
|
-
authType:
|
|
2070
|
-
username:
|
|
2071
|
-
password:
|
|
2072
|
+
authType: z90.literal(NpmRegistryAuthType.Enum.Basic),
|
|
2073
|
+
username: z90.string(),
|
|
2074
|
+
password: z90.string()
|
|
2072
2075
|
});
|
|
2073
|
-
var NpmRegistryBearerAuthConfig =
|
|
2076
|
+
var NpmRegistryBearerAuthConfig = z90.object({
|
|
2074
2077
|
registryType: NpmRegistryTypeWithoutAzure,
|
|
2075
|
-
authType:
|
|
2076
|
-
accessToken:
|
|
2078
|
+
authType: z90.literal(NpmRegistryAuthType.Enum.Bearer),
|
|
2079
|
+
accessToken: z90.string()
|
|
2077
2080
|
});
|
|
2078
|
-
var NpmRegistryNoAuthConfig =
|
|
2081
|
+
var NpmRegistryNoAuthConfig = z90.object({
|
|
2079
2082
|
registryType: NpmRegistryTypeWithoutAzure,
|
|
2080
|
-
authType:
|
|
2083
|
+
authType: z90.literal(NpmRegistryAuthType.Enum.None)
|
|
2081
2084
|
});
|
|
2082
|
-
var NpmRegistrCustomAuthConfig =
|
|
2085
|
+
var NpmRegistrCustomAuthConfig = z90.object({
|
|
2083
2086
|
registryType: NpmRegistryTypeWithoutAzure,
|
|
2084
|
-
authType:
|
|
2085
|
-
authHeaderName:
|
|
2086
|
-
authHeaderValue:
|
|
2087
|
+
authType: z90.literal(NpmRegistryAuthType.Enum.Custom),
|
|
2088
|
+
authHeaderName: z90.string(),
|
|
2089
|
+
authHeaderValue: z90.string()
|
|
2087
2090
|
});
|
|
2088
|
-
var NpmRegistryAuthConfig =
|
|
2091
|
+
var NpmRegistryAuthConfig = z90.discriminatedUnion("authType", [
|
|
2089
2092
|
NpmRegistryBasicAuthConfig,
|
|
2090
2093
|
NpmRegistryBearerAuthConfig,
|
|
2091
2094
|
NpmRegistryNoAuthConfig,
|
|
2092
2095
|
NpmRegistrCustomAuthConfig
|
|
2093
2096
|
]);
|
|
2094
|
-
var NpmRegistryConfigBase =
|
|
2095
|
-
enabledScopes:
|
|
2096
|
-
customRegistryUrl:
|
|
2097
|
-
bypassProxy:
|
|
2098
|
-
npmProxyRegistryConfigId:
|
|
2099
|
-
npmProxyVersion:
|
|
2097
|
+
var NpmRegistryConfigBase = z90.object({
|
|
2098
|
+
enabledScopes: z90.array(z90.string()),
|
|
2099
|
+
customRegistryUrl: z90.string().optional(),
|
|
2100
|
+
bypassProxy: z90.boolean().default(false),
|
|
2101
|
+
npmProxyRegistryConfigId: z90.string().optional(),
|
|
2102
|
+
npmProxyVersion: z90.number().optional()
|
|
2100
2103
|
});
|
|
2101
2104
|
var NpmRegistryConfig = NpmRegistryConfigBase.and(NpmRegistryAuthConfig);
|
|
2102
|
-
var SsoProvider =
|
|
2103
|
-
providerId:
|
|
2104
|
-
defaultAutoInviteValue:
|
|
2105
|
-
autoInviteDomains:
|
|
2106
|
-
skipDocsSupernovaLogin:
|
|
2107
|
-
areInvitesDisabled:
|
|
2108
|
-
isTestMode:
|
|
2109
|
-
emailDomains:
|
|
2110
|
-
metadataXml:
|
|
2111
|
-
});
|
|
2112
|
-
var WorkspaceRoleSchema =
|
|
2105
|
+
var SsoProvider = z91.object({
|
|
2106
|
+
providerId: z91.string(),
|
|
2107
|
+
defaultAutoInviteValue: z91.boolean(),
|
|
2108
|
+
autoInviteDomains: z91.record(z91.string(), z91.boolean()),
|
|
2109
|
+
skipDocsSupernovaLogin: z91.boolean(),
|
|
2110
|
+
areInvitesDisabled: z91.boolean(),
|
|
2111
|
+
isTestMode: z91.boolean(),
|
|
2112
|
+
emailDomains: z91.array(z91.string()),
|
|
2113
|
+
metadataXml: z91.string().nullish()
|
|
2114
|
+
});
|
|
2115
|
+
var WorkspaceRoleSchema = z92.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest"]);
|
|
2113
2116
|
var WorkspaceRole = WorkspaceRoleSchema.enum;
|
|
2114
2117
|
var MAX_MEMBERS_COUNT = 100;
|
|
2115
|
-
var UserInvite =
|
|
2116
|
-
email:
|
|
2118
|
+
var UserInvite = z93.object({
|
|
2119
|
+
email: z93.string().email().trim().transform((value) => value.toLowerCase()),
|
|
2117
2120
|
role: WorkspaceRoleSchema
|
|
2118
2121
|
});
|
|
2119
|
-
var UserInvites =
|
|
2120
|
-
var WorkspaceIpWhitelistEntry =
|
|
2121
|
-
isEnabled:
|
|
2122
|
-
name:
|
|
2123
|
-
range:
|
|
2122
|
+
var UserInvites = z93.array(UserInvite).max(MAX_MEMBERS_COUNT);
|
|
2123
|
+
var WorkspaceIpWhitelistEntry = z94.object({
|
|
2124
|
+
isEnabled: z94.boolean(),
|
|
2125
|
+
name: z94.string(),
|
|
2126
|
+
range: z94.string()
|
|
2124
2127
|
});
|
|
2125
|
-
var WorkspaceIpSettings =
|
|
2126
|
-
isEnabledForCloud:
|
|
2127
|
-
isEnabledForDocs:
|
|
2128
|
-
entries:
|
|
2128
|
+
var WorkspaceIpSettings = z94.object({
|
|
2129
|
+
isEnabledForCloud: z94.boolean(),
|
|
2130
|
+
isEnabledForDocs: z94.boolean(),
|
|
2131
|
+
entries: z94.array(WorkspaceIpWhitelistEntry)
|
|
2129
2132
|
}).nullish();
|
|
2130
|
-
var WorkspaceProfile =
|
|
2131
|
-
name:
|
|
2132
|
-
handle:
|
|
2133
|
-
color:
|
|
2134
|
-
avatar:
|
|
2133
|
+
var WorkspaceProfile = z94.object({
|
|
2134
|
+
name: z94.string(),
|
|
2135
|
+
handle: z94.string(),
|
|
2136
|
+
color: z94.string(),
|
|
2137
|
+
avatar: z94.string().optional(),
|
|
2135
2138
|
billingDetails: BillingDetails.optional()
|
|
2136
2139
|
});
|
|
2137
|
-
var Workspace =
|
|
2138
|
-
id:
|
|
2140
|
+
var Workspace = z94.object({
|
|
2141
|
+
id: z94.string(),
|
|
2139
2142
|
profile: WorkspaceProfile,
|
|
2140
2143
|
subscription: Subscription,
|
|
2141
2144
|
ipWhitelist: WorkspaceIpSettings,
|
|
2142
2145
|
sso: SsoProvider.nullish(),
|
|
2143
|
-
npmRegistrySettings:
|
|
2144
|
-
designSystems:
|
|
2146
|
+
npmRegistrySettings: z94.unknown().optional(),
|
|
2147
|
+
designSystems: z94.array(DesignSystem).nullish()
|
|
2145
2148
|
});
|
|
2146
|
-
var WorkspaceWithDesignSystems =
|
|
2149
|
+
var WorkspaceWithDesignSystems = z94.object({
|
|
2147
2150
|
workspace: Workspace,
|
|
2148
|
-
designSystems:
|
|
2151
|
+
designSystems: z94.array(DesignSystem)
|
|
2149
2152
|
});
|
|
2150
|
-
var WorkspaceContext =
|
|
2151
|
-
workspaceId:
|
|
2153
|
+
var WorkspaceContext = z95.object({
|
|
2154
|
+
workspaceId: z95.string(),
|
|
2152
2155
|
product: ProductCodeSchema,
|
|
2153
2156
|
ipWhitelist: WorkspaceIpSettings,
|
|
2154
|
-
publicDesignSystem:
|
|
2157
|
+
publicDesignSystem: z95.boolean().optional()
|
|
2155
2158
|
});
|
|
2156
2159
|
var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
2157
2160
|
var WORKSPACE_NAME_MIN_LENGTH = 2;
|
|
2158
2161
|
var WORKSPACE_NAME_MAX_LENGTH = 64;
|
|
2159
2162
|
var HANDLE_MIN_LENGTH = 2;
|
|
2160
2163
|
var HANDLE_MAX_LENGTH = 64;
|
|
2161
|
-
var CreateWorkspaceInput =
|
|
2162
|
-
name:
|
|
2164
|
+
var CreateWorkspaceInput = z96.object({
|
|
2165
|
+
name: z96.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
|
|
2163
2166
|
product: ProductCodeSchema,
|
|
2164
|
-
priceId:
|
|
2165
|
-
billingEmail:
|
|
2166
|
-
handle:
|
|
2167
|
+
priceId: z96.string(),
|
|
2168
|
+
billingEmail: z96.string().email().optional(),
|
|
2169
|
+
handle: z96.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => value?.length > 0).optional(),
|
|
2167
2170
|
invites: UserInvites.optional(),
|
|
2168
|
-
promoCode:
|
|
2169
|
-
});
|
|
2170
|
-
var WorkspaceInvitation =
|
|
2171
|
-
id: z96.string(),
|
|
2172
|
-
email: z96.string().email(),
|
|
2173
|
-
createdAt: z96.date(),
|
|
2174
|
-
resentAt: z96.date().nullish(),
|
|
2175
|
-
role: z96.nativeEnum(WorkspaceRole),
|
|
2176
|
-
workspaceId: z96.string(),
|
|
2177
|
-
invitedBy: z96.string()
|
|
2178
|
-
});
|
|
2179
|
-
var WorkspaceMembership = z97.object({
|
|
2171
|
+
promoCode: z96.string().optional()
|
|
2172
|
+
});
|
|
2173
|
+
var WorkspaceInvitation = z97.object({
|
|
2180
2174
|
id: z97.string(),
|
|
2181
|
-
|
|
2175
|
+
email: z97.string().email(),
|
|
2176
|
+
createdAt: z97.date(),
|
|
2177
|
+
resentAt: z97.date().nullish(),
|
|
2178
|
+
role: z97.nativeEnum(WorkspaceRole),
|
|
2182
2179
|
workspaceId: z97.string(),
|
|
2183
|
-
|
|
2180
|
+
invitedBy: z97.string()
|
|
2184
2181
|
});
|
|
2185
|
-
var
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2182
|
+
var WorkspaceMembership = z98.object({
|
|
2183
|
+
id: z98.string(),
|
|
2184
|
+
userId: z98.string(),
|
|
2185
|
+
workspaceId: z98.string(),
|
|
2186
|
+
workspaceRole: z98.nativeEnum(WorkspaceRole)
|
|
2187
|
+
});
|
|
2188
|
+
var UpdateMembershipRolesInput = z98.object({
|
|
2189
|
+
members: z98.array(
|
|
2190
|
+
z98.object({
|
|
2191
|
+
userId: z98.string(),
|
|
2192
|
+
role: z98.nativeEnum(WorkspaceRole)
|
|
2190
2193
|
})
|
|
2191
2194
|
)
|
|
2192
2195
|
});
|
|
2193
|
-
var DesignSystemSwitcher =
|
|
2194
|
-
isEnabled:
|
|
2195
|
-
designSystemIds:
|
|
2196
|
+
var DesignSystemSwitcher = z99.object({
|
|
2197
|
+
isEnabled: z99.boolean(),
|
|
2198
|
+
designSystemIds: z99.array(z99.string())
|
|
2196
2199
|
});
|
|
2197
|
-
var DesignSystem =
|
|
2198
|
-
id:
|
|
2199
|
-
workspaceId:
|
|
2200
|
-
name:
|
|
2201
|
-
description:
|
|
2202
|
-
docExporterId: nullishToOptional(
|
|
2203
|
-
docSlug:
|
|
2204
|
-
docUserSlug: nullishToOptional(
|
|
2205
|
-
docSlugDeprecated:
|
|
2206
|
-
isPublic:
|
|
2207
|
-
isMultibrand:
|
|
2208
|
-
docViewUrl: nullishToOptional(
|
|
2209
|
-
basePrefixes:
|
|
2200
|
+
var DesignSystem = z99.object({
|
|
2201
|
+
id: z99.string(),
|
|
2202
|
+
workspaceId: z99.string(),
|
|
2203
|
+
name: z99.string(),
|
|
2204
|
+
description: z99.string(),
|
|
2205
|
+
docExporterId: nullishToOptional(z99.string()),
|
|
2206
|
+
docSlug: z99.string(),
|
|
2207
|
+
docUserSlug: nullishToOptional(z99.string()),
|
|
2208
|
+
docSlugDeprecated: z99.string(),
|
|
2209
|
+
isPublic: z99.boolean(),
|
|
2210
|
+
isMultibrand: z99.boolean(),
|
|
2211
|
+
docViewUrl: nullishToOptional(z99.string()),
|
|
2212
|
+
basePrefixes: z99.array(z99.string()),
|
|
2210
2213
|
designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
|
|
2211
|
-
createdAt:
|
|
2212
|
-
updatedAt:
|
|
2214
|
+
createdAt: z99.date(),
|
|
2215
|
+
updatedAt: z99.date()
|
|
2213
2216
|
});
|
|
2214
|
-
var DesignSystemWithWorkspace =
|
|
2217
|
+
var DesignSystemWithWorkspace = z99.object({
|
|
2215
2218
|
designSystem: DesignSystem,
|
|
2216
2219
|
workspace: Workspace
|
|
2217
2220
|
});
|
|
@@ -2219,81 +2222,81 @@ var DS_NAME_MIN_LENGTH = 2;
|
|
|
2219
2222
|
var DS_NAME_MAX_LENGTH = 64;
|
|
2220
2223
|
var DS_DESC_MIN_LENGTH = 2;
|
|
2221
2224
|
var DS_DESC_MAX_LENGTH = 64;
|
|
2222
|
-
var DesignSystemCreateInputMetadata =
|
|
2223
|
-
name:
|
|
2224
|
-
description:
|
|
2225
|
+
var DesignSystemCreateInputMetadata = z100.object({
|
|
2226
|
+
name: z100.string().min(DS_NAME_MIN_LENGTH).max(DS_NAME_MAX_LENGTH).trim(),
|
|
2227
|
+
description: z100.string().min(DS_DESC_MIN_LENGTH).max(DS_DESC_MAX_LENGTH).trim()
|
|
2225
2228
|
});
|
|
2226
|
-
var DesignSystemCreateInput =
|
|
2229
|
+
var DesignSystemCreateInput = z100.object({
|
|
2227
2230
|
meta: DesignSystemCreateInputMetadata,
|
|
2228
|
-
workspaceId:
|
|
2229
|
-
isPublic:
|
|
2230
|
-
basePrefixes:
|
|
2231
|
-
docUserSlug:
|
|
2232
|
-
source:
|
|
2231
|
+
workspaceId: z100.string(),
|
|
2232
|
+
isPublic: z100.boolean().optional(),
|
|
2233
|
+
basePrefixes: z100.array(z100.string()).optional(),
|
|
2234
|
+
docUserSlug: z100.string().nullish().optional(),
|
|
2235
|
+
source: z100.array(z100.string()).optional()
|
|
2233
2236
|
});
|
|
2234
2237
|
var DS_NAME_MIN_LENGTH2 = 2;
|
|
2235
2238
|
var DS_NAME_MAX_LENGTH2 = 64;
|
|
2236
2239
|
var DS_DESC_MIN_LENGTH2 = 2;
|
|
2237
2240
|
var DS_DESC_MAX_LENGTH2 = 64;
|
|
2238
|
-
var DesignSystemUpdateInputMetadata =
|
|
2239
|
-
name:
|
|
2240
|
-
description:
|
|
2241
|
+
var DesignSystemUpdateInputMetadata = z101.object({
|
|
2242
|
+
name: z101.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
2243
|
+
description: z101.string().min(DS_DESC_MIN_LENGTH2).max(DS_DESC_MAX_LENGTH2).trim().optional()
|
|
2241
2244
|
});
|
|
2242
|
-
var DesignSystemUpdateInput =
|
|
2245
|
+
var DesignSystemUpdateInput = z101.object({
|
|
2243
2246
|
meta: DesignSystemUpdateInputMetadata.optional(),
|
|
2244
|
-
workspaceId:
|
|
2245
|
-
isPublic:
|
|
2246
|
-
basePrefixes:
|
|
2247
|
-
docUserSlug:
|
|
2248
|
-
source:
|
|
2249
|
-
name:
|
|
2250
|
-
description:
|
|
2251
|
-
docExporterId:
|
|
2247
|
+
workspaceId: z101.string().optional(),
|
|
2248
|
+
isPublic: z101.boolean().optional(),
|
|
2249
|
+
basePrefixes: z101.array(z101.string()).optional(),
|
|
2250
|
+
docUserSlug: z101.string().nullish().optional(),
|
|
2251
|
+
source: z101.array(z101.string()).optional(),
|
|
2252
|
+
name: z101.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
2253
|
+
description: z101.string().min(DS_DESC_MIN_LENGTH2).max(DS_DESC_MAX_LENGTH2).trim().optional(),
|
|
2254
|
+
docExporterId: z101.string().optional()
|
|
2252
2255
|
});
|
|
2253
2256
|
var publishedDocEnvironments = ["Live", "Preview"];
|
|
2254
|
-
var PublishedDocEnvironment =
|
|
2255
|
-
var PublishedDocsChecksums =
|
|
2256
|
-
var PublishedDocRoutingVersion =
|
|
2257
|
-
var PublishedDoc =
|
|
2258
|
-
id:
|
|
2259
|
-
designSystemVersionId:
|
|
2260
|
-
createdAt:
|
|
2261
|
-
updatedAt:
|
|
2262
|
-
lastPublishedAt:
|
|
2263
|
-
isDefault:
|
|
2264
|
-
isPublic:
|
|
2257
|
+
var PublishedDocEnvironment = z102.enum(publishedDocEnvironments);
|
|
2258
|
+
var PublishedDocsChecksums = z102.record(z102.string());
|
|
2259
|
+
var PublishedDocRoutingVersion = z102.enum(["1", "2"]);
|
|
2260
|
+
var PublishedDoc = z102.object({
|
|
2261
|
+
id: z102.string(),
|
|
2262
|
+
designSystemVersionId: z102.string(),
|
|
2263
|
+
createdAt: z102.date(),
|
|
2264
|
+
updatedAt: z102.date(),
|
|
2265
|
+
lastPublishedAt: z102.date(),
|
|
2266
|
+
isDefault: z102.boolean(),
|
|
2267
|
+
isPublic: z102.boolean(),
|
|
2265
2268
|
environment: PublishedDocEnvironment,
|
|
2266
2269
|
checksums: PublishedDocsChecksums,
|
|
2267
|
-
storagePath:
|
|
2268
|
-
wasMigrated:
|
|
2270
|
+
storagePath: z102.string(),
|
|
2271
|
+
wasMigrated: z102.boolean(),
|
|
2269
2272
|
routingVersion: PublishedDocRoutingVersion,
|
|
2270
|
-
usesLocalizations:
|
|
2271
|
-
wasPublishedWithLocalizations:
|
|
2272
|
-
});
|
|
2273
|
-
var ExporterJobDestination =
|
|
2274
|
-
var ExporterJobStatus =
|
|
2275
|
-
var ExporterJobLogEntryType =
|
|
2276
|
-
var ExporterJobLogEntry =
|
|
2277
|
-
id:
|
|
2278
|
-
time:
|
|
2273
|
+
usesLocalizations: z102.boolean(),
|
|
2274
|
+
wasPublishedWithLocalizations: z102.boolean()
|
|
2275
|
+
});
|
|
2276
|
+
var ExporterJobDestination = z103.enum(["s3", "webhookUrl", "github", "documentation", "azure", "gitlab"]);
|
|
2277
|
+
var ExporterJobStatus = z103.enum(["InProgress", "Success", "Failed", "Timeout"]);
|
|
2278
|
+
var ExporterJobLogEntryType = z103.enum(["success", "info", "warning", "error", "user"]);
|
|
2279
|
+
var ExporterJobLogEntry = z103.object({
|
|
2280
|
+
id: z103.string().optional(),
|
|
2281
|
+
time: z103.coerce.date(),
|
|
2279
2282
|
type: ExporterJobLogEntryType,
|
|
2280
|
-
message:
|
|
2283
|
+
message: z103.string()
|
|
2281
2284
|
});
|
|
2282
|
-
var ExporterJobResultPullRequestDestination =
|
|
2283
|
-
pullRequestUrl:
|
|
2285
|
+
var ExporterJobResultPullRequestDestination = z103.object({
|
|
2286
|
+
pullRequestUrl: z103.string()
|
|
2284
2287
|
});
|
|
2285
|
-
var ExporterJobResultS3Destination =
|
|
2286
|
-
bucket:
|
|
2287
|
-
urlPrefix:
|
|
2288
|
-
path:
|
|
2289
|
-
files:
|
|
2288
|
+
var ExporterJobResultS3Destination = z103.object({
|
|
2289
|
+
bucket: z103.string(),
|
|
2290
|
+
urlPrefix: z103.string().optional(),
|
|
2291
|
+
path: z103.string(),
|
|
2292
|
+
files: z103.array(z103.string())
|
|
2290
2293
|
});
|
|
2291
|
-
var ExporterJobResultDocsDestination =
|
|
2292
|
-
url:
|
|
2294
|
+
var ExporterJobResultDocsDestination = z103.object({
|
|
2295
|
+
url: z103.string()
|
|
2293
2296
|
});
|
|
2294
|
-
var ExporterJobResult =
|
|
2295
|
-
error:
|
|
2296
|
-
logs:
|
|
2297
|
+
var ExporterJobResult = z103.object({
|
|
2298
|
+
error: z103.string().optional(),
|
|
2299
|
+
logs: z103.array(ExporterJobLogEntry).optional(),
|
|
2297
2300
|
s3: ExporterJobResultS3Destination.optional(),
|
|
2298
2301
|
github: ExporterJobResultPullRequestDestination.optional(),
|
|
2299
2302
|
azure: ExporterJobResultPullRequestDestination.optional(),
|
|
@@ -2301,68 +2304,68 @@ var ExporterJobResult = z102.object({
|
|
|
2301
2304
|
bitbucket: ExporterJobResultPullRequestDestination.optional(),
|
|
2302
2305
|
sndocs: ExporterJobResultDocsDestination.optional()
|
|
2303
2306
|
});
|
|
2304
|
-
var ExporterDestinationSnDocs =
|
|
2307
|
+
var ExporterDestinationSnDocs = z103.object({
|
|
2305
2308
|
environment: PublishedDocEnvironment
|
|
2306
2309
|
});
|
|
2307
|
-
var ExporterDestinationS3 =
|
|
2308
|
-
var ExporterDestinationGithub =
|
|
2309
|
-
connectionId:
|
|
2310
|
-
url:
|
|
2311
|
-
branch:
|
|
2312
|
-
relativePath:
|
|
2310
|
+
var ExporterDestinationS3 = z103.object({});
|
|
2311
|
+
var ExporterDestinationGithub = z103.object({
|
|
2312
|
+
connectionId: z103.string(),
|
|
2313
|
+
url: z103.string(),
|
|
2314
|
+
branch: z103.string(),
|
|
2315
|
+
relativePath: z103.string(),
|
|
2313
2316
|
// +
|
|
2314
|
-
userId:
|
|
2315
|
-
});
|
|
2316
|
-
var ExporterDestinationAzure =
|
|
2317
|
-
connectionId:
|
|
2318
|
-
organizationId:
|
|
2319
|
-
projectId:
|
|
2320
|
-
repositoryId:
|
|
2321
|
-
branch:
|
|
2322
|
-
relativePath:
|
|
2317
|
+
userId: z103.coerce.string()
|
|
2318
|
+
});
|
|
2319
|
+
var ExporterDestinationAzure = z103.object({
|
|
2320
|
+
connectionId: z103.string(),
|
|
2321
|
+
organizationId: z103.string(),
|
|
2322
|
+
projectId: z103.string(),
|
|
2323
|
+
repositoryId: z103.string(),
|
|
2324
|
+
branch: z103.string(),
|
|
2325
|
+
relativePath: z103.string(),
|
|
2323
2326
|
// +
|
|
2324
|
-
userId:
|
|
2325
|
-
url:
|
|
2326
|
-
});
|
|
2327
|
-
var ExporterDestinationGitlab =
|
|
2328
|
-
connectionId:
|
|
2329
|
-
projectId:
|
|
2330
|
-
branch:
|
|
2331
|
-
relativePath:
|
|
2327
|
+
userId: z103.coerce.string(),
|
|
2328
|
+
url: z103.string()
|
|
2329
|
+
});
|
|
2330
|
+
var ExporterDestinationGitlab = z103.object({
|
|
2331
|
+
connectionId: z103.string(),
|
|
2332
|
+
projectId: z103.string(),
|
|
2333
|
+
branch: z103.string(),
|
|
2334
|
+
relativePath: z103.string(),
|
|
2332
2335
|
// +
|
|
2333
|
-
userId:
|
|
2334
|
-
url:
|
|
2336
|
+
userId: z103.coerce.string(),
|
|
2337
|
+
url: z103.string()
|
|
2335
2338
|
});
|
|
2336
2339
|
var BITBUCKET_SLUG = /^[-a-zA-Z0-9~]*$/;
|
|
2337
2340
|
var BITBUCKET_MAX_LENGTH = 64;
|
|
2338
|
-
var ExporterDestinationBitbucket =
|
|
2339
|
-
connectionId:
|
|
2340
|
-
workspaceSlug:
|
|
2341
|
-
projectKey:
|
|
2342
|
-
repoSlug:
|
|
2343
|
-
branch:
|
|
2344
|
-
relativePath:
|
|
2341
|
+
var ExporterDestinationBitbucket = z103.object({
|
|
2342
|
+
connectionId: z103.string(),
|
|
2343
|
+
workspaceSlug: z103.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2344
|
+
projectKey: z103.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2345
|
+
repoSlug: z103.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2346
|
+
branch: z103.string(),
|
|
2347
|
+
relativePath: z103.string(),
|
|
2345
2348
|
// +
|
|
2346
|
-
userId:
|
|
2347
|
-
url:
|
|
2348
|
-
});
|
|
2349
|
-
var ExporterJob =
|
|
2350
|
-
id:
|
|
2351
|
-
createdAt:
|
|
2352
|
-
finishedAt:
|
|
2353
|
-
designSystemId:
|
|
2354
|
-
designSystemVersionId:
|
|
2355
|
-
workspaceId:
|
|
2356
|
-
scheduleId:
|
|
2357
|
-
exporterId:
|
|
2358
|
-
brandId:
|
|
2359
|
-
themeId:
|
|
2360
|
-
estimatedExecutionTime:
|
|
2349
|
+
userId: z103.coerce.string(),
|
|
2350
|
+
url: z103.string()
|
|
2351
|
+
});
|
|
2352
|
+
var ExporterJob = z103.object({
|
|
2353
|
+
id: z103.coerce.string(),
|
|
2354
|
+
createdAt: z103.coerce.date(),
|
|
2355
|
+
finishedAt: z103.coerce.date().optional(),
|
|
2356
|
+
designSystemId: z103.coerce.string(),
|
|
2357
|
+
designSystemVersionId: z103.coerce.string(),
|
|
2358
|
+
workspaceId: z103.coerce.string(),
|
|
2359
|
+
scheduleId: z103.coerce.string().nullish(),
|
|
2360
|
+
exporterId: z103.coerce.string(),
|
|
2361
|
+
brandId: z103.coerce.string().optional(),
|
|
2362
|
+
themeId: z103.coerce.string().optional(),
|
|
2363
|
+
estimatedExecutionTime: z103.number().optional(),
|
|
2361
2364
|
status: ExporterJobStatus,
|
|
2362
2365
|
result: ExporterJobResult.optional(),
|
|
2363
|
-
createdByUserId:
|
|
2366
|
+
createdByUserId: z103.string().optional(),
|
|
2364
2367
|
// CodegenDestinationsModel
|
|
2365
|
-
webhookUrl:
|
|
2368
|
+
webhookUrl: z103.string().optional(),
|
|
2366
2369
|
destinationSnDocs: ExporterDestinationSnDocs.optional(),
|
|
2367
2370
|
destinationS3: ExporterDestinationS3.optional(),
|
|
2368
2371
|
destinationGithub: ExporterDestinationGithub.optional(),
|
|
@@ -2381,14 +2384,14 @@ var ExporterJobFindByFilter = ExporterJob.pick({
|
|
|
2381
2384
|
themeId: true,
|
|
2382
2385
|
brandId: true
|
|
2383
2386
|
}).extend({
|
|
2384
|
-
destinations:
|
|
2387
|
+
destinations: z103.array(ExporterJobDestination),
|
|
2385
2388
|
docsEnvironment: PublishedDocEnvironment
|
|
2386
2389
|
}).partial();
|
|
2387
|
-
var ExporterWorkspaceMembershipRole =
|
|
2388
|
-
var ExporterWorkspaceMembership =
|
|
2389
|
-
id:
|
|
2390
|
-
workspaceId:
|
|
2391
|
-
exporterId:
|
|
2390
|
+
var ExporterWorkspaceMembershipRole = z104.enum(["Owner", "OwnerArchived", "User"]);
|
|
2391
|
+
var ExporterWorkspaceMembership = z105.object({
|
|
2392
|
+
id: z105.string(),
|
|
2393
|
+
workspaceId: z105.string(),
|
|
2394
|
+
exporterId: z105.string(),
|
|
2392
2395
|
role: ExporterWorkspaceMembershipRole
|
|
2393
2396
|
});
|
|
2394
2397
|
var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
@@ -2398,8 +2401,8 @@ var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
|
2398
2401
|
GitProviderNames2["Bitbucket"] = "bitbucket";
|
|
2399
2402
|
return GitProviderNames2;
|
|
2400
2403
|
})(GitProviderNames || {});
|
|
2401
|
-
var GitProvider =
|
|
2402
|
-
var PulsarPropertyType =
|
|
2404
|
+
var GitProvider = z106.nativeEnum(GitProviderNames);
|
|
2405
|
+
var PulsarPropertyType = z107.enum([
|
|
2403
2406
|
"string",
|
|
2404
2407
|
"number",
|
|
2405
2408
|
"boolean",
|
|
@@ -2412,164 +2415,164 @@ var PulsarPropertyType = z106.enum([
|
|
|
2412
2415
|
"tokenProperties",
|
|
2413
2416
|
"tokenType"
|
|
2414
2417
|
]);
|
|
2415
|
-
var PulsarBaseProperty =
|
|
2416
|
-
label:
|
|
2417
|
-
key:
|
|
2418
|
-
description:
|
|
2418
|
+
var PulsarBaseProperty = z107.object({
|
|
2419
|
+
label: z107.string(),
|
|
2420
|
+
key: z107.string(),
|
|
2421
|
+
description: z107.string().nullish(),
|
|
2419
2422
|
type: PulsarPropertyType,
|
|
2420
|
-
values:
|
|
2421
|
-
default:
|
|
2423
|
+
values: z107.array(z107.string()).nullish(),
|
|
2424
|
+
default: z107.union([z107.string(), z107.boolean(), z107.number()]).nullish(),
|
|
2422
2425
|
// PulsarPropertyValueType //is optional?
|
|
2423
|
-
inputType:
|
|
2426
|
+
inputType: z107.enum(["code", "plain"]).optional(),
|
|
2424
2427
|
//is optional?
|
|
2425
|
-
isMultiline:
|
|
2428
|
+
isMultiline: z107.boolean().nullish()
|
|
2426
2429
|
});
|
|
2427
2430
|
var PulsarContributionConfigurationProperty = PulsarBaseProperty.extend({
|
|
2428
|
-
category:
|
|
2429
|
-
});
|
|
2430
|
-
var PulsarContributionVariant =
|
|
2431
|
-
key:
|
|
2432
|
-
name:
|
|
2433
|
-
isDefault:
|
|
2434
|
-
description:
|
|
2435
|
-
thumbnailURL:
|
|
2436
|
-
});
|
|
2437
|
-
var PulsarCustomBlock =
|
|
2438
|
-
title:
|
|
2439
|
-
key:
|
|
2440
|
-
category:
|
|
2441
|
-
description: nullishToOptional(
|
|
2442
|
-
iconURL:
|
|
2443
|
-
mode:
|
|
2444
|
-
properties:
|
|
2445
|
-
});
|
|
2446
|
-
var ExporterType =
|
|
2447
|
-
var ExporterSource =
|
|
2448
|
-
var ExporterTag =
|
|
2449
|
-
var ExporterDetails =
|
|
2450
|
-
description:
|
|
2451
|
-
version:
|
|
2452
|
-
routingVersion: nullishToOptional(
|
|
2453
|
-
author: nullishToOptional(
|
|
2454
|
-
organization: nullishToOptional(
|
|
2455
|
-
homepage: nullishToOptional(
|
|
2456
|
-
readme: nullishToOptional(
|
|
2457
|
-
tags: nullishToOptional(
|
|
2458
|
-
packageId: nullishToOptional(
|
|
2459
|
-
iconURL: nullishToOptional(
|
|
2460
|
-
configurationProperties: nullishToOptional(
|
|
2461
|
-
customBlocks: nullishToOptional(
|
|
2462
|
-
blockVariants: nullishToOptional(
|
|
2463
|
-
usesBrands: nullishToOptional(
|
|
2464
|
-
usesThemes: nullishToOptional(
|
|
2431
|
+
category: z107.string()
|
|
2432
|
+
});
|
|
2433
|
+
var PulsarContributionVariant = z107.object({
|
|
2434
|
+
key: z107.string(),
|
|
2435
|
+
name: z107.string(),
|
|
2436
|
+
isDefault: z107.boolean().nullish(),
|
|
2437
|
+
description: z107.string().nullish(),
|
|
2438
|
+
thumbnailURL: z107.string().nullish()
|
|
2439
|
+
});
|
|
2440
|
+
var PulsarCustomBlock = z107.object({
|
|
2441
|
+
title: z107.string(),
|
|
2442
|
+
key: z107.string(),
|
|
2443
|
+
category: z107.string(),
|
|
2444
|
+
description: nullishToOptional(z107.string()),
|
|
2445
|
+
iconURL: z107.string(),
|
|
2446
|
+
mode: z107.enum(["array", "block"]),
|
|
2447
|
+
properties: z107.array(PulsarBaseProperty)
|
|
2448
|
+
});
|
|
2449
|
+
var ExporterType = z108.enum(["code", "documentation"]);
|
|
2450
|
+
var ExporterSource = z108.enum(["git", "upload"]);
|
|
2451
|
+
var ExporterTag = z108.string().regex(/^[0-9a-zA-Z]+(\s[0-9a-zA-Z]+)*$/);
|
|
2452
|
+
var ExporterDetails = z108.object({
|
|
2453
|
+
description: z108.string(),
|
|
2454
|
+
version: z108.string(),
|
|
2455
|
+
routingVersion: nullishToOptional(z108.string()),
|
|
2456
|
+
author: nullishToOptional(z108.string()),
|
|
2457
|
+
organization: nullishToOptional(z108.string()),
|
|
2458
|
+
homepage: nullishToOptional(z108.string()),
|
|
2459
|
+
readme: nullishToOptional(z108.string()),
|
|
2460
|
+
tags: nullishToOptional(z108.array(ExporterTag)).default([]),
|
|
2461
|
+
packageId: nullishToOptional(z108.string().max(255)),
|
|
2462
|
+
iconURL: nullishToOptional(z108.string()),
|
|
2463
|
+
configurationProperties: nullishToOptional(z108.array(PulsarContributionConfigurationProperty)).default([]),
|
|
2464
|
+
customBlocks: nullishToOptional(z108.array(PulsarCustomBlock)).default([]),
|
|
2465
|
+
blockVariants: nullishToOptional(z108.record(z108.string(), z108.array(PulsarContributionVariant))).default({}),
|
|
2466
|
+
usesBrands: nullishToOptional(z108.boolean()).default(false),
|
|
2467
|
+
usesThemes: nullishToOptional(z108.boolean()).default(false),
|
|
2465
2468
|
source: ExporterSource,
|
|
2466
2469
|
gitProvider: nullishToOptional(GitProvider),
|
|
2467
|
-
gitUrl: nullishToOptional(
|
|
2468
|
-
gitBranch: nullishToOptional(
|
|
2469
|
-
gitDirectory: nullishToOptional(
|
|
2470
|
+
gitUrl: nullishToOptional(z108.string()),
|
|
2471
|
+
gitBranch: nullishToOptional(z108.string()),
|
|
2472
|
+
gitDirectory: nullishToOptional(z108.string())
|
|
2470
2473
|
});
|
|
2471
|
-
var Exporter =
|
|
2472
|
-
id:
|
|
2473
|
-
createdAt:
|
|
2474
|
-
name:
|
|
2475
|
-
isPrivate:
|
|
2474
|
+
var Exporter = z108.object({
|
|
2475
|
+
id: z108.string(),
|
|
2476
|
+
createdAt: z108.coerce.date(),
|
|
2477
|
+
name: z108.string(),
|
|
2478
|
+
isPrivate: z108.boolean(),
|
|
2476
2479
|
details: ExporterDetails,
|
|
2477
2480
|
exporterType: nullishToOptional(ExporterType).default("code"),
|
|
2478
|
-
storagePath: nullishToOptional(
|
|
2481
|
+
storagePath: nullishToOptional(z108.string()).default("")
|
|
2479
2482
|
});
|
|
2480
|
-
var CustomDomain =
|
|
2481
|
-
id: z108.string(),
|
|
2482
|
-
designSystemId: z108.string(),
|
|
2483
|
-
state: z108.string(),
|
|
2484
|
-
supernovaDomain: z108.string(),
|
|
2485
|
-
customerDomain: z108.string().nullish(),
|
|
2486
|
-
error: z108.string().nullish(),
|
|
2487
|
-
errorCode: z108.string().nullish()
|
|
2488
|
-
});
|
|
2489
|
-
var IntegrationAuthType = z109.union([z109.literal("OAuth2"), z109.literal("PAT")]);
|
|
2490
|
-
var ExternalServiceType = z109.union([
|
|
2491
|
-
z109.literal("figma"),
|
|
2492
|
-
z109.literal("github"),
|
|
2493
|
-
z109.literal("azure"),
|
|
2494
|
-
z109.literal("gitlab"),
|
|
2495
|
-
z109.literal("bitbucket")
|
|
2496
|
-
]);
|
|
2497
|
-
var IntegrationUserInfo = z109.object({
|
|
2483
|
+
var CustomDomain = z109.object({
|
|
2498
2484
|
id: z109.string(),
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2485
|
+
designSystemId: z109.string(),
|
|
2486
|
+
state: z109.string(),
|
|
2487
|
+
supernovaDomain: z109.string(),
|
|
2488
|
+
customerDomain: z109.string().nullish(),
|
|
2489
|
+
error: z109.string().nullish(),
|
|
2490
|
+
errorCode: z109.string().nullish()
|
|
2491
|
+
});
|
|
2492
|
+
var IntegrationAuthType = z110.union([z110.literal("OAuth2"), z110.literal("PAT")]);
|
|
2493
|
+
var ExternalServiceType = z110.union([
|
|
2494
|
+
z110.literal("figma"),
|
|
2495
|
+
z110.literal("github"),
|
|
2496
|
+
z110.literal("azure"),
|
|
2497
|
+
z110.literal("gitlab"),
|
|
2498
|
+
z110.literal("bitbucket")
|
|
2499
|
+
]);
|
|
2500
|
+
var IntegrationUserInfo = z110.object({
|
|
2501
|
+
id: z110.string(),
|
|
2502
|
+
handle: z110.string().optional(),
|
|
2503
|
+
avatarUrl: z110.string().optional(),
|
|
2504
|
+
email: z110.string().optional(),
|
|
2502
2505
|
authType: IntegrationAuthType.optional(),
|
|
2503
|
-
customUrl:
|
|
2506
|
+
customUrl: z110.string().optional()
|
|
2504
2507
|
});
|
|
2505
|
-
var UserLinkedIntegrations =
|
|
2508
|
+
var UserLinkedIntegrations = z110.object({
|
|
2506
2509
|
figma: IntegrationUserInfo.optional(),
|
|
2507
2510
|
github: IntegrationUserInfo.array().optional(),
|
|
2508
2511
|
azure: IntegrationUserInfo.array().optional(),
|
|
2509
2512
|
gitlab: IntegrationUserInfo.array().optional(),
|
|
2510
2513
|
bitbucket: IntegrationUserInfo.array().optional()
|
|
2511
2514
|
});
|
|
2512
|
-
var UserIdentity =
|
|
2513
|
-
id:
|
|
2514
|
-
userId:
|
|
2515
|
-
});
|
|
2516
|
-
var UserOnboardingDepartment =
|
|
2517
|
-
var UserOnboardingJobLevel =
|
|
2518
|
-
var UserOnboarding =
|
|
2519
|
-
companyName:
|
|
2520
|
-
numberOfPeopleInOrg:
|
|
2521
|
-
numberOfPeopleInDesignTeam:
|
|
2515
|
+
var UserIdentity = z111.object({
|
|
2516
|
+
id: z111.string(),
|
|
2517
|
+
userId: z111.string()
|
|
2518
|
+
});
|
|
2519
|
+
var UserOnboardingDepartment = z112.enum(["Design", "Engineering", "Brand", "Other"]);
|
|
2520
|
+
var UserOnboardingJobLevel = z112.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
2521
|
+
var UserOnboarding = z112.object({
|
|
2522
|
+
companyName: z112.string().optional(),
|
|
2523
|
+
numberOfPeopleInOrg: z112.string().optional(),
|
|
2524
|
+
numberOfPeopleInDesignTeam: z112.string().optional(),
|
|
2522
2525
|
department: UserOnboardingDepartment.optional(),
|
|
2523
|
-
jobTitle:
|
|
2524
|
-
phase:
|
|
2526
|
+
jobTitle: z112.string().optional(),
|
|
2527
|
+
phase: z112.string().optional(),
|
|
2525
2528
|
jobLevel: UserOnboardingJobLevel.optional()
|
|
2526
2529
|
});
|
|
2527
|
-
var UserProfile =
|
|
2528
|
-
name:
|
|
2529
|
-
avatar:
|
|
2530
|
-
nickname:
|
|
2530
|
+
var UserProfile = z112.object({
|
|
2531
|
+
name: z112.string(),
|
|
2532
|
+
avatar: z112.string().optional(),
|
|
2533
|
+
nickname: z112.string().optional(),
|
|
2531
2534
|
onboarding: UserOnboarding.optional()
|
|
2532
2535
|
});
|
|
2533
|
-
var User =
|
|
2534
|
-
id:
|
|
2535
|
-
email:
|
|
2536
|
-
emailVerified:
|
|
2537
|
-
createdAt:
|
|
2538
|
-
trialExpiresAt:
|
|
2536
|
+
var User = z113.object({
|
|
2537
|
+
id: z113.string(),
|
|
2538
|
+
email: z113.string(),
|
|
2539
|
+
emailVerified: z113.boolean(),
|
|
2540
|
+
createdAt: z113.date(),
|
|
2541
|
+
trialExpiresAt: z113.date().optional(),
|
|
2539
2542
|
profile: UserProfile,
|
|
2540
2543
|
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
2541
|
-
loggedOutAt:
|
|
2542
|
-
isProtected:
|
|
2544
|
+
loggedOutAt: z113.date().optional(),
|
|
2545
|
+
isProtected: z113.boolean()
|
|
2543
2546
|
});
|
|
2544
|
-
var NpmProxyToken =
|
|
2545
|
-
access:
|
|
2546
|
-
expiresAt:
|
|
2547
|
+
var NpmProxyToken = z114.object({
|
|
2548
|
+
access: z114.string(),
|
|
2549
|
+
expiresAt: z114.number()
|
|
2547
2550
|
});
|
|
2548
|
-
var SessionData =
|
|
2549
|
-
returnToUrl:
|
|
2551
|
+
var SessionData = z114.object({
|
|
2552
|
+
returnToUrl: z114.string().optional(),
|
|
2550
2553
|
npmProxyToken: NpmProxyToken.optional()
|
|
2551
2554
|
});
|
|
2552
|
-
var Session =
|
|
2553
|
-
id:
|
|
2554
|
-
expiresAt:
|
|
2555
|
-
userId:
|
|
2555
|
+
var Session = z114.object({
|
|
2556
|
+
id: z114.string(),
|
|
2557
|
+
expiresAt: z114.date(),
|
|
2558
|
+
userId: z114.string().nullable(),
|
|
2556
2559
|
data: SessionData
|
|
2557
2560
|
});
|
|
2558
|
-
var AuthTokens =
|
|
2559
|
-
access:
|
|
2560
|
-
refresh:
|
|
2561
|
+
var AuthTokens = z114.object({
|
|
2562
|
+
access: z114.string(),
|
|
2563
|
+
refresh: z114.string()
|
|
2561
2564
|
});
|
|
2562
|
-
var UserSession =
|
|
2565
|
+
var UserSession = z114.object({
|
|
2563
2566
|
session: Session,
|
|
2564
2567
|
user: User.nullable()
|
|
2565
2568
|
});
|
|
2566
|
-
var FlaggedFeature =
|
|
2567
|
-
var FeatureFlagMap =
|
|
2568
|
-
var FeatureFlag =
|
|
2569
|
-
id:
|
|
2569
|
+
var FlaggedFeature = z115.enum(["FigmaImporterV2"]);
|
|
2570
|
+
var FeatureFlagMap = z115.record(FlaggedFeature, z115.boolean());
|
|
2571
|
+
var FeatureFlag = z115.object({
|
|
2572
|
+
id: z115.string(),
|
|
2570
2573
|
feature: FlaggedFeature,
|
|
2571
|
-
createdAt:
|
|
2572
|
-
enabled:
|
|
2574
|
+
createdAt: z115.date(),
|
|
2575
|
+
enabled: z115.boolean()
|
|
2573
2576
|
});
|
|
2574
2577
|
var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
2575
2578
|
OAuthProviderNames2["Figma"] = "figma";
|
|
@@ -2579,96 +2582,96 @@ var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
|
2579
2582
|
OAuthProviderNames2["Bitbucket"] = "bitbucket";
|
|
2580
2583
|
return OAuthProviderNames2;
|
|
2581
2584
|
})(OAuthProviderNames || {});
|
|
2582
|
-
var OAuthProviderSchema =
|
|
2585
|
+
var OAuthProviderSchema = z116.nativeEnum(OAuthProviderNames);
|
|
2583
2586
|
var OAuthProvider = OAuthProviderSchema.enum;
|
|
2584
|
-
var ExternalOAuthRequest =
|
|
2585
|
-
id: z116.string(),
|
|
2586
|
-
provider: OAuthProviderSchema,
|
|
2587
|
-
userId: z116.string(),
|
|
2588
|
-
state: z116.string(),
|
|
2589
|
-
createdAt: z116.date()
|
|
2590
|
-
});
|
|
2591
|
-
var IntegrationTokenSchema = z117.object({
|
|
2587
|
+
var ExternalOAuthRequest = z117.object({
|
|
2592
2588
|
id: z117.string(),
|
|
2593
2589
|
provider: OAuthProviderSchema,
|
|
2594
|
-
scope: z117.string(),
|
|
2595
2590
|
userId: z117.string(),
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
expiresAt: z117.date(),
|
|
2599
|
-
externalUserId: z117.string().nullish()
|
|
2591
|
+
state: z117.string(),
|
|
2592
|
+
createdAt: z117.date()
|
|
2600
2593
|
});
|
|
2601
|
-
var
|
|
2602
|
-
|
|
2603
|
-
|
|
2594
|
+
var IntegrationTokenSchema = z118.object({
|
|
2595
|
+
id: z118.string(),
|
|
2596
|
+
provider: OAuthProviderSchema,
|
|
2597
|
+
scope: z118.string(),
|
|
2598
|
+
userId: z118.string(),
|
|
2599
|
+
accessToken: z118.string(),
|
|
2600
|
+
refreshToken: z118.string(),
|
|
2601
|
+
expiresAt: z118.date(),
|
|
2602
|
+
externalUserId: z118.string().nullish()
|
|
2604
2603
|
});
|
|
2605
|
-
var
|
|
2604
|
+
var DesignSystemVersionRoom = Entity.extend({
|
|
2606
2605
|
designSystemVersionId: z119.string(),
|
|
2607
|
-
documentationPageId: z119.string(),
|
|
2608
2606
|
liveblocksId: z119.string()
|
|
2609
2607
|
});
|
|
2608
|
+
var DocumentationPageRoom = Entity.extend({
|
|
2609
|
+
designSystemVersionId: z120.string(),
|
|
2610
|
+
documentationPageId: z120.string(),
|
|
2611
|
+
liveblocksId: z120.string()
|
|
2612
|
+
});
|
|
2610
2613
|
var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
2611
2614
|
RoomTypeEnum2["DocumentationPage"] = "documentation-page";
|
|
2612
2615
|
RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
|
|
2613
2616
|
return RoomTypeEnum2;
|
|
2614
2617
|
})(RoomTypeEnum || {});
|
|
2615
|
-
var RoomTypeSchema =
|
|
2618
|
+
var RoomTypeSchema = z121.nativeEnum(RoomTypeEnum);
|
|
2616
2619
|
var RoomType = RoomTypeSchema.enum;
|
|
2617
|
-
var AnyRecord =
|
|
2620
|
+
var AnyRecord = z122.record(z122.any());
|
|
2618
2621
|
var NpmPackageVersionDist = AnyRecord.and(
|
|
2619
|
-
|
|
2620
|
-
tarball:
|
|
2622
|
+
z122.object({
|
|
2623
|
+
tarball: z122.string()
|
|
2621
2624
|
})
|
|
2622
2625
|
);
|
|
2623
2626
|
var NpmPackageVersion = AnyRecord.and(
|
|
2624
|
-
|
|
2627
|
+
z122.object({
|
|
2625
2628
|
dist: NpmPackageVersionDist
|
|
2626
2629
|
})
|
|
2627
2630
|
);
|
|
2628
2631
|
var NpmPackage = AnyRecord.and(
|
|
2629
|
-
|
|
2630
|
-
_id:
|
|
2631
|
-
name:
|
|
2632
|
+
z122.object({
|
|
2633
|
+
_id: z122.string(),
|
|
2634
|
+
name: z122.string(),
|
|
2632
2635
|
// e.g. "latest": "1.2.3"
|
|
2633
|
-
"dist-tags":
|
|
2636
|
+
"dist-tags": z122.record(z122.string(), z122.string()),
|
|
2634
2637
|
// "1.2.3": {...}
|
|
2635
|
-
versions:
|
|
2638
|
+
versions: z122.record(NpmPackageVersion)
|
|
2636
2639
|
})
|
|
2637
2640
|
);
|
|
2638
|
-
var NpmProxyTokenPayload =
|
|
2639
|
-
npmProxyRegistryConfigId:
|
|
2640
|
-
});
|
|
2641
|
-
var PersonalAccessToken =
|
|
2642
|
-
id:
|
|
2643
|
-
userId:
|
|
2644
|
-
name:
|
|
2645
|
-
token:
|
|
2646
|
-
createdAt:
|
|
2647
|
-
hidden:
|
|
2648
|
-
workspaceId:
|
|
2641
|
+
var NpmProxyTokenPayload = z123.object({
|
|
2642
|
+
npmProxyRegistryConfigId: z123.string()
|
|
2643
|
+
});
|
|
2644
|
+
var PersonalAccessToken = z124.object({
|
|
2645
|
+
id: z124.string(),
|
|
2646
|
+
userId: z124.string(),
|
|
2647
|
+
name: z124.string(),
|
|
2648
|
+
token: z124.string(),
|
|
2649
|
+
createdAt: z124.date(),
|
|
2650
|
+
hidden: z124.boolean(),
|
|
2651
|
+
workspaceId: z124.string().optional(),
|
|
2649
2652
|
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
2650
|
-
expireAt:
|
|
2651
|
-
scope:
|
|
2653
|
+
expireAt: z124.date().optional(),
|
|
2654
|
+
scope: z124.string().optional()
|
|
2652
2655
|
});
|
|
2653
|
-
var ContentLoadInstruction =
|
|
2654
|
-
from:
|
|
2655
|
-
to:
|
|
2656
|
-
authorizationHeaderKvsId:
|
|
2657
|
-
timeout:
|
|
2656
|
+
var ContentLoadInstruction = z125.object({
|
|
2657
|
+
from: z125.string(),
|
|
2658
|
+
to: z125.string(),
|
|
2659
|
+
authorizationHeaderKvsId: z125.string().optional(),
|
|
2660
|
+
timeout: z125.number().optional()
|
|
2658
2661
|
});
|
|
2659
|
-
var ContentLoaderPayload =
|
|
2660
|
-
type:
|
|
2662
|
+
var ContentLoaderPayload = z125.object({
|
|
2663
|
+
type: z125.literal("Single"),
|
|
2661
2664
|
instruction: ContentLoadInstruction
|
|
2662
2665
|
}).or(
|
|
2663
|
-
|
|
2664
|
-
type:
|
|
2665
|
-
loadingChunkSize:
|
|
2666
|
-
instructions:
|
|
2666
|
+
z125.object({
|
|
2667
|
+
type: z125.literal("Multiple"),
|
|
2668
|
+
loadingChunkSize: z125.number().optional(),
|
|
2669
|
+
instructions: z125.array(ContentLoadInstruction)
|
|
2667
2670
|
})
|
|
2668
2671
|
).or(
|
|
2669
|
-
|
|
2670
|
-
type:
|
|
2671
|
-
location:
|
|
2672
|
+
z125.object({
|
|
2673
|
+
type: z125.literal("S3"),
|
|
2674
|
+
location: z125.string()
|
|
2672
2675
|
})
|
|
2673
2676
|
);
|
|
2674
2677
|
|
|
@@ -2681,22 +2684,22 @@ var DesignSystemDTO = DesignSystem.omit({
|
|
|
2681
2684
|
});
|
|
2682
2685
|
|
|
2683
2686
|
// src/api/dto/documentation-v1.ts
|
|
2684
|
-
import { z as
|
|
2687
|
+
import { z as z126 } from "zod";
|
|
2685
2688
|
var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
2686
2689
|
data: true,
|
|
2687
2690
|
meta: true,
|
|
2688
2691
|
parentPersistentId: true,
|
|
2689
2692
|
sortOrder: true
|
|
2690
2693
|
}).extend(DocumentationPageV1.shape.data.shape).extend({
|
|
2691
|
-
title:
|
|
2692
|
-
path:
|
|
2694
|
+
title: z126.string(),
|
|
2695
|
+
path: z126.string()
|
|
2693
2696
|
});
|
|
2694
2697
|
|
|
2695
2698
|
// src/api/dto/documentation-v2.ts
|
|
2696
|
-
import { z as
|
|
2699
|
+
import { z as z128 } from "zod";
|
|
2697
2700
|
|
|
2698
2701
|
// src/api/dto/documentation.ts
|
|
2699
|
-
import { z as
|
|
2702
|
+
import { z as z127 } from "zod";
|
|
2700
2703
|
var DocumentationGroupStructureDTO = ElementGroup.omit({
|
|
2701
2704
|
sortOrder: true,
|
|
2702
2705
|
parentPersistentId: true,
|
|
@@ -2706,11 +2709,11 @@ var DocumentationGroupStructureDTO = ElementGroup.omit({
|
|
|
2706
2709
|
data: true,
|
|
2707
2710
|
shortPersistentId: true
|
|
2708
2711
|
}).extend({
|
|
2709
|
-
title:
|
|
2710
|
-
isRoot:
|
|
2711
|
-
childrenIds:
|
|
2712
|
+
title: z127.string(),
|
|
2713
|
+
isRoot: z127.boolean(),
|
|
2714
|
+
childrenIds: z127.array(z127.string()),
|
|
2712
2715
|
groupBehavior: DocumentationGroupBehavior,
|
|
2713
|
-
shortPersistentId:
|
|
2716
|
+
shortPersistentId: z127.string()
|
|
2714
2717
|
});
|
|
2715
2718
|
var DocumentationGroupDTO = DocumentationGroupStructureDTO.extend({
|
|
2716
2719
|
configuration: DocumentationItemConfiguration
|
|
@@ -2723,67 +2726,73 @@ var DocumentationPageStructureV2DTO = DocumentationPageV2.omit({
|
|
|
2723
2726
|
parentPersistentId: true,
|
|
2724
2727
|
sortOrder: true
|
|
2725
2728
|
}).extend({
|
|
2726
|
-
title:
|
|
2727
|
-
path:
|
|
2729
|
+
title: z128.string(),
|
|
2730
|
+
path: z128.string()
|
|
2728
2731
|
});
|
|
2729
2732
|
var DocumentationPageV2DTO = DocumentationPageStructureV2DTO.extend(DocumentationPageV2.shape.data.shape);
|
|
2730
|
-
var DocumentationHierarchyV2DTO =
|
|
2731
|
-
pages:
|
|
2732
|
-
groups:
|
|
2733
|
+
var DocumentationHierarchyV2DTO = z128.object({
|
|
2734
|
+
pages: z128.array(DocumentationPageStructureV2DTO),
|
|
2735
|
+
groups: z128.array(DocumentationGroupStructureDTO)
|
|
2733
2736
|
});
|
|
2734
2737
|
|
|
2735
|
-
// src/api/requests/
|
|
2736
|
-
import { z as
|
|
2737
|
-
var
|
|
2738
|
-
parentPersistentId:
|
|
2739
|
-
persistentId:
|
|
2740
|
-
title:
|
|
2738
|
+
// src/api/requests/elements/elements-transaction-v2.ts
|
|
2739
|
+
import { z as z129 } from "zod";
|
|
2740
|
+
var DTOCreateDocumentationPageInput = z129.object({
|
|
2741
|
+
parentPersistentId: z129.string().uuid(),
|
|
2742
|
+
persistentId: z129.string().uuid(),
|
|
2743
|
+
title: z129.string(),
|
|
2741
2744
|
configuration: DocumentationItemConfiguration.optional(),
|
|
2742
|
-
afterPersistentId:
|
|
2745
|
+
afterPersistentId: z129.string().uuid().optional()
|
|
2743
2746
|
});
|
|
2744
|
-
var
|
|
2745
|
-
id:
|
|
2746
|
-
title:
|
|
2747
|
+
var DTOUpdateDocumentationPageInput = z129.object({
|
|
2748
|
+
id: z129.string(),
|
|
2749
|
+
title: z129.string().optional(),
|
|
2747
2750
|
configuration: DocumentationItemConfiguration.optional(),
|
|
2748
|
-
parentPersistentId:
|
|
2749
|
-
afterPersistentId:
|
|
2750
|
-
});
|
|
2751
|
-
var
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2751
|
+
parentPersistentId: z129.string().optional(),
|
|
2752
|
+
afterPersistentId: z129.string().optional()
|
|
2753
|
+
});
|
|
2754
|
+
var DTODuplicateDocumentationPageInput = z129.object({
|
|
2755
|
+
id: z129.string(),
|
|
2756
|
+
persistentId: z129.string().uuid(),
|
|
2757
|
+
parentPersistentId: z129.string().uuid(),
|
|
2758
|
+
afterPersistentId: z129.string().uuid().optional()
|
|
2759
|
+
});
|
|
2760
|
+
var DTODocumentationTransactionInput = z129.object({
|
|
2761
|
+
create: z129.array(DTOCreateDocumentationPageInput).optional(),
|
|
2762
|
+
update: z129.array(DTOUpdateDocumentationPageInput).optional(),
|
|
2763
|
+
duplicate: z129.array(DTODuplicateDocumentationPageInput).optional(),
|
|
2764
|
+
delete: z129.array(z129.string()).optional()
|
|
2765
|
+
});
|
|
2766
|
+
var DTOElementsTransactionInput = z129.object({
|
|
2767
|
+
documentationPages: DTODocumentationTransactionInput
|
|
2765
2768
|
});
|
|
2766
2769
|
|
|
2767
2770
|
// src/api/requests/post-liveblocks-auth.ts
|
|
2768
|
-
import { z as
|
|
2769
|
-
var PostLiveblocksAuth =
|
|
2770
|
-
room:
|
|
2771
|
+
import { z as z130 } from "zod";
|
|
2772
|
+
var PostLiveblocksAuth = z130.object({
|
|
2773
|
+
room: z130.string()
|
|
2771
2774
|
});
|
|
2772
2775
|
|
|
2773
2776
|
// src/api/responses/get-block-definitions.ts
|
|
2774
|
-
import { z as
|
|
2775
|
-
var GetBlockDefinitionsResponse =
|
|
2776
|
-
definitions:
|
|
2777
|
+
import { z as z131 } from "zod";
|
|
2778
|
+
var GetBlockDefinitionsResponse = z131.object({
|
|
2779
|
+
definitions: z131.array(PageBlockDefinition)
|
|
2777
2780
|
});
|
|
2778
2781
|
|
|
2779
2782
|
// src/design-system-content/documentation-hierarchy.ts
|
|
2780
|
-
function documentationHierarchyToYjs(documentationHierarchy,
|
|
2783
|
+
function documentationHierarchyToYjs(doc, documentationHierarchy, itemsToDelete) {
|
|
2781
2784
|
doc.transact((trx) => {
|
|
2782
|
-
const pagesMap = trx.doc
|
|
2785
|
+
const pagesMap = getPagesYMap(trx.doc);
|
|
2786
|
+
itemsToDelete.pagePersistentIdsToDelete.forEach((persistentId) => {
|
|
2787
|
+
pagesMap.delete(persistentId);
|
|
2788
|
+
});
|
|
2783
2789
|
documentationHierarchy.pages.forEach((page) => {
|
|
2784
2790
|
pagesMap.set(page.persistentId, page);
|
|
2785
2791
|
});
|
|
2786
|
-
const groupsMap = trx.doc
|
|
2792
|
+
const groupsMap = getGroupsYMap(trx.doc);
|
|
2793
|
+
itemsToDelete.groupPersistentIdsToDelete.forEach((persistentId) => {
|
|
2794
|
+
groupsMap.delete(persistentId);
|
|
2795
|
+
});
|
|
2787
2796
|
documentationHierarchy.groups.forEach((group) => {
|
|
2788
2797
|
groupsMap.set(group.persistentId, group);
|
|
2789
2798
|
});
|
|
@@ -2791,8 +2800,8 @@ function documentationHierarchyToYjs(documentationHierarchy, doc) {
|
|
|
2791
2800
|
return doc;
|
|
2792
2801
|
}
|
|
2793
2802
|
function yjsToDocumentationHierarchy(doc) {
|
|
2794
|
-
const pagesMap = doc
|
|
2795
|
-
const groupsMap = doc
|
|
2803
|
+
const pagesMap = getPagesYMap(doc);
|
|
2804
|
+
const groupsMap = getGroupsYMap(doc);
|
|
2796
2805
|
const pages = [];
|
|
2797
2806
|
pagesMap.forEach((page) => {
|
|
2798
2807
|
pages.push(DocumentationPageStructureV2DTO.parse(page));
|
|
@@ -2806,9 +2815,15 @@ function yjsToDocumentationHierarchy(doc) {
|
|
|
2806
2815
|
groups
|
|
2807
2816
|
};
|
|
2808
2817
|
}
|
|
2818
|
+
function getPagesYMap(doc) {
|
|
2819
|
+
return doc.getMap("documentationPages");
|
|
2820
|
+
}
|
|
2821
|
+
function getGroupsYMap(doc) {
|
|
2822
|
+
return doc.getMap("documentationGroups");
|
|
2823
|
+
}
|
|
2809
2824
|
|
|
2810
2825
|
// src/design-system-content/item-configuration.ts
|
|
2811
|
-
function itemConfigurationToYjs(
|
|
2826
|
+
function itemConfigurationToYjs(yDoc, item) {
|
|
2812
2827
|
yDoc.transact((trx) => {
|
|
2813
2828
|
const header = item.header;
|
|
2814
2829
|
if (header) {
|
|
@@ -2851,16 +2866,16 @@ function yjsToItemConfiguration(yDoc) {
|
|
|
2851
2866
|
}
|
|
2852
2867
|
|
|
2853
2868
|
// src/docs-editor/model/block.ts
|
|
2854
|
-
import { z as
|
|
2855
|
-
var PageBlockEditorModel =
|
|
2856
|
-
id:
|
|
2869
|
+
import { z as z132 } from "zod";
|
|
2870
|
+
var PageBlockEditorModel = z132.object({
|
|
2871
|
+
id: z132.string(),
|
|
2857
2872
|
data: PageBlockDataV2
|
|
2858
2873
|
});
|
|
2859
2874
|
|
|
2860
2875
|
// src/docs-editor/model/page.ts
|
|
2861
|
-
import { z as
|
|
2862
|
-
var DocumentationPageEditorModel =
|
|
2863
|
-
blocks:
|
|
2876
|
+
import { z as z133 } from "zod";
|
|
2877
|
+
var DocumentationPageEditorModel = z133.object({
|
|
2878
|
+
blocks: z133.array(PageBlockEditorModel)
|
|
2864
2879
|
});
|
|
2865
2880
|
|
|
2866
2881
|
// src/docs-editor/prosemirror/schema.ts
|
|
@@ -6493,7 +6508,7 @@ var blocks = [
|
|
|
6493
6508
|
|
|
6494
6509
|
// src/docs-editor/prosemirror-to-blocks.ts
|
|
6495
6510
|
import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
|
|
6496
|
-
import { z as
|
|
6511
|
+
import { z as z134 } from "zod";
|
|
6497
6512
|
function yDocToPage(yDoc, definitions) {
|
|
6498
6513
|
return yXmlFragmentToPage(yDoc.getXmlFragment("default"), definitions);
|
|
6499
6514
|
}
|
|
@@ -6505,7 +6520,7 @@ function prosemirrorDocToPage(prosemirrorDoc, definitions) {
|
|
|
6505
6520
|
const definitionsById = mapByUnique(definitions, (d) => d.id);
|
|
6506
6521
|
return {
|
|
6507
6522
|
blocks: (prosemirrorDoc.content ?? []).map((prosemirrorNode) => {
|
|
6508
|
-
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId",
|
|
6523
|
+
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z134.string());
|
|
6509
6524
|
if (!definitionId) {
|
|
6510
6525
|
console.warn(
|
|
6511
6526
|
`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`
|
|
@@ -6547,7 +6562,7 @@ function parseAsRichText(prosemirrorNode, definition, property) {
|
|
|
6547
6562
|
if (!id)
|
|
6548
6563
|
return null;
|
|
6549
6564
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
6550
|
-
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type",
|
|
6565
|
+
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z134.string().optional()));
|
|
6551
6566
|
return {
|
|
6552
6567
|
// TODO Artem: indent
|
|
6553
6568
|
id,
|
|
@@ -6647,8 +6662,8 @@ function parseRichTextAttribute(mark) {
|
|
|
6647
6662
|
case "code":
|
|
6648
6663
|
return { type: "Code" };
|
|
6649
6664
|
case "link":
|
|
6650
|
-
const itemId = getProsemirrorAttribute(mark, "itemId",
|
|
6651
|
-
const href = getProsemirrorAttribute(mark, "href",
|
|
6665
|
+
const itemId = getProsemirrorAttribute(mark, "itemId", z134.string().optional());
|
|
6666
|
+
const href = getProsemirrorAttribute(mark, "href", z134.string().optional());
|
|
6652
6667
|
return {
|
|
6653
6668
|
type: "Link",
|
|
6654
6669
|
openInNewWindow: mark.attrs?.target !== "_self",
|
|
@@ -6663,7 +6678,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
6663
6678
|
if (!id)
|
|
6664
6679
|
return null;
|
|
6665
6680
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
6666
|
-
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder",
|
|
6681
|
+
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z134.boolean().optional()) !== false;
|
|
6667
6682
|
const tableChild = prosemirrorNode.content?.find((c) => c.type === "table");
|
|
6668
6683
|
if (!tableChild) {
|
|
6669
6684
|
return emptyTable(id, variantId, 0);
|
|
@@ -6709,9 +6724,9 @@ function parseAsTableCell(prosemirrorNode) {
|
|
|
6709
6724
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
6710
6725
|
if (!id)
|
|
6711
6726
|
return null;
|
|
6712
|
-
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign",
|
|
6727
|
+
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z134.string().optional());
|
|
6713
6728
|
let columnWidth;
|
|
6714
|
-
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth",
|
|
6729
|
+
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z134.array(z134.number()).optional());
|
|
6715
6730
|
if (columnWidthArray) {
|
|
6716
6731
|
columnWidth = columnWidthArray[0];
|
|
6717
6732
|
}
|
|
@@ -6745,7 +6760,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
6745
6760
|
value: parseRichText(prosemirrorNode.content ?? [])
|
|
6746
6761
|
};
|
|
6747
6762
|
case "image":
|
|
6748
|
-
const url = getProsemirrorAttribute(prosemirrorNode, "src",
|
|
6763
|
+
const url = getProsemirrorAttribute(prosemirrorNode, "src", z134.string().optional());
|
|
6749
6764
|
if (!url)
|
|
6750
6765
|
return null;
|
|
6751
6766
|
return {
|
|
@@ -6839,7 +6854,7 @@ function parseAsCustomBlock(prosemirrorNode, definition) {
|
|
|
6839
6854
|
};
|
|
6840
6855
|
}
|
|
6841
6856
|
function parseBlockItems(prosemirrorNode, definition) {
|
|
6842
|
-
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
6857
|
+
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z134.string());
|
|
6843
6858
|
if (!itemsString)
|
|
6844
6859
|
return null;
|
|
6845
6860
|
const itemsJson = JSON.parse(itemsString);
|
|
@@ -6851,11 +6866,11 @@ function parseBlockItems(prosemirrorNode, definition) {
|
|
|
6851
6866
|
}
|
|
6852
6867
|
function parseAppearance(prosemirrorNode) {
|
|
6853
6868
|
const appearance = {};
|
|
6854
|
-
const columns = getProsemirrorAttribute(prosemirrorNode, "columns",
|
|
6869
|
+
const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z134.number().optional());
|
|
6855
6870
|
if (columns) {
|
|
6856
6871
|
appearance.numberOfColumns = columns;
|
|
6857
6872
|
}
|
|
6858
|
-
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor",
|
|
6873
|
+
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z134.string().optional());
|
|
6859
6874
|
if (backgroundColor) {
|
|
6860
6875
|
const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
|
|
6861
6876
|
if (parsedColor.success) {
|
|
@@ -6946,13 +6961,13 @@ function valueSchemaForPropertyType(type) {
|
|
|
6946
6961
|
}
|
|
6947
6962
|
}
|
|
6948
6963
|
function getProsemirrorBlockId(prosemirrorNode) {
|
|
6949
|
-
const id = getProsemirrorAttribute(prosemirrorNode, "id",
|
|
6964
|
+
const id = getProsemirrorAttribute(prosemirrorNode, "id", z134.string());
|
|
6950
6965
|
if (!id)
|
|
6951
6966
|
console.warn(`Prosemirror attribute "id" on ${prosemirrorNode.type} is required`);
|
|
6952
6967
|
return id;
|
|
6953
6968
|
}
|
|
6954
6969
|
function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
6955
|
-
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(
|
|
6970
|
+
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z134.string()));
|
|
6956
6971
|
}
|
|
6957
6972
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
6958
6973
|
const parsedAttr = validationSchema.safeParse(prosemirrorNode.attrs?.[attributeName]);
|
|
@@ -6977,9 +6992,11 @@ function mapByUnique(items, keyFn) {
|
|
|
6977
6992
|
export {
|
|
6978
6993
|
BlockDefinitionUtils,
|
|
6979
6994
|
BlockParsingUtils,
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6995
|
+
DTOCreateDocumentationPageInput,
|
|
6996
|
+
DTODocumentationTransactionInput,
|
|
6997
|
+
DTODuplicateDocumentationPageInput,
|
|
6998
|
+
DTOElementsTransactionInput,
|
|
6999
|
+
DTOUpdateDocumentationPageInput,
|
|
6983
7000
|
DesignSystemDTO,
|
|
6984
7001
|
DocumentationGroupDTO,
|
|
6985
7002
|
DocumentationGroupStructureDTO,
|
|
@@ -6988,11 +7005,9 @@ export {
|
|
|
6988
7005
|
DocumentationPageStructureV2DTO,
|
|
6989
7006
|
DocumentationPageV1DTO,
|
|
6990
7007
|
DocumentationPageV2DTO,
|
|
6991
|
-
DuplicateBulkElementsInput,
|
|
6992
7008
|
GetBlockDefinitionsResponse,
|
|
6993
7009
|
PageBlockEditorModel,
|
|
6994
7010
|
PostLiveblocksAuth,
|
|
6995
|
-
UpdateBulkElementsInput,
|
|
6996
7011
|
blockDefinitionForBlock,
|
|
6997
7012
|
blockToProsemirrorNode,
|
|
6998
7013
|
documentationHierarchyToYjs,
|