@supernova-studio/client 0.47.34 → 0.47.36
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 +1054 -1054
- package/dist/index.d.ts +1054 -1054
- package/dist/index.js +765 -761
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2533 -2529
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -114,7 +114,6 @@ var _zod = require('zod');
|
|
|
114
114
|
|
|
115
115
|
|
|
116
116
|
|
|
117
|
-
|
|
118
117
|
|
|
119
118
|
|
|
120
119
|
var _ipcidr = require('ip-cidr'); var _ipcidr2 = _interopRequireDefault(_ipcidr);
|
|
@@ -146,6 +145,9 @@ var _ipcidr = require('ip-cidr'); var _ipcidr2 = _interopRequireDefault(_ipcidr)
|
|
|
146
145
|
|
|
147
146
|
|
|
148
147
|
|
|
148
|
+
|
|
149
|
+
var _slugify = require('@sindresorhus/slugify'); var _slugify2 = _interopRequireDefault(_slugify);
|
|
150
|
+
|
|
149
151
|
|
|
150
152
|
|
|
151
153
|
|
|
@@ -160,7 +162,6 @@ var _ipcidr = require('ip-cidr'); var _ipcidr2 = _interopRequireDefault(_ipcidr)
|
|
|
160
162
|
|
|
161
163
|
|
|
162
164
|
|
|
163
|
-
var _slugify = require('@sindresorhus/slugify'); var _slugify2 = _interopRequireDefault(_slugify);
|
|
164
165
|
|
|
165
166
|
|
|
166
167
|
|
|
@@ -398,6 +399,94 @@ var CustomDomain = _zod.z.object({
|
|
|
398
399
|
error: _zod.z.string().nullish(),
|
|
399
400
|
errorCode: _zod.z.string().nullish()
|
|
400
401
|
});
|
|
402
|
+
var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
403
|
+
GitProviderNames2["Azure"] = "azure";
|
|
404
|
+
GitProviderNames2["Github"] = "github";
|
|
405
|
+
GitProviderNames2["Gitlab"] = "gitlab";
|
|
406
|
+
GitProviderNames2["Bitbucket"] = "bitbucket";
|
|
407
|
+
return GitProviderNames2;
|
|
408
|
+
})(GitProviderNames || {});
|
|
409
|
+
var GitProvider = _zod.z.nativeEnum(GitProviderNames);
|
|
410
|
+
var PulsarPropertyType = _zod.z.enum([
|
|
411
|
+
"string",
|
|
412
|
+
"number",
|
|
413
|
+
"boolean",
|
|
414
|
+
"image",
|
|
415
|
+
"enum",
|
|
416
|
+
"color",
|
|
417
|
+
"typography",
|
|
418
|
+
"component",
|
|
419
|
+
"componentProperties",
|
|
420
|
+
"tokenProperties",
|
|
421
|
+
"tokenType"
|
|
422
|
+
]);
|
|
423
|
+
var PulsarBaseProperty = _zod.z.object({
|
|
424
|
+
label: _zod.z.string(),
|
|
425
|
+
key: _zod.z.string(),
|
|
426
|
+
description: _zod.z.string().nullish(),
|
|
427
|
+
type: PulsarPropertyType,
|
|
428
|
+
values: _zod.z.array(_zod.z.string()).nullish(),
|
|
429
|
+
default: _zod.z.union([_zod.z.string(), _zod.z.boolean(), _zod.z.number()]).nullish(),
|
|
430
|
+
// PulsarPropertyValueType //is optional?
|
|
431
|
+
inputType: _zod.z.enum(["code", "plain"]).optional(),
|
|
432
|
+
//is optional?
|
|
433
|
+
isMultiline: _zod.z.boolean().nullish()
|
|
434
|
+
});
|
|
435
|
+
var PulsarContributionConfigurationProperty = PulsarBaseProperty.extend({
|
|
436
|
+
category: _zod.z.string()
|
|
437
|
+
});
|
|
438
|
+
var PulsarContributionVariant = _zod.z.object({
|
|
439
|
+
key: _zod.z.string(),
|
|
440
|
+
name: _zod.z.string(),
|
|
441
|
+
isDefault: nullishToOptional(_zod.z.boolean()),
|
|
442
|
+
description: nullishToOptional(_zod.z.string()),
|
|
443
|
+
thumbnailURL: nullishToOptional(_zod.z.string())
|
|
444
|
+
});
|
|
445
|
+
var PulsarCustomBlock = _zod.z.object({
|
|
446
|
+
title: nullishToOptional(_zod.z.string()),
|
|
447
|
+
key: _zod.z.string(),
|
|
448
|
+
category: nullishToOptional(_zod.z.string()),
|
|
449
|
+
description: nullishToOptional(_zod.z.string()),
|
|
450
|
+
iconURL: nullishToOptional(_zod.z.string()),
|
|
451
|
+
mode: nullishToOptional(_zod.z.enum(["array", "block"])),
|
|
452
|
+
properties: nullishToOptional(_zod.z.array(PulsarBaseProperty)).transform((v) => _nullishCoalesce(v, () => ( [])))
|
|
453
|
+
});
|
|
454
|
+
var ExporterType = _zod.z.enum(["code", "documentation"]);
|
|
455
|
+
var ExporterSource = _zod.z.enum(["git", "upload"]);
|
|
456
|
+
var ExporterTag = _zod.z.string();
|
|
457
|
+
var ExporterPulsarDetails = _zod.z.object({
|
|
458
|
+
description: _zod.z.string(),
|
|
459
|
+
version: _zod.z.string(),
|
|
460
|
+
routingVersion: nullishToOptional(_zod.z.string()),
|
|
461
|
+
author: nullishToOptional(_zod.z.string()),
|
|
462
|
+
organization: nullishToOptional(_zod.z.string()),
|
|
463
|
+
homepage: nullishToOptional(_zod.z.string()),
|
|
464
|
+
readme: nullishToOptional(_zod.z.string()),
|
|
465
|
+
tags: nullishToOptional(_zod.z.array(ExporterTag)).default([]),
|
|
466
|
+
packageId: nullishToOptional(_zod.z.string().max(255)),
|
|
467
|
+
iconURL: nullishToOptional(_zod.z.string()),
|
|
468
|
+
configurationProperties: nullishToOptional(_zod.z.array(PulsarContributionConfigurationProperty)).default([]),
|
|
469
|
+
customBlocks: nullishToOptional(_zod.z.array(PulsarCustomBlock)).default([]),
|
|
470
|
+
blockVariants: nullishToOptional(_zod.z.record(_zod.z.string(), _zod.z.array(PulsarContributionVariant))).default({}),
|
|
471
|
+
usesBrands: nullishToOptional(_zod.z.boolean()).default(false),
|
|
472
|
+
usesThemes: nullishToOptional(_zod.z.boolean()).default(false)
|
|
473
|
+
});
|
|
474
|
+
var ExporterDetails = ExporterPulsarDetails.extend({
|
|
475
|
+
source: ExporterSource,
|
|
476
|
+
gitProvider: nullishToOptional(GitProvider),
|
|
477
|
+
gitUrl: nullishToOptional(_zod.z.string()),
|
|
478
|
+
gitBranch: nullishToOptional(_zod.z.string()),
|
|
479
|
+
gitDirectory: nullishToOptional(_zod.z.string())
|
|
480
|
+
});
|
|
481
|
+
var Exporter = _zod.z.object({
|
|
482
|
+
id: _zod.z.string(),
|
|
483
|
+
createdAt: _zod.z.coerce.date(),
|
|
484
|
+
name: _zod.z.string(),
|
|
485
|
+
isPrivate: _zod.z.boolean(),
|
|
486
|
+
details: ExporterDetails,
|
|
487
|
+
exporterType: nullishToOptional(ExporterType).default("code"),
|
|
488
|
+
storagePath: nullishToOptional(_zod.z.string()).default("")
|
|
489
|
+
});
|
|
401
490
|
var AssetDynamoRecord = _zod.z.object({
|
|
402
491
|
path: _zod.z.string(),
|
|
403
492
|
id: _zod.z.string(),
|
|
@@ -442,9 +531,7 @@ var Asset = _zod.z.object({
|
|
|
442
531
|
origin: AssetOrigin.optional(),
|
|
443
532
|
originKey: _zod.z.string().optional()
|
|
444
533
|
});
|
|
445
|
-
var ResolvedAsset = Asset.
|
|
446
|
-
filePath: true
|
|
447
|
-
}).extend({
|
|
534
|
+
var ResolvedAsset = Asset.extend({
|
|
448
535
|
url: _zod.z.string()
|
|
449
536
|
});
|
|
450
537
|
var TokenDataAliasSchema = _zod.z.object({
|
|
@@ -1663,17 +1750,6 @@ var Theme = DesignElementBase.extend(DesignElementBrandedPart.shape).extend({
|
|
|
1663
1750
|
overrides: _zod.z.array(ThemeOverride),
|
|
1664
1751
|
codeName: _zod.z.string()
|
|
1665
1752
|
});
|
|
1666
|
-
var FigmaFileDownloadScope = _zod.z.object({
|
|
1667
|
-
styles: _zod.z.boolean(),
|
|
1668
|
-
components: _zod.z.boolean(),
|
|
1669
|
-
currentVersion: _zod.z.literal("__latest__").nullable(),
|
|
1670
|
-
publishedVersion: _zod.z.string().nullable(),
|
|
1671
|
-
downloadChunkSize: _zod.z.number().optional(),
|
|
1672
|
-
maxFileDepth: _zod.z.number().optional()
|
|
1673
|
-
});
|
|
1674
|
-
var FigmaFileAccessData = _zod.z.object({
|
|
1675
|
-
accessToken: _zod.z.string()
|
|
1676
|
-
});
|
|
1677
1753
|
var ImportWarningType = _zod.z.enum([
|
|
1678
1754
|
"NoVersionFound",
|
|
1679
1755
|
"UnsupportedFill",
|
|
@@ -1697,299 +1773,96 @@ var ImportWarning = _zod.z.object({
|
|
|
1697
1773
|
styleName: _zod.z.string().optional(),
|
|
1698
1774
|
unsupportedStyleValueType: _zod.z.string().optional()
|
|
1699
1775
|
});
|
|
1700
|
-
var
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1776
|
+
var FileStructureStats = _zod.z.object({
|
|
1777
|
+
frames: zeroNumberByDefault(),
|
|
1778
|
+
components: zeroNumberByDefault(),
|
|
1779
|
+
componentSets: zeroNumberByDefault()
|
|
1704
1780
|
});
|
|
1705
|
-
var
|
|
1706
|
-
|
|
1707
|
-
|
|
1781
|
+
var SourceImportSummaryByTokenTypeKey = DesignTokenType.or(
|
|
1782
|
+
// Backward compatibility
|
|
1783
|
+
_zod.z.enum(["Measure", "Radius", "GenericToken", "Font", "Text"])
|
|
1784
|
+
);
|
|
1785
|
+
var SourceImportSummaryByTokenType = _zod.z.record(SourceImportSummaryByTokenTypeKey, _zod.z.number());
|
|
1786
|
+
var SourceImportTokenSummary = _zod.z.object({
|
|
1787
|
+
tokensCreated: zeroNumberByDefault(),
|
|
1788
|
+
tokensUpdated: zeroNumberByDefault(),
|
|
1789
|
+
tokensDeleted: zeroNumberByDefault(),
|
|
1790
|
+
tokensCreatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => _nullishCoalesce(v, () => ( {}))),
|
|
1791
|
+
tokensUpdatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => _nullishCoalesce(v, () => ( {}))),
|
|
1792
|
+
tokensDeletedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => _nullishCoalesce(v, () => ( {})))
|
|
1708
1793
|
});
|
|
1709
|
-
var
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
*/
|
|
1717
|
-
fileAccessByFileId: _zod.z.record(FigmaFileAccessData),
|
|
1718
|
-
/**
|
|
1719
|
-
* Figma source data for which import was requested
|
|
1720
|
-
*
|
|
1721
|
-
* sourceId: source data
|
|
1722
|
-
*/
|
|
1723
|
-
importedSourceDataBySourceId: _zod.z.record(ImportedFigmaSourceData),
|
|
1724
|
-
/**
|
|
1725
|
-
* Array of warnings that will be written into the import result summary at the end
|
|
1726
|
-
* of import job execution and displayed by the client.
|
|
1727
|
-
*/
|
|
1728
|
-
importWarnings: _zod.z.record(ImportWarning.array()).default({})
|
|
1794
|
+
var SourceImportComponentSummary = _zod.z.object({
|
|
1795
|
+
componentsCreated: zeroNumberByDefault(),
|
|
1796
|
+
componentsUpdated: zeroNumberByDefault(),
|
|
1797
|
+
componentsDeleted: zeroNumberByDefault(),
|
|
1798
|
+
componentAssetsCreated: zeroNumberByDefault(),
|
|
1799
|
+
componentAssetsUpdated: zeroNumberByDefault(),
|
|
1800
|
+
componentAssetsDeleted: zeroNumberByDefault()
|
|
1729
1801
|
});
|
|
1730
|
-
var
|
|
1731
|
-
|
|
1732
|
-
|
|
1802
|
+
var SourceImportFrameSummary = _zod.z.object({
|
|
1803
|
+
assetsInFile: nullishToOptional(FileStructureStats.optional()),
|
|
1804
|
+
invalidReferencesCount: nullishToOptional(_zod.z.number().optional())
|
|
1733
1805
|
});
|
|
1734
|
-
var
|
|
1735
|
-
|
|
1806
|
+
var SourceImportSummary = _zod.z.object({
|
|
1807
|
+
sourceId: nullishToOptional(_zod.z.string()),
|
|
1808
|
+
brandId: nullishToOptional(_zod.z.string()),
|
|
1809
|
+
versionId: nullishToOptional(_zod.z.string()),
|
|
1810
|
+
error: nullishToOptional(_zod.z.any()),
|
|
1811
|
+
isFailed: _zod.z.boolean(),
|
|
1812
|
+
warnings: _zod.z.array(ImportWarning).nullish().transform((v) => _nullishCoalesce(v, () => ( []))),
|
|
1813
|
+
...SourceImportTokenSummary.shape,
|
|
1814
|
+
...SourceImportComponentSummary.shape,
|
|
1815
|
+
...FileStructureStats.shape
|
|
1736
1816
|
});
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
* Source id -> import metadata
|
|
1750
|
-
*/
|
|
1751
|
-
changedImportedSourceDataBySourceId: _zod.z.record(ChangedImportedFigmaSourceData)
|
|
1817
|
+
function zeroNumberByDefault() {
|
|
1818
|
+
return _zod.z.number().nullish().transform((v) => _nullishCoalesce(v, () => ( 0)));
|
|
1819
|
+
}
|
|
1820
|
+
var DataSourceRemoteType = _zod.z.enum(["Figma", "TokenStudio", "FigmaVariablesPlugin"]);
|
|
1821
|
+
var DataSourceUploadRemoteSource = _zod.z.enum(["TokenStudio", "FigmaVariablesPlugin", "Custom"]);
|
|
1822
|
+
var DataSourceFigmaState = _zod.z.enum(["Active", "MissingIntegration", "MissingFileAccess", "MissingFileOwner"]);
|
|
1823
|
+
var DataSourceAutoImportMode = _zod.z.enum(["Never", "Hourly"]);
|
|
1824
|
+
var DataSourceStats = _zod.z.object({
|
|
1825
|
+
tokens: zeroNumberByDefault2(),
|
|
1826
|
+
components: zeroNumberByDefault2(),
|
|
1827
|
+
assets: zeroNumberByDefault2(),
|
|
1828
|
+
frames: zeroNumberByDefault2()
|
|
1752
1829
|
});
|
|
1753
|
-
var
|
|
1754
|
-
|
|
1755
|
-
scope: AssetScope
|
|
1830
|
+
var DataSourceFigmaFileData = _zod.z.object({
|
|
1831
|
+
lastUpdatedAt: _zod.z.coerce.date()
|
|
1756
1832
|
});
|
|
1757
|
-
var
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1833
|
+
var DataSourceFigmaFileVersionData = _zod.z.object({
|
|
1834
|
+
id: _zod.z.string(),
|
|
1835
|
+
label: _zod.z.string().optional(),
|
|
1836
|
+
description: _zod.z.string().optional(),
|
|
1837
|
+
createdAt: _zod.z.coerce.date()
|
|
1762
1838
|
});
|
|
1763
|
-
var
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1839
|
+
var DataSourceFigmaScope = _zod.z.object({
|
|
1840
|
+
assets: _zod.z.boolean(),
|
|
1841
|
+
components: _zod.z.boolean(),
|
|
1842
|
+
documentationFrames: _zod.z.boolean(),
|
|
1843
|
+
tokens: _zod.z.boolean(),
|
|
1844
|
+
themePersistentId: _zod.z.string().optional(),
|
|
1845
|
+
isUnpublishedContentFallbackEnabled: _zod.z.boolean()
|
|
1770
1846
|
});
|
|
1771
|
-
var
|
|
1772
|
-
|
|
1773
|
-
|
|
1847
|
+
var DataSourceFigmaImportMetadata = _zod.z.object({
|
|
1848
|
+
fileData: DataSourceFigmaFileData.optional(),
|
|
1849
|
+
importedPublishedVersion: DataSourceFigmaFileVersionData.optional()
|
|
1774
1850
|
});
|
|
1775
|
-
var
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
var ImportModelInputBase = ImportModelBase.omit({
|
|
1791
|
-
brandPersistentId: true,
|
|
1792
|
-
origin: true,
|
|
1793
|
-
sortOrder: true
|
|
1794
|
-
}).extend({
|
|
1795
|
-
originId: _zod.z.string(),
|
|
1796
|
-
originMetadata: _zod.z.record(_zod.z.any())
|
|
1797
|
-
});
|
|
1798
|
-
var ComponentImportModelPart = _zod.z.object({
|
|
1799
|
-
thumbnail: ImageImportModel
|
|
1800
|
-
});
|
|
1801
|
-
var ComponentImportModel = ImportModelBase.extend(ComponentImportModelPart.shape).extend({
|
|
1802
|
-
isAsset: _zod.z.boolean(),
|
|
1803
|
-
svg: FigmaSvgRenderImportModel.optional(),
|
|
1804
|
-
origin: ComponentOrigin
|
|
1805
|
-
});
|
|
1806
|
-
var ComponentImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart.shape).extend({
|
|
1807
|
-
originMetadata: ComponentOriginPart
|
|
1808
|
-
});
|
|
1809
|
-
var AssetImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart.shape).extend({
|
|
1810
|
-
svg: FigmaSvgRenderImportModel,
|
|
1811
|
-
originMetadata: ComponentOriginPart
|
|
1812
|
-
});
|
|
1813
|
-
var ThemeOverrideImportModelBase = DesignTokenTypedData.and(
|
|
1814
|
-
_zod.z.object({
|
|
1815
|
-
id: _zod.z.string(),
|
|
1816
|
-
meta: ObjectMeta
|
|
1817
|
-
})
|
|
1818
|
-
);
|
|
1819
|
-
var ThemeOverrideImportModel = ThemeOverrideImportModelBase.and(
|
|
1820
|
-
_zod.z.object({
|
|
1821
|
-
origin: ThemeOverrideOrigin
|
|
1822
|
-
})
|
|
1823
|
-
);
|
|
1824
|
-
var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
|
|
1825
|
-
_zod.z.object({
|
|
1826
|
-
originId: _zod.z.string(),
|
|
1827
|
-
originMetadata: ThemeOverrideOriginPart
|
|
1828
|
-
})
|
|
1829
|
-
);
|
|
1830
|
-
var ThemeImportModel = _zod.z.object({
|
|
1831
|
-
meta: ObjectMeta,
|
|
1832
|
-
brandPersistentId: _zod.z.string(),
|
|
1833
|
-
originSource: ThemeOriginSource,
|
|
1834
|
-
overrides: _zod.z.array(ThemeOverrideImportModel),
|
|
1835
|
-
sortOrder: _zod.z.number()
|
|
1836
|
-
});
|
|
1837
|
-
var ThemeImportModelInput = _zod.z.object({
|
|
1838
|
-
meta: ObjectMeta,
|
|
1839
|
-
originObjects: _zod.z.array(ThemeOriginObject),
|
|
1840
|
-
overrides: _zod.z.array(ThemeOverrideImportModelInput)
|
|
1841
|
-
});
|
|
1842
|
-
var ThemeUpdateImportModel = _zod.z.object({
|
|
1843
|
-
themePersistentId: _zod.z.string(),
|
|
1844
|
-
overrides: _zod.z.array(ThemeOverrideImportModel)
|
|
1845
|
-
});
|
|
1846
|
-
var ThemeUpdateImportModelInput = _zod.z.object({
|
|
1847
|
-
themePersistentId: _zod.z.string(),
|
|
1848
|
-
overrides: _zod.z.array(ThemeOverrideImportModelInput)
|
|
1849
|
-
});
|
|
1850
|
-
var DesignTokenImportModelPart = _zod.z.object({
|
|
1851
|
-
collection: _zod.z.string().optional()
|
|
1852
|
-
});
|
|
1853
|
-
var DesignTokenImportModelBase = ImportModelBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
1854
|
-
origin: DesignTokenOrigin
|
|
1855
|
-
});
|
|
1856
|
-
var DesignTokenImportModelInputBase = ImportModelInputBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
1857
|
-
originMetadata: DesignTokenOriginPart
|
|
1858
|
-
});
|
|
1859
|
-
var DesignTokenImportModel = DesignTokenTypedData.and(DesignTokenImportModelBase);
|
|
1860
|
-
var DesignTokenImportModelInput = DesignTokenTypedData.and(DesignTokenImportModelInputBase);
|
|
1861
|
-
var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
|
|
1862
|
-
image: FigmaPngRenderImportModel
|
|
1863
|
-
});
|
|
1864
|
-
var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
|
|
1865
|
-
children: _zod.z.lazy(() => FigmaFileStructureNodeImportModel.array())
|
|
1866
|
-
});
|
|
1867
|
-
var FigmaFileStructureImportModelPart = _zod.z.object({
|
|
1868
|
-
data: _zod.z.object({
|
|
1869
|
-
rootNode: FigmaFileStructureNodeImportModel,
|
|
1870
|
-
assetsInFile: FigmaFileStructureStatistics
|
|
1871
|
-
})
|
|
1872
|
-
});
|
|
1873
|
-
var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImportModelPart.shape).extend({
|
|
1874
|
-
origin: FigmaFileStructureOrigin
|
|
1875
|
-
});
|
|
1876
|
-
var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
|
|
1877
|
-
FigmaFileStructureImportModelPart.shape
|
|
1878
|
-
).extend({
|
|
1879
|
-
fileVersionId: _zod.z.string()
|
|
1880
|
-
});
|
|
1881
|
-
var DataSourceImportModel = _zod.z.object({
|
|
1882
|
-
id: _zod.z.string(),
|
|
1883
|
-
fileName: _zod.z.string().optional(),
|
|
1884
|
-
thumbnailUrl: _zod.z.string().optional()
|
|
1885
|
-
});
|
|
1886
|
-
var ImportModelInputCollection = _zod.z.object({
|
|
1887
|
-
source: DataSourceImportModel,
|
|
1888
|
-
tokens: _zod.z.array(DesignTokenImportModelInput).default([]),
|
|
1889
|
-
components: _zod.z.array(ComponentImportModelInput).default([]),
|
|
1890
|
-
assets: _zod.z.array(AssetImportModelInput).default([]),
|
|
1891
|
-
themeUpdates: _zod.z.array(ThemeUpdateImportModelInput).default([]),
|
|
1892
|
-
themes: _zod.z.array(ThemeImportModelInput).default([]),
|
|
1893
|
-
figmaFileStructure: FigmaFileStructureImportModelInput.optional()
|
|
1894
|
-
});
|
|
1895
|
-
var ImportModelCollection = _zod.z.object({
|
|
1896
|
-
sources: _zod.z.array(DataSourceImportModel),
|
|
1897
|
-
tokens: _zod.z.array(DesignTokenImportModel).default([]),
|
|
1898
|
-
components: _zod.z.array(ComponentImportModel).default([]),
|
|
1899
|
-
themeUpdates: _zod.z.array(ThemeUpdateImportModel).default([]),
|
|
1900
|
-
themes: _zod.z.array(ThemeImportModel).default([]),
|
|
1901
|
-
figmaFileStructures: _zod.z.array(FigmaFileStructureImportModel)
|
|
1902
|
-
});
|
|
1903
|
-
var FileStructureStats = _zod.z.object({
|
|
1904
|
-
frames: zeroNumberByDefault(),
|
|
1905
|
-
components: zeroNumberByDefault(),
|
|
1906
|
-
componentSets: zeroNumberByDefault()
|
|
1907
|
-
});
|
|
1908
|
-
var SourceImportSummaryByTokenTypeKey = DesignTokenType.or(
|
|
1909
|
-
// Backward compatibility
|
|
1910
|
-
_zod.z.enum(["Measure", "Radius", "GenericToken", "Font", "Text"])
|
|
1911
|
-
);
|
|
1912
|
-
var SourceImportSummaryByTokenType = _zod.z.record(SourceImportSummaryByTokenTypeKey, _zod.z.number());
|
|
1913
|
-
var SourceImportTokenSummary = _zod.z.object({
|
|
1914
|
-
tokensCreated: zeroNumberByDefault(),
|
|
1915
|
-
tokensUpdated: zeroNumberByDefault(),
|
|
1916
|
-
tokensDeleted: zeroNumberByDefault(),
|
|
1917
|
-
tokensCreatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => _nullishCoalesce(v, () => ( {}))),
|
|
1918
|
-
tokensUpdatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => _nullishCoalesce(v, () => ( {}))),
|
|
1919
|
-
tokensDeletedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => _nullishCoalesce(v, () => ( {})))
|
|
1920
|
-
});
|
|
1921
|
-
var SourceImportComponentSummary = _zod.z.object({
|
|
1922
|
-
componentsCreated: zeroNumberByDefault(),
|
|
1923
|
-
componentsUpdated: zeroNumberByDefault(),
|
|
1924
|
-
componentsDeleted: zeroNumberByDefault(),
|
|
1925
|
-
componentAssetsCreated: zeroNumberByDefault(),
|
|
1926
|
-
componentAssetsUpdated: zeroNumberByDefault(),
|
|
1927
|
-
componentAssetsDeleted: zeroNumberByDefault()
|
|
1928
|
-
});
|
|
1929
|
-
var SourceImportFrameSummary = _zod.z.object({
|
|
1930
|
-
assetsInFile: nullishToOptional(FileStructureStats.optional()),
|
|
1931
|
-
invalidReferencesCount: nullishToOptional(_zod.z.number().optional())
|
|
1932
|
-
});
|
|
1933
|
-
var SourceImportSummary = _zod.z.object({
|
|
1934
|
-
sourceId: nullishToOptional(_zod.z.string()),
|
|
1935
|
-
brandId: nullishToOptional(_zod.z.string()),
|
|
1936
|
-
versionId: nullishToOptional(_zod.z.string()),
|
|
1937
|
-
error: nullishToOptional(_zod.z.any()),
|
|
1938
|
-
isFailed: _zod.z.boolean(),
|
|
1939
|
-
warnings: _zod.z.array(ImportWarning).nullish().transform((v) => _nullishCoalesce(v, () => ( []))),
|
|
1940
|
-
...SourceImportTokenSummary.shape,
|
|
1941
|
-
...SourceImportComponentSummary.shape,
|
|
1942
|
-
...FileStructureStats.shape
|
|
1943
|
-
});
|
|
1944
|
-
function zeroNumberByDefault() {
|
|
1945
|
-
return _zod.z.number().nullish().transform((v) => _nullishCoalesce(v, () => ( 0)));
|
|
1946
|
-
}
|
|
1947
|
-
var DataSourceRemoteType = _zod.z.enum(["Figma", "TokenStudio", "FigmaVariablesPlugin"]);
|
|
1948
|
-
var DataSourceUploadRemoteSource = _zod.z.enum(["TokenStudio", "FigmaVariablesPlugin", "Custom"]);
|
|
1949
|
-
var DataSourceFigmaState = _zod.z.enum(["Active", "MissingIntegration", "MissingFileAccess", "MissingFileOwner"]);
|
|
1950
|
-
var DataSourceAutoImportMode = _zod.z.enum(["Never", "Hourly"]);
|
|
1951
|
-
var DataSourceStats = _zod.z.object({
|
|
1952
|
-
tokens: zeroNumberByDefault2(),
|
|
1953
|
-
components: zeroNumberByDefault2(),
|
|
1954
|
-
assets: zeroNumberByDefault2(),
|
|
1955
|
-
frames: zeroNumberByDefault2()
|
|
1956
|
-
});
|
|
1957
|
-
var DataSourceFigmaFileData = _zod.z.object({
|
|
1958
|
-
lastUpdatedAt: _zod.z.coerce.date()
|
|
1959
|
-
});
|
|
1960
|
-
var DataSourceFigmaFileVersionData = _zod.z.object({
|
|
1961
|
-
id: _zod.z.string(),
|
|
1962
|
-
label: _zod.z.string().optional(),
|
|
1963
|
-
description: _zod.z.string().optional(),
|
|
1964
|
-
createdAt: _zod.z.coerce.date()
|
|
1965
|
-
});
|
|
1966
|
-
var DataSourceFigmaScope = _zod.z.object({
|
|
1967
|
-
assets: _zod.z.boolean(),
|
|
1968
|
-
components: _zod.z.boolean(),
|
|
1969
|
-
documentationFrames: _zod.z.boolean(),
|
|
1970
|
-
tokens: _zod.z.boolean(),
|
|
1971
|
-
themePersistentId: _zod.z.string().optional(),
|
|
1972
|
-
isUnpublishedContentFallbackEnabled: _zod.z.boolean()
|
|
1973
|
-
});
|
|
1974
|
-
var DataSourceFigmaImportMetadata = _zod.z.object({
|
|
1975
|
-
fileData: DataSourceFigmaFileData.optional(),
|
|
1976
|
-
importedPublishedVersion: DataSourceFigmaFileVersionData.optional()
|
|
1977
|
-
});
|
|
1978
|
-
var DataSourceFigmaRemote = _zod.z.object({
|
|
1979
|
-
type: _zod.z.literal(DataSourceRemoteType.Enum.Figma),
|
|
1980
|
-
fileId: _zod.z.string(),
|
|
1981
|
-
preferredCredentialId: _zod.z.string().optional(),
|
|
1982
|
-
ownerId: _zod.z.string(),
|
|
1983
|
-
// todo remove or keep to reference who created data source
|
|
1984
|
-
ownerName: _zod.z.string(),
|
|
1985
|
-
// todo probably remove
|
|
1986
|
-
scope: DataSourceFigmaScope,
|
|
1987
|
-
state: DataSourceFigmaState,
|
|
1988
|
-
requiresSync: _zod.z.boolean().optional().transform((v) => _nullishCoalesce(v, () => ( false))),
|
|
1989
|
-
lastImportMetadata: DataSourceFigmaImportMetadata.optional(),
|
|
1990
|
-
downloadChunkSize: _zod.z.number().optional(),
|
|
1991
|
-
figmaRenderChunkSize: _zod.z.number().optional(),
|
|
1992
|
-
maxFileDepth: _zod.z.number().optional()
|
|
1851
|
+
var DataSourceFigmaRemote = _zod.z.object({
|
|
1852
|
+
type: _zod.z.literal(DataSourceRemoteType.Enum.Figma),
|
|
1853
|
+
fileId: _zod.z.string(),
|
|
1854
|
+
preferredCredentialId: _zod.z.string().optional(),
|
|
1855
|
+
ownerId: _zod.z.string(),
|
|
1856
|
+
// todo remove or keep to reference who created data source
|
|
1857
|
+
ownerName: _zod.z.string(),
|
|
1858
|
+
// todo probably remove
|
|
1859
|
+
scope: DataSourceFigmaScope,
|
|
1860
|
+
state: DataSourceFigmaState,
|
|
1861
|
+
requiresSync: _zod.z.boolean().optional().transform((v) => _nullishCoalesce(v, () => ( false))),
|
|
1862
|
+
lastImportMetadata: DataSourceFigmaImportMetadata.optional(),
|
|
1863
|
+
downloadChunkSize: _zod.z.number().optional(),
|
|
1864
|
+
figmaRenderChunkSize: _zod.z.number().optional(),
|
|
1865
|
+
maxFileDepth: _zod.z.number().optional()
|
|
1993
1866
|
});
|
|
1994
1867
|
var DataSourceTokenStudioRemote = _zod.z.object({
|
|
1995
1868
|
type: _zod.z.literal(DataSourceRemoteType.Enum.TokenStudio)
|
|
@@ -2349,38 +2222,252 @@ var DocumentationCommentThread = _zod.z.object({
|
|
|
2349
2222
|
createdAt: _zod.z.coerce.date(),
|
|
2350
2223
|
updatedAt: _zod.z.coerce.date()
|
|
2351
2224
|
});
|
|
2352
|
-
var
|
|
2353
|
-
|
|
2354
|
-
_zod.z.
|
|
2355
|
-
_zod.z.literal("
|
|
2356
|
-
_zod.z.
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
id: _zod.z.string(),
|
|
2360
|
-
persistentId: _zod.z.string(),
|
|
2361
|
-
elementDataViewId: _zod.z.string(),
|
|
2362
|
-
sortPosition: _zod.z.number(),
|
|
2363
|
-
width: _zod.z.number()
|
|
2225
|
+
var FigmaFileDownloadScope = _zod.z.object({
|
|
2226
|
+
styles: _zod.z.boolean(),
|
|
2227
|
+
components: _zod.z.boolean(),
|
|
2228
|
+
currentVersion: _zod.z.literal("__latest__").nullable(),
|
|
2229
|
+
publishedVersion: _zod.z.string().nullable(),
|
|
2230
|
+
downloadChunkSize: _zod.z.number().optional(),
|
|
2231
|
+
maxFileDepth: _zod.z.number().optional()
|
|
2364
2232
|
});
|
|
2365
|
-
var
|
|
2366
|
-
|
|
2367
|
-
basePropertyType: ElementViewBaseColumnType
|
|
2233
|
+
var FigmaFileAccessData = _zod.z.object({
|
|
2234
|
+
accessToken: _zod.z.string()
|
|
2368
2235
|
});
|
|
2369
|
-
var
|
|
2370
|
-
|
|
2371
|
-
|
|
2236
|
+
var ImportFunctionInput = _zod.z.object({
|
|
2237
|
+
importJobId: _zod.z.string(),
|
|
2238
|
+
importContextId: _zod.z.string(),
|
|
2239
|
+
designSystemId: _zod.z.string().optional()
|
|
2372
2240
|
});
|
|
2373
|
-
var
|
|
2374
|
-
|
|
2375
|
-
|
|
2241
|
+
var ImportedFigmaSourceData = _zod.z.object({
|
|
2242
|
+
sourceId: _zod.z.string(),
|
|
2243
|
+
figmaRemote: DataSourceFigmaRemote
|
|
2376
2244
|
});
|
|
2377
|
-
var
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2245
|
+
var FigmaImportBaseContext = _zod.z.object({
|
|
2246
|
+
designSystemId: _zod.z.string(),
|
|
2247
|
+
/**
|
|
2248
|
+
* Data required for accessing Figma files. This should contain access data for all file ids
|
|
2249
|
+
* mentioned in the `importedSourceDataBySourceId`
|
|
2250
|
+
*
|
|
2251
|
+
* fileId: file data
|
|
2252
|
+
*/
|
|
2253
|
+
fileAccessByFileId: _zod.z.record(FigmaFileAccessData),
|
|
2254
|
+
/**
|
|
2255
|
+
* Figma source data for which import was requested
|
|
2256
|
+
*
|
|
2257
|
+
* sourceId: source data
|
|
2258
|
+
*/
|
|
2259
|
+
importedSourceDataBySourceId: _zod.z.record(ImportedFigmaSourceData),
|
|
2260
|
+
/**
|
|
2261
|
+
* Array of warnings that will be written into the import result summary at the end
|
|
2262
|
+
* of import job execution and displayed by the client.
|
|
2263
|
+
*/
|
|
2264
|
+
importWarnings: _zod.z.record(ImportWarning.array()).default({})
|
|
2265
|
+
});
|
|
2266
|
+
var FigmaImportContextWithSourcesState = FigmaImportBaseContext.extend({
|
|
2267
|
+
sourcesWithMissingAccess: _zod.z.array(_zod.z.string()).default([]),
|
|
2268
|
+
shadowOpacityOptional: _zod.z.boolean().default(false)
|
|
2269
|
+
});
|
|
2270
|
+
var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
|
|
2271
|
+
importMetadata: DataSourceFigmaImportMetadata
|
|
2272
|
+
});
|
|
2273
|
+
var FigmaImportContextWithDownloadScopes = FigmaImportContextWithSourcesState.extend({
|
|
2274
|
+
/**
|
|
2275
|
+
* Describes what to download from each file, this should contain all file id mentioned in
|
|
2276
|
+
* importMetadataBySourceId.
|
|
2277
|
+
*
|
|
2278
|
+
* File id -> file download scope
|
|
2279
|
+
*/
|
|
2280
|
+
fileDownloadScopesByFileId: _zod.z.record(FigmaFileDownloadScope),
|
|
2281
|
+
/**
|
|
2282
|
+
* Sources filtered down to the ones that have changed since last import and therefore need to be
|
|
2283
|
+
* imported again.
|
|
2284
|
+
*
|
|
2285
|
+
* Source id -> import metadata
|
|
2286
|
+
*/
|
|
2287
|
+
changedImportedSourceDataBySourceId: _zod.z.record(ChangedImportedFigmaSourceData)
|
|
2288
|
+
});
|
|
2289
|
+
var ImageImportModelType = _zod.z.enum(["Url", "FigmaRender"]);
|
|
2290
|
+
var ImageImportModelBase = _zod.z.object({
|
|
2291
|
+
scope: AssetScope
|
|
2292
|
+
});
|
|
2293
|
+
var UrlImageImportModel = ImageImportModelBase.extend({
|
|
2294
|
+
type: _zod.z.literal(ImageImportModelType.enum.Url),
|
|
2295
|
+
url: _zod.z.string(),
|
|
2296
|
+
originKey: _zod.z.string(),
|
|
2297
|
+
extension: _zod.z.string()
|
|
2298
|
+
});
|
|
2299
|
+
var FigmaRenderFormat = _zod.z.enum(["Svg", "Png"]);
|
|
2300
|
+
var FigmaRenderBase = ImageImportModelBase.extend({
|
|
2301
|
+
type: _zod.z.literal(ImageImportModelType.enum.FigmaRender),
|
|
2302
|
+
fileId: _zod.z.string(),
|
|
2303
|
+
fileVersionId: _zod.z.string().optional(),
|
|
2304
|
+
nodeId: _zod.z.string(),
|
|
2305
|
+
originKey: _zod.z.string()
|
|
2306
|
+
});
|
|
2307
|
+
var FigmaPngRenderImportModel = FigmaRenderBase.extend({
|
|
2308
|
+
format: _zod.z.literal(FigmaRenderFormat.enum.Png),
|
|
2309
|
+
scale: _zod.z.number()
|
|
2310
|
+
});
|
|
2311
|
+
var FigmaSvgRenderImportModel = FigmaRenderBase.extend({
|
|
2312
|
+
format: _zod.z.literal(FigmaRenderFormat.enum.Svg)
|
|
2313
|
+
});
|
|
2314
|
+
var FigmaRenderImportModel = _zod.z.discriminatedUnion("format", [
|
|
2315
|
+
FigmaPngRenderImportModel,
|
|
2316
|
+
FigmaSvgRenderImportModel
|
|
2317
|
+
]);
|
|
2318
|
+
var ImageImportModel = _zod.z.union([UrlImageImportModel, FigmaRenderImportModel]);
|
|
2319
|
+
var ImportModelBase = _zod.z.object({
|
|
2320
|
+
id: _zod.z.string(),
|
|
2321
|
+
meta: ObjectMeta,
|
|
2322
|
+
origin: DesignElementOrigin,
|
|
2323
|
+
brandPersistentId: _zod.z.string(),
|
|
2324
|
+
sortOrder: _zod.z.number()
|
|
2325
|
+
});
|
|
2326
|
+
var ImportModelInputBase = ImportModelBase.omit({
|
|
2327
|
+
brandPersistentId: true,
|
|
2328
|
+
origin: true,
|
|
2329
|
+
sortOrder: true
|
|
2330
|
+
}).extend({
|
|
2331
|
+
originId: _zod.z.string(),
|
|
2332
|
+
originMetadata: _zod.z.record(_zod.z.any())
|
|
2333
|
+
});
|
|
2334
|
+
var ComponentImportModelPart = _zod.z.object({
|
|
2335
|
+
thumbnail: ImageImportModel
|
|
2336
|
+
});
|
|
2337
|
+
var ComponentImportModel = ImportModelBase.extend(ComponentImportModelPart.shape).extend({
|
|
2338
|
+
isAsset: _zod.z.boolean(),
|
|
2339
|
+
svg: FigmaSvgRenderImportModel.optional(),
|
|
2340
|
+
origin: ComponentOrigin
|
|
2341
|
+
});
|
|
2342
|
+
var ComponentImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart.shape).extend({
|
|
2343
|
+
originMetadata: ComponentOriginPart
|
|
2344
|
+
});
|
|
2345
|
+
var AssetImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart.shape).extend({
|
|
2346
|
+
svg: FigmaSvgRenderImportModel,
|
|
2347
|
+
originMetadata: ComponentOriginPart
|
|
2348
|
+
});
|
|
2349
|
+
var ThemeOverrideImportModelBase = DesignTokenTypedData.and(
|
|
2350
|
+
_zod.z.object({
|
|
2351
|
+
id: _zod.z.string(),
|
|
2352
|
+
meta: ObjectMeta
|
|
2353
|
+
})
|
|
2354
|
+
);
|
|
2355
|
+
var ThemeOverrideImportModel = ThemeOverrideImportModelBase.and(
|
|
2356
|
+
_zod.z.object({
|
|
2357
|
+
origin: ThemeOverrideOrigin
|
|
2358
|
+
})
|
|
2359
|
+
);
|
|
2360
|
+
var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
|
|
2361
|
+
_zod.z.object({
|
|
2362
|
+
originId: _zod.z.string(),
|
|
2363
|
+
originMetadata: ThemeOverrideOriginPart
|
|
2364
|
+
})
|
|
2365
|
+
);
|
|
2366
|
+
var ThemeImportModel = _zod.z.object({
|
|
2367
|
+
meta: ObjectMeta,
|
|
2368
|
+
brandPersistentId: _zod.z.string(),
|
|
2369
|
+
originSource: ThemeOriginSource,
|
|
2370
|
+
overrides: _zod.z.array(ThemeOverrideImportModel),
|
|
2371
|
+
sortOrder: _zod.z.number()
|
|
2372
|
+
});
|
|
2373
|
+
var ThemeImportModelInput = _zod.z.object({
|
|
2374
|
+
meta: ObjectMeta,
|
|
2375
|
+
originObjects: _zod.z.array(ThemeOriginObject),
|
|
2376
|
+
overrides: _zod.z.array(ThemeOverrideImportModelInput)
|
|
2377
|
+
});
|
|
2378
|
+
var ThemeUpdateImportModel = _zod.z.object({
|
|
2379
|
+
themePersistentId: _zod.z.string(),
|
|
2380
|
+
overrides: _zod.z.array(ThemeOverrideImportModel)
|
|
2381
|
+
});
|
|
2382
|
+
var ThemeUpdateImportModelInput = _zod.z.object({
|
|
2383
|
+
themePersistentId: _zod.z.string(),
|
|
2384
|
+
overrides: _zod.z.array(ThemeOverrideImportModelInput)
|
|
2385
|
+
});
|
|
2386
|
+
var DesignTokenImportModelPart = _zod.z.object({
|
|
2387
|
+
collection: _zod.z.string().optional()
|
|
2388
|
+
});
|
|
2389
|
+
var DesignTokenImportModelBase = ImportModelBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
2390
|
+
origin: DesignTokenOrigin
|
|
2391
|
+
});
|
|
2392
|
+
var DesignTokenImportModelInputBase = ImportModelInputBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
2393
|
+
originMetadata: DesignTokenOriginPart
|
|
2394
|
+
});
|
|
2395
|
+
var DesignTokenImportModel = DesignTokenTypedData.and(DesignTokenImportModelBase);
|
|
2396
|
+
var DesignTokenImportModelInput = DesignTokenTypedData.and(DesignTokenImportModelInputBase);
|
|
2397
|
+
var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
|
|
2398
|
+
image: FigmaPngRenderImportModel
|
|
2399
|
+
});
|
|
2400
|
+
var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
|
|
2401
|
+
children: _zod.z.lazy(() => FigmaFileStructureNodeImportModel.array())
|
|
2402
|
+
});
|
|
2403
|
+
var FigmaFileStructureImportModelPart = _zod.z.object({
|
|
2404
|
+
data: _zod.z.object({
|
|
2405
|
+
rootNode: FigmaFileStructureNodeImportModel,
|
|
2406
|
+
assetsInFile: FigmaFileStructureStatistics
|
|
2407
|
+
})
|
|
2408
|
+
});
|
|
2409
|
+
var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImportModelPart.shape).extend({
|
|
2410
|
+
origin: FigmaFileStructureOrigin
|
|
2411
|
+
});
|
|
2412
|
+
var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
|
|
2413
|
+
FigmaFileStructureImportModelPart.shape
|
|
2414
|
+
).extend({
|
|
2415
|
+
fileVersionId: _zod.z.string()
|
|
2416
|
+
});
|
|
2417
|
+
var DataSourceImportModel = _zod.z.object({
|
|
2418
|
+
id: _zod.z.string(),
|
|
2419
|
+
fileName: _zod.z.string().optional(),
|
|
2420
|
+
thumbnailUrl: _zod.z.string().optional()
|
|
2421
|
+
});
|
|
2422
|
+
var ImportModelInputCollection = _zod.z.object({
|
|
2423
|
+
source: DataSourceImportModel,
|
|
2424
|
+
tokens: _zod.z.array(DesignTokenImportModelInput).default([]),
|
|
2425
|
+
components: _zod.z.array(ComponentImportModelInput).default([]),
|
|
2426
|
+
assets: _zod.z.array(AssetImportModelInput).default([]),
|
|
2427
|
+
themeUpdates: _zod.z.array(ThemeUpdateImportModelInput).default([]),
|
|
2428
|
+
themes: _zod.z.array(ThemeImportModelInput).default([]),
|
|
2429
|
+
figmaFileStructure: FigmaFileStructureImportModelInput.optional()
|
|
2430
|
+
});
|
|
2431
|
+
var ImportModelCollection = _zod.z.object({
|
|
2432
|
+
sources: _zod.z.array(DataSourceImportModel),
|
|
2433
|
+
tokens: _zod.z.array(DesignTokenImportModel).default([]),
|
|
2434
|
+
components: _zod.z.array(ComponentImportModel).default([]),
|
|
2435
|
+
themeUpdates: _zod.z.array(ThemeUpdateImportModel).default([]),
|
|
2436
|
+
themes: _zod.z.array(ThemeImportModel).default([]),
|
|
2437
|
+
figmaFileStructures: _zod.z.array(FigmaFileStructureImportModel)
|
|
2438
|
+
});
|
|
2439
|
+
var ElementViewBaseColumnType = _zod.z.enum(["Name", "Description", "Value", "UpdatedAt"]);
|
|
2440
|
+
var ElementViewColumnType = _zod.z.union([
|
|
2441
|
+
_zod.z.literal("BaseProperty"),
|
|
2442
|
+
_zod.z.literal("PropertyDefinition"),
|
|
2443
|
+
_zod.z.literal("Theme")
|
|
2444
|
+
]);
|
|
2445
|
+
var ElementViewColumnSharedAttributes = _zod.z.object({
|
|
2446
|
+
id: _zod.z.string(),
|
|
2447
|
+
persistentId: _zod.z.string(),
|
|
2448
|
+
elementDataViewId: _zod.z.string(),
|
|
2449
|
+
sortPosition: _zod.z.number(),
|
|
2450
|
+
width: _zod.z.number()
|
|
2451
|
+
});
|
|
2452
|
+
var ElementViewBasePropertyColumn = ElementViewColumnSharedAttributes.extend({
|
|
2453
|
+
type: _zod.z.literal("BaseProperty"),
|
|
2454
|
+
basePropertyType: ElementViewBaseColumnType
|
|
2455
|
+
});
|
|
2456
|
+
var ElementViewPropertyDefinitionColumn = ElementViewColumnSharedAttributes.extend({
|
|
2457
|
+
type: _zod.z.literal("PropertyDefinition"),
|
|
2458
|
+
propertyDefinitionId: _zod.z.string()
|
|
2459
|
+
});
|
|
2460
|
+
var ElementViewThemeColumn = ElementViewColumnSharedAttributes.extend({
|
|
2461
|
+
type: _zod.z.literal("Theme"),
|
|
2462
|
+
themeId: _zod.z.string()
|
|
2463
|
+
});
|
|
2464
|
+
var ElementViewColumn = _zod.z.discriminatedUnion("type", [
|
|
2465
|
+
ElementViewBasePropertyColumn,
|
|
2466
|
+
ElementViewPropertyDefinitionColumn,
|
|
2467
|
+
ElementViewThemeColumn
|
|
2468
|
+
]);
|
|
2469
|
+
var ElementView = _zod.z.object({
|
|
2470
|
+
id: _zod.z.string(),
|
|
2384
2471
|
persistentId: _zod.z.string(),
|
|
2385
2472
|
designSystemVersionId: _zod.z.string(),
|
|
2386
2473
|
name: _zod.z.string(),
|
|
@@ -2439,14 +2526,6 @@ var SsoProvider = _zod.z.object({
|
|
|
2439
2526
|
emailDomains: _zod.z.array(_zod.z.string()),
|
|
2440
2527
|
metadataXml: _zod.z.string().nullish()
|
|
2441
2528
|
});
|
|
2442
|
-
var WorkspaceRoleSchema = _zod.z.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest"]);
|
|
2443
|
-
var WorkspaceRole = WorkspaceRoleSchema.enum;
|
|
2444
|
-
var MAX_MEMBERS_COUNT = 100;
|
|
2445
|
-
var UserInvite = _zod.z.object({
|
|
2446
|
-
email: _zod.z.string().email().trim().transform((value) => value.toLowerCase()),
|
|
2447
|
-
role: WorkspaceRoleSchema
|
|
2448
|
-
});
|
|
2449
|
-
var UserInvites = _zod.z.array(UserInvite).max(MAX_MEMBERS_COUNT);
|
|
2450
2529
|
var isValidCIDR = (value) => {
|
|
2451
2530
|
return _ipcidr2.default.isValidAddress(value);
|
|
2452
2531
|
};
|
|
@@ -2484,161 +2563,12 @@ var WorkspaceWithDesignSystems = _zod.z.object({
|
|
|
2484
2563
|
workspace: Workspace,
|
|
2485
2564
|
designSystems: _zod.z.array(DesignSystem)
|
|
2486
2565
|
});
|
|
2487
|
-
var
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
sso: SsoProvider.optional(),
|
|
2491
|
-
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
2492
|
-
profile: WorkspaceProfileUpdate.optional()
|
|
2566
|
+
var DesignSystemSwitcher = _zod.z.object({
|
|
2567
|
+
isEnabled: _zod.z.boolean(),
|
|
2568
|
+
designSystemIds: _zod.z.array(_zod.z.string())
|
|
2493
2569
|
});
|
|
2494
|
-
var
|
|
2495
|
-
|
|
2496
|
-
product: ProductCodeSchema,
|
|
2497
|
-
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
2498
|
-
publicDesignSystem: _zod.z.boolean().optional()
|
|
2499
|
-
});
|
|
2500
|
-
var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
2501
|
-
var WORKSPACE_NAME_MIN_LENGTH = 2;
|
|
2502
|
-
var WORKSPACE_NAME_MAX_LENGTH = 64;
|
|
2503
|
-
var HANDLE_MIN_LENGTH = 2;
|
|
2504
|
-
var HANDLE_MAX_LENGTH = 64;
|
|
2505
|
-
var CreateWorkspaceInput = _zod.z.object({
|
|
2506
|
-
name: _zod.z.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
|
|
2507
|
-
product: ProductCodeSchema,
|
|
2508
|
-
priceId: _zod.z.string(),
|
|
2509
|
-
billingEmail: _zod.z.string().email().optional(),
|
|
2510
|
-
handle: _zod.z.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => _optionalChain([value, 'optionalAccess', _ => _.length]) > 0).optional(),
|
|
2511
|
-
invites: UserInvites.optional(),
|
|
2512
|
-
promoCode: _zod.z.string().optional(),
|
|
2513
|
-
status: InternalStatusSchema.optional(),
|
|
2514
|
-
planInterval: BillingIntervalSchema.optional(),
|
|
2515
|
-
seats: _zod.z.number().optional(),
|
|
2516
|
-
seatLimit: _zod.z.number().optional(),
|
|
2517
|
-
card: CardSchema.optional(),
|
|
2518
|
-
sso: SsoProvider.optional(),
|
|
2519
|
-
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
2520
|
-
ipWhitelist: WorkspaceIpSettings.optional()
|
|
2521
|
-
});
|
|
2522
|
-
var WorkspaceInvitation = _zod.z.object({
|
|
2523
|
-
id: _zod.z.string(),
|
|
2524
|
-
email: _zod.z.string().email(),
|
|
2525
|
-
createdAt: _zod.z.coerce.date(),
|
|
2526
|
-
resentAt: _zod.z.coerce.date().nullish(),
|
|
2527
|
-
role: _zod.z.nativeEnum(WorkspaceRole),
|
|
2528
|
-
workspaceId: _zod.z.string(),
|
|
2529
|
-
invitedBy: _zod.z.string()
|
|
2530
|
-
});
|
|
2531
|
-
var IntegrationAuthType = _zod.z.union([_zod.z.literal("OAuth2"), _zod.z.literal("PAT")]);
|
|
2532
|
-
var ExternalServiceType = _zod.z.union([
|
|
2533
|
-
_zod.z.literal("figma"),
|
|
2534
|
-
_zod.z.literal("github"),
|
|
2535
|
-
_zod.z.literal("azure"),
|
|
2536
|
-
_zod.z.literal("gitlab"),
|
|
2537
|
-
_zod.z.literal("bitbucket")
|
|
2538
|
-
]);
|
|
2539
|
-
var IntegrationUserInfo = _zod.z.object({
|
|
2540
|
-
id: _zod.z.string(),
|
|
2541
|
-
handle: _zod.z.string().optional(),
|
|
2542
|
-
avatarUrl: _zod.z.string().optional(),
|
|
2543
|
-
email: _zod.z.string().optional(),
|
|
2544
|
-
authType: IntegrationAuthType.optional(),
|
|
2545
|
-
customUrl: _zod.z.string().optional()
|
|
2546
|
-
});
|
|
2547
|
-
var UserLinkedIntegrations = _zod.z.object({
|
|
2548
|
-
figma: IntegrationUserInfo.optional(),
|
|
2549
|
-
github: IntegrationUserInfo.array().optional(),
|
|
2550
|
-
azure: IntegrationUserInfo.array().optional(),
|
|
2551
|
-
gitlab: IntegrationUserInfo.array().optional(),
|
|
2552
|
-
bitbucket: IntegrationUserInfo.array().optional()
|
|
2553
|
-
});
|
|
2554
|
-
var UserAnalyticsCleanupSchedule = _zod.z.object({
|
|
2555
|
-
userId: _zod.z.string(),
|
|
2556
|
-
createdAt: _zod.z.coerce.date(),
|
|
2557
|
-
deleteAt: _zod.z.coerce.date()
|
|
2558
|
-
});
|
|
2559
|
-
var UserAnalyticsCleanupScheduleDbInput = UserAnalyticsCleanupSchedule.omit({
|
|
2560
|
-
createdAt: true
|
|
2561
|
-
});
|
|
2562
|
-
var CreateUserInput = _zod.z.object({
|
|
2563
|
-
email: _zod.z.string(),
|
|
2564
|
-
name: _zod.z.string(),
|
|
2565
|
-
username: _zod.z.string()
|
|
2566
|
-
});
|
|
2567
|
-
var UserIdentity = _zod.z.object({
|
|
2568
|
-
id: _zod.z.string(),
|
|
2569
|
-
userId: _zod.z.string()
|
|
2570
|
-
});
|
|
2571
|
-
var UserMinified = _zod.z.object({
|
|
2572
|
-
id: _zod.z.string(),
|
|
2573
|
-
name: _zod.z.string(),
|
|
2574
|
-
email: _zod.z.string(),
|
|
2575
|
-
avatar: _zod.z.string().optional()
|
|
2576
|
-
});
|
|
2577
|
-
var LiveblocksNotificationSettings = _zod.z.object({
|
|
2578
|
-
sendCommentNotificationEmails: _zod.z.boolean()
|
|
2579
|
-
});
|
|
2580
|
-
var UserNotificationSettings = _zod.z.object({
|
|
2581
|
-
liveblocksNotificationSettings: LiveblocksNotificationSettings
|
|
2582
|
-
});
|
|
2583
|
-
var UserOnboardingDepartment = _zod.z.enum(["Design", "Engineering", "Product", "Brand", "Other"]);
|
|
2584
|
-
var UserOnboardingJobLevel = _zod.z.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
2585
|
-
var UserOnboarding = _zod.z.object({
|
|
2586
|
-
companyName: _zod.z.string().optional(),
|
|
2587
|
-
numberOfPeopleInOrg: _zod.z.string().optional(),
|
|
2588
|
-
numberOfPeopleInDesignTeam: _zod.z.string().optional(),
|
|
2589
|
-
department: UserOnboardingDepartment.optional(),
|
|
2590
|
-
jobTitle: _zod.z.string().optional(),
|
|
2591
|
-
phase: _zod.z.string().optional(),
|
|
2592
|
-
jobLevel: UserOnboardingJobLevel.optional(),
|
|
2593
|
-
designSystemName: _zod.z.string().optional(),
|
|
2594
|
-
defaultDestination: _zod.z.string().optional(),
|
|
2595
|
-
figmaUrl: _zod.z.string().optional()
|
|
2596
|
-
});
|
|
2597
|
-
var UserProfile = _zod.z.object({
|
|
2598
|
-
name: _zod.z.string(),
|
|
2599
|
-
avatar: _zod.z.string().optional(),
|
|
2600
|
-
nickname: _zod.z.string().optional(),
|
|
2601
|
-
onboarding: UserOnboarding.optional()
|
|
2602
|
-
});
|
|
2603
|
-
var UserProfileUpdate = UserProfile.partial().omit({
|
|
2604
|
-
avatar: true
|
|
2605
|
-
});
|
|
2606
|
-
var UserTest = _zod.z.object({
|
|
2607
|
-
id: _zod.z.string(),
|
|
2608
|
-
email: _zod.z.string()
|
|
2609
|
-
});
|
|
2610
|
-
var User = _zod.z.object({
|
|
2611
|
-
id: _zod.z.string(),
|
|
2612
|
-
email: _zod.z.string(),
|
|
2613
|
-
emailVerified: _zod.z.boolean(),
|
|
2614
|
-
createdAt: _zod.z.coerce.date(),
|
|
2615
|
-
trialExpiresAt: _zod.z.coerce.date().optional(),
|
|
2616
|
-
profile: UserProfile,
|
|
2617
|
-
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
2618
|
-
loggedOutAt: _zod.z.coerce.date().optional(),
|
|
2619
|
-
isProtected: _zod.z.boolean()
|
|
2620
|
-
});
|
|
2621
|
-
var WorkspaceMembership = _zod.z.object({
|
|
2622
|
-
id: _zod.z.string(),
|
|
2623
|
-
userId: _zod.z.string(),
|
|
2624
|
-
workspaceId: _zod.z.string(),
|
|
2625
|
-
workspaceRole: _zod.z.nativeEnum(WorkspaceRole),
|
|
2626
|
-
notificationSettings: UserNotificationSettings
|
|
2627
|
-
});
|
|
2628
|
-
var UpdateMembershipRolesInput = _zod.z.object({
|
|
2629
|
-
members: _zod.z.array(
|
|
2630
|
-
_zod.z.object({
|
|
2631
|
-
userId: _zod.z.string(),
|
|
2632
|
-
role: _zod.z.nativeEnum(WorkspaceRole)
|
|
2633
|
-
})
|
|
2634
|
-
)
|
|
2635
|
-
});
|
|
2636
|
-
var DesignSystemSwitcher = _zod.z.object({
|
|
2637
|
-
isEnabled: _zod.z.boolean(),
|
|
2638
|
-
designSystemIds: _zod.z.array(_zod.z.string())
|
|
2639
|
-
});
|
|
2640
|
-
var DesignSystem = _zod.z.object({
|
|
2641
|
-
id: _zod.z.string(),
|
|
2570
|
+
var DesignSystem = _zod.z.object({
|
|
2571
|
+
id: _zod.z.string(),
|
|
2642
2572
|
workspaceId: _zod.z.string(),
|
|
2643
2573
|
name: _zod.z.string(),
|
|
2644
2574
|
description: _zod.z.string(),
|
|
@@ -2766,31 +2696,6 @@ var VersionCreationJob = _zod.z.object({
|
|
|
2766
2696
|
status: VersionCreationJobStatus,
|
|
2767
2697
|
errorMessage: nullishToOptional(_zod.z.string())
|
|
2768
2698
|
});
|
|
2769
|
-
var ExportJobDocumentationContext = _zod.z.object({
|
|
2770
|
-
isSingleVersionDocs: _zod.z.boolean(),
|
|
2771
|
-
versionSlug: _zod.z.string(),
|
|
2772
|
-
environment: PublishedDocEnvironment
|
|
2773
|
-
});
|
|
2774
|
-
var ExportJobContext = _zod.z.object({
|
|
2775
|
-
apiUrl: _zod.z.string(),
|
|
2776
|
-
accessToken: _zod.z.string(),
|
|
2777
|
-
designSystemId: _zod.z.string(),
|
|
2778
|
-
designSystemName: _zod.z.string(),
|
|
2779
|
-
exporterId: _zod.z.string(),
|
|
2780
|
-
versionId: _zod.z.string(),
|
|
2781
|
-
brandId: _zod.z.string().optional(),
|
|
2782
|
-
themeId: _zod.z.string().optional(),
|
|
2783
|
-
exporterName: _zod.z.string(),
|
|
2784
|
-
exporterPackageUrl: _zod.z.string(),
|
|
2785
|
-
exporterPropertyValues: ExporterPropertyValue.array(),
|
|
2786
|
-
documentation: ExportJobDocumentationContext.optional()
|
|
2787
|
-
});
|
|
2788
|
-
var ExporterFunctionPayload = _zod.z.object({
|
|
2789
|
-
exportJobId: _zod.z.string(),
|
|
2790
|
-
exportContextId: _zod.z.string(),
|
|
2791
|
-
designSystemId: _zod.z.string(),
|
|
2792
|
-
workspaceId: _zod.z.string()
|
|
2793
|
-
});
|
|
2794
2699
|
var BITBUCKET_SLUG = /^[-a-zA-Z0-9~]*$/;
|
|
2795
2700
|
var BITBUCKET_MAX_LENGTH = 64;
|
|
2796
2701
|
var ExporterDestinationDocs = _zod.z.object({
|
|
@@ -2858,195 +2763,28 @@ var ExportDestinationsMap = _zod.z.object({
|
|
|
2858
2763
|
destinationGitlab: ExporterDestinationGitlab.optional(),
|
|
2859
2764
|
destinationBitbucket: ExporterDestinationBitbucket.optional()
|
|
2860
2765
|
});
|
|
2861
|
-
var
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
"azure",
|
|
2867
|
-
"gitlab",
|
|
2868
|
-
"bitbucket"
|
|
2869
|
-
]);
|
|
2870
|
-
var ExportJobStatus = _zod.z.enum(["InProgress", "Success", "Failed", "Timeout"]);
|
|
2871
|
-
var ExportJobLogEntryType = _zod.z.enum(["success", "info", "warning", "error", "user"]);
|
|
2872
|
-
var ExportJobLogEntry = _zod.z.object({
|
|
2873
|
-
id: _zod.z.string().optional(),
|
|
2874
|
-
time: _zod.z.coerce.date(),
|
|
2875
|
-
type: ExportJobLogEntryType,
|
|
2876
|
-
message: _zod.z.string()
|
|
2877
|
-
});
|
|
2878
|
-
var ExportJobPullRequestDestinationResult = _zod.z.object({
|
|
2879
|
-
pullRequestUrl: _zod.z.string()
|
|
2880
|
-
});
|
|
2881
|
-
var ExportJobS3DestinationResult = _zod.z.object({
|
|
2882
|
-
bucket: _zod.z.string(),
|
|
2883
|
-
urlPrefix: _zod.z.string().optional(),
|
|
2884
|
-
path: _zod.z.string(),
|
|
2885
|
-
files: _zod.z.array(_zod.z.string()),
|
|
2886
|
-
url: nullishToOptional(_zod.z.string()),
|
|
2887
|
-
urls: nullishToOptional(_zod.z.string().array())
|
|
2888
|
-
});
|
|
2889
|
-
var ExportJobDocsDestinationResult = _zod.z.object({
|
|
2890
|
-
url: _zod.z.string()
|
|
2891
|
-
});
|
|
2892
|
-
var ExportJobResult = _zod.z.object({
|
|
2893
|
-
error: _zod.z.string().optional(),
|
|
2894
|
-
s3: nullishToOptional(ExportJobS3DestinationResult),
|
|
2895
|
-
github: nullishToOptional(ExportJobPullRequestDestinationResult),
|
|
2896
|
-
azure: nullishToOptional(ExportJobPullRequestDestinationResult),
|
|
2897
|
-
gitlab: nullishToOptional(ExportJobPullRequestDestinationResult),
|
|
2898
|
-
bitbucket: nullishToOptional(ExportJobPullRequestDestinationResult),
|
|
2899
|
-
sndocs: nullishToOptional(ExportJobDocsDestinationResult),
|
|
2900
|
-
logs: nullishToOptional(ExportJobLogEntry.array())
|
|
2901
|
-
});
|
|
2902
|
-
var ExportJob = _zod.z.object({
|
|
2766
|
+
var PipelineEventType = _zod.z.enum(["OnVersionReleased", "OnHeadChanged", "OnSourceUpdated", "None"]);
|
|
2767
|
+
var PipelineDestinationGitType = _zod.z.enum(["Github", "Gitlab", "Bitbucket", "Azure"]);
|
|
2768
|
+
var PipelineDestinationExtraType = _zod.z.enum(["WebhookUrl", "S3", "Documentation"]);
|
|
2769
|
+
var PipelineDestinationType = _zod.z.union([PipelineDestinationGitType, PipelineDestinationExtraType]);
|
|
2770
|
+
var Pipeline = _zod.z.object({
|
|
2903
2771
|
id: _zod.z.string(),
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
designSystemVersionId: _zod.z.string(),
|
|
2772
|
+
name: _zod.z.string(),
|
|
2773
|
+
eventType: PipelineEventType,
|
|
2774
|
+
isEnabled: _zod.z.boolean(),
|
|
2908
2775
|
workspaceId: _zod.z.string(),
|
|
2909
|
-
|
|
2776
|
+
designSystemId: _zod.z.string(),
|
|
2910
2777
|
exporterId: _zod.z.string(),
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
estimatedExecutionTime: _zod.z.number().optional(),
|
|
2914
|
-
status: ExportJobStatus,
|
|
2915
|
-
result: ExportJobResult.optional(),
|
|
2916
|
-
createdByUserId: _zod.z.string().optional(),
|
|
2778
|
+
brandPersistentId: _zod.z.string().optional(),
|
|
2779
|
+
themePersistentId: _zod.z.string().optional(),
|
|
2917
2780
|
// Destinations
|
|
2918
2781
|
...ExportDestinationsMap.shape
|
|
2919
2782
|
});
|
|
2920
|
-
var
|
|
2921
|
-
exporterId: true,
|
|
2922
|
-
designSystemVersionId: true,
|
|
2923
|
-
createdByUserId: true,
|
|
2924
|
-
status: true,
|
|
2925
|
-
scheduleId: true,
|
|
2926
|
-
designSystemId: true,
|
|
2927
|
-
themeId: true,
|
|
2928
|
-
brandId: true
|
|
2929
|
-
}).extend({
|
|
2930
|
-
destinations: _zod.z.array(ExportJobDestinationType),
|
|
2931
|
-
docsEnvironment: PublishedDocEnvironment
|
|
2932
|
-
}).partial();
|
|
2933
|
-
var ExporterWorkspaceMembershipRole = _zod.z.enum(["Owner", "OwnerArchived", "User"]);
|
|
2934
|
-
var ExporterWorkspaceMembership = _zod.z.object({
|
|
2783
|
+
var ExportJobDump = _zod.z.object({
|
|
2935
2784
|
id: _zod.z.string(),
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
});
|
|
2940
|
-
var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
2941
|
-
GitProviderNames2["Azure"] = "azure";
|
|
2942
|
-
GitProviderNames2["Github"] = "github";
|
|
2943
|
-
GitProviderNames2["Gitlab"] = "gitlab";
|
|
2944
|
-
GitProviderNames2["Bitbucket"] = "bitbucket";
|
|
2945
|
-
return GitProviderNames2;
|
|
2946
|
-
})(GitProviderNames || {});
|
|
2947
|
-
var GitProvider = _zod.z.nativeEnum(GitProviderNames);
|
|
2948
|
-
var PulsarPropertyType = _zod.z.enum([
|
|
2949
|
-
"string",
|
|
2950
|
-
"number",
|
|
2951
|
-
"boolean",
|
|
2952
|
-
"image",
|
|
2953
|
-
"enum",
|
|
2954
|
-
"color",
|
|
2955
|
-
"typography",
|
|
2956
|
-
"component",
|
|
2957
|
-
"componentProperties",
|
|
2958
|
-
"tokenProperties",
|
|
2959
|
-
"tokenType"
|
|
2960
|
-
]);
|
|
2961
|
-
var PulsarBaseProperty = _zod.z.object({
|
|
2962
|
-
label: _zod.z.string(),
|
|
2963
|
-
key: _zod.z.string(),
|
|
2964
|
-
description: _zod.z.string().nullish(),
|
|
2965
|
-
type: PulsarPropertyType,
|
|
2966
|
-
values: _zod.z.array(_zod.z.string()).nullish(),
|
|
2967
|
-
default: _zod.z.union([_zod.z.string(), _zod.z.boolean(), _zod.z.number()]).nullish(),
|
|
2968
|
-
// PulsarPropertyValueType //is optional?
|
|
2969
|
-
inputType: _zod.z.enum(["code", "plain"]).optional(),
|
|
2970
|
-
//is optional?
|
|
2971
|
-
isMultiline: _zod.z.boolean().nullish()
|
|
2972
|
-
});
|
|
2973
|
-
var PulsarContributionConfigurationProperty = PulsarBaseProperty.extend({
|
|
2974
|
-
category: _zod.z.string()
|
|
2975
|
-
});
|
|
2976
|
-
var PulsarContributionVariant = _zod.z.object({
|
|
2977
|
-
key: _zod.z.string(),
|
|
2978
|
-
name: _zod.z.string(),
|
|
2979
|
-
isDefault: nullishToOptional(_zod.z.boolean()),
|
|
2980
|
-
description: nullishToOptional(_zod.z.string()),
|
|
2981
|
-
thumbnailURL: nullishToOptional(_zod.z.string())
|
|
2982
|
-
});
|
|
2983
|
-
var PulsarCustomBlock = _zod.z.object({
|
|
2984
|
-
title: nullishToOptional(_zod.z.string()),
|
|
2985
|
-
key: _zod.z.string(),
|
|
2986
|
-
category: nullishToOptional(_zod.z.string()),
|
|
2987
|
-
description: nullishToOptional(_zod.z.string()),
|
|
2988
|
-
iconURL: nullishToOptional(_zod.z.string()),
|
|
2989
|
-
mode: nullishToOptional(_zod.z.enum(["array", "block"])),
|
|
2990
|
-
properties: nullishToOptional(_zod.z.array(PulsarBaseProperty)).transform((v) => _nullishCoalesce(v, () => ( [])))
|
|
2991
|
-
});
|
|
2992
|
-
var ExporterType = _zod.z.enum(["code", "documentation"]);
|
|
2993
|
-
var ExporterSource = _zod.z.enum(["git", "upload"]);
|
|
2994
|
-
var ExporterTag = _zod.z.string();
|
|
2995
|
-
var ExporterPulsarDetails = _zod.z.object({
|
|
2996
|
-
description: _zod.z.string(),
|
|
2997
|
-
version: _zod.z.string(),
|
|
2998
|
-
routingVersion: nullishToOptional(_zod.z.string()),
|
|
2999
|
-
author: nullishToOptional(_zod.z.string()),
|
|
3000
|
-
organization: nullishToOptional(_zod.z.string()),
|
|
3001
|
-
homepage: nullishToOptional(_zod.z.string()),
|
|
3002
|
-
readme: nullishToOptional(_zod.z.string()),
|
|
3003
|
-
tags: nullishToOptional(_zod.z.array(ExporterTag)).default([]),
|
|
3004
|
-
packageId: nullishToOptional(_zod.z.string().max(255)),
|
|
3005
|
-
iconURL: nullishToOptional(_zod.z.string()),
|
|
3006
|
-
configurationProperties: nullishToOptional(_zod.z.array(PulsarContributionConfigurationProperty)).default([]),
|
|
3007
|
-
customBlocks: nullishToOptional(_zod.z.array(PulsarCustomBlock)).default([]),
|
|
3008
|
-
blockVariants: nullishToOptional(_zod.z.record(_zod.z.string(), _zod.z.array(PulsarContributionVariant))).default({}),
|
|
3009
|
-
usesBrands: nullishToOptional(_zod.z.boolean()).default(false),
|
|
3010
|
-
usesThemes: nullishToOptional(_zod.z.boolean()).default(false)
|
|
3011
|
-
});
|
|
3012
|
-
var ExporterDetails = ExporterPulsarDetails.extend({
|
|
3013
|
-
source: ExporterSource,
|
|
3014
|
-
gitProvider: nullishToOptional(GitProvider),
|
|
3015
|
-
gitUrl: nullishToOptional(_zod.z.string()),
|
|
3016
|
-
gitBranch: nullishToOptional(_zod.z.string()),
|
|
3017
|
-
gitDirectory: nullishToOptional(_zod.z.string())
|
|
3018
|
-
});
|
|
3019
|
-
var Exporter = _zod.z.object({
|
|
3020
|
-
id: _zod.z.string(),
|
|
3021
|
-
createdAt: _zod.z.coerce.date(),
|
|
3022
|
-
name: _zod.z.string(),
|
|
3023
|
-
isPrivate: _zod.z.boolean(),
|
|
3024
|
-
details: ExporterDetails,
|
|
3025
|
-
exporterType: nullishToOptional(ExporterType).default("code"),
|
|
3026
|
-
storagePath: nullishToOptional(_zod.z.string()).default("")
|
|
3027
|
-
});
|
|
3028
|
-
var PipelineEventType = _zod.z.enum(["OnVersionReleased", "OnHeadChanged", "OnSourceUpdated", "None"]);
|
|
3029
|
-
var PipelineDestinationGitType = _zod.z.enum(["Github", "Gitlab", "Bitbucket", "Azure"]);
|
|
3030
|
-
var PipelineDestinationExtraType = _zod.z.enum(["WebhookUrl", "S3", "Documentation"]);
|
|
3031
|
-
var PipelineDestinationType = _zod.z.union([PipelineDestinationGitType, PipelineDestinationExtraType]);
|
|
3032
|
-
var Pipeline = _zod.z.object({
|
|
3033
|
-
id: _zod.z.string(),
|
|
3034
|
-
name: _zod.z.string(),
|
|
3035
|
-
eventType: PipelineEventType,
|
|
3036
|
-
isEnabled: _zod.z.boolean(),
|
|
3037
|
-
workspaceId: _zod.z.string(),
|
|
3038
|
-
designSystemId: _zod.z.string(),
|
|
3039
|
-
exporterId: _zod.z.string(),
|
|
3040
|
-
brandPersistentId: _zod.z.string().optional(),
|
|
3041
|
-
themePersistentId: _zod.z.string().optional(),
|
|
3042
|
-
// Destinations
|
|
3043
|
-
...ExportDestinationsMap.shape
|
|
3044
|
-
});
|
|
3045
|
-
var ExportJobDump = _zod.z.object({
|
|
3046
|
-
id: _zod.z.string(),
|
|
3047
|
-
createdAt: _zod.z.coerce.date(),
|
|
3048
|
-
finishedAt: _zod.z.coerce.date(),
|
|
3049
|
-
exportArtefacts: _zod.z.string()
|
|
2785
|
+
createdAt: _zod.z.coerce.date(),
|
|
2786
|
+
finishedAt: _zod.z.coerce.date(),
|
|
2787
|
+
exportArtefacts: _zod.z.string()
|
|
3050
2788
|
});
|
|
3051
2789
|
var CodeIntegrationDump = _zod.z.object({
|
|
3052
2790
|
exporters: Exporter.array(),
|
|
@@ -3126,71 +2864,105 @@ var DesignSystemVersionDump = _zod.z.object({
|
|
|
3126
2864
|
elementColumns: ElementViewColumn.array(),
|
|
3127
2865
|
documentationPageContents: DocumentationPageContent.array(),
|
|
3128
2866
|
documentationPageRooms: DocumentationPageRoomDump.array(),
|
|
3129
|
-
publishedDocumentations: PublishedDocsDump.array()
|
|
2867
|
+
publishedDocumentations: PublishedDocsDump.array(),
|
|
2868
|
+
assetReferences: AssetReference.array()
|
|
3130
2869
|
});
|
|
3131
2870
|
var DesignSystemDump = _zod.z.object({
|
|
3132
2871
|
designSystem: DesignSystem,
|
|
3133
2872
|
dataSources: DataSource.array(),
|
|
3134
2873
|
versions: DesignSystemVersionDump.array(),
|
|
3135
2874
|
customDomain: CustomDomain.optional(),
|
|
3136
|
-
files:
|
|
2875
|
+
files: Asset.array()
|
|
3137
2876
|
});
|
|
3138
|
-
var
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
var
|
|
3147
|
-
var OAuthProvider = OAuthProviderSchema.enum;
|
|
3148
|
-
var ExternalOAuthRequest = _zod.z.object({
|
|
2877
|
+
var IntegrationAuthType = _zod.z.union([_zod.z.literal("OAuth2"), _zod.z.literal("PAT")]);
|
|
2878
|
+
var ExternalServiceType = _zod.z.union([
|
|
2879
|
+
_zod.z.literal("figma"),
|
|
2880
|
+
_zod.z.literal("github"),
|
|
2881
|
+
_zod.z.literal("azure"),
|
|
2882
|
+
_zod.z.literal("gitlab"),
|
|
2883
|
+
_zod.z.literal("bitbucket")
|
|
2884
|
+
]);
|
|
2885
|
+
var IntegrationUserInfo = _zod.z.object({
|
|
3149
2886
|
id: _zod.z.string(),
|
|
3150
|
-
|
|
2887
|
+
handle: _zod.z.string().optional(),
|
|
2888
|
+
avatarUrl: _zod.z.string().optional(),
|
|
2889
|
+
email: _zod.z.string().optional(),
|
|
2890
|
+
authType: IntegrationAuthType.optional(),
|
|
2891
|
+
customUrl: _zod.z.string().optional()
|
|
2892
|
+
});
|
|
2893
|
+
var UserLinkedIntegrations = _zod.z.object({
|
|
2894
|
+
figma: IntegrationUserInfo.optional(),
|
|
2895
|
+
github: IntegrationUserInfo.array().optional(),
|
|
2896
|
+
azure: IntegrationUserInfo.array().optional(),
|
|
2897
|
+
gitlab: IntegrationUserInfo.array().optional(),
|
|
2898
|
+
bitbucket: IntegrationUserInfo.array().optional()
|
|
2899
|
+
});
|
|
2900
|
+
var UserAnalyticsCleanupSchedule = _zod.z.object({
|
|
3151
2901
|
userId: _zod.z.string(),
|
|
3152
|
-
|
|
3153
|
-
|
|
2902
|
+
createdAt: _zod.z.coerce.date(),
|
|
2903
|
+
deleteAt: _zod.z.coerce.date()
|
|
3154
2904
|
});
|
|
3155
|
-
var
|
|
3156
|
-
|
|
3157
|
-
// Azure Organization | Bitbucket Workspace slug | Gitlab Group | Github Account (User or Organization)
|
|
3158
|
-
project: _zod.z.string().optional(),
|
|
3159
|
-
// Only for Bitbucket and Azure
|
|
3160
|
-
repository: _zod.z.string().optional(),
|
|
3161
|
-
// For all providers. For Gitlab, it's called "project".
|
|
3162
|
-
branch: _zod.z.string().optional(),
|
|
3163
|
-
// For all providers.
|
|
3164
|
-
user: _zod.z.string().optional()
|
|
3165
|
-
// Gitlab user
|
|
2905
|
+
var UserAnalyticsCleanupScheduleDbInput = UserAnalyticsCleanupSchedule.omit({
|
|
2906
|
+
createdAt: true
|
|
3166
2907
|
});
|
|
3167
|
-
var
|
|
3168
|
-
|
|
2908
|
+
var CreateUserInput = _zod.z.object({
|
|
2909
|
+
email: _zod.z.string(),
|
|
3169
2910
|
name: _zod.z.string(),
|
|
3170
|
-
|
|
3171
|
-
slug: _zod.z.string()
|
|
2911
|
+
username: _zod.z.string()
|
|
3172
2912
|
});
|
|
3173
|
-
var
|
|
2913
|
+
var UserIdentity = _zod.z.object({
|
|
3174
2914
|
id: _zod.z.string(),
|
|
3175
|
-
|
|
3176
|
-
url: _zod.z.string(),
|
|
3177
|
-
slug: _zod.z.string()
|
|
2915
|
+
userId: _zod.z.string()
|
|
3178
2916
|
});
|
|
3179
|
-
var
|
|
2917
|
+
var UserMinified = _zod.z.object({
|
|
3180
2918
|
id: _zod.z.string(),
|
|
3181
2919
|
name: _zod.z.string(),
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
/**
|
|
3185
|
-
* Can be undefined when:
|
|
3186
|
-
* - there are no branches in the repository yet
|
|
3187
|
-
* - Git provider doesn't expose this information on a repository via their API
|
|
3188
|
-
*/
|
|
3189
|
-
defaultBranch: _zod.z.string().optional()
|
|
2920
|
+
email: _zod.z.string(),
|
|
2921
|
+
avatar: _zod.z.string().optional()
|
|
3190
2922
|
});
|
|
3191
|
-
var
|
|
2923
|
+
var LiveblocksNotificationSettings = _zod.z.object({
|
|
2924
|
+
sendCommentNotificationEmails: _zod.z.boolean()
|
|
2925
|
+
});
|
|
2926
|
+
var UserNotificationSettings = _zod.z.object({
|
|
2927
|
+
liveblocksNotificationSettings: LiveblocksNotificationSettings
|
|
2928
|
+
});
|
|
2929
|
+
var UserOnboardingDepartment = _zod.z.enum(["Design", "Engineering", "Product", "Brand", "Other"]);
|
|
2930
|
+
var UserOnboardingJobLevel = _zod.z.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
2931
|
+
var UserOnboarding = _zod.z.object({
|
|
2932
|
+
companyName: _zod.z.string().optional(),
|
|
2933
|
+
numberOfPeopleInOrg: _zod.z.string().optional(),
|
|
2934
|
+
numberOfPeopleInDesignTeam: _zod.z.string().optional(),
|
|
2935
|
+
department: UserOnboardingDepartment.optional(),
|
|
2936
|
+
jobTitle: _zod.z.string().optional(),
|
|
2937
|
+
phase: _zod.z.string().optional(),
|
|
2938
|
+
jobLevel: UserOnboardingJobLevel.optional(),
|
|
2939
|
+
designSystemName: _zod.z.string().optional(),
|
|
2940
|
+
defaultDestination: _zod.z.string().optional(),
|
|
2941
|
+
figmaUrl: _zod.z.string().optional()
|
|
2942
|
+
});
|
|
2943
|
+
var UserProfile = _zod.z.object({
|
|
3192
2944
|
name: _zod.z.string(),
|
|
3193
|
-
|
|
2945
|
+
avatar: _zod.z.string().optional(),
|
|
2946
|
+
nickname: _zod.z.string().optional(),
|
|
2947
|
+
onboarding: UserOnboarding.optional()
|
|
2948
|
+
});
|
|
2949
|
+
var UserProfileUpdate = UserProfile.partial().omit({
|
|
2950
|
+
avatar: true
|
|
2951
|
+
});
|
|
2952
|
+
var UserTest = _zod.z.object({
|
|
2953
|
+
id: _zod.z.string(),
|
|
2954
|
+
email: _zod.z.string()
|
|
2955
|
+
});
|
|
2956
|
+
var User = _zod.z.object({
|
|
2957
|
+
id: _zod.z.string(),
|
|
2958
|
+
email: _zod.z.string(),
|
|
2959
|
+
emailVerified: _zod.z.boolean(),
|
|
2960
|
+
createdAt: _zod.z.coerce.date(),
|
|
2961
|
+
trialExpiresAt: _zod.z.coerce.date().optional(),
|
|
2962
|
+
profile: UserProfile,
|
|
2963
|
+
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
2964
|
+
loggedOutAt: _zod.z.coerce.date().optional(),
|
|
2965
|
+
isProtected: _zod.z.boolean()
|
|
3194
2966
|
});
|
|
3195
2967
|
var SupernovaException = class _SupernovaException extends Error {
|
|
3196
2968
|
//
|
|
@@ -3322,7 +3094,7 @@ var ContentLoaderPayload = _zod.z.object({
|
|
|
3322
3094
|
);
|
|
3323
3095
|
function slugify(str, options) {
|
|
3324
3096
|
const slug = _slugify2.default.call(void 0, _nullishCoalesce(str, () => ( "")), options);
|
|
3325
|
-
return _optionalChain([slug, 'optionalAccess',
|
|
3097
|
+
return _optionalChain([slug, 'optionalAccess', _ => _.length]) > 0 ? slug : "item";
|
|
3326
3098
|
}
|
|
3327
3099
|
var RESERVED_SLUGS = [
|
|
3328
3100
|
"workspaces",
|
|
@@ -3944,6 +3716,7 @@ var RESERVED_SLUGS = [
|
|
|
3944
3716
|
"super-nova"
|
|
3945
3717
|
];
|
|
3946
3718
|
var RESERVED_SLUGS_SET = new Set(RESERVED_SLUGS);
|
|
3719
|
+
var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
3947
3720
|
var IntegrationDesignSystem = _zod.z.object({
|
|
3948
3721
|
designSystemId: _zod.z.string(),
|
|
3949
3722
|
brandId: _zod.z.string(),
|
|
@@ -4011,7 +3784,7 @@ var IntegrationToken = _zod.z.object({
|
|
|
4011
3784
|
token_bitbucket_username: _zod.z.string().optional(),
|
|
4012
3785
|
// Bitbucket only
|
|
4013
3786
|
custom_url: _zod.z.string().optional().transform((value) => {
|
|
4014
|
-
if (!_optionalChain([value, 'optionalAccess',
|
|
3787
|
+
if (!_optionalChain([value, 'optionalAccess', _2 => _2.trim, 'call', _3 => _3()]))
|
|
4015
3788
|
return void 0;
|
|
4016
3789
|
return formatCustomUrl(value);
|
|
4017
3790
|
})
|
|
@@ -4046,29 +3819,16 @@ function formatCustomUrl(url) {
|
|
|
4046
3819
|
}
|
|
4047
3820
|
return forbiddenCustomUrlDomainList.some((domain) => formattedUrl.includes(domain)) ? void 0 : formattedUrl;
|
|
4048
3821
|
}
|
|
4049
|
-
var IntegrationTokenSchemaOld = _zod.z.object({
|
|
4050
|
-
id: _zod.z.string(),
|
|
4051
|
-
provider: OAuthProviderSchema,
|
|
4052
|
-
scope: _zod.z.string(),
|
|
4053
|
-
userId: _zod.z.string(),
|
|
4054
|
-
accessToken: _zod.z.string(),
|
|
4055
|
-
refreshToken: _zod.z.string(),
|
|
4056
|
-
expiresAt: _zod.z.coerce.date(),
|
|
4057
|
-
externalUserId: _zod.z.string().nullish()
|
|
4058
|
-
});
|
|
4059
|
-
var WorkspaceOAuthRequestSchema = _zod.z.object({
|
|
4060
|
-
id: _zod.z.string(),
|
|
4061
|
-
workspaceId: _zod.z.string(),
|
|
4062
|
-
provider: OAuthProviderSchema,
|
|
4063
|
-
userId: _zod.z.string(),
|
|
4064
|
-
createdAt: _zod.z.coerce.date()
|
|
4065
|
-
});
|
|
4066
3822
|
var WorkspaceDump = _zod.z.object({
|
|
4067
3823
|
workspace: Workspace,
|
|
4068
3824
|
designSystems: DesignSystemDump.array(),
|
|
4069
3825
|
codeIntegration: CodeIntegrationDump,
|
|
4070
3826
|
integrations: Integration.array()
|
|
4071
3827
|
});
|
|
3828
|
+
var UserDump = _zod.z.object({
|
|
3829
|
+
user: User,
|
|
3830
|
+
workspaces: WorkspaceDump.array()
|
|
3831
|
+
});
|
|
4072
3832
|
var NpmProxyToken = _zod.z.object({
|
|
4073
3833
|
access: _zod.z.string(),
|
|
4074
3834
|
expiresAt: _zod.z.number()
|
|
@@ -4091,6 +3851,110 @@ var UserSession = _zod.z.object({
|
|
|
4091
3851
|
session: Session,
|
|
4092
3852
|
user: User.nullable()
|
|
4093
3853
|
});
|
|
3854
|
+
var ExportJobDocumentationContext = _zod.z.object({
|
|
3855
|
+
isSingleVersionDocs: _zod.z.boolean(),
|
|
3856
|
+
versionSlug: _zod.z.string(),
|
|
3857
|
+
environment: PublishedDocEnvironment
|
|
3858
|
+
});
|
|
3859
|
+
var ExportJobContext = _zod.z.object({
|
|
3860
|
+
apiUrl: _zod.z.string(),
|
|
3861
|
+
accessToken: _zod.z.string(),
|
|
3862
|
+
designSystemId: _zod.z.string(),
|
|
3863
|
+
designSystemName: _zod.z.string(),
|
|
3864
|
+
exporterId: _zod.z.string(),
|
|
3865
|
+
versionId: _zod.z.string(),
|
|
3866
|
+
brandId: _zod.z.string().optional(),
|
|
3867
|
+
themeId: _zod.z.string().optional(),
|
|
3868
|
+
exporterName: _zod.z.string(),
|
|
3869
|
+
exporterPackageUrl: _zod.z.string(),
|
|
3870
|
+
exporterPropertyValues: ExporterPropertyValue.array(),
|
|
3871
|
+
documentation: ExportJobDocumentationContext.optional()
|
|
3872
|
+
});
|
|
3873
|
+
var ExporterFunctionPayload = _zod.z.object({
|
|
3874
|
+
exportJobId: _zod.z.string(),
|
|
3875
|
+
exportContextId: _zod.z.string(),
|
|
3876
|
+
designSystemId: _zod.z.string(),
|
|
3877
|
+
workspaceId: _zod.z.string()
|
|
3878
|
+
});
|
|
3879
|
+
var ExportJobDestinationType = _zod.z.enum([
|
|
3880
|
+
"s3",
|
|
3881
|
+
"webhookUrl",
|
|
3882
|
+
"github",
|
|
3883
|
+
"documentation",
|
|
3884
|
+
"azure",
|
|
3885
|
+
"gitlab",
|
|
3886
|
+
"bitbucket"
|
|
3887
|
+
]);
|
|
3888
|
+
var ExportJobStatus = _zod.z.enum(["InProgress", "Success", "Failed", "Timeout"]);
|
|
3889
|
+
var ExportJobLogEntryType = _zod.z.enum(["success", "info", "warning", "error", "user"]);
|
|
3890
|
+
var ExportJobLogEntry = _zod.z.object({
|
|
3891
|
+
id: _zod.z.string().optional(),
|
|
3892
|
+
time: _zod.z.coerce.date(),
|
|
3893
|
+
type: ExportJobLogEntryType,
|
|
3894
|
+
message: _zod.z.string()
|
|
3895
|
+
});
|
|
3896
|
+
var ExportJobPullRequestDestinationResult = _zod.z.object({
|
|
3897
|
+
pullRequestUrl: _zod.z.string()
|
|
3898
|
+
});
|
|
3899
|
+
var ExportJobS3DestinationResult = _zod.z.object({
|
|
3900
|
+
bucket: _zod.z.string(),
|
|
3901
|
+
urlPrefix: _zod.z.string().optional(),
|
|
3902
|
+
path: _zod.z.string(),
|
|
3903
|
+
files: _zod.z.array(_zod.z.string()),
|
|
3904
|
+
url: nullishToOptional(_zod.z.string()),
|
|
3905
|
+
urls: nullishToOptional(_zod.z.string().array())
|
|
3906
|
+
});
|
|
3907
|
+
var ExportJobDocsDestinationResult = _zod.z.object({
|
|
3908
|
+
url: _zod.z.string()
|
|
3909
|
+
});
|
|
3910
|
+
var ExportJobResult = _zod.z.object({
|
|
3911
|
+
error: _zod.z.string().optional(),
|
|
3912
|
+
s3: nullishToOptional(ExportJobS3DestinationResult),
|
|
3913
|
+
github: nullishToOptional(ExportJobPullRequestDestinationResult),
|
|
3914
|
+
azure: nullishToOptional(ExportJobPullRequestDestinationResult),
|
|
3915
|
+
gitlab: nullishToOptional(ExportJobPullRequestDestinationResult),
|
|
3916
|
+
bitbucket: nullishToOptional(ExportJobPullRequestDestinationResult),
|
|
3917
|
+
sndocs: nullishToOptional(ExportJobDocsDestinationResult),
|
|
3918
|
+
logs: nullishToOptional(ExportJobLogEntry.array())
|
|
3919
|
+
});
|
|
3920
|
+
var ExportJob = _zod.z.object({
|
|
3921
|
+
id: _zod.z.string(),
|
|
3922
|
+
createdAt: _zod.z.coerce.date(),
|
|
3923
|
+
finishedAt: _zod.z.coerce.date().optional(),
|
|
3924
|
+
designSystemId: _zod.z.string(),
|
|
3925
|
+
designSystemVersionId: _zod.z.string(),
|
|
3926
|
+
workspaceId: _zod.z.string(),
|
|
3927
|
+
scheduleId: _zod.z.string().nullish(),
|
|
3928
|
+
exporterId: _zod.z.string(),
|
|
3929
|
+
brandId: _zod.z.string().optional(),
|
|
3930
|
+
themeId: _zod.z.string().optional(),
|
|
3931
|
+
estimatedExecutionTime: _zod.z.number().optional(),
|
|
3932
|
+
status: ExportJobStatus,
|
|
3933
|
+
result: ExportJobResult.optional(),
|
|
3934
|
+
createdByUserId: _zod.z.string().optional(),
|
|
3935
|
+
// Destinations
|
|
3936
|
+
...ExportDestinationsMap.shape
|
|
3937
|
+
});
|
|
3938
|
+
var ExportJobFindByFilter = ExportJob.pick({
|
|
3939
|
+
exporterId: true,
|
|
3940
|
+
designSystemVersionId: true,
|
|
3941
|
+
createdByUserId: true,
|
|
3942
|
+
status: true,
|
|
3943
|
+
scheduleId: true,
|
|
3944
|
+
designSystemId: true,
|
|
3945
|
+
themeId: true,
|
|
3946
|
+
brandId: true
|
|
3947
|
+
}).extend({
|
|
3948
|
+
destinations: _zod.z.array(ExportJobDestinationType),
|
|
3949
|
+
docsEnvironment: PublishedDocEnvironment
|
|
3950
|
+
}).partial();
|
|
3951
|
+
var ExporterWorkspaceMembershipRole = _zod.z.enum(["Owner", "OwnerArchived", "User"]);
|
|
3952
|
+
var ExporterWorkspaceMembership = _zod.z.object({
|
|
3953
|
+
id: _zod.z.string(),
|
|
3954
|
+
workspaceId: _zod.z.string(),
|
|
3955
|
+
exporterId: _zod.z.string(),
|
|
3956
|
+
role: ExporterWorkspaceMembershipRole
|
|
3957
|
+
});
|
|
4094
3958
|
var FlaggedFeature = _zod.z.enum(["FigmaImporterV2", "ShadowOpacityOptional", "DisableImporter"]);
|
|
4095
3959
|
var FeatureFlagMap = _zod.z.record(FlaggedFeature, _zod.z.boolean());
|
|
4096
3960
|
var FeatureFlag = _zod.z.object({
|
|
@@ -4100,6 +3964,80 @@ var FeatureFlag = _zod.z.object({
|
|
|
4100
3964
|
enabled: _zod.z.boolean(),
|
|
4101
3965
|
designSystemId: _zod.z.string().optional()
|
|
4102
3966
|
});
|
|
3967
|
+
var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
3968
|
+
OAuthProviderNames2["Figma"] = "figma";
|
|
3969
|
+
OAuthProviderNames2["Azure"] = "azure";
|
|
3970
|
+
OAuthProviderNames2["Github"] = "github";
|
|
3971
|
+
OAuthProviderNames2["Gitlab"] = "gitlab";
|
|
3972
|
+
OAuthProviderNames2["Bitbucket"] = "bitbucket";
|
|
3973
|
+
return OAuthProviderNames2;
|
|
3974
|
+
})(OAuthProviderNames || {});
|
|
3975
|
+
var OAuthProviderSchema = _zod.z.nativeEnum(OAuthProviderNames);
|
|
3976
|
+
var OAuthProvider = OAuthProviderSchema.enum;
|
|
3977
|
+
var ExternalOAuthRequest = _zod.z.object({
|
|
3978
|
+
id: _zod.z.string(),
|
|
3979
|
+
provider: OAuthProviderSchema,
|
|
3980
|
+
userId: _zod.z.string(),
|
|
3981
|
+
state: _zod.z.string(),
|
|
3982
|
+
createdAt: _zod.z.coerce.date()
|
|
3983
|
+
});
|
|
3984
|
+
var GitObjectsQuery = _zod.z.object({
|
|
3985
|
+
organization: _zod.z.string().optional(),
|
|
3986
|
+
// Azure Organization | Bitbucket Workspace slug | Gitlab Group | Github Account (User or Organization)
|
|
3987
|
+
project: _zod.z.string().optional(),
|
|
3988
|
+
// Only for Bitbucket and Azure
|
|
3989
|
+
repository: _zod.z.string().optional(),
|
|
3990
|
+
// For all providers. For Gitlab, it's called "project".
|
|
3991
|
+
branch: _zod.z.string().optional(),
|
|
3992
|
+
// For all providers.
|
|
3993
|
+
user: _zod.z.string().optional()
|
|
3994
|
+
// Gitlab user
|
|
3995
|
+
});
|
|
3996
|
+
var GitOrganization = _zod.z.object({
|
|
3997
|
+
id: _zod.z.string(),
|
|
3998
|
+
name: _zod.z.string(),
|
|
3999
|
+
url: _zod.z.string(),
|
|
4000
|
+
slug: _zod.z.string()
|
|
4001
|
+
});
|
|
4002
|
+
var GitProject = _zod.z.object({
|
|
4003
|
+
id: _zod.z.string(),
|
|
4004
|
+
name: _zod.z.string(),
|
|
4005
|
+
url: _zod.z.string(),
|
|
4006
|
+
slug: _zod.z.string()
|
|
4007
|
+
});
|
|
4008
|
+
var GitRepository = _zod.z.object({
|
|
4009
|
+
id: _zod.z.string(),
|
|
4010
|
+
name: _zod.z.string(),
|
|
4011
|
+
url: _zod.z.string(),
|
|
4012
|
+
slug: _zod.z.string(),
|
|
4013
|
+
/**
|
|
4014
|
+
* Can be undefined when:
|
|
4015
|
+
* - there are no branches in the repository yet
|
|
4016
|
+
* - Git provider doesn't expose this information on a repository via their API
|
|
4017
|
+
*/
|
|
4018
|
+
defaultBranch: _zod.z.string().optional()
|
|
4019
|
+
});
|
|
4020
|
+
var GitBranch = _zod.z.object({
|
|
4021
|
+
name: _zod.z.string(),
|
|
4022
|
+
lastCommitId: _zod.z.string()
|
|
4023
|
+
});
|
|
4024
|
+
var IntegrationTokenSchemaOld = _zod.z.object({
|
|
4025
|
+
id: _zod.z.string(),
|
|
4026
|
+
provider: OAuthProviderSchema,
|
|
4027
|
+
scope: _zod.z.string(),
|
|
4028
|
+
userId: _zod.z.string(),
|
|
4029
|
+
accessToken: _zod.z.string(),
|
|
4030
|
+
refreshToken: _zod.z.string(),
|
|
4031
|
+
expiresAt: _zod.z.coerce.date(),
|
|
4032
|
+
externalUserId: _zod.z.string().nullish()
|
|
4033
|
+
});
|
|
4034
|
+
var WorkspaceOAuthRequestSchema = _zod.z.object({
|
|
4035
|
+
id: _zod.z.string(),
|
|
4036
|
+
workspaceId: _zod.z.string(),
|
|
4037
|
+
provider: OAuthProviderSchema,
|
|
4038
|
+
userId: _zod.z.string(),
|
|
4039
|
+
createdAt: _zod.z.coerce.date()
|
|
4040
|
+
});
|
|
4103
4041
|
var AnyRecord = _zod.z.record(_zod.z.any());
|
|
4104
4042
|
var NpmPackageVersionDist = AnyRecord.and(
|
|
4105
4043
|
_zod.z.object({
|
|
@@ -4124,6 +4062,72 @@ var NpmPackage = AnyRecord.and(
|
|
|
4124
4062
|
var NpmProxyTokenPayload = _zod.z.object({
|
|
4125
4063
|
npmProxyRegistryConfigId: _zod.z.string()
|
|
4126
4064
|
});
|
|
4065
|
+
var WorkspaceRoleSchema = _zod.z.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest"]);
|
|
4066
|
+
var WorkspaceRole = WorkspaceRoleSchema.enum;
|
|
4067
|
+
var MAX_MEMBERS_COUNT = 100;
|
|
4068
|
+
var UserInvite = _zod.z.object({
|
|
4069
|
+
email: _zod.z.string().email().trim().transform((value) => value.toLowerCase()),
|
|
4070
|
+
role: WorkspaceRoleSchema
|
|
4071
|
+
});
|
|
4072
|
+
var UserInvites = _zod.z.array(UserInvite).max(MAX_MEMBERS_COUNT);
|
|
4073
|
+
var WorkspaceConfigurationUpdate = _zod.z.object({
|
|
4074
|
+
id: _zod.z.string(),
|
|
4075
|
+
ipWhitelist: WorkspaceIpSettings.optional(),
|
|
4076
|
+
sso: SsoProvider.optional(),
|
|
4077
|
+
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
4078
|
+
profile: WorkspaceProfileUpdate.optional()
|
|
4079
|
+
});
|
|
4080
|
+
var WorkspaceContext = _zod.z.object({
|
|
4081
|
+
workspaceId: _zod.z.string(),
|
|
4082
|
+
product: ProductCodeSchema,
|
|
4083
|
+
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
4084
|
+
publicDesignSystem: _zod.z.boolean().optional()
|
|
4085
|
+
});
|
|
4086
|
+
var WORKSPACE_NAME_MIN_LENGTH = 2;
|
|
4087
|
+
var WORKSPACE_NAME_MAX_LENGTH = 64;
|
|
4088
|
+
var HANDLE_MIN_LENGTH = 2;
|
|
4089
|
+
var HANDLE_MAX_LENGTH = 64;
|
|
4090
|
+
var CreateWorkspaceInput = _zod.z.object({
|
|
4091
|
+
name: _zod.z.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
|
|
4092
|
+
product: ProductCodeSchema,
|
|
4093
|
+
priceId: _zod.z.string(),
|
|
4094
|
+
billingEmail: _zod.z.string().email().optional(),
|
|
4095
|
+
handle: _zod.z.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => _optionalChain([value, 'optionalAccess', _4 => _4.length]) > 0).optional(),
|
|
4096
|
+
invites: UserInvites.optional(),
|
|
4097
|
+
promoCode: _zod.z.string().optional(),
|
|
4098
|
+
status: InternalStatusSchema.optional(),
|
|
4099
|
+
planInterval: BillingIntervalSchema.optional(),
|
|
4100
|
+
seats: _zod.z.number().optional(),
|
|
4101
|
+
seatLimit: _zod.z.number().optional(),
|
|
4102
|
+
card: CardSchema.optional(),
|
|
4103
|
+
sso: SsoProvider.optional(),
|
|
4104
|
+
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
4105
|
+
ipWhitelist: WorkspaceIpSettings.optional()
|
|
4106
|
+
});
|
|
4107
|
+
var WorkspaceInvitation = _zod.z.object({
|
|
4108
|
+
id: _zod.z.string(),
|
|
4109
|
+
email: _zod.z.string().email(),
|
|
4110
|
+
createdAt: _zod.z.coerce.date(),
|
|
4111
|
+
resentAt: _zod.z.coerce.date().nullish(),
|
|
4112
|
+
role: _zod.z.nativeEnum(WorkspaceRole),
|
|
4113
|
+
workspaceId: _zod.z.string(),
|
|
4114
|
+
invitedBy: _zod.z.string()
|
|
4115
|
+
});
|
|
4116
|
+
var WorkspaceMembership = _zod.z.object({
|
|
4117
|
+
id: _zod.z.string(),
|
|
4118
|
+
userId: _zod.z.string(),
|
|
4119
|
+
workspaceId: _zod.z.string(),
|
|
4120
|
+
workspaceRole: _zod.z.nativeEnum(WorkspaceRole),
|
|
4121
|
+
notificationSettings: UserNotificationSettings
|
|
4122
|
+
});
|
|
4123
|
+
var UpdateMembershipRolesInput = _zod.z.object({
|
|
4124
|
+
members: _zod.z.array(
|
|
4125
|
+
_zod.z.object({
|
|
4126
|
+
userId: _zod.z.string(),
|
|
4127
|
+
role: _zod.z.nativeEnum(WorkspaceRole)
|
|
4128
|
+
})
|
|
4129
|
+
)
|
|
4130
|
+
});
|
|
4127
4131
|
var PersonalAccessToken = _zod.z.object({
|
|
4128
4132
|
id: _zod.z.string(),
|
|
4129
4133
|
userId: _zod.z.string(),
|