@supernova-studio/model 0.48.14 → 0.48.16
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 +482 -4
- package/dist/index.d.ts +482 -4
- package/dist/index.js +62 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1167 -1109
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/elements/component-properties.ts +52 -0
- package/src/dsm/elements/component-set.ts +10 -0
- package/src/dsm/elements/component.ts +8 -2
- package/src/dsm/elements/index.ts +2 -0
package/dist/index.mjs
CHANGED
|
@@ -284,7 +284,7 @@ var CustomDomain = z14.object({
|
|
|
284
284
|
});
|
|
285
285
|
|
|
286
286
|
// src/data-dumps/code-integration-dump.ts
|
|
287
|
-
import { z as
|
|
287
|
+
import { z as z124 } from "zod";
|
|
288
288
|
|
|
289
289
|
// src/export/exporter.ts
|
|
290
290
|
import { z as z17 } from "zod";
|
|
@@ -386,10 +386,10 @@ var Exporter = z17.object({
|
|
|
386
386
|
});
|
|
387
387
|
|
|
388
388
|
// src/export/pipeline.ts
|
|
389
|
-
import { z as
|
|
389
|
+
import { z as z123 } from "zod";
|
|
390
390
|
|
|
391
391
|
// src/export/export-destinations.ts
|
|
392
|
-
import { z as
|
|
392
|
+
import { z as z122 } from "zod";
|
|
393
393
|
|
|
394
394
|
// src/dsm/assets/asset-dynamo-record.ts
|
|
395
395
|
import { z as z18 } from "zod";
|
|
@@ -454,7 +454,7 @@ function isImportedAsset(asset) {
|
|
|
454
454
|
}
|
|
455
455
|
|
|
456
456
|
// src/dsm/components/asset-rendering.ts
|
|
457
|
-
import { z as
|
|
457
|
+
import { z as z94 } from "zod";
|
|
458
458
|
|
|
459
459
|
// src/dsm/import/support/figma-files.ts
|
|
460
460
|
import { z as z22 } from "zod";
|
|
@@ -471,10 +471,10 @@ var FigmaFileAccessData = z22.object({
|
|
|
471
471
|
});
|
|
472
472
|
|
|
473
473
|
// src/dsm/import/support/import-context.ts
|
|
474
|
-
import { z as
|
|
474
|
+
import { z as z85 } from "zod";
|
|
475
475
|
|
|
476
476
|
// src/dsm/data-sources/data-source.ts
|
|
477
|
-
import { z as
|
|
477
|
+
import { z as z83 } from "zod";
|
|
478
478
|
|
|
479
479
|
// src/dsm/import/warning.ts
|
|
480
480
|
import { z as z23 } from "zod";
|
|
@@ -505,7 +505,7 @@ var ImportWarning = z23.object({
|
|
|
505
505
|
});
|
|
506
506
|
|
|
507
507
|
// src/dsm/data-sources/import-summary.ts
|
|
508
|
-
import { z as
|
|
508
|
+
import { z as z82 } from "zod";
|
|
509
509
|
|
|
510
510
|
// src/dsm/elements/data/base.ts
|
|
511
511
|
import { z as z24 } from "zod";
|
|
@@ -1695,35 +1695,84 @@ var ZIndexValue = z72.object({
|
|
|
1695
1695
|
});
|
|
1696
1696
|
var ZIndexTokenData = tokenAliasOrValue(ZIndexValue);
|
|
1697
1697
|
|
|
1698
|
-
// src/dsm/elements/component.ts
|
|
1698
|
+
// src/dsm/elements/component-properties.ts
|
|
1699
1699
|
import { z as z73 } from "zod";
|
|
1700
|
-
var
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1700
|
+
var FigmaComponentPropertyType = z73.enum(["Boolean", "InstanceSwap", "Variant", "Text"]);
|
|
1701
|
+
var FigmaComponentBooleanProperty = z73.object({
|
|
1702
|
+
type: z73.literal(FigmaComponentPropertyType.enum.Boolean),
|
|
1703
|
+
value: z73.boolean(),
|
|
1704
|
+
defaultValue: z73.boolean()
|
|
1705
|
+
});
|
|
1706
|
+
var FigmaComponentInstanceSwapProperty = z73.object({
|
|
1707
|
+
type: z73.literal(FigmaComponentPropertyType.enum.InstanceSwap),
|
|
1708
|
+
value: z73.string()
|
|
1709
|
+
// Persistent ID of a Component to swap?
|
|
1710
|
+
});
|
|
1711
|
+
var FigmaComponentVariantProperty = z73.object({
|
|
1712
|
+
type: z73.literal(FigmaComponentPropertyType.enum.Variant),
|
|
1713
|
+
value: z73.string(),
|
|
1714
|
+
options: z73.array(z73.string())
|
|
1715
|
+
});
|
|
1716
|
+
var FigmaComponentTextProperty = z73.object({
|
|
1717
|
+
type: z73.literal(FigmaComponentPropertyType.enum.Text),
|
|
1718
|
+
value: z73.string()
|
|
1719
|
+
});
|
|
1720
|
+
var FigmaComponentProperties = z73.record(
|
|
1721
|
+
z73.string(),
|
|
1722
|
+
z73.discriminatedUnion("type", [
|
|
1723
|
+
FigmaComponentBooleanProperty,
|
|
1724
|
+
FigmaComponentInstanceSwapProperty,
|
|
1725
|
+
FigmaComponentTextProperty
|
|
1726
|
+
])
|
|
1727
|
+
);
|
|
1728
|
+
var FigmaComponentSetProperties = z73.record(
|
|
1729
|
+
z73.string(),
|
|
1730
|
+
z73.discriminatedUnion("type", [
|
|
1731
|
+
FigmaComponentBooleanProperty,
|
|
1732
|
+
FigmaComponentInstanceSwapProperty,
|
|
1733
|
+
FigmaComponentTextProperty,
|
|
1734
|
+
FigmaComponentVariantProperty
|
|
1735
|
+
])
|
|
1736
|
+
);
|
|
1737
|
+
|
|
1738
|
+
// src/dsm/elements/component.ts
|
|
1739
|
+
import { z as z74 } from "zod";
|
|
1740
|
+
var ComponentOriginPart = z74.object({
|
|
1741
|
+
nodeId: z74.string().optional(),
|
|
1742
|
+
width: z74.number().optional(),
|
|
1743
|
+
height: z74.number().optional()
|
|
1704
1744
|
});
|
|
1705
|
-
var ComponentAsset =
|
|
1706
|
-
assetId:
|
|
1707
|
-
assetPath:
|
|
1745
|
+
var ComponentAsset = z74.object({
|
|
1746
|
+
assetId: z74.string(),
|
|
1747
|
+
assetPath: z74.string()
|
|
1708
1748
|
});
|
|
1709
1749
|
var ComponentOrigin = DesignElementOrigin.extend(ComponentOriginPart.shape);
|
|
1710
|
-
var
|
|
1750
|
+
var BaseComponent = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
1711
1751
|
origin: ComponentOrigin.optional(),
|
|
1712
|
-
thumbnail: ComponentAsset
|
|
1752
|
+
thumbnail: ComponentAsset
|
|
1753
|
+
});
|
|
1754
|
+
var Component = BaseComponent.extend({
|
|
1713
1755
|
svg: ComponentAsset.optional(),
|
|
1714
|
-
isAsset:
|
|
1756
|
+
isAsset: z74.boolean(),
|
|
1757
|
+
componentSetId: z74.string().optional(),
|
|
1758
|
+
properties: FigmaComponentProperties.optional()
|
|
1715
1759
|
});
|
|
1716
1760
|
function isImportedComponent(component) {
|
|
1717
1761
|
return !!component.origin;
|
|
1718
1762
|
}
|
|
1719
1763
|
|
|
1764
|
+
// src/dsm/elements/component-set.ts
|
|
1765
|
+
var ComponentSet = BaseComponent.extend({
|
|
1766
|
+
properties: FigmaComponentSetProperties
|
|
1767
|
+
});
|
|
1768
|
+
|
|
1720
1769
|
// src/dsm/elements/documentation-page-v1.ts
|
|
1721
|
-
import { z as
|
|
1770
|
+
import { z as z76 } from "zod";
|
|
1722
1771
|
|
|
1723
1772
|
// src/dsm/elements/group.ts
|
|
1724
|
-
import { z as
|
|
1773
|
+
import { z as z75 } from "zod";
|
|
1725
1774
|
var ElementGroup = DesignElementBase.extend(DesignElementGroupablePart.shape).extend(DesignElementSlugPart.shape).extend(DesignElementBrandedPart.partial().shape).extend({
|
|
1726
|
-
shortPersistentId:
|
|
1775
|
+
shortPersistentId: z75.string().optional(),
|
|
1727
1776
|
childType: DesignElementType,
|
|
1728
1777
|
data: ElementGroupDataV2.optional()
|
|
1729
1778
|
});
|
|
@@ -1731,7 +1780,7 @@ var BrandedElementGroup = ElementGroup.extend(DesignElementBrandedPart.shape);
|
|
|
1731
1780
|
|
|
1732
1781
|
// src/dsm/elements/documentation-page-v1.ts
|
|
1733
1782
|
var DocumentationPageV1 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1734
|
-
shortPersistentId:
|
|
1783
|
+
shortPersistentId: z76.string(),
|
|
1735
1784
|
data: DocumentationPageDataV1
|
|
1736
1785
|
});
|
|
1737
1786
|
var DocumentationGroupV1 = ElementGroup.omit({
|
|
@@ -1741,21 +1790,21 @@ var DocumentationGroupV1 = ElementGroup.omit({
|
|
|
1741
1790
|
});
|
|
1742
1791
|
|
|
1743
1792
|
// src/dsm/elements/documentation-page-v2.ts
|
|
1744
|
-
import { z as
|
|
1793
|
+
import { z as z77 } from "zod";
|
|
1745
1794
|
var DocumentationPageV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1746
|
-
shortPersistentId:
|
|
1795
|
+
shortPersistentId: z77.string(),
|
|
1747
1796
|
data: DocumentationPageDataV2.extend({
|
|
1748
|
-
oldBlocks:
|
|
1797
|
+
oldBlocks: z77.array(PageBlockV1).optional()
|
|
1749
1798
|
})
|
|
1750
1799
|
});
|
|
1751
1800
|
|
|
1752
1801
|
// src/dsm/elements/figma-file-structures.ts
|
|
1753
|
-
import { z as
|
|
1754
|
-
var FigmaFileStructureOrigin =
|
|
1755
|
-
sourceId:
|
|
1756
|
-
fileId:
|
|
1802
|
+
import { z as z78 } from "zod";
|
|
1803
|
+
var FigmaFileStructureOrigin = z78.object({
|
|
1804
|
+
sourceId: z78.string(),
|
|
1805
|
+
fileId: z78.string().optional()
|
|
1757
1806
|
});
|
|
1758
|
-
var FigmaFileStructureData =
|
|
1807
|
+
var FigmaFileStructureData = z78.object({
|
|
1759
1808
|
rootNode: FigmaFileStructureNode,
|
|
1760
1809
|
assetsInFile: FigmaFileStructureStatistics
|
|
1761
1810
|
});
|
|
@@ -1771,10 +1820,10 @@ function traverseStructure(node, action) {
|
|
|
1771
1820
|
}
|
|
1772
1821
|
|
|
1773
1822
|
// src/dsm/elements/figma-node-reference.ts
|
|
1774
|
-
import { z as
|
|
1775
|
-
var FigmaNodeReferenceOrigin =
|
|
1776
|
-
sourceId:
|
|
1777
|
-
parentName:
|
|
1823
|
+
import { z as z79 } from "zod";
|
|
1824
|
+
var FigmaNodeReferenceOrigin = z79.object({
|
|
1825
|
+
sourceId: z79.string(),
|
|
1826
|
+
parentName: z79.string().optional()
|
|
1778
1827
|
});
|
|
1779
1828
|
var FigmaNodeReference = DesignElementBase.extend({
|
|
1780
1829
|
data: FigmaNodeReferenceData,
|
|
@@ -1782,16 +1831,16 @@ var FigmaNodeReference = DesignElementBase.extend({
|
|
|
1782
1831
|
});
|
|
1783
1832
|
|
|
1784
1833
|
// src/dsm/elements/theme.ts
|
|
1785
|
-
import { z as
|
|
1834
|
+
import { z as z81 } from "zod";
|
|
1786
1835
|
|
|
1787
1836
|
// src/dsm/elements/tokens.ts
|
|
1788
|
-
import { z as
|
|
1789
|
-
var DesignTokenOriginPart =
|
|
1790
|
-
referenceOriginId:
|
|
1791
|
-
referenceOriginKey:
|
|
1792
|
-
referencePersistentId:
|
|
1793
|
-
referenceResolutionFailed:
|
|
1794
|
-
key:
|
|
1837
|
+
import { z as z80 } from "zod";
|
|
1838
|
+
var DesignTokenOriginPart = z80.object({
|
|
1839
|
+
referenceOriginId: z80.string().optional(),
|
|
1840
|
+
referenceOriginKey: z80.string().optional(),
|
|
1841
|
+
referencePersistentId: z80.string().optional(),
|
|
1842
|
+
referenceResolutionFailed: z80.boolean().optional(),
|
|
1843
|
+
key: z80.string().optional()
|
|
1795
1844
|
});
|
|
1796
1845
|
var DesignTokenOrigin = DesignElementOrigin.extend(DesignTokenOriginPart.shape);
|
|
1797
1846
|
var DesignTokenBase = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
@@ -1803,111 +1852,111 @@ var UpdateDesignTokenBase = DesignTokenBase.omit({
|
|
|
1803
1852
|
brandPersistentId: true,
|
|
1804
1853
|
designSystemVersionId: true
|
|
1805
1854
|
});
|
|
1806
|
-
var BlurTokenTypedData =
|
|
1807
|
-
type:
|
|
1855
|
+
var BlurTokenTypedData = z80.object({
|
|
1856
|
+
type: z80.literal("Blur"),
|
|
1808
1857
|
data: BlurTokenData
|
|
1809
1858
|
});
|
|
1810
|
-
var ColorTokenTypedData =
|
|
1811
|
-
type:
|
|
1859
|
+
var ColorTokenTypedData = z80.object({
|
|
1860
|
+
type: z80.literal("Color"),
|
|
1812
1861
|
data: ColorTokenData
|
|
1813
1862
|
});
|
|
1814
|
-
var GradientTokenTypedData =
|
|
1815
|
-
type:
|
|
1863
|
+
var GradientTokenTypedData = z80.object({
|
|
1864
|
+
type: z80.literal("Gradient"),
|
|
1816
1865
|
data: GradientTokenData
|
|
1817
1866
|
});
|
|
1818
|
-
var OpacityTokenTypedData =
|
|
1819
|
-
type:
|
|
1867
|
+
var OpacityTokenTypedData = z80.object({
|
|
1868
|
+
type: z80.literal("Opacity"),
|
|
1820
1869
|
data: OpacityTokenData
|
|
1821
1870
|
});
|
|
1822
|
-
var ShadowTokenTypedData =
|
|
1823
|
-
type:
|
|
1871
|
+
var ShadowTokenTypedData = z80.object({
|
|
1872
|
+
type: z80.literal("Shadow"),
|
|
1824
1873
|
data: ShadowTokenData
|
|
1825
1874
|
});
|
|
1826
|
-
var TypographyTokenTypedData =
|
|
1827
|
-
type:
|
|
1875
|
+
var TypographyTokenTypedData = z80.object({
|
|
1876
|
+
type: z80.literal("Typography"),
|
|
1828
1877
|
data: TypographyTokenData
|
|
1829
1878
|
});
|
|
1830
|
-
var StringTokenTypedData =
|
|
1831
|
-
type:
|
|
1879
|
+
var StringTokenTypedData = z80.object({
|
|
1880
|
+
type: z80.literal("String"),
|
|
1832
1881
|
data: StringTokenData
|
|
1833
1882
|
});
|
|
1834
|
-
var DimensionTokenTypedData =
|
|
1835
|
-
type:
|
|
1883
|
+
var DimensionTokenTypedData = z80.object({
|
|
1884
|
+
type: z80.literal("Dimension"),
|
|
1836
1885
|
data: DimensionTokenData
|
|
1837
1886
|
});
|
|
1838
|
-
var FontSizeTokenTypedData =
|
|
1839
|
-
type:
|
|
1887
|
+
var FontSizeTokenTypedData = z80.object({
|
|
1888
|
+
type: z80.literal("FontSize"),
|
|
1840
1889
|
data: FontSizeTokenData
|
|
1841
1890
|
});
|
|
1842
|
-
var FontFamilyTokenTypedData =
|
|
1843
|
-
type:
|
|
1891
|
+
var FontFamilyTokenTypedData = z80.object({
|
|
1892
|
+
type: z80.literal("FontFamily"),
|
|
1844
1893
|
data: FontFamilyTokenData
|
|
1845
1894
|
});
|
|
1846
|
-
var FontWeightTokenTypedData =
|
|
1847
|
-
type:
|
|
1895
|
+
var FontWeightTokenTypedData = z80.object({
|
|
1896
|
+
type: z80.literal("FontWeight"),
|
|
1848
1897
|
data: FontWeightTokenData
|
|
1849
1898
|
});
|
|
1850
|
-
var LetterSpacingTokenTypedData =
|
|
1851
|
-
type:
|
|
1899
|
+
var LetterSpacingTokenTypedData = z80.object({
|
|
1900
|
+
type: z80.literal("LetterSpacing"),
|
|
1852
1901
|
data: LetterSpacingTokenData
|
|
1853
1902
|
});
|
|
1854
|
-
var LineHeightTokenTypedData =
|
|
1855
|
-
type:
|
|
1903
|
+
var LineHeightTokenTypedData = z80.object({
|
|
1904
|
+
type: z80.literal("LineHeight"),
|
|
1856
1905
|
data: LineHeightTokenData
|
|
1857
1906
|
});
|
|
1858
|
-
var ParagraphSpacingTokenTypedData =
|
|
1859
|
-
type:
|
|
1907
|
+
var ParagraphSpacingTokenTypedData = z80.object({
|
|
1908
|
+
type: z80.literal("ParagraphSpacing"),
|
|
1860
1909
|
data: ParagraphSpacingTokenData
|
|
1861
1910
|
});
|
|
1862
|
-
var TextCaseTokenTypedData =
|
|
1863
|
-
type:
|
|
1911
|
+
var TextCaseTokenTypedData = z80.object({
|
|
1912
|
+
type: z80.literal("TextCase"),
|
|
1864
1913
|
data: TextCaseTokenData
|
|
1865
1914
|
});
|
|
1866
|
-
var TextDecorationTokenTypedData =
|
|
1867
|
-
type:
|
|
1915
|
+
var TextDecorationTokenTypedData = z80.object({
|
|
1916
|
+
type: z80.literal("TextDecoration"),
|
|
1868
1917
|
data: TextDecorationTokenData
|
|
1869
1918
|
});
|
|
1870
|
-
var BorderRadiusTokenTypedData =
|
|
1871
|
-
type:
|
|
1919
|
+
var BorderRadiusTokenTypedData = z80.object({
|
|
1920
|
+
type: z80.literal("BorderRadius"),
|
|
1872
1921
|
data: BorderRadiusTokenData
|
|
1873
1922
|
});
|
|
1874
|
-
var BorderWidthTokenTypedData =
|
|
1875
|
-
type:
|
|
1923
|
+
var BorderWidthTokenTypedData = z80.object({
|
|
1924
|
+
type: z80.literal("BorderWidth"),
|
|
1876
1925
|
data: BorderWidthTokenData
|
|
1877
1926
|
});
|
|
1878
|
-
var BorderTypedData =
|
|
1879
|
-
type:
|
|
1927
|
+
var BorderTypedData = z80.object({
|
|
1928
|
+
type: z80.literal("Border"),
|
|
1880
1929
|
data: BorderTokenData
|
|
1881
1930
|
});
|
|
1882
|
-
var ProductCopyTypedData =
|
|
1883
|
-
type:
|
|
1931
|
+
var ProductCopyTypedData = z80.object({
|
|
1932
|
+
type: z80.literal("ProductCopy"),
|
|
1884
1933
|
data: ProductCopyTokenData
|
|
1885
1934
|
});
|
|
1886
|
-
var SizeTypedData =
|
|
1887
|
-
type:
|
|
1935
|
+
var SizeTypedData = z80.object({
|
|
1936
|
+
type: z80.literal("Size"),
|
|
1888
1937
|
data: SizeTokenData
|
|
1889
1938
|
});
|
|
1890
|
-
var SpaceTypedData =
|
|
1891
|
-
type:
|
|
1939
|
+
var SpaceTypedData = z80.object({
|
|
1940
|
+
type: z80.literal("Space"),
|
|
1892
1941
|
data: SpaceTokenData
|
|
1893
1942
|
});
|
|
1894
|
-
var VisibilityTypedData =
|
|
1895
|
-
type:
|
|
1943
|
+
var VisibilityTypedData = z80.object({
|
|
1944
|
+
type: z80.literal("Visibility"),
|
|
1896
1945
|
data: VisibilityTokenData
|
|
1897
1946
|
});
|
|
1898
|
-
var ZIndexTypedData =
|
|
1899
|
-
type:
|
|
1947
|
+
var ZIndexTypedData = z80.object({
|
|
1948
|
+
type: z80.literal("ZIndex"),
|
|
1900
1949
|
data: ZIndexTokenData
|
|
1901
1950
|
});
|
|
1902
|
-
var DurationTypedData =
|
|
1903
|
-
type:
|
|
1951
|
+
var DurationTypedData = z80.object({
|
|
1952
|
+
type: z80.literal("Duration"),
|
|
1904
1953
|
data: DurationTokenData
|
|
1905
1954
|
});
|
|
1906
|
-
var FontTypedData =
|
|
1907
|
-
type:
|
|
1908
|
-
data:
|
|
1955
|
+
var FontTypedData = z80.object({
|
|
1956
|
+
type: z80.literal("Font"),
|
|
1957
|
+
data: z80.record(z80.any())
|
|
1909
1958
|
});
|
|
1910
|
-
var DesignTokenTypedData =
|
|
1959
|
+
var DesignTokenTypedData = z80.discriminatedUnion("type", [
|
|
1911
1960
|
BlurTokenTypedData,
|
|
1912
1961
|
BorderRadiusTokenTypedData,
|
|
1913
1962
|
BorderWidthTokenTypedData,
|
|
@@ -1957,32 +2006,32 @@ function designTokenTypeFilter(type) {
|
|
|
1957
2006
|
var ThemeOverrideOriginPart = DesignTokenOriginPart;
|
|
1958
2007
|
var ThemeOverrideOrigin = DesignTokenOrigin;
|
|
1959
2008
|
var ThemeOverride = DesignTokenTypedData.and(
|
|
1960
|
-
|
|
1961
|
-
tokenPersistentId:
|
|
2009
|
+
z81.object({
|
|
2010
|
+
tokenPersistentId: z81.string(),
|
|
1962
2011
|
origin: ThemeOverrideOrigin.optional().nullable().transform((v) => v ?? void 0)
|
|
1963
2012
|
})
|
|
1964
2013
|
);
|
|
1965
|
-
var ThemeElementData =
|
|
1966
|
-
value:
|
|
1967
|
-
overrides:
|
|
2014
|
+
var ThemeElementData = z81.object({
|
|
2015
|
+
value: z81.object({
|
|
2016
|
+
overrides: z81.array(ThemeOverride)
|
|
1968
2017
|
})
|
|
1969
2018
|
});
|
|
1970
|
-
var ThemeOriginPart =
|
|
1971
|
-
var ThemeOriginObject =
|
|
1972
|
-
id:
|
|
1973
|
-
name:
|
|
2019
|
+
var ThemeOriginPart = z81.object({});
|
|
2020
|
+
var ThemeOriginObject = z81.object({
|
|
2021
|
+
id: z81.string(),
|
|
2022
|
+
name: z81.string()
|
|
1974
2023
|
});
|
|
1975
|
-
var ThemeOriginSource =
|
|
1976
|
-
sourceId:
|
|
1977
|
-
sourceObjects:
|
|
2024
|
+
var ThemeOriginSource = z81.object({
|
|
2025
|
+
sourceId: z81.string(),
|
|
2026
|
+
sourceObjects: z81.array(ThemeOriginObject)
|
|
1978
2027
|
});
|
|
1979
|
-
var ThemeOrigin =
|
|
1980
|
-
sources:
|
|
2028
|
+
var ThemeOrigin = z81.object({
|
|
2029
|
+
sources: z81.array(ThemeOriginSource)
|
|
1981
2030
|
});
|
|
1982
2031
|
var Theme = DesignElementBase.extend(DesignElementBrandedPart.shape).extend({
|
|
1983
2032
|
origin: ThemeOrigin.optional(),
|
|
1984
|
-
overrides:
|
|
1985
|
-
codeName:
|
|
2033
|
+
overrides: z81.array(ThemeOverride),
|
|
2034
|
+
codeName: z81.string()
|
|
1986
2035
|
});
|
|
1987
2036
|
|
|
1988
2037
|
// src/dsm/elements/utils.ts
|
|
@@ -2052,17 +2101,17 @@ var PageBlockDefinitionsMap = class {
|
|
|
2052
2101
|
};
|
|
2053
2102
|
|
|
2054
2103
|
// src/dsm/data-sources/import-summary.ts
|
|
2055
|
-
var FileStructureStats =
|
|
2104
|
+
var FileStructureStats = z82.object({
|
|
2056
2105
|
frames: zeroNumberByDefault(),
|
|
2057
2106
|
components: zeroNumberByDefault(),
|
|
2058
2107
|
componentSets: zeroNumberByDefault()
|
|
2059
2108
|
});
|
|
2060
2109
|
var SourceImportSummaryByTokenTypeKey = DesignTokenType.or(
|
|
2061
2110
|
// Backward compatibility
|
|
2062
|
-
|
|
2111
|
+
z82.enum(["Measure", "Radius", "GenericToken", "Font", "Text"])
|
|
2063
2112
|
);
|
|
2064
|
-
var SourceImportSummaryByTokenType =
|
|
2065
|
-
var SourceImportTokenSummary =
|
|
2113
|
+
var SourceImportSummaryByTokenType = z82.record(SourceImportSummaryByTokenTypeKey, z82.number());
|
|
2114
|
+
var SourceImportTokenSummary = z82.object({
|
|
2066
2115
|
tokensCreated: zeroNumberByDefault(),
|
|
2067
2116
|
tokensUpdated: zeroNumberByDefault(),
|
|
2068
2117
|
tokensDeleted: zeroNumberByDefault(),
|
|
@@ -2070,7 +2119,7 @@ var SourceImportTokenSummary = z81.object({
|
|
|
2070
2119
|
tokensUpdatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {}),
|
|
2071
2120
|
tokensDeletedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {})
|
|
2072
2121
|
});
|
|
2073
|
-
var SourceImportComponentSummary =
|
|
2122
|
+
var SourceImportComponentSummary = z82.object({
|
|
2074
2123
|
componentsCreated: zeroNumberByDefault(),
|
|
2075
2124
|
componentsUpdated: zeroNumberByDefault(),
|
|
2076
2125
|
componentsDeleted: zeroNumberByDefault(),
|
|
@@ -2078,163 +2127,163 @@ var SourceImportComponentSummary = z81.object({
|
|
|
2078
2127
|
componentAssetsUpdated: zeroNumberByDefault(),
|
|
2079
2128
|
componentAssetsDeleted: zeroNumberByDefault()
|
|
2080
2129
|
});
|
|
2081
|
-
var SourceImportFrameSummary =
|
|
2130
|
+
var SourceImportFrameSummary = z82.object({
|
|
2082
2131
|
assetsInFile: nullishToOptional(FileStructureStats.optional()),
|
|
2083
|
-
invalidReferencesCount: nullishToOptional(
|
|
2084
|
-
});
|
|
2085
|
-
var SourceImportSummary =
|
|
2086
|
-
sourceId: nullishToOptional(
|
|
2087
|
-
brandId: nullishToOptional(
|
|
2088
|
-
versionId: nullishToOptional(
|
|
2089
|
-
error: nullishToOptional(
|
|
2090
|
-
isFailed:
|
|
2091
|
-
warnings:
|
|
2132
|
+
invalidReferencesCount: nullishToOptional(z82.number().optional())
|
|
2133
|
+
});
|
|
2134
|
+
var SourceImportSummary = z82.object({
|
|
2135
|
+
sourceId: nullishToOptional(z82.string()),
|
|
2136
|
+
brandId: nullishToOptional(z82.string()),
|
|
2137
|
+
versionId: nullishToOptional(z82.string()),
|
|
2138
|
+
error: nullishToOptional(z82.any()),
|
|
2139
|
+
isFailed: z82.boolean(),
|
|
2140
|
+
warnings: z82.array(ImportWarning).nullish().transform((v) => v ?? []),
|
|
2092
2141
|
...SourceImportTokenSummary.shape,
|
|
2093
2142
|
...SourceImportComponentSummary.shape,
|
|
2094
2143
|
...FileStructureStats.shape
|
|
2095
2144
|
});
|
|
2096
2145
|
function zeroNumberByDefault() {
|
|
2097
|
-
return
|
|
2146
|
+
return z82.number().nullish().transform((v) => v ?? 0);
|
|
2098
2147
|
}
|
|
2099
2148
|
|
|
2100
2149
|
// src/dsm/data-sources/data-source.ts
|
|
2101
|
-
var DataSourceRemoteType =
|
|
2102
|
-
var DataSourceUploadRemoteSource =
|
|
2103
|
-
var DataSourceFigmaState =
|
|
2104
|
-
var DataSourceAutoImportMode =
|
|
2105
|
-
var DataSourceStats =
|
|
2150
|
+
var DataSourceRemoteType = z83.enum(["Figma", "TokenStudio", "FigmaVariablesPlugin"]);
|
|
2151
|
+
var DataSourceUploadRemoteSource = z83.enum(["TokenStudio", "FigmaVariablesPlugin", "Custom"]);
|
|
2152
|
+
var DataSourceFigmaState = z83.enum(["Active", "MissingIntegration", "MissingFileAccess", "MissingFileOwner"]);
|
|
2153
|
+
var DataSourceAutoImportMode = z83.enum(["Never", "Hourly"]);
|
|
2154
|
+
var DataSourceStats = z83.object({
|
|
2106
2155
|
tokens: zeroNumberByDefault2(),
|
|
2107
2156
|
components: zeroNumberByDefault2(),
|
|
2108
2157
|
assets: zeroNumberByDefault2(),
|
|
2109
2158
|
frames: zeroNumberByDefault2()
|
|
2110
2159
|
});
|
|
2111
|
-
var DataSourceFigmaFileData =
|
|
2112
|
-
lastUpdatedAt:
|
|
2160
|
+
var DataSourceFigmaFileData = z83.object({
|
|
2161
|
+
lastUpdatedAt: z83.coerce.date()
|
|
2113
2162
|
});
|
|
2114
|
-
var DataSourceFigmaFileVersionData =
|
|
2115
|
-
id:
|
|
2116
|
-
label:
|
|
2117
|
-
description:
|
|
2118
|
-
createdAt:
|
|
2163
|
+
var DataSourceFigmaFileVersionData = z83.object({
|
|
2164
|
+
id: z83.string(),
|
|
2165
|
+
label: z83.string().optional(),
|
|
2166
|
+
description: z83.string().optional(),
|
|
2167
|
+
createdAt: z83.coerce.date()
|
|
2119
2168
|
});
|
|
2120
|
-
var DataSourceFigmaScope =
|
|
2121
|
-
assets:
|
|
2122
|
-
components:
|
|
2123
|
-
documentationFrames:
|
|
2124
|
-
tokens:
|
|
2125
|
-
themePersistentId:
|
|
2126
|
-
isUnpublishedContentFallbackEnabled:
|
|
2169
|
+
var DataSourceFigmaScope = z83.object({
|
|
2170
|
+
assets: z83.boolean(),
|
|
2171
|
+
components: z83.boolean(),
|
|
2172
|
+
documentationFrames: z83.boolean(),
|
|
2173
|
+
tokens: z83.boolean(),
|
|
2174
|
+
themePersistentId: z83.string().optional(),
|
|
2175
|
+
isUnpublishedContentFallbackEnabled: z83.boolean()
|
|
2127
2176
|
});
|
|
2128
|
-
var DataSourceFigmaImportMetadata =
|
|
2177
|
+
var DataSourceFigmaImportMetadata = z83.object({
|
|
2129
2178
|
fileData: DataSourceFigmaFileData.optional(),
|
|
2130
2179
|
importedPublishedVersion: DataSourceFigmaFileVersionData.optional()
|
|
2131
2180
|
});
|
|
2132
|
-
var DataSourceFigmaRemote =
|
|
2133
|
-
type:
|
|
2134
|
-
fileId:
|
|
2135
|
-
preferredCredentialId:
|
|
2136
|
-
ownerId:
|
|
2181
|
+
var DataSourceFigmaRemote = z83.object({
|
|
2182
|
+
type: z83.literal(DataSourceRemoteType.Enum.Figma),
|
|
2183
|
+
fileId: z83.string(),
|
|
2184
|
+
preferredCredentialId: z83.string().optional(),
|
|
2185
|
+
ownerId: z83.string(),
|
|
2137
2186
|
// todo remove or keep to reference who created data source
|
|
2138
|
-
ownerName:
|
|
2187
|
+
ownerName: z83.string(),
|
|
2139
2188
|
// todo probably remove
|
|
2140
2189
|
scope: DataSourceFigmaScope,
|
|
2141
2190
|
state: DataSourceFigmaState,
|
|
2142
|
-
requiresSync:
|
|
2191
|
+
requiresSync: z83.boolean().optional().transform((v) => v ?? false),
|
|
2143
2192
|
lastImportMetadata: DataSourceFigmaImportMetadata.optional(),
|
|
2144
|
-
downloadChunkSize:
|
|
2145
|
-
figmaRenderChunkSize:
|
|
2146
|
-
maxFileDepth:
|
|
2193
|
+
downloadChunkSize: z83.number().optional(),
|
|
2194
|
+
figmaRenderChunkSize: z83.number().optional(),
|
|
2195
|
+
maxFileDepth: z83.number().optional()
|
|
2147
2196
|
});
|
|
2148
|
-
var DataSourceTokenStudioRemote =
|
|
2149
|
-
type:
|
|
2197
|
+
var DataSourceTokenStudioRemote = z83.object({
|
|
2198
|
+
type: z83.literal(DataSourceRemoteType.Enum.TokenStudio)
|
|
2150
2199
|
});
|
|
2151
|
-
var DataSourceUploadImportMetadata =
|
|
2152
|
-
var DataSourceUploadRemote =
|
|
2153
|
-
type:
|
|
2154
|
-
remoteId:
|
|
2200
|
+
var DataSourceUploadImportMetadata = z83.record(z83.any());
|
|
2201
|
+
var DataSourceUploadRemote = z83.object({
|
|
2202
|
+
type: z83.literal(DataSourceRemoteType.Enum.FigmaVariablesPlugin),
|
|
2203
|
+
remoteId: z83.string(),
|
|
2155
2204
|
remoteSourceType: DataSourceUploadRemoteSource,
|
|
2156
2205
|
lastImportMetadata: DataSourceUploadImportMetadata.optional(),
|
|
2157
2206
|
warnings: nullishToOptional(ImportWarning.array())
|
|
2158
2207
|
});
|
|
2159
|
-
var DataSourceRemote =
|
|
2208
|
+
var DataSourceRemote = z83.discriminatedUnion("type", [
|
|
2160
2209
|
DataSourceFigmaRemote,
|
|
2161
2210
|
DataSourceUploadRemote,
|
|
2162
2211
|
DataSourceTokenStudioRemote
|
|
2163
2212
|
]);
|
|
2164
|
-
var DataSource =
|
|
2165
|
-
id:
|
|
2166
|
-
name:
|
|
2167
|
-
thumbnailUrl:
|
|
2168
|
-
createdAt:
|
|
2169
|
-
lastImportedAt:
|
|
2213
|
+
var DataSource = z83.object({
|
|
2214
|
+
id: z83.string(),
|
|
2215
|
+
name: z83.string(),
|
|
2216
|
+
thumbnailUrl: z83.string().optional(),
|
|
2217
|
+
createdAt: z83.coerce.date().optional(),
|
|
2218
|
+
lastImportedAt: z83.coerce.date().optional(),
|
|
2170
2219
|
lastImportSummary: SourceImportSummary.optional(),
|
|
2171
|
-
designSystemId:
|
|
2172
|
-
brandPersistentId:
|
|
2220
|
+
designSystemId: z83.string(),
|
|
2221
|
+
brandPersistentId: z83.string(),
|
|
2173
2222
|
autoImportMode: DataSourceAutoImportMode,
|
|
2174
2223
|
stats: DataSourceStats,
|
|
2175
2224
|
remote: DataSourceRemote,
|
|
2176
|
-
sortOrder:
|
|
2225
|
+
sortOrder: z83.number()
|
|
2177
2226
|
});
|
|
2178
|
-
var DataSourceVersion =
|
|
2179
|
-
id:
|
|
2180
|
-
createdAt:
|
|
2181
|
-
label:
|
|
2182
|
-
description:
|
|
2227
|
+
var DataSourceVersion = z83.object({
|
|
2228
|
+
id: z83.string(),
|
|
2229
|
+
createdAt: z83.coerce.date(),
|
|
2230
|
+
label: z83.string().nullish(),
|
|
2231
|
+
description: z83.string().nullish()
|
|
2183
2232
|
});
|
|
2184
2233
|
function zeroNumberByDefault2() {
|
|
2185
|
-
return
|
|
2234
|
+
return z83.number().nullish().transform((v) => v ?? 0);
|
|
2186
2235
|
}
|
|
2187
2236
|
|
|
2188
2237
|
// src/dsm/data-sources/import-job.ts
|
|
2189
|
-
import { z as
|
|
2190
|
-
var ImportJobState =
|
|
2191
|
-
var ImportJobOperation =
|
|
2238
|
+
import { z as z84 } from "zod";
|
|
2239
|
+
var ImportJobState = z84.enum(["PendingInput", "Queued", "InProgress", "Failed", "Success"]);
|
|
2240
|
+
var ImportJobOperation = z84.enum(["Check", "Import"]);
|
|
2192
2241
|
var ImportJob = Entity.extend({
|
|
2193
|
-
designSystemId:
|
|
2194
|
-
designSystemVersionId:
|
|
2195
|
-
sourceIds:
|
|
2242
|
+
designSystemId: z84.string(),
|
|
2243
|
+
designSystemVersionId: z84.string(),
|
|
2244
|
+
sourceIds: z84.array(z84.string()),
|
|
2196
2245
|
state: ImportJobState,
|
|
2197
|
-
createdByUserId:
|
|
2198
|
-
importContextId:
|
|
2199
|
-
error:
|
|
2246
|
+
createdByUserId: z84.string().optional(),
|
|
2247
|
+
importContextId: z84.string(),
|
|
2248
|
+
error: z84.string().optional(),
|
|
2200
2249
|
sourceType: DataSourceRemoteType,
|
|
2201
|
-
importContextCleanedUp:
|
|
2250
|
+
importContextCleanedUp: z84.boolean()
|
|
2202
2251
|
});
|
|
2203
2252
|
|
|
2204
2253
|
// src/dsm/import/support/import-context.ts
|
|
2205
|
-
var ImportFunctionInput =
|
|
2206
|
-
importJobId:
|
|
2207
|
-
importContextId:
|
|
2208
|
-
designSystemId:
|
|
2254
|
+
var ImportFunctionInput = z85.object({
|
|
2255
|
+
importJobId: z85.string(),
|
|
2256
|
+
importContextId: z85.string(),
|
|
2257
|
+
designSystemId: z85.string().optional()
|
|
2209
2258
|
});
|
|
2210
|
-
var ImportedFigmaSourceData =
|
|
2211
|
-
sourceId:
|
|
2259
|
+
var ImportedFigmaSourceData = z85.object({
|
|
2260
|
+
sourceId: z85.string(),
|
|
2212
2261
|
figmaRemote: DataSourceFigmaRemote
|
|
2213
2262
|
});
|
|
2214
|
-
var FigmaImportBaseContext =
|
|
2215
|
-
designSystemId:
|
|
2263
|
+
var FigmaImportBaseContext = z85.object({
|
|
2264
|
+
designSystemId: z85.string(),
|
|
2216
2265
|
/**
|
|
2217
2266
|
* Data required for accessing Figma files. This should contain access data for all file ids
|
|
2218
2267
|
* mentioned in the `importedSourceDataBySourceId`
|
|
2219
2268
|
*
|
|
2220
2269
|
* fileId: file data
|
|
2221
2270
|
*/
|
|
2222
|
-
fileAccessByFileId:
|
|
2271
|
+
fileAccessByFileId: z85.record(FigmaFileAccessData),
|
|
2223
2272
|
/**
|
|
2224
2273
|
* Figma source data for which import was requested
|
|
2225
2274
|
*
|
|
2226
2275
|
* sourceId: source data
|
|
2227
2276
|
*/
|
|
2228
|
-
importedSourceDataBySourceId:
|
|
2277
|
+
importedSourceDataBySourceId: z85.record(ImportedFigmaSourceData),
|
|
2229
2278
|
/**
|
|
2230
2279
|
* Array of warnings that will be written into the import result summary at the end
|
|
2231
2280
|
* of import job execution and displayed by the client.
|
|
2232
2281
|
*/
|
|
2233
|
-
importWarnings:
|
|
2282
|
+
importWarnings: z85.record(ImportWarning.array()).default({})
|
|
2234
2283
|
});
|
|
2235
2284
|
var FigmaImportContextWithSourcesState = FigmaImportBaseContext.extend({
|
|
2236
|
-
sourcesWithMissingAccess:
|
|
2237
|
-
shadowOpacityOptional:
|
|
2285
|
+
sourcesWithMissingAccess: z85.array(z85.string()).default([]),
|
|
2286
|
+
shadowOpacityOptional: z85.boolean().default(false)
|
|
2238
2287
|
});
|
|
2239
2288
|
var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
|
|
2240
2289
|
importMetadata: DataSourceFigmaImportMetadata
|
|
@@ -2246,51 +2295,51 @@ var FigmaImportContextWithDownloadScopes = FigmaImportContextWithSourcesState.ex
|
|
|
2246
2295
|
*
|
|
2247
2296
|
* File id -> file download scope
|
|
2248
2297
|
*/
|
|
2249
|
-
fileDownloadScopesByFileId:
|
|
2298
|
+
fileDownloadScopesByFileId: z85.record(FigmaFileDownloadScope),
|
|
2250
2299
|
/**
|
|
2251
2300
|
* Sources filtered down to the ones that have changed since last import and therefore need to be
|
|
2252
2301
|
* imported again.
|
|
2253
2302
|
*
|
|
2254
2303
|
* Source id -> import metadata
|
|
2255
2304
|
*/
|
|
2256
|
-
changedImportedSourceDataBySourceId:
|
|
2305
|
+
changedImportedSourceDataBySourceId: z85.record(ChangedImportedFigmaSourceData)
|
|
2257
2306
|
});
|
|
2258
2307
|
|
|
2259
2308
|
// src/dsm/import/support/import-model-collections.ts
|
|
2260
|
-
import { z as
|
|
2309
|
+
import { z as z93 } from "zod";
|
|
2261
2310
|
|
|
2262
2311
|
// src/dsm/import/image.ts
|
|
2263
|
-
import { z as
|
|
2264
|
-
var ImageImportModelType =
|
|
2265
|
-
var ImageImportModelBase =
|
|
2312
|
+
import { z as z86 } from "zod";
|
|
2313
|
+
var ImageImportModelType = z86.enum(["Url", "FigmaRender"]);
|
|
2314
|
+
var ImageImportModelBase = z86.object({
|
|
2266
2315
|
scope: AssetScope
|
|
2267
2316
|
});
|
|
2268
2317
|
var UrlImageImportModel = ImageImportModelBase.extend({
|
|
2269
|
-
type:
|
|
2270
|
-
url:
|
|
2271
|
-
originKey:
|
|
2272
|
-
extension:
|
|
2318
|
+
type: z86.literal(ImageImportModelType.enum.Url),
|
|
2319
|
+
url: z86.string(),
|
|
2320
|
+
originKey: z86.string(),
|
|
2321
|
+
extension: z86.string()
|
|
2273
2322
|
});
|
|
2274
|
-
var FigmaRenderFormat =
|
|
2323
|
+
var FigmaRenderFormat = z86.enum(["Svg", "Png", "Pdf"]);
|
|
2275
2324
|
var FigmaRenderBase = ImageImportModelBase.extend({
|
|
2276
|
-
type:
|
|
2277
|
-
fileId:
|
|
2278
|
-
fileVersionId:
|
|
2279
|
-
nodeId:
|
|
2280
|
-
originKey:
|
|
2325
|
+
type: z86.literal(ImageImportModelType.enum.FigmaRender),
|
|
2326
|
+
fileId: z86.string(),
|
|
2327
|
+
fileVersionId: z86.string().optional(),
|
|
2328
|
+
nodeId: z86.string(),
|
|
2329
|
+
originKey: z86.string()
|
|
2281
2330
|
});
|
|
2282
2331
|
var FigmaPngRenderImportModel = FigmaRenderBase.extend({
|
|
2283
|
-
format:
|
|
2284
|
-
scale:
|
|
2332
|
+
format: z86.literal(FigmaRenderFormat.enum.Png),
|
|
2333
|
+
scale: z86.number()
|
|
2285
2334
|
});
|
|
2286
2335
|
var FigmaSvgRenderImportModel = FigmaRenderBase.extend({
|
|
2287
|
-
format:
|
|
2336
|
+
format: z86.literal(FigmaRenderFormat.enum.Svg)
|
|
2288
2337
|
});
|
|
2289
|
-
var FigmaRenderImportModel =
|
|
2338
|
+
var FigmaRenderImportModel = z86.discriminatedUnion("format", [
|
|
2290
2339
|
FigmaPngRenderImportModel,
|
|
2291
2340
|
FigmaSvgRenderImportModel
|
|
2292
2341
|
]);
|
|
2293
|
-
var ImageImportModel =
|
|
2342
|
+
var ImageImportModel = z86.union([UrlImageImportModel, FigmaRenderImportModel]);
|
|
2294
2343
|
function getFigmaRenderFormatFileExtension(format) {
|
|
2295
2344
|
switch (format) {
|
|
2296
2345
|
case "Pdf":
|
|
@@ -2303,32 +2352,32 @@ function getFigmaRenderFormatFileExtension(format) {
|
|
|
2303
2352
|
}
|
|
2304
2353
|
|
|
2305
2354
|
// src/dsm/import/component.ts
|
|
2306
|
-
import { z as
|
|
2355
|
+
import { z as z88 } from "zod";
|
|
2307
2356
|
|
|
2308
2357
|
// src/dsm/import/base.ts
|
|
2309
|
-
import { z as
|
|
2310
|
-
var ImportModelBase =
|
|
2311
|
-
id:
|
|
2358
|
+
import { z as z87 } from "zod";
|
|
2359
|
+
var ImportModelBase = z87.object({
|
|
2360
|
+
id: z87.string(),
|
|
2312
2361
|
meta: ObjectMeta,
|
|
2313
2362
|
origin: DesignElementOrigin,
|
|
2314
|
-
brandPersistentId:
|
|
2315
|
-
sortOrder:
|
|
2363
|
+
brandPersistentId: z87.string(),
|
|
2364
|
+
sortOrder: z87.number()
|
|
2316
2365
|
});
|
|
2317
2366
|
var ImportModelInputBase = ImportModelBase.omit({
|
|
2318
2367
|
brandPersistentId: true,
|
|
2319
2368
|
origin: true,
|
|
2320
2369
|
sortOrder: true
|
|
2321
2370
|
}).extend({
|
|
2322
|
-
originId:
|
|
2323
|
-
originMetadata:
|
|
2371
|
+
originId: z87.string(),
|
|
2372
|
+
originMetadata: z87.record(z87.any())
|
|
2324
2373
|
});
|
|
2325
2374
|
|
|
2326
2375
|
// src/dsm/import/component.ts
|
|
2327
|
-
var ComponentImportModelPart =
|
|
2376
|
+
var ComponentImportModelPart = z88.object({
|
|
2328
2377
|
thumbnail: ImageImportModel
|
|
2329
2378
|
});
|
|
2330
2379
|
var ComponentImportModel = ImportModelBase.extend(ComponentImportModelPart.shape).extend({
|
|
2331
|
-
isAsset:
|
|
2380
|
+
isAsset: z88.boolean(),
|
|
2332
2381
|
svg: FigmaSvgRenderImportModel.optional(),
|
|
2333
2382
|
origin: ComponentOrigin
|
|
2334
2383
|
});
|
|
@@ -2341,50 +2390,50 @@ var AssetImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart
|
|
|
2341
2390
|
});
|
|
2342
2391
|
|
|
2343
2392
|
// src/dsm/import/theme.ts
|
|
2344
|
-
import { z as
|
|
2393
|
+
import { z as z89 } from "zod";
|
|
2345
2394
|
var ThemeOverrideImportModelBase = DesignTokenTypedData.and(
|
|
2346
|
-
|
|
2347
|
-
id:
|
|
2395
|
+
z89.object({
|
|
2396
|
+
id: z89.string(),
|
|
2348
2397
|
meta: ObjectMeta
|
|
2349
2398
|
})
|
|
2350
2399
|
);
|
|
2351
2400
|
var ThemeOverrideImportModel = ThemeOverrideImportModelBase.and(
|
|
2352
|
-
|
|
2401
|
+
z89.object({
|
|
2353
2402
|
origin: ThemeOverrideOrigin
|
|
2354
2403
|
})
|
|
2355
2404
|
);
|
|
2356
2405
|
var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
|
|
2357
|
-
|
|
2358
|
-
originId:
|
|
2406
|
+
z89.object({
|
|
2407
|
+
originId: z89.string(),
|
|
2359
2408
|
originMetadata: ThemeOverrideOriginPart
|
|
2360
2409
|
})
|
|
2361
2410
|
);
|
|
2362
|
-
var ThemeImportModel =
|
|
2411
|
+
var ThemeImportModel = z89.object({
|
|
2363
2412
|
meta: ObjectMeta,
|
|
2364
|
-
brandPersistentId:
|
|
2413
|
+
brandPersistentId: z89.string(),
|
|
2365
2414
|
originSource: ThemeOriginSource,
|
|
2366
|
-
overrides:
|
|
2367
|
-
sortOrder:
|
|
2415
|
+
overrides: z89.array(ThemeOverrideImportModel),
|
|
2416
|
+
sortOrder: z89.number()
|
|
2368
2417
|
});
|
|
2369
|
-
var ThemeImportModelInput =
|
|
2418
|
+
var ThemeImportModelInput = z89.object({
|
|
2370
2419
|
meta: ObjectMeta,
|
|
2371
|
-
originObjects:
|
|
2372
|
-
overrides:
|
|
2420
|
+
originObjects: z89.array(ThemeOriginObject),
|
|
2421
|
+
overrides: z89.array(ThemeOverrideImportModelInput)
|
|
2373
2422
|
});
|
|
2374
|
-
var ThemeUpdateImportModel =
|
|
2375
|
-
themePersistentId:
|
|
2376
|
-
overrides:
|
|
2423
|
+
var ThemeUpdateImportModel = z89.object({
|
|
2424
|
+
themePersistentId: z89.string(),
|
|
2425
|
+
overrides: z89.array(ThemeOverrideImportModel)
|
|
2377
2426
|
});
|
|
2378
|
-
var ThemeUpdateImportModelInput =
|
|
2379
|
-
themePersistentId:
|
|
2380
|
-
overrides:
|
|
2427
|
+
var ThemeUpdateImportModelInput = z89.object({
|
|
2428
|
+
themePersistentId: z89.string(),
|
|
2429
|
+
overrides: z89.array(ThemeOverrideImportModelInput)
|
|
2381
2430
|
});
|
|
2382
2431
|
|
|
2383
2432
|
// src/dsm/import/tokens.ts
|
|
2384
|
-
import { z as
|
|
2385
|
-
var DesignTokenImportModelPart =
|
|
2386
|
-
collection:
|
|
2387
|
-
codeSyntax:
|
|
2433
|
+
import { z as z90 } from "zod";
|
|
2434
|
+
var DesignTokenImportModelPart = z90.object({
|
|
2435
|
+
collection: z90.string().optional(),
|
|
2436
|
+
codeSyntax: z90.record(z90.coerce.string()).optional()
|
|
2388
2437
|
});
|
|
2389
2438
|
var DesignTokenImportModelBase = ImportModelBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
2390
2439
|
origin: DesignTokenOrigin
|
|
@@ -2402,15 +2451,15 @@ function designTokenImportModelTypeFilter(type) {
|
|
|
2402
2451
|
}
|
|
2403
2452
|
|
|
2404
2453
|
// src/dsm/import/figma-frames.ts
|
|
2405
|
-
import { z as
|
|
2454
|
+
import { z as z91 } from "zod";
|
|
2406
2455
|
var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
|
|
2407
2456
|
image: FigmaPngRenderImportModel
|
|
2408
2457
|
});
|
|
2409
2458
|
var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
|
|
2410
|
-
children:
|
|
2459
|
+
children: z91.lazy(() => FigmaFileStructureNodeImportModel.array())
|
|
2411
2460
|
});
|
|
2412
|
-
var FigmaFileStructureImportModelPart =
|
|
2413
|
-
data:
|
|
2461
|
+
var FigmaFileStructureImportModelPart = z91.object({
|
|
2462
|
+
data: z91.object({
|
|
2414
2463
|
rootNode: FigmaFileStructureNodeImportModel,
|
|
2415
2464
|
assetsInFile: FigmaFileStructureStatistics
|
|
2416
2465
|
})
|
|
@@ -2421,7 +2470,7 @@ var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImp
|
|
|
2421
2470
|
var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
|
|
2422
2471
|
FigmaFileStructureImportModelPart.shape
|
|
2423
2472
|
).extend({
|
|
2424
|
-
fileVersionId:
|
|
2473
|
+
fileVersionId: z91.string()
|
|
2425
2474
|
});
|
|
2426
2475
|
function figmaFileStructureImportModelToMap(root) {
|
|
2427
2476
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -2435,30 +2484,30 @@ function recursiveFigmaFileStructureToMap2(node, map) {
|
|
|
2435
2484
|
}
|
|
2436
2485
|
|
|
2437
2486
|
// src/dsm/import/data-source.ts
|
|
2438
|
-
import { z as
|
|
2439
|
-
var DataSourceImportModel =
|
|
2440
|
-
id:
|
|
2441
|
-
fileName:
|
|
2442
|
-
thumbnailUrl:
|
|
2487
|
+
import { z as z92 } from "zod";
|
|
2488
|
+
var DataSourceImportModel = z92.object({
|
|
2489
|
+
id: z92.string(),
|
|
2490
|
+
fileName: z92.string().optional(),
|
|
2491
|
+
thumbnailUrl: z92.string().optional()
|
|
2443
2492
|
});
|
|
2444
2493
|
|
|
2445
2494
|
// src/dsm/import/support/import-model-collections.ts
|
|
2446
|
-
var ImportModelInputCollection =
|
|
2495
|
+
var ImportModelInputCollection = z93.object({
|
|
2447
2496
|
source: DataSourceImportModel,
|
|
2448
|
-
tokens:
|
|
2449
|
-
components:
|
|
2450
|
-
assets:
|
|
2451
|
-
themeUpdates:
|
|
2452
|
-
themes:
|
|
2497
|
+
tokens: z93.array(DesignTokenImportModelInput).default([]),
|
|
2498
|
+
components: z93.array(ComponentImportModelInput).default([]),
|
|
2499
|
+
assets: z93.array(AssetImportModelInput).default([]),
|
|
2500
|
+
themeUpdates: z93.array(ThemeUpdateImportModelInput).default([]),
|
|
2501
|
+
themes: z93.array(ThemeImportModelInput).default([]),
|
|
2453
2502
|
figmaFileStructure: FigmaFileStructureImportModelInput.optional()
|
|
2454
2503
|
});
|
|
2455
|
-
var ImportModelCollection =
|
|
2456
|
-
sources:
|
|
2457
|
-
tokens:
|
|
2458
|
-
components:
|
|
2459
|
-
themeUpdates:
|
|
2460
|
-
themes:
|
|
2461
|
-
figmaFileStructures:
|
|
2504
|
+
var ImportModelCollection = z93.object({
|
|
2505
|
+
sources: z93.array(DataSourceImportModel),
|
|
2506
|
+
tokens: z93.array(DesignTokenImportModel).default([]),
|
|
2507
|
+
components: z93.array(ComponentImportModel).default([]),
|
|
2508
|
+
themeUpdates: z93.array(ThemeUpdateImportModel).default([]),
|
|
2509
|
+
themes: z93.array(ThemeImportModel).default([]),
|
|
2510
|
+
figmaFileStructures: z93.array(FigmaFileStructureImportModel)
|
|
2462
2511
|
});
|
|
2463
2512
|
function addImportModelCollections(lhs, rhs) {
|
|
2464
2513
|
return {
|
|
@@ -2472,64 +2521,64 @@ function addImportModelCollections(lhs, rhs) {
|
|
|
2472
2521
|
}
|
|
2473
2522
|
|
|
2474
2523
|
// src/dsm/components/asset-rendering.ts
|
|
2475
|
-
var AssetRenderConfiguration =
|
|
2476
|
-
prefix:
|
|
2477
|
-
suffix:
|
|
2478
|
-
scale:
|
|
2524
|
+
var AssetRenderConfiguration = z94.object({
|
|
2525
|
+
prefix: z94.string().optional(),
|
|
2526
|
+
suffix: z94.string().optional(),
|
|
2527
|
+
scale: z94.number(),
|
|
2479
2528
|
format: FigmaRenderFormat
|
|
2480
2529
|
});
|
|
2481
|
-
var RenderedAssetFile =
|
|
2482
|
-
assetPersistentId:
|
|
2483
|
-
assetName:
|
|
2484
|
-
renderedImageFileName:
|
|
2485
|
-
renderedImageUrl:
|
|
2530
|
+
var RenderedAssetFile = z94.object({
|
|
2531
|
+
assetPersistentId: z94.string(),
|
|
2532
|
+
assetName: z94.string(),
|
|
2533
|
+
renderedImageFileName: z94.string(),
|
|
2534
|
+
renderedImageUrl: z94.string(),
|
|
2486
2535
|
settings: AssetRenderConfiguration
|
|
2487
2536
|
});
|
|
2488
2537
|
|
|
2489
2538
|
// src/dsm/documentation/block-definitions/aux.ts
|
|
2490
|
-
import { z as
|
|
2491
|
-
var PageBlockDefinitionAppearance =
|
|
2492
|
-
isBordered:
|
|
2493
|
-
hasBackground:
|
|
2494
|
-
isEditorPresentationDifferent:
|
|
2495
|
-
showBlockHeaderInEditor:
|
|
2539
|
+
import { z as z95 } from "zod";
|
|
2540
|
+
var PageBlockDefinitionAppearance = z95.object({
|
|
2541
|
+
isBordered: z95.boolean().optional(),
|
|
2542
|
+
hasBackground: z95.boolean().optional(),
|
|
2543
|
+
isEditorPresentationDifferent: z95.boolean().optional(),
|
|
2544
|
+
showBlockHeaderInEditor: z95.boolean().optional()
|
|
2496
2545
|
});
|
|
2497
2546
|
|
|
2498
2547
|
// src/dsm/documentation/block-definitions/definition.ts
|
|
2499
|
-
import { z as
|
|
2548
|
+
import { z as z98 } from "zod";
|
|
2500
2549
|
|
|
2501
2550
|
// src/dsm/documentation/block-definitions/item.ts
|
|
2502
|
-
import { z as
|
|
2551
|
+
import { z as z97 } from "zod";
|
|
2503
2552
|
|
|
2504
2553
|
// src/dsm/documentation/block-definitions/variant.ts
|
|
2505
|
-
import { z as
|
|
2506
|
-
var PageBlockDefinitionLayoutType =
|
|
2507
|
-
var PageBlockDefinitionLayoutGap =
|
|
2508
|
-
var PageBlockDefinitionLayoutAlign =
|
|
2509
|
-
var PageBlockDefinitionLayoutResizing =
|
|
2510
|
-
var PageBlockDefinitionLayoutBase =
|
|
2554
|
+
import { z as z96 } from "zod";
|
|
2555
|
+
var PageBlockDefinitionLayoutType = z96.enum(["Column", "Row"]);
|
|
2556
|
+
var PageBlockDefinitionLayoutGap = z96.enum(["Small", "Medium", "Large", "None"]);
|
|
2557
|
+
var PageBlockDefinitionLayoutAlign = z96.enum(["Start", "Center", "End"]);
|
|
2558
|
+
var PageBlockDefinitionLayoutResizing = z96.enum(["Fill", "Hug"]);
|
|
2559
|
+
var PageBlockDefinitionLayoutBase = z96.object({
|
|
2511
2560
|
type: PageBlockDefinitionLayoutType,
|
|
2512
2561
|
gap: PageBlockDefinitionLayoutGap.optional(),
|
|
2513
2562
|
columnAlign: PageBlockDefinitionLayoutAlign.optional(),
|
|
2514
2563
|
columnResizing: PageBlockDefinitionLayoutResizing.optional()
|
|
2515
2564
|
});
|
|
2516
2565
|
var PageBlockDefinitionLayout = PageBlockDefinitionLayoutBase.extend({
|
|
2517
|
-
children:
|
|
2518
|
-
});
|
|
2519
|
-
var PageBlockDefinitionVariant =
|
|
2520
|
-
id:
|
|
2521
|
-
name:
|
|
2522
|
-
image:
|
|
2523
|
-
description:
|
|
2524
|
-
documentationLink:
|
|
2566
|
+
children: z96.lazy(() => z96.array(PageBlockDefinitionLayout.or(z96.string())))
|
|
2567
|
+
});
|
|
2568
|
+
var PageBlockDefinitionVariant = z96.object({
|
|
2569
|
+
id: z96.string(),
|
|
2570
|
+
name: z96.string(),
|
|
2571
|
+
image: z96.string().optional(),
|
|
2572
|
+
description: z96.string().optional(),
|
|
2573
|
+
documentationLink: z96.string().optional(),
|
|
2525
2574
|
layout: PageBlockDefinitionLayout,
|
|
2526
|
-
maxColumns:
|
|
2527
|
-
defaultColumns:
|
|
2575
|
+
maxColumns: z96.number().optional(),
|
|
2576
|
+
defaultColumns: z96.number().optional(),
|
|
2528
2577
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
2529
2578
|
});
|
|
2530
2579
|
|
|
2531
2580
|
// src/dsm/documentation/block-definitions/item.ts
|
|
2532
|
-
var PageBlockDefinitionPropertyType =
|
|
2581
|
+
var PageBlockDefinitionPropertyType = z97.enum([
|
|
2533
2582
|
"RichText",
|
|
2534
2583
|
"MultiRichText",
|
|
2535
2584
|
"Text",
|
|
@@ -2557,7 +2606,7 @@ var PageBlockDefinitionPropertyType = z96.enum([
|
|
|
2557
2606
|
"Color",
|
|
2558
2607
|
"FigmaComponent"
|
|
2559
2608
|
]);
|
|
2560
|
-
var PageBlockDefinitionRichTextPropertyStyle =
|
|
2609
|
+
var PageBlockDefinitionRichTextPropertyStyle = z97.enum([
|
|
2561
2610
|
"Title1",
|
|
2562
2611
|
"Title2",
|
|
2563
2612
|
"Title3",
|
|
@@ -2567,8 +2616,8 @@ var PageBlockDefinitionRichTextPropertyStyle = z96.enum([
|
|
|
2567
2616
|
"Callout",
|
|
2568
2617
|
"Default"
|
|
2569
2618
|
]);
|
|
2570
|
-
var PageBlockDefinitionMultiRichTextPropertyStyle =
|
|
2571
|
-
var PageBlockDefinitionTextPropertyStyle =
|
|
2619
|
+
var PageBlockDefinitionMultiRichTextPropertyStyle = z97.enum(["OL", "UL", "Default"]);
|
|
2620
|
+
var PageBlockDefinitionTextPropertyStyle = z97.enum([
|
|
2572
2621
|
"Title1",
|
|
2573
2622
|
"Title2",
|
|
2574
2623
|
"Title3",
|
|
@@ -2582,15 +2631,15 @@ var PageBlockDefinitionTextPropertyStyle = z96.enum([
|
|
|
2582
2631
|
"SmallSemibold",
|
|
2583
2632
|
"Custom"
|
|
2584
2633
|
]);
|
|
2585
|
-
var PageBlockDefinitionTextPropertyColor =
|
|
2586
|
-
var PageBlockDefinitionBooleanPropertyStyle =
|
|
2587
|
-
var PageBlockDefinitionSingleSelectPropertyStyle =
|
|
2634
|
+
var PageBlockDefinitionTextPropertyColor = z97.enum(["Neutral", "NeutralFaded"]);
|
|
2635
|
+
var PageBlockDefinitionBooleanPropertyStyle = z97.enum(["SegmentedControl", "ToggleButton", "Checkbox"]);
|
|
2636
|
+
var PageBlockDefinitionSingleSelectPropertyStyle = z97.enum([
|
|
2588
2637
|
"SegmentedControl",
|
|
2589
2638
|
"ToggleButton",
|
|
2590
2639
|
"Select",
|
|
2591
2640
|
"Checkbox"
|
|
2592
2641
|
]);
|
|
2593
|
-
var PageBlockDefinitionSingleSelectPropertyColor =
|
|
2642
|
+
var PageBlockDefinitionSingleSelectPropertyColor = z97.enum([
|
|
2594
2643
|
"Green",
|
|
2595
2644
|
"Red",
|
|
2596
2645
|
"Yellow",
|
|
@@ -2605,78 +2654,78 @@ var PageBlockDefinitionSingleSelectPropertyColor = z96.enum([
|
|
|
2605
2654
|
"Cyan",
|
|
2606
2655
|
"Fuchsia"
|
|
2607
2656
|
]);
|
|
2608
|
-
var IconSet =
|
|
2657
|
+
var IconSet = z97.enum([
|
|
2609
2658
|
"CheckCircle",
|
|
2610
2659
|
"CrossCircle",
|
|
2611
2660
|
"Alert"
|
|
2612
2661
|
]);
|
|
2613
|
-
var PageBlockDefinitionMultiSelectPropertyStyle =
|
|
2614
|
-
var PageBlockDefinitionImageAspectRatio =
|
|
2615
|
-
var PageBlockDefinitionImageWidth =
|
|
2616
|
-
var PageBlockDefinitionSelectChoice =
|
|
2617
|
-
value:
|
|
2618
|
-
name:
|
|
2662
|
+
var PageBlockDefinitionMultiSelectPropertyStyle = z97.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
2663
|
+
var PageBlockDefinitionImageAspectRatio = z97.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
|
|
2664
|
+
var PageBlockDefinitionImageWidth = z97.enum(["Full", "Icon", "Small", "Medium", "Large", "Poster"]);
|
|
2665
|
+
var PageBlockDefinitionSelectChoice = z97.object({
|
|
2666
|
+
value: z97.string(),
|
|
2667
|
+
name: z97.string(),
|
|
2619
2668
|
icon: IconSet.optional(),
|
|
2620
|
-
customIconUrl:
|
|
2669
|
+
customIconUrl: z97.string().optional(),
|
|
2621
2670
|
color: PageBlockDefinitionSingleSelectPropertyColor.optional()
|
|
2622
2671
|
});
|
|
2623
|
-
var PageBlockDefinitionUntypedPropertyOptions =
|
|
2624
|
-
var PageBlockDefinitionRichTextOptions =
|
|
2672
|
+
var PageBlockDefinitionUntypedPropertyOptions = z97.record(z97.any());
|
|
2673
|
+
var PageBlockDefinitionRichTextOptions = z97.object({
|
|
2625
2674
|
richTextStyle: PageBlockDefinitionRichTextPropertyStyle.optional()
|
|
2626
2675
|
});
|
|
2627
|
-
var PageBlockDefinitionMutiRichTextOptions =
|
|
2676
|
+
var PageBlockDefinitionMutiRichTextOptions = z97.object({
|
|
2628
2677
|
multiRichTextStyle: PageBlockDefinitionMultiRichTextPropertyStyle.optional()
|
|
2629
2678
|
});
|
|
2630
|
-
var PageBlockDefinitionTextOptions =
|
|
2631
|
-
placeholder:
|
|
2632
|
-
defaultValue:
|
|
2679
|
+
var PageBlockDefinitionTextOptions = z97.object({
|
|
2680
|
+
placeholder: z97.string().optional(),
|
|
2681
|
+
defaultValue: z97.string().optional(),
|
|
2633
2682
|
textStyle: PageBlockDefinitionTextPropertyStyle.optional(),
|
|
2634
2683
|
color: PageBlockDefinitionTextPropertyColor.optional(),
|
|
2635
|
-
allowLineBreaks:
|
|
2684
|
+
allowLineBreaks: z97.boolean().optional()
|
|
2636
2685
|
});
|
|
2637
|
-
var PageBlockDefinitionSelectOptions =
|
|
2686
|
+
var PageBlockDefinitionSelectOptions = z97.object({
|
|
2638
2687
|
singleSelectStyle: PageBlockDefinitionSingleSelectPropertyStyle.optional(),
|
|
2639
|
-
defaultChoice:
|
|
2640
|
-
choices:
|
|
2688
|
+
defaultChoice: z97.string(),
|
|
2689
|
+
choices: z97.array(PageBlockDefinitionSelectChoice)
|
|
2641
2690
|
});
|
|
2642
|
-
var PageBlockDefinitionImageOptions =
|
|
2691
|
+
var PageBlockDefinitionImageOptions = z97.object({
|
|
2643
2692
|
width: PageBlockDefinitionImageWidth.optional(),
|
|
2644
2693
|
aspectRatio: PageBlockDefinitionImageAspectRatio.optional(),
|
|
2645
|
-
allowCaption:
|
|
2646
|
-
recommendation:
|
|
2694
|
+
allowCaption: z97.boolean().optional(),
|
|
2695
|
+
recommendation: z97.string().optional()
|
|
2647
2696
|
});
|
|
2648
|
-
var PageBlockDefinitionBooleanOptions =
|
|
2649
|
-
defaultvalue:
|
|
2697
|
+
var PageBlockDefinitionBooleanOptions = z97.object({
|
|
2698
|
+
defaultvalue: z97.boolean().optional(),
|
|
2650
2699
|
booleanStyle: PageBlockDefinitionBooleanPropertyStyle.optional()
|
|
2651
2700
|
});
|
|
2652
|
-
var PageBlockDefinitionNumberOptions =
|
|
2653
|
-
defaultValue:
|
|
2654
|
-
min:
|
|
2655
|
-
max:
|
|
2656
|
-
step:
|
|
2657
|
-
placeholder:
|
|
2701
|
+
var PageBlockDefinitionNumberOptions = z97.object({
|
|
2702
|
+
defaultValue: z97.number(),
|
|
2703
|
+
min: z97.number().optional(),
|
|
2704
|
+
max: z97.number().optional(),
|
|
2705
|
+
step: z97.number().optional(),
|
|
2706
|
+
placeholder: z97.string().optional()
|
|
2658
2707
|
});
|
|
2659
|
-
var PageBlockDefinitionComponentOptions =
|
|
2660
|
-
renderLayoutAs:
|
|
2661
|
-
allowPropertySelection:
|
|
2708
|
+
var PageBlockDefinitionComponentOptions = z97.object({
|
|
2709
|
+
renderLayoutAs: z97.enum(["List", "Table"]).optional(),
|
|
2710
|
+
allowPropertySelection: z97.boolean().optional()
|
|
2662
2711
|
});
|
|
2663
|
-
var PageBlockDefinitionProperty =
|
|
2664
|
-
id:
|
|
2665
|
-
name:
|
|
2712
|
+
var PageBlockDefinitionProperty = z97.object({
|
|
2713
|
+
id: z97.string(),
|
|
2714
|
+
name: z97.string(),
|
|
2666
2715
|
type: PageBlockDefinitionPropertyType,
|
|
2667
|
-
description:
|
|
2716
|
+
description: z97.string().optional(),
|
|
2668
2717
|
options: PageBlockDefinitionUntypedPropertyOptions.optional(),
|
|
2669
|
-
variantOptions:
|
|
2718
|
+
variantOptions: z97.record(PageBlockDefinitionUntypedPropertyOptions).optional()
|
|
2670
2719
|
});
|
|
2671
|
-
var PageBlockDefinitionItem =
|
|
2672
|
-
properties:
|
|
2720
|
+
var PageBlockDefinitionItem = z97.object({
|
|
2721
|
+
properties: z97.array(PageBlockDefinitionProperty),
|
|
2673
2722
|
appearance: PageBlockDefinitionAppearance.optional(),
|
|
2674
|
-
variants:
|
|
2675
|
-
defaultVariantKey:
|
|
2723
|
+
variants: z97.array(PageBlockDefinitionVariant),
|
|
2724
|
+
defaultVariantKey: z97.string()
|
|
2676
2725
|
});
|
|
2677
2726
|
|
|
2678
2727
|
// src/dsm/documentation/block-definitions/definition.ts
|
|
2679
|
-
var PageBlockCategory =
|
|
2728
|
+
var PageBlockCategory = z98.enum([
|
|
2680
2729
|
"Text",
|
|
2681
2730
|
"Layout",
|
|
2682
2731
|
"Media",
|
|
@@ -2690,149 +2739,149 @@ var PageBlockCategory = z97.enum([
|
|
|
2690
2739
|
"Data",
|
|
2691
2740
|
"Other"
|
|
2692
2741
|
]);
|
|
2693
|
-
var PageBlockBehaviorDataType =
|
|
2694
|
-
var PageBlockBehaviorSelectionType =
|
|
2695
|
-
var PageBlockDefinitionBehavior =
|
|
2742
|
+
var PageBlockBehaviorDataType = z98.enum(["Item", "Token", "Asset", "Component", "FigmaNode", "FigmaComponent"]);
|
|
2743
|
+
var PageBlockBehaviorSelectionType = z98.enum(["Entity", "Group", "EntityAndGroup"]);
|
|
2744
|
+
var PageBlockDefinitionBehavior = z98.object({
|
|
2696
2745
|
dataType: PageBlockBehaviorDataType,
|
|
2697
|
-
items:
|
|
2698
|
-
numberOfItems:
|
|
2699
|
-
allowLinks:
|
|
2700
|
-
newItemLabel:
|
|
2746
|
+
items: z98.object({
|
|
2747
|
+
numberOfItems: z98.number(),
|
|
2748
|
+
allowLinks: z98.boolean(),
|
|
2749
|
+
newItemLabel: z98.string().optional()
|
|
2701
2750
|
}).optional(),
|
|
2702
|
-
entities:
|
|
2751
|
+
entities: z98.object({
|
|
2703
2752
|
selectionType: PageBlockBehaviorSelectionType,
|
|
2704
|
-
maxSelected:
|
|
2753
|
+
maxSelected: z98.number()
|
|
2705
2754
|
}).optional()
|
|
2706
2755
|
});
|
|
2707
|
-
var PageBlockDefinitionOnboarding =
|
|
2708
|
-
helpText:
|
|
2709
|
-
documentationLink:
|
|
2756
|
+
var PageBlockDefinitionOnboarding = z98.object({
|
|
2757
|
+
helpText: z98.string(),
|
|
2758
|
+
documentationLink: z98.string().optional()
|
|
2710
2759
|
});
|
|
2711
|
-
var PageBlockDefinition =
|
|
2712
|
-
id:
|
|
2713
|
-
name:
|
|
2714
|
-
description:
|
|
2760
|
+
var PageBlockDefinition = z98.object({
|
|
2761
|
+
id: z98.string(),
|
|
2762
|
+
name: z98.string(),
|
|
2763
|
+
description: z98.string(),
|
|
2715
2764
|
category: PageBlockCategory,
|
|
2716
|
-
icon:
|
|
2717
|
-
documentationLink:
|
|
2718
|
-
searchKeywords:
|
|
2765
|
+
icon: z98.string().optional(),
|
|
2766
|
+
documentationLink: z98.string().optional(),
|
|
2767
|
+
searchKeywords: z98.array(z98.string()).optional(),
|
|
2719
2768
|
item: PageBlockDefinitionItem,
|
|
2720
2769
|
behavior: PageBlockDefinitionBehavior,
|
|
2721
|
-
editorOptions:
|
|
2770
|
+
editorOptions: z98.object({
|
|
2722
2771
|
onboarding: PageBlockDefinitionOnboarding.optional(),
|
|
2723
|
-
newItemLabel:
|
|
2772
|
+
newItemLabel: z98.string().optional()
|
|
2724
2773
|
}),
|
|
2725
2774
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
2726
2775
|
});
|
|
2727
2776
|
|
|
2728
2777
|
// src/dsm/documentation/group.ts
|
|
2729
|
-
import { z as
|
|
2730
|
-
var DocumentationPageGroup =
|
|
2731
|
-
type:
|
|
2732
|
-
childType:
|
|
2733
|
-
id:
|
|
2734
|
-
persistentId:
|
|
2735
|
-
shortPersistentId:
|
|
2736
|
-
designSystemVersionId:
|
|
2737
|
-
parentPersistentId:
|
|
2738
|
-
sortOrder:
|
|
2739
|
-
title:
|
|
2740
|
-
slug:
|
|
2741
|
-
userSlug:
|
|
2742
|
-
createdAt:
|
|
2743
|
-
updatedAt:
|
|
2778
|
+
import { z as z99 } from "zod";
|
|
2779
|
+
var DocumentationPageGroup = z99.object({
|
|
2780
|
+
type: z99.literal("ElementGroup"),
|
|
2781
|
+
childType: z99.literal("DocumentationPage"),
|
|
2782
|
+
id: z99.string(),
|
|
2783
|
+
persistentId: z99.string(),
|
|
2784
|
+
shortPersistentId: z99.string(),
|
|
2785
|
+
designSystemVersionId: z99.string(),
|
|
2786
|
+
parentPersistentId: z99.string().nullish(),
|
|
2787
|
+
sortOrder: z99.number(),
|
|
2788
|
+
title: z99.string(),
|
|
2789
|
+
slug: z99.string(),
|
|
2790
|
+
userSlug: z99.string().nullish(),
|
|
2791
|
+
createdAt: z99.coerce.date(),
|
|
2792
|
+
updatedAt: z99.coerce.date()
|
|
2744
2793
|
});
|
|
2745
2794
|
|
|
2746
2795
|
// src/dsm/documentation/link-preview.ts
|
|
2747
|
-
import { z as
|
|
2748
|
-
var DocumentationLinkPreview =
|
|
2749
|
-
title:
|
|
2750
|
-
description:
|
|
2796
|
+
import { z as z100 } from "zod";
|
|
2797
|
+
var DocumentationLinkPreview = z100.object({
|
|
2798
|
+
title: z100.string().optional(),
|
|
2799
|
+
description: z100.string().optional(),
|
|
2751
2800
|
thumbnail: PageBlockImageReference.optional()
|
|
2752
2801
|
});
|
|
2753
2802
|
|
|
2754
2803
|
// src/dsm/documentation/page-anchor.ts
|
|
2755
|
-
import { z as z100 } from "zod";
|
|
2756
|
-
var DocumentationPageAnchor = z100.object({
|
|
2757
|
-
blockId: z100.string(),
|
|
2758
|
-
level: z100.number(),
|
|
2759
|
-
text: z100.string()
|
|
2760
|
-
});
|
|
2761
|
-
|
|
2762
|
-
// src/dsm/documentation/page-content-backup.ts
|
|
2763
2804
|
import { z as z101 } from "zod";
|
|
2764
|
-
var
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
updatedAt: z101.coerce.date(),
|
|
2769
|
-
documentationPageId: z101.string(),
|
|
2770
|
-
documentationPageName: z101.string(),
|
|
2771
|
-
storagePath: z101.string()
|
|
2805
|
+
var DocumentationPageAnchor = z101.object({
|
|
2806
|
+
blockId: z101.string(),
|
|
2807
|
+
level: z101.number(),
|
|
2808
|
+
text: z101.string()
|
|
2772
2809
|
});
|
|
2773
2810
|
|
|
2774
|
-
// src/dsm/documentation/page-content.ts
|
|
2811
|
+
// src/dsm/documentation/page-content-backup.ts
|
|
2775
2812
|
import { z as z102 } from "zod";
|
|
2776
|
-
var
|
|
2777
|
-
PageBlockEditorModelV2,
|
|
2778
|
-
PageSectionEditorModelV2
|
|
2779
|
-
]);
|
|
2780
|
-
var DocumentationPageContentData = z102.object({
|
|
2781
|
-
items: z102.array(DocumentationPageContentItem)
|
|
2782
|
-
});
|
|
2783
|
-
var DocumentationPageContent = z102.object({
|
|
2813
|
+
var DocumentationPageContentBackup = z102.object({
|
|
2784
2814
|
id: z102.string(),
|
|
2785
2815
|
designSystemVersionId: z102.string(),
|
|
2786
2816
|
createdAt: z102.coerce.date(),
|
|
2787
2817
|
updatedAt: z102.coerce.date(),
|
|
2788
2818
|
documentationPageId: z102.string(),
|
|
2789
|
-
|
|
2819
|
+
documentationPageName: z102.string(),
|
|
2820
|
+
storagePath: z102.string()
|
|
2790
2821
|
});
|
|
2791
2822
|
|
|
2792
|
-
// src/dsm/documentation/page.ts
|
|
2823
|
+
// src/dsm/documentation/page-content.ts
|
|
2793
2824
|
import { z as z103 } from "zod";
|
|
2794
|
-
var
|
|
2795
|
-
|
|
2825
|
+
var DocumentationPageContentItem = z103.discriminatedUnion("type", [
|
|
2826
|
+
PageBlockEditorModelV2,
|
|
2827
|
+
PageSectionEditorModelV2
|
|
2828
|
+
]);
|
|
2829
|
+
var DocumentationPageContentData = z103.object({
|
|
2830
|
+
items: z103.array(DocumentationPageContentItem)
|
|
2831
|
+
});
|
|
2832
|
+
var DocumentationPageContent = z103.object({
|
|
2796
2833
|
id: z103.string(),
|
|
2797
|
-
persistentId: z103.string(),
|
|
2798
|
-
shortPersistentId: z103.string(),
|
|
2799
2834
|
designSystemVersionId: z103.string(),
|
|
2800
|
-
parentPersistentId: z103.string().nullish(),
|
|
2801
|
-
sortOrder: z103.number(),
|
|
2802
|
-
title: z103.string(),
|
|
2803
|
-
slug: z103.string(),
|
|
2804
|
-
userSlug: z103.string().nullish(),
|
|
2805
2835
|
createdAt: z103.coerce.date(),
|
|
2806
|
-
updatedAt: z103.coerce.date()
|
|
2836
|
+
updatedAt: z103.coerce.date(),
|
|
2837
|
+
documentationPageId: z103.string(),
|
|
2838
|
+
data: DocumentationPageContentData
|
|
2807
2839
|
});
|
|
2808
2840
|
|
|
2809
|
-
// src/dsm/documentation/
|
|
2841
|
+
// src/dsm/documentation/page.ts
|
|
2810
2842
|
import { z as z104 } from "zod";
|
|
2811
|
-
var
|
|
2843
|
+
var DocumentationPage = z104.object({
|
|
2844
|
+
type: z104.literal("DocumentationPage"),
|
|
2812
2845
|
id: z104.string(),
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
roomId: z104.string(),
|
|
2816
|
-
createdAt: z104.coerce.date(),
|
|
2817
|
-
editedAt: z104.coerce.date().optional(),
|
|
2818
|
-
deletedAt: z104.coerce.date().optional(),
|
|
2819
|
-
body: z104.string()
|
|
2820
|
-
});
|
|
2821
|
-
var DocumentationCommentThread = z104.object({
|
|
2822
|
-
id: z104.string(),
|
|
2823
|
-
roomId: z104.string(),
|
|
2824
|
-
pagePersistentId: z104.string(),
|
|
2825
|
-
brandId: z104.string(),
|
|
2846
|
+
persistentId: z104.string(),
|
|
2847
|
+
shortPersistentId: z104.string(),
|
|
2826
2848
|
designSystemVersionId: z104.string(),
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2849
|
+
parentPersistentId: z104.string().nullish(),
|
|
2850
|
+
sortOrder: z104.number(),
|
|
2851
|
+
title: z104.string(),
|
|
2852
|
+
slug: z104.string(),
|
|
2853
|
+
userSlug: z104.string().nullish(),
|
|
2830
2854
|
createdAt: z104.coerce.date(),
|
|
2831
2855
|
updatedAt: z104.coerce.date()
|
|
2832
2856
|
});
|
|
2833
2857
|
|
|
2858
|
+
// src/dsm/documentation/thread.ts
|
|
2859
|
+
import { z as z105 } from "zod";
|
|
2860
|
+
var DocumentationComment = z105.object({
|
|
2861
|
+
id: z105.string(),
|
|
2862
|
+
authorId: z105.string(),
|
|
2863
|
+
threadId: z105.string(),
|
|
2864
|
+
roomId: z105.string(),
|
|
2865
|
+
createdAt: z105.coerce.date(),
|
|
2866
|
+
editedAt: z105.coerce.date().optional(),
|
|
2867
|
+
deletedAt: z105.coerce.date().optional(),
|
|
2868
|
+
body: z105.string()
|
|
2869
|
+
});
|
|
2870
|
+
var DocumentationCommentThread = z105.object({
|
|
2871
|
+
id: z105.string(),
|
|
2872
|
+
roomId: z105.string(),
|
|
2873
|
+
pagePersistentId: z105.string(),
|
|
2874
|
+
brandId: z105.string(),
|
|
2875
|
+
designSystemVersionId: z105.string(),
|
|
2876
|
+
designSystemId: z105.string(),
|
|
2877
|
+
blockId: z105.string().optional(),
|
|
2878
|
+
resolved: z105.boolean(),
|
|
2879
|
+
createdAt: z105.coerce.date(),
|
|
2880
|
+
updatedAt: z105.coerce.date()
|
|
2881
|
+
});
|
|
2882
|
+
|
|
2834
2883
|
// src/dsm/element-snapshots/base.ts
|
|
2835
|
-
import { z as
|
|
2884
|
+
import { z as z107 } from "zod";
|
|
2836
2885
|
|
|
2837
2886
|
// src/utils/errors.ts
|
|
2838
2887
|
var SupernovaException = class _SupernovaException extends Error {
|
|
@@ -2987,26 +3036,26 @@ function uniqueBy(items, prop) {
|
|
|
2987
3036
|
}
|
|
2988
3037
|
|
|
2989
3038
|
// src/utils/content-loader-instruction.ts
|
|
2990
|
-
import { z as
|
|
2991
|
-
var ContentLoadInstruction =
|
|
2992
|
-
from:
|
|
2993
|
-
to:
|
|
2994
|
-
authorizationHeaderKvsId:
|
|
2995
|
-
timeout:
|
|
2996
|
-
});
|
|
2997
|
-
var ContentLoaderPayload =
|
|
2998
|
-
type:
|
|
3039
|
+
import { z as z106 } from "zod";
|
|
3040
|
+
var ContentLoadInstruction = z106.object({
|
|
3041
|
+
from: z106.string(),
|
|
3042
|
+
to: z106.string(),
|
|
3043
|
+
authorizationHeaderKvsId: z106.string().optional(),
|
|
3044
|
+
timeout: z106.number().optional()
|
|
3045
|
+
});
|
|
3046
|
+
var ContentLoaderPayload = z106.object({
|
|
3047
|
+
type: z106.literal("Single"),
|
|
2999
3048
|
instruction: ContentLoadInstruction
|
|
3000
3049
|
}).or(
|
|
3001
|
-
|
|
3002
|
-
type:
|
|
3003
|
-
loadingChunkSize:
|
|
3004
|
-
instructions:
|
|
3050
|
+
z106.object({
|
|
3051
|
+
type: z106.literal("Multiple"),
|
|
3052
|
+
loadingChunkSize: z106.number().optional(),
|
|
3053
|
+
instructions: z106.array(ContentLoadInstruction)
|
|
3005
3054
|
})
|
|
3006
3055
|
).or(
|
|
3007
|
-
|
|
3008
|
-
type:
|
|
3009
|
-
location:
|
|
3056
|
+
z106.object({
|
|
3057
|
+
type: z106.literal("S3"),
|
|
3058
|
+
location: z106.string()
|
|
3010
3059
|
})
|
|
3011
3060
|
);
|
|
3012
3061
|
|
|
@@ -3706,15 +3755,15 @@ function isSlugReserved(slug) {
|
|
|
3706
3755
|
var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
3707
3756
|
|
|
3708
3757
|
// src/dsm/element-snapshots/base.ts
|
|
3709
|
-
var DesignElementSnapshotReason =
|
|
3710
|
-
var DesignElementSnapshotBase =
|
|
3711
|
-
id:
|
|
3712
|
-
persistentId:
|
|
3713
|
-
designSystemVersionId:
|
|
3714
|
-
createdAt:
|
|
3715
|
-
updatedAt:
|
|
3758
|
+
var DesignElementSnapshotReason = z107.enum(["Publish", "Deletion"]);
|
|
3759
|
+
var DesignElementSnapshotBase = z107.object({
|
|
3760
|
+
id: z107.string(),
|
|
3761
|
+
persistentId: z107.string(),
|
|
3762
|
+
designSystemVersionId: z107.string(),
|
|
3763
|
+
createdAt: z107.coerce.date(),
|
|
3764
|
+
updatedAt: z107.coerce.date(),
|
|
3716
3765
|
reason: DesignElementSnapshotReason,
|
|
3717
|
-
createdByUserId:
|
|
3766
|
+
createdByUserId: z107.string()
|
|
3718
3767
|
});
|
|
3719
3768
|
function pickLatestSnapshots(snapshots, getSnapshotElementId) {
|
|
3720
3769
|
const groupedSnapshots = groupBy(snapshots, getSnapshotElementId);
|
|
@@ -3725,11 +3774,11 @@ function pickLatestSnapshots(snapshots, getSnapshotElementId) {
|
|
|
3725
3774
|
}
|
|
3726
3775
|
|
|
3727
3776
|
// src/dsm/element-snapshots/documentation-page-snapshot.ts
|
|
3728
|
-
import { z as
|
|
3777
|
+
import { z as z108 } from "zod";
|
|
3729
3778
|
var DocumentationPageSnapshot = DesignElementSnapshotBase.extend({
|
|
3730
3779
|
page: DocumentationPageV2,
|
|
3731
|
-
pageContentHash:
|
|
3732
|
-
pageContentStorageKey:
|
|
3780
|
+
pageContentHash: z108.string(),
|
|
3781
|
+
pageContentStorageKey: z108.string()
|
|
3733
3782
|
});
|
|
3734
3783
|
function pickLatestPageSnapshots(snapshots) {
|
|
3735
3784
|
return pickLatestSnapshots(snapshots, (s) => s.page.id);
|
|
@@ -3744,182 +3793,182 @@ function pickLatestGroupSnapshots(snapshots) {
|
|
|
3744
3793
|
}
|
|
3745
3794
|
|
|
3746
3795
|
// src/dsm/views/column.ts
|
|
3747
|
-
import { z as
|
|
3748
|
-
var ElementViewBaseColumnType =
|
|
3749
|
-
var ElementViewColumnType =
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3796
|
+
import { z as z109 } from "zod";
|
|
3797
|
+
var ElementViewBaseColumnType = z109.enum(["Name", "Description", "Value", "UpdatedAt"]);
|
|
3798
|
+
var ElementViewColumnType = z109.union([
|
|
3799
|
+
z109.literal("BaseProperty"),
|
|
3800
|
+
z109.literal("PropertyDefinition"),
|
|
3801
|
+
z109.literal("Theme")
|
|
3753
3802
|
]);
|
|
3754
|
-
var ElementViewColumnSharedAttributes =
|
|
3755
|
-
id:
|
|
3756
|
-
persistentId:
|
|
3757
|
-
elementDataViewId:
|
|
3758
|
-
sortPosition:
|
|
3759
|
-
width:
|
|
3803
|
+
var ElementViewColumnSharedAttributes = z109.object({
|
|
3804
|
+
id: z109.string(),
|
|
3805
|
+
persistentId: z109.string(),
|
|
3806
|
+
elementDataViewId: z109.string(),
|
|
3807
|
+
sortPosition: z109.number(),
|
|
3808
|
+
width: z109.number()
|
|
3760
3809
|
});
|
|
3761
3810
|
var ElementViewBasePropertyColumn = ElementViewColumnSharedAttributes.extend({
|
|
3762
|
-
type:
|
|
3811
|
+
type: z109.literal("BaseProperty"),
|
|
3763
3812
|
basePropertyType: ElementViewBaseColumnType
|
|
3764
3813
|
});
|
|
3765
3814
|
var ElementViewPropertyDefinitionColumn = ElementViewColumnSharedAttributes.extend({
|
|
3766
|
-
type:
|
|
3767
|
-
propertyDefinitionId:
|
|
3815
|
+
type: z109.literal("PropertyDefinition"),
|
|
3816
|
+
propertyDefinitionId: z109.string()
|
|
3768
3817
|
});
|
|
3769
3818
|
var ElementViewThemeColumn = ElementViewColumnSharedAttributes.extend({
|
|
3770
|
-
type:
|
|
3771
|
-
themeId:
|
|
3819
|
+
type: z109.literal("Theme"),
|
|
3820
|
+
themeId: z109.string()
|
|
3772
3821
|
});
|
|
3773
|
-
var ElementViewColumn =
|
|
3822
|
+
var ElementViewColumn = z109.discriminatedUnion("type", [
|
|
3774
3823
|
ElementViewBasePropertyColumn,
|
|
3775
3824
|
ElementViewPropertyDefinitionColumn,
|
|
3776
3825
|
ElementViewThemeColumn
|
|
3777
3826
|
]);
|
|
3778
3827
|
|
|
3779
3828
|
// src/dsm/views/view.ts
|
|
3780
|
-
import { z as z109 } from "zod";
|
|
3781
|
-
var ElementView = z109.object({
|
|
3782
|
-
id: z109.string(),
|
|
3783
|
-
persistentId: z109.string(),
|
|
3784
|
-
designSystemVersionId: z109.string(),
|
|
3785
|
-
name: z109.string(),
|
|
3786
|
-
description: z109.string(),
|
|
3787
|
-
targetElementType: ElementPropertyTargetType,
|
|
3788
|
-
isDefault: z109.boolean()
|
|
3789
|
-
});
|
|
3790
|
-
|
|
3791
|
-
// src/dsm/brand.ts
|
|
3792
3829
|
import { z as z110 } from "zod";
|
|
3793
|
-
var
|
|
3830
|
+
var ElementView = z110.object({
|
|
3794
3831
|
id: z110.string(),
|
|
3795
|
-
designSystemVersionId: z110.string(),
|
|
3796
3832
|
persistentId: z110.string(),
|
|
3833
|
+
designSystemVersionId: z110.string(),
|
|
3797
3834
|
name: z110.string(),
|
|
3798
|
-
description: z110.string()
|
|
3835
|
+
description: z110.string(),
|
|
3836
|
+
targetElementType: ElementPropertyTargetType,
|
|
3837
|
+
isDefault: z110.boolean()
|
|
3838
|
+
});
|
|
3839
|
+
|
|
3840
|
+
// src/dsm/brand.ts
|
|
3841
|
+
import { z as z111 } from "zod";
|
|
3842
|
+
var Brand = z111.object({
|
|
3843
|
+
id: z111.string(),
|
|
3844
|
+
designSystemVersionId: z111.string(),
|
|
3845
|
+
persistentId: z111.string(),
|
|
3846
|
+
name: z111.string(),
|
|
3847
|
+
description: z111.string()
|
|
3799
3848
|
});
|
|
3800
3849
|
|
|
3801
3850
|
// src/dsm/design-system-update.ts
|
|
3802
|
-
import { z as
|
|
3851
|
+
import { z as z116 } from "zod";
|
|
3803
3852
|
|
|
3804
3853
|
// src/dsm/design-system.ts
|
|
3805
|
-
import { z as
|
|
3854
|
+
import { z as z115 } from "zod";
|
|
3806
3855
|
|
|
3807
3856
|
// src/workspace/workspace.ts
|
|
3808
3857
|
import IPCIDR from "ip-cidr";
|
|
3809
|
-
import { z as
|
|
3858
|
+
import { z as z114 } from "zod";
|
|
3810
3859
|
|
|
3811
3860
|
// src/workspace/npm-registry-settings.ts
|
|
3812
|
-
import { z as
|
|
3813
|
-
var NpmRegistryAuthType =
|
|
3814
|
-
var NpmRegistryType =
|
|
3815
|
-
var NpmRegistryBasicAuthConfig =
|
|
3816
|
-
authType:
|
|
3817
|
-
username:
|
|
3818
|
-
password:
|
|
3819
|
-
});
|
|
3820
|
-
var NpmRegistryBearerAuthConfig =
|
|
3821
|
-
authType:
|
|
3822
|
-
accessToken:
|
|
3823
|
-
});
|
|
3824
|
-
var NpmRegistryNoAuthConfig =
|
|
3825
|
-
authType:
|
|
3826
|
-
});
|
|
3827
|
-
var NpmRegistrCustomAuthConfig =
|
|
3828
|
-
authType:
|
|
3829
|
-
authHeaderName:
|
|
3830
|
-
authHeaderValue:
|
|
3831
|
-
});
|
|
3832
|
-
var NpmRegistryAuthConfig =
|
|
3861
|
+
import { z as z112 } from "zod";
|
|
3862
|
+
var NpmRegistryAuthType = z112.enum(["Basic", "Bearer", "None", "Custom"]);
|
|
3863
|
+
var NpmRegistryType = z112.enum(["NPMJS", "GitHub", "AzureDevOps", "Artifactory", "Custom"]);
|
|
3864
|
+
var NpmRegistryBasicAuthConfig = z112.object({
|
|
3865
|
+
authType: z112.literal(NpmRegistryAuthType.Enum.Basic),
|
|
3866
|
+
username: z112.string(),
|
|
3867
|
+
password: z112.string()
|
|
3868
|
+
});
|
|
3869
|
+
var NpmRegistryBearerAuthConfig = z112.object({
|
|
3870
|
+
authType: z112.literal(NpmRegistryAuthType.Enum.Bearer),
|
|
3871
|
+
accessToken: z112.string()
|
|
3872
|
+
});
|
|
3873
|
+
var NpmRegistryNoAuthConfig = z112.object({
|
|
3874
|
+
authType: z112.literal(NpmRegistryAuthType.Enum.None)
|
|
3875
|
+
});
|
|
3876
|
+
var NpmRegistrCustomAuthConfig = z112.object({
|
|
3877
|
+
authType: z112.literal(NpmRegistryAuthType.Enum.Custom),
|
|
3878
|
+
authHeaderName: z112.string(),
|
|
3879
|
+
authHeaderValue: z112.string()
|
|
3880
|
+
});
|
|
3881
|
+
var NpmRegistryAuthConfig = z112.discriminatedUnion("authType", [
|
|
3833
3882
|
NpmRegistryBasicAuthConfig,
|
|
3834
3883
|
NpmRegistryBearerAuthConfig,
|
|
3835
3884
|
NpmRegistryNoAuthConfig,
|
|
3836
3885
|
NpmRegistrCustomAuthConfig
|
|
3837
3886
|
]);
|
|
3838
|
-
var NpmRegistryConfigBase =
|
|
3887
|
+
var NpmRegistryConfigBase = z112.object({
|
|
3839
3888
|
registryType: NpmRegistryType,
|
|
3840
|
-
enabledScopes:
|
|
3841
|
-
customRegistryUrl:
|
|
3842
|
-
bypassProxy:
|
|
3843
|
-
npmProxyRegistryConfigId:
|
|
3844
|
-
npmProxyVersion:
|
|
3889
|
+
enabledScopes: z112.array(z112.string()),
|
|
3890
|
+
customRegistryUrl: z112.string().optional(),
|
|
3891
|
+
bypassProxy: z112.boolean().default(false),
|
|
3892
|
+
npmProxyRegistryConfigId: z112.string().optional(),
|
|
3893
|
+
npmProxyVersion: z112.number().optional()
|
|
3845
3894
|
});
|
|
3846
3895
|
var NpmRegistryConfig = NpmRegistryConfigBase.and(NpmRegistryAuthConfig);
|
|
3847
3896
|
|
|
3848
3897
|
// src/workspace/sso-provider.ts
|
|
3849
|
-
import { z as
|
|
3850
|
-
var SsoProvider =
|
|
3851
|
-
providerId:
|
|
3852
|
-
defaultAutoInviteValue:
|
|
3853
|
-
autoInviteDomains:
|
|
3854
|
-
skipDocsSupernovaLogin:
|
|
3855
|
-
areInvitesDisabled:
|
|
3856
|
-
isTestMode:
|
|
3857
|
-
emailDomains:
|
|
3858
|
-
metadataXml:
|
|
3898
|
+
import { z as z113 } from "zod";
|
|
3899
|
+
var SsoProvider = z113.object({
|
|
3900
|
+
providerId: z113.string(),
|
|
3901
|
+
defaultAutoInviteValue: z113.boolean(),
|
|
3902
|
+
autoInviteDomains: z113.record(z113.string(), z113.boolean()),
|
|
3903
|
+
skipDocsSupernovaLogin: z113.boolean(),
|
|
3904
|
+
areInvitesDisabled: z113.boolean(),
|
|
3905
|
+
isTestMode: z113.boolean(),
|
|
3906
|
+
emailDomains: z113.array(z113.string()),
|
|
3907
|
+
metadataXml: z113.string().nullish()
|
|
3859
3908
|
});
|
|
3860
3909
|
|
|
3861
3910
|
// src/workspace/workspace.ts
|
|
3862
3911
|
var isValidCIDR = (value) => {
|
|
3863
3912
|
return IPCIDR.isValidAddress(value);
|
|
3864
3913
|
};
|
|
3865
|
-
var WorkspaceIpWhitelistEntry =
|
|
3866
|
-
isEnabled:
|
|
3867
|
-
name:
|
|
3868
|
-
range:
|
|
3914
|
+
var WorkspaceIpWhitelistEntry = z114.object({
|
|
3915
|
+
isEnabled: z114.boolean(),
|
|
3916
|
+
name: z114.string(),
|
|
3917
|
+
range: z114.string().refine(isValidCIDR, {
|
|
3869
3918
|
message: "Invalid IP CIDR"
|
|
3870
3919
|
})
|
|
3871
3920
|
});
|
|
3872
|
-
var WorkspaceIpSettings =
|
|
3873
|
-
isEnabledForCloud:
|
|
3874
|
-
isEnabledForDocs:
|
|
3875
|
-
entries:
|
|
3921
|
+
var WorkspaceIpSettings = z114.object({
|
|
3922
|
+
isEnabledForCloud: z114.boolean(),
|
|
3923
|
+
isEnabledForDocs: z114.boolean(),
|
|
3924
|
+
entries: z114.array(WorkspaceIpWhitelistEntry)
|
|
3876
3925
|
});
|
|
3877
|
-
var WorkspaceProfile =
|
|
3878
|
-
name:
|
|
3879
|
-
handle:
|
|
3880
|
-
color:
|
|
3881
|
-
avatar: nullishToOptional(
|
|
3926
|
+
var WorkspaceProfile = z114.object({
|
|
3927
|
+
name: z114.string(),
|
|
3928
|
+
handle: z114.string(),
|
|
3929
|
+
color: z114.string(),
|
|
3930
|
+
avatar: nullishToOptional(z114.string()),
|
|
3882
3931
|
billingDetails: nullishToOptional(BillingDetails)
|
|
3883
3932
|
});
|
|
3884
3933
|
var WorkspaceProfileUpdate = WorkspaceProfile.omit({
|
|
3885
3934
|
avatar: true
|
|
3886
3935
|
});
|
|
3887
|
-
var Workspace =
|
|
3888
|
-
id:
|
|
3936
|
+
var Workspace = z114.object({
|
|
3937
|
+
id: z114.string(),
|
|
3889
3938
|
profile: WorkspaceProfile,
|
|
3890
3939
|
subscription: Subscription,
|
|
3891
3940
|
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
3892
3941
|
sso: nullishToOptional(SsoProvider),
|
|
3893
3942
|
npmRegistrySettings: nullishToOptional(NpmRegistryConfig)
|
|
3894
3943
|
});
|
|
3895
|
-
var WorkspaceWithDesignSystems =
|
|
3944
|
+
var WorkspaceWithDesignSystems = z114.object({
|
|
3896
3945
|
workspace: Workspace,
|
|
3897
|
-
designSystems:
|
|
3946
|
+
designSystems: z114.array(DesignSystem)
|
|
3898
3947
|
});
|
|
3899
3948
|
|
|
3900
3949
|
// src/dsm/design-system.ts
|
|
3901
|
-
var DesignSystemSwitcher =
|
|
3902
|
-
isEnabled:
|
|
3903
|
-
designSystemIds:
|
|
3904
|
-
});
|
|
3905
|
-
var DesignSystem =
|
|
3906
|
-
id:
|
|
3907
|
-
workspaceId:
|
|
3908
|
-
name:
|
|
3909
|
-
description:
|
|
3910
|
-
docExporterId: nullishToOptional(
|
|
3911
|
-
docSlug:
|
|
3912
|
-
docUserSlug: nullishToOptional(
|
|
3913
|
-
docSlugDeprecated:
|
|
3914
|
-
isPublic:
|
|
3915
|
-
isMultibrand:
|
|
3916
|
-
docViewUrl: nullishToOptional(
|
|
3917
|
-
basePrefixes:
|
|
3950
|
+
var DesignSystemSwitcher = z115.object({
|
|
3951
|
+
isEnabled: z115.boolean(),
|
|
3952
|
+
designSystemIds: z115.array(z115.string())
|
|
3953
|
+
});
|
|
3954
|
+
var DesignSystem = z115.object({
|
|
3955
|
+
id: z115.string(),
|
|
3956
|
+
workspaceId: z115.string(),
|
|
3957
|
+
name: z115.string(),
|
|
3958
|
+
description: z115.string(),
|
|
3959
|
+
docExporterId: nullishToOptional(z115.string()),
|
|
3960
|
+
docSlug: z115.string(),
|
|
3961
|
+
docUserSlug: nullishToOptional(z115.string()),
|
|
3962
|
+
docSlugDeprecated: z115.string(),
|
|
3963
|
+
isPublic: z115.boolean(),
|
|
3964
|
+
isMultibrand: z115.boolean(),
|
|
3965
|
+
docViewUrl: nullishToOptional(z115.string()),
|
|
3966
|
+
basePrefixes: z115.array(z115.string()),
|
|
3918
3967
|
designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
|
|
3919
|
-
createdAt:
|
|
3920
|
-
updatedAt:
|
|
3968
|
+
createdAt: z115.coerce.date(),
|
|
3969
|
+
updatedAt: z115.coerce.date()
|
|
3921
3970
|
});
|
|
3922
|
-
var DesignSystemWithWorkspace =
|
|
3971
|
+
var DesignSystemWithWorkspace = z115.object({
|
|
3923
3972
|
designSystem: DesignSystem,
|
|
3924
3973
|
workspace: Workspace
|
|
3925
3974
|
});
|
|
@@ -3928,9 +3977,9 @@ var DesignSystemWithWorkspace = z114.object({
|
|
|
3928
3977
|
var DS_NAME_MIN_LENGTH = 2;
|
|
3929
3978
|
var DS_NAME_MAX_LENGTH = 64;
|
|
3930
3979
|
var DS_DESC_MAX_LENGTH = 64;
|
|
3931
|
-
var DesignSystemUpdateInputMetadata =
|
|
3932
|
-
name:
|
|
3933
|
-
description:
|
|
3980
|
+
var DesignSystemUpdateInputMetadata = z116.object({
|
|
3981
|
+
name: z116.string().min(DS_NAME_MIN_LENGTH).max(DS_NAME_MAX_LENGTH).trim().optional(),
|
|
3982
|
+
description: z116.string().max(DS_DESC_MAX_LENGTH).trim().optional()
|
|
3934
3983
|
});
|
|
3935
3984
|
var DesignSystemUpdateInput = DesignSystem.partial().omit({
|
|
3936
3985
|
id: true,
|
|
@@ -3944,185 +3993,185 @@ var DesignSystemUpdateInput = DesignSystem.partial().omit({
|
|
|
3944
3993
|
});
|
|
3945
3994
|
|
|
3946
3995
|
// src/dsm/desing-system-create.ts
|
|
3947
|
-
import { z as
|
|
3996
|
+
import { z as z117 } from "zod";
|
|
3948
3997
|
var DS_NAME_MIN_LENGTH2 = 2;
|
|
3949
3998
|
var DS_NAME_MAX_LENGTH2 = 64;
|
|
3950
3999
|
var DS_DESC_MAX_LENGTH2 = 64;
|
|
3951
|
-
var DesignSystemCreateInputMetadata =
|
|
3952
|
-
name:
|
|
3953
|
-
description:
|
|
4000
|
+
var DesignSystemCreateInputMetadata = z117.object({
|
|
4001
|
+
name: z117.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim(),
|
|
4002
|
+
description: z117.string().max(DS_DESC_MAX_LENGTH2).trim()
|
|
3954
4003
|
});
|
|
3955
|
-
var DesignSystemCreateInput =
|
|
4004
|
+
var DesignSystemCreateInput = z117.object({
|
|
3956
4005
|
meta: DesignSystemCreateInputMetadata,
|
|
3957
|
-
workspaceId:
|
|
3958
|
-
isPublic:
|
|
3959
|
-
basePrefixes:
|
|
3960
|
-
docUserSlug:
|
|
3961
|
-
source:
|
|
4006
|
+
workspaceId: z117.string(),
|
|
4007
|
+
isPublic: z117.boolean().optional(),
|
|
4008
|
+
basePrefixes: z117.array(z117.string()).optional(),
|
|
4009
|
+
docUserSlug: z117.string().nullish().optional(),
|
|
4010
|
+
source: z117.array(z117.string()).optional()
|
|
3962
4011
|
});
|
|
3963
4012
|
|
|
3964
4013
|
// src/dsm/exporter-property-values-collection.ts
|
|
3965
|
-
import { z as
|
|
3966
|
-
var ExporterPropertyImageValue =
|
|
4014
|
+
import { z as z118 } from "zod";
|
|
4015
|
+
var ExporterPropertyImageValue = z118.object({
|
|
3967
4016
|
asset: PageBlockAsset.optional(),
|
|
3968
|
-
assetId:
|
|
3969
|
-
assetUrl:
|
|
3970
|
-
});
|
|
3971
|
-
var ExporterPropertyValue =
|
|
3972
|
-
key:
|
|
3973
|
-
value:
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
4017
|
+
assetId: z118.string().optional(),
|
|
4018
|
+
assetUrl: z118.string().optional()
|
|
4019
|
+
});
|
|
4020
|
+
var ExporterPropertyValue = z118.object({
|
|
4021
|
+
key: z118.string(),
|
|
4022
|
+
value: z118.union([
|
|
4023
|
+
z118.number(),
|
|
4024
|
+
z118.string(),
|
|
4025
|
+
z118.boolean(),
|
|
3977
4026
|
ExporterPropertyImageValue,
|
|
3978
4027
|
ColorTokenData,
|
|
3979
4028
|
TypographyTokenData
|
|
3980
4029
|
])
|
|
3981
4030
|
});
|
|
3982
|
-
var ExporterPropertyValuesCollection =
|
|
3983
|
-
id:
|
|
3984
|
-
designSystemId:
|
|
3985
|
-
exporterId:
|
|
3986
|
-
values:
|
|
4031
|
+
var ExporterPropertyValuesCollection = z118.object({
|
|
4032
|
+
id: z118.string(),
|
|
4033
|
+
designSystemId: z118.string(),
|
|
4034
|
+
exporterId: z118.string(),
|
|
4035
|
+
values: z118.array(ExporterPropertyValue)
|
|
3987
4036
|
});
|
|
3988
4037
|
|
|
3989
4038
|
// src/dsm/published-doc-page.ts
|
|
3990
|
-
import { z as
|
|
4039
|
+
import { z as z119 } from "zod";
|
|
3991
4040
|
var SHORT_PERSISTENT_ID_LENGTH = 8;
|
|
3992
4041
|
function tryParseShortPersistentId(url = "/") {
|
|
3993
4042
|
const lastUrlPart = url.split("/").pop() || "";
|
|
3994
4043
|
const shortPersistentId = lastUrlPart.split("-").pop()?.replaceAll(".html", "") || null;
|
|
3995
4044
|
return shortPersistentId?.length === SHORT_PERSISTENT_ID_LENGTH ? shortPersistentId : null;
|
|
3996
4045
|
}
|
|
3997
|
-
var PublishedDocPage =
|
|
3998
|
-
id:
|
|
3999
|
-
publishedDocId:
|
|
4000
|
-
pageShortPersistentId:
|
|
4001
|
-
pathV1:
|
|
4002
|
-
pathV2:
|
|
4003
|
-
storagePath:
|
|
4004
|
-
locale:
|
|
4005
|
-
isPrivate:
|
|
4006
|
-
isHidden:
|
|
4007
|
-
createdAt:
|
|
4008
|
-
updatedAt:
|
|
4046
|
+
var PublishedDocPage = z119.object({
|
|
4047
|
+
id: z119.string(),
|
|
4048
|
+
publishedDocId: z119.string(),
|
|
4049
|
+
pageShortPersistentId: z119.string(),
|
|
4050
|
+
pathV1: z119.string(),
|
|
4051
|
+
pathV2: z119.string(),
|
|
4052
|
+
storagePath: z119.string(),
|
|
4053
|
+
locale: z119.string().optional(),
|
|
4054
|
+
isPrivate: z119.boolean(),
|
|
4055
|
+
isHidden: z119.boolean(),
|
|
4056
|
+
createdAt: z119.coerce.date(),
|
|
4057
|
+
updatedAt: z119.coerce.date()
|
|
4009
4058
|
});
|
|
4010
4059
|
|
|
4011
4060
|
// src/dsm/published-doc.ts
|
|
4012
|
-
import { z as
|
|
4061
|
+
import { z as z120 } from "zod";
|
|
4013
4062
|
var publishedDocEnvironments = ["Live", "Preview"];
|
|
4014
|
-
var PublishedDocEnvironment =
|
|
4015
|
-
var PublishedDocsChecksums =
|
|
4016
|
-
var PublishedDocRoutingVersion =
|
|
4017
|
-
var PublishedDoc =
|
|
4018
|
-
id:
|
|
4019
|
-
designSystemVersionId:
|
|
4020
|
-
createdAt:
|
|
4021
|
-
updatedAt:
|
|
4022
|
-
lastPublishedAt:
|
|
4023
|
-
isDefault:
|
|
4024
|
-
isPublic:
|
|
4063
|
+
var PublishedDocEnvironment = z120.enum(publishedDocEnvironments);
|
|
4064
|
+
var PublishedDocsChecksums = z120.record(z120.string());
|
|
4065
|
+
var PublishedDocRoutingVersion = z120.enum(["1", "2"]);
|
|
4066
|
+
var PublishedDoc = z120.object({
|
|
4067
|
+
id: z120.string(),
|
|
4068
|
+
designSystemVersionId: z120.string(),
|
|
4069
|
+
createdAt: z120.coerce.date(),
|
|
4070
|
+
updatedAt: z120.coerce.date(),
|
|
4071
|
+
lastPublishedAt: z120.coerce.date(),
|
|
4072
|
+
isDefault: z120.boolean(),
|
|
4073
|
+
isPublic: z120.boolean(),
|
|
4025
4074
|
environment: PublishedDocEnvironment,
|
|
4026
4075
|
checksums: PublishedDocsChecksums,
|
|
4027
|
-
storagePath:
|
|
4028
|
-
wasMigrated:
|
|
4076
|
+
storagePath: z120.string(),
|
|
4077
|
+
wasMigrated: z120.boolean(),
|
|
4029
4078
|
routingVersion: PublishedDocRoutingVersion,
|
|
4030
|
-
usesLocalizations:
|
|
4031
|
-
wasPublishedWithLocalizations:
|
|
4032
|
-
tokenCount:
|
|
4033
|
-
assetCount:
|
|
4079
|
+
usesLocalizations: z120.boolean(),
|
|
4080
|
+
wasPublishedWithLocalizations: z120.boolean(),
|
|
4081
|
+
tokenCount: z120.number(),
|
|
4082
|
+
assetCount: z120.number()
|
|
4034
4083
|
});
|
|
4035
4084
|
|
|
4036
4085
|
// src/dsm/version.ts
|
|
4037
|
-
import { z as
|
|
4038
|
-
var DesignSystemVersion =
|
|
4039
|
-
id:
|
|
4040
|
-
version:
|
|
4041
|
-
createdAt:
|
|
4042
|
-
designSystemId:
|
|
4043
|
-
name:
|
|
4044
|
-
comment:
|
|
4045
|
-
isReadonly:
|
|
4046
|
-
changeLog:
|
|
4047
|
-
parentId:
|
|
4048
|
-
isDraftsFeatureAdopted:
|
|
4049
|
-
});
|
|
4050
|
-
var VersionCreationJobStatus =
|
|
4051
|
-
var VersionCreationJob =
|
|
4052
|
-
id:
|
|
4053
|
-
version:
|
|
4054
|
-
designSystemId:
|
|
4055
|
-
designSystemVersionId: nullishToOptional(
|
|
4086
|
+
import { z as z121 } from "zod";
|
|
4087
|
+
var DesignSystemVersion = z121.object({
|
|
4088
|
+
id: z121.string(),
|
|
4089
|
+
version: z121.string(),
|
|
4090
|
+
createdAt: z121.date(),
|
|
4091
|
+
designSystemId: z121.string(),
|
|
4092
|
+
name: z121.string(),
|
|
4093
|
+
comment: z121.string(),
|
|
4094
|
+
isReadonly: z121.boolean(),
|
|
4095
|
+
changeLog: z121.string(),
|
|
4096
|
+
parentId: z121.string().optional(),
|
|
4097
|
+
isDraftsFeatureAdopted: z121.boolean()
|
|
4098
|
+
});
|
|
4099
|
+
var VersionCreationJobStatus = z121.enum(["Success", "InProgress", "Error"]);
|
|
4100
|
+
var VersionCreationJob = z121.object({
|
|
4101
|
+
id: z121.string(),
|
|
4102
|
+
version: z121.string(),
|
|
4103
|
+
designSystemId: z121.string(),
|
|
4104
|
+
designSystemVersionId: nullishToOptional(z121.string()),
|
|
4056
4105
|
status: VersionCreationJobStatus,
|
|
4057
|
-
errorMessage: nullishToOptional(
|
|
4106
|
+
errorMessage: nullishToOptional(z121.string())
|
|
4058
4107
|
});
|
|
4059
4108
|
|
|
4060
4109
|
// src/export/export-destinations.ts
|
|
4061
4110
|
var BITBUCKET_SLUG = /^[-a-zA-Z0-9~]*$/;
|
|
4062
4111
|
var BITBUCKET_MAX_LENGTH = 64;
|
|
4063
|
-
var ExportJobDocumentationChanges =
|
|
4064
|
-
pagePersistentIds:
|
|
4065
|
-
groupPersistentIds:
|
|
4112
|
+
var ExportJobDocumentationChanges = z122.object({
|
|
4113
|
+
pagePersistentIds: z122.string().array(),
|
|
4114
|
+
groupPersistentIds: z122.string().array()
|
|
4066
4115
|
});
|
|
4067
|
-
var ExporterDestinationDocs =
|
|
4116
|
+
var ExporterDestinationDocs = z122.object({
|
|
4068
4117
|
environment: PublishedDocEnvironment,
|
|
4069
4118
|
changes: nullishToOptional(ExportJobDocumentationChanges)
|
|
4070
4119
|
});
|
|
4071
|
-
var ExporterDestinationS3 =
|
|
4072
|
-
var ExporterDestinationGithub =
|
|
4073
|
-
credentialId:
|
|
4120
|
+
var ExporterDestinationS3 = z122.object({});
|
|
4121
|
+
var ExporterDestinationGithub = z122.object({
|
|
4122
|
+
credentialId: z122.string().optional(),
|
|
4074
4123
|
// Repository
|
|
4075
|
-
url:
|
|
4124
|
+
url: z122.string(),
|
|
4076
4125
|
// Location
|
|
4077
|
-
branch:
|
|
4078
|
-
relativePath: nullishToOptional(
|
|
4126
|
+
branch: z122.string(),
|
|
4127
|
+
relativePath: nullishToOptional(z122.string()),
|
|
4079
4128
|
// Legacy deprecated fields. Use `credentialId` instead
|
|
4080
|
-
connectionId: nullishToOptional(
|
|
4081
|
-
userId: nullishToOptional(
|
|
4129
|
+
connectionId: nullishToOptional(z122.string()),
|
|
4130
|
+
userId: nullishToOptional(z122.number())
|
|
4082
4131
|
});
|
|
4083
|
-
var ExporterDestinationAzure =
|
|
4084
|
-
credentialId:
|
|
4132
|
+
var ExporterDestinationAzure = z122.object({
|
|
4133
|
+
credentialId: z122.string().optional(),
|
|
4085
4134
|
// Repository
|
|
4086
|
-
organizationId:
|
|
4087
|
-
projectId:
|
|
4088
|
-
repositoryId:
|
|
4135
|
+
organizationId: z122.string(),
|
|
4136
|
+
projectId: z122.string(),
|
|
4137
|
+
repositoryId: z122.string(),
|
|
4089
4138
|
// Location
|
|
4090
|
-
branch:
|
|
4091
|
-
relativePath: nullishToOptional(
|
|
4139
|
+
branch: z122.string(),
|
|
4140
|
+
relativePath: nullishToOptional(z122.string()),
|
|
4092
4141
|
// Maybe not needed
|
|
4093
|
-
url: nullishToOptional(
|
|
4142
|
+
url: nullishToOptional(z122.string()),
|
|
4094
4143
|
// Legacy deprecated fields. Use `credentialId` instead
|
|
4095
|
-
connectionId: nullishToOptional(
|
|
4096
|
-
userId: nullishToOptional(
|
|
4144
|
+
connectionId: nullishToOptional(z122.string()),
|
|
4145
|
+
userId: nullishToOptional(z122.number())
|
|
4097
4146
|
});
|
|
4098
|
-
var ExporterDestinationGitlab =
|
|
4099
|
-
credentialId:
|
|
4147
|
+
var ExporterDestinationGitlab = z122.object({
|
|
4148
|
+
credentialId: z122.string().optional(),
|
|
4100
4149
|
// Repository
|
|
4101
|
-
projectId:
|
|
4150
|
+
projectId: z122.string(),
|
|
4102
4151
|
// Location
|
|
4103
|
-
branch:
|
|
4104
|
-
relativePath: nullishToOptional(
|
|
4152
|
+
branch: z122.string(),
|
|
4153
|
+
relativePath: nullishToOptional(z122.string()),
|
|
4105
4154
|
// Maybe not needed
|
|
4106
|
-
url: nullishToOptional(
|
|
4155
|
+
url: nullishToOptional(z122.string()),
|
|
4107
4156
|
// Legacy deprecated fields. Use `credentialId` instead
|
|
4108
|
-
connectionId: nullishToOptional(
|
|
4109
|
-
userId: nullishToOptional(
|
|
4157
|
+
connectionId: nullishToOptional(z122.string()),
|
|
4158
|
+
userId: nullishToOptional(z122.number())
|
|
4110
4159
|
});
|
|
4111
|
-
var ExporterDestinationBitbucket =
|
|
4112
|
-
credentialId:
|
|
4160
|
+
var ExporterDestinationBitbucket = z122.object({
|
|
4161
|
+
credentialId: z122.string().optional(),
|
|
4113
4162
|
// Repository
|
|
4114
|
-
workspaceSlug:
|
|
4115
|
-
projectKey:
|
|
4116
|
-
repoSlug:
|
|
4163
|
+
workspaceSlug: z122.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
4164
|
+
projectKey: z122.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
4165
|
+
repoSlug: z122.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
4117
4166
|
// Location
|
|
4118
|
-
branch:
|
|
4119
|
-
relativePath: nullishToOptional(
|
|
4167
|
+
branch: z122.string(),
|
|
4168
|
+
relativePath: nullishToOptional(z122.string()),
|
|
4120
4169
|
// Legacy deprecated fields. Use `credentialId` instead
|
|
4121
|
-
connectionId: nullishToOptional(
|
|
4122
|
-
userId: nullishToOptional(
|
|
4170
|
+
connectionId: nullishToOptional(z122.string()),
|
|
4171
|
+
userId: nullishToOptional(z122.number())
|
|
4123
4172
|
});
|
|
4124
|
-
var ExportDestinationsMap =
|
|
4125
|
-
webhookUrl:
|
|
4173
|
+
var ExportDestinationsMap = z122.object({
|
|
4174
|
+
webhookUrl: z122.string().optional(),
|
|
4126
4175
|
destinationSnDocs: ExporterDestinationDocs.optional(),
|
|
4127
4176
|
destinationS3: ExporterDestinationS3.optional(),
|
|
4128
4177
|
destinationGithub: ExporterDestinationGithub.optional(),
|
|
@@ -4132,142 +4181,142 @@ var ExportDestinationsMap = z121.object({
|
|
|
4132
4181
|
});
|
|
4133
4182
|
|
|
4134
4183
|
// src/export/pipeline.ts
|
|
4135
|
-
var PipelineEventType =
|
|
4136
|
-
var PipelineDestinationGitType =
|
|
4137
|
-
var PipelineDestinationExtraType =
|
|
4138
|
-
var PipelineDestinationType =
|
|
4139
|
-
var Pipeline =
|
|
4140
|
-
id:
|
|
4141
|
-
name:
|
|
4184
|
+
var PipelineEventType = z123.enum(["OnVersionReleased", "OnHeadChanged", "OnSourceUpdated", "None"]);
|
|
4185
|
+
var PipelineDestinationGitType = z123.enum(["Github", "Gitlab", "Bitbucket", "Azure"]);
|
|
4186
|
+
var PipelineDestinationExtraType = z123.enum(["WebhookUrl", "S3", "Documentation"]);
|
|
4187
|
+
var PipelineDestinationType = z123.union([PipelineDestinationGitType, PipelineDestinationExtraType]);
|
|
4188
|
+
var Pipeline = z123.object({
|
|
4189
|
+
id: z123.string(),
|
|
4190
|
+
name: z123.string(),
|
|
4142
4191
|
eventType: PipelineEventType,
|
|
4143
|
-
isEnabled:
|
|
4144
|
-
workspaceId:
|
|
4145
|
-
designSystemId:
|
|
4146
|
-
exporterId:
|
|
4147
|
-
brandPersistentId:
|
|
4148
|
-
themePersistentId:
|
|
4192
|
+
isEnabled: z123.boolean(),
|
|
4193
|
+
workspaceId: z123.string(),
|
|
4194
|
+
designSystemId: z123.string(),
|
|
4195
|
+
exporterId: z123.string(),
|
|
4196
|
+
brandPersistentId: z123.string().optional(),
|
|
4197
|
+
themePersistentId: z123.string().optional(),
|
|
4149
4198
|
// Destinations
|
|
4150
4199
|
...ExportDestinationsMap.shape
|
|
4151
4200
|
});
|
|
4152
4201
|
|
|
4153
4202
|
// src/data-dumps/code-integration-dump.ts
|
|
4154
|
-
var ExportJobDump =
|
|
4155
|
-
id:
|
|
4156
|
-
createdAt:
|
|
4157
|
-
finishedAt:
|
|
4158
|
-
exportArtefacts:
|
|
4203
|
+
var ExportJobDump = z124.object({
|
|
4204
|
+
id: z124.string(),
|
|
4205
|
+
createdAt: z124.coerce.date(),
|
|
4206
|
+
finishedAt: z124.coerce.date(),
|
|
4207
|
+
exportArtefacts: z124.string()
|
|
4159
4208
|
});
|
|
4160
|
-
var CodeIntegrationDump =
|
|
4209
|
+
var CodeIntegrationDump = z124.object({
|
|
4161
4210
|
exporters: Exporter.array(),
|
|
4162
4211
|
pipelines: Pipeline.array(),
|
|
4163
4212
|
exportJobs: ExportJobDump.array()
|
|
4164
4213
|
});
|
|
4165
4214
|
|
|
4166
4215
|
// src/data-dumps/design-system-dump.ts
|
|
4167
|
-
import { z as
|
|
4216
|
+
import { z as z131 } from "zod";
|
|
4168
4217
|
|
|
4169
4218
|
// src/data-dumps/design-system-version-dump.ts
|
|
4170
|
-
import { z as
|
|
4219
|
+
import { z as z130 } from "zod";
|
|
4171
4220
|
|
|
4172
4221
|
// src/liveblocks/rooms/design-system-version-room.ts
|
|
4173
|
-
import { z as
|
|
4222
|
+
import { z as z125 } from "zod";
|
|
4174
4223
|
var DesignSystemVersionRoom = Entity.extend({
|
|
4175
|
-
designSystemVersionId:
|
|
4176
|
-
liveblocksId:
|
|
4177
|
-
});
|
|
4178
|
-
var DesignSystemVersionRoomInternalSettings =
|
|
4179
|
-
routingVersion:
|
|
4180
|
-
isDraftFeatureAdopted:
|
|
4181
|
-
});
|
|
4182
|
-
var DesignSystemVersionRoomInitialState =
|
|
4183
|
-
pages:
|
|
4184
|
-
groups:
|
|
4185
|
-
pageSnapshots:
|
|
4186
|
-
groupSnapshots:
|
|
4224
|
+
designSystemVersionId: z125.string(),
|
|
4225
|
+
liveblocksId: z125.string()
|
|
4226
|
+
});
|
|
4227
|
+
var DesignSystemVersionRoomInternalSettings = z125.object({
|
|
4228
|
+
routingVersion: z125.string(),
|
|
4229
|
+
isDraftFeatureAdopted: z125.boolean()
|
|
4230
|
+
});
|
|
4231
|
+
var DesignSystemVersionRoomInitialState = z125.object({
|
|
4232
|
+
pages: z125.array(DocumentationPageV2),
|
|
4233
|
+
groups: z125.array(ElementGroup),
|
|
4234
|
+
pageSnapshots: z125.array(DocumentationPageSnapshot),
|
|
4235
|
+
groupSnapshots: z125.array(ElementGroupSnapshot),
|
|
4187
4236
|
internalSettings: DesignSystemVersionRoomInternalSettings
|
|
4188
4237
|
});
|
|
4189
|
-
var DesignSystemVersionRoomUpdate =
|
|
4190
|
-
pages:
|
|
4191
|
-
groups:
|
|
4192
|
-
pageIdsToDelete:
|
|
4193
|
-
groupIdsToDelete:
|
|
4194
|
-
pageSnapshots:
|
|
4195
|
-
groupSnapshots:
|
|
4196
|
-
pageSnapshotIdsToDelete:
|
|
4197
|
-
groupSnapshotIdsToDelete:
|
|
4198
|
-
pageHashesToUpdate:
|
|
4238
|
+
var DesignSystemVersionRoomUpdate = z125.object({
|
|
4239
|
+
pages: z125.array(DocumentationPageV2),
|
|
4240
|
+
groups: z125.array(ElementGroup),
|
|
4241
|
+
pageIdsToDelete: z125.array(z125.string()),
|
|
4242
|
+
groupIdsToDelete: z125.array(z125.string()),
|
|
4243
|
+
pageSnapshots: z125.array(DocumentationPageSnapshot),
|
|
4244
|
+
groupSnapshots: z125.array(ElementGroupSnapshot),
|
|
4245
|
+
pageSnapshotIdsToDelete: z125.array(z125.string()),
|
|
4246
|
+
groupSnapshotIdsToDelete: z125.array(z125.string()),
|
|
4247
|
+
pageHashesToUpdate: z125.record(z125.string(), z125.string())
|
|
4199
4248
|
});
|
|
4200
4249
|
|
|
4201
4250
|
// src/liveblocks/rooms/documentation-page-room.ts
|
|
4202
|
-
import { z as
|
|
4251
|
+
import { z as z126 } from "zod";
|
|
4203
4252
|
var DocumentationPageRoom = Entity.extend({
|
|
4204
|
-
designSystemVersionId:
|
|
4205
|
-
documentationPageId:
|
|
4206
|
-
liveblocksId:
|
|
4207
|
-
isDirty:
|
|
4253
|
+
designSystemVersionId: z126.string(),
|
|
4254
|
+
documentationPageId: z126.string(),
|
|
4255
|
+
liveblocksId: z126.string(),
|
|
4256
|
+
isDirty: z126.boolean()
|
|
4208
4257
|
});
|
|
4209
|
-
var DocumentationPageRoomState =
|
|
4210
|
-
pageItems:
|
|
4258
|
+
var DocumentationPageRoomState = z126.object({
|
|
4259
|
+
pageItems: z126.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
4211
4260
|
itemConfiguration: DocumentationItemConfigurationV2
|
|
4212
4261
|
});
|
|
4213
|
-
var DocumentationPageRoomRoomUpdate =
|
|
4262
|
+
var DocumentationPageRoomRoomUpdate = z126.object({
|
|
4214
4263
|
page: DocumentationPageV2,
|
|
4215
4264
|
pageParent: ElementGroup
|
|
4216
4265
|
});
|
|
4217
4266
|
var DocumentationPageRoomInitialStateUpdate = DocumentationPageRoomRoomUpdate.extend({
|
|
4218
|
-
pageItems:
|
|
4219
|
-
blockDefinitions:
|
|
4267
|
+
pageItems: z126.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
4268
|
+
blockDefinitions: z126.array(PageBlockDefinition)
|
|
4220
4269
|
});
|
|
4221
|
-
var RestoredDocumentationPage =
|
|
4270
|
+
var RestoredDocumentationPage = z126.object({
|
|
4222
4271
|
page: DocumentationPageV2,
|
|
4223
4272
|
pageParent: ElementGroup,
|
|
4224
4273
|
pageContent: DocumentationPageContentData,
|
|
4225
|
-
contentHash:
|
|
4226
|
-
roomId:
|
|
4274
|
+
contentHash: z126.string(),
|
|
4275
|
+
roomId: z126.string().optional()
|
|
4227
4276
|
});
|
|
4228
|
-
var RestoredDocumentationGroup =
|
|
4277
|
+
var RestoredDocumentationGroup = z126.object({
|
|
4229
4278
|
group: ElementGroup,
|
|
4230
4279
|
parent: ElementGroup
|
|
4231
4280
|
});
|
|
4232
4281
|
|
|
4233
4282
|
// src/liveblocks/rooms/room-type.ts
|
|
4234
|
-
import { z as
|
|
4283
|
+
import { z as z127 } from "zod";
|
|
4235
4284
|
var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
4236
4285
|
RoomTypeEnum2["DocumentationPage"] = "documentation-page";
|
|
4237
4286
|
RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
|
|
4238
4287
|
RoomTypeEnum2["Workspace"] = "workspace";
|
|
4239
4288
|
return RoomTypeEnum2;
|
|
4240
4289
|
})(RoomTypeEnum || {});
|
|
4241
|
-
var RoomTypeSchema =
|
|
4290
|
+
var RoomTypeSchema = z127.nativeEnum(RoomTypeEnum);
|
|
4242
4291
|
var RoomType = RoomTypeSchema.enum;
|
|
4243
4292
|
|
|
4244
4293
|
// src/liveblocks/rooms/workspace-room.ts
|
|
4245
|
-
import { z as
|
|
4294
|
+
import { z as z128 } from "zod";
|
|
4246
4295
|
var WorkspaceRoom = Entity.extend({
|
|
4247
|
-
workspaceId:
|
|
4248
|
-
liveblocksId:
|
|
4296
|
+
workspaceId: z128.string(),
|
|
4297
|
+
liveblocksId: z128.string()
|
|
4249
4298
|
});
|
|
4250
4299
|
|
|
4251
4300
|
// src/data-dumps/published-docs-dump.ts
|
|
4252
|
-
import { z as
|
|
4253
|
-
var PublishedDocsDump =
|
|
4301
|
+
import { z as z129 } from "zod";
|
|
4302
|
+
var PublishedDocsDump = z129.object({
|
|
4254
4303
|
documentation: PublishedDoc,
|
|
4255
4304
|
pages: PublishedDocPage.array()
|
|
4256
4305
|
});
|
|
4257
4306
|
|
|
4258
4307
|
// src/data-dumps/design-system-version-dump.ts
|
|
4259
|
-
var DocumentationThreadDump =
|
|
4308
|
+
var DocumentationThreadDump = z130.object({
|
|
4260
4309
|
thread: DocumentationCommentThread,
|
|
4261
4310
|
comments: DocumentationComment.array()
|
|
4262
4311
|
});
|
|
4263
|
-
var DocumentationPageRoomDump =
|
|
4312
|
+
var DocumentationPageRoomDump = z130.object({
|
|
4264
4313
|
room: DocumentationPageRoom,
|
|
4265
4314
|
threads: DocumentationThreadDump.array()
|
|
4266
4315
|
});
|
|
4267
|
-
var DesignSystemVersionMultiplayerDump =
|
|
4316
|
+
var DesignSystemVersionMultiplayerDump = z130.object({
|
|
4268
4317
|
documentationPages: DocumentationPageRoomDump.array()
|
|
4269
4318
|
});
|
|
4270
|
-
var DesignSystemVersionDump =
|
|
4319
|
+
var DesignSystemVersionDump = z130.object({
|
|
4271
4320
|
version: DesignSystemVersion,
|
|
4272
4321
|
brands: Brand.array(),
|
|
4273
4322
|
elements: DesignElement.array(),
|
|
@@ -4282,7 +4331,7 @@ var DesignSystemVersionDump = z129.object({
|
|
|
4282
4331
|
});
|
|
4283
4332
|
|
|
4284
4333
|
// src/data-dumps/design-system-dump.ts
|
|
4285
|
-
var DesignSystemDump =
|
|
4334
|
+
var DesignSystemDump = z131.object({
|
|
4286
4335
|
designSystem: DesignSystem,
|
|
4287
4336
|
dataSources: DataSource.array(),
|
|
4288
4337
|
versions: DesignSystemVersionDump.array(),
|
|
@@ -4291,27 +4340,27 @@ var DesignSystemDump = z130.object({
|
|
|
4291
4340
|
});
|
|
4292
4341
|
|
|
4293
4342
|
// src/data-dumps/user-data-dump.ts
|
|
4294
|
-
import { z as
|
|
4343
|
+
import { z as z143 } from "zod";
|
|
4295
4344
|
|
|
4296
4345
|
// src/users/linked-integrations.ts
|
|
4297
|
-
import { z as
|
|
4298
|
-
var IntegrationAuthType =
|
|
4299
|
-
var ExternalServiceType =
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4346
|
+
import { z as z132 } from "zod";
|
|
4347
|
+
var IntegrationAuthType = z132.union([z132.literal("OAuth2"), z132.literal("PAT")]);
|
|
4348
|
+
var ExternalServiceType = z132.union([
|
|
4349
|
+
z132.literal("figma"),
|
|
4350
|
+
z132.literal("github"),
|
|
4351
|
+
z132.literal("azure"),
|
|
4352
|
+
z132.literal("gitlab"),
|
|
4353
|
+
z132.literal("bitbucket")
|
|
4305
4354
|
]);
|
|
4306
|
-
var IntegrationUserInfo =
|
|
4307
|
-
id:
|
|
4308
|
-
handle:
|
|
4309
|
-
avatarUrl:
|
|
4310
|
-
email:
|
|
4355
|
+
var IntegrationUserInfo = z132.object({
|
|
4356
|
+
id: z132.string(),
|
|
4357
|
+
handle: z132.string().optional(),
|
|
4358
|
+
avatarUrl: z132.string().optional(),
|
|
4359
|
+
email: z132.string().optional(),
|
|
4311
4360
|
authType: IntegrationAuthType.optional(),
|
|
4312
|
-
customUrl:
|
|
4361
|
+
customUrl: z132.string().optional()
|
|
4313
4362
|
});
|
|
4314
|
-
var UserLinkedIntegrations =
|
|
4363
|
+
var UserLinkedIntegrations = z132.object({
|
|
4315
4364
|
figma: IntegrationUserInfo.optional(),
|
|
4316
4365
|
github: IntegrationUserInfo.array().optional(),
|
|
4317
4366
|
azure: IntegrationUserInfo.array().optional(),
|
|
@@ -4320,46 +4369,46 @@ var UserLinkedIntegrations = z131.object({
|
|
|
4320
4369
|
});
|
|
4321
4370
|
|
|
4322
4371
|
// src/users/user-analytics-cleanup-schedule.ts
|
|
4323
|
-
import { z as
|
|
4324
|
-
var UserAnalyticsCleanupSchedule =
|
|
4325
|
-
userId:
|
|
4326
|
-
createdAt:
|
|
4327
|
-
deleteAt:
|
|
4372
|
+
import { z as z133 } from "zod";
|
|
4373
|
+
var UserAnalyticsCleanupSchedule = z133.object({
|
|
4374
|
+
userId: z133.string(),
|
|
4375
|
+
createdAt: z133.coerce.date(),
|
|
4376
|
+
deleteAt: z133.coerce.date()
|
|
4328
4377
|
});
|
|
4329
4378
|
var UserAnalyticsCleanupScheduleDbInput = UserAnalyticsCleanupSchedule.omit({
|
|
4330
4379
|
createdAt: true
|
|
4331
4380
|
});
|
|
4332
4381
|
|
|
4333
4382
|
// src/users/user-create.ts
|
|
4334
|
-
import { z as
|
|
4335
|
-
var CreateUserInput =
|
|
4336
|
-
email:
|
|
4337
|
-
name:
|
|
4338
|
-
username:
|
|
4383
|
+
import { z as z134 } from "zod";
|
|
4384
|
+
var CreateUserInput = z134.object({
|
|
4385
|
+
email: z134.string(),
|
|
4386
|
+
name: z134.string(),
|
|
4387
|
+
username: z134.string()
|
|
4339
4388
|
});
|
|
4340
4389
|
|
|
4341
4390
|
// src/users/user-identity.ts
|
|
4342
|
-
import { z as
|
|
4343
|
-
var UserIdentity =
|
|
4344
|
-
id:
|
|
4345
|
-
userId:
|
|
4391
|
+
import { z as z135 } from "zod";
|
|
4392
|
+
var UserIdentity = z135.object({
|
|
4393
|
+
id: z135.string(),
|
|
4394
|
+
userId: z135.string()
|
|
4346
4395
|
});
|
|
4347
4396
|
|
|
4348
4397
|
// src/users/user-minified.ts
|
|
4349
|
-
import { z as
|
|
4350
|
-
var UserMinified =
|
|
4351
|
-
id:
|
|
4352
|
-
name:
|
|
4353
|
-
email:
|
|
4354
|
-
avatar:
|
|
4398
|
+
import { z as z136 } from "zod";
|
|
4399
|
+
var UserMinified = z136.object({
|
|
4400
|
+
id: z136.string(),
|
|
4401
|
+
name: z136.string(),
|
|
4402
|
+
email: z136.string(),
|
|
4403
|
+
avatar: z136.string().optional()
|
|
4355
4404
|
});
|
|
4356
4405
|
|
|
4357
4406
|
// src/users/user-notification-settings.ts
|
|
4358
|
-
import { z as
|
|
4359
|
-
var LiveblocksNotificationSettings =
|
|
4360
|
-
sendCommentNotificationEmails:
|
|
4407
|
+
import { z as z137 } from "zod";
|
|
4408
|
+
var LiveblocksNotificationSettings = z137.object({
|
|
4409
|
+
sendCommentNotificationEmails: z137.boolean()
|
|
4361
4410
|
});
|
|
4362
|
-
var UserNotificationSettings =
|
|
4411
|
+
var UserNotificationSettings = z137.object({
|
|
4363
4412
|
liveblocksNotificationSettings: LiveblocksNotificationSettings
|
|
4364
4413
|
});
|
|
4365
4414
|
var defaultNotificationSettings = {
|
|
@@ -4369,25 +4418,25 @@ var defaultNotificationSettings = {
|
|
|
4369
4418
|
};
|
|
4370
4419
|
|
|
4371
4420
|
// src/users/user-profile.ts
|
|
4372
|
-
import { z as
|
|
4373
|
-
var UserOnboardingDepartment =
|
|
4374
|
-
var UserOnboardingJobLevel =
|
|
4375
|
-
var UserOnboarding =
|
|
4376
|
-
companyName:
|
|
4377
|
-
numberOfPeopleInOrg:
|
|
4378
|
-
numberOfPeopleInDesignTeam:
|
|
4421
|
+
import { z as z138 } from "zod";
|
|
4422
|
+
var UserOnboardingDepartment = z138.enum(["Design", "Engineering", "Product", "Brand", "Other"]);
|
|
4423
|
+
var UserOnboardingJobLevel = z138.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
4424
|
+
var UserOnboarding = z138.object({
|
|
4425
|
+
companyName: z138.string().optional(),
|
|
4426
|
+
numberOfPeopleInOrg: z138.string().optional(),
|
|
4427
|
+
numberOfPeopleInDesignTeam: z138.string().optional(),
|
|
4379
4428
|
department: UserOnboardingDepartment.optional(),
|
|
4380
|
-
jobTitle:
|
|
4381
|
-
phase:
|
|
4429
|
+
jobTitle: z138.string().optional(),
|
|
4430
|
+
phase: z138.string().optional(),
|
|
4382
4431
|
jobLevel: UserOnboardingJobLevel.optional(),
|
|
4383
|
-
designSystemName:
|
|
4384
|
-
defaultDestination:
|
|
4385
|
-
figmaUrl:
|
|
4386
|
-
});
|
|
4387
|
-
var UserProfile =
|
|
4388
|
-
name:
|
|
4389
|
-
avatar:
|
|
4390
|
-
nickname:
|
|
4432
|
+
designSystemName: z138.string().optional(),
|
|
4433
|
+
defaultDestination: z138.string().optional(),
|
|
4434
|
+
figmaUrl: z138.string().optional()
|
|
4435
|
+
});
|
|
4436
|
+
var UserProfile = z138.object({
|
|
4437
|
+
name: z138.string(),
|
|
4438
|
+
avatar: z138.string().optional(),
|
|
4439
|
+
nickname: z138.string().optional(),
|
|
4391
4440
|
onboarding: UserOnboarding.optional()
|
|
4392
4441
|
});
|
|
4393
4442
|
var UserProfileUpdate = UserProfile.partial().omit({
|
|
@@ -4395,68 +4444,68 @@ var UserProfileUpdate = UserProfile.partial().omit({
|
|
|
4395
4444
|
});
|
|
4396
4445
|
|
|
4397
4446
|
// src/users/user-test.ts
|
|
4398
|
-
import { z as
|
|
4399
|
-
var UserTest =
|
|
4400
|
-
id:
|
|
4401
|
-
email:
|
|
4447
|
+
import { z as z139 } from "zod";
|
|
4448
|
+
var UserTest = z139.object({
|
|
4449
|
+
id: z139.string(),
|
|
4450
|
+
email: z139.string()
|
|
4402
4451
|
});
|
|
4403
4452
|
|
|
4404
4453
|
// src/users/user.ts
|
|
4405
|
-
import { z as
|
|
4406
|
-
var User =
|
|
4407
|
-
id:
|
|
4408
|
-
email:
|
|
4409
|
-
emailVerified:
|
|
4410
|
-
createdAt:
|
|
4411
|
-
trialExpiresAt:
|
|
4454
|
+
import { z as z140 } from "zod";
|
|
4455
|
+
var User = z140.object({
|
|
4456
|
+
id: z140.string(),
|
|
4457
|
+
email: z140.string(),
|
|
4458
|
+
emailVerified: z140.boolean(),
|
|
4459
|
+
createdAt: z140.coerce.date(),
|
|
4460
|
+
trialExpiresAt: z140.coerce.date().optional(),
|
|
4412
4461
|
profile: UserProfile,
|
|
4413
4462
|
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
4414
|
-
loggedOutAt:
|
|
4415
|
-
isProtected:
|
|
4463
|
+
loggedOutAt: z140.coerce.date().optional(),
|
|
4464
|
+
isProtected: z140.boolean()
|
|
4416
4465
|
});
|
|
4417
4466
|
|
|
4418
4467
|
// src/data-dumps/workspace-dump.ts
|
|
4419
|
-
import { z as
|
|
4468
|
+
import { z as z142 } from "zod";
|
|
4420
4469
|
|
|
4421
4470
|
// src/integrations/integration.ts
|
|
4422
|
-
import { z as
|
|
4423
|
-
var IntegrationDesignSystem =
|
|
4424
|
-
designSystemId:
|
|
4425
|
-
brandId:
|
|
4426
|
-
title:
|
|
4427
|
-
userId:
|
|
4428
|
-
date:
|
|
4429
|
-
});
|
|
4430
|
-
var IntegrationCredentialsType =
|
|
4431
|
-
var IntegrationCredentialsState =
|
|
4432
|
-
var IntegrationCredentialsProfile =
|
|
4433
|
-
id: nullishToOptional(
|
|
4434
|
-
email: nullishToOptional(
|
|
4435
|
-
handle: nullishToOptional(
|
|
4436
|
-
type: nullishToOptional(
|
|
4437
|
-
avatarUrl: nullishToOptional(
|
|
4438
|
-
organization: nullishToOptional(
|
|
4439
|
-
collection: nullishToOptional(
|
|
4440
|
-
});
|
|
4441
|
-
var IntegrationCredentials =
|
|
4442
|
-
id:
|
|
4471
|
+
import { z as z141 } from "zod";
|
|
4472
|
+
var IntegrationDesignSystem = z141.object({
|
|
4473
|
+
designSystemId: z141.string(),
|
|
4474
|
+
brandId: z141.string(),
|
|
4475
|
+
title: z141.string().optional(),
|
|
4476
|
+
userId: z141.string().optional(),
|
|
4477
|
+
date: z141.coerce.date().optional()
|
|
4478
|
+
});
|
|
4479
|
+
var IntegrationCredentialsType = z141.enum(["OAuth2", "PAT", "GithubApp"]);
|
|
4480
|
+
var IntegrationCredentialsState = z141.enum(["Active", "Inactive"]);
|
|
4481
|
+
var IntegrationCredentialsProfile = z141.object({
|
|
4482
|
+
id: nullishToOptional(z141.string()),
|
|
4483
|
+
email: nullishToOptional(z141.string()),
|
|
4484
|
+
handle: nullishToOptional(z141.string()),
|
|
4485
|
+
type: nullishToOptional(z141.string()),
|
|
4486
|
+
avatarUrl: nullishToOptional(z141.string()),
|
|
4487
|
+
organization: nullishToOptional(z141.string()),
|
|
4488
|
+
collection: nullishToOptional(z141.string())
|
|
4489
|
+
});
|
|
4490
|
+
var IntegrationCredentials = z141.object({
|
|
4491
|
+
id: z141.string(),
|
|
4443
4492
|
type: IntegrationCredentialsType,
|
|
4444
|
-
integrationId:
|
|
4445
|
-
accessToken:
|
|
4446
|
-
userId:
|
|
4447
|
-
createdAt:
|
|
4448
|
-
refreshToken:
|
|
4449
|
-
tokenName:
|
|
4450
|
-
expiresAt:
|
|
4451
|
-
refreshedAt:
|
|
4452
|
-
username:
|
|
4453
|
-
appInstallationId:
|
|
4493
|
+
integrationId: z141.string(),
|
|
4494
|
+
accessToken: z141.string(),
|
|
4495
|
+
userId: z141.string(),
|
|
4496
|
+
createdAt: z141.coerce.date(),
|
|
4497
|
+
refreshToken: z141.string().optional(),
|
|
4498
|
+
tokenName: z141.string().optional(),
|
|
4499
|
+
expiresAt: z141.coerce.date().optional(),
|
|
4500
|
+
refreshedAt: z141.coerce.date().optional(),
|
|
4501
|
+
username: z141.string().optional(),
|
|
4502
|
+
appInstallationId: z141.string().optional(),
|
|
4454
4503
|
profile: IntegrationCredentialsProfile.optional(),
|
|
4455
|
-
customUrl:
|
|
4504
|
+
customUrl: z141.string().optional(),
|
|
4456
4505
|
state: IntegrationCredentialsState,
|
|
4457
4506
|
user: UserMinified.optional()
|
|
4458
4507
|
});
|
|
4459
|
-
var ExtendedIntegrationType =
|
|
4508
|
+
var ExtendedIntegrationType = z141.enum([
|
|
4460
4509
|
"Figma",
|
|
4461
4510
|
"Github",
|
|
4462
4511
|
"Gitlab",
|
|
@@ -4467,26 +4516,26 @@ var ExtendedIntegrationType = z140.enum([
|
|
|
4467
4516
|
]);
|
|
4468
4517
|
var IntegrationType = ExtendedIntegrationType.exclude(["TokenStudio", "FigmaVariablesPlugin"]);
|
|
4469
4518
|
var GitIntegrationType = IntegrationType.exclude(["Figma"]);
|
|
4470
|
-
var Integration =
|
|
4471
|
-
id:
|
|
4472
|
-
workspaceId:
|
|
4519
|
+
var Integration = z141.object({
|
|
4520
|
+
id: z141.string(),
|
|
4521
|
+
workspaceId: z141.string(),
|
|
4473
4522
|
type: IntegrationType,
|
|
4474
|
-
createdAt:
|
|
4475
|
-
integrationCredentials:
|
|
4476
|
-
});
|
|
4477
|
-
var IntegrationToken =
|
|
4478
|
-
access_token:
|
|
4479
|
-
refresh_token:
|
|
4480
|
-
expires_in:
|
|
4481
|
-
token_type:
|
|
4482
|
-
token_name:
|
|
4483
|
-
token_azure_organization_name:
|
|
4523
|
+
createdAt: z141.coerce.date(),
|
|
4524
|
+
integrationCredentials: z141.array(IntegrationCredentials).optional()
|
|
4525
|
+
});
|
|
4526
|
+
var IntegrationToken = z141.object({
|
|
4527
|
+
access_token: z141.string(),
|
|
4528
|
+
refresh_token: z141.string().optional(),
|
|
4529
|
+
expires_in: z141.union([z141.number().optional(), z141.string().optional()]),
|
|
4530
|
+
token_type: z141.string().optional(),
|
|
4531
|
+
token_name: z141.string().optional(),
|
|
4532
|
+
token_azure_organization_name: z141.string().optional(),
|
|
4484
4533
|
// Azure Cloud PAT only
|
|
4485
|
-
token_azure_collection_name:
|
|
4534
|
+
token_azure_collection_name: z141.string().optional(),
|
|
4486
4535
|
// Azure Server PAT only
|
|
4487
|
-
token_bitbucket_username:
|
|
4536
|
+
token_bitbucket_username: z141.string().optional(),
|
|
4488
4537
|
// Bitbucket only
|
|
4489
|
-
custom_url:
|
|
4538
|
+
custom_url: z141.string().optional().transform((value) => {
|
|
4490
4539
|
if (!value?.trim())
|
|
4491
4540
|
return void 0;
|
|
4492
4541
|
return formatCustomUrl(value);
|
|
@@ -4524,7 +4573,7 @@ function formatCustomUrl(url) {
|
|
|
4524
4573
|
}
|
|
4525
4574
|
|
|
4526
4575
|
// src/data-dumps/workspace-dump.ts
|
|
4527
|
-
var WorkspaceDump =
|
|
4576
|
+
var WorkspaceDump = z142.object({
|
|
4528
4577
|
workspace: Workspace,
|
|
4529
4578
|
designSystems: DesignSystemDump.array(),
|
|
4530
4579
|
codeIntegration: CodeIntegrationDump,
|
|
@@ -4532,70 +4581,70 @@ var WorkspaceDump = z141.object({
|
|
|
4532
4581
|
});
|
|
4533
4582
|
|
|
4534
4583
|
// src/data-dumps/user-data-dump.ts
|
|
4535
|
-
var UserDump =
|
|
4584
|
+
var UserDump = z143.object({
|
|
4536
4585
|
user: User,
|
|
4537
4586
|
workspaces: WorkspaceDump.array()
|
|
4538
4587
|
});
|
|
4539
4588
|
|
|
4540
4589
|
// src/docs-server/session.ts
|
|
4541
|
-
import { z as
|
|
4542
|
-
var NpmProxyToken =
|
|
4543
|
-
access:
|
|
4544
|
-
expiresAt:
|
|
4590
|
+
import { z as z144 } from "zod";
|
|
4591
|
+
var NpmProxyToken = z144.object({
|
|
4592
|
+
access: z144.string(),
|
|
4593
|
+
expiresAt: z144.number()
|
|
4545
4594
|
});
|
|
4546
|
-
var SessionData =
|
|
4547
|
-
returnToUrl:
|
|
4595
|
+
var SessionData = z144.object({
|
|
4596
|
+
returnToUrl: z144.string().optional(),
|
|
4548
4597
|
npmProxyToken: NpmProxyToken.optional()
|
|
4549
4598
|
});
|
|
4550
|
-
var Session =
|
|
4551
|
-
id:
|
|
4552
|
-
expiresAt:
|
|
4553
|
-
userId:
|
|
4599
|
+
var Session = z144.object({
|
|
4600
|
+
id: z144.string(),
|
|
4601
|
+
expiresAt: z144.coerce.date(),
|
|
4602
|
+
userId: z144.string().nullable(),
|
|
4554
4603
|
data: SessionData
|
|
4555
4604
|
});
|
|
4556
|
-
var AuthTokens =
|
|
4557
|
-
access:
|
|
4558
|
-
refresh:
|
|
4605
|
+
var AuthTokens = z144.object({
|
|
4606
|
+
access: z144.string(),
|
|
4607
|
+
refresh: z144.string()
|
|
4559
4608
|
});
|
|
4560
|
-
var UserSession =
|
|
4609
|
+
var UserSession = z144.object({
|
|
4561
4610
|
session: Session,
|
|
4562
4611
|
user: User.nullable()
|
|
4563
4612
|
});
|
|
4564
4613
|
|
|
4565
4614
|
// src/export/export-runner/export-context.ts
|
|
4566
|
-
import { z as
|
|
4567
|
-
var ExportJobDocumentationContext =
|
|
4568
|
-
isSingleVersionDocs:
|
|
4569
|
-
versionSlug:
|
|
4615
|
+
import { z as z145 } from "zod";
|
|
4616
|
+
var ExportJobDocumentationContext = z145.object({
|
|
4617
|
+
isSingleVersionDocs: z145.boolean(),
|
|
4618
|
+
versionSlug: z145.string(),
|
|
4570
4619
|
environment: PublishedDocEnvironment
|
|
4571
4620
|
});
|
|
4572
|
-
var ExportJobContext =
|
|
4573
|
-
apiUrl:
|
|
4574
|
-
accessToken:
|
|
4575
|
-
designSystemId:
|
|
4576
|
-
designSystemName:
|
|
4577
|
-
exporterId:
|
|
4578
|
-
versionId:
|
|
4579
|
-
brandId:
|
|
4580
|
-
themeId:
|
|
4581
|
-
exporterName:
|
|
4582
|
-
exporterPackageUrl:
|
|
4621
|
+
var ExportJobContext = z145.object({
|
|
4622
|
+
apiUrl: z145.string(),
|
|
4623
|
+
accessToken: z145.string(),
|
|
4624
|
+
designSystemId: z145.string(),
|
|
4625
|
+
designSystemName: z145.string(),
|
|
4626
|
+
exporterId: z145.string(),
|
|
4627
|
+
versionId: z145.string(),
|
|
4628
|
+
brandId: z145.string().optional(),
|
|
4629
|
+
themeId: z145.string().optional(),
|
|
4630
|
+
exporterName: z145.string(),
|
|
4631
|
+
exporterPackageUrl: z145.string(),
|
|
4583
4632
|
exporterPropertyValues: ExporterPropertyValue.array(),
|
|
4584
4633
|
documentation: ExportJobDocumentationContext.optional()
|
|
4585
4634
|
});
|
|
4586
4635
|
|
|
4587
4636
|
// src/export/export-runner/exporter-payload.ts
|
|
4588
|
-
import { z as
|
|
4589
|
-
var ExporterFunctionPayload =
|
|
4590
|
-
exportJobId:
|
|
4591
|
-
exportContextId:
|
|
4592
|
-
designSystemId:
|
|
4593
|
-
workspaceId:
|
|
4637
|
+
import { z as z146 } from "zod";
|
|
4638
|
+
var ExporterFunctionPayload = z146.object({
|
|
4639
|
+
exportJobId: z146.string(),
|
|
4640
|
+
exportContextId: z146.string(),
|
|
4641
|
+
designSystemId: z146.string(),
|
|
4642
|
+
workspaceId: z146.string()
|
|
4594
4643
|
});
|
|
4595
4644
|
|
|
4596
4645
|
// src/export/export-jobs.ts
|
|
4597
|
-
import { z as
|
|
4598
|
-
var ExportJobDestinationType =
|
|
4646
|
+
import { z as z147 } from "zod";
|
|
4647
|
+
var ExportJobDestinationType = z147.enum([
|
|
4599
4648
|
"s3",
|
|
4600
4649
|
"webhookUrl",
|
|
4601
4650
|
"github",
|
|
@@ -4604,30 +4653,30 @@ var ExportJobDestinationType = z146.enum([
|
|
|
4604
4653
|
"gitlab",
|
|
4605
4654
|
"bitbucket"
|
|
4606
4655
|
]);
|
|
4607
|
-
var ExportJobStatus =
|
|
4608
|
-
var ExportJobLogEntryType =
|
|
4609
|
-
var ExportJobLogEntry =
|
|
4610
|
-
id:
|
|
4611
|
-
time:
|
|
4656
|
+
var ExportJobStatus = z147.enum(["InProgress", "Success", "Failed", "Timeout"]);
|
|
4657
|
+
var ExportJobLogEntryType = z147.enum(["success", "info", "warning", "error", "user"]);
|
|
4658
|
+
var ExportJobLogEntry = z147.object({
|
|
4659
|
+
id: z147.string().optional(),
|
|
4660
|
+
time: z147.coerce.date(),
|
|
4612
4661
|
type: ExportJobLogEntryType,
|
|
4613
|
-
message:
|
|
4662
|
+
message: z147.string()
|
|
4614
4663
|
});
|
|
4615
|
-
var ExportJobPullRequestDestinationResult =
|
|
4616
|
-
pullRequestUrl:
|
|
4664
|
+
var ExportJobPullRequestDestinationResult = z147.object({
|
|
4665
|
+
pullRequestUrl: z147.string()
|
|
4617
4666
|
});
|
|
4618
|
-
var ExportJobS3DestinationResult =
|
|
4619
|
-
bucket:
|
|
4620
|
-
urlPrefix:
|
|
4621
|
-
path:
|
|
4622
|
-
files:
|
|
4623
|
-
url: nullishToOptional(
|
|
4624
|
-
urls: nullishToOptional(
|
|
4667
|
+
var ExportJobS3DestinationResult = z147.object({
|
|
4668
|
+
bucket: z147.string(),
|
|
4669
|
+
urlPrefix: z147.string().optional(),
|
|
4670
|
+
path: z147.string(),
|
|
4671
|
+
files: z147.array(z147.string()),
|
|
4672
|
+
url: nullishToOptional(z147.string()),
|
|
4673
|
+
urls: nullishToOptional(z147.string().array())
|
|
4625
4674
|
});
|
|
4626
|
-
var ExportJobDocsDestinationResult =
|
|
4627
|
-
url:
|
|
4675
|
+
var ExportJobDocsDestinationResult = z147.object({
|
|
4676
|
+
url: z147.string()
|
|
4628
4677
|
});
|
|
4629
|
-
var ExportJobResult =
|
|
4630
|
-
error:
|
|
4678
|
+
var ExportJobResult = z147.object({
|
|
4679
|
+
error: z147.string().optional(),
|
|
4631
4680
|
s3: nullishToOptional(ExportJobS3DestinationResult),
|
|
4632
4681
|
github: nullishToOptional(ExportJobPullRequestDestinationResult),
|
|
4633
4682
|
azure: nullishToOptional(ExportJobPullRequestDestinationResult),
|
|
@@ -4636,21 +4685,21 @@ var ExportJobResult = z146.object({
|
|
|
4636
4685
|
sndocs: nullishToOptional(ExportJobDocsDestinationResult),
|
|
4637
4686
|
logs: nullishToOptional(ExportJobLogEntry.array())
|
|
4638
4687
|
});
|
|
4639
|
-
var ExportJob =
|
|
4640
|
-
id:
|
|
4641
|
-
createdAt:
|
|
4642
|
-
finishedAt:
|
|
4643
|
-
designSystemId:
|
|
4644
|
-
designSystemVersionId:
|
|
4645
|
-
workspaceId:
|
|
4646
|
-
scheduleId:
|
|
4647
|
-
exporterId:
|
|
4648
|
-
brandId:
|
|
4649
|
-
themeId:
|
|
4650
|
-
estimatedExecutionTime:
|
|
4688
|
+
var ExportJob = z147.object({
|
|
4689
|
+
id: z147.string(),
|
|
4690
|
+
createdAt: z147.coerce.date(),
|
|
4691
|
+
finishedAt: z147.coerce.date().optional(),
|
|
4692
|
+
designSystemId: z147.string(),
|
|
4693
|
+
designSystemVersionId: z147.string(),
|
|
4694
|
+
workspaceId: z147.string(),
|
|
4695
|
+
scheduleId: z147.string().nullish(),
|
|
4696
|
+
exporterId: z147.string(),
|
|
4697
|
+
brandId: z147.string().optional(),
|
|
4698
|
+
themeId: z147.string().optional(),
|
|
4699
|
+
estimatedExecutionTime: z147.number().optional(),
|
|
4651
4700
|
status: ExportJobStatus,
|
|
4652
4701
|
result: ExportJobResult.optional(),
|
|
4653
|
-
createdByUserId:
|
|
4702
|
+
createdByUserId: z147.string().optional(),
|
|
4654
4703
|
// Destinations
|
|
4655
4704
|
...ExportDestinationsMap.shape
|
|
4656
4705
|
});
|
|
@@ -4664,40 +4713,40 @@ var ExportJobFindByFilter = ExportJob.pick({
|
|
|
4664
4713
|
themeId: true,
|
|
4665
4714
|
brandId: true
|
|
4666
4715
|
}).extend({
|
|
4667
|
-
destinations:
|
|
4716
|
+
destinations: z147.array(ExportJobDestinationType),
|
|
4668
4717
|
docsEnvironment: PublishedDocEnvironment
|
|
4669
4718
|
}).partial();
|
|
4670
4719
|
|
|
4671
4720
|
// src/export/exporter-workspace-membership-role.ts
|
|
4672
|
-
import { z as
|
|
4673
|
-
var ExporterWorkspaceMembershipRole =
|
|
4721
|
+
import { z as z148 } from "zod";
|
|
4722
|
+
var ExporterWorkspaceMembershipRole = z148.enum(["Owner", "OwnerArchived", "User"]);
|
|
4674
4723
|
|
|
4675
4724
|
// src/export/exporter-workspace-membership.ts
|
|
4676
|
-
import { z as
|
|
4677
|
-
var ExporterWorkspaceMembership =
|
|
4678
|
-
id:
|
|
4679
|
-
workspaceId:
|
|
4680
|
-
exporterId:
|
|
4725
|
+
import { z as z149 } from "zod";
|
|
4726
|
+
var ExporterWorkspaceMembership = z149.object({
|
|
4727
|
+
id: z149.string(),
|
|
4728
|
+
workspaceId: z149.string(),
|
|
4729
|
+
exporterId: z149.string(),
|
|
4681
4730
|
role: ExporterWorkspaceMembershipRole
|
|
4682
4731
|
});
|
|
4683
4732
|
|
|
4684
4733
|
// src/feature-flags/feature-flags.ts
|
|
4685
|
-
import { z as
|
|
4686
|
-
var FlaggedFeature =
|
|
4687
|
-
var FeatureFlagMap =
|
|
4688
|
-
var FeatureFlag =
|
|
4689
|
-
id:
|
|
4734
|
+
import { z as z150 } from "zod";
|
|
4735
|
+
var FlaggedFeature = z150.enum(["FigmaImporterV2", "ShadowOpacityOptional", "DisableImporter"]);
|
|
4736
|
+
var FeatureFlagMap = z150.record(FlaggedFeature, z150.boolean());
|
|
4737
|
+
var FeatureFlag = z150.object({
|
|
4738
|
+
id: z150.string(),
|
|
4690
4739
|
feature: FlaggedFeature,
|
|
4691
|
-
createdAt:
|
|
4692
|
-
enabled:
|
|
4693
|
-
designSystemId:
|
|
4740
|
+
createdAt: z150.coerce.date(),
|
|
4741
|
+
enabled: z150.boolean(),
|
|
4742
|
+
designSystemId: z150.string().optional()
|
|
4694
4743
|
});
|
|
4695
4744
|
|
|
4696
4745
|
// src/integrations/external-oauth-request.ts
|
|
4697
|
-
import { z as
|
|
4746
|
+
import { z as z152 } from "zod";
|
|
4698
4747
|
|
|
4699
4748
|
// src/integrations/oauth-providers.ts
|
|
4700
|
-
import { z as
|
|
4749
|
+
import { z as z151 } from "zod";
|
|
4701
4750
|
var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
4702
4751
|
OAuthProviderNames2["Figma"] = "figma";
|
|
4703
4752
|
OAuthProviderNames2["Azure"] = "azure";
|
|
@@ -4706,137 +4755,137 @@ var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
|
4706
4755
|
OAuthProviderNames2["Bitbucket"] = "bitbucket";
|
|
4707
4756
|
return OAuthProviderNames2;
|
|
4708
4757
|
})(OAuthProviderNames || {});
|
|
4709
|
-
var OAuthProviderSchema =
|
|
4758
|
+
var OAuthProviderSchema = z151.nativeEnum(OAuthProviderNames);
|
|
4710
4759
|
var OAuthProvider = OAuthProviderSchema.enum;
|
|
4711
4760
|
|
|
4712
4761
|
// src/integrations/external-oauth-request.ts
|
|
4713
|
-
var ExternalOAuthRequest =
|
|
4714
|
-
id:
|
|
4762
|
+
var ExternalOAuthRequest = z152.object({
|
|
4763
|
+
id: z152.string(),
|
|
4715
4764
|
provider: OAuthProviderSchema,
|
|
4716
|
-
userId:
|
|
4717
|
-
state:
|
|
4718
|
-
createdAt:
|
|
4765
|
+
userId: z152.string(),
|
|
4766
|
+
state: z152.string(),
|
|
4767
|
+
createdAt: z152.coerce.date()
|
|
4719
4768
|
});
|
|
4720
4769
|
|
|
4721
4770
|
// src/integrations/git.ts
|
|
4722
|
-
import { z as
|
|
4723
|
-
var GitObjectsQuery =
|
|
4724
|
-
organization:
|
|
4771
|
+
import { z as z153 } from "zod";
|
|
4772
|
+
var GitObjectsQuery = z153.object({
|
|
4773
|
+
organization: z153.string().optional(),
|
|
4725
4774
|
// Azure Organization | Bitbucket Workspace slug | Gitlab Group | Github Account (User or Organization)
|
|
4726
|
-
project:
|
|
4775
|
+
project: z153.string().optional(),
|
|
4727
4776
|
// Only for Bitbucket and Azure
|
|
4728
|
-
repository:
|
|
4777
|
+
repository: z153.string().optional(),
|
|
4729
4778
|
// For all providers. For Gitlab, it's called "project".
|
|
4730
|
-
branch:
|
|
4779
|
+
branch: z153.string().optional(),
|
|
4731
4780
|
// For all providers.
|
|
4732
|
-
user:
|
|
4781
|
+
user: z153.string().optional()
|
|
4733
4782
|
// Gitlab user
|
|
4734
4783
|
});
|
|
4735
|
-
var GitOrganization =
|
|
4736
|
-
id:
|
|
4737
|
-
name:
|
|
4738
|
-
url:
|
|
4739
|
-
slug:
|
|
4784
|
+
var GitOrganization = z153.object({
|
|
4785
|
+
id: z153.string(),
|
|
4786
|
+
name: z153.string(),
|
|
4787
|
+
url: z153.string(),
|
|
4788
|
+
slug: z153.string()
|
|
4740
4789
|
});
|
|
4741
|
-
var GitProject =
|
|
4742
|
-
id:
|
|
4743
|
-
name:
|
|
4744
|
-
url:
|
|
4745
|
-
slug:
|
|
4790
|
+
var GitProject = z153.object({
|
|
4791
|
+
id: z153.string(),
|
|
4792
|
+
name: z153.string(),
|
|
4793
|
+
url: z153.string(),
|
|
4794
|
+
slug: z153.string()
|
|
4746
4795
|
});
|
|
4747
|
-
var GitRepository =
|
|
4748
|
-
id:
|
|
4749
|
-
name:
|
|
4750
|
-
url:
|
|
4751
|
-
slug:
|
|
4796
|
+
var GitRepository = z153.object({
|
|
4797
|
+
id: z153.string(),
|
|
4798
|
+
name: z153.string(),
|
|
4799
|
+
url: z153.string(),
|
|
4800
|
+
slug: z153.string(),
|
|
4752
4801
|
/**
|
|
4753
4802
|
* Can be undefined when:
|
|
4754
4803
|
* - there are no branches in the repository yet
|
|
4755
4804
|
* - Git provider doesn't expose this information on a repository via their API
|
|
4756
4805
|
*/
|
|
4757
|
-
defaultBranch:
|
|
4806
|
+
defaultBranch: z153.string().optional()
|
|
4758
4807
|
});
|
|
4759
|
-
var GitBranch =
|
|
4760
|
-
name:
|
|
4761
|
-
lastCommitId:
|
|
4808
|
+
var GitBranch = z153.object({
|
|
4809
|
+
name: z153.string(),
|
|
4810
|
+
lastCommitId: z153.string()
|
|
4762
4811
|
});
|
|
4763
4812
|
|
|
4764
4813
|
// src/integrations/oauth-token.ts
|
|
4765
|
-
import { z as
|
|
4766
|
-
var IntegrationTokenSchemaOld =
|
|
4767
|
-
id:
|
|
4814
|
+
import { z as z154 } from "zod";
|
|
4815
|
+
var IntegrationTokenSchemaOld = z154.object({
|
|
4816
|
+
id: z154.string(),
|
|
4768
4817
|
provider: OAuthProviderSchema,
|
|
4769
|
-
scope:
|
|
4770
|
-
userId:
|
|
4771
|
-
accessToken:
|
|
4772
|
-
refreshToken:
|
|
4773
|
-
expiresAt:
|
|
4774
|
-
externalUserId:
|
|
4818
|
+
scope: z154.string(),
|
|
4819
|
+
userId: z154.string(),
|
|
4820
|
+
accessToken: z154.string(),
|
|
4821
|
+
refreshToken: z154.string(),
|
|
4822
|
+
expiresAt: z154.coerce.date(),
|
|
4823
|
+
externalUserId: z154.string().nullish()
|
|
4775
4824
|
});
|
|
4776
4825
|
|
|
4777
4826
|
// src/integrations/workspace-oauth-requests.ts
|
|
4778
|
-
import { z as
|
|
4779
|
-
var WorkspaceOAuthRequestSchema =
|
|
4780
|
-
id:
|
|
4781
|
-
workspaceId:
|
|
4827
|
+
import { z as z155 } from "zod";
|
|
4828
|
+
var WorkspaceOAuthRequestSchema = z155.object({
|
|
4829
|
+
id: z155.string(),
|
|
4830
|
+
workspaceId: z155.string(),
|
|
4782
4831
|
provider: OAuthProviderSchema,
|
|
4783
|
-
userId:
|
|
4784
|
-
createdAt:
|
|
4832
|
+
userId: z155.string(),
|
|
4833
|
+
createdAt: z155.coerce.date()
|
|
4785
4834
|
});
|
|
4786
4835
|
|
|
4787
4836
|
// src/npm/npm-package.ts
|
|
4788
|
-
import { z as
|
|
4789
|
-
var AnyRecord =
|
|
4837
|
+
import { z as z156 } from "zod";
|
|
4838
|
+
var AnyRecord = z156.record(z156.any());
|
|
4790
4839
|
var NpmPackageVersionDist = AnyRecord.and(
|
|
4791
|
-
|
|
4792
|
-
tarball:
|
|
4840
|
+
z156.object({
|
|
4841
|
+
tarball: z156.string()
|
|
4793
4842
|
})
|
|
4794
4843
|
);
|
|
4795
4844
|
var NpmPackageVersion = AnyRecord.and(
|
|
4796
|
-
|
|
4845
|
+
z156.object({
|
|
4797
4846
|
dist: NpmPackageVersionDist
|
|
4798
4847
|
})
|
|
4799
4848
|
);
|
|
4800
4849
|
var NpmPackage = AnyRecord.and(
|
|
4801
|
-
|
|
4802
|
-
_id:
|
|
4803
|
-
name:
|
|
4850
|
+
z156.object({
|
|
4851
|
+
_id: z156.string(),
|
|
4852
|
+
name: z156.string(),
|
|
4804
4853
|
// e.g. "latest": "1.2.3"
|
|
4805
|
-
"dist-tags":
|
|
4854
|
+
"dist-tags": z156.record(z156.string(), z156.string()),
|
|
4806
4855
|
// "1.2.3": {...}
|
|
4807
|
-
versions:
|
|
4856
|
+
versions: z156.record(NpmPackageVersion)
|
|
4808
4857
|
})
|
|
4809
4858
|
);
|
|
4810
4859
|
|
|
4811
4860
|
// src/npm/npm-proxy-token-payload.ts
|
|
4812
|
-
import { z as
|
|
4813
|
-
var NpmProxyTokenPayload =
|
|
4814
|
-
npmProxyRegistryConfigId:
|
|
4861
|
+
import { z as z157 } from "zod";
|
|
4862
|
+
var NpmProxyTokenPayload = z157.object({
|
|
4863
|
+
npmProxyRegistryConfigId: z157.string()
|
|
4815
4864
|
});
|
|
4816
4865
|
|
|
4817
4866
|
// src/tokens/personal-access-token.ts
|
|
4818
|
-
import { z as
|
|
4867
|
+
import { z as z165 } from "zod";
|
|
4819
4868
|
|
|
4820
4869
|
// src/workspace/user-invite.ts
|
|
4821
|
-
import { z as
|
|
4870
|
+
import { z as z159 } from "zod";
|
|
4822
4871
|
|
|
4823
4872
|
// src/workspace/workspace-role.ts
|
|
4824
|
-
import { z as
|
|
4825
|
-
var WorkspaceRoleSchema =
|
|
4873
|
+
import { z as z158 } from "zod";
|
|
4874
|
+
var WorkspaceRoleSchema = z158.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest"]);
|
|
4826
4875
|
var WorkspaceRole = WorkspaceRoleSchema.enum;
|
|
4827
4876
|
|
|
4828
4877
|
// src/workspace/user-invite.ts
|
|
4829
4878
|
var MAX_MEMBERS_COUNT = 100;
|
|
4830
|
-
var UserInvite =
|
|
4831
|
-
email:
|
|
4879
|
+
var UserInvite = z159.object({
|
|
4880
|
+
email: z159.string().email().trim().transform((value) => value.toLowerCase()),
|
|
4832
4881
|
role: WorkspaceRoleSchema
|
|
4833
4882
|
});
|
|
4834
|
-
var UserInvites =
|
|
4883
|
+
var UserInvites = z159.array(UserInvite).max(MAX_MEMBERS_COUNT);
|
|
4835
4884
|
|
|
4836
4885
|
// src/workspace/workspace-configuration.ts
|
|
4837
|
-
import { z as
|
|
4838
|
-
var WorkspaceConfigurationUpdate =
|
|
4839
|
-
id:
|
|
4886
|
+
import { z as z160 } from "zod";
|
|
4887
|
+
var WorkspaceConfigurationUpdate = z160.object({
|
|
4888
|
+
id: z160.string(),
|
|
4840
4889
|
ipWhitelist: WorkspaceIpSettings.optional(),
|
|
4841
4890
|
sso: SsoProvider.optional(),
|
|
4842
4891
|
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
@@ -4844,32 +4893,32 @@ var WorkspaceConfigurationUpdate = z159.object({
|
|
|
4844
4893
|
});
|
|
4845
4894
|
|
|
4846
4895
|
// src/workspace/workspace-context.ts
|
|
4847
|
-
import { z as
|
|
4848
|
-
var WorkspaceContext =
|
|
4849
|
-
workspaceId:
|
|
4896
|
+
import { z as z161 } from "zod";
|
|
4897
|
+
var WorkspaceContext = z161.object({
|
|
4898
|
+
workspaceId: z161.string(),
|
|
4850
4899
|
product: ProductCodeSchema,
|
|
4851
4900
|
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
4852
|
-
publicDesignSystem:
|
|
4901
|
+
publicDesignSystem: z161.boolean().optional()
|
|
4853
4902
|
});
|
|
4854
4903
|
|
|
4855
4904
|
// src/workspace/workspace-create.ts
|
|
4856
|
-
import { z as
|
|
4905
|
+
import { z as z162 } from "zod";
|
|
4857
4906
|
var WORKSPACE_NAME_MIN_LENGTH = 2;
|
|
4858
4907
|
var WORKSPACE_NAME_MAX_LENGTH = 64;
|
|
4859
4908
|
var HANDLE_MIN_LENGTH = 2;
|
|
4860
4909
|
var HANDLE_MAX_LENGTH = 64;
|
|
4861
|
-
var CreateWorkspaceInput =
|
|
4862
|
-
name:
|
|
4910
|
+
var CreateWorkspaceInput = z162.object({
|
|
4911
|
+
name: z162.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
|
|
4863
4912
|
product: ProductCodeSchema,
|
|
4864
|
-
priceId:
|
|
4865
|
-
billingEmail:
|
|
4866
|
-
handle:
|
|
4913
|
+
priceId: z162.string(),
|
|
4914
|
+
billingEmail: z162.string().email().optional(),
|
|
4915
|
+
handle: z162.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => value?.length > 0).optional(),
|
|
4867
4916
|
invites: UserInvites.optional(),
|
|
4868
|
-
promoCode:
|
|
4917
|
+
promoCode: z162.string().optional(),
|
|
4869
4918
|
status: InternalStatusSchema.optional(),
|
|
4870
4919
|
planInterval: BillingIntervalSchema.optional(),
|
|
4871
|
-
seats:
|
|
4872
|
-
seatLimit:
|
|
4920
|
+
seats: z162.number().optional(),
|
|
4921
|
+
seatLimit: z162.number().optional(),
|
|
4873
4922
|
card: CardSchema.optional(),
|
|
4874
4923
|
sso: SsoProvider.optional(),
|
|
4875
4924
|
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
@@ -4877,47 +4926,47 @@ var CreateWorkspaceInput = z161.object({
|
|
|
4877
4926
|
});
|
|
4878
4927
|
|
|
4879
4928
|
// src/workspace/workspace-invitations.ts
|
|
4880
|
-
import { z as z162 } from "zod";
|
|
4881
|
-
var WorkspaceInvitation = z162.object({
|
|
4882
|
-
id: z162.string(),
|
|
4883
|
-
email: z162.string().email(),
|
|
4884
|
-
createdAt: z162.coerce.date(),
|
|
4885
|
-
resentAt: z162.coerce.date().nullish(),
|
|
4886
|
-
role: z162.nativeEnum(WorkspaceRole),
|
|
4887
|
-
workspaceId: z162.string(),
|
|
4888
|
-
invitedBy: z162.string()
|
|
4889
|
-
});
|
|
4890
|
-
|
|
4891
|
-
// src/workspace/workspace-membership.ts
|
|
4892
4929
|
import { z as z163 } from "zod";
|
|
4893
|
-
var
|
|
4930
|
+
var WorkspaceInvitation = z163.object({
|
|
4894
4931
|
id: z163.string(),
|
|
4895
|
-
|
|
4932
|
+
email: z163.string().email(),
|
|
4933
|
+
createdAt: z163.coerce.date(),
|
|
4934
|
+
resentAt: z163.coerce.date().nullish(),
|
|
4935
|
+
role: z163.nativeEnum(WorkspaceRole),
|
|
4896
4936
|
workspaceId: z163.string(),
|
|
4897
|
-
|
|
4937
|
+
invitedBy: z163.string()
|
|
4938
|
+
});
|
|
4939
|
+
|
|
4940
|
+
// src/workspace/workspace-membership.ts
|
|
4941
|
+
import { z as z164 } from "zod";
|
|
4942
|
+
var WorkspaceMembership = z164.object({
|
|
4943
|
+
id: z164.string(),
|
|
4944
|
+
userId: z164.string(),
|
|
4945
|
+
workspaceId: z164.string(),
|
|
4946
|
+
workspaceRole: z164.nativeEnum(WorkspaceRole),
|
|
4898
4947
|
notificationSettings: UserNotificationSettings
|
|
4899
4948
|
});
|
|
4900
|
-
var UpdateMembershipRolesInput =
|
|
4901
|
-
members:
|
|
4902
|
-
|
|
4903
|
-
userId:
|
|
4904
|
-
role:
|
|
4949
|
+
var UpdateMembershipRolesInput = z164.object({
|
|
4950
|
+
members: z164.array(
|
|
4951
|
+
z164.object({
|
|
4952
|
+
userId: z164.string(),
|
|
4953
|
+
role: z164.nativeEnum(WorkspaceRole)
|
|
4905
4954
|
})
|
|
4906
4955
|
)
|
|
4907
4956
|
});
|
|
4908
4957
|
|
|
4909
4958
|
// src/tokens/personal-access-token.ts
|
|
4910
|
-
var PersonalAccessToken =
|
|
4911
|
-
id:
|
|
4912
|
-
userId:
|
|
4913
|
-
workspaceId:
|
|
4959
|
+
var PersonalAccessToken = z165.object({
|
|
4960
|
+
id: z165.string(),
|
|
4961
|
+
userId: z165.string(),
|
|
4962
|
+
workspaceId: z165.string().optional(),
|
|
4914
4963
|
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
4915
|
-
name:
|
|
4916
|
-
hidden:
|
|
4917
|
-
token:
|
|
4918
|
-
scope:
|
|
4919
|
-
createdAt:
|
|
4920
|
-
expireAt:
|
|
4964
|
+
name: z165.string(),
|
|
4965
|
+
hidden: z165.boolean(),
|
|
4966
|
+
token: z165.string(),
|
|
4967
|
+
scope: z165.string().optional(),
|
|
4968
|
+
createdAt: z165.coerce.date(),
|
|
4969
|
+
expireAt: z165.coerce.date().optional()
|
|
4921
4970
|
});
|
|
4922
4971
|
export {
|
|
4923
4972
|
Address,
|
|
@@ -4935,6 +4984,7 @@ export {
|
|
|
4935
4984
|
AssetType,
|
|
4936
4985
|
AssetValue,
|
|
4937
4986
|
AuthTokens,
|
|
4987
|
+
BaseComponent,
|
|
4938
4988
|
BillingDetails,
|
|
4939
4989
|
BillingIntervalSchema,
|
|
4940
4990
|
BillingType,
|
|
@@ -4966,6 +5016,7 @@ export {
|
|
|
4966
5016
|
ComponentImportModelInput,
|
|
4967
5017
|
ComponentOrigin,
|
|
4968
5018
|
ComponentOriginPart,
|
|
5019
|
+
ComponentSet,
|
|
4969
5020
|
ContentLoadInstruction,
|
|
4970
5021
|
ContentLoaderPayload,
|
|
4971
5022
|
CreateDesignToken,
|
|
@@ -5122,6 +5173,13 @@ export {
|
|
|
5122
5173
|
FeatureFlag,
|
|
5123
5174
|
FeatureFlagMap,
|
|
5124
5175
|
FeaturesSummary,
|
|
5176
|
+
FigmaComponentBooleanProperty,
|
|
5177
|
+
FigmaComponentInstanceSwapProperty,
|
|
5178
|
+
FigmaComponentProperties,
|
|
5179
|
+
FigmaComponentPropertyType,
|
|
5180
|
+
FigmaComponentSetProperties,
|
|
5181
|
+
FigmaComponentTextProperty,
|
|
5182
|
+
FigmaComponentVariantProperty,
|
|
5125
5183
|
FigmaFileAccessData,
|
|
5126
5184
|
FigmaFileDownloadScope,
|
|
5127
5185
|
FigmaFileStructure,
|