@supernova-studio/model 0.47.48 → 0.47.50
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 +939 -905
- package/dist/index.d.ts +939 -905
- package/dist/index.js +272 -239
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1794 -1761
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/components/asset-rendering.ts +22 -0
- package/src/dsm/components/index.ts +1 -0
- package/src/dsm/data-sources/data-source.ts +1 -1
- package/src/dsm/import/image.ts +16 -1
- package/src/dsm/index.ts +1 -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 z122 } 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 z121 } from "zod";
|
|
390
390
|
|
|
391
391
|
// src/export/export-destinations.ts
|
|
392
|
-
import { z as
|
|
392
|
+
import { z as z120 } from "zod";
|
|
393
393
|
|
|
394
394
|
// src/dsm/assets/asset-dynamo-record.ts
|
|
395
395
|
import { z as z18 } from "zod";
|
|
@@ -453,8 +453,8 @@ function isImportedAsset(asset) {
|
|
|
453
453
|
return !!asset.originKey;
|
|
454
454
|
}
|
|
455
455
|
|
|
456
|
-
// src/dsm/
|
|
457
|
-
import { z as
|
|
456
|
+
// src/dsm/components/asset-rendering.ts
|
|
457
|
+
import { z as z93 } from "zod";
|
|
458
458
|
|
|
459
459
|
// src/dsm/import/support/figma-files.ts
|
|
460
460
|
import { z as z22 } from "zod";
|
|
@@ -471,7 +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 z84 } from "zod";
|
|
475
|
+
|
|
476
|
+
// src/dsm/data-sources/data-source.ts
|
|
477
|
+
import { z as z82 } from "zod";
|
|
475
478
|
|
|
476
479
|
// src/dsm/import/warning.ts
|
|
477
480
|
import { z as z23 } from "zod";
|
|
@@ -501,101 +504,13 @@ var ImportWarning = z23.object({
|
|
|
501
504
|
referenceId: z23.string().optional()
|
|
502
505
|
});
|
|
503
506
|
|
|
504
|
-
// src/dsm/
|
|
505
|
-
|
|
506
|
-
importJobId: z24.string(),
|
|
507
|
-
importContextId: z24.string(),
|
|
508
|
-
designSystemId: z24.string().optional()
|
|
509
|
-
});
|
|
510
|
-
var ImportedFigmaSourceData = z24.object({
|
|
511
|
-
sourceId: z24.string(),
|
|
512
|
-
figmaRemote: DataSourceFigmaRemote
|
|
513
|
-
});
|
|
514
|
-
var FigmaImportBaseContext = z24.object({
|
|
515
|
-
designSystemId: z24.string(),
|
|
516
|
-
/**
|
|
517
|
-
* Data required for accessing Figma files. This should contain access data for all file ids
|
|
518
|
-
* mentioned in the `importedSourceDataBySourceId`
|
|
519
|
-
*
|
|
520
|
-
* fileId: file data
|
|
521
|
-
*/
|
|
522
|
-
fileAccessByFileId: z24.record(FigmaFileAccessData),
|
|
523
|
-
/**
|
|
524
|
-
* Figma source data for which import was requested
|
|
525
|
-
*
|
|
526
|
-
* sourceId: source data
|
|
527
|
-
*/
|
|
528
|
-
importedSourceDataBySourceId: z24.record(ImportedFigmaSourceData),
|
|
529
|
-
/**
|
|
530
|
-
* Array of warnings that will be written into the import result summary at the end
|
|
531
|
-
* of import job execution and displayed by the client.
|
|
532
|
-
*/
|
|
533
|
-
importWarnings: z24.record(ImportWarning.array()).default({})
|
|
534
|
-
});
|
|
535
|
-
var FigmaImportContextWithSourcesState = FigmaImportBaseContext.extend({
|
|
536
|
-
sourcesWithMissingAccess: z24.array(z24.string()).default([]),
|
|
537
|
-
shadowOpacityOptional: z24.boolean().default(false)
|
|
538
|
-
});
|
|
539
|
-
var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
|
|
540
|
-
importMetadata: DataSourceFigmaImportMetadata
|
|
541
|
-
});
|
|
542
|
-
var FigmaImportContextWithDownloadScopes = FigmaImportContextWithSourcesState.extend({
|
|
543
|
-
/**
|
|
544
|
-
* Describes what to download from each file, this should contain all file id mentioned in
|
|
545
|
-
* importMetadataBySourceId.
|
|
546
|
-
*
|
|
547
|
-
* File id -> file download scope
|
|
548
|
-
*/
|
|
549
|
-
fileDownloadScopesByFileId: z24.record(FigmaFileDownloadScope),
|
|
550
|
-
/**
|
|
551
|
-
* Sources filtered down to the ones that have changed since last import and therefore need to be
|
|
552
|
-
* imported again.
|
|
553
|
-
*
|
|
554
|
-
* Source id -> import metadata
|
|
555
|
-
*/
|
|
556
|
-
changedImportedSourceDataBySourceId: z24.record(ChangedImportedFigmaSourceData)
|
|
557
|
-
});
|
|
558
|
-
|
|
559
|
-
// src/dsm/import/support/import-model-collections.ts
|
|
560
|
-
import { z as z89 } from "zod";
|
|
561
|
-
|
|
562
|
-
// src/dsm/import/image.ts
|
|
563
|
-
import { z as z25 } from "zod";
|
|
564
|
-
var ImageImportModelType = z25.enum(["Url", "FigmaRender"]);
|
|
565
|
-
var ImageImportModelBase = z25.object({
|
|
566
|
-
scope: AssetScope
|
|
567
|
-
});
|
|
568
|
-
var UrlImageImportModel = ImageImportModelBase.extend({
|
|
569
|
-
type: z25.literal(ImageImportModelType.enum.Url),
|
|
570
|
-
url: z25.string(),
|
|
571
|
-
originKey: z25.string(),
|
|
572
|
-
extension: z25.string()
|
|
573
|
-
});
|
|
574
|
-
var FigmaRenderFormat = z25.enum(["Svg", "Png"]);
|
|
575
|
-
var FigmaRenderBase = ImageImportModelBase.extend({
|
|
576
|
-
type: z25.literal(ImageImportModelType.enum.FigmaRender),
|
|
577
|
-
fileId: z25.string(),
|
|
578
|
-
fileVersionId: z25.string().optional(),
|
|
579
|
-
nodeId: z25.string(),
|
|
580
|
-
originKey: z25.string()
|
|
581
|
-
});
|
|
582
|
-
var FigmaPngRenderImportModel = FigmaRenderBase.extend({
|
|
583
|
-
format: z25.literal(FigmaRenderFormat.enum.Png),
|
|
584
|
-
scale: z25.number()
|
|
585
|
-
});
|
|
586
|
-
var FigmaSvgRenderImportModel = FigmaRenderBase.extend({
|
|
587
|
-
format: z25.literal(FigmaRenderFormat.enum.Svg)
|
|
588
|
-
});
|
|
589
|
-
var FigmaRenderImportModel = z25.discriminatedUnion("format", [
|
|
590
|
-
FigmaPngRenderImportModel,
|
|
591
|
-
FigmaSvgRenderImportModel
|
|
592
|
-
]);
|
|
593
|
-
var ImageImportModel = z25.union([UrlImageImportModel, FigmaRenderImportModel]);
|
|
507
|
+
// src/dsm/data-sources/import-summary.ts
|
|
508
|
+
import { z as z81 } from "zod";
|
|
594
509
|
|
|
595
510
|
// src/dsm/elements/data/base.ts
|
|
596
|
-
import { z as
|
|
597
|
-
var TokenDataAliasSchema =
|
|
598
|
-
aliasTo:
|
|
511
|
+
import { z as z24 } from "zod";
|
|
512
|
+
var TokenDataAliasSchema = z24.object({
|
|
513
|
+
aliasTo: z24.string().optional().nullable().transform((v) => v ?? void 0)
|
|
599
514
|
});
|
|
600
515
|
function tokenAliasOrValue(value) {
|
|
601
516
|
return TokenDataAliasSchema.extend({
|
|
@@ -604,68 +519,68 @@ function tokenAliasOrValue(value) {
|
|
|
604
519
|
}
|
|
605
520
|
|
|
606
521
|
// src/dsm/elements/data/blur.ts
|
|
607
|
-
import { z as
|
|
522
|
+
import { z as z26 } from "zod";
|
|
608
523
|
|
|
609
524
|
// src/dsm/elements/data/dimension.ts
|
|
610
|
-
import { z as
|
|
611
|
-
var DimensionUnit =
|
|
612
|
-
var DimensionValue =
|
|
525
|
+
import { z as z25 } from "zod";
|
|
526
|
+
var DimensionUnit = z25.enum(["Pixels", "Percent", "Rem", "Ms", "Raw", "Points"]);
|
|
527
|
+
var DimensionValue = z25.object({
|
|
613
528
|
unit: DimensionUnit,
|
|
614
|
-
measure:
|
|
529
|
+
measure: z25.number()
|
|
615
530
|
});
|
|
616
531
|
var DimensionTokenData = tokenAliasOrValue(DimensionValue);
|
|
617
532
|
|
|
618
533
|
// src/dsm/elements/data/blur.ts
|
|
619
|
-
var BlurType =
|
|
620
|
-
var BlurValue =
|
|
534
|
+
var BlurType = z26.enum(["Layer", "Background"]);
|
|
535
|
+
var BlurValue = z26.object({
|
|
621
536
|
type: BlurType,
|
|
622
537
|
radius: DimensionTokenData
|
|
623
538
|
});
|
|
624
539
|
var BlurTokenData = tokenAliasOrValue(BlurValue);
|
|
625
540
|
|
|
626
541
|
// src/dsm/elements/data/border-radius.ts
|
|
627
|
-
import { z as
|
|
628
|
-
var BorderRadiusUnit =
|
|
629
|
-
var BorderRadiusValue =
|
|
542
|
+
import { z as z27 } from "zod";
|
|
543
|
+
var BorderRadiusUnit = z27.enum(["Pixels", "Rem", "Percent"]);
|
|
544
|
+
var BorderRadiusValue = z27.object({
|
|
630
545
|
unit: BorderRadiusUnit,
|
|
631
|
-
measure:
|
|
546
|
+
measure: z27.number()
|
|
632
547
|
});
|
|
633
548
|
var BorderRadiusTokenData = tokenAliasOrValue(BorderRadiusValue);
|
|
634
549
|
|
|
635
550
|
// src/dsm/elements/data/border-width.ts
|
|
636
|
-
import { z as
|
|
637
|
-
var BorderWidthUnit =
|
|
638
|
-
var BorderWidthValue =
|
|
551
|
+
import { z as z28 } from "zod";
|
|
552
|
+
var BorderWidthUnit = z28.enum(["Pixels"]);
|
|
553
|
+
var BorderWidthValue = z28.object({
|
|
639
554
|
unit: BorderWidthUnit,
|
|
640
|
-
measure:
|
|
555
|
+
measure: z28.number()
|
|
641
556
|
});
|
|
642
557
|
var BorderWidthTokenData = tokenAliasOrValue(BorderWidthValue);
|
|
643
558
|
|
|
644
559
|
// src/dsm/elements/data/border.ts
|
|
645
|
-
import { z as
|
|
560
|
+
import { z as z31 } from "zod";
|
|
646
561
|
|
|
647
562
|
// src/dsm/elements/data/color.ts
|
|
648
|
-
import { z as
|
|
563
|
+
import { z as z30 } from "zod";
|
|
649
564
|
|
|
650
565
|
// src/dsm/elements/data/opacity.ts
|
|
651
|
-
import { z as
|
|
652
|
-
var OpacityValue =
|
|
653
|
-
unit:
|
|
654
|
-
measure:
|
|
566
|
+
import { z as z29 } from "zod";
|
|
567
|
+
var OpacityValue = z29.object({
|
|
568
|
+
unit: z29.enum(["Raw", "Pixels"]),
|
|
569
|
+
measure: z29.number()
|
|
655
570
|
});
|
|
656
571
|
var OpacityTokenData = tokenAliasOrValue(OpacityValue);
|
|
657
572
|
|
|
658
573
|
// src/dsm/elements/data/color.ts
|
|
659
|
-
var ColorValue =
|
|
574
|
+
var ColorValue = z30.object({
|
|
660
575
|
opacity: OpacityTokenData,
|
|
661
|
-
color:
|
|
576
|
+
color: z30.string().or(TokenDataAliasSchema)
|
|
662
577
|
});
|
|
663
578
|
var ColorTokenData = tokenAliasOrValue(ColorValue);
|
|
664
579
|
|
|
665
580
|
// src/dsm/elements/data/border.ts
|
|
666
|
-
var BorderPosition =
|
|
667
|
-
var BorderStyle =
|
|
668
|
-
var BorderValue =
|
|
581
|
+
var BorderPosition = z31.enum(["Inside", "Center", "Outside"]);
|
|
582
|
+
var BorderStyle = z31.enum(["Dashed", "Dotted", "Solid", "Groove"]);
|
|
583
|
+
var BorderValue = z31.object({
|
|
669
584
|
color: ColorTokenData,
|
|
670
585
|
width: BorderWidthTokenData,
|
|
671
586
|
position: BorderPosition,
|
|
@@ -674,30 +589,30 @@ var BorderValue = z33.object({
|
|
|
674
589
|
var BorderTokenData = tokenAliasOrValue(BorderValue);
|
|
675
590
|
|
|
676
591
|
// src/dsm/elements/data/component.ts
|
|
677
|
-
import { z as
|
|
678
|
-
var ComponentElementData =
|
|
679
|
-
value:
|
|
680
|
-
thumbnailImage:
|
|
681
|
-
value:
|
|
682
|
-
url:
|
|
683
|
-
assetId:
|
|
592
|
+
import { z as z32 } from "zod";
|
|
593
|
+
var ComponentElementData = z32.object({
|
|
594
|
+
value: z32.object({
|
|
595
|
+
thumbnailImage: z32.object({
|
|
596
|
+
value: z32.object({
|
|
597
|
+
url: z32.string(),
|
|
598
|
+
assetId: z32.string()
|
|
684
599
|
})
|
|
685
600
|
}),
|
|
686
|
-
svg:
|
|
687
|
-
value:
|
|
688
|
-
url:
|
|
689
|
-
assetId:
|
|
601
|
+
svg: z32.object({
|
|
602
|
+
value: z32.object({
|
|
603
|
+
url: z32.string(),
|
|
604
|
+
assetId: z32.string()
|
|
690
605
|
})
|
|
691
606
|
}).optional()
|
|
692
607
|
})
|
|
693
608
|
});
|
|
694
609
|
|
|
695
610
|
// src/dsm/elements/data/documentation-block-v1.ts
|
|
696
|
-
import { z as
|
|
611
|
+
import { z as z38 } from "zod";
|
|
697
612
|
|
|
698
613
|
// src/dsm/elements/raw-element.ts
|
|
699
|
-
import { z as
|
|
700
|
-
var DesignTokenType =
|
|
614
|
+
import { z as z33 } from "zod";
|
|
615
|
+
var DesignTokenType = z33.enum([
|
|
701
616
|
"Color",
|
|
702
617
|
"Border",
|
|
703
618
|
"Gradient",
|
|
@@ -729,7 +644,7 @@ var DesignTokenType = z35.enum([
|
|
|
729
644
|
]);
|
|
730
645
|
var tokenElementTypes = [...DesignTokenType.options.filter((v) => v !== "Font")];
|
|
731
646
|
var DesignElementType = DesignTokenType.or(
|
|
732
|
-
|
|
647
|
+
z33.enum([
|
|
733
648
|
"Component",
|
|
734
649
|
"Theme",
|
|
735
650
|
"Documentation",
|
|
@@ -744,7 +659,7 @@ var DesignElementType = DesignTokenType.or(
|
|
|
744
659
|
function isTokenType(type) {
|
|
745
660
|
return DesignTokenType.safeParse(type).success;
|
|
746
661
|
}
|
|
747
|
-
var DesignElementCategory =
|
|
662
|
+
var DesignElementCategory = z33.enum([
|
|
748
663
|
"Token",
|
|
749
664
|
"Component",
|
|
750
665
|
"DesignSystemComponent",
|
|
@@ -752,94 +667,94 @@ var DesignElementCategory = z35.enum([
|
|
|
752
667
|
"Theme",
|
|
753
668
|
"PageBlock"
|
|
754
669
|
]);
|
|
755
|
-
var DesignSystemElementExportProps =
|
|
756
|
-
isAsset:
|
|
757
|
-
codeName:
|
|
758
|
-
});
|
|
759
|
-
var ShallowDesignElement =
|
|
760
|
-
id:
|
|
761
|
-
persistentId:
|
|
762
|
-
designSystemVersionId:
|
|
670
|
+
var DesignSystemElementExportProps = z33.object({
|
|
671
|
+
isAsset: z33.boolean().nullish().transform((v) => v ?? false),
|
|
672
|
+
codeName: z33.string().nullish()
|
|
673
|
+
});
|
|
674
|
+
var ShallowDesignElement = z33.object({
|
|
675
|
+
id: z33.string(),
|
|
676
|
+
persistentId: z33.string(),
|
|
677
|
+
designSystemVersionId: z33.string(),
|
|
763
678
|
type: DesignElementType,
|
|
764
|
-
brandPersistentId:
|
|
765
|
-
parentPersistentId:
|
|
766
|
-
shortPersistentId:
|
|
679
|
+
brandPersistentId: z33.string().optional(),
|
|
680
|
+
parentPersistentId: z33.string().optional(),
|
|
681
|
+
shortPersistentId: z33.string().optional(),
|
|
767
682
|
childType: DesignElementType.optional(),
|
|
768
|
-
sortOrder:
|
|
769
|
-
origin:
|
|
683
|
+
sortOrder: z33.number(),
|
|
684
|
+
origin: z33.record(z33.any()).optional()
|
|
770
685
|
});
|
|
771
686
|
var DesignElement = ShallowDesignElement.extend({
|
|
772
687
|
meta: ObjectMeta,
|
|
773
|
-
slug:
|
|
774
|
-
userSlug:
|
|
775
|
-
createdAt:
|
|
776
|
-
updatedAt:
|
|
688
|
+
slug: z33.string().optional(),
|
|
689
|
+
userSlug: z33.string().optional(),
|
|
690
|
+
createdAt: z33.coerce.date(),
|
|
691
|
+
updatedAt: z33.coerce.date(),
|
|
777
692
|
exportProperties: DesignSystemElementExportProps.optional(),
|
|
778
|
-
data:
|
|
779
|
-
origin:
|
|
693
|
+
data: z33.record(z33.any()),
|
|
694
|
+
origin: z33.record(z33.any()).optional()
|
|
780
695
|
});
|
|
781
696
|
var HierarchicalElements = DesignTokenType.or(
|
|
782
|
-
|
|
697
|
+
z33.enum(["Component", "DesignSystemComponent", "DocumentationPage"])
|
|
783
698
|
);
|
|
784
699
|
|
|
785
700
|
// src/dsm/properties/property-definition.ts
|
|
786
|
-
import { z as
|
|
787
|
-
var ElementPropertyTypeSchema =
|
|
788
|
-
var ElementPropertyTargetType =
|
|
789
|
-
var ElementPropertyLinkType =
|
|
701
|
+
import { z as z34 } from "zod";
|
|
702
|
+
var ElementPropertyTypeSchema = z34.enum(["Text", "Number", "Boolean", "Select", "Generic", "Link", "URL"]);
|
|
703
|
+
var ElementPropertyTargetType = z34.enum(["Token", "Component", "DocumentationPage"]);
|
|
704
|
+
var ElementPropertyLinkType = z34.enum(["FigmaComponent", "DocumentationPage"]);
|
|
790
705
|
var CODE_NAME_REGEX = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
791
|
-
var ColorTokenInlineData =
|
|
792
|
-
value:
|
|
706
|
+
var ColorTokenInlineData = z34.object({
|
|
707
|
+
value: z34.string()
|
|
793
708
|
});
|
|
794
|
-
var ElementPropertyDefinitionOption =
|
|
795
|
-
id:
|
|
796
|
-
name:
|
|
709
|
+
var ElementPropertyDefinitionOption = z34.object({
|
|
710
|
+
id: z34.string(),
|
|
711
|
+
name: z34.string(),
|
|
797
712
|
backgroundColor: ColorTokenInlineData.optional()
|
|
798
713
|
});
|
|
799
|
-
var ElementPropertyDefinition =
|
|
800
|
-
id:
|
|
801
|
-
designSystemVersionId:
|
|
802
|
-
persistentId:
|
|
803
|
-
name:
|
|
804
|
-
codeName:
|
|
805
|
-
description:
|
|
714
|
+
var ElementPropertyDefinition = z34.object({
|
|
715
|
+
id: z34.string(),
|
|
716
|
+
designSystemVersionId: z34.string(),
|
|
717
|
+
persistentId: z34.string(),
|
|
718
|
+
name: z34.string(),
|
|
719
|
+
codeName: z34.string().regex(CODE_NAME_REGEX),
|
|
720
|
+
description: z34.string(),
|
|
806
721
|
type: ElementPropertyTypeSchema,
|
|
807
722
|
targetElementType: ElementPropertyTargetType,
|
|
808
|
-
options:
|
|
723
|
+
options: z34.array(ElementPropertyDefinitionOption).optional(),
|
|
809
724
|
linkElementType: ElementPropertyLinkType.optional()
|
|
810
725
|
});
|
|
811
726
|
var ElementPropertyType = ElementPropertyTypeSchema.enum;
|
|
812
727
|
|
|
813
728
|
// src/dsm/properties/property-value.ts
|
|
814
|
-
import { z as
|
|
815
|
-
var ElementPropertyValue =
|
|
816
|
-
id:
|
|
817
|
-
designSystemVersionId:
|
|
818
|
-
targetElementPersistentId:
|
|
819
|
-
definitionPersistentId:
|
|
820
|
-
stringValue:
|
|
821
|
-
numberValue:
|
|
822
|
-
booleanValue:
|
|
823
|
-
referenceValue:
|
|
824
|
-
referenceValuePreview:
|
|
729
|
+
import { z as z35 } from "zod";
|
|
730
|
+
var ElementPropertyValue = z35.object({
|
|
731
|
+
id: z35.string(),
|
|
732
|
+
designSystemVersionId: z35.string(),
|
|
733
|
+
targetElementPersistentId: z35.string(),
|
|
734
|
+
definitionPersistentId: z35.string(),
|
|
735
|
+
stringValue: z35.string().nullish(),
|
|
736
|
+
numberValue: z35.number().nullish(),
|
|
737
|
+
booleanValue: z35.boolean().nullish(),
|
|
738
|
+
referenceValue: z35.string().nullish(),
|
|
739
|
+
referenceValuePreview: z35.string().optional()
|
|
825
740
|
});
|
|
826
741
|
|
|
827
742
|
// src/dsm/elements/primitives/point.ts
|
|
828
|
-
import { z as
|
|
829
|
-
var Point2D =
|
|
830
|
-
x:
|
|
831
|
-
y:
|
|
743
|
+
import { z as z36 } from "zod";
|
|
744
|
+
var Point2D = z36.object({
|
|
745
|
+
x: z36.number(),
|
|
746
|
+
y: z36.number()
|
|
832
747
|
});
|
|
833
748
|
|
|
834
749
|
// src/dsm/elements/primitives/size.ts
|
|
835
|
-
import { z as
|
|
750
|
+
import { z as z37 } from "zod";
|
|
836
751
|
var nullSize = { height: -1, width: -1 };
|
|
837
752
|
function isNullSize(size) {
|
|
838
753
|
return size.height === nullSize.height && size.width === nullSize.width;
|
|
839
754
|
}
|
|
840
|
-
var Size =
|
|
841
|
-
width:
|
|
842
|
-
height:
|
|
755
|
+
var Size = z37.object({
|
|
756
|
+
width: z37.number().nullish().transform((v) => v ?? nullSize.width),
|
|
757
|
+
height: z37.number().nullish().transform((v) => v ?? nullSize.height)
|
|
843
758
|
});
|
|
844
759
|
var SizeOrUndefined = Size.optional().transform((v) => {
|
|
845
760
|
if (!v)
|
|
@@ -850,8 +765,8 @@ var SizeOrUndefined = Size.optional().transform((v) => {
|
|
|
850
765
|
});
|
|
851
766
|
|
|
852
767
|
// src/dsm/elements/data/documentation-block-v1.ts
|
|
853
|
-
var PageBlockCalloutType =
|
|
854
|
-
var PageBlockTypeV1 =
|
|
768
|
+
var PageBlockCalloutType = z38.enum(["Info", "Primary", "Success", "Warning", "Error"]);
|
|
769
|
+
var PageBlockTypeV1 = z38.enum([
|
|
855
770
|
"Text",
|
|
856
771
|
"Heading",
|
|
857
772
|
"Code",
|
|
@@ -884,7 +799,7 @@ var PageBlockTypeV1 = z40.enum([
|
|
|
884
799
|
"TableRow",
|
|
885
800
|
"TableCell"
|
|
886
801
|
]);
|
|
887
|
-
var PageBlockCodeLanguage =
|
|
802
|
+
var PageBlockCodeLanguage = z38.enum([
|
|
888
803
|
"Angular",
|
|
889
804
|
"Bash",
|
|
890
805
|
"C",
|
|
@@ -918,70 +833,70 @@ var PageBlockCodeLanguage = z40.enum([
|
|
|
918
833
|
"XML",
|
|
919
834
|
"YAML"
|
|
920
835
|
]);
|
|
921
|
-
var PageBlockAlignment =
|
|
922
|
-
var PageBlockThemeType =
|
|
923
|
-
var PageBlockAssetType =
|
|
924
|
-
var PageBlockTilesAlignment =
|
|
925
|
-
var PageBlockTilesLayout =
|
|
926
|
-
var PageBlockTheme =
|
|
927
|
-
themeIds:
|
|
836
|
+
var PageBlockAlignment = z38.enum(["Left", "Center", "Stretch", "Right"]);
|
|
837
|
+
var PageBlockThemeType = z38.enum(["Override", "Comparison"]);
|
|
838
|
+
var PageBlockAssetType = z38.enum(["image", "figmaFrame"]);
|
|
839
|
+
var PageBlockTilesAlignment = z38.enum(["Center", "FrameHeight"]);
|
|
840
|
+
var PageBlockTilesLayout = z38.enum(["C8", "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C1_75"]);
|
|
841
|
+
var PageBlockTheme = z38.object({
|
|
842
|
+
themeIds: z38.array(z38.string()),
|
|
928
843
|
type: PageBlockThemeType
|
|
929
844
|
});
|
|
930
|
-
var PageBlockUrlPreview =
|
|
931
|
-
title: nullishToOptional(
|
|
932
|
-
description: nullishToOptional(
|
|
933
|
-
thumbnailUrl: nullishToOptional(
|
|
934
|
-
});
|
|
935
|
-
var PageBlockFrameOrigin =
|
|
936
|
-
sourceFileName: nullishToOptional(
|
|
937
|
-
title: nullishToOptional(
|
|
938
|
-
previewUrl: nullishToOptional(
|
|
939
|
-
valid: nullishToOptional(
|
|
940
|
-
referenceId: nullishToOptional(
|
|
941
|
-
assetId: nullishToOptional(
|
|
942
|
-
assetScale: nullishToOptional(
|
|
943
|
-
width: nullishToOptional(
|
|
944
|
-
height: nullishToOptional(
|
|
945
|
-
});
|
|
946
|
-
var PageBlockFrame =
|
|
947
|
-
persistentId:
|
|
948
|
-
sourceId:
|
|
949
|
-
sourceFrameId:
|
|
950
|
-
title: nullishToOptional(
|
|
951
|
-
description: nullishToOptional(
|
|
845
|
+
var PageBlockUrlPreview = z38.object({
|
|
846
|
+
title: nullishToOptional(z38.string()),
|
|
847
|
+
description: nullishToOptional(z38.string()),
|
|
848
|
+
thumbnailUrl: nullishToOptional(z38.string())
|
|
849
|
+
});
|
|
850
|
+
var PageBlockFrameOrigin = z38.object({
|
|
851
|
+
sourceFileName: nullishToOptional(z38.string()),
|
|
852
|
+
title: nullishToOptional(z38.string()),
|
|
853
|
+
previewUrl: nullishToOptional(z38.string()),
|
|
854
|
+
valid: nullishToOptional(z38.boolean()),
|
|
855
|
+
referenceId: nullishToOptional(z38.string()),
|
|
856
|
+
assetId: nullishToOptional(z38.string()),
|
|
857
|
+
assetScale: nullishToOptional(z38.number()),
|
|
858
|
+
width: nullishToOptional(z38.number()),
|
|
859
|
+
height: nullishToOptional(z38.number())
|
|
860
|
+
});
|
|
861
|
+
var PageBlockFrame = z38.object({
|
|
862
|
+
persistentId: z38.string(),
|
|
863
|
+
sourceId: z38.string(),
|
|
864
|
+
sourceFrameId: z38.string(),
|
|
865
|
+
title: nullishToOptional(z38.string()),
|
|
866
|
+
description: nullishToOptional(z38.string()),
|
|
952
867
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
953
868
|
origin: nullishToOptional(PageBlockFrameOrigin)
|
|
954
869
|
});
|
|
955
|
-
var PageBlockAsset =
|
|
870
|
+
var PageBlockAsset = z38.object({
|
|
956
871
|
type: PageBlockAssetType,
|
|
957
|
-
id: nullishToOptional(
|
|
958
|
-
url: nullishToOptional(
|
|
872
|
+
id: nullishToOptional(z38.string()),
|
|
873
|
+
url: nullishToOptional(z38.string()),
|
|
959
874
|
figmaFrame: nullishToOptional(PageBlockFrame)
|
|
960
875
|
});
|
|
961
|
-
var PageBlockLinkPreview =
|
|
962
|
-
title: nullishToOptional(
|
|
963
|
-
valid: nullishToOptional(
|
|
876
|
+
var PageBlockLinkPreview = z38.object({
|
|
877
|
+
title: nullishToOptional(z38.string()),
|
|
878
|
+
valid: nullishToOptional(z38.boolean())
|
|
964
879
|
});
|
|
965
|
-
var PageBlockShortcut =
|
|
966
|
-
persistentId:
|
|
967
|
-
title: nullishToOptional(
|
|
968
|
-
description: nullishToOptional(
|
|
880
|
+
var PageBlockShortcut = z38.object({
|
|
881
|
+
persistentId: z38.string(),
|
|
882
|
+
title: nullishToOptional(z38.string()),
|
|
883
|
+
description: nullishToOptional(z38.string()),
|
|
969
884
|
asset: nullishToOptional(PageBlockAsset),
|
|
970
|
-
documentationItemId: nullishToOptional(
|
|
971
|
-
pageHeadingId: nullishToOptional(
|
|
972
|
-
url: nullishToOptional(
|
|
973
|
-
openInNewTab: nullishToOptional(
|
|
885
|
+
documentationItemId: nullishToOptional(z38.string()),
|
|
886
|
+
pageHeadingId: nullishToOptional(z38.string()),
|
|
887
|
+
url: nullishToOptional(z38.string()),
|
|
888
|
+
openInNewTab: nullishToOptional(z38.boolean()),
|
|
974
889
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
975
890
|
documentationItemPreview: nullishToOptional(PageBlockLinkPreview)
|
|
976
891
|
});
|
|
977
|
-
var PageBlockCustomBlockPropertyImageValue =
|
|
892
|
+
var PageBlockCustomBlockPropertyImageValue = z38.object({
|
|
978
893
|
asset: nullishToOptional(PageBlockAsset),
|
|
979
|
-
assetId: nullishToOptional(
|
|
980
|
-
assetUrl: nullishToOptional(
|
|
894
|
+
assetId: nullishToOptional(z38.string()),
|
|
895
|
+
assetUrl: nullishToOptional(z38.string())
|
|
981
896
|
});
|
|
982
|
-
var PageBlockCustomBlockPropertyValue =
|
|
983
|
-
key:
|
|
984
|
-
value:
|
|
897
|
+
var PageBlockCustomBlockPropertyValue = z38.object({
|
|
898
|
+
key: z38.string(),
|
|
899
|
+
value: z38.any()
|
|
985
900
|
// TODO Artem: for some reason there are cases when there's an array here in the DB
|
|
986
901
|
// e.g. element id 67451 in the dev db
|
|
987
902
|
// value: z
|
|
@@ -992,102 +907,102 @@ var PageBlockCustomBlockPropertyValue = z40.object({
|
|
|
992
907
|
// .or(TypographyTokenData)
|
|
993
908
|
// .or(PageBlockCustomBlockPropertyImageValue),
|
|
994
909
|
});
|
|
995
|
-
var PageBlockFigmaFrameProperties =
|
|
910
|
+
var PageBlockFigmaFrameProperties = z38.object({
|
|
996
911
|
color: nullishToOptional(
|
|
997
|
-
|
|
998
|
-
value:
|
|
912
|
+
z38.object({
|
|
913
|
+
value: z38.string()
|
|
999
914
|
})
|
|
1000
915
|
),
|
|
1001
916
|
alignment: PageBlockTilesAlignment,
|
|
1002
917
|
layout: PageBlockTilesLayout,
|
|
1003
918
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
1004
|
-
showTitles:
|
|
919
|
+
showTitles: z38.boolean()
|
|
1005
920
|
});
|
|
1006
|
-
var PageBlockRenderCodeProperties =
|
|
1007
|
-
showCode:
|
|
1008
|
-
showControls:
|
|
921
|
+
var PageBlockRenderCodeProperties = z38.object({
|
|
922
|
+
showCode: z38.boolean(),
|
|
923
|
+
showControls: z38.boolean().optional()
|
|
1009
924
|
});
|
|
1010
|
-
var PageBlockAssetComponent =
|
|
1011
|
-
persistentId:
|
|
1012
|
-
componentAssetId:
|
|
1013
|
-
title: nullishToOptional(
|
|
1014
|
-
description: nullishToOptional(
|
|
925
|
+
var PageBlockAssetComponent = z38.object({
|
|
926
|
+
persistentId: z38.string(),
|
|
927
|
+
componentAssetId: z38.string(),
|
|
928
|
+
title: nullishToOptional(z38.string()),
|
|
929
|
+
description: nullishToOptional(z38.string()),
|
|
1015
930
|
backgroundColor: nullishToOptional(ColorTokenInlineData)
|
|
1016
931
|
});
|
|
1017
|
-
var PageBlockTableColumn =
|
|
1018
|
-
id:
|
|
932
|
+
var PageBlockTableColumn = z38.object({
|
|
933
|
+
id: z38.string(),
|
|
1019
934
|
width: DimensionTokenData
|
|
1020
935
|
});
|
|
1021
|
-
var PageBlockTableProperties =
|
|
1022
|
-
showBorders:
|
|
1023
|
-
showHeaderRow:
|
|
1024
|
-
showHeaderColumn:
|
|
1025
|
-
columns:
|
|
936
|
+
var PageBlockTableProperties = z38.object({
|
|
937
|
+
showBorders: z38.boolean(),
|
|
938
|
+
showHeaderRow: z38.boolean(),
|
|
939
|
+
showHeaderColumn: z38.boolean(),
|
|
940
|
+
columns: z38.array(PageBlockTableColumn)
|
|
1026
941
|
});
|
|
1027
|
-
var PageBlockTextSpanAttributeType =
|
|
1028
|
-
var PageBlockTextSpanAttribute =
|
|
942
|
+
var PageBlockTextSpanAttributeType = z38.enum(["Bold", "Italic", "Link", "Strikethrough", "Code"]);
|
|
943
|
+
var PageBlockTextSpanAttribute = z38.object({
|
|
1029
944
|
type: PageBlockTextSpanAttributeType,
|
|
1030
|
-
link: nullishToOptional(
|
|
1031
|
-
documentationItemId: nullishToOptional(
|
|
1032
|
-
openInNewWindow: nullishToOptional(
|
|
945
|
+
link: nullishToOptional(z38.string()),
|
|
946
|
+
documentationItemId: nullishToOptional(z38.string()),
|
|
947
|
+
openInNewWindow: nullishToOptional(z38.boolean()),
|
|
1033
948
|
// deprecated. use openInNewTab
|
|
1034
|
-
openInNewTab: nullishToOptional(
|
|
949
|
+
openInNewTab: nullishToOptional(z38.boolean())
|
|
1035
950
|
});
|
|
1036
|
-
var PageBlockTextSpan =
|
|
1037
|
-
text:
|
|
1038
|
-
attributes:
|
|
951
|
+
var PageBlockTextSpan = z38.object({
|
|
952
|
+
text: z38.string(),
|
|
953
|
+
attributes: z38.array(PageBlockTextSpanAttribute)
|
|
1039
954
|
});
|
|
1040
|
-
var PageBlockText =
|
|
1041
|
-
spans:
|
|
955
|
+
var PageBlockText = z38.object({
|
|
956
|
+
spans: z38.array(PageBlockTextSpan)
|
|
1042
957
|
});
|
|
1043
|
-
var PageBlockBaseV1 =
|
|
1044
|
-
persistentId:
|
|
958
|
+
var PageBlockBaseV1 = z38.object({
|
|
959
|
+
persistentId: z38.string(),
|
|
1045
960
|
type: PageBlockTypeV1,
|
|
1046
961
|
// Element linking
|
|
1047
|
-
designObjectId: nullishToOptional(
|
|
1048
|
-
designObjectIds: nullishToOptional(
|
|
1049
|
-
tokenType: nullishToOptional(DesignTokenType.or(
|
|
1050
|
-
showNestedGroups: nullishToOptional(
|
|
1051
|
-
brandId: nullishToOptional(
|
|
962
|
+
designObjectId: nullishToOptional(z38.string()),
|
|
963
|
+
designObjectIds: nullishToOptional(z38.array(z38.string())),
|
|
964
|
+
tokenType: nullishToOptional(DesignTokenType.or(z38.literal("Font"))),
|
|
965
|
+
showNestedGroups: nullishToOptional(z38.boolean()),
|
|
966
|
+
brandId: nullishToOptional(z38.string()),
|
|
1052
967
|
// Rich text
|
|
1053
968
|
text: nullishToOptional(PageBlockText),
|
|
1054
|
-
caption: nullishToOptional(
|
|
1055
|
-
headingType: nullishToOptional(
|
|
969
|
+
caption: nullishToOptional(z38.string()),
|
|
970
|
+
headingType: nullishToOptional(z38.number().min(1).max(3)),
|
|
1056
971
|
codeLanguage: nullishToOptional(PageBlockCodeLanguage),
|
|
1057
972
|
calloutType: nullishToOptional(PageBlockCalloutType),
|
|
1058
|
-
urlInput: nullishToOptional(
|
|
1059
|
-
url: nullishToOptional(
|
|
973
|
+
urlInput: nullishToOptional(z38.string()),
|
|
974
|
+
url: nullishToOptional(z38.string()),
|
|
1060
975
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
1061
976
|
// Image
|
|
1062
977
|
asset: nullishToOptional(PageBlockAsset),
|
|
1063
978
|
alignment: nullishToOptional(PageBlockAlignment),
|
|
1064
979
|
// Shortcuts block
|
|
1065
|
-
shortcuts: nullishToOptional(
|
|
980
|
+
shortcuts: nullishToOptional(z38.array(PageBlockShortcut)),
|
|
1066
981
|
// Custom blocks
|
|
1067
|
-
customBlockKey: nullishToOptional(
|
|
1068
|
-
customBlockProperties: nullishToOptional(
|
|
1069
|
-
variantKey: nullishToOptional(
|
|
982
|
+
customBlockKey: nullishToOptional(z38.string()),
|
|
983
|
+
customBlockProperties: nullishToOptional(z38.array(PageBlockCustomBlockPropertyValue)),
|
|
984
|
+
variantKey: nullishToOptional(z38.string()),
|
|
1070
985
|
// Figma frames
|
|
1071
986
|
figmaFrameProperties: nullishToOptional(PageBlockFigmaFrameProperties),
|
|
1072
|
-
figmaFrames: nullishToOptional(
|
|
987
|
+
figmaFrames: nullishToOptional(z38.array(PageBlockFrame)),
|
|
1073
988
|
// Generic
|
|
1074
989
|
size: nullishToOptional(Size),
|
|
1075
990
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
1076
991
|
// Render code
|
|
1077
992
|
renderCodeProperties: nullishToOptional(PageBlockRenderCodeProperties),
|
|
1078
993
|
// Component assets
|
|
1079
|
-
componentAssets: nullishToOptional(
|
|
994
|
+
componentAssets: nullishToOptional(z38.array(PageBlockAssetComponent)),
|
|
1080
995
|
// Tables
|
|
1081
996
|
tableProperties: nullishToOptional(PageBlockTableProperties),
|
|
1082
|
-
columnId: nullishToOptional(
|
|
997
|
+
columnId: nullishToOptional(z38.string()),
|
|
1083
998
|
// Token spreadsheet
|
|
1084
999
|
theme: nullishToOptional(PageBlockTheme),
|
|
1085
|
-
blacklistedElementProperties: nullishToOptional(
|
|
1000
|
+
blacklistedElementProperties: nullishToOptional(z38.array(z38.string())),
|
|
1086
1001
|
// Arbitrary
|
|
1087
|
-
userMetadata: nullishToOptional(
|
|
1002
|
+
userMetadata: nullishToOptional(z38.string())
|
|
1088
1003
|
});
|
|
1089
1004
|
var PageBlockV1 = PageBlockBaseV1.extend({
|
|
1090
|
-
children:
|
|
1005
|
+
children: z38.lazy(
|
|
1091
1006
|
() => PageBlockV1.array().nullish().transform((t) => t ?? [])
|
|
1092
1007
|
)
|
|
1093
1008
|
});
|
|
@@ -1099,276 +1014,276 @@ function traversePageBlocksV1(blocks, action) {
|
|
|
1099
1014
|
}
|
|
1100
1015
|
|
|
1101
1016
|
// src/dsm/elements/data/documentation-block-v2.ts
|
|
1102
|
-
import { z as
|
|
1103
|
-
var PageBlockLinkType =
|
|
1104
|
-
var PageBlockImageType =
|
|
1105
|
-
var PageBlockImageAlignment =
|
|
1106
|
-
var PageBlockTableCellAlignment =
|
|
1107
|
-
var PageBlockPreviewContainerSize =
|
|
1108
|
-
var PageBlockThemeDisplayMode =
|
|
1109
|
-
var PageBlockImageResourceReference =
|
|
1110
|
-
resourceId:
|
|
1111
|
-
url:
|
|
1112
|
-
});
|
|
1113
|
-
var PageBlockResourceFrameNodeReference =
|
|
1114
|
-
sourceId:
|
|
1115
|
-
frameReferenceId:
|
|
1116
|
-
});
|
|
1117
|
-
var PageBlockImageReference =
|
|
1017
|
+
import { z as z39 } from "zod";
|
|
1018
|
+
var PageBlockLinkType = z39.enum(["DocumentationItem", "PageHeading", "Url"]);
|
|
1019
|
+
var PageBlockImageType = z39.enum(["Resource", "FigmaNode"]);
|
|
1020
|
+
var PageBlockImageAlignment = z39.enum(["Left", "Center", "Stretch"]);
|
|
1021
|
+
var PageBlockTableCellAlignment = z39.enum(["Left", "Center", "Right"]);
|
|
1022
|
+
var PageBlockPreviewContainerSize = z39.enum(["Centered", "NaturalHeight"]);
|
|
1023
|
+
var PageBlockThemeDisplayMode = z39.enum(["Split", "Override"]);
|
|
1024
|
+
var PageBlockImageResourceReference = z39.object({
|
|
1025
|
+
resourceId: z39.string(),
|
|
1026
|
+
url: z39.string()
|
|
1027
|
+
});
|
|
1028
|
+
var PageBlockResourceFrameNodeReference = z39.object({
|
|
1029
|
+
sourceId: z39.string(),
|
|
1030
|
+
frameReferenceId: z39.string()
|
|
1031
|
+
});
|
|
1032
|
+
var PageBlockImageReference = z39.object({
|
|
1118
1033
|
type: PageBlockImageType,
|
|
1119
1034
|
resource: PageBlockImageResourceReference.optional(),
|
|
1120
1035
|
figmaNode: PageBlockResourceFrameNodeReference.optional()
|
|
1121
1036
|
});
|
|
1122
|
-
var PageBlockColorV2 =
|
|
1123
|
-
value:
|
|
1124
|
-
referencedTokenId:
|
|
1037
|
+
var PageBlockColorV2 = z39.object({
|
|
1038
|
+
value: z39.string(),
|
|
1039
|
+
referencedTokenId: z39.string().optional()
|
|
1125
1040
|
});
|
|
1126
|
-
var PageBlockAssetEntityMeta =
|
|
1127
|
-
title:
|
|
1128
|
-
description:
|
|
1041
|
+
var PageBlockAssetEntityMeta = z39.object({
|
|
1042
|
+
title: z39.string().optional(),
|
|
1043
|
+
description: z39.string().optional(),
|
|
1129
1044
|
backgroundColor: PageBlockColorV2.optional()
|
|
1130
1045
|
});
|
|
1131
|
-
var PageBlockFigmaComponentEntityMeta =
|
|
1132
|
-
title:
|
|
1133
|
-
description:
|
|
1046
|
+
var PageBlockFigmaComponentEntityMeta = z39.object({
|
|
1047
|
+
title: z39.string().optional(),
|
|
1048
|
+
description: z39.string().optional(),
|
|
1134
1049
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1135
|
-
selectedComponentProperties:
|
|
1050
|
+
selectedComponentProperties: z39.array(z39.string()).optional()
|
|
1136
1051
|
});
|
|
1137
|
-
var PageBlockFigmaNodeEntityMeta =
|
|
1138
|
-
title:
|
|
1139
|
-
description:
|
|
1052
|
+
var PageBlockFigmaNodeEntityMeta = z39.object({
|
|
1053
|
+
title: z39.string().optional(),
|
|
1054
|
+
description: z39.string().optional(),
|
|
1140
1055
|
backgroundColor: PageBlockColorV2.optional()
|
|
1141
1056
|
});
|
|
1142
|
-
var PageBlockAppearanceV2 =
|
|
1057
|
+
var PageBlockAppearanceV2 = z39.object({
|
|
1143
1058
|
itemBackgroundColor: PageBlockColorV2.optional(),
|
|
1144
|
-
numberOfColumns:
|
|
1059
|
+
numberOfColumns: z39.number().optional()
|
|
1145
1060
|
});
|
|
1146
|
-
var PageBlockItemUntypedValue =
|
|
1147
|
-
value:
|
|
1148
|
-
}).and(
|
|
1149
|
-
var PageBlockLinkV2 =
|
|
1061
|
+
var PageBlockItemUntypedValue = z39.object({
|
|
1062
|
+
value: z39.any()
|
|
1063
|
+
}).and(z39.record(z39.any()));
|
|
1064
|
+
var PageBlockLinkV2 = z39.object({
|
|
1150
1065
|
type: PageBlockLinkType,
|
|
1151
|
-
documentationItemId:
|
|
1152
|
-
pageHeadingId:
|
|
1153
|
-
url:
|
|
1154
|
-
openInNewTab:
|
|
1066
|
+
documentationItemId: z39.string().optional(),
|
|
1067
|
+
pageHeadingId: z39.string().optional(),
|
|
1068
|
+
url: z39.string().optional(),
|
|
1069
|
+
openInNewTab: z39.boolean().optional()
|
|
1155
1070
|
});
|
|
1156
|
-
var PageBlockItemV2 =
|
|
1157
|
-
id:
|
|
1071
|
+
var PageBlockItemV2 = z39.object({
|
|
1072
|
+
id: z39.string(),
|
|
1158
1073
|
linksTo: PageBlockLinkV2.optional(),
|
|
1159
|
-
props:
|
|
1074
|
+
props: z39.record(PageBlockItemUntypedValue)
|
|
1160
1075
|
});
|
|
1161
|
-
var PageBlockDataV2 =
|
|
1162
|
-
packageId:
|
|
1163
|
-
variantId:
|
|
1164
|
-
indentLevel:
|
|
1076
|
+
var PageBlockDataV2 = z39.object({
|
|
1077
|
+
packageId: z39.string(),
|
|
1078
|
+
variantId: z39.string().optional(),
|
|
1079
|
+
indentLevel: z39.number(),
|
|
1165
1080
|
appearance: PageBlockAppearanceV2.optional(),
|
|
1166
|
-
items:
|
|
1081
|
+
items: z39.array(PageBlockItemV2)
|
|
1167
1082
|
});
|
|
1168
|
-
var PageBlockItemAssetValue =
|
|
1169
|
-
selectedPropertyIds:
|
|
1170
|
-
showSearch:
|
|
1083
|
+
var PageBlockItemAssetValue = z39.object({
|
|
1084
|
+
selectedPropertyIds: z39.array(z39.string()).optional(),
|
|
1085
|
+
showSearch: z39.boolean().optional(),
|
|
1171
1086
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1172
1087
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1173
|
-
value:
|
|
1174
|
-
|
|
1175
|
-
entityId:
|
|
1176
|
-
entityType:
|
|
1088
|
+
value: z39.array(
|
|
1089
|
+
z39.object({
|
|
1090
|
+
entityId: z39.string(),
|
|
1091
|
+
entityType: z39.enum(["Asset", "AssetGroup"]),
|
|
1177
1092
|
entityMeta: PageBlockAssetEntityMeta.optional()
|
|
1178
1093
|
})
|
|
1179
1094
|
).default([])
|
|
1180
1095
|
});
|
|
1181
|
-
var PageBlockItemAssetPropertyValue =
|
|
1182
|
-
value:
|
|
1096
|
+
var PageBlockItemAssetPropertyValue = z39.object({
|
|
1097
|
+
value: z39.array(z39.string()).default([])
|
|
1183
1098
|
});
|
|
1184
|
-
var PageBlockItemFigmaComponentValue =
|
|
1185
|
-
showComponentName:
|
|
1186
|
-
showComponentDescription:
|
|
1187
|
-
showPropertyList:
|
|
1099
|
+
var PageBlockItemFigmaComponentValue = z39.object({
|
|
1100
|
+
showComponentName: z39.boolean().optional(),
|
|
1101
|
+
showComponentDescription: z39.boolean().optional(),
|
|
1102
|
+
showPropertyList: z39.boolean().optional(),
|
|
1188
1103
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1189
1104
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1190
|
-
value:
|
|
1191
|
-
|
|
1192
|
-
entityId:
|
|
1193
|
-
entityType:
|
|
1105
|
+
value: z39.array(
|
|
1106
|
+
z39.object({
|
|
1107
|
+
entityId: z39.string(),
|
|
1108
|
+
entityType: z39.enum(["FigmaComponent"]),
|
|
1194
1109
|
entityMeta: PageBlockFigmaComponentEntityMeta.optional()
|
|
1195
1110
|
})
|
|
1196
1111
|
).default([])
|
|
1197
1112
|
});
|
|
1198
|
-
var PageBlockItemBooleanValue =
|
|
1199
|
-
value:
|
|
1113
|
+
var PageBlockItemBooleanValue = z39.object({
|
|
1114
|
+
value: z39.boolean()
|
|
1200
1115
|
});
|
|
1201
|
-
var PageBlockItemCodeValue =
|
|
1116
|
+
var PageBlockItemCodeValue = z39.object({
|
|
1202
1117
|
format: PageBlockCodeLanguage.optional(),
|
|
1203
|
-
caption:
|
|
1204
|
-
value:
|
|
1205
|
-
});
|
|
1206
|
-
var PageBlockItemSandboxValue =
|
|
1207
|
-
showCode:
|
|
1208
|
-
showControls:
|
|
1209
|
-
backgroundColor:
|
|
1210
|
-
alignPreview:
|
|
1211
|
-
previewHeight:
|
|
1212
|
-
value:
|
|
1213
|
-
});
|
|
1214
|
-
var PageBlockItemColorValue =
|
|
1215
|
-
var PageBlockItemComponentValue =
|
|
1216
|
-
selectedPropertyIds:
|
|
1217
|
-
value:
|
|
1218
|
-
|
|
1219
|
-
entityId:
|
|
1220
|
-
entityType:
|
|
1118
|
+
caption: z39.string().optional(),
|
|
1119
|
+
value: z39.string()
|
|
1120
|
+
});
|
|
1121
|
+
var PageBlockItemSandboxValue = z39.object({
|
|
1122
|
+
showCode: z39.boolean().optional(),
|
|
1123
|
+
showControls: z39.boolean().optional(),
|
|
1124
|
+
backgroundColor: z39.string().optional(),
|
|
1125
|
+
alignPreview: z39.enum(["Left", "Center"]).optional(),
|
|
1126
|
+
previewHeight: z39.number().optional(),
|
|
1127
|
+
value: z39.string()
|
|
1128
|
+
});
|
|
1129
|
+
var PageBlockItemColorValue = z39.record(z39.any());
|
|
1130
|
+
var PageBlockItemComponentValue = z39.object({
|
|
1131
|
+
selectedPropertyIds: z39.array(z39.string()).optional(),
|
|
1132
|
+
value: z39.array(
|
|
1133
|
+
z39.object({
|
|
1134
|
+
entityId: z39.string(),
|
|
1135
|
+
entityType: z39.enum(["Component", "ComponentGroup"])
|
|
1221
1136
|
})
|
|
1222
1137
|
).default([])
|
|
1223
1138
|
});
|
|
1224
|
-
var PageBlockItemComponentPropertyValue =
|
|
1225
|
-
value:
|
|
1226
|
-
});
|
|
1227
|
-
var PageBlockItemDividerValue =
|
|
1228
|
-
var PageBlockItemEmbedValue =
|
|
1229
|
-
value:
|
|
1230
|
-
caption:
|
|
1231
|
-
height:
|
|
1232
|
-
openGraph:
|
|
1233
|
-
title:
|
|
1234
|
-
description:
|
|
1235
|
-
imageUrl:
|
|
1139
|
+
var PageBlockItemComponentPropertyValue = z39.object({
|
|
1140
|
+
value: z39.string()
|
|
1141
|
+
});
|
|
1142
|
+
var PageBlockItemDividerValue = z39.object({});
|
|
1143
|
+
var PageBlockItemEmbedValue = z39.object({
|
|
1144
|
+
value: z39.string().optional(),
|
|
1145
|
+
caption: z39.string().optional(),
|
|
1146
|
+
height: z39.number().optional(),
|
|
1147
|
+
openGraph: z39.object({
|
|
1148
|
+
title: z39.string().optional(),
|
|
1149
|
+
description: z39.string().optional(),
|
|
1150
|
+
imageUrl: z39.string().optional()
|
|
1236
1151
|
}).optional()
|
|
1237
1152
|
});
|
|
1238
|
-
var PageBlockItemFigmaNodeValue =
|
|
1239
|
-
showSearch:
|
|
1153
|
+
var PageBlockItemFigmaNodeValue = z39.object({
|
|
1154
|
+
showSearch: z39.boolean().optional(),
|
|
1240
1155
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1241
1156
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1242
|
-
showFrameDetails:
|
|
1243
|
-
value:
|
|
1244
|
-
|
|
1245
|
-
entityId:
|
|
1157
|
+
showFrameDetails: z39.boolean().optional(),
|
|
1158
|
+
value: z39.array(
|
|
1159
|
+
z39.object({
|
|
1160
|
+
entityId: z39.string(),
|
|
1246
1161
|
entityMeta: PageBlockFigmaNodeEntityMeta.optional()
|
|
1247
1162
|
})
|
|
1248
1163
|
).default([])
|
|
1249
1164
|
});
|
|
1250
|
-
var PageBlockItemImageValue =
|
|
1251
|
-
alt:
|
|
1252
|
-
caption:
|
|
1165
|
+
var PageBlockItemImageValue = z39.object({
|
|
1166
|
+
alt: z39.string().optional(),
|
|
1167
|
+
caption: z39.string().optional(),
|
|
1253
1168
|
alignment: PageBlockImageAlignment.optional(),
|
|
1254
1169
|
value: PageBlockImageReference.optional()
|
|
1255
1170
|
});
|
|
1256
|
-
var PageBlockItemMarkdownValue =
|
|
1257
|
-
value:
|
|
1171
|
+
var PageBlockItemMarkdownValue = z39.object({
|
|
1172
|
+
value: z39.string()
|
|
1258
1173
|
});
|
|
1259
|
-
var PageBlockItemMultiRichTextValue =
|
|
1174
|
+
var PageBlockItemMultiRichTextValue = z39.object({
|
|
1260
1175
|
value: PageBlockText.array()
|
|
1261
1176
|
});
|
|
1262
|
-
var PageBlockItemMultiSelectValue =
|
|
1263
|
-
value:
|
|
1177
|
+
var PageBlockItemMultiSelectValue = z39.object({
|
|
1178
|
+
value: z39.array(z39.string()).default([])
|
|
1264
1179
|
});
|
|
1265
|
-
var PageBlockItemNumberValue =
|
|
1266
|
-
value:
|
|
1180
|
+
var PageBlockItemNumberValue = z39.object({
|
|
1181
|
+
value: z39.number()
|
|
1267
1182
|
});
|
|
1268
|
-
var PageBlockItemRichTextValue =
|
|
1183
|
+
var PageBlockItemRichTextValue = z39.object({
|
|
1269
1184
|
value: PageBlockText,
|
|
1270
1185
|
calloutType: PageBlockCalloutType.optional()
|
|
1271
1186
|
});
|
|
1272
|
-
var PageBlockItemSingleSelectValue =
|
|
1273
|
-
value:
|
|
1187
|
+
var PageBlockItemSingleSelectValue = z39.object({
|
|
1188
|
+
value: z39.string()
|
|
1274
1189
|
});
|
|
1275
|
-
var PageBlockItemStorybookValue =
|
|
1276
|
-
caption:
|
|
1277
|
-
height:
|
|
1278
|
-
embedUrl:
|
|
1279
|
-
value:
|
|
1190
|
+
var PageBlockItemStorybookValue = z39.object({
|
|
1191
|
+
caption: z39.string().optional(),
|
|
1192
|
+
height: z39.number().optional(),
|
|
1193
|
+
embedUrl: z39.string().optional(),
|
|
1194
|
+
value: z39.string().optional()
|
|
1280
1195
|
});
|
|
1281
|
-
var PageBlockItemTextValue =
|
|
1282
|
-
value:
|
|
1196
|
+
var PageBlockItemTextValue = z39.object({
|
|
1197
|
+
value: z39.string()
|
|
1283
1198
|
});
|
|
1284
|
-
var PageBlockItemTokenValue =
|
|
1285
|
-
selectedPropertyIds:
|
|
1286
|
-
selectedThemeIds:
|
|
1199
|
+
var PageBlockItemTokenValue = z39.object({
|
|
1200
|
+
selectedPropertyIds: z39.array(z39.string()).optional(),
|
|
1201
|
+
selectedThemeIds: z39.array(z39.string()).optional(),
|
|
1287
1202
|
themeDisplayMode: PageBlockThemeDisplayMode.optional(),
|
|
1288
|
-
value:
|
|
1289
|
-
|
|
1290
|
-
entityId:
|
|
1291
|
-
entityType:
|
|
1292
|
-
entityMeta:
|
|
1293
|
-
showNestedGroups:
|
|
1203
|
+
value: z39.array(
|
|
1204
|
+
z39.object({
|
|
1205
|
+
entityId: z39.string(),
|
|
1206
|
+
entityType: z39.enum(["Token", "TokenGroup"]),
|
|
1207
|
+
entityMeta: z39.object({
|
|
1208
|
+
showNestedGroups: z39.boolean().optional()
|
|
1294
1209
|
}).optional()
|
|
1295
1210
|
})
|
|
1296
1211
|
).default([])
|
|
1297
1212
|
});
|
|
1298
|
-
var PageBlockItemTokenPropertyValue =
|
|
1299
|
-
selectedPropertyIds:
|
|
1300
|
-
selectedThemeIds:
|
|
1301
|
-
value:
|
|
1213
|
+
var PageBlockItemTokenPropertyValue = z39.object({
|
|
1214
|
+
selectedPropertyIds: z39.array(z39.string()).optional(),
|
|
1215
|
+
selectedThemeIds: z39.array(z39.string()).optional(),
|
|
1216
|
+
value: z39.array(z39.string()).default([])
|
|
1302
1217
|
});
|
|
1303
|
-
var PageBlockItemTokenTypeValue =
|
|
1304
|
-
value:
|
|
1218
|
+
var PageBlockItemTokenTypeValue = z39.object({
|
|
1219
|
+
value: z39.array(DesignTokenType).default([])
|
|
1305
1220
|
});
|
|
1306
|
-
var PageBlockItemUrlValue =
|
|
1307
|
-
value:
|
|
1221
|
+
var PageBlockItemUrlValue = z39.object({
|
|
1222
|
+
value: z39.string()
|
|
1308
1223
|
});
|
|
1309
|
-
var PageBlockItemTableRichTextNode =
|
|
1310
|
-
type:
|
|
1311
|
-
id:
|
|
1224
|
+
var PageBlockItemTableRichTextNode = z39.object({
|
|
1225
|
+
type: z39.literal("RichText"),
|
|
1226
|
+
id: z39.string(),
|
|
1312
1227
|
value: PageBlockItemRichTextValue.shape.value
|
|
1313
1228
|
});
|
|
1314
|
-
var PageBlockItemTableMultiRichTextNode =
|
|
1315
|
-
type:
|
|
1229
|
+
var PageBlockItemTableMultiRichTextNode = z39.object({
|
|
1230
|
+
type: z39.literal("MultiRichText"),
|
|
1316
1231
|
value: PageBlockItemMultiRichTextValue.shape.value
|
|
1317
1232
|
});
|
|
1318
|
-
var PageBlockItemTableImageNode =
|
|
1319
|
-
type:
|
|
1320
|
-
id:
|
|
1233
|
+
var PageBlockItemTableImageNode = z39.object({
|
|
1234
|
+
type: z39.literal("Image"),
|
|
1235
|
+
id: z39.string(),
|
|
1321
1236
|
caption: PageBlockItemImageValue.shape.caption,
|
|
1322
1237
|
value: PageBlockItemImageValue.shape.value
|
|
1323
1238
|
});
|
|
1324
|
-
var PageBlockItemTableNode =
|
|
1239
|
+
var PageBlockItemTableNode = z39.discriminatedUnion("type", [
|
|
1325
1240
|
PageBlockItemTableRichTextNode,
|
|
1326
1241
|
// PageBlockItemTableMultiRichTextNode,
|
|
1327
1242
|
PageBlockItemTableImageNode
|
|
1328
1243
|
]);
|
|
1329
|
-
var PageBlockItemTableCell =
|
|
1330
|
-
id:
|
|
1331
|
-
nodes:
|
|
1332
|
-
columnWidth:
|
|
1244
|
+
var PageBlockItemTableCell = z39.object({
|
|
1245
|
+
id: z39.string(),
|
|
1246
|
+
nodes: z39.array(PageBlockItemTableNode),
|
|
1247
|
+
columnWidth: z39.number().optional(),
|
|
1333
1248
|
alignment: PageBlockTableCellAlignment
|
|
1334
1249
|
});
|
|
1335
|
-
var PageBlockItemTableRow =
|
|
1336
|
-
cells:
|
|
1250
|
+
var PageBlockItemTableRow = z39.object({
|
|
1251
|
+
cells: z39.array(PageBlockItemTableCell)
|
|
1337
1252
|
});
|
|
1338
|
-
var PageBlockItemTableValue =
|
|
1339
|
-
highlightHeaderColumn:
|
|
1340
|
-
highlightHeaderRow:
|
|
1341
|
-
showBorder:
|
|
1342
|
-
value:
|
|
1253
|
+
var PageBlockItemTableValue = z39.object({
|
|
1254
|
+
highlightHeaderColumn: z39.boolean().optional(),
|
|
1255
|
+
highlightHeaderRow: z39.boolean().optional(),
|
|
1256
|
+
showBorder: z39.boolean().optional(),
|
|
1257
|
+
value: z39.array(PageBlockItemTableRow).default([])
|
|
1343
1258
|
});
|
|
1344
1259
|
|
|
1345
1260
|
// src/dsm/elements/data/documentation-page-v1.ts
|
|
1346
|
-
import { z as
|
|
1261
|
+
import { z as z43 } from "zod";
|
|
1347
1262
|
|
|
1348
1263
|
// src/dsm/elements/data/documentation-v1.ts
|
|
1349
|
-
import { z as
|
|
1264
|
+
import { z as z42 } from "zod";
|
|
1350
1265
|
|
|
1351
1266
|
// src/dsm/elements/data/item-header-v1.ts
|
|
1352
|
-
import { z as
|
|
1267
|
+
import { z as z41 } from "zod";
|
|
1353
1268
|
|
|
1354
1269
|
// src/dsm/elements/data/item-header.ts
|
|
1355
|
-
import { z as
|
|
1356
|
-
var DocumentationItemHeaderAlignmentSchema =
|
|
1357
|
-
var DocumentationItemHeaderImageScaleTypeSchema =
|
|
1270
|
+
import { z as z40 } from "zod";
|
|
1271
|
+
var DocumentationItemHeaderAlignmentSchema = z40.enum(["Left", "Center"]);
|
|
1272
|
+
var DocumentationItemHeaderImageScaleTypeSchema = z40.enum(["AspectFill", "AspectFit"]);
|
|
1358
1273
|
var DocumentationItemHeaderAlignment = DocumentationItemHeaderAlignmentSchema.enum;
|
|
1359
1274
|
var DocumentationItemHeaderImageScaleType = DocumentationItemHeaderImageScaleTypeSchema.enum;
|
|
1360
1275
|
|
|
1361
1276
|
// src/dsm/elements/data/item-header-v1.ts
|
|
1362
|
-
var DocumentationItemHeaderV1 =
|
|
1363
|
-
description:
|
|
1277
|
+
var DocumentationItemHeaderV1 = z41.object({
|
|
1278
|
+
description: z41.string(),
|
|
1364
1279
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1365
1280
|
foregroundColor: ColorTokenData.nullish(),
|
|
1366
1281
|
backgroundColor: ColorTokenData.nullish(),
|
|
1367
1282
|
backgroundImageAsset: PageBlockAsset.nullish(),
|
|
1368
1283
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1369
|
-
showBackgroundOverlay:
|
|
1370
|
-
showCoverText:
|
|
1371
|
-
minHeight:
|
|
1284
|
+
showBackgroundOverlay: z41.boolean(),
|
|
1285
|
+
showCoverText: z41.boolean(),
|
|
1286
|
+
minHeight: z41.number().nullish()
|
|
1372
1287
|
});
|
|
1373
1288
|
var defaultDocumentationItemHeaderV1 = {
|
|
1374
1289
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -1379,10 +1294,10 @@ var defaultDocumentationItemHeaderV1 = {
|
|
|
1379
1294
|
};
|
|
1380
1295
|
|
|
1381
1296
|
// src/dsm/elements/data/documentation-v1.ts
|
|
1382
|
-
var DocumentationItemConfigurationV1 =
|
|
1383
|
-
showSidebar:
|
|
1384
|
-
isPrivate:
|
|
1385
|
-
isHidden:
|
|
1297
|
+
var DocumentationItemConfigurationV1 = z42.object({
|
|
1298
|
+
showSidebar: z42.boolean(),
|
|
1299
|
+
isPrivate: z42.boolean().optional(),
|
|
1300
|
+
isHidden: z42.boolean().optional(),
|
|
1386
1301
|
header: DocumentationItemHeaderV1
|
|
1387
1302
|
});
|
|
1388
1303
|
var defaultDocumentationItemConfigurationV1 = {
|
|
@@ -1391,29 +1306,29 @@ var defaultDocumentationItemConfigurationV1 = {
|
|
|
1391
1306
|
};
|
|
1392
1307
|
|
|
1393
1308
|
// src/dsm/elements/data/documentation-page-v1.ts
|
|
1394
|
-
var DocumentationPageDataV1 =
|
|
1395
|
-
blocks:
|
|
1309
|
+
var DocumentationPageDataV1 = z43.object({
|
|
1310
|
+
blocks: z43.array(PageBlockV1),
|
|
1396
1311
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1397
1312
|
});
|
|
1398
1313
|
|
|
1399
1314
|
// src/dsm/elements/data/documentation-page-v2.ts
|
|
1400
|
-
import { z as
|
|
1315
|
+
import { z as z46 } from "zod";
|
|
1401
1316
|
|
|
1402
1317
|
// src/dsm/elements/data/documentation-v2.ts
|
|
1403
|
-
import { z as
|
|
1318
|
+
import { z as z45 } from "zod";
|
|
1404
1319
|
|
|
1405
1320
|
// src/dsm/elements/data/item-header-v2.ts
|
|
1406
|
-
import { z as
|
|
1407
|
-
var DocumentationItemHeaderV2 =
|
|
1408
|
-
description:
|
|
1321
|
+
import { z as z44 } from "zod";
|
|
1322
|
+
var DocumentationItemHeaderV2 = z44.object({
|
|
1323
|
+
description: z44.string(),
|
|
1409
1324
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1410
1325
|
foregroundColor: PageBlockColorV2.nullish(),
|
|
1411
1326
|
backgroundColor: PageBlockColorV2.nullish(),
|
|
1412
1327
|
backgroundImageAsset: PageBlockImageReference.nullish(),
|
|
1413
1328
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1414
|
-
showBackgroundOverlay:
|
|
1415
|
-
showCoverText:
|
|
1416
|
-
minHeight:
|
|
1329
|
+
showBackgroundOverlay: z44.boolean(),
|
|
1330
|
+
showCoverText: z44.boolean(),
|
|
1331
|
+
minHeight: z44.number().nullish()
|
|
1417
1332
|
});
|
|
1418
1333
|
var defaultDocumentationItemHeaderV2 = {
|
|
1419
1334
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -1424,10 +1339,10 @@ var defaultDocumentationItemHeaderV2 = {
|
|
|
1424
1339
|
};
|
|
1425
1340
|
|
|
1426
1341
|
// src/dsm/elements/data/documentation-v2.ts
|
|
1427
|
-
var DocumentationItemConfigurationV2 =
|
|
1428
|
-
showSidebar:
|
|
1429
|
-
isPrivate:
|
|
1430
|
-
isHidden:
|
|
1342
|
+
var DocumentationItemConfigurationV2 = z45.object({
|
|
1343
|
+
showSidebar: z45.boolean(),
|
|
1344
|
+
isPrivate: z45.boolean().optional(),
|
|
1345
|
+
isHidden: z45.boolean().optional(),
|
|
1431
1346
|
header: DocumentationItemHeaderV2
|
|
1432
1347
|
});
|
|
1433
1348
|
var defaultDocumentationItemConfigurationV2 = {
|
|
@@ -1438,122 +1353,122 @@ var defaultDocumentationItemConfigurationV2 = {
|
|
|
1438
1353
|
};
|
|
1439
1354
|
|
|
1440
1355
|
// src/dsm/elements/data/documentation-page-v2.ts
|
|
1441
|
-
var DocumentationPageDataV2 =
|
|
1356
|
+
var DocumentationPageDataV2 = z46.object({
|
|
1442
1357
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1443
1358
|
});
|
|
1444
1359
|
|
|
1445
1360
|
// src/dsm/elements/data/documentation-section-v2.ts
|
|
1446
|
-
import { z as
|
|
1361
|
+
import { z as z49 } from "zod";
|
|
1447
1362
|
|
|
1448
1363
|
// src/dsm/elements/page-block-v2.ts
|
|
1449
|
-
import { z as
|
|
1364
|
+
import { z as z48 } from "zod";
|
|
1450
1365
|
|
|
1451
1366
|
// src/dsm/elements/base.ts
|
|
1452
|
-
import { z as
|
|
1453
|
-
var DesignElementOrigin =
|
|
1454
|
-
id:
|
|
1455
|
-
sourceId:
|
|
1456
|
-
name:
|
|
1457
|
-
});
|
|
1458
|
-
var DesignElementBase =
|
|
1459
|
-
id:
|
|
1460
|
-
persistentId:
|
|
1367
|
+
import { z as z47 } from "zod";
|
|
1368
|
+
var DesignElementOrigin = z47.object({
|
|
1369
|
+
id: z47.string(),
|
|
1370
|
+
sourceId: z47.string(),
|
|
1371
|
+
name: z47.string()
|
|
1372
|
+
});
|
|
1373
|
+
var DesignElementBase = z47.object({
|
|
1374
|
+
id: z47.string(),
|
|
1375
|
+
persistentId: z47.string(),
|
|
1461
1376
|
meta: ObjectMeta,
|
|
1462
|
-
designSystemVersionId:
|
|
1463
|
-
createdAt:
|
|
1464
|
-
updatedAt:
|
|
1377
|
+
designSystemVersionId: z47.string(),
|
|
1378
|
+
createdAt: z47.coerce.date(),
|
|
1379
|
+
updatedAt: z47.coerce.date()
|
|
1465
1380
|
});
|
|
1466
1381
|
var DesignElementImportedBase = DesignElementBase.extend({
|
|
1467
1382
|
origin: DesignElementOrigin
|
|
1468
1383
|
});
|
|
1469
|
-
var DesignElementGroupablePart =
|
|
1470
|
-
parentPersistentId:
|
|
1471
|
-
sortOrder:
|
|
1384
|
+
var DesignElementGroupablePart = z47.object({
|
|
1385
|
+
parentPersistentId: z47.string().optional(),
|
|
1386
|
+
sortOrder: z47.number()
|
|
1472
1387
|
});
|
|
1473
1388
|
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
1474
1389
|
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
1475
|
-
parentPersistentId:
|
|
1390
|
+
parentPersistentId: z47.string()
|
|
1476
1391
|
});
|
|
1477
|
-
var DesignElementBrandedPart =
|
|
1478
|
-
brandPersistentId:
|
|
1392
|
+
var DesignElementBrandedPart = z47.object({
|
|
1393
|
+
brandPersistentId: z47.string()
|
|
1479
1394
|
});
|
|
1480
|
-
var DesignElementSlugPart =
|
|
1481
|
-
slug:
|
|
1482
|
-
userSlug:
|
|
1395
|
+
var DesignElementSlugPart = z47.object({
|
|
1396
|
+
slug: z47.string().optional(),
|
|
1397
|
+
userSlug: z47.string().optional()
|
|
1483
1398
|
});
|
|
1484
1399
|
|
|
1485
1400
|
// src/dsm/elements/page-block-v2.ts
|
|
1486
1401
|
var PageBlockV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend({
|
|
1487
1402
|
data: PageBlockDataV2
|
|
1488
1403
|
});
|
|
1489
|
-
var PageBlockEditorModelV2 =
|
|
1490
|
-
id:
|
|
1491
|
-
type:
|
|
1404
|
+
var PageBlockEditorModelV2 = z48.object({
|
|
1405
|
+
id: z48.string(),
|
|
1406
|
+
type: z48.literal("Block"),
|
|
1492
1407
|
data: PageBlockDataV2
|
|
1493
1408
|
});
|
|
1494
1409
|
|
|
1495
1410
|
// src/dsm/elements/data/documentation-section-v2.ts
|
|
1496
|
-
var PageSectionTypeV2 =
|
|
1497
|
-
var PageSectionColumnV2 =
|
|
1498
|
-
id:
|
|
1499
|
-
blocks:
|
|
1411
|
+
var PageSectionTypeV2 = z49.enum(["Tabs"]);
|
|
1412
|
+
var PageSectionColumnV2 = z49.object({
|
|
1413
|
+
id: z49.string(),
|
|
1414
|
+
blocks: z49.array(PageBlockEditorModelV2)
|
|
1500
1415
|
});
|
|
1501
|
-
var PageSectionItemV2 =
|
|
1502
|
-
id:
|
|
1503
|
-
title:
|
|
1504
|
-
columns:
|
|
1505
|
-
});
|
|
1506
|
-
var PageSectionPaddingV2 =
|
|
1507
|
-
top:
|
|
1508
|
-
bottom:
|
|
1509
|
-
left:
|
|
1510
|
-
right:
|
|
1511
|
-
});
|
|
1512
|
-
var PageSectionAppearanceV2 =
|
|
1513
|
-
expandToEdges:
|
|
1514
|
-
contentExpandToEdges:
|
|
1416
|
+
var PageSectionItemV2 = z49.object({
|
|
1417
|
+
id: z49.string(),
|
|
1418
|
+
title: z49.string(),
|
|
1419
|
+
columns: z49.array(PageSectionColumnV2)
|
|
1420
|
+
});
|
|
1421
|
+
var PageSectionPaddingV2 = z49.object({
|
|
1422
|
+
top: z49.number().optional(),
|
|
1423
|
+
bottom: z49.number().optional(),
|
|
1424
|
+
left: z49.number().optional(),
|
|
1425
|
+
right: z49.number().optional()
|
|
1426
|
+
});
|
|
1427
|
+
var PageSectionAppearanceV2 = z49.object({
|
|
1428
|
+
expandToEdges: z49.boolean(),
|
|
1429
|
+
contentExpandToEdges: z49.boolean(),
|
|
1515
1430
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1516
1431
|
foregroundColor: PageBlockColorV2.optional(),
|
|
1517
1432
|
padding: PageSectionPaddingV2.optional()
|
|
1518
1433
|
});
|
|
1519
|
-
var PageSectionEditorModelV2 =
|
|
1520
|
-
id:
|
|
1521
|
-
type:
|
|
1522
|
-
variantId:
|
|
1434
|
+
var PageSectionEditorModelV2 = z49.object({
|
|
1435
|
+
id: z49.string(),
|
|
1436
|
+
type: z49.literal("Section"),
|
|
1437
|
+
variantId: z49.string().optional(),
|
|
1523
1438
|
sectionType: PageSectionTypeV2,
|
|
1524
1439
|
appearance: PageSectionAppearanceV2,
|
|
1525
|
-
items:
|
|
1440
|
+
items: z49.array(PageSectionItemV2)
|
|
1526
1441
|
});
|
|
1527
1442
|
|
|
1528
1443
|
// src/dsm/elements/data/duration.ts
|
|
1529
|
-
import { z as
|
|
1530
|
-
var DurationUnit =
|
|
1531
|
-
var DurationValue =
|
|
1444
|
+
import { z as z50 } from "zod";
|
|
1445
|
+
var DurationUnit = z50.enum(["Ms"]);
|
|
1446
|
+
var DurationValue = z50.object({
|
|
1532
1447
|
unit: DurationUnit,
|
|
1533
|
-
measure:
|
|
1448
|
+
measure: z50.number()
|
|
1534
1449
|
});
|
|
1535
1450
|
var DurationTokenData = tokenAliasOrValue(DurationValue);
|
|
1536
1451
|
|
|
1537
1452
|
// src/dsm/elements/data/figma-file-structure.ts
|
|
1538
|
-
import { z as
|
|
1539
|
-
var FigmaFileStructureNodeType =
|
|
1540
|
-
var FigmaFileStructureNodeBase =
|
|
1541
|
-
id:
|
|
1542
|
-
name:
|
|
1453
|
+
import { z as z51 } from "zod";
|
|
1454
|
+
var FigmaFileStructureNodeType = z51.enum(["DOCUMENT", "CANVAS", "FRAME", "COMPONENT", "COMPONENT_SET"]);
|
|
1455
|
+
var FigmaFileStructureNodeBase = z51.object({
|
|
1456
|
+
id: z51.string(),
|
|
1457
|
+
name: z51.string(),
|
|
1543
1458
|
type: FigmaFileStructureNodeType,
|
|
1544
1459
|
size: SizeOrUndefined,
|
|
1545
|
-
parentComponentSetId:
|
|
1460
|
+
parentComponentSetId: z51.string().optional()
|
|
1546
1461
|
});
|
|
1547
1462
|
var FigmaFileStructureNode = FigmaFileStructureNodeBase.extend({
|
|
1548
|
-
children:
|
|
1463
|
+
children: z51.lazy(() => FigmaFileStructureNode.array())
|
|
1549
1464
|
});
|
|
1550
|
-
var FigmaFileStructureStatistics =
|
|
1551
|
-
frames:
|
|
1552
|
-
components:
|
|
1553
|
-
componentSets:
|
|
1465
|
+
var FigmaFileStructureStatistics = z51.object({
|
|
1466
|
+
frames: z51.number().nullable().optional().transform((v) => v ?? 0),
|
|
1467
|
+
components: z51.number().nullable().optional().transform((v) => v ?? 0),
|
|
1468
|
+
componentSets: z51.number().nullable().optional().transform((v) => v ?? 0)
|
|
1554
1469
|
});
|
|
1555
|
-
var FigmaFileStructureElementData =
|
|
1556
|
-
value:
|
|
1470
|
+
var FigmaFileStructureElementData = z51.object({
|
|
1471
|
+
value: z51.object({
|
|
1557
1472
|
structure: FigmaFileStructureNode,
|
|
1558
1473
|
assetsInFile: FigmaFileStructureStatistics
|
|
1559
1474
|
})
|
|
@@ -1570,119 +1485,119 @@ function recursiveFigmaFileStructureToMap(node, map) {
|
|
|
1570
1485
|
}
|
|
1571
1486
|
|
|
1572
1487
|
// src/dsm/elements/data/figma-node-reference.ts
|
|
1573
|
-
import { z as
|
|
1574
|
-
var FigmaNodeReferenceData =
|
|
1575
|
-
structureElementId:
|
|
1576
|
-
nodeId:
|
|
1577
|
-
fileId:
|
|
1578
|
-
valid:
|
|
1488
|
+
import { z as z52 } from "zod";
|
|
1489
|
+
var FigmaNodeReferenceData = z52.object({
|
|
1490
|
+
structureElementId: z52.string(),
|
|
1491
|
+
nodeId: z52.string(),
|
|
1492
|
+
fileId: z52.string().optional(),
|
|
1493
|
+
valid: z52.boolean(),
|
|
1579
1494
|
// Asset data
|
|
1580
|
-
assetId:
|
|
1581
|
-
assetScale:
|
|
1582
|
-
assetWidth:
|
|
1583
|
-
assetHeight:
|
|
1584
|
-
assetUrl:
|
|
1585
|
-
assetOriginKey:
|
|
1586
|
-
});
|
|
1587
|
-
var FigmaNodeReferenceElementData =
|
|
1495
|
+
assetId: z52.string().optional(),
|
|
1496
|
+
assetScale: z52.number().optional(),
|
|
1497
|
+
assetWidth: z52.number().optional(),
|
|
1498
|
+
assetHeight: z52.number().optional(),
|
|
1499
|
+
assetUrl: z52.string().optional(),
|
|
1500
|
+
assetOriginKey: z52.string().optional()
|
|
1501
|
+
});
|
|
1502
|
+
var FigmaNodeReferenceElementData = z52.object({
|
|
1588
1503
|
value: FigmaNodeReferenceData
|
|
1589
1504
|
});
|
|
1590
1505
|
|
|
1591
1506
|
// src/dsm/elements/data/font-family.ts
|
|
1592
|
-
import { z as
|
|
1593
|
-
var FontFamilyValue =
|
|
1507
|
+
import { z as z53 } from "zod";
|
|
1508
|
+
var FontFamilyValue = z53.string();
|
|
1594
1509
|
var FontFamilyTokenData = tokenAliasOrValue(FontFamilyValue);
|
|
1595
1510
|
|
|
1596
1511
|
// src/dsm/elements/data/font-size.ts
|
|
1597
|
-
import { z as
|
|
1598
|
-
var FontSizeUnit =
|
|
1599
|
-
var FontSizeValue =
|
|
1512
|
+
import { z as z54 } from "zod";
|
|
1513
|
+
var FontSizeUnit = z54.enum(["Pixels", "Rem", "Percent"]);
|
|
1514
|
+
var FontSizeValue = z54.object({
|
|
1600
1515
|
unit: FontSizeUnit,
|
|
1601
|
-
measure:
|
|
1516
|
+
measure: z54.number()
|
|
1602
1517
|
});
|
|
1603
1518
|
var FontSizeTokenData = tokenAliasOrValue(FontSizeValue);
|
|
1604
1519
|
|
|
1605
1520
|
// src/dsm/elements/data/font-weight.ts
|
|
1606
|
-
import { z as
|
|
1607
|
-
var FontWeightValue =
|
|
1521
|
+
import { z as z55 } from "zod";
|
|
1522
|
+
var FontWeightValue = z55.string();
|
|
1608
1523
|
var FontWeightTokenData = tokenAliasOrValue(FontWeightValue);
|
|
1609
1524
|
|
|
1610
1525
|
// src/dsm/elements/data/gradient.ts
|
|
1611
|
-
import { z as
|
|
1612
|
-
var GradientType =
|
|
1613
|
-
var GradientStop =
|
|
1614
|
-
position:
|
|
1526
|
+
import { z as z56 } from "zod";
|
|
1527
|
+
var GradientType = z56.enum(["Linear", "Radial", "Angular"]);
|
|
1528
|
+
var GradientStop = z56.object({
|
|
1529
|
+
position: z56.number(),
|
|
1615
1530
|
color: ColorTokenData
|
|
1616
1531
|
});
|
|
1617
|
-
var GradientLayerValue =
|
|
1532
|
+
var GradientLayerValue = z56.object({
|
|
1618
1533
|
from: Point2D,
|
|
1619
1534
|
to: Point2D,
|
|
1620
1535
|
type: GradientType,
|
|
1621
|
-
aspectRatio: nullishToOptional(
|
|
1536
|
+
aspectRatio: nullishToOptional(z56.number()),
|
|
1622
1537
|
// z.number(),
|
|
1623
|
-
stops:
|
|
1538
|
+
stops: z56.array(GradientStop).min(2)
|
|
1624
1539
|
});
|
|
1625
1540
|
var GradientLayerData = tokenAliasOrValue(GradientLayerValue);
|
|
1626
|
-
var GradientTokenValue =
|
|
1541
|
+
var GradientTokenValue = z56.array(GradientLayerData);
|
|
1627
1542
|
var GradientTokenData = tokenAliasOrValue(GradientTokenValue);
|
|
1628
1543
|
|
|
1629
1544
|
// src/dsm/elements/data/group.ts
|
|
1630
|
-
import { z as
|
|
1631
|
-
var DocumentationGroupBehavior =
|
|
1632
|
-
var ElementGroupDataV1 =
|
|
1545
|
+
import { z as z57 } from "zod";
|
|
1546
|
+
var DocumentationGroupBehavior = z57.enum(["Group", "Tabs"]);
|
|
1547
|
+
var ElementGroupDataV1 = z57.object({
|
|
1633
1548
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1634
1549
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1635
1550
|
});
|
|
1636
|
-
var ElementGroupDataV2 =
|
|
1551
|
+
var ElementGroupDataV2 = z57.object({
|
|
1637
1552
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1638
1553
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1639
1554
|
});
|
|
1640
1555
|
|
|
1641
1556
|
// src/dsm/elements/data/letter-spacing.ts
|
|
1642
|
-
import { z as
|
|
1643
|
-
var LetterSpacingUnit =
|
|
1644
|
-
var LetterSpacingValue =
|
|
1557
|
+
import { z as z58 } from "zod";
|
|
1558
|
+
var LetterSpacingUnit = z58.enum(["Pixels", "Rem", "Percent"]);
|
|
1559
|
+
var LetterSpacingValue = z58.object({
|
|
1645
1560
|
unit: LetterSpacingUnit,
|
|
1646
|
-
measure:
|
|
1561
|
+
measure: z58.number()
|
|
1647
1562
|
});
|
|
1648
1563
|
var LetterSpacingTokenData = tokenAliasOrValue(LetterSpacingValue);
|
|
1649
1564
|
|
|
1650
1565
|
// src/dsm/elements/data/line-height.ts
|
|
1651
|
-
import { z as
|
|
1652
|
-
var LineHeightUnit =
|
|
1653
|
-
var LineHeightValue =
|
|
1566
|
+
import { z as z59 } from "zod";
|
|
1567
|
+
var LineHeightUnit = z59.enum(["Pixels", "Rem", "Percent", "Raw"]);
|
|
1568
|
+
var LineHeightValue = z59.object({
|
|
1654
1569
|
unit: LineHeightUnit,
|
|
1655
|
-
measure:
|
|
1570
|
+
measure: z59.number()
|
|
1656
1571
|
});
|
|
1657
1572
|
var LineHeightTokenData = tokenAliasOrValue(LineHeightValue);
|
|
1658
1573
|
|
|
1659
1574
|
// src/dsm/elements/data/paragraph-indent.ts
|
|
1660
|
-
import { z as
|
|
1661
|
-
var ParagraphIndentUnit =
|
|
1662
|
-
var ParagraphIndentValue =
|
|
1575
|
+
import { z as z60 } from "zod";
|
|
1576
|
+
var ParagraphIndentUnit = z60.enum(["Pixels", "Rem", "Percent"]);
|
|
1577
|
+
var ParagraphIndentValue = z60.object({
|
|
1663
1578
|
unit: ParagraphIndentUnit,
|
|
1664
|
-
measure:
|
|
1579
|
+
measure: z60.number()
|
|
1665
1580
|
});
|
|
1666
1581
|
var ParagraphIndentTokenData = tokenAliasOrValue(ParagraphIndentValue);
|
|
1667
1582
|
|
|
1668
1583
|
// src/dsm/elements/data/paragraph-spacing.ts
|
|
1669
|
-
import { z as
|
|
1670
|
-
var ParagraphSpacingUnit =
|
|
1671
|
-
var ParagraphSpacingValue =
|
|
1584
|
+
import { z as z61 } from "zod";
|
|
1585
|
+
var ParagraphSpacingUnit = z61.enum(["Pixels", "Rem", "Percent"]);
|
|
1586
|
+
var ParagraphSpacingValue = z61.object({
|
|
1672
1587
|
unit: ParagraphSpacingUnit,
|
|
1673
|
-
measure:
|
|
1588
|
+
measure: z61.number()
|
|
1674
1589
|
});
|
|
1675
1590
|
var ParagraphSpacingTokenData = tokenAliasOrValue(ParagraphSpacingValue);
|
|
1676
1591
|
|
|
1677
1592
|
// src/dsm/elements/data/product-copy.ts
|
|
1678
|
-
import { z as
|
|
1679
|
-
var ProductCopyValue =
|
|
1593
|
+
import { z as z62 } from "zod";
|
|
1594
|
+
var ProductCopyValue = z62.string();
|
|
1680
1595
|
var ProductCopyTokenData = tokenAliasOrValue(ProductCopyValue);
|
|
1681
1596
|
|
|
1682
1597
|
// src/dsm/elements/data/safe-id.ts
|
|
1683
|
-
import { z as
|
|
1598
|
+
import { z as z63 } from "zod";
|
|
1684
1599
|
var RESERVED_OBJECT_ID_PREFIX = "x-sn-reserved-";
|
|
1685
|
-
var SafeIdSchema =
|
|
1600
|
+
var SafeIdSchema = z63.string().refine(
|
|
1686
1601
|
(value) => {
|
|
1687
1602
|
return !value.startsWith(RESERVED_OBJECT_ID_PREFIX);
|
|
1688
1603
|
},
|
|
@@ -1692,58 +1607,58 @@ var SafeIdSchema = z65.string().refine(
|
|
|
1692
1607
|
);
|
|
1693
1608
|
|
|
1694
1609
|
// src/dsm/elements/data/shadow.ts
|
|
1695
|
-
import { z as
|
|
1696
|
-
var ShadowType =
|
|
1697
|
-
var ShadowLayerValue =
|
|
1610
|
+
import { z as z64 } from "zod";
|
|
1611
|
+
var ShadowType = z64.enum(["Drop", "Inner"]);
|
|
1612
|
+
var ShadowLayerValue = z64.object({
|
|
1698
1613
|
color: ColorTokenData,
|
|
1699
|
-
x:
|
|
1700
|
-
y:
|
|
1701
|
-
radius:
|
|
1702
|
-
spread:
|
|
1614
|
+
x: z64.number(),
|
|
1615
|
+
y: z64.number(),
|
|
1616
|
+
radius: z64.number(),
|
|
1617
|
+
spread: z64.number(),
|
|
1703
1618
|
opacity: OpacityTokenData.optional(),
|
|
1704
1619
|
type: ShadowType
|
|
1705
1620
|
});
|
|
1706
1621
|
var ShadowTokenDataBase = tokenAliasOrValue(ShadowLayerValue);
|
|
1707
|
-
var ShadowTokenData = tokenAliasOrValue(
|
|
1622
|
+
var ShadowTokenData = tokenAliasOrValue(z64.array(ShadowTokenDataBase));
|
|
1708
1623
|
|
|
1709
1624
|
// src/dsm/elements/data/size.ts
|
|
1710
|
-
import { z as
|
|
1711
|
-
var SizeUnit =
|
|
1712
|
-
var SizeValue =
|
|
1625
|
+
import { z as z65 } from "zod";
|
|
1626
|
+
var SizeUnit = z65.enum(["Pixels", "Rem", "Percent"]);
|
|
1627
|
+
var SizeValue = z65.object({
|
|
1713
1628
|
unit: SizeUnit,
|
|
1714
|
-
measure:
|
|
1629
|
+
measure: z65.number()
|
|
1715
1630
|
});
|
|
1716
1631
|
var SizeTokenData = tokenAliasOrValue(SizeValue);
|
|
1717
1632
|
|
|
1718
1633
|
// src/dsm/elements/data/space.ts
|
|
1719
|
-
import { z as
|
|
1720
|
-
var SpaceUnit =
|
|
1721
|
-
var SpaceValue =
|
|
1634
|
+
import { z as z66 } from "zod";
|
|
1635
|
+
var SpaceUnit = z66.enum(["Pixels", "Rem", "Percent"]);
|
|
1636
|
+
var SpaceValue = z66.object({
|
|
1722
1637
|
unit: SpaceUnit,
|
|
1723
|
-
measure:
|
|
1638
|
+
measure: z66.number()
|
|
1724
1639
|
});
|
|
1725
1640
|
var SpaceTokenData = tokenAliasOrValue(SpaceValue);
|
|
1726
1641
|
|
|
1727
1642
|
// src/dsm/elements/data/string.ts
|
|
1728
|
-
import { z as
|
|
1729
|
-
var StringValue =
|
|
1643
|
+
import { z as z67 } from "zod";
|
|
1644
|
+
var StringValue = z67.string();
|
|
1730
1645
|
var StringTokenData = tokenAliasOrValue(StringValue);
|
|
1731
1646
|
|
|
1732
1647
|
// src/dsm/elements/data/text-case.ts
|
|
1733
|
-
import { z as
|
|
1734
|
-
var TextCase =
|
|
1648
|
+
import { z as z68 } from "zod";
|
|
1649
|
+
var TextCase = z68.enum(["Original", "Upper", "Lower", "Camel", "SmallCaps"]);
|
|
1735
1650
|
var TextCaseValue = TextCase;
|
|
1736
1651
|
var TextCaseTokenData = tokenAliasOrValue(TextCaseValue);
|
|
1737
1652
|
|
|
1738
1653
|
// src/dsm/elements/data/text-decoration.ts
|
|
1739
|
-
import { z as
|
|
1740
|
-
var TextDecoration =
|
|
1654
|
+
import { z as z69 } from "zod";
|
|
1655
|
+
var TextDecoration = z69.enum(["None", "Underline", "Strikethrough"]);
|
|
1741
1656
|
var TextDecorationValue = TextDecoration;
|
|
1742
1657
|
var TextDecorationTokenData = tokenAliasOrValue(TextDecorationValue);
|
|
1743
1658
|
|
|
1744
1659
|
// src/dsm/elements/data/typography.ts
|
|
1745
|
-
import { z as
|
|
1746
|
-
var TypographyValue =
|
|
1660
|
+
import { z as z70 } from "zod";
|
|
1661
|
+
var TypographyValue = z70.object({
|
|
1747
1662
|
fontSize: FontSizeTokenData,
|
|
1748
1663
|
fontFamily: FontFamilyTokenData,
|
|
1749
1664
|
fontWeight: FontWeightTokenData,
|
|
@@ -1757,49 +1672,49 @@ var TypographyValue = z72.object({
|
|
|
1757
1672
|
var TypographyTokenData = tokenAliasOrValue(TypographyValue);
|
|
1758
1673
|
|
|
1759
1674
|
// src/dsm/elements/data/visibility.ts
|
|
1760
|
-
import { z as
|
|
1761
|
-
var Visibility =
|
|
1675
|
+
import { z as z71 } from "zod";
|
|
1676
|
+
var Visibility = z71.enum(["Hidden", "Visible"]);
|
|
1762
1677
|
var VisibilityValue = Visibility;
|
|
1763
1678
|
var VisibilityTokenData = tokenAliasOrValue(VisibilityValue);
|
|
1764
1679
|
|
|
1765
1680
|
// src/dsm/elements/data/z-index.ts
|
|
1766
|
-
import { z as
|
|
1767
|
-
var ZIndexUnit =
|
|
1768
|
-
var ZIndexValue =
|
|
1681
|
+
import { z as z72 } from "zod";
|
|
1682
|
+
var ZIndexUnit = z72.enum(["Raw"]);
|
|
1683
|
+
var ZIndexValue = z72.object({
|
|
1769
1684
|
unit: ZIndexUnit,
|
|
1770
|
-
measure:
|
|
1685
|
+
measure: z72.number()
|
|
1771
1686
|
});
|
|
1772
1687
|
var ZIndexTokenData = tokenAliasOrValue(ZIndexValue);
|
|
1773
1688
|
|
|
1774
1689
|
// src/dsm/elements/component.ts
|
|
1775
|
-
import { z as
|
|
1776
|
-
var ComponentOriginPart =
|
|
1777
|
-
nodeId:
|
|
1778
|
-
width:
|
|
1779
|
-
height:
|
|
1690
|
+
import { z as z73 } from "zod";
|
|
1691
|
+
var ComponentOriginPart = z73.object({
|
|
1692
|
+
nodeId: z73.string().optional(),
|
|
1693
|
+
width: z73.number().optional(),
|
|
1694
|
+
height: z73.number().optional()
|
|
1780
1695
|
});
|
|
1781
|
-
var ComponentAsset =
|
|
1782
|
-
assetId:
|
|
1783
|
-
assetPath:
|
|
1696
|
+
var ComponentAsset = z73.object({
|
|
1697
|
+
assetId: z73.string(),
|
|
1698
|
+
assetPath: z73.string()
|
|
1784
1699
|
});
|
|
1785
1700
|
var ComponentOrigin = DesignElementOrigin.extend(ComponentOriginPart.shape);
|
|
1786
1701
|
var Component = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
1787
1702
|
origin: ComponentOrigin.optional(),
|
|
1788
1703
|
thumbnail: ComponentAsset,
|
|
1789
1704
|
svg: ComponentAsset.optional(),
|
|
1790
|
-
isAsset:
|
|
1705
|
+
isAsset: z73.boolean()
|
|
1791
1706
|
});
|
|
1792
1707
|
function isImportedComponent(component) {
|
|
1793
1708
|
return !!component.origin;
|
|
1794
1709
|
}
|
|
1795
1710
|
|
|
1796
1711
|
// src/dsm/elements/documentation-page-v1.ts
|
|
1797
|
-
import { z as
|
|
1712
|
+
import { z as z75 } from "zod";
|
|
1798
1713
|
|
|
1799
1714
|
// src/dsm/elements/group.ts
|
|
1800
|
-
import { z as
|
|
1715
|
+
import { z as z74 } from "zod";
|
|
1801
1716
|
var ElementGroup = DesignElementBase.extend(DesignElementGroupablePart.shape).extend(DesignElementSlugPart.shape).extend(DesignElementBrandedPart.partial().shape).extend({
|
|
1802
|
-
shortPersistentId:
|
|
1717
|
+
shortPersistentId: z74.string().optional(),
|
|
1803
1718
|
childType: DesignElementType,
|
|
1804
1719
|
data: ElementGroupDataV2.optional()
|
|
1805
1720
|
});
|
|
@@ -1807,7 +1722,7 @@ var BrandedElementGroup = ElementGroup.extend(DesignElementBrandedPart.shape);
|
|
|
1807
1722
|
|
|
1808
1723
|
// src/dsm/elements/documentation-page-v1.ts
|
|
1809
1724
|
var DocumentationPageV1 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1810
|
-
shortPersistentId:
|
|
1725
|
+
shortPersistentId: z75.string(),
|
|
1811
1726
|
data: DocumentationPageDataV1
|
|
1812
1727
|
});
|
|
1813
1728
|
var DocumentationGroupV1 = ElementGroup.omit({
|
|
@@ -1817,21 +1732,21 @@ var DocumentationGroupV1 = ElementGroup.omit({
|
|
|
1817
1732
|
});
|
|
1818
1733
|
|
|
1819
1734
|
// src/dsm/elements/documentation-page-v2.ts
|
|
1820
|
-
import { z as
|
|
1735
|
+
import { z as z76 } from "zod";
|
|
1821
1736
|
var DocumentationPageV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1822
|
-
shortPersistentId:
|
|
1737
|
+
shortPersistentId: z76.string(),
|
|
1823
1738
|
data: DocumentationPageDataV2.extend({
|
|
1824
|
-
oldBlocks:
|
|
1739
|
+
oldBlocks: z76.array(PageBlockV1).optional()
|
|
1825
1740
|
})
|
|
1826
1741
|
});
|
|
1827
1742
|
|
|
1828
1743
|
// src/dsm/elements/figma-file-structures.ts
|
|
1829
|
-
import { z as
|
|
1830
|
-
var FigmaFileStructureOrigin =
|
|
1831
|
-
sourceId:
|
|
1832
|
-
fileId:
|
|
1744
|
+
import { z as z77 } from "zod";
|
|
1745
|
+
var FigmaFileStructureOrigin = z77.object({
|
|
1746
|
+
sourceId: z77.string(),
|
|
1747
|
+
fileId: z77.string().optional()
|
|
1833
1748
|
});
|
|
1834
|
-
var FigmaFileStructureData =
|
|
1749
|
+
var FigmaFileStructureData = z77.object({
|
|
1835
1750
|
rootNode: FigmaFileStructureNode,
|
|
1836
1751
|
assetsInFile: FigmaFileStructureStatistics
|
|
1837
1752
|
});
|
|
@@ -1847,10 +1762,10 @@ function traverseStructure(node, action) {
|
|
|
1847
1762
|
}
|
|
1848
1763
|
|
|
1849
1764
|
// src/dsm/elements/figma-node-reference.ts
|
|
1850
|
-
import { z as
|
|
1851
|
-
var FigmaNodeReferenceOrigin =
|
|
1852
|
-
sourceId:
|
|
1853
|
-
parentName:
|
|
1765
|
+
import { z as z78 } from "zod";
|
|
1766
|
+
var FigmaNodeReferenceOrigin = z78.object({
|
|
1767
|
+
sourceId: z78.string(),
|
|
1768
|
+
parentName: z78.string().optional()
|
|
1854
1769
|
});
|
|
1855
1770
|
var FigmaNodeReference = DesignElementBase.extend({
|
|
1856
1771
|
data: FigmaNodeReferenceData,
|
|
@@ -1858,15 +1773,15 @@ var FigmaNodeReference = DesignElementBase.extend({
|
|
|
1858
1773
|
});
|
|
1859
1774
|
|
|
1860
1775
|
// src/dsm/elements/theme.ts
|
|
1861
|
-
import { z as
|
|
1776
|
+
import { z as z80 } from "zod";
|
|
1862
1777
|
|
|
1863
1778
|
// src/dsm/elements/tokens.ts
|
|
1864
|
-
import { z as
|
|
1865
|
-
var DesignTokenOriginPart =
|
|
1866
|
-
referenceOriginId:
|
|
1867
|
-
referencePersistentId:
|
|
1868
|
-
referenceResolutionFailed:
|
|
1869
|
-
key:
|
|
1779
|
+
import { z as z79 } from "zod";
|
|
1780
|
+
var DesignTokenOriginPart = z79.object({
|
|
1781
|
+
referenceOriginId: z79.string().optional(),
|
|
1782
|
+
referencePersistentId: z79.string().optional(),
|
|
1783
|
+
referenceResolutionFailed: z79.boolean().optional(),
|
|
1784
|
+
key: z79.string().optional()
|
|
1870
1785
|
});
|
|
1871
1786
|
var DesignTokenOrigin = DesignElementOrigin.extend(DesignTokenOriginPart.shape);
|
|
1872
1787
|
var DesignTokenBase = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
@@ -1878,111 +1793,111 @@ var UpdateDesignTokenBase = DesignTokenBase.omit({
|
|
|
1878
1793
|
brandPersistentId: true,
|
|
1879
1794
|
designSystemVersionId: true
|
|
1880
1795
|
});
|
|
1881
|
-
var BlurTokenTypedData =
|
|
1882
|
-
type:
|
|
1796
|
+
var BlurTokenTypedData = z79.object({
|
|
1797
|
+
type: z79.literal("Blur"),
|
|
1883
1798
|
data: BlurTokenData
|
|
1884
1799
|
});
|
|
1885
|
-
var ColorTokenTypedData =
|
|
1886
|
-
type:
|
|
1800
|
+
var ColorTokenTypedData = z79.object({
|
|
1801
|
+
type: z79.literal("Color"),
|
|
1887
1802
|
data: ColorTokenData
|
|
1888
1803
|
});
|
|
1889
|
-
var GradientTokenTypedData =
|
|
1890
|
-
type:
|
|
1804
|
+
var GradientTokenTypedData = z79.object({
|
|
1805
|
+
type: z79.literal("Gradient"),
|
|
1891
1806
|
data: GradientTokenData
|
|
1892
1807
|
});
|
|
1893
|
-
var OpacityTokenTypedData =
|
|
1894
|
-
type:
|
|
1808
|
+
var OpacityTokenTypedData = z79.object({
|
|
1809
|
+
type: z79.literal("Opacity"),
|
|
1895
1810
|
data: OpacityTokenData
|
|
1896
1811
|
});
|
|
1897
|
-
var ShadowTokenTypedData =
|
|
1898
|
-
type:
|
|
1812
|
+
var ShadowTokenTypedData = z79.object({
|
|
1813
|
+
type: z79.literal("Shadow"),
|
|
1899
1814
|
data: ShadowTokenData
|
|
1900
1815
|
});
|
|
1901
|
-
var TypographyTokenTypedData =
|
|
1902
|
-
type:
|
|
1816
|
+
var TypographyTokenTypedData = z79.object({
|
|
1817
|
+
type: z79.literal("Typography"),
|
|
1903
1818
|
data: TypographyTokenData
|
|
1904
1819
|
});
|
|
1905
|
-
var StringTokenTypedData =
|
|
1906
|
-
type:
|
|
1820
|
+
var StringTokenTypedData = z79.object({
|
|
1821
|
+
type: z79.literal("String"),
|
|
1907
1822
|
data: StringTokenData
|
|
1908
1823
|
});
|
|
1909
|
-
var DimensionTokenTypedData =
|
|
1910
|
-
type:
|
|
1824
|
+
var DimensionTokenTypedData = z79.object({
|
|
1825
|
+
type: z79.literal("Dimension"),
|
|
1911
1826
|
data: DimensionTokenData
|
|
1912
1827
|
});
|
|
1913
|
-
var FontSizeTokenTypedData =
|
|
1914
|
-
type:
|
|
1828
|
+
var FontSizeTokenTypedData = z79.object({
|
|
1829
|
+
type: z79.literal("FontSize"),
|
|
1915
1830
|
data: FontSizeTokenData
|
|
1916
1831
|
});
|
|
1917
|
-
var FontFamilyTokenTypedData =
|
|
1918
|
-
type:
|
|
1832
|
+
var FontFamilyTokenTypedData = z79.object({
|
|
1833
|
+
type: z79.literal("FontFamily"),
|
|
1919
1834
|
data: FontFamilyTokenData
|
|
1920
1835
|
});
|
|
1921
|
-
var FontWeightTokenTypedData =
|
|
1922
|
-
type:
|
|
1836
|
+
var FontWeightTokenTypedData = z79.object({
|
|
1837
|
+
type: z79.literal("FontWeight"),
|
|
1923
1838
|
data: FontWeightTokenData
|
|
1924
1839
|
});
|
|
1925
|
-
var LetterSpacingTokenTypedData =
|
|
1926
|
-
type:
|
|
1840
|
+
var LetterSpacingTokenTypedData = z79.object({
|
|
1841
|
+
type: z79.literal("LetterSpacing"),
|
|
1927
1842
|
data: LetterSpacingTokenData
|
|
1928
1843
|
});
|
|
1929
|
-
var LineHeightTokenTypedData =
|
|
1930
|
-
type:
|
|
1844
|
+
var LineHeightTokenTypedData = z79.object({
|
|
1845
|
+
type: z79.literal("LineHeight"),
|
|
1931
1846
|
data: LineHeightTokenData
|
|
1932
1847
|
});
|
|
1933
|
-
var ParagraphSpacingTokenTypedData =
|
|
1934
|
-
type:
|
|
1848
|
+
var ParagraphSpacingTokenTypedData = z79.object({
|
|
1849
|
+
type: z79.literal("ParagraphSpacing"),
|
|
1935
1850
|
data: ParagraphSpacingTokenData
|
|
1936
1851
|
});
|
|
1937
|
-
var TextCaseTokenTypedData =
|
|
1938
|
-
type:
|
|
1852
|
+
var TextCaseTokenTypedData = z79.object({
|
|
1853
|
+
type: z79.literal("TextCase"),
|
|
1939
1854
|
data: TextCaseTokenData
|
|
1940
1855
|
});
|
|
1941
|
-
var TextDecorationTokenTypedData =
|
|
1942
|
-
type:
|
|
1856
|
+
var TextDecorationTokenTypedData = z79.object({
|
|
1857
|
+
type: z79.literal("TextDecoration"),
|
|
1943
1858
|
data: TextDecorationTokenData
|
|
1944
1859
|
});
|
|
1945
|
-
var BorderRadiusTokenTypedData =
|
|
1946
|
-
type:
|
|
1860
|
+
var BorderRadiusTokenTypedData = z79.object({
|
|
1861
|
+
type: z79.literal("BorderRadius"),
|
|
1947
1862
|
data: BorderRadiusTokenData
|
|
1948
1863
|
});
|
|
1949
|
-
var BorderWidthTokenTypedData =
|
|
1950
|
-
type:
|
|
1864
|
+
var BorderWidthTokenTypedData = z79.object({
|
|
1865
|
+
type: z79.literal("BorderWidth"),
|
|
1951
1866
|
data: BorderWidthTokenData
|
|
1952
1867
|
});
|
|
1953
|
-
var BorderTypedData =
|
|
1954
|
-
type:
|
|
1868
|
+
var BorderTypedData = z79.object({
|
|
1869
|
+
type: z79.literal("Border"),
|
|
1955
1870
|
data: BorderTokenData
|
|
1956
1871
|
});
|
|
1957
|
-
var ProductCopyTypedData =
|
|
1958
|
-
type:
|
|
1872
|
+
var ProductCopyTypedData = z79.object({
|
|
1873
|
+
type: z79.literal("ProductCopy"),
|
|
1959
1874
|
data: ProductCopyTokenData
|
|
1960
1875
|
});
|
|
1961
|
-
var SizeTypedData =
|
|
1962
|
-
type:
|
|
1876
|
+
var SizeTypedData = z79.object({
|
|
1877
|
+
type: z79.literal("Size"),
|
|
1963
1878
|
data: SizeTokenData
|
|
1964
1879
|
});
|
|
1965
|
-
var SpaceTypedData =
|
|
1966
|
-
type:
|
|
1880
|
+
var SpaceTypedData = z79.object({
|
|
1881
|
+
type: z79.literal("Space"),
|
|
1967
1882
|
data: SpaceTokenData
|
|
1968
1883
|
});
|
|
1969
|
-
var VisibilityTypedData =
|
|
1970
|
-
type:
|
|
1884
|
+
var VisibilityTypedData = z79.object({
|
|
1885
|
+
type: z79.literal("Visibility"),
|
|
1971
1886
|
data: VisibilityTokenData
|
|
1972
1887
|
});
|
|
1973
|
-
var ZIndexTypedData =
|
|
1974
|
-
type:
|
|
1888
|
+
var ZIndexTypedData = z79.object({
|
|
1889
|
+
type: z79.literal("ZIndex"),
|
|
1975
1890
|
data: ZIndexTokenData
|
|
1976
1891
|
});
|
|
1977
|
-
var DurationTypedData =
|
|
1978
|
-
type:
|
|
1892
|
+
var DurationTypedData = z79.object({
|
|
1893
|
+
type: z79.literal("Duration"),
|
|
1979
1894
|
data: DurationTokenData
|
|
1980
1895
|
});
|
|
1981
|
-
var FontTypedData =
|
|
1982
|
-
type:
|
|
1983
|
-
data:
|
|
1896
|
+
var FontTypedData = z79.object({
|
|
1897
|
+
type: z79.literal("Font"),
|
|
1898
|
+
data: z79.record(z79.any())
|
|
1984
1899
|
});
|
|
1985
|
-
var DesignTokenTypedData =
|
|
1900
|
+
var DesignTokenTypedData = z79.discriminatedUnion("type", [
|
|
1986
1901
|
BlurTokenTypedData,
|
|
1987
1902
|
BorderRadiusTokenTypedData,
|
|
1988
1903
|
BorderWidthTokenTypedData,
|
|
@@ -2032,32 +1947,32 @@ function designTokenTypeFilter(type) {
|
|
|
2032
1947
|
var ThemeOverrideOriginPart = DesignTokenOriginPart;
|
|
2033
1948
|
var ThemeOverrideOrigin = DesignTokenOrigin;
|
|
2034
1949
|
var ThemeOverride = DesignTokenTypedData.and(
|
|
2035
|
-
|
|
2036
|
-
tokenPersistentId:
|
|
1950
|
+
z80.object({
|
|
1951
|
+
tokenPersistentId: z80.string(),
|
|
2037
1952
|
origin: ThemeOverrideOrigin.optional().nullable().transform((v) => v ?? void 0)
|
|
2038
1953
|
})
|
|
2039
1954
|
);
|
|
2040
|
-
var ThemeElementData =
|
|
2041
|
-
value:
|
|
2042
|
-
overrides:
|
|
1955
|
+
var ThemeElementData = z80.object({
|
|
1956
|
+
value: z80.object({
|
|
1957
|
+
overrides: z80.array(ThemeOverride)
|
|
2043
1958
|
})
|
|
2044
1959
|
});
|
|
2045
|
-
var ThemeOriginPart =
|
|
2046
|
-
var ThemeOriginObject =
|
|
2047
|
-
id:
|
|
2048
|
-
name:
|
|
1960
|
+
var ThemeOriginPart = z80.object({});
|
|
1961
|
+
var ThemeOriginObject = z80.object({
|
|
1962
|
+
id: z80.string(),
|
|
1963
|
+
name: z80.string()
|
|
2049
1964
|
});
|
|
2050
|
-
var ThemeOriginSource =
|
|
2051
|
-
sourceId:
|
|
2052
|
-
sourceObjects:
|
|
1965
|
+
var ThemeOriginSource = z80.object({
|
|
1966
|
+
sourceId: z80.string(),
|
|
1967
|
+
sourceObjects: z80.array(ThemeOriginObject)
|
|
2053
1968
|
});
|
|
2054
|
-
var ThemeOrigin =
|
|
2055
|
-
sources:
|
|
1969
|
+
var ThemeOrigin = z80.object({
|
|
1970
|
+
sources: z80.array(ThemeOriginSource)
|
|
2056
1971
|
});
|
|
2057
1972
|
var Theme = DesignElementBase.extend(DesignElementBrandedPart.shape).extend({
|
|
2058
1973
|
origin: ThemeOrigin.optional(),
|
|
2059
|
-
overrides:
|
|
2060
|
-
codeName:
|
|
1974
|
+
overrides: z80.array(ThemeOverride),
|
|
1975
|
+
codeName: z80.string()
|
|
2061
1976
|
});
|
|
2062
1977
|
|
|
2063
1978
|
// src/dsm/elements/utils.ts
|
|
@@ -2126,33 +2041,284 @@ var PageBlockDefinitionsMap = class {
|
|
|
2126
2041
|
}
|
|
2127
2042
|
};
|
|
2128
2043
|
|
|
2044
|
+
// src/dsm/data-sources/import-summary.ts
|
|
2045
|
+
var FileStructureStats = z81.object({
|
|
2046
|
+
frames: zeroNumberByDefault(),
|
|
2047
|
+
components: zeroNumberByDefault(),
|
|
2048
|
+
componentSets: zeroNumberByDefault()
|
|
2049
|
+
});
|
|
2050
|
+
var SourceImportSummaryByTokenTypeKey = DesignTokenType.or(
|
|
2051
|
+
// Backward compatibility
|
|
2052
|
+
z81.enum(["Measure", "Radius", "GenericToken", "Font", "Text"])
|
|
2053
|
+
);
|
|
2054
|
+
var SourceImportSummaryByTokenType = z81.record(SourceImportSummaryByTokenTypeKey, z81.number());
|
|
2055
|
+
var SourceImportTokenSummary = z81.object({
|
|
2056
|
+
tokensCreated: zeroNumberByDefault(),
|
|
2057
|
+
tokensUpdated: zeroNumberByDefault(),
|
|
2058
|
+
tokensDeleted: zeroNumberByDefault(),
|
|
2059
|
+
tokensCreatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {}),
|
|
2060
|
+
tokensUpdatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {}),
|
|
2061
|
+
tokensDeletedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {})
|
|
2062
|
+
});
|
|
2063
|
+
var SourceImportComponentSummary = z81.object({
|
|
2064
|
+
componentsCreated: zeroNumberByDefault(),
|
|
2065
|
+
componentsUpdated: zeroNumberByDefault(),
|
|
2066
|
+
componentsDeleted: zeroNumberByDefault(),
|
|
2067
|
+
componentAssetsCreated: zeroNumberByDefault(),
|
|
2068
|
+
componentAssetsUpdated: zeroNumberByDefault(),
|
|
2069
|
+
componentAssetsDeleted: zeroNumberByDefault()
|
|
2070
|
+
});
|
|
2071
|
+
var SourceImportFrameSummary = z81.object({
|
|
2072
|
+
assetsInFile: nullishToOptional(FileStructureStats.optional()),
|
|
2073
|
+
invalidReferencesCount: nullishToOptional(z81.number().optional())
|
|
2074
|
+
});
|
|
2075
|
+
var SourceImportSummary = z81.object({
|
|
2076
|
+
sourceId: nullishToOptional(z81.string()),
|
|
2077
|
+
brandId: nullishToOptional(z81.string()),
|
|
2078
|
+
versionId: nullishToOptional(z81.string()),
|
|
2079
|
+
error: nullishToOptional(z81.any()),
|
|
2080
|
+
isFailed: z81.boolean(),
|
|
2081
|
+
warnings: z81.array(ImportWarning).nullish().transform((v) => v ?? []),
|
|
2082
|
+
...SourceImportTokenSummary.shape,
|
|
2083
|
+
...SourceImportComponentSummary.shape,
|
|
2084
|
+
...FileStructureStats.shape
|
|
2085
|
+
});
|
|
2086
|
+
function zeroNumberByDefault() {
|
|
2087
|
+
return z81.number().nullish().transform((v) => v ?? 0);
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
// src/dsm/data-sources/data-source.ts
|
|
2091
|
+
var DataSourceRemoteType = z82.enum(["Figma", "TokenStudio", "FigmaVariablesPlugin"]);
|
|
2092
|
+
var DataSourceUploadRemoteSource = z82.enum(["TokenStudio", "FigmaVariablesPlugin", "Custom"]);
|
|
2093
|
+
var DataSourceFigmaState = z82.enum(["Active", "MissingIntegration", "MissingFileAccess", "MissingFileOwner"]);
|
|
2094
|
+
var DataSourceAutoImportMode = z82.enum(["Never", "Hourly"]);
|
|
2095
|
+
var DataSourceStats = z82.object({
|
|
2096
|
+
tokens: zeroNumberByDefault2(),
|
|
2097
|
+
components: zeroNumberByDefault2(),
|
|
2098
|
+
assets: zeroNumberByDefault2(),
|
|
2099
|
+
frames: zeroNumberByDefault2()
|
|
2100
|
+
});
|
|
2101
|
+
var DataSourceFigmaFileData = z82.object({
|
|
2102
|
+
lastUpdatedAt: z82.coerce.date()
|
|
2103
|
+
});
|
|
2104
|
+
var DataSourceFigmaFileVersionData = z82.object({
|
|
2105
|
+
id: z82.string(),
|
|
2106
|
+
label: z82.string().optional(),
|
|
2107
|
+
description: z82.string().optional(),
|
|
2108
|
+
createdAt: z82.coerce.date()
|
|
2109
|
+
});
|
|
2110
|
+
var DataSourceFigmaScope = z82.object({
|
|
2111
|
+
assets: z82.boolean(),
|
|
2112
|
+
components: z82.boolean(),
|
|
2113
|
+
documentationFrames: z82.boolean(),
|
|
2114
|
+
tokens: z82.boolean(),
|
|
2115
|
+
themePersistentId: z82.string().optional(),
|
|
2116
|
+
isUnpublishedContentFallbackEnabled: z82.boolean()
|
|
2117
|
+
});
|
|
2118
|
+
var DataSourceFigmaImportMetadata = z82.object({
|
|
2119
|
+
fileData: DataSourceFigmaFileData.optional(),
|
|
2120
|
+
importedPublishedVersion: DataSourceFigmaFileVersionData.optional()
|
|
2121
|
+
});
|
|
2122
|
+
var DataSourceFigmaRemote = z82.object({
|
|
2123
|
+
type: z82.literal(DataSourceRemoteType.Enum.Figma),
|
|
2124
|
+
fileId: z82.string(),
|
|
2125
|
+
preferredCredentialId: z82.string().optional(),
|
|
2126
|
+
ownerId: z82.string(),
|
|
2127
|
+
// todo remove or keep to reference who created data source
|
|
2128
|
+
ownerName: z82.string(),
|
|
2129
|
+
// todo probably remove
|
|
2130
|
+
scope: DataSourceFigmaScope,
|
|
2131
|
+
state: DataSourceFigmaState,
|
|
2132
|
+
requiresSync: z82.boolean().optional().transform((v) => v ?? false),
|
|
2133
|
+
lastImportMetadata: DataSourceFigmaImportMetadata.optional(),
|
|
2134
|
+
downloadChunkSize: z82.number().optional(),
|
|
2135
|
+
figmaRenderChunkSize: z82.number().optional(),
|
|
2136
|
+
maxFileDepth: z82.number().optional()
|
|
2137
|
+
});
|
|
2138
|
+
var DataSourceTokenStudioRemote = z82.object({
|
|
2139
|
+
type: z82.literal(DataSourceRemoteType.Enum.TokenStudio)
|
|
2140
|
+
});
|
|
2141
|
+
var DataSourceUploadImportMetadata = z82.record(z82.any());
|
|
2142
|
+
var DataSourceUploadRemote = z82.object({
|
|
2143
|
+
type: z82.literal(DataSourceRemoteType.Enum.FigmaVariablesPlugin),
|
|
2144
|
+
remoteId: z82.string(),
|
|
2145
|
+
remoteSourceType: DataSourceUploadRemoteSource,
|
|
2146
|
+
lastImportMetadata: DataSourceUploadImportMetadata.optional(),
|
|
2147
|
+
warnings: nullishToOptional(ImportWarning.array())
|
|
2148
|
+
});
|
|
2149
|
+
var DataSourceRemote = z82.discriminatedUnion("type", [
|
|
2150
|
+
DataSourceFigmaRemote,
|
|
2151
|
+
DataSourceUploadRemote,
|
|
2152
|
+
DataSourceTokenStudioRemote
|
|
2153
|
+
]);
|
|
2154
|
+
var DataSource = z82.object({
|
|
2155
|
+
id: z82.string(),
|
|
2156
|
+
name: z82.string(),
|
|
2157
|
+
thumbnailUrl: z82.string().optional(),
|
|
2158
|
+
createdAt: z82.coerce.date().optional(),
|
|
2159
|
+
lastImportedAt: z82.coerce.date().optional(),
|
|
2160
|
+
lastImportSummary: SourceImportSummary.optional(),
|
|
2161
|
+
designSystemId: z82.string(),
|
|
2162
|
+
brandPersistentId: z82.string(),
|
|
2163
|
+
autoImportMode: DataSourceAutoImportMode,
|
|
2164
|
+
stats: DataSourceStats,
|
|
2165
|
+
remote: DataSourceRemote,
|
|
2166
|
+
sortOrder: z82.number()
|
|
2167
|
+
});
|
|
2168
|
+
var DataSourceVersion = z82.object({
|
|
2169
|
+
id: z82.string(),
|
|
2170
|
+
createdAt: z82.coerce.date(),
|
|
2171
|
+
label: z82.string().nullish(),
|
|
2172
|
+
description: z82.string().nullish()
|
|
2173
|
+
});
|
|
2174
|
+
function zeroNumberByDefault2() {
|
|
2175
|
+
return z82.number().nullish().transform((v) => v ?? 0);
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
// src/dsm/data-sources/import-job.ts
|
|
2179
|
+
import { z as z83 } from "zod";
|
|
2180
|
+
var ImportJobState = z83.enum(["PendingInput", "Queued", "InProgress", "Failed", "Success"]);
|
|
2181
|
+
var ImportJobOperation = z83.enum(["Check", "Import"]);
|
|
2182
|
+
var ImportJob = Entity.extend({
|
|
2183
|
+
designSystemId: z83.string(),
|
|
2184
|
+
designSystemVersionId: z83.string(),
|
|
2185
|
+
sourceIds: z83.array(z83.string()),
|
|
2186
|
+
state: ImportJobState,
|
|
2187
|
+
createdByUserId: z83.string().optional(),
|
|
2188
|
+
importContextId: z83.string(),
|
|
2189
|
+
error: z83.string().optional(),
|
|
2190
|
+
sourceType: DataSourceRemoteType,
|
|
2191
|
+
importContextCleanedUp: z83.boolean()
|
|
2192
|
+
});
|
|
2193
|
+
|
|
2194
|
+
// src/dsm/import/support/import-context.ts
|
|
2195
|
+
var ImportFunctionInput = z84.object({
|
|
2196
|
+
importJobId: z84.string(),
|
|
2197
|
+
importContextId: z84.string(),
|
|
2198
|
+
designSystemId: z84.string().optional()
|
|
2199
|
+
});
|
|
2200
|
+
var ImportedFigmaSourceData = z84.object({
|
|
2201
|
+
sourceId: z84.string(),
|
|
2202
|
+
figmaRemote: DataSourceFigmaRemote
|
|
2203
|
+
});
|
|
2204
|
+
var FigmaImportBaseContext = z84.object({
|
|
2205
|
+
designSystemId: z84.string(),
|
|
2206
|
+
/**
|
|
2207
|
+
* Data required for accessing Figma files. This should contain access data for all file ids
|
|
2208
|
+
* mentioned in the `importedSourceDataBySourceId`
|
|
2209
|
+
*
|
|
2210
|
+
* fileId: file data
|
|
2211
|
+
*/
|
|
2212
|
+
fileAccessByFileId: z84.record(FigmaFileAccessData),
|
|
2213
|
+
/**
|
|
2214
|
+
* Figma source data for which import was requested
|
|
2215
|
+
*
|
|
2216
|
+
* sourceId: source data
|
|
2217
|
+
*/
|
|
2218
|
+
importedSourceDataBySourceId: z84.record(ImportedFigmaSourceData),
|
|
2219
|
+
/**
|
|
2220
|
+
* Array of warnings that will be written into the import result summary at the end
|
|
2221
|
+
* of import job execution and displayed by the client.
|
|
2222
|
+
*/
|
|
2223
|
+
importWarnings: z84.record(ImportWarning.array()).default({})
|
|
2224
|
+
});
|
|
2225
|
+
var FigmaImportContextWithSourcesState = FigmaImportBaseContext.extend({
|
|
2226
|
+
sourcesWithMissingAccess: z84.array(z84.string()).default([]),
|
|
2227
|
+
shadowOpacityOptional: z84.boolean().default(false)
|
|
2228
|
+
});
|
|
2229
|
+
var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
|
|
2230
|
+
importMetadata: DataSourceFigmaImportMetadata
|
|
2231
|
+
});
|
|
2232
|
+
var FigmaImportContextWithDownloadScopes = FigmaImportContextWithSourcesState.extend({
|
|
2233
|
+
/**
|
|
2234
|
+
* Describes what to download from each file, this should contain all file id mentioned in
|
|
2235
|
+
* importMetadataBySourceId.
|
|
2236
|
+
*
|
|
2237
|
+
* File id -> file download scope
|
|
2238
|
+
*/
|
|
2239
|
+
fileDownloadScopesByFileId: z84.record(FigmaFileDownloadScope),
|
|
2240
|
+
/**
|
|
2241
|
+
* Sources filtered down to the ones that have changed since last import and therefore need to be
|
|
2242
|
+
* imported again.
|
|
2243
|
+
*
|
|
2244
|
+
* Source id -> import metadata
|
|
2245
|
+
*/
|
|
2246
|
+
changedImportedSourceDataBySourceId: z84.record(ChangedImportedFigmaSourceData)
|
|
2247
|
+
});
|
|
2248
|
+
|
|
2249
|
+
// src/dsm/import/support/import-model-collections.ts
|
|
2250
|
+
import { z as z92 } from "zod";
|
|
2251
|
+
|
|
2252
|
+
// src/dsm/import/image.ts
|
|
2253
|
+
import { z as z85 } from "zod";
|
|
2254
|
+
var ImageImportModelType = z85.enum(["Url", "FigmaRender"]);
|
|
2255
|
+
var ImageImportModelBase = z85.object({
|
|
2256
|
+
scope: AssetScope
|
|
2257
|
+
});
|
|
2258
|
+
var UrlImageImportModel = ImageImportModelBase.extend({
|
|
2259
|
+
type: z85.literal(ImageImportModelType.enum.Url),
|
|
2260
|
+
url: z85.string(),
|
|
2261
|
+
originKey: z85.string(),
|
|
2262
|
+
extension: z85.string()
|
|
2263
|
+
});
|
|
2264
|
+
var FigmaRenderFormat = z85.enum(["Svg", "Png", "Pdf"]);
|
|
2265
|
+
var FigmaRenderBase = ImageImportModelBase.extend({
|
|
2266
|
+
type: z85.literal(ImageImportModelType.enum.FigmaRender),
|
|
2267
|
+
fileId: z85.string(),
|
|
2268
|
+
fileVersionId: z85.string().optional(),
|
|
2269
|
+
nodeId: z85.string(),
|
|
2270
|
+
originKey: z85.string()
|
|
2271
|
+
});
|
|
2272
|
+
var FigmaPngRenderImportModel = FigmaRenderBase.extend({
|
|
2273
|
+
format: z85.literal(FigmaRenderFormat.enum.Png),
|
|
2274
|
+
scale: z85.number()
|
|
2275
|
+
});
|
|
2276
|
+
var FigmaSvgRenderImportModel = FigmaRenderBase.extend({
|
|
2277
|
+
format: z85.literal(FigmaRenderFormat.enum.Svg)
|
|
2278
|
+
});
|
|
2279
|
+
var FigmaRenderImportModel = z85.discriminatedUnion("format", [
|
|
2280
|
+
FigmaPngRenderImportModel,
|
|
2281
|
+
FigmaSvgRenderImportModel
|
|
2282
|
+
]);
|
|
2283
|
+
var ImageImportModel = z85.union([UrlImageImportModel, FigmaRenderImportModel]);
|
|
2284
|
+
function getFigmaRenderFormatFileExtension(format) {
|
|
2285
|
+
switch (format) {
|
|
2286
|
+
case "Pdf":
|
|
2287
|
+
return "pdf";
|
|
2288
|
+
case "Png":
|
|
2289
|
+
return "png";
|
|
2290
|
+
case "Svg":
|
|
2291
|
+
return "svg";
|
|
2292
|
+
}
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2129
2295
|
// src/dsm/import/component.ts
|
|
2130
|
-
import { z as
|
|
2296
|
+
import { z as z87 } from "zod";
|
|
2131
2297
|
|
|
2132
2298
|
// src/dsm/import/base.ts
|
|
2133
|
-
import { z as
|
|
2134
|
-
var ImportModelBase =
|
|
2135
|
-
id:
|
|
2299
|
+
import { z as z86 } from "zod";
|
|
2300
|
+
var ImportModelBase = z86.object({
|
|
2301
|
+
id: z86.string(),
|
|
2136
2302
|
meta: ObjectMeta,
|
|
2137
2303
|
origin: DesignElementOrigin,
|
|
2138
|
-
brandPersistentId:
|
|
2139
|
-
sortOrder:
|
|
2304
|
+
brandPersistentId: z86.string(),
|
|
2305
|
+
sortOrder: z86.number()
|
|
2140
2306
|
});
|
|
2141
2307
|
var ImportModelInputBase = ImportModelBase.omit({
|
|
2142
2308
|
brandPersistentId: true,
|
|
2143
2309
|
origin: true,
|
|
2144
2310
|
sortOrder: true
|
|
2145
2311
|
}).extend({
|
|
2146
|
-
originId:
|
|
2147
|
-
originMetadata:
|
|
2312
|
+
originId: z86.string(),
|
|
2313
|
+
originMetadata: z86.record(z86.any())
|
|
2148
2314
|
});
|
|
2149
2315
|
|
|
2150
2316
|
// src/dsm/import/component.ts
|
|
2151
|
-
var ComponentImportModelPart =
|
|
2317
|
+
var ComponentImportModelPart = z87.object({
|
|
2152
2318
|
thumbnail: ImageImportModel
|
|
2153
2319
|
});
|
|
2154
2320
|
var ComponentImportModel = ImportModelBase.extend(ComponentImportModelPart.shape).extend({
|
|
2155
|
-
isAsset:
|
|
2321
|
+
isAsset: z87.boolean(),
|
|
2156
2322
|
svg: FigmaSvgRenderImportModel.optional(),
|
|
2157
2323
|
origin: ComponentOrigin
|
|
2158
2324
|
});
|
|
@@ -2165,50 +2331,50 @@ var AssetImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart
|
|
|
2165
2331
|
});
|
|
2166
2332
|
|
|
2167
2333
|
// src/dsm/import/theme.ts
|
|
2168
|
-
import { z as
|
|
2334
|
+
import { z as z88 } from "zod";
|
|
2169
2335
|
var ThemeOverrideImportModelBase = DesignTokenTypedData.and(
|
|
2170
|
-
|
|
2171
|
-
id:
|
|
2336
|
+
z88.object({
|
|
2337
|
+
id: z88.string(),
|
|
2172
2338
|
meta: ObjectMeta
|
|
2173
2339
|
})
|
|
2174
2340
|
);
|
|
2175
2341
|
var ThemeOverrideImportModel = ThemeOverrideImportModelBase.and(
|
|
2176
|
-
|
|
2342
|
+
z88.object({
|
|
2177
2343
|
origin: ThemeOverrideOrigin
|
|
2178
2344
|
})
|
|
2179
2345
|
);
|
|
2180
2346
|
var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
|
|
2181
|
-
|
|
2182
|
-
originId:
|
|
2347
|
+
z88.object({
|
|
2348
|
+
originId: z88.string(),
|
|
2183
2349
|
originMetadata: ThemeOverrideOriginPart
|
|
2184
2350
|
})
|
|
2185
2351
|
);
|
|
2186
|
-
var ThemeImportModel =
|
|
2352
|
+
var ThemeImportModel = z88.object({
|
|
2187
2353
|
meta: ObjectMeta,
|
|
2188
|
-
brandPersistentId:
|
|
2354
|
+
brandPersistentId: z88.string(),
|
|
2189
2355
|
originSource: ThemeOriginSource,
|
|
2190
|
-
overrides:
|
|
2191
|
-
sortOrder:
|
|
2356
|
+
overrides: z88.array(ThemeOverrideImportModel),
|
|
2357
|
+
sortOrder: z88.number()
|
|
2192
2358
|
});
|
|
2193
|
-
var ThemeImportModelInput =
|
|
2359
|
+
var ThemeImportModelInput = z88.object({
|
|
2194
2360
|
meta: ObjectMeta,
|
|
2195
|
-
originObjects:
|
|
2196
|
-
overrides:
|
|
2361
|
+
originObjects: z88.array(ThemeOriginObject),
|
|
2362
|
+
overrides: z88.array(ThemeOverrideImportModelInput)
|
|
2197
2363
|
});
|
|
2198
|
-
var ThemeUpdateImportModel =
|
|
2199
|
-
themePersistentId:
|
|
2200
|
-
overrides:
|
|
2364
|
+
var ThemeUpdateImportModel = z88.object({
|
|
2365
|
+
themePersistentId: z88.string(),
|
|
2366
|
+
overrides: z88.array(ThemeOverrideImportModel)
|
|
2201
2367
|
});
|
|
2202
|
-
var ThemeUpdateImportModelInput =
|
|
2203
|
-
themePersistentId:
|
|
2204
|
-
overrides:
|
|
2368
|
+
var ThemeUpdateImportModelInput = z88.object({
|
|
2369
|
+
themePersistentId: z88.string(),
|
|
2370
|
+
overrides: z88.array(ThemeOverrideImportModelInput)
|
|
2205
2371
|
});
|
|
2206
2372
|
|
|
2207
2373
|
// src/dsm/import/tokens.ts
|
|
2208
|
-
import { z as
|
|
2209
|
-
var DesignTokenImportModelPart =
|
|
2210
|
-
collection:
|
|
2211
|
-
codeSyntax:
|
|
2374
|
+
import { z as z89 } from "zod";
|
|
2375
|
+
var DesignTokenImportModelPart = z89.object({
|
|
2376
|
+
collection: z89.string().optional(),
|
|
2377
|
+
codeSyntax: z89.record(z89.coerce.string()).optional()
|
|
2212
2378
|
});
|
|
2213
2379
|
var DesignTokenImportModelBase = ImportModelBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
2214
2380
|
origin: DesignTokenOrigin
|
|
@@ -2226,15 +2392,15 @@ function designTokenImportModelTypeFilter(type) {
|
|
|
2226
2392
|
}
|
|
2227
2393
|
|
|
2228
2394
|
// src/dsm/import/figma-frames.ts
|
|
2229
|
-
import { z as
|
|
2395
|
+
import { z as z90 } from "zod";
|
|
2230
2396
|
var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
|
|
2231
2397
|
image: FigmaPngRenderImportModel
|
|
2232
2398
|
});
|
|
2233
2399
|
var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
|
|
2234
|
-
children:
|
|
2400
|
+
children: z90.lazy(() => FigmaFileStructureNodeImportModel.array())
|
|
2235
2401
|
});
|
|
2236
|
-
var FigmaFileStructureImportModelPart =
|
|
2237
|
-
data:
|
|
2402
|
+
var FigmaFileStructureImportModelPart = z90.object({
|
|
2403
|
+
data: z90.object({
|
|
2238
2404
|
rootNode: FigmaFileStructureNodeImportModel,
|
|
2239
2405
|
assetsInFile: FigmaFileStructureStatistics
|
|
2240
2406
|
})
|
|
@@ -2245,7 +2411,7 @@ var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImp
|
|
|
2245
2411
|
var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
|
|
2246
2412
|
FigmaFileStructureImportModelPart.shape
|
|
2247
2413
|
).extend({
|
|
2248
|
-
fileVersionId:
|
|
2414
|
+
fileVersionId: z90.string()
|
|
2249
2415
|
});
|
|
2250
2416
|
function figmaFileStructureImportModelToMap(root) {
|
|
2251
2417
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -2259,237 +2425,101 @@ function recursiveFigmaFileStructureToMap2(node, map) {
|
|
|
2259
2425
|
}
|
|
2260
2426
|
|
|
2261
2427
|
// src/dsm/import/data-source.ts
|
|
2262
|
-
import { z as
|
|
2263
|
-
var DataSourceImportModel =
|
|
2264
|
-
id:
|
|
2265
|
-
fileName:
|
|
2266
|
-
thumbnailUrl:
|
|
2428
|
+
import { z as z91 } from "zod";
|
|
2429
|
+
var DataSourceImportModel = z91.object({
|
|
2430
|
+
id: z91.string(),
|
|
2431
|
+
fileName: z91.string().optional(),
|
|
2432
|
+
thumbnailUrl: z91.string().optional()
|
|
2267
2433
|
});
|
|
2268
2434
|
|
|
2269
2435
|
// src/dsm/import/support/import-model-collections.ts
|
|
2270
|
-
var ImportModelInputCollection =
|
|
2436
|
+
var ImportModelInputCollection = z92.object({
|
|
2271
2437
|
source: DataSourceImportModel,
|
|
2272
|
-
tokens:
|
|
2273
|
-
components:
|
|
2274
|
-
assets:
|
|
2275
|
-
themeUpdates:
|
|
2276
|
-
themes:
|
|
2438
|
+
tokens: z92.array(DesignTokenImportModelInput).default([]),
|
|
2439
|
+
components: z92.array(ComponentImportModelInput).default([]),
|
|
2440
|
+
assets: z92.array(AssetImportModelInput).default([]),
|
|
2441
|
+
themeUpdates: z92.array(ThemeUpdateImportModelInput).default([]),
|
|
2442
|
+
themes: z92.array(ThemeImportModelInput).default([]),
|
|
2277
2443
|
figmaFileStructure: FigmaFileStructureImportModelInput.optional()
|
|
2278
2444
|
});
|
|
2279
|
-
var ImportModelCollection =
|
|
2280
|
-
sources:
|
|
2281
|
-
tokens:
|
|
2282
|
-
components:
|
|
2283
|
-
themeUpdates:
|
|
2284
|
-
themes:
|
|
2285
|
-
figmaFileStructures:
|
|
2445
|
+
var ImportModelCollection = z92.object({
|
|
2446
|
+
sources: z92.array(DataSourceImportModel),
|
|
2447
|
+
tokens: z92.array(DesignTokenImportModel).default([]),
|
|
2448
|
+
components: z92.array(ComponentImportModel).default([]),
|
|
2449
|
+
themeUpdates: z92.array(ThemeUpdateImportModel).default([]),
|
|
2450
|
+
themes: z92.array(ThemeImportModel).default([]),
|
|
2451
|
+
figmaFileStructures: z92.array(FigmaFileStructureImportModel)
|
|
2286
2452
|
});
|
|
2287
2453
|
function addImportModelCollections(lhs, rhs) {
|
|
2288
|
-
return {
|
|
2289
|
-
sources: [...lhs.sources, ...rhs.sources],
|
|
2290
|
-
tokens: [...lhs.tokens, ...rhs.tokens],
|
|
2291
|
-
components: [...lhs.components, ...rhs.components],
|
|
2292
|
-
themeUpdates: [...lhs.themeUpdates, ...rhs.themeUpdates],
|
|
2293
|
-
themes: [...lhs.themes, ...rhs.themes],
|
|
2294
|
-
figmaFileStructures: [...lhs.figmaFileStructures, ...rhs.figmaFileStructures]
|
|
2295
|
-
};
|
|
2296
|
-
}
|
|
2297
|
-
|
|
2298
|
-
// src/dsm/data-sources/import-summary.ts
|
|
2299
|
-
import { z as z90 } from "zod";
|
|
2300
|
-
var FileStructureStats = z90.object({
|
|
2301
|
-
frames: zeroNumberByDefault(),
|
|
2302
|
-
components: zeroNumberByDefault(),
|
|
2303
|
-
componentSets: zeroNumberByDefault()
|
|
2304
|
-
});
|
|
2305
|
-
var SourceImportSummaryByTokenTypeKey = DesignTokenType.or(
|
|
2306
|
-
// Backward compatibility
|
|
2307
|
-
z90.enum(["Measure", "Radius", "GenericToken", "Font", "Text"])
|
|
2308
|
-
);
|
|
2309
|
-
var SourceImportSummaryByTokenType = z90.record(SourceImportSummaryByTokenTypeKey, z90.number());
|
|
2310
|
-
var SourceImportTokenSummary = z90.object({
|
|
2311
|
-
tokensCreated: zeroNumberByDefault(),
|
|
2312
|
-
tokensUpdated: zeroNumberByDefault(),
|
|
2313
|
-
tokensDeleted: zeroNumberByDefault(),
|
|
2314
|
-
tokensCreatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {}),
|
|
2315
|
-
tokensUpdatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {}),
|
|
2316
|
-
tokensDeletedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {})
|
|
2317
|
-
});
|
|
2318
|
-
var SourceImportComponentSummary = z90.object({
|
|
2319
|
-
componentsCreated: zeroNumberByDefault(),
|
|
2320
|
-
componentsUpdated: zeroNumberByDefault(),
|
|
2321
|
-
componentsDeleted: zeroNumberByDefault(),
|
|
2322
|
-
componentAssetsCreated: zeroNumberByDefault(),
|
|
2323
|
-
componentAssetsUpdated: zeroNumberByDefault(),
|
|
2324
|
-
componentAssetsDeleted: zeroNumberByDefault()
|
|
2325
|
-
});
|
|
2326
|
-
var SourceImportFrameSummary = z90.object({
|
|
2327
|
-
assetsInFile: nullishToOptional(FileStructureStats.optional()),
|
|
2328
|
-
invalidReferencesCount: nullishToOptional(z90.number().optional())
|
|
2329
|
-
});
|
|
2330
|
-
var SourceImportSummary = z90.object({
|
|
2331
|
-
sourceId: nullishToOptional(z90.string()),
|
|
2332
|
-
brandId: nullishToOptional(z90.string()),
|
|
2333
|
-
versionId: nullishToOptional(z90.string()),
|
|
2334
|
-
error: nullishToOptional(z90.any()),
|
|
2335
|
-
isFailed: z90.boolean(),
|
|
2336
|
-
warnings: z90.array(ImportWarning).nullish().transform((v) => v ?? []),
|
|
2337
|
-
...SourceImportTokenSummary.shape,
|
|
2338
|
-
...SourceImportComponentSummary.shape,
|
|
2339
|
-
...FileStructureStats.shape
|
|
2340
|
-
});
|
|
2341
|
-
function zeroNumberByDefault() {
|
|
2342
|
-
return z90.number().nullish().transform((v) => v ?? 0);
|
|
2343
|
-
}
|
|
2344
|
-
|
|
2345
|
-
// src/dsm/data-sources/data-source.ts
|
|
2346
|
-
var DataSourceRemoteType = z91.enum(["Figma", "TokenStudio", "FigmaVariablesPlugin"]);
|
|
2347
|
-
var DataSourceUploadRemoteSource = z91.enum(["TokenStudio", "FigmaVariablesPlugin", "Custom"]);
|
|
2348
|
-
var DataSourceFigmaState = z91.enum(["Active", "MissingIntegration", "MissingFileAccess", "MissingFileOwner"]);
|
|
2349
|
-
var DataSourceAutoImportMode = z91.enum(["Never", "Hourly"]);
|
|
2350
|
-
var DataSourceStats = z91.object({
|
|
2351
|
-
tokens: zeroNumberByDefault2(),
|
|
2352
|
-
components: zeroNumberByDefault2(),
|
|
2353
|
-
assets: zeroNumberByDefault2(),
|
|
2354
|
-
frames: zeroNumberByDefault2()
|
|
2355
|
-
});
|
|
2356
|
-
var DataSourceFigmaFileData = z91.object({
|
|
2357
|
-
lastUpdatedAt: z91.coerce.date()
|
|
2358
|
-
});
|
|
2359
|
-
var DataSourceFigmaFileVersionData = z91.object({
|
|
2360
|
-
id: z91.string(),
|
|
2361
|
-
label: z91.string().optional(),
|
|
2362
|
-
description: z91.string().optional(),
|
|
2363
|
-
createdAt: z91.coerce.date()
|
|
2364
|
-
});
|
|
2365
|
-
var DataSourceFigmaScope = z91.object({
|
|
2366
|
-
assets: z91.boolean(),
|
|
2367
|
-
components: z91.boolean(),
|
|
2368
|
-
documentationFrames: z91.boolean(),
|
|
2369
|
-
tokens: z91.boolean(),
|
|
2370
|
-
themePersistentId: z91.string().optional(),
|
|
2371
|
-
isUnpublishedContentFallbackEnabled: z91.boolean()
|
|
2372
|
-
});
|
|
2373
|
-
var DataSourceFigmaImportMetadata = z91.object({
|
|
2374
|
-
fileData: DataSourceFigmaFileData.optional(),
|
|
2375
|
-
importedPublishedVersion: DataSourceFigmaFileVersionData.optional()
|
|
2376
|
-
});
|
|
2377
|
-
var DataSourceFigmaRemote = z91.object({
|
|
2378
|
-
type: z91.literal(DataSourceRemoteType.Enum.Figma),
|
|
2379
|
-
fileId: z91.string(),
|
|
2380
|
-
preferredCredentialId: z91.string().optional(),
|
|
2381
|
-
ownerId: z91.string(),
|
|
2382
|
-
// todo remove or keep to reference who created data source
|
|
2383
|
-
ownerName: z91.string(),
|
|
2384
|
-
// todo probably remove
|
|
2385
|
-
scope: DataSourceFigmaScope,
|
|
2386
|
-
state: DataSourceFigmaState,
|
|
2387
|
-
requiresSync: z91.boolean().optional().transform((v) => v ?? false),
|
|
2388
|
-
lastImportMetadata: DataSourceFigmaImportMetadata.optional(),
|
|
2389
|
-
downloadChunkSize: z91.number().optional(),
|
|
2390
|
-
figmaRenderChunkSize: z91.number().optional(),
|
|
2391
|
-
maxFileDepth: z91.number().optional()
|
|
2392
|
-
});
|
|
2393
|
-
var DataSourceTokenStudioRemote = z91.object({
|
|
2394
|
-
type: z91.literal(DataSourceRemoteType.Enum.TokenStudio)
|
|
2395
|
-
});
|
|
2396
|
-
var DataSourceUploadImportMetadata = z91.record(z91.any());
|
|
2397
|
-
var DataSourceUploadRemote = z91.object({
|
|
2398
|
-
type: z91.literal(DataSourceRemoteType.Enum.FigmaVariablesPlugin),
|
|
2399
|
-
remoteId: z91.string(),
|
|
2400
|
-
remoteSourceType: DataSourceUploadRemoteSource,
|
|
2401
|
-
lastImportMetadata: DataSourceUploadImportMetadata.optional(),
|
|
2402
|
-
warnings: nullishToOptional(ImportWarning.array())
|
|
2403
|
-
});
|
|
2404
|
-
var DataSourceRemote = z91.discriminatedUnion("type", [
|
|
2405
|
-
DataSourceFigmaRemote,
|
|
2406
|
-
DataSourceUploadRemote,
|
|
2407
|
-
DataSourceTokenStudioRemote
|
|
2408
|
-
]);
|
|
2409
|
-
var DataSource = z91.object({
|
|
2410
|
-
id: z91.string(),
|
|
2411
|
-
name: z91.string(),
|
|
2412
|
-
thumbnailUrl: z91.string().optional(),
|
|
2413
|
-
createdAt: z91.coerce.date().optional(),
|
|
2414
|
-
lastImportedAt: z91.coerce.date().optional(),
|
|
2415
|
-
lastImportSummary: SourceImportSummary.optional(),
|
|
2416
|
-
designSystemId: z91.string(),
|
|
2417
|
-
brandPersistentId: z91.string(),
|
|
2418
|
-
autoImportMode: DataSourceAutoImportMode,
|
|
2419
|
-
stats: DataSourceStats,
|
|
2420
|
-
remote: DataSourceRemote,
|
|
2421
|
-
sortOrder: z91.number()
|
|
2422
|
-
});
|
|
2423
|
-
var DataSourceVersion = z91.object({
|
|
2424
|
-
id: z91.string(),
|
|
2425
|
-
createdAt: z91.coerce.date(),
|
|
2426
|
-
label: z91.string().nullish(),
|
|
2427
|
-
description: z91.string().nullish()
|
|
2428
|
-
});
|
|
2429
|
-
function zeroNumberByDefault2() {
|
|
2430
|
-
return z91.number().nullish().transform((v) => v ?? 0);
|
|
2454
|
+
return {
|
|
2455
|
+
sources: [...lhs.sources, ...rhs.sources],
|
|
2456
|
+
tokens: [...lhs.tokens, ...rhs.tokens],
|
|
2457
|
+
components: [...lhs.components, ...rhs.components],
|
|
2458
|
+
themeUpdates: [...lhs.themeUpdates, ...rhs.themeUpdates],
|
|
2459
|
+
themes: [...lhs.themes, ...rhs.themes],
|
|
2460
|
+
figmaFileStructures: [...lhs.figmaFileStructures, ...rhs.figmaFileStructures]
|
|
2461
|
+
};
|
|
2431
2462
|
}
|
|
2432
2463
|
|
|
2433
|
-
// src/dsm/
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
importContextCleanedUp: z92.boolean()
|
|
2464
|
+
// src/dsm/components/asset-rendering.ts
|
|
2465
|
+
var AssetRenderConfiguration = z93.object({
|
|
2466
|
+
prefix: z93.string().optional(),
|
|
2467
|
+
suffix: z93.string().optional(),
|
|
2468
|
+
scale: z93.number(),
|
|
2469
|
+
format: FigmaRenderFormat
|
|
2470
|
+
});
|
|
2471
|
+
var RenderedAssetFile = z93.object({
|
|
2472
|
+
assetPersistentId: z93.string(),
|
|
2473
|
+
assetName: z93.string(),
|
|
2474
|
+
renderedImageFileName: z93.string(),
|
|
2475
|
+
renderedImageUrl: z93.string(),
|
|
2476
|
+
settings: AssetRenderConfiguration
|
|
2447
2477
|
});
|
|
2448
2478
|
|
|
2449
2479
|
// src/dsm/documentation/block-definitions/aux.ts
|
|
2450
|
-
import { z as
|
|
2451
|
-
var PageBlockDefinitionAppearance =
|
|
2452
|
-
isBordered:
|
|
2453
|
-
hasBackground:
|
|
2454
|
-
isEditorPresentationDifferent:
|
|
2455
|
-
showBlockHeaderInEditor:
|
|
2480
|
+
import { z as z94 } from "zod";
|
|
2481
|
+
var PageBlockDefinitionAppearance = z94.object({
|
|
2482
|
+
isBordered: z94.boolean().optional(),
|
|
2483
|
+
hasBackground: z94.boolean().optional(),
|
|
2484
|
+
isEditorPresentationDifferent: z94.boolean().optional(),
|
|
2485
|
+
showBlockHeaderInEditor: z94.boolean().optional()
|
|
2456
2486
|
});
|
|
2457
2487
|
|
|
2458
2488
|
// src/dsm/documentation/block-definitions/definition.ts
|
|
2459
|
-
import { z as
|
|
2489
|
+
import { z as z97 } from "zod";
|
|
2460
2490
|
|
|
2461
2491
|
// src/dsm/documentation/block-definitions/item.ts
|
|
2462
|
-
import { z as
|
|
2492
|
+
import { z as z96 } from "zod";
|
|
2463
2493
|
|
|
2464
2494
|
// src/dsm/documentation/block-definitions/variant.ts
|
|
2465
|
-
import { z as
|
|
2466
|
-
var PageBlockDefinitionLayoutType =
|
|
2467
|
-
var PageBlockDefinitionLayoutGap =
|
|
2468
|
-
var PageBlockDefinitionLayoutAlign =
|
|
2469
|
-
var PageBlockDefinitionLayoutResizing =
|
|
2470
|
-
var PageBlockDefinitionLayoutBase =
|
|
2495
|
+
import { z as z95 } from "zod";
|
|
2496
|
+
var PageBlockDefinitionLayoutType = z95.enum(["Column", "Row"]);
|
|
2497
|
+
var PageBlockDefinitionLayoutGap = z95.enum(["Small", "Medium", "Large", "None"]);
|
|
2498
|
+
var PageBlockDefinitionLayoutAlign = z95.enum(["Start", "Center", "End"]);
|
|
2499
|
+
var PageBlockDefinitionLayoutResizing = z95.enum(["Fill", "Hug"]);
|
|
2500
|
+
var PageBlockDefinitionLayoutBase = z95.object({
|
|
2471
2501
|
type: PageBlockDefinitionLayoutType,
|
|
2472
2502
|
gap: PageBlockDefinitionLayoutGap.optional(),
|
|
2473
2503
|
columnAlign: PageBlockDefinitionLayoutAlign.optional(),
|
|
2474
2504
|
columnResizing: PageBlockDefinitionLayoutResizing.optional()
|
|
2475
2505
|
});
|
|
2476
2506
|
var PageBlockDefinitionLayout = PageBlockDefinitionLayoutBase.extend({
|
|
2477
|
-
children:
|
|
2478
|
-
});
|
|
2479
|
-
var PageBlockDefinitionVariant =
|
|
2480
|
-
id:
|
|
2481
|
-
name:
|
|
2482
|
-
image:
|
|
2483
|
-
description:
|
|
2484
|
-
documentationLink:
|
|
2507
|
+
children: z95.lazy(() => z95.array(PageBlockDefinitionLayout.or(z95.string())))
|
|
2508
|
+
});
|
|
2509
|
+
var PageBlockDefinitionVariant = z95.object({
|
|
2510
|
+
id: z95.string(),
|
|
2511
|
+
name: z95.string(),
|
|
2512
|
+
image: z95.string().optional(),
|
|
2513
|
+
description: z95.string().optional(),
|
|
2514
|
+
documentationLink: z95.string().optional(),
|
|
2485
2515
|
layout: PageBlockDefinitionLayout,
|
|
2486
|
-
maxColumns:
|
|
2487
|
-
defaultColumns:
|
|
2516
|
+
maxColumns: z95.number().optional(),
|
|
2517
|
+
defaultColumns: z95.number().optional(),
|
|
2488
2518
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
2489
2519
|
});
|
|
2490
2520
|
|
|
2491
2521
|
// src/dsm/documentation/block-definitions/item.ts
|
|
2492
|
-
var PageBlockDefinitionPropertyType =
|
|
2522
|
+
var PageBlockDefinitionPropertyType = z96.enum([
|
|
2493
2523
|
"RichText",
|
|
2494
2524
|
"MultiRichText",
|
|
2495
2525
|
"Text",
|
|
@@ -2517,7 +2547,7 @@ var PageBlockDefinitionPropertyType = z95.enum([
|
|
|
2517
2547
|
"Color",
|
|
2518
2548
|
"FigmaComponent"
|
|
2519
2549
|
]);
|
|
2520
|
-
var PageBlockDefinitionRichTextPropertyStyle =
|
|
2550
|
+
var PageBlockDefinitionRichTextPropertyStyle = z96.enum([
|
|
2521
2551
|
"Title1",
|
|
2522
2552
|
"Title2",
|
|
2523
2553
|
"Title3",
|
|
@@ -2527,8 +2557,8 @@ var PageBlockDefinitionRichTextPropertyStyle = z95.enum([
|
|
|
2527
2557
|
"Callout",
|
|
2528
2558
|
"Default"
|
|
2529
2559
|
]);
|
|
2530
|
-
var PageBlockDefinitionMultiRichTextPropertyStyle =
|
|
2531
|
-
var PageBlockDefinitionTextPropertyStyle =
|
|
2560
|
+
var PageBlockDefinitionMultiRichTextPropertyStyle = z96.enum(["OL", "UL", "Default"]);
|
|
2561
|
+
var PageBlockDefinitionTextPropertyStyle = z96.enum([
|
|
2532
2562
|
"Title1",
|
|
2533
2563
|
"Title2",
|
|
2534
2564
|
"Title3",
|
|
@@ -2542,15 +2572,15 @@ var PageBlockDefinitionTextPropertyStyle = z95.enum([
|
|
|
2542
2572
|
"SmallSemibold",
|
|
2543
2573
|
"Custom"
|
|
2544
2574
|
]);
|
|
2545
|
-
var PageBlockDefinitionTextPropertyColor =
|
|
2546
|
-
var PageBlockDefinitionBooleanPropertyStyle =
|
|
2547
|
-
var PageBlockDefinitionSingleSelectPropertyStyle =
|
|
2575
|
+
var PageBlockDefinitionTextPropertyColor = z96.enum(["Neutral", "NeutralFaded"]);
|
|
2576
|
+
var PageBlockDefinitionBooleanPropertyStyle = z96.enum(["SegmentedControl", "ToggleButton", "Checkbox"]);
|
|
2577
|
+
var PageBlockDefinitionSingleSelectPropertyStyle = z96.enum([
|
|
2548
2578
|
"SegmentedControl",
|
|
2549
2579
|
"ToggleButton",
|
|
2550
2580
|
"Select",
|
|
2551
2581
|
"Checkbox"
|
|
2552
2582
|
]);
|
|
2553
|
-
var PageBlockDefinitionSingleSelectPropertyColor =
|
|
2583
|
+
var PageBlockDefinitionSingleSelectPropertyColor = z96.enum([
|
|
2554
2584
|
"Green",
|
|
2555
2585
|
"Red",
|
|
2556
2586
|
"Yellow",
|
|
@@ -2565,78 +2595,78 @@ var PageBlockDefinitionSingleSelectPropertyColor = z95.enum([
|
|
|
2565
2595
|
"Cyan",
|
|
2566
2596
|
"Fuchsia"
|
|
2567
2597
|
]);
|
|
2568
|
-
var IconSet =
|
|
2598
|
+
var IconSet = z96.enum([
|
|
2569
2599
|
"CheckCircle",
|
|
2570
2600
|
"CrossCircle",
|
|
2571
2601
|
"Alert"
|
|
2572
2602
|
]);
|
|
2573
|
-
var PageBlockDefinitionMultiSelectPropertyStyle =
|
|
2574
|
-
var PageBlockDefinitionImageAspectRatio =
|
|
2575
|
-
var PageBlockDefinitionImageWidth =
|
|
2576
|
-
var PageBlockDefinitionSelectChoice =
|
|
2577
|
-
value:
|
|
2578
|
-
name:
|
|
2603
|
+
var PageBlockDefinitionMultiSelectPropertyStyle = z96.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
2604
|
+
var PageBlockDefinitionImageAspectRatio = z96.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
|
|
2605
|
+
var PageBlockDefinitionImageWidth = z96.enum(["Full", "Icon", "Small", "Medium", "Large", "Poster"]);
|
|
2606
|
+
var PageBlockDefinitionSelectChoice = z96.object({
|
|
2607
|
+
value: z96.string(),
|
|
2608
|
+
name: z96.string(),
|
|
2579
2609
|
icon: IconSet.optional(),
|
|
2580
|
-
customIconUrl:
|
|
2610
|
+
customIconUrl: z96.string().optional(),
|
|
2581
2611
|
color: PageBlockDefinitionSingleSelectPropertyColor.optional()
|
|
2582
2612
|
});
|
|
2583
|
-
var PageBlockDefinitionUntypedPropertyOptions =
|
|
2584
|
-
var PageBlockDefinitionRichTextOptions =
|
|
2613
|
+
var PageBlockDefinitionUntypedPropertyOptions = z96.record(z96.any());
|
|
2614
|
+
var PageBlockDefinitionRichTextOptions = z96.object({
|
|
2585
2615
|
richTextStyle: PageBlockDefinitionRichTextPropertyStyle.optional()
|
|
2586
2616
|
});
|
|
2587
|
-
var PageBlockDefinitionMutiRichTextOptions =
|
|
2617
|
+
var PageBlockDefinitionMutiRichTextOptions = z96.object({
|
|
2588
2618
|
multiRichTextStyle: PageBlockDefinitionMultiRichTextPropertyStyle.optional()
|
|
2589
2619
|
});
|
|
2590
|
-
var PageBlockDefinitionTextOptions =
|
|
2591
|
-
placeholder:
|
|
2592
|
-
defaultValue:
|
|
2620
|
+
var PageBlockDefinitionTextOptions = z96.object({
|
|
2621
|
+
placeholder: z96.string().optional(),
|
|
2622
|
+
defaultValue: z96.string().optional(),
|
|
2593
2623
|
textStyle: PageBlockDefinitionTextPropertyStyle.optional(),
|
|
2594
2624
|
color: PageBlockDefinitionTextPropertyColor.optional(),
|
|
2595
|
-
allowLineBreaks:
|
|
2625
|
+
allowLineBreaks: z96.boolean().optional()
|
|
2596
2626
|
});
|
|
2597
|
-
var PageBlockDefinitionSelectOptions =
|
|
2627
|
+
var PageBlockDefinitionSelectOptions = z96.object({
|
|
2598
2628
|
singleSelectStyle: PageBlockDefinitionSingleSelectPropertyStyle.optional(),
|
|
2599
|
-
defaultChoice:
|
|
2600
|
-
choices:
|
|
2629
|
+
defaultChoice: z96.string(),
|
|
2630
|
+
choices: z96.array(PageBlockDefinitionSelectChoice)
|
|
2601
2631
|
});
|
|
2602
|
-
var PageBlockDefinitionImageOptions =
|
|
2632
|
+
var PageBlockDefinitionImageOptions = z96.object({
|
|
2603
2633
|
width: PageBlockDefinitionImageWidth.optional(),
|
|
2604
2634
|
aspectRatio: PageBlockDefinitionImageAspectRatio.optional(),
|
|
2605
|
-
allowCaption:
|
|
2606
|
-
recommendation:
|
|
2635
|
+
allowCaption: z96.boolean().optional(),
|
|
2636
|
+
recommendation: z96.string().optional()
|
|
2607
2637
|
});
|
|
2608
|
-
var PageBlockDefinitionBooleanOptions =
|
|
2609
|
-
defaultvalue:
|
|
2638
|
+
var PageBlockDefinitionBooleanOptions = z96.object({
|
|
2639
|
+
defaultvalue: z96.boolean().optional(),
|
|
2610
2640
|
booleanStyle: PageBlockDefinitionBooleanPropertyStyle.optional()
|
|
2611
2641
|
});
|
|
2612
|
-
var PageBlockDefinitionNumberOptions =
|
|
2613
|
-
defaultValue:
|
|
2614
|
-
min:
|
|
2615
|
-
max:
|
|
2616
|
-
step:
|
|
2617
|
-
placeholder:
|
|
2642
|
+
var PageBlockDefinitionNumberOptions = z96.object({
|
|
2643
|
+
defaultValue: z96.number(),
|
|
2644
|
+
min: z96.number().optional(),
|
|
2645
|
+
max: z96.number().optional(),
|
|
2646
|
+
step: z96.number().optional(),
|
|
2647
|
+
placeholder: z96.string().optional()
|
|
2618
2648
|
});
|
|
2619
|
-
var PageBlockDefinitionComponentOptions =
|
|
2620
|
-
renderLayoutAs:
|
|
2621
|
-
allowPropertySelection:
|
|
2649
|
+
var PageBlockDefinitionComponentOptions = z96.object({
|
|
2650
|
+
renderLayoutAs: z96.enum(["List", "Table"]).optional(),
|
|
2651
|
+
allowPropertySelection: z96.boolean().optional()
|
|
2622
2652
|
});
|
|
2623
|
-
var PageBlockDefinitionProperty =
|
|
2624
|
-
id:
|
|
2625
|
-
name:
|
|
2653
|
+
var PageBlockDefinitionProperty = z96.object({
|
|
2654
|
+
id: z96.string(),
|
|
2655
|
+
name: z96.string(),
|
|
2626
2656
|
type: PageBlockDefinitionPropertyType,
|
|
2627
|
-
description:
|
|
2657
|
+
description: z96.string().optional(),
|
|
2628
2658
|
options: PageBlockDefinitionUntypedPropertyOptions.optional(),
|
|
2629
|
-
variantOptions:
|
|
2659
|
+
variantOptions: z96.record(PageBlockDefinitionUntypedPropertyOptions).optional()
|
|
2630
2660
|
});
|
|
2631
|
-
var PageBlockDefinitionItem =
|
|
2632
|
-
properties:
|
|
2661
|
+
var PageBlockDefinitionItem = z96.object({
|
|
2662
|
+
properties: z96.array(PageBlockDefinitionProperty),
|
|
2633
2663
|
appearance: PageBlockDefinitionAppearance.optional(),
|
|
2634
|
-
variants:
|
|
2635
|
-
defaultVariantKey:
|
|
2664
|
+
variants: z96.array(PageBlockDefinitionVariant),
|
|
2665
|
+
defaultVariantKey: z96.string()
|
|
2636
2666
|
});
|
|
2637
2667
|
|
|
2638
2668
|
// src/dsm/documentation/block-definitions/definition.ts
|
|
2639
|
-
var PageBlockCategory =
|
|
2669
|
+
var PageBlockCategory = z97.enum([
|
|
2640
2670
|
"Text",
|
|
2641
2671
|
"Layout",
|
|
2642
2672
|
"Media",
|
|
@@ -2650,162 +2680,162 @@ var PageBlockCategory = z96.enum([
|
|
|
2650
2680
|
"Data",
|
|
2651
2681
|
"Other"
|
|
2652
2682
|
]);
|
|
2653
|
-
var PageBlockBehaviorDataType =
|
|
2654
|
-
var PageBlockBehaviorSelectionType =
|
|
2655
|
-
var PageBlockDefinitionBehavior =
|
|
2683
|
+
var PageBlockBehaviorDataType = z97.enum(["Item", "Token", "Asset", "Component", "FigmaNode", "FigmaComponent"]);
|
|
2684
|
+
var PageBlockBehaviorSelectionType = z97.enum(["Entity", "Group", "EntityAndGroup"]);
|
|
2685
|
+
var PageBlockDefinitionBehavior = z97.object({
|
|
2656
2686
|
dataType: PageBlockBehaviorDataType,
|
|
2657
|
-
items:
|
|
2658
|
-
numberOfItems:
|
|
2659
|
-
allowLinks:
|
|
2660
|
-
newItemLabel:
|
|
2687
|
+
items: z97.object({
|
|
2688
|
+
numberOfItems: z97.number(),
|
|
2689
|
+
allowLinks: z97.boolean(),
|
|
2690
|
+
newItemLabel: z97.string().optional()
|
|
2661
2691
|
}).optional(),
|
|
2662
|
-
entities:
|
|
2692
|
+
entities: z97.object({
|
|
2663
2693
|
selectionType: PageBlockBehaviorSelectionType,
|
|
2664
|
-
maxSelected:
|
|
2694
|
+
maxSelected: z97.number()
|
|
2665
2695
|
}).optional()
|
|
2666
2696
|
});
|
|
2667
|
-
var PageBlockDefinitionOnboarding =
|
|
2668
|
-
helpText:
|
|
2669
|
-
documentationLink:
|
|
2697
|
+
var PageBlockDefinitionOnboarding = z97.object({
|
|
2698
|
+
helpText: z97.string(),
|
|
2699
|
+
documentationLink: z97.string().optional()
|
|
2670
2700
|
});
|
|
2671
|
-
var PageBlockDefinition =
|
|
2672
|
-
id:
|
|
2673
|
-
name:
|
|
2674
|
-
description:
|
|
2701
|
+
var PageBlockDefinition = z97.object({
|
|
2702
|
+
id: z97.string(),
|
|
2703
|
+
name: z97.string(),
|
|
2704
|
+
description: z97.string(),
|
|
2675
2705
|
category: PageBlockCategory,
|
|
2676
|
-
icon:
|
|
2677
|
-
documentationLink:
|
|
2678
|
-
searchKeywords:
|
|
2706
|
+
icon: z97.string().optional(),
|
|
2707
|
+
documentationLink: z97.string().optional(),
|
|
2708
|
+
searchKeywords: z97.array(z97.string()).optional(),
|
|
2679
2709
|
item: PageBlockDefinitionItem,
|
|
2680
2710
|
behavior: PageBlockDefinitionBehavior,
|
|
2681
|
-
editorOptions:
|
|
2711
|
+
editorOptions: z97.object({
|
|
2682
2712
|
onboarding: PageBlockDefinitionOnboarding.optional()
|
|
2683
2713
|
}),
|
|
2684
2714
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
2685
2715
|
});
|
|
2686
2716
|
|
|
2687
2717
|
// src/dsm/documentation/group.ts
|
|
2688
|
-
import { z as
|
|
2689
|
-
var DocumentationPageGroup =
|
|
2690
|
-
type:
|
|
2691
|
-
childType:
|
|
2692
|
-
id:
|
|
2693
|
-
persistentId:
|
|
2694
|
-
shortPersistentId:
|
|
2695
|
-
designSystemVersionId:
|
|
2696
|
-
parentPersistentId:
|
|
2697
|
-
sortOrder:
|
|
2698
|
-
title:
|
|
2699
|
-
slug:
|
|
2700
|
-
userSlug:
|
|
2701
|
-
createdAt:
|
|
2702
|
-
updatedAt:
|
|
2718
|
+
import { z as z98 } from "zod";
|
|
2719
|
+
var DocumentationPageGroup = z98.object({
|
|
2720
|
+
type: z98.literal("ElementGroup"),
|
|
2721
|
+
childType: z98.literal("DocumentationPage"),
|
|
2722
|
+
id: z98.string(),
|
|
2723
|
+
persistentId: z98.string(),
|
|
2724
|
+
shortPersistentId: z98.string(),
|
|
2725
|
+
designSystemVersionId: z98.string(),
|
|
2726
|
+
parentPersistentId: z98.string().nullish(),
|
|
2727
|
+
sortOrder: z98.number(),
|
|
2728
|
+
title: z98.string(),
|
|
2729
|
+
slug: z98.string(),
|
|
2730
|
+
userSlug: z98.string().nullish(),
|
|
2731
|
+
createdAt: z98.coerce.date(),
|
|
2732
|
+
updatedAt: z98.coerce.date()
|
|
2703
2733
|
});
|
|
2704
2734
|
|
|
2705
2735
|
// src/dsm/documentation/link-preview.ts
|
|
2706
|
-
import { z as
|
|
2707
|
-
var DocumentationLinkPreview =
|
|
2708
|
-
title:
|
|
2709
|
-
description:
|
|
2736
|
+
import { z as z99 } from "zod";
|
|
2737
|
+
var DocumentationLinkPreview = z99.object({
|
|
2738
|
+
title: z99.string().optional(),
|
|
2739
|
+
description: z99.string().optional(),
|
|
2710
2740
|
thumbnail: PageBlockImageReference.optional()
|
|
2711
2741
|
});
|
|
2712
2742
|
|
|
2713
2743
|
// src/dsm/documentation/page-anchor.ts
|
|
2714
|
-
import { z as z99 } from "zod";
|
|
2715
|
-
var DocumentationPageAnchor = z99.object({
|
|
2716
|
-
blockId: z99.string(),
|
|
2717
|
-
level: z99.number(),
|
|
2718
|
-
text: z99.string()
|
|
2719
|
-
});
|
|
2720
|
-
|
|
2721
|
-
// src/dsm/documentation/page-content-backup.ts
|
|
2722
2744
|
import { z as z100 } from "zod";
|
|
2723
|
-
var
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
updatedAt: z100.coerce.date(),
|
|
2728
|
-
documentationPageId: z100.string(),
|
|
2729
|
-
documentationPageName: z100.string(),
|
|
2730
|
-
storagePath: z100.string()
|
|
2745
|
+
var DocumentationPageAnchor = z100.object({
|
|
2746
|
+
blockId: z100.string(),
|
|
2747
|
+
level: z100.number(),
|
|
2748
|
+
text: z100.string()
|
|
2731
2749
|
});
|
|
2732
2750
|
|
|
2733
|
-
// src/dsm/documentation/page-content.ts
|
|
2751
|
+
// src/dsm/documentation/page-content-backup.ts
|
|
2734
2752
|
import { z as z101 } from "zod";
|
|
2735
|
-
var
|
|
2736
|
-
PageBlockEditorModelV2,
|
|
2737
|
-
PageSectionEditorModelV2
|
|
2738
|
-
]);
|
|
2739
|
-
var DocumentationPageContentData = z101.object({
|
|
2740
|
-
items: z101.array(DocumentationPageContentItem)
|
|
2741
|
-
});
|
|
2742
|
-
var DocumentationPageContent = z101.object({
|
|
2753
|
+
var DocumentationPageContentBackup = z101.object({
|
|
2743
2754
|
id: z101.string(),
|
|
2744
2755
|
designSystemVersionId: z101.string(),
|
|
2745
2756
|
createdAt: z101.coerce.date(),
|
|
2746
2757
|
updatedAt: z101.coerce.date(),
|
|
2747
2758
|
documentationPageId: z101.string(),
|
|
2748
|
-
|
|
2759
|
+
documentationPageName: z101.string(),
|
|
2760
|
+
storagePath: z101.string()
|
|
2749
2761
|
});
|
|
2750
2762
|
|
|
2751
|
-
// src/dsm/documentation/page.ts
|
|
2763
|
+
// src/dsm/documentation/page-content.ts
|
|
2752
2764
|
import { z as z102 } from "zod";
|
|
2753
|
-
var
|
|
2754
|
-
|
|
2765
|
+
var DocumentationPageContentItem = z102.discriminatedUnion("type", [
|
|
2766
|
+
PageBlockEditorModelV2,
|
|
2767
|
+
PageSectionEditorModelV2
|
|
2768
|
+
]);
|
|
2769
|
+
var DocumentationPageContentData = z102.object({
|
|
2770
|
+
items: z102.array(DocumentationPageContentItem)
|
|
2771
|
+
});
|
|
2772
|
+
var DocumentationPageContent = z102.object({
|
|
2755
2773
|
id: z102.string(),
|
|
2756
|
-
persistentId: z102.string(),
|
|
2757
|
-
shortPersistentId: z102.string(),
|
|
2758
2774
|
designSystemVersionId: z102.string(),
|
|
2759
|
-
parentPersistentId: z102.string().nullish(),
|
|
2760
|
-
sortOrder: z102.number(),
|
|
2761
|
-
title: z102.string(),
|
|
2762
|
-
slug: z102.string(),
|
|
2763
|
-
userSlug: z102.string().nullish(),
|
|
2764
2775
|
createdAt: z102.coerce.date(),
|
|
2765
|
-
updatedAt: z102.coerce.date()
|
|
2776
|
+
updatedAt: z102.coerce.date(),
|
|
2777
|
+
documentationPageId: z102.string(),
|
|
2778
|
+
data: DocumentationPageContentData
|
|
2766
2779
|
});
|
|
2767
2780
|
|
|
2768
|
-
// src/dsm/documentation/
|
|
2781
|
+
// src/dsm/documentation/page.ts
|
|
2769
2782
|
import { z as z103 } from "zod";
|
|
2770
|
-
var
|
|
2771
|
-
|
|
2772
|
-
authorId: z103.string(),
|
|
2773
|
-
threadId: z103.string(),
|
|
2774
|
-
roomId: z103.string(),
|
|
2775
|
-
createdAt: z103.coerce.date(),
|
|
2776
|
-
editedAt: z103.coerce.date().optional(),
|
|
2777
|
-
deletedAt: z103.coerce.date().optional(),
|
|
2778
|
-
body: z103.string()
|
|
2779
|
-
});
|
|
2780
|
-
var DocumentationCommentThread = z103.object({
|
|
2783
|
+
var DocumentationPage = z103.object({
|
|
2784
|
+
type: z103.literal("DocumentationPage"),
|
|
2781
2785
|
id: z103.string(),
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
brandId: z103.string(),
|
|
2786
|
+
persistentId: z103.string(),
|
|
2787
|
+
shortPersistentId: z103.string(),
|
|
2785
2788
|
designSystemVersionId: z103.string(),
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
+
parentPersistentId: z103.string().nullish(),
|
|
2790
|
+
sortOrder: z103.number(),
|
|
2791
|
+
title: z103.string(),
|
|
2792
|
+
slug: z103.string(),
|
|
2793
|
+
userSlug: z103.string().nullish(),
|
|
2789
2794
|
createdAt: z103.coerce.date(),
|
|
2790
2795
|
updatedAt: z103.coerce.date()
|
|
2791
2796
|
});
|
|
2792
2797
|
|
|
2793
|
-
// src/dsm/
|
|
2798
|
+
// src/dsm/documentation/thread.ts
|
|
2794
2799
|
import { z as z104 } from "zod";
|
|
2795
|
-
var
|
|
2796
|
-
|
|
2800
|
+
var DocumentationComment = z104.object({
|
|
2801
|
+
id: z104.string(),
|
|
2802
|
+
authorId: z104.string(),
|
|
2803
|
+
threadId: z104.string(),
|
|
2804
|
+
roomId: z104.string(),
|
|
2805
|
+
createdAt: z104.coerce.date(),
|
|
2806
|
+
editedAt: z104.coerce.date().optional(),
|
|
2807
|
+
deletedAt: z104.coerce.date().optional(),
|
|
2808
|
+
body: z104.string()
|
|
2809
|
+
});
|
|
2810
|
+
var DocumentationCommentThread = z104.object({
|
|
2797
2811
|
id: z104.string(),
|
|
2812
|
+
roomId: z104.string(),
|
|
2813
|
+
pagePersistentId: z104.string(),
|
|
2814
|
+
brandId: z104.string(),
|
|
2798
2815
|
designSystemVersionId: z104.string(),
|
|
2816
|
+
designSystemId: z104.string(),
|
|
2817
|
+
blockId: z104.string().optional(),
|
|
2818
|
+
resolved: z104.boolean(),
|
|
2799
2819
|
createdAt: z104.coerce.date(),
|
|
2800
|
-
updatedAt: z104.coerce.date()
|
|
2820
|
+
updatedAt: z104.coerce.date()
|
|
2821
|
+
});
|
|
2822
|
+
|
|
2823
|
+
// src/dsm/element-snapshots/base.ts
|
|
2824
|
+
import { z as z105 } from "zod";
|
|
2825
|
+
var DesignElementSnapshotReason = z105.enum(["Publish", "Deletion"]);
|
|
2826
|
+
var DesignElementSnapshotBase = z105.object({
|
|
2827
|
+
id: z105.string(),
|
|
2828
|
+
designSystemVersionId: z105.string(),
|
|
2829
|
+
createdAt: z105.coerce.date(),
|
|
2830
|
+
updatedAt: z105.coerce.date(),
|
|
2801
2831
|
reason: DesignElementSnapshotReason
|
|
2802
2832
|
});
|
|
2803
2833
|
|
|
2804
2834
|
// src/dsm/element-snapshots/documentation-page-snapshot.ts
|
|
2805
|
-
import { z as
|
|
2835
|
+
import { z as z106 } from "zod";
|
|
2806
2836
|
var DocumentationPageSnapshot = DesignElementSnapshotBase.extend({
|
|
2807
2837
|
page: DocumentationPageV2,
|
|
2808
|
-
pageContentHash:
|
|
2838
|
+
pageContentHash: z106.string()
|
|
2809
2839
|
});
|
|
2810
2840
|
|
|
2811
2841
|
// src/dsm/element-snapshots/group-snapshot.ts
|
|
@@ -2814,376 +2844,376 @@ var ElementGroupSnapshot = DesignElementSnapshotBase.extend({
|
|
|
2814
2844
|
});
|
|
2815
2845
|
|
|
2816
2846
|
// src/dsm/views/column.ts
|
|
2817
|
-
import { z as
|
|
2818
|
-
var ElementViewBaseColumnType =
|
|
2819
|
-
var ElementViewColumnType =
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2847
|
+
import { z as z107 } from "zod";
|
|
2848
|
+
var ElementViewBaseColumnType = z107.enum(["Name", "Description", "Value", "UpdatedAt"]);
|
|
2849
|
+
var ElementViewColumnType = z107.union([
|
|
2850
|
+
z107.literal("BaseProperty"),
|
|
2851
|
+
z107.literal("PropertyDefinition"),
|
|
2852
|
+
z107.literal("Theme")
|
|
2823
2853
|
]);
|
|
2824
|
-
var ElementViewColumnSharedAttributes =
|
|
2825
|
-
id:
|
|
2826
|
-
persistentId:
|
|
2827
|
-
elementDataViewId:
|
|
2828
|
-
sortPosition:
|
|
2829
|
-
width:
|
|
2854
|
+
var ElementViewColumnSharedAttributes = z107.object({
|
|
2855
|
+
id: z107.string(),
|
|
2856
|
+
persistentId: z107.string(),
|
|
2857
|
+
elementDataViewId: z107.string(),
|
|
2858
|
+
sortPosition: z107.number(),
|
|
2859
|
+
width: z107.number()
|
|
2830
2860
|
});
|
|
2831
2861
|
var ElementViewBasePropertyColumn = ElementViewColumnSharedAttributes.extend({
|
|
2832
|
-
type:
|
|
2862
|
+
type: z107.literal("BaseProperty"),
|
|
2833
2863
|
basePropertyType: ElementViewBaseColumnType
|
|
2834
2864
|
});
|
|
2835
2865
|
var ElementViewPropertyDefinitionColumn = ElementViewColumnSharedAttributes.extend({
|
|
2836
|
-
type:
|
|
2837
|
-
propertyDefinitionId:
|
|
2866
|
+
type: z107.literal("PropertyDefinition"),
|
|
2867
|
+
propertyDefinitionId: z107.string()
|
|
2838
2868
|
});
|
|
2839
2869
|
var ElementViewThemeColumn = ElementViewColumnSharedAttributes.extend({
|
|
2840
|
-
type:
|
|
2841
|
-
themeId:
|
|
2870
|
+
type: z107.literal("Theme"),
|
|
2871
|
+
themeId: z107.string()
|
|
2842
2872
|
});
|
|
2843
|
-
var ElementViewColumn =
|
|
2873
|
+
var ElementViewColumn = z107.discriminatedUnion("type", [
|
|
2844
2874
|
ElementViewBasePropertyColumn,
|
|
2845
2875
|
ElementViewPropertyDefinitionColumn,
|
|
2846
2876
|
ElementViewThemeColumn
|
|
2847
2877
|
]);
|
|
2848
2878
|
|
|
2849
2879
|
// src/dsm/views/view.ts
|
|
2850
|
-
import { z as z107 } from "zod";
|
|
2851
|
-
var ElementView = z107.object({
|
|
2852
|
-
id: z107.string(),
|
|
2853
|
-
persistentId: z107.string(),
|
|
2854
|
-
designSystemVersionId: z107.string(),
|
|
2855
|
-
name: z107.string(),
|
|
2856
|
-
description: z107.string(),
|
|
2857
|
-
targetElementType: ElementPropertyTargetType,
|
|
2858
|
-
isDefault: z107.boolean()
|
|
2859
|
-
});
|
|
2860
|
-
|
|
2861
|
-
// src/dsm/brand.ts
|
|
2862
2880
|
import { z as z108 } from "zod";
|
|
2863
|
-
var
|
|
2881
|
+
var ElementView = z108.object({
|
|
2864
2882
|
id: z108.string(),
|
|
2865
|
-
designSystemVersionId: z108.string(),
|
|
2866
2883
|
persistentId: z108.string(),
|
|
2884
|
+
designSystemVersionId: z108.string(),
|
|
2867
2885
|
name: z108.string(),
|
|
2868
|
-
description: z108.string()
|
|
2886
|
+
description: z108.string(),
|
|
2887
|
+
targetElementType: ElementPropertyTargetType,
|
|
2888
|
+
isDefault: z108.boolean()
|
|
2889
|
+
});
|
|
2890
|
+
|
|
2891
|
+
// src/dsm/brand.ts
|
|
2892
|
+
import { z as z109 } from "zod";
|
|
2893
|
+
var Brand = z109.object({
|
|
2894
|
+
id: z109.string(),
|
|
2895
|
+
designSystemVersionId: z109.string(),
|
|
2896
|
+
persistentId: z109.string(),
|
|
2897
|
+
name: z109.string(),
|
|
2898
|
+
description: z109.string()
|
|
2869
2899
|
});
|
|
2870
2900
|
|
|
2871
2901
|
// src/dsm/design-system.ts
|
|
2872
|
-
import { z as
|
|
2902
|
+
import { z as z113 } from "zod";
|
|
2873
2903
|
|
|
2874
2904
|
// src/workspace/workspace.ts
|
|
2875
2905
|
import IPCIDR from "ip-cidr";
|
|
2876
|
-
import { z as
|
|
2906
|
+
import { z as z112 } from "zod";
|
|
2877
2907
|
|
|
2878
2908
|
// src/workspace/npm-registry-settings.ts
|
|
2879
|
-
import { z as
|
|
2880
|
-
var NpmRegistryAuthType =
|
|
2881
|
-
var NpmRegistryType =
|
|
2882
|
-
var NpmRegistryBasicAuthConfig =
|
|
2883
|
-
authType:
|
|
2884
|
-
username:
|
|
2885
|
-
password:
|
|
2886
|
-
});
|
|
2887
|
-
var NpmRegistryBearerAuthConfig =
|
|
2888
|
-
authType:
|
|
2889
|
-
accessToken:
|
|
2890
|
-
});
|
|
2891
|
-
var NpmRegistryNoAuthConfig =
|
|
2892
|
-
authType:
|
|
2893
|
-
});
|
|
2894
|
-
var NpmRegistrCustomAuthConfig =
|
|
2895
|
-
authType:
|
|
2896
|
-
authHeaderName:
|
|
2897
|
-
authHeaderValue:
|
|
2898
|
-
});
|
|
2899
|
-
var NpmRegistryAuthConfig =
|
|
2909
|
+
import { z as z110 } from "zod";
|
|
2910
|
+
var NpmRegistryAuthType = z110.enum(["Basic", "Bearer", "None", "Custom"]);
|
|
2911
|
+
var NpmRegistryType = z110.enum(["NPMJS", "GitHub", "AzureDevOps", "Artifactory", "Custom"]);
|
|
2912
|
+
var NpmRegistryBasicAuthConfig = z110.object({
|
|
2913
|
+
authType: z110.literal(NpmRegistryAuthType.Enum.Basic),
|
|
2914
|
+
username: z110.string(),
|
|
2915
|
+
password: z110.string()
|
|
2916
|
+
});
|
|
2917
|
+
var NpmRegistryBearerAuthConfig = z110.object({
|
|
2918
|
+
authType: z110.literal(NpmRegistryAuthType.Enum.Bearer),
|
|
2919
|
+
accessToken: z110.string()
|
|
2920
|
+
});
|
|
2921
|
+
var NpmRegistryNoAuthConfig = z110.object({
|
|
2922
|
+
authType: z110.literal(NpmRegistryAuthType.Enum.None)
|
|
2923
|
+
});
|
|
2924
|
+
var NpmRegistrCustomAuthConfig = z110.object({
|
|
2925
|
+
authType: z110.literal(NpmRegistryAuthType.Enum.Custom),
|
|
2926
|
+
authHeaderName: z110.string(),
|
|
2927
|
+
authHeaderValue: z110.string()
|
|
2928
|
+
});
|
|
2929
|
+
var NpmRegistryAuthConfig = z110.discriminatedUnion("authType", [
|
|
2900
2930
|
NpmRegistryBasicAuthConfig,
|
|
2901
2931
|
NpmRegistryBearerAuthConfig,
|
|
2902
2932
|
NpmRegistryNoAuthConfig,
|
|
2903
2933
|
NpmRegistrCustomAuthConfig
|
|
2904
2934
|
]);
|
|
2905
|
-
var NpmRegistryConfigBase =
|
|
2935
|
+
var NpmRegistryConfigBase = z110.object({
|
|
2906
2936
|
registryType: NpmRegistryType,
|
|
2907
|
-
enabledScopes:
|
|
2908
|
-
customRegistryUrl:
|
|
2909
|
-
bypassProxy:
|
|
2910
|
-
npmProxyRegistryConfigId:
|
|
2911
|
-
npmProxyVersion:
|
|
2937
|
+
enabledScopes: z110.array(z110.string()),
|
|
2938
|
+
customRegistryUrl: z110.string().optional(),
|
|
2939
|
+
bypassProxy: z110.boolean().default(false),
|
|
2940
|
+
npmProxyRegistryConfigId: z110.string().optional(),
|
|
2941
|
+
npmProxyVersion: z110.number().optional()
|
|
2912
2942
|
});
|
|
2913
2943
|
var NpmRegistryConfig = NpmRegistryConfigBase.and(NpmRegistryAuthConfig);
|
|
2914
2944
|
|
|
2915
2945
|
// src/workspace/sso-provider.ts
|
|
2916
|
-
import { z as
|
|
2917
|
-
var SsoProvider =
|
|
2918
|
-
providerId:
|
|
2919
|
-
defaultAutoInviteValue:
|
|
2920
|
-
autoInviteDomains:
|
|
2921
|
-
skipDocsSupernovaLogin:
|
|
2922
|
-
areInvitesDisabled:
|
|
2923
|
-
isTestMode:
|
|
2924
|
-
emailDomains:
|
|
2925
|
-
metadataXml:
|
|
2946
|
+
import { z as z111 } from "zod";
|
|
2947
|
+
var SsoProvider = z111.object({
|
|
2948
|
+
providerId: z111.string(),
|
|
2949
|
+
defaultAutoInviteValue: z111.boolean(),
|
|
2950
|
+
autoInviteDomains: z111.record(z111.string(), z111.boolean()),
|
|
2951
|
+
skipDocsSupernovaLogin: z111.boolean(),
|
|
2952
|
+
areInvitesDisabled: z111.boolean(),
|
|
2953
|
+
isTestMode: z111.boolean(),
|
|
2954
|
+
emailDomains: z111.array(z111.string()),
|
|
2955
|
+
metadataXml: z111.string().nullish()
|
|
2926
2956
|
});
|
|
2927
2957
|
|
|
2928
2958
|
// src/workspace/workspace.ts
|
|
2929
2959
|
var isValidCIDR = (value) => {
|
|
2930
2960
|
return IPCIDR.isValidAddress(value);
|
|
2931
2961
|
};
|
|
2932
|
-
var WorkspaceIpWhitelistEntry =
|
|
2933
|
-
isEnabled:
|
|
2934
|
-
name:
|
|
2935
|
-
range:
|
|
2962
|
+
var WorkspaceIpWhitelistEntry = z112.object({
|
|
2963
|
+
isEnabled: z112.boolean(),
|
|
2964
|
+
name: z112.string(),
|
|
2965
|
+
range: z112.string().refine(isValidCIDR, {
|
|
2936
2966
|
message: "Invalid IP CIDR"
|
|
2937
2967
|
})
|
|
2938
2968
|
});
|
|
2939
|
-
var WorkspaceIpSettings =
|
|
2940
|
-
isEnabledForCloud:
|
|
2941
|
-
isEnabledForDocs:
|
|
2942
|
-
entries:
|
|
2969
|
+
var WorkspaceIpSettings = z112.object({
|
|
2970
|
+
isEnabledForCloud: z112.boolean(),
|
|
2971
|
+
isEnabledForDocs: z112.boolean(),
|
|
2972
|
+
entries: z112.array(WorkspaceIpWhitelistEntry)
|
|
2943
2973
|
});
|
|
2944
|
-
var WorkspaceProfile =
|
|
2945
|
-
name:
|
|
2946
|
-
handle:
|
|
2947
|
-
color:
|
|
2948
|
-
avatar: nullishToOptional(
|
|
2974
|
+
var WorkspaceProfile = z112.object({
|
|
2975
|
+
name: z112.string(),
|
|
2976
|
+
handle: z112.string(),
|
|
2977
|
+
color: z112.string(),
|
|
2978
|
+
avatar: nullishToOptional(z112.string()),
|
|
2949
2979
|
billingDetails: nullishToOptional(BillingDetails)
|
|
2950
2980
|
});
|
|
2951
2981
|
var WorkspaceProfileUpdate = WorkspaceProfile.omit({
|
|
2952
2982
|
avatar: true
|
|
2953
2983
|
});
|
|
2954
|
-
var Workspace =
|
|
2955
|
-
id:
|
|
2984
|
+
var Workspace = z112.object({
|
|
2985
|
+
id: z112.string(),
|
|
2956
2986
|
profile: WorkspaceProfile,
|
|
2957
2987
|
subscription: Subscription,
|
|
2958
2988
|
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
2959
2989
|
sso: nullishToOptional(SsoProvider),
|
|
2960
2990
|
npmRegistrySettings: nullishToOptional(NpmRegistryConfig)
|
|
2961
2991
|
});
|
|
2962
|
-
var WorkspaceWithDesignSystems =
|
|
2992
|
+
var WorkspaceWithDesignSystems = z112.object({
|
|
2963
2993
|
workspace: Workspace,
|
|
2964
|
-
designSystems:
|
|
2994
|
+
designSystems: z112.array(DesignSystem)
|
|
2965
2995
|
});
|
|
2966
2996
|
|
|
2967
2997
|
// src/dsm/design-system.ts
|
|
2968
|
-
var DesignSystemSwitcher =
|
|
2969
|
-
isEnabled:
|
|
2970
|
-
designSystemIds:
|
|
2998
|
+
var DesignSystemSwitcher = z113.object({
|
|
2999
|
+
isEnabled: z113.boolean(),
|
|
3000
|
+
designSystemIds: z113.array(z113.string())
|
|
2971
3001
|
});
|
|
2972
|
-
var DesignSystem =
|
|
2973
|
-
id:
|
|
2974
|
-
workspaceId:
|
|
2975
|
-
name:
|
|
2976
|
-
description:
|
|
2977
|
-
docExporterId: nullishToOptional(
|
|
2978
|
-
docSlug:
|
|
2979
|
-
docUserSlug: nullishToOptional(
|
|
2980
|
-
docSlugDeprecated:
|
|
2981
|
-
isPublic:
|
|
2982
|
-
isMultibrand:
|
|
2983
|
-
docViewUrl: nullishToOptional(
|
|
2984
|
-
basePrefixes:
|
|
3002
|
+
var DesignSystem = z113.object({
|
|
3003
|
+
id: z113.string(),
|
|
3004
|
+
workspaceId: z113.string(),
|
|
3005
|
+
name: z113.string(),
|
|
3006
|
+
description: z113.string(),
|
|
3007
|
+
docExporterId: nullishToOptional(z113.string()),
|
|
3008
|
+
docSlug: z113.string(),
|
|
3009
|
+
docUserSlug: nullishToOptional(z113.string()),
|
|
3010
|
+
docSlugDeprecated: z113.string(),
|
|
3011
|
+
isPublic: z113.boolean(),
|
|
3012
|
+
isMultibrand: z113.boolean(),
|
|
3013
|
+
docViewUrl: nullishToOptional(z113.string()),
|
|
3014
|
+
basePrefixes: z113.array(z113.string()),
|
|
2985
3015
|
designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
|
|
2986
|
-
createdAt:
|
|
2987
|
-
updatedAt:
|
|
3016
|
+
createdAt: z113.coerce.date(),
|
|
3017
|
+
updatedAt: z113.coerce.date()
|
|
2988
3018
|
});
|
|
2989
|
-
var DesignSystemWithWorkspace =
|
|
3019
|
+
var DesignSystemWithWorkspace = z113.object({
|
|
2990
3020
|
designSystem: DesignSystem,
|
|
2991
3021
|
workspace: Workspace
|
|
2992
3022
|
});
|
|
2993
3023
|
|
|
2994
3024
|
// src/dsm/desing-system-create.ts
|
|
2995
|
-
import { z as
|
|
3025
|
+
import { z as z114 } from "zod";
|
|
2996
3026
|
var DS_NAME_MIN_LENGTH = 2;
|
|
2997
3027
|
var DS_NAME_MAX_LENGTH = 64;
|
|
2998
3028
|
var DS_DESC_MAX_LENGTH = 64;
|
|
2999
|
-
var DesignSystemCreateInputMetadata =
|
|
3000
|
-
name:
|
|
3001
|
-
description:
|
|
3029
|
+
var DesignSystemCreateInputMetadata = z114.object({
|
|
3030
|
+
name: z114.string().min(DS_NAME_MIN_LENGTH).max(DS_NAME_MAX_LENGTH).trim(),
|
|
3031
|
+
description: z114.string().max(DS_DESC_MAX_LENGTH).trim()
|
|
3002
3032
|
});
|
|
3003
|
-
var DesignSystemCreateInput =
|
|
3033
|
+
var DesignSystemCreateInput = z114.object({
|
|
3004
3034
|
meta: DesignSystemCreateInputMetadata,
|
|
3005
|
-
workspaceId:
|
|
3006
|
-
isPublic:
|
|
3007
|
-
basePrefixes:
|
|
3008
|
-
docUserSlug:
|
|
3009
|
-
source:
|
|
3035
|
+
workspaceId: z114.string(),
|
|
3036
|
+
isPublic: z114.boolean().optional(),
|
|
3037
|
+
basePrefixes: z114.array(z114.string()).optional(),
|
|
3038
|
+
docUserSlug: z114.string().nullish().optional(),
|
|
3039
|
+
source: z114.array(z114.string()).optional()
|
|
3010
3040
|
});
|
|
3011
3041
|
|
|
3012
3042
|
// src/dsm/desing-system-update.ts
|
|
3013
|
-
import { z as
|
|
3043
|
+
import { z as z115 } from "zod";
|
|
3014
3044
|
var DS_NAME_MIN_LENGTH2 = 2;
|
|
3015
3045
|
var DS_NAME_MAX_LENGTH2 = 64;
|
|
3016
3046
|
var DS_DESC_MAX_LENGTH2 = 64;
|
|
3017
|
-
var DesignSystemUpdateInputMetadata =
|
|
3018
|
-
name:
|
|
3019
|
-
description:
|
|
3047
|
+
var DesignSystemUpdateInputMetadata = z115.object({
|
|
3048
|
+
name: z115.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
3049
|
+
description: z115.string().max(DS_DESC_MAX_LENGTH2).trim().optional()
|
|
3020
3050
|
});
|
|
3021
|
-
var DesignSystemUpdateInput =
|
|
3051
|
+
var DesignSystemUpdateInput = z115.object({
|
|
3022
3052
|
meta: DesignSystemUpdateInputMetadata.optional(),
|
|
3023
|
-
workspaceId:
|
|
3024
|
-
isPublic:
|
|
3025
|
-
basePrefixes:
|
|
3026
|
-
docUserSlug:
|
|
3027
|
-
source:
|
|
3028
|
-
name:
|
|
3029
|
-
description:
|
|
3030
|
-
docExporterId:
|
|
3053
|
+
workspaceId: z115.string().optional(),
|
|
3054
|
+
isPublic: z115.boolean().optional(),
|
|
3055
|
+
basePrefixes: z115.array(z115.string()).optional(),
|
|
3056
|
+
docUserSlug: z115.string().nullish().optional(),
|
|
3057
|
+
source: z115.array(z115.string()).optional(),
|
|
3058
|
+
name: z115.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
3059
|
+
description: z115.string().max(DS_DESC_MAX_LENGTH2).trim().optional(),
|
|
3060
|
+
docExporterId: z115.string().optional()
|
|
3031
3061
|
});
|
|
3032
3062
|
|
|
3033
3063
|
// src/dsm/exporter-property-values-collection.ts
|
|
3034
|
-
import { z as
|
|
3035
|
-
var ExporterPropertyImageValue =
|
|
3064
|
+
import { z as z116 } from "zod";
|
|
3065
|
+
var ExporterPropertyImageValue = z116.object({
|
|
3036
3066
|
asset: PageBlockAsset.optional(),
|
|
3037
|
-
assetId:
|
|
3038
|
-
assetUrl:
|
|
3039
|
-
});
|
|
3040
|
-
var ExporterPropertyValue =
|
|
3041
|
-
key:
|
|
3042
|
-
value:
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3067
|
+
assetId: z116.string().optional(),
|
|
3068
|
+
assetUrl: z116.string().optional()
|
|
3069
|
+
});
|
|
3070
|
+
var ExporterPropertyValue = z116.object({
|
|
3071
|
+
key: z116.string(),
|
|
3072
|
+
value: z116.union([
|
|
3073
|
+
z116.number(),
|
|
3074
|
+
z116.string(),
|
|
3075
|
+
z116.boolean(),
|
|
3046
3076
|
ExporterPropertyImageValue,
|
|
3047
3077
|
ColorTokenData,
|
|
3048
3078
|
TypographyTokenData
|
|
3049
3079
|
])
|
|
3050
3080
|
});
|
|
3051
|
-
var ExporterPropertyValuesCollection =
|
|
3052
|
-
id:
|
|
3053
|
-
designSystemId:
|
|
3054
|
-
exporterId:
|
|
3055
|
-
values:
|
|
3081
|
+
var ExporterPropertyValuesCollection = z116.object({
|
|
3082
|
+
id: z116.string(),
|
|
3083
|
+
designSystemId: z116.string(),
|
|
3084
|
+
exporterId: z116.string(),
|
|
3085
|
+
values: z116.array(ExporterPropertyValue)
|
|
3056
3086
|
});
|
|
3057
3087
|
|
|
3058
3088
|
// src/dsm/published-doc-page.ts
|
|
3059
|
-
import { z as
|
|
3089
|
+
import { z as z117 } from "zod";
|
|
3060
3090
|
var SHORT_PERSISTENT_ID_LENGTH = 8;
|
|
3061
3091
|
function tryParseShortPersistentId(url = "/") {
|
|
3062
3092
|
const lastUrlPart = url.split("/").pop() || "";
|
|
3063
3093
|
const shortPersistentId = lastUrlPart.split("-").pop()?.replaceAll(".html", "") || null;
|
|
3064
3094
|
return shortPersistentId?.length === SHORT_PERSISTENT_ID_LENGTH ? shortPersistentId : null;
|
|
3065
3095
|
}
|
|
3066
|
-
var PublishedDocPage =
|
|
3067
|
-
id:
|
|
3068
|
-
publishedDocId:
|
|
3069
|
-
pageShortPersistentId:
|
|
3070
|
-
pathV1:
|
|
3071
|
-
pathV2:
|
|
3072
|
-
storagePath:
|
|
3073
|
-
locale:
|
|
3074
|
-
isPrivate:
|
|
3075
|
-
isHidden:
|
|
3076
|
-
createdAt:
|
|
3077
|
-
updatedAt:
|
|
3096
|
+
var PublishedDocPage = z117.object({
|
|
3097
|
+
id: z117.string(),
|
|
3098
|
+
publishedDocId: z117.string(),
|
|
3099
|
+
pageShortPersistentId: z117.string(),
|
|
3100
|
+
pathV1: z117.string(),
|
|
3101
|
+
pathV2: z117.string(),
|
|
3102
|
+
storagePath: z117.string(),
|
|
3103
|
+
locale: z117.string().optional(),
|
|
3104
|
+
isPrivate: z117.boolean(),
|
|
3105
|
+
isHidden: z117.boolean(),
|
|
3106
|
+
createdAt: z117.coerce.date(),
|
|
3107
|
+
updatedAt: z117.coerce.date()
|
|
3078
3108
|
});
|
|
3079
3109
|
|
|
3080
3110
|
// src/dsm/published-doc.ts
|
|
3081
|
-
import { z as
|
|
3111
|
+
import { z as z118 } from "zod";
|
|
3082
3112
|
var publishedDocEnvironments = ["Live", "Preview"];
|
|
3083
|
-
var PublishedDocEnvironment =
|
|
3084
|
-
var PublishedDocsChecksums =
|
|
3085
|
-
var PublishedDocRoutingVersion =
|
|
3086
|
-
var PublishedDoc =
|
|
3087
|
-
id:
|
|
3088
|
-
designSystemVersionId:
|
|
3089
|
-
createdAt:
|
|
3090
|
-
updatedAt:
|
|
3091
|
-
lastPublishedAt:
|
|
3092
|
-
isDefault:
|
|
3093
|
-
isPublic:
|
|
3113
|
+
var PublishedDocEnvironment = z118.enum(publishedDocEnvironments);
|
|
3114
|
+
var PublishedDocsChecksums = z118.record(z118.string());
|
|
3115
|
+
var PublishedDocRoutingVersion = z118.enum(["1", "2"]);
|
|
3116
|
+
var PublishedDoc = z118.object({
|
|
3117
|
+
id: z118.string(),
|
|
3118
|
+
designSystemVersionId: z118.string(),
|
|
3119
|
+
createdAt: z118.coerce.date(),
|
|
3120
|
+
updatedAt: z118.coerce.date(),
|
|
3121
|
+
lastPublishedAt: z118.coerce.date(),
|
|
3122
|
+
isDefault: z118.boolean(),
|
|
3123
|
+
isPublic: z118.boolean(),
|
|
3094
3124
|
environment: PublishedDocEnvironment,
|
|
3095
3125
|
checksums: PublishedDocsChecksums,
|
|
3096
|
-
storagePath:
|
|
3097
|
-
wasMigrated:
|
|
3126
|
+
storagePath: z118.string(),
|
|
3127
|
+
wasMigrated: z118.boolean(),
|
|
3098
3128
|
routingVersion: PublishedDocRoutingVersion,
|
|
3099
|
-
usesLocalizations:
|
|
3100
|
-
wasPublishedWithLocalizations:
|
|
3129
|
+
usesLocalizations: z118.boolean(),
|
|
3130
|
+
wasPublishedWithLocalizations: z118.boolean()
|
|
3101
3131
|
});
|
|
3102
3132
|
|
|
3103
3133
|
// src/dsm/version.ts
|
|
3104
|
-
import { z as
|
|
3105
|
-
var DesignSystemVersion =
|
|
3106
|
-
id:
|
|
3107
|
-
version:
|
|
3108
|
-
createdAt:
|
|
3109
|
-
designSystemId:
|
|
3110
|
-
name:
|
|
3111
|
-
comment:
|
|
3112
|
-
isReadonly:
|
|
3113
|
-
changeLog:
|
|
3114
|
-
parentId:
|
|
3115
|
-
});
|
|
3116
|
-
var VersionCreationJobStatus =
|
|
3117
|
-
var VersionCreationJob =
|
|
3118
|
-
id:
|
|
3119
|
-
version:
|
|
3120
|
-
designSystemId:
|
|
3121
|
-
designSystemVersionId: nullishToOptional(
|
|
3134
|
+
import { z as z119 } from "zod";
|
|
3135
|
+
var DesignSystemVersion = z119.object({
|
|
3136
|
+
id: z119.string(),
|
|
3137
|
+
version: z119.string(),
|
|
3138
|
+
createdAt: z119.date(),
|
|
3139
|
+
designSystemId: z119.string(),
|
|
3140
|
+
name: z119.string(),
|
|
3141
|
+
comment: z119.string(),
|
|
3142
|
+
isReadonly: z119.boolean(),
|
|
3143
|
+
changeLog: z119.string(),
|
|
3144
|
+
parentId: z119.string().optional()
|
|
3145
|
+
});
|
|
3146
|
+
var VersionCreationJobStatus = z119.enum(["Success", "InProgress", "Error"]);
|
|
3147
|
+
var VersionCreationJob = z119.object({
|
|
3148
|
+
id: z119.string(),
|
|
3149
|
+
version: z119.string(),
|
|
3150
|
+
designSystemId: z119.string(),
|
|
3151
|
+
designSystemVersionId: nullishToOptional(z119.string()),
|
|
3122
3152
|
status: VersionCreationJobStatus,
|
|
3123
|
-
errorMessage: nullishToOptional(
|
|
3153
|
+
errorMessage: nullishToOptional(z119.string())
|
|
3124
3154
|
});
|
|
3125
3155
|
|
|
3126
3156
|
// src/export/export-destinations.ts
|
|
3127
3157
|
var BITBUCKET_SLUG = /^[-a-zA-Z0-9~]*$/;
|
|
3128
3158
|
var BITBUCKET_MAX_LENGTH = 64;
|
|
3129
|
-
var ExporterDestinationDocs =
|
|
3159
|
+
var ExporterDestinationDocs = z120.object({
|
|
3130
3160
|
environment: PublishedDocEnvironment
|
|
3131
3161
|
});
|
|
3132
|
-
var ExporterDestinationS3 =
|
|
3133
|
-
var ExporterDestinationGithub =
|
|
3134
|
-
credentialId:
|
|
3162
|
+
var ExporterDestinationS3 = z120.object({});
|
|
3163
|
+
var ExporterDestinationGithub = z120.object({
|
|
3164
|
+
credentialId: z120.string().optional(),
|
|
3135
3165
|
// Repository
|
|
3136
|
-
url:
|
|
3166
|
+
url: z120.string(),
|
|
3137
3167
|
// Location
|
|
3138
|
-
branch:
|
|
3139
|
-
relativePath: nullishToOptional(
|
|
3168
|
+
branch: z120.string(),
|
|
3169
|
+
relativePath: nullishToOptional(z120.string()),
|
|
3140
3170
|
// Legacy deprecated fields. Use `credentialId` instead
|
|
3141
|
-
connectionId: nullishToOptional(
|
|
3142
|
-
userId: nullishToOptional(
|
|
3171
|
+
connectionId: nullishToOptional(z120.string()),
|
|
3172
|
+
userId: nullishToOptional(z120.number())
|
|
3143
3173
|
});
|
|
3144
|
-
var ExporterDestinationAzure =
|
|
3145
|
-
credentialId:
|
|
3174
|
+
var ExporterDestinationAzure = z120.object({
|
|
3175
|
+
credentialId: z120.string().optional(),
|
|
3146
3176
|
// Repository
|
|
3147
|
-
organizationId:
|
|
3148
|
-
projectId:
|
|
3149
|
-
repositoryId:
|
|
3177
|
+
organizationId: z120.string(),
|
|
3178
|
+
projectId: z120.string(),
|
|
3179
|
+
repositoryId: z120.string(),
|
|
3150
3180
|
// Location
|
|
3151
|
-
branch:
|
|
3152
|
-
relativePath: nullishToOptional(
|
|
3181
|
+
branch: z120.string(),
|
|
3182
|
+
relativePath: nullishToOptional(z120.string()),
|
|
3153
3183
|
// Maybe not needed
|
|
3154
|
-
url: nullishToOptional(
|
|
3184
|
+
url: nullishToOptional(z120.string()),
|
|
3155
3185
|
// Legacy deprecated fields. Use `credentialId` instead
|
|
3156
|
-
connectionId: nullishToOptional(
|
|
3157
|
-
userId: nullishToOptional(
|
|
3186
|
+
connectionId: nullishToOptional(z120.string()),
|
|
3187
|
+
userId: nullishToOptional(z120.number())
|
|
3158
3188
|
});
|
|
3159
|
-
var ExporterDestinationGitlab =
|
|
3160
|
-
credentialId:
|
|
3189
|
+
var ExporterDestinationGitlab = z120.object({
|
|
3190
|
+
credentialId: z120.string().optional(),
|
|
3161
3191
|
// Repository
|
|
3162
|
-
projectId:
|
|
3192
|
+
projectId: z120.string(),
|
|
3163
3193
|
// Location
|
|
3164
|
-
branch:
|
|
3165
|
-
relativePath: nullishToOptional(
|
|
3194
|
+
branch: z120.string(),
|
|
3195
|
+
relativePath: nullishToOptional(z120.string()),
|
|
3166
3196
|
// Maybe not needed
|
|
3167
|
-
url: nullishToOptional(
|
|
3197
|
+
url: nullishToOptional(z120.string()),
|
|
3168
3198
|
// Legacy deprecated fields. Use `credentialId` instead
|
|
3169
|
-
connectionId: nullishToOptional(
|
|
3170
|
-
userId: nullishToOptional(
|
|
3199
|
+
connectionId: nullishToOptional(z120.string()),
|
|
3200
|
+
userId: nullishToOptional(z120.number())
|
|
3171
3201
|
});
|
|
3172
|
-
var ExporterDestinationBitbucket =
|
|
3173
|
-
credentialId:
|
|
3202
|
+
var ExporterDestinationBitbucket = z120.object({
|
|
3203
|
+
credentialId: z120.string().optional(),
|
|
3174
3204
|
// Repository
|
|
3175
|
-
workspaceSlug:
|
|
3176
|
-
projectKey:
|
|
3177
|
-
repoSlug:
|
|
3205
|
+
workspaceSlug: z120.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
3206
|
+
projectKey: z120.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
3207
|
+
repoSlug: z120.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
3178
3208
|
// Location
|
|
3179
|
-
branch:
|
|
3180
|
-
relativePath: nullishToOptional(
|
|
3209
|
+
branch: z120.string(),
|
|
3210
|
+
relativePath: nullishToOptional(z120.string()),
|
|
3181
3211
|
// Legacy deprecated fields. Use `credentialId` instead
|
|
3182
|
-
connectionId: nullishToOptional(
|
|
3183
|
-
userId: nullishToOptional(
|
|
3212
|
+
connectionId: nullishToOptional(z120.string()),
|
|
3213
|
+
userId: nullishToOptional(z120.number())
|
|
3184
3214
|
});
|
|
3185
|
-
var ExportDestinationsMap =
|
|
3186
|
-
webhookUrl:
|
|
3215
|
+
var ExportDestinationsMap = z120.object({
|
|
3216
|
+
webhookUrl: z120.string().optional(),
|
|
3187
3217
|
destinationSnDocs: ExporterDestinationDocs.optional(),
|
|
3188
3218
|
destinationS3: ExporterDestinationS3.optional(),
|
|
3189
3219
|
destinationGithub: ExporterDestinationGithub.optional(),
|
|
@@ -3193,128 +3223,128 @@ var ExportDestinationsMap = z119.object({
|
|
|
3193
3223
|
});
|
|
3194
3224
|
|
|
3195
3225
|
// src/export/pipeline.ts
|
|
3196
|
-
var PipelineEventType =
|
|
3197
|
-
var PipelineDestinationGitType =
|
|
3198
|
-
var PipelineDestinationExtraType =
|
|
3199
|
-
var PipelineDestinationType =
|
|
3200
|
-
var Pipeline =
|
|
3201
|
-
id:
|
|
3202
|
-
name:
|
|
3226
|
+
var PipelineEventType = z121.enum(["OnVersionReleased", "OnHeadChanged", "OnSourceUpdated", "None"]);
|
|
3227
|
+
var PipelineDestinationGitType = z121.enum(["Github", "Gitlab", "Bitbucket", "Azure"]);
|
|
3228
|
+
var PipelineDestinationExtraType = z121.enum(["WebhookUrl", "S3", "Documentation"]);
|
|
3229
|
+
var PipelineDestinationType = z121.union([PipelineDestinationGitType, PipelineDestinationExtraType]);
|
|
3230
|
+
var Pipeline = z121.object({
|
|
3231
|
+
id: z121.string(),
|
|
3232
|
+
name: z121.string(),
|
|
3203
3233
|
eventType: PipelineEventType,
|
|
3204
|
-
isEnabled:
|
|
3205
|
-
workspaceId:
|
|
3206
|
-
designSystemId:
|
|
3207
|
-
exporterId:
|
|
3208
|
-
brandPersistentId:
|
|
3209
|
-
themePersistentId:
|
|
3234
|
+
isEnabled: z121.boolean(),
|
|
3235
|
+
workspaceId: z121.string(),
|
|
3236
|
+
designSystemId: z121.string(),
|
|
3237
|
+
exporterId: z121.string(),
|
|
3238
|
+
brandPersistentId: z121.string().optional(),
|
|
3239
|
+
themePersistentId: z121.string().optional(),
|
|
3210
3240
|
// Destinations
|
|
3211
3241
|
...ExportDestinationsMap.shape
|
|
3212
3242
|
});
|
|
3213
3243
|
|
|
3214
3244
|
// src/data-dumps/code-integration-dump.ts
|
|
3215
|
-
var ExportJobDump =
|
|
3216
|
-
id:
|
|
3217
|
-
createdAt:
|
|
3218
|
-
finishedAt:
|
|
3219
|
-
exportArtefacts:
|
|
3245
|
+
var ExportJobDump = z122.object({
|
|
3246
|
+
id: z122.string(),
|
|
3247
|
+
createdAt: z122.coerce.date(),
|
|
3248
|
+
finishedAt: z122.coerce.date(),
|
|
3249
|
+
exportArtefacts: z122.string()
|
|
3220
3250
|
});
|
|
3221
|
-
var CodeIntegrationDump =
|
|
3251
|
+
var CodeIntegrationDump = z122.object({
|
|
3222
3252
|
exporters: Exporter.array(),
|
|
3223
3253
|
pipelines: Pipeline.array(),
|
|
3224
3254
|
exportJobs: ExportJobDump.array()
|
|
3225
3255
|
});
|
|
3226
3256
|
|
|
3227
3257
|
// src/data-dumps/design-system-dump.ts
|
|
3228
|
-
import { z as
|
|
3258
|
+
import { z as z129 } from "zod";
|
|
3229
3259
|
|
|
3230
3260
|
// src/data-dumps/design-system-version-dump.ts
|
|
3231
|
-
import { z as
|
|
3261
|
+
import { z as z128 } from "zod";
|
|
3232
3262
|
|
|
3233
3263
|
// src/liveblocks/rooms/design-system-version-room.ts
|
|
3234
|
-
import { z as
|
|
3264
|
+
import { z as z123 } from "zod";
|
|
3235
3265
|
var DesignSystemVersionRoom = Entity.extend({
|
|
3236
|
-
designSystemVersionId:
|
|
3237
|
-
liveblocksId:
|
|
3266
|
+
designSystemVersionId: z123.string(),
|
|
3267
|
+
liveblocksId: z123.string()
|
|
3238
3268
|
});
|
|
3239
|
-
var DesignSystemVersionRoomInternalSettings =
|
|
3240
|
-
routingVersion:
|
|
3241
|
-
isDraftFeatureAdopted:
|
|
3269
|
+
var DesignSystemVersionRoomInternalSettings = z123.object({
|
|
3270
|
+
routingVersion: z123.string(),
|
|
3271
|
+
isDraftFeatureAdopted: z123.boolean()
|
|
3242
3272
|
});
|
|
3243
|
-
var DesignSystemVersionRoomInitialState =
|
|
3244
|
-
pages:
|
|
3245
|
-
groups:
|
|
3273
|
+
var DesignSystemVersionRoomInitialState = z123.object({
|
|
3274
|
+
pages: z123.array(DocumentationPageV2),
|
|
3275
|
+
groups: z123.array(ElementGroup),
|
|
3246
3276
|
internalSettings: DesignSystemVersionRoomInternalSettings
|
|
3247
3277
|
});
|
|
3248
|
-
var DesignSystemVersionRoomUpdate =
|
|
3249
|
-
pages:
|
|
3250
|
-
groups:
|
|
3251
|
-
deletedPageIds:
|
|
3252
|
-
deletedGroupIds:
|
|
3253
|
-
publishedPageSnapshots:
|
|
3254
|
-
publishedGroupSnapshots:
|
|
3255
|
-
deletedPageSnapshots:
|
|
3256
|
-
deletedGroupSnapshots:
|
|
3278
|
+
var DesignSystemVersionRoomUpdate = z123.object({
|
|
3279
|
+
pages: z123.array(DocumentationPageV2),
|
|
3280
|
+
groups: z123.array(ElementGroup),
|
|
3281
|
+
deletedPageIds: z123.array(z123.string()),
|
|
3282
|
+
deletedGroupIds: z123.array(z123.string()),
|
|
3283
|
+
publishedPageSnapshots: z123.array(DocumentationPageSnapshot),
|
|
3284
|
+
publishedGroupSnapshots: z123.array(ElementGroupSnapshot),
|
|
3285
|
+
deletedPageSnapshots: z123.array(DocumentationPageSnapshot),
|
|
3286
|
+
deletedGroupSnapshots: z123.array(ElementGroupSnapshot)
|
|
3257
3287
|
});
|
|
3258
3288
|
|
|
3259
3289
|
// src/liveblocks/rooms/documentation-page-room.ts
|
|
3260
|
-
import { z as
|
|
3290
|
+
import { z as z124 } from "zod";
|
|
3261
3291
|
var DocumentationPageRoom = Entity.extend({
|
|
3262
|
-
designSystemVersionId:
|
|
3263
|
-
documentationPageId:
|
|
3264
|
-
liveblocksId:
|
|
3265
|
-
isDirty:
|
|
3292
|
+
designSystemVersionId: z124.string(),
|
|
3293
|
+
documentationPageId: z124.string(),
|
|
3294
|
+
liveblocksId: z124.string(),
|
|
3295
|
+
isDirty: z124.boolean()
|
|
3266
3296
|
});
|
|
3267
|
-
var DocumentationPageRoomState =
|
|
3268
|
-
pageItems:
|
|
3297
|
+
var DocumentationPageRoomState = z124.object({
|
|
3298
|
+
pageItems: z124.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
3269
3299
|
itemConfiguration: DocumentationItemConfigurationV2
|
|
3270
3300
|
});
|
|
3271
|
-
var DocumentationPageRoomRoomUpdate =
|
|
3301
|
+
var DocumentationPageRoomRoomUpdate = z124.object({
|
|
3272
3302
|
page: DocumentationPageV2,
|
|
3273
3303
|
pageParent: ElementGroup
|
|
3274
3304
|
});
|
|
3275
3305
|
var DocumentationPageRoomInitialStateUpdate = DocumentationPageRoomRoomUpdate.extend({
|
|
3276
|
-
pageItems:
|
|
3277
|
-
blockDefinitions:
|
|
3306
|
+
pageItems: z124.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
3307
|
+
blockDefinitions: z124.array(PageBlockDefinition)
|
|
3278
3308
|
});
|
|
3279
3309
|
|
|
3280
3310
|
// src/liveblocks/rooms/room-type.ts
|
|
3281
|
-
import { z as
|
|
3311
|
+
import { z as z125 } from "zod";
|
|
3282
3312
|
var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
3283
3313
|
RoomTypeEnum2["DocumentationPage"] = "documentation-page";
|
|
3284
3314
|
RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
|
|
3285
3315
|
RoomTypeEnum2["Workspace"] = "workspace";
|
|
3286
3316
|
return RoomTypeEnum2;
|
|
3287
3317
|
})(RoomTypeEnum || {});
|
|
3288
|
-
var RoomTypeSchema =
|
|
3318
|
+
var RoomTypeSchema = z125.nativeEnum(RoomTypeEnum);
|
|
3289
3319
|
var RoomType = RoomTypeSchema.enum;
|
|
3290
3320
|
|
|
3291
3321
|
// src/liveblocks/rooms/workspace-room.ts
|
|
3292
|
-
import { z as
|
|
3322
|
+
import { z as z126 } from "zod";
|
|
3293
3323
|
var WorkspaceRoom = Entity.extend({
|
|
3294
|
-
workspaceId:
|
|
3295
|
-
liveblocksId:
|
|
3324
|
+
workspaceId: z126.string(),
|
|
3325
|
+
liveblocksId: z126.string()
|
|
3296
3326
|
});
|
|
3297
3327
|
|
|
3298
3328
|
// src/data-dumps/published-docs-dump.ts
|
|
3299
|
-
import { z as
|
|
3300
|
-
var PublishedDocsDump =
|
|
3329
|
+
import { z as z127 } from "zod";
|
|
3330
|
+
var PublishedDocsDump = z127.object({
|
|
3301
3331
|
documentation: PublishedDoc,
|
|
3302
3332
|
pages: PublishedDocPage.array()
|
|
3303
3333
|
});
|
|
3304
3334
|
|
|
3305
3335
|
// src/data-dumps/design-system-version-dump.ts
|
|
3306
|
-
var DocumentationThreadDump =
|
|
3336
|
+
var DocumentationThreadDump = z128.object({
|
|
3307
3337
|
thread: DocumentationCommentThread,
|
|
3308
3338
|
comments: DocumentationComment.array()
|
|
3309
3339
|
});
|
|
3310
|
-
var DocumentationPageRoomDump =
|
|
3340
|
+
var DocumentationPageRoomDump = z128.object({
|
|
3311
3341
|
room: DocumentationPageRoom,
|
|
3312
3342
|
threads: DocumentationThreadDump.array()
|
|
3313
3343
|
});
|
|
3314
|
-
var DesignSystemVersionMultiplayerDump =
|
|
3344
|
+
var DesignSystemVersionMultiplayerDump = z128.object({
|
|
3315
3345
|
documentationPages: DocumentationPageRoomDump.array()
|
|
3316
3346
|
});
|
|
3317
|
-
var DesignSystemVersionDump =
|
|
3347
|
+
var DesignSystemVersionDump = z128.object({
|
|
3318
3348
|
version: DesignSystemVersion,
|
|
3319
3349
|
brands: Brand.array(),
|
|
3320
3350
|
elements: DesignElement.array(),
|
|
@@ -3329,7 +3359,7 @@ var DesignSystemVersionDump = z127.object({
|
|
|
3329
3359
|
});
|
|
3330
3360
|
|
|
3331
3361
|
// src/data-dumps/design-system-dump.ts
|
|
3332
|
-
var DesignSystemDump =
|
|
3362
|
+
var DesignSystemDump = z129.object({
|
|
3333
3363
|
designSystem: DesignSystem,
|
|
3334
3364
|
dataSources: DataSource.array(),
|
|
3335
3365
|
versions: DesignSystemVersionDump.array(),
|
|
@@ -3338,27 +3368,27 @@ var DesignSystemDump = z128.object({
|
|
|
3338
3368
|
});
|
|
3339
3369
|
|
|
3340
3370
|
// src/data-dumps/user-data-dump.ts
|
|
3341
|
-
import { z as
|
|
3371
|
+
import { z as z142 } from "zod";
|
|
3342
3372
|
|
|
3343
3373
|
// src/users/linked-integrations.ts
|
|
3344
|
-
import { z as
|
|
3345
|
-
var IntegrationAuthType =
|
|
3346
|
-
var ExternalServiceType =
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3374
|
+
import { z as z130 } from "zod";
|
|
3375
|
+
var IntegrationAuthType = z130.union([z130.literal("OAuth2"), z130.literal("PAT")]);
|
|
3376
|
+
var ExternalServiceType = z130.union([
|
|
3377
|
+
z130.literal("figma"),
|
|
3378
|
+
z130.literal("github"),
|
|
3379
|
+
z130.literal("azure"),
|
|
3380
|
+
z130.literal("gitlab"),
|
|
3381
|
+
z130.literal("bitbucket")
|
|
3352
3382
|
]);
|
|
3353
|
-
var IntegrationUserInfo =
|
|
3354
|
-
id:
|
|
3355
|
-
handle:
|
|
3356
|
-
avatarUrl:
|
|
3357
|
-
email:
|
|
3383
|
+
var IntegrationUserInfo = z130.object({
|
|
3384
|
+
id: z130.string(),
|
|
3385
|
+
handle: z130.string().optional(),
|
|
3386
|
+
avatarUrl: z130.string().optional(),
|
|
3387
|
+
email: z130.string().optional(),
|
|
3358
3388
|
authType: IntegrationAuthType.optional(),
|
|
3359
|
-
customUrl:
|
|
3389
|
+
customUrl: z130.string().optional()
|
|
3360
3390
|
});
|
|
3361
|
-
var UserLinkedIntegrations =
|
|
3391
|
+
var UserLinkedIntegrations = z130.object({
|
|
3362
3392
|
figma: IntegrationUserInfo.optional(),
|
|
3363
3393
|
github: IntegrationUserInfo.array().optional(),
|
|
3364
3394
|
azure: IntegrationUserInfo.array().optional(),
|
|
@@ -3367,46 +3397,46 @@ var UserLinkedIntegrations = z129.object({
|
|
|
3367
3397
|
});
|
|
3368
3398
|
|
|
3369
3399
|
// src/users/user-analytics-cleanup-schedule.ts
|
|
3370
|
-
import { z as
|
|
3371
|
-
var UserAnalyticsCleanupSchedule =
|
|
3372
|
-
userId:
|
|
3373
|
-
createdAt:
|
|
3374
|
-
deleteAt:
|
|
3400
|
+
import { z as z131 } from "zod";
|
|
3401
|
+
var UserAnalyticsCleanupSchedule = z131.object({
|
|
3402
|
+
userId: z131.string(),
|
|
3403
|
+
createdAt: z131.coerce.date(),
|
|
3404
|
+
deleteAt: z131.coerce.date()
|
|
3375
3405
|
});
|
|
3376
3406
|
var UserAnalyticsCleanupScheduleDbInput = UserAnalyticsCleanupSchedule.omit({
|
|
3377
3407
|
createdAt: true
|
|
3378
3408
|
});
|
|
3379
3409
|
|
|
3380
3410
|
// src/users/user-create.ts
|
|
3381
|
-
import { z as
|
|
3382
|
-
var CreateUserInput =
|
|
3383
|
-
email:
|
|
3384
|
-
name:
|
|
3385
|
-
username:
|
|
3411
|
+
import { z as z132 } from "zod";
|
|
3412
|
+
var CreateUserInput = z132.object({
|
|
3413
|
+
email: z132.string(),
|
|
3414
|
+
name: z132.string(),
|
|
3415
|
+
username: z132.string()
|
|
3386
3416
|
});
|
|
3387
3417
|
|
|
3388
3418
|
// src/users/user-identity.ts
|
|
3389
|
-
import { z as
|
|
3390
|
-
var UserIdentity =
|
|
3391
|
-
id:
|
|
3392
|
-
userId:
|
|
3419
|
+
import { z as z133 } from "zod";
|
|
3420
|
+
var UserIdentity = z133.object({
|
|
3421
|
+
id: z133.string(),
|
|
3422
|
+
userId: z133.string()
|
|
3393
3423
|
});
|
|
3394
3424
|
|
|
3395
3425
|
// src/users/user-minified.ts
|
|
3396
|
-
import { z as
|
|
3397
|
-
var UserMinified =
|
|
3398
|
-
id:
|
|
3399
|
-
name:
|
|
3400
|
-
email:
|
|
3401
|
-
avatar:
|
|
3426
|
+
import { z as z134 } from "zod";
|
|
3427
|
+
var UserMinified = z134.object({
|
|
3428
|
+
id: z134.string(),
|
|
3429
|
+
name: z134.string(),
|
|
3430
|
+
email: z134.string(),
|
|
3431
|
+
avatar: z134.string().optional()
|
|
3402
3432
|
});
|
|
3403
3433
|
|
|
3404
3434
|
// src/users/user-notification-settings.ts
|
|
3405
|
-
import { z as
|
|
3406
|
-
var LiveblocksNotificationSettings =
|
|
3407
|
-
sendCommentNotificationEmails:
|
|
3435
|
+
import { z as z135 } from "zod";
|
|
3436
|
+
var LiveblocksNotificationSettings = z135.object({
|
|
3437
|
+
sendCommentNotificationEmails: z135.boolean()
|
|
3408
3438
|
});
|
|
3409
|
-
var UserNotificationSettings =
|
|
3439
|
+
var UserNotificationSettings = z135.object({
|
|
3410
3440
|
liveblocksNotificationSettings: LiveblocksNotificationSettings
|
|
3411
3441
|
});
|
|
3412
3442
|
var defaultNotificationSettings = {
|
|
@@ -3416,25 +3446,25 @@ var defaultNotificationSettings = {
|
|
|
3416
3446
|
};
|
|
3417
3447
|
|
|
3418
3448
|
// src/users/user-profile.ts
|
|
3419
|
-
import { z as
|
|
3420
|
-
var UserOnboardingDepartment =
|
|
3421
|
-
var UserOnboardingJobLevel =
|
|
3422
|
-
var UserOnboarding =
|
|
3423
|
-
companyName:
|
|
3424
|
-
numberOfPeopleInOrg:
|
|
3425
|
-
numberOfPeopleInDesignTeam:
|
|
3449
|
+
import { z as z136 } from "zod";
|
|
3450
|
+
var UserOnboardingDepartment = z136.enum(["Design", "Engineering", "Product", "Brand", "Other"]);
|
|
3451
|
+
var UserOnboardingJobLevel = z136.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
3452
|
+
var UserOnboarding = z136.object({
|
|
3453
|
+
companyName: z136.string().optional(),
|
|
3454
|
+
numberOfPeopleInOrg: z136.string().optional(),
|
|
3455
|
+
numberOfPeopleInDesignTeam: z136.string().optional(),
|
|
3426
3456
|
department: UserOnboardingDepartment.optional(),
|
|
3427
|
-
jobTitle:
|
|
3428
|
-
phase:
|
|
3457
|
+
jobTitle: z136.string().optional(),
|
|
3458
|
+
phase: z136.string().optional(),
|
|
3429
3459
|
jobLevel: UserOnboardingJobLevel.optional(),
|
|
3430
|
-
designSystemName:
|
|
3431
|
-
defaultDestination:
|
|
3432
|
-
figmaUrl:
|
|
3433
|
-
});
|
|
3434
|
-
var UserProfile =
|
|
3435
|
-
name:
|
|
3436
|
-
avatar:
|
|
3437
|
-
nickname:
|
|
3460
|
+
designSystemName: z136.string().optional(),
|
|
3461
|
+
defaultDestination: z136.string().optional(),
|
|
3462
|
+
figmaUrl: z136.string().optional()
|
|
3463
|
+
});
|
|
3464
|
+
var UserProfile = z136.object({
|
|
3465
|
+
name: z136.string(),
|
|
3466
|
+
avatar: z136.string().optional(),
|
|
3467
|
+
nickname: z136.string().optional(),
|
|
3438
3468
|
onboarding: UserOnboarding.optional()
|
|
3439
3469
|
});
|
|
3440
3470
|
var UserProfileUpdate = UserProfile.partial().omit({
|
|
@@ -3442,31 +3472,31 @@ var UserProfileUpdate = UserProfile.partial().omit({
|
|
|
3442
3472
|
});
|
|
3443
3473
|
|
|
3444
3474
|
// src/users/user-test.ts
|
|
3445
|
-
import { z as
|
|
3446
|
-
var UserTest =
|
|
3447
|
-
id:
|
|
3448
|
-
email:
|
|
3475
|
+
import { z as z137 } from "zod";
|
|
3476
|
+
var UserTest = z137.object({
|
|
3477
|
+
id: z137.string(),
|
|
3478
|
+
email: z137.string()
|
|
3449
3479
|
});
|
|
3450
3480
|
|
|
3451
3481
|
// src/users/user.ts
|
|
3452
|
-
import { z as
|
|
3453
|
-
var User =
|
|
3454
|
-
id:
|
|
3455
|
-
email:
|
|
3456
|
-
emailVerified:
|
|
3457
|
-
createdAt:
|
|
3458
|
-
trialExpiresAt:
|
|
3482
|
+
import { z as z138 } from "zod";
|
|
3483
|
+
var User = z138.object({
|
|
3484
|
+
id: z138.string(),
|
|
3485
|
+
email: z138.string(),
|
|
3486
|
+
emailVerified: z138.boolean(),
|
|
3487
|
+
createdAt: z138.coerce.date(),
|
|
3488
|
+
trialExpiresAt: z138.coerce.date().optional(),
|
|
3459
3489
|
profile: UserProfile,
|
|
3460
3490
|
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
3461
|
-
loggedOutAt:
|
|
3462
|
-
isProtected:
|
|
3491
|
+
loggedOutAt: z138.coerce.date().optional(),
|
|
3492
|
+
isProtected: z138.boolean()
|
|
3463
3493
|
});
|
|
3464
3494
|
|
|
3465
3495
|
// src/data-dumps/workspace-dump.ts
|
|
3466
|
-
import { z as
|
|
3496
|
+
import { z as z141 } from "zod";
|
|
3467
3497
|
|
|
3468
3498
|
// src/integrations/integration.ts
|
|
3469
|
-
import { z as
|
|
3499
|
+
import { z as z140 } from "zod";
|
|
3470
3500
|
|
|
3471
3501
|
// src/utils/errors.ts
|
|
3472
3502
|
var SupernovaException = class _SupernovaException extends Error {
|
|
@@ -3621,26 +3651,26 @@ function uniqueBy(items, prop) {
|
|
|
3621
3651
|
}
|
|
3622
3652
|
|
|
3623
3653
|
// src/utils/content-loader-instruction.ts
|
|
3624
|
-
import { z as
|
|
3625
|
-
var ContentLoadInstruction =
|
|
3626
|
-
from:
|
|
3627
|
-
to:
|
|
3628
|
-
authorizationHeaderKvsId:
|
|
3629
|
-
timeout:
|
|
3630
|
-
});
|
|
3631
|
-
var ContentLoaderPayload =
|
|
3632
|
-
type:
|
|
3654
|
+
import { z as z139 } from "zod";
|
|
3655
|
+
var ContentLoadInstruction = z139.object({
|
|
3656
|
+
from: z139.string(),
|
|
3657
|
+
to: z139.string(),
|
|
3658
|
+
authorizationHeaderKvsId: z139.string().optional(),
|
|
3659
|
+
timeout: z139.number().optional()
|
|
3660
|
+
});
|
|
3661
|
+
var ContentLoaderPayload = z139.object({
|
|
3662
|
+
type: z139.literal("Single"),
|
|
3633
3663
|
instruction: ContentLoadInstruction
|
|
3634
3664
|
}).or(
|
|
3635
|
-
|
|
3636
|
-
type:
|
|
3637
|
-
loadingChunkSize:
|
|
3638
|
-
instructions:
|
|
3665
|
+
z139.object({
|
|
3666
|
+
type: z139.literal("Multiple"),
|
|
3667
|
+
loadingChunkSize: z139.number().optional(),
|
|
3668
|
+
instructions: z139.array(ContentLoadInstruction)
|
|
3639
3669
|
})
|
|
3640
3670
|
).or(
|
|
3641
|
-
|
|
3642
|
-
type:
|
|
3643
|
-
location:
|
|
3671
|
+
z139.object({
|
|
3672
|
+
type: z139.literal("S3"),
|
|
3673
|
+
location: z139.string()
|
|
3644
3674
|
})
|
|
3645
3675
|
);
|
|
3646
3676
|
|
|
@@ -4340,43 +4370,43 @@ function isSlugReserved(slug) {
|
|
|
4340
4370
|
var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
4341
4371
|
|
|
4342
4372
|
// src/integrations/integration.ts
|
|
4343
|
-
var IntegrationDesignSystem =
|
|
4344
|
-
designSystemId:
|
|
4345
|
-
brandId:
|
|
4346
|
-
title:
|
|
4347
|
-
userId:
|
|
4348
|
-
date:
|
|
4349
|
-
});
|
|
4350
|
-
var IntegrationCredentialsType =
|
|
4351
|
-
var IntegrationCredentialsState =
|
|
4352
|
-
var IntegrationCredentialsProfile =
|
|
4353
|
-
id: nullishToOptional(
|
|
4354
|
-
email: nullishToOptional(
|
|
4355
|
-
handle: nullishToOptional(
|
|
4356
|
-
type: nullishToOptional(
|
|
4357
|
-
avatarUrl: nullishToOptional(
|
|
4358
|
-
organization: nullishToOptional(
|
|
4359
|
-
collection: nullishToOptional(
|
|
4360
|
-
});
|
|
4361
|
-
var IntegrationCredentials =
|
|
4362
|
-
id:
|
|
4373
|
+
var IntegrationDesignSystem = z140.object({
|
|
4374
|
+
designSystemId: z140.string(),
|
|
4375
|
+
brandId: z140.string(),
|
|
4376
|
+
title: z140.string().optional(),
|
|
4377
|
+
userId: z140.string().optional(),
|
|
4378
|
+
date: z140.coerce.date().optional()
|
|
4379
|
+
});
|
|
4380
|
+
var IntegrationCredentialsType = z140.enum(["OAuth2", "PAT", "GithubApp"]);
|
|
4381
|
+
var IntegrationCredentialsState = z140.enum(["Active", "Inactive"]);
|
|
4382
|
+
var IntegrationCredentialsProfile = z140.object({
|
|
4383
|
+
id: nullishToOptional(z140.string()),
|
|
4384
|
+
email: nullishToOptional(z140.string()),
|
|
4385
|
+
handle: nullishToOptional(z140.string()),
|
|
4386
|
+
type: nullishToOptional(z140.string()),
|
|
4387
|
+
avatarUrl: nullishToOptional(z140.string()),
|
|
4388
|
+
organization: nullishToOptional(z140.string()),
|
|
4389
|
+
collection: nullishToOptional(z140.string())
|
|
4390
|
+
});
|
|
4391
|
+
var IntegrationCredentials = z140.object({
|
|
4392
|
+
id: z140.string(),
|
|
4363
4393
|
type: IntegrationCredentialsType,
|
|
4364
|
-
integrationId:
|
|
4365
|
-
accessToken:
|
|
4366
|
-
userId:
|
|
4367
|
-
createdAt:
|
|
4368
|
-
refreshToken:
|
|
4369
|
-
tokenName:
|
|
4370
|
-
expiresAt:
|
|
4371
|
-
refreshedAt:
|
|
4372
|
-
username:
|
|
4373
|
-
appInstallationId:
|
|
4394
|
+
integrationId: z140.string(),
|
|
4395
|
+
accessToken: z140.string(),
|
|
4396
|
+
userId: z140.string(),
|
|
4397
|
+
createdAt: z140.coerce.date(),
|
|
4398
|
+
refreshToken: z140.string().optional(),
|
|
4399
|
+
tokenName: z140.string().optional(),
|
|
4400
|
+
expiresAt: z140.coerce.date().optional(),
|
|
4401
|
+
refreshedAt: z140.coerce.date().optional(),
|
|
4402
|
+
username: z140.string().optional(),
|
|
4403
|
+
appInstallationId: z140.string().optional(),
|
|
4374
4404
|
profile: IntegrationCredentialsProfile.optional(),
|
|
4375
|
-
customUrl:
|
|
4405
|
+
customUrl: z140.string().optional(),
|
|
4376
4406
|
state: IntegrationCredentialsState,
|
|
4377
4407
|
user: UserMinified.optional()
|
|
4378
4408
|
});
|
|
4379
|
-
var ExtendedIntegrationType =
|
|
4409
|
+
var ExtendedIntegrationType = z140.enum([
|
|
4380
4410
|
"Figma",
|
|
4381
4411
|
"Github",
|
|
4382
4412
|
"Gitlab",
|
|
@@ -4387,26 +4417,26 @@ var ExtendedIntegrationType = z139.enum([
|
|
|
4387
4417
|
]);
|
|
4388
4418
|
var IntegrationType = ExtendedIntegrationType.exclude(["TokenStudio", "FigmaVariablesPlugin"]);
|
|
4389
4419
|
var GitIntegrationType = IntegrationType.exclude(["Figma"]);
|
|
4390
|
-
var Integration =
|
|
4391
|
-
id:
|
|
4392
|
-
workspaceId:
|
|
4420
|
+
var Integration = z140.object({
|
|
4421
|
+
id: z140.string(),
|
|
4422
|
+
workspaceId: z140.string(),
|
|
4393
4423
|
type: IntegrationType,
|
|
4394
|
-
createdAt:
|
|
4395
|
-
integrationCredentials:
|
|
4396
|
-
});
|
|
4397
|
-
var IntegrationToken =
|
|
4398
|
-
access_token:
|
|
4399
|
-
refresh_token:
|
|
4400
|
-
expires_in:
|
|
4401
|
-
token_type:
|
|
4402
|
-
token_name:
|
|
4403
|
-
token_azure_organization_name:
|
|
4424
|
+
createdAt: z140.coerce.date(),
|
|
4425
|
+
integrationCredentials: z140.array(IntegrationCredentials).optional()
|
|
4426
|
+
});
|
|
4427
|
+
var IntegrationToken = z140.object({
|
|
4428
|
+
access_token: z140.string(),
|
|
4429
|
+
refresh_token: z140.string().optional(),
|
|
4430
|
+
expires_in: z140.union([z140.number().optional(), z140.string().optional()]),
|
|
4431
|
+
token_type: z140.string().optional(),
|
|
4432
|
+
token_name: z140.string().optional(),
|
|
4433
|
+
token_azure_organization_name: z140.string().optional(),
|
|
4404
4434
|
// Azure Cloud PAT only
|
|
4405
|
-
token_azure_collection_name:
|
|
4435
|
+
token_azure_collection_name: z140.string().optional(),
|
|
4406
4436
|
// Azure Server PAT only
|
|
4407
|
-
token_bitbucket_username:
|
|
4437
|
+
token_bitbucket_username: z140.string().optional(),
|
|
4408
4438
|
// Bitbucket only
|
|
4409
|
-
custom_url:
|
|
4439
|
+
custom_url: z140.string().optional().transform((value) => {
|
|
4410
4440
|
if (!value?.trim())
|
|
4411
4441
|
return void 0;
|
|
4412
4442
|
return formatCustomUrl(value);
|
|
@@ -4444,7 +4474,7 @@ function formatCustomUrl(url) {
|
|
|
4444
4474
|
}
|
|
4445
4475
|
|
|
4446
4476
|
// src/data-dumps/workspace-dump.ts
|
|
4447
|
-
var WorkspaceDump =
|
|
4477
|
+
var WorkspaceDump = z141.object({
|
|
4448
4478
|
workspace: Workspace,
|
|
4449
4479
|
designSystems: DesignSystemDump.array(),
|
|
4450
4480
|
codeIntegration: CodeIntegrationDump,
|
|
@@ -4452,70 +4482,70 @@ var WorkspaceDump = z140.object({
|
|
|
4452
4482
|
});
|
|
4453
4483
|
|
|
4454
4484
|
// src/data-dumps/user-data-dump.ts
|
|
4455
|
-
var UserDump =
|
|
4485
|
+
var UserDump = z142.object({
|
|
4456
4486
|
user: User,
|
|
4457
4487
|
workspaces: WorkspaceDump.array()
|
|
4458
4488
|
});
|
|
4459
4489
|
|
|
4460
4490
|
// src/docs-server/session.ts
|
|
4461
|
-
import { z as
|
|
4462
|
-
var NpmProxyToken =
|
|
4463
|
-
access:
|
|
4464
|
-
expiresAt:
|
|
4491
|
+
import { z as z143 } from "zod";
|
|
4492
|
+
var NpmProxyToken = z143.object({
|
|
4493
|
+
access: z143.string(),
|
|
4494
|
+
expiresAt: z143.number()
|
|
4465
4495
|
});
|
|
4466
|
-
var SessionData =
|
|
4467
|
-
returnToUrl:
|
|
4496
|
+
var SessionData = z143.object({
|
|
4497
|
+
returnToUrl: z143.string().optional(),
|
|
4468
4498
|
npmProxyToken: NpmProxyToken.optional()
|
|
4469
4499
|
});
|
|
4470
|
-
var Session =
|
|
4471
|
-
id:
|
|
4472
|
-
expiresAt:
|
|
4473
|
-
userId:
|
|
4500
|
+
var Session = z143.object({
|
|
4501
|
+
id: z143.string(),
|
|
4502
|
+
expiresAt: z143.coerce.date(),
|
|
4503
|
+
userId: z143.string().nullable(),
|
|
4474
4504
|
data: SessionData
|
|
4475
4505
|
});
|
|
4476
|
-
var AuthTokens =
|
|
4477
|
-
access:
|
|
4478
|
-
refresh:
|
|
4506
|
+
var AuthTokens = z143.object({
|
|
4507
|
+
access: z143.string(),
|
|
4508
|
+
refresh: z143.string()
|
|
4479
4509
|
});
|
|
4480
|
-
var UserSession =
|
|
4510
|
+
var UserSession = z143.object({
|
|
4481
4511
|
session: Session,
|
|
4482
4512
|
user: User.nullable()
|
|
4483
4513
|
});
|
|
4484
4514
|
|
|
4485
4515
|
// src/export/export-runner/export-context.ts
|
|
4486
|
-
import { z as
|
|
4487
|
-
var ExportJobDocumentationContext =
|
|
4488
|
-
isSingleVersionDocs:
|
|
4489
|
-
versionSlug:
|
|
4516
|
+
import { z as z144 } from "zod";
|
|
4517
|
+
var ExportJobDocumentationContext = z144.object({
|
|
4518
|
+
isSingleVersionDocs: z144.boolean(),
|
|
4519
|
+
versionSlug: z144.string(),
|
|
4490
4520
|
environment: PublishedDocEnvironment
|
|
4491
4521
|
});
|
|
4492
|
-
var ExportJobContext =
|
|
4493
|
-
apiUrl:
|
|
4494
|
-
accessToken:
|
|
4495
|
-
designSystemId:
|
|
4496
|
-
designSystemName:
|
|
4497
|
-
exporterId:
|
|
4498
|
-
versionId:
|
|
4499
|
-
brandId:
|
|
4500
|
-
themeId:
|
|
4501
|
-
exporterName:
|
|
4502
|
-
exporterPackageUrl:
|
|
4522
|
+
var ExportJobContext = z144.object({
|
|
4523
|
+
apiUrl: z144.string(),
|
|
4524
|
+
accessToken: z144.string(),
|
|
4525
|
+
designSystemId: z144.string(),
|
|
4526
|
+
designSystemName: z144.string(),
|
|
4527
|
+
exporterId: z144.string(),
|
|
4528
|
+
versionId: z144.string(),
|
|
4529
|
+
brandId: z144.string().optional(),
|
|
4530
|
+
themeId: z144.string().optional(),
|
|
4531
|
+
exporterName: z144.string(),
|
|
4532
|
+
exporterPackageUrl: z144.string(),
|
|
4503
4533
|
exporterPropertyValues: ExporterPropertyValue.array(),
|
|
4504
4534
|
documentation: ExportJobDocumentationContext.optional()
|
|
4505
4535
|
});
|
|
4506
4536
|
|
|
4507
4537
|
// src/export/export-runner/exporter-payload.ts
|
|
4508
|
-
import { z as
|
|
4509
|
-
var ExporterFunctionPayload =
|
|
4510
|
-
exportJobId:
|
|
4511
|
-
exportContextId:
|
|
4512
|
-
designSystemId:
|
|
4513
|
-
workspaceId:
|
|
4538
|
+
import { z as z145 } from "zod";
|
|
4539
|
+
var ExporterFunctionPayload = z145.object({
|
|
4540
|
+
exportJobId: z145.string(),
|
|
4541
|
+
exportContextId: z145.string(),
|
|
4542
|
+
designSystemId: z145.string(),
|
|
4543
|
+
workspaceId: z145.string()
|
|
4514
4544
|
});
|
|
4515
4545
|
|
|
4516
4546
|
// src/export/export-jobs.ts
|
|
4517
|
-
import { z as
|
|
4518
|
-
var ExportJobDestinationType =
|
|
4547
|
+
import { z as z146 } from "zod";
|
|
4548
|
+
var ExportJobDestinationType = z146.enum([
|
|
4519
4549
|
"s3",
|
|
4520
4550
|
"webhookUrl",
|
|
4521
4551
|
"github",
|
|
@@ -4524,30 +4554,30 @@ var ExportJobDestinationType = z145.enum([
|
|
|
4524
4554
|
"gitlab",
|
|
4525
4555
|
"bitbucket"
|
|
4526
4556
|
]);
|
|
4527
|
-
var ExportJobStatus =
|
|
4528
|
-
var ExportJobLogEntryType =
|
|
4529
|
-
var ExportJobLogEntry =
|
|
4530
|
-
id:
|
|
4531
|
-
time:
|
|
4557
|
+
var ExportJobStatus = z146.enum(["InProgress", "Success", "Failed", "Timeout"]);
|
|
4558
|
+
var ExportJobLogEntryType = z146.enum(["success", "info", "warning", "error", "user"]);
|
|
4559
|
+
var ExportJobLogEntry = z146.object({
|
|
4560
|
+
id: z146.string().optional(),
|
|
4561
|
+
time: z146.coerce.date(),
|
|
4532
4562
|
type: ExportJobLogEntryType,
|
|
4533
|
-
message:
|
|
4563
|
+
message: z146.string()
|
|
4534
4564
|
});
|
|
4535
|
-
var ExportJobPullRequestDestinationResult =
|
|
4536
|
-
pullRequestUrl:
|
|
4565
|
+
var ExportJobPullRequestDestinationResult = z146.object({
|
|
4566
|
+
pullRequestUrl: z146.string()
|
|
4537
4567
|
});
|
|
4538
|
-
var ExportJobS3DestinationResult =
|
|
4539
|
-
bucket:
|
|
4540
|
-
urlPrefix:
|
|
4541
|
-
path:
|
|
4542
|
-
files:
|
|
4543
|
-
url: nullishToOptional(
|
|
4544
|
-
urls: nullishToOptional(
|
|
4568
|
+
var ExportJobS3DestinationResult = z146.object({
|
|
4569
|
+
bucket: z146.string(),
|
|
4570
|
+
urlPrefix: z146.string().optional(),
|
|
4571
|
+
path: z146.string(),
|
|
4572
|
+
files: z146.array(z146.string()),
|
|
4573
|
+
url: nullishToOptional(z146.string()),
|
|
4574
|
+
urls: nullishToOptional(z146.string().array())
|
|
4545
4575
|
});
|
|
4546
|
-
var ExportJobDocsDestinationResult =
|
|
4547
|
-
url:
|
|
4576
|
+
var ExportJobDocsDestinationResult = z146.object({
|
|
4577
|
+
url: z146.string()
|
|
4548
4578
|
});
|
|
4549
|
-
var ExportJobResult =
|
|
4550
|
-
error:
|
|
4579
|
+
var ExportJobResult = z146.object({
|
|
4580
|
+
error: z146.string().optional(),
|
|
4551
4581
|
s3: nullishToOptional(ExportJobS3DestinationResult),
|
|
4552
4582
|
github: nullishToOptional(ExportJobPullRequestDestinationResult),
|
|
4553
4583
|
azure: nullishToOptional(ExportJobPullRequestDestinationResult),
|
|
@@ -4556,21 +4586,21 @@ var ExportJobResult = z145.object({
|
|
|
4556
4586
|
sndocs: nullishToOptional(ExportJobDocsDestinationResult),
|
|
4557
4587
|
logs: nullishToOptional(ExportJobLogEntry.array())
|
|
4558
4588
|
});
|
|
4559
|
-
var ExportJob =
|
|
4560
|
-
id:
|
|
4561
|
-
createdAt:
|
|
4562
|
-
finishedAt:
|
|
4563
|
-
designSystemId:
|
|
4564
|
-
designSystemVersionId:
|
|
4565
|
-
workspaceId:
|
|
4566
|
-
scheduleId:
|
|
4567
|
-
exporterId:
|
|
4568
|
-
brandId:
|
|
4569
|
-
themeId:
|
|
4570
|
-
estimatedExecutionTime:
|
|
4589
|
+
var ExportJob = z146.object({
|
|
4590
|
+
id: z146.string(),
|
|
4591
|
+
createdAt: z146.coerce.date(),
|
|
4592
|
+
finishedAt: z146.coerce.date().optional(),
|
|
4593
|
+
designSystemId: z146.string(),
|
|
4594
|
+
designSystemVersionId: z146.string(),
|
|
4595
|
+
workspaceId: z146.string(),
|
|
4596
|
+
scheduleId: z146.string().nullish(),
|
|
4597
|
+
exporterId: z146.string(),
|
|
4598
|
+
brandId: z146.string().optional(),
|
|
4599
|
+
themeId: z146.string().optional(),
|
|
4600
|
+
estimatedExecutionTime: z146.number().optional(),
|
|
4571
4601
|
status: ExportJobStatus,
|
|
4572
4602
|
result: ExportJobResult.optional(),
|
|
4573
|
-
createdByUserId:
|
|
4603
|
+
createdByUserId: z146.string().optional(),
|
|
4574
4604
|
// Destinations
|
|
4575
4605
|
...ExportDestinationsMap.shape
|
|
4576
4606
|
});
|
|
@@ -4584,40 +4614,40 @@ var ExportJobFindByFilter = ExportJob.pick({
|
|
|
4584
4614
|
themeId: true,
|
|
4585
4615
|
brandId: true
|
|
4586
4616
|
}).extend({
|
|
4587
|
-
destinations:
|
|
4617
|
+
destinations: z146.array(ExportJobDestinationType),
|
|
4588
4618
|
docsEnvironment: PublishedDocEnvironment
|
|
4589
4619
|
}).partial();
|
|
4590
4620
|
|
|
4591
4621
|
// src/export/exporter-workspace-membership-role.ts
|
|
4592
|
-
import { z as
|
|
4593
|
-
var ExporterWorkspaceMembershipRole =
|
|
4622
|
+
import { z as z147 } from "zod";
|
|
4623
|
+
var ExporterWorkspaceMembershipRole = z147.enum(["Owner", "OwnerArchived", "User"]);
|
|
4594
4624
|
|
|
4595
4625
|
// src/export/exporter-workspace-membership.ts
|
|
4596
|
-
import { z as
|
|
4597
|
-
var ExporterWorkspaceMembership =
|
|
4598
|
-
id:
|
|
4599
|
-
workspaceId:
|
|
4600
|
-
exporterId:
|
|
4626
|
+
import { z as z148 } from "zod";
|
|
4627
|
+
var ExporterWorkspaceMembership = z148.object({
|
|
4628
|
+
id: z148.string(),
|
|
4629
|
+
workspaceId: z148.string(),
|
|
4630
|
+
exporterId: z148.string(),
|
|
4601
4631
|
role: ExporterWorkspaceMembershipRole
|
|
4602
4632
|
});
|
|
4603
4633
|
|
|
4604
4634
|
// src/feature-flags/feature-flags.ts
|
|
4605
|
-
import { z as
|
|
4606
|
-
var FlaggedFeature =
|
|
4607
|
-
var FeatureFlagMap =
|
|
4608
|
-
var FeatureFlag =
|
|
4609
|
-
id:
|
|
4635
|
+
import { z as z149 } from "zod";
|
|
4636
|
+
var FlaggedFeature = z149.enum(["FigmaImporterV2", "ShadowOpacityOptional", "DisableImporter"]);
|
|
4637
|
+
var FeatureFlagMap = z149.record(FlaggedFeature, z149.boolean());
|
|
4638
|
+
var FeatureFlag = z149.object({
|
|
4639
|
+
id: z149.string(),
|
|
4610
4640
|
feature: FlaggedFeature,
|
|
4611
|
-
createdAt:
|
|
4612
|
-
enabled:
|
|
4613
|
-
designSystemId:
|
|
4641
|
+
createdAt: z149.coerce.date(),
|
|
4642
|
+
enabled: z149.boolean(),
|
|
4643
|
+
designSystemId: z149.string().optional()
|
|
4614
4644
|
});
|
|
4615
4645
|
|
|
4616
4646
|
// src/integrations/external-oauth-request.ts
|
|
4617
|
-
import { z as
|
|
4647
|
+
import { z as z151 } from "zod";
|
|
4618
4648
|
|
|
4619
4649
|
// src/integrations/oauth-providers.ts
|
|
4620
|
-
import { z as
|
|
4650
|
+
import { z as z150 } from "zod";
|
|
4621
4651
|
var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
4622
4652
|
OAuthProviderNames2["Figma"] = "figma";
|
|
4623
4653
|
OAuthProviderNames2["Azure"] = "azure";
|
|
@@ -4626,137 +4656,137 @@ var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
|
4626
4656
|
OAuthProviderNames2["Bitbucket"] = "bitbucket";
|
|
4627
4657
|
return OAuthProviderNames2;
|
|
4628
4658
|
})(OAuthProviderNames || {});
|
|
4629
|
-
var OAuthProviderSchema =
|
|
4659
|
+
var OAuthProviderSchema = z150.nativeEnum(OAuthProviderNames);
|
|
4630
4660
|
var OAuthProvider = OAuthProviderSchema.enum;
|
|
4631
4661
|
|
|
4632
4662
|
// src/integrations/external-oauth-request.ts
|
|
4633
|
-
var ExternalOAuthRequest =
|
|
4634
|
-
id:
|
|
4663
|
+
var ExternalOAuthRequest = z151.object({
|
|
4664
|
+
id: z151.string(),
|
|
4635
4665
|
provider: OAuthProviderSchema,
|
|
4636
|
-
userId:
|
|
4637
|
-
state:
|
|
4638
|
-
createdAt:
|
|
4666
|
+
userId: z151.string(),
|
|
4667
|
+
state: z151.string(),
|
|
4668
|
+
createdAt: z151.coerce.date()
|
|
4639
4669
|
});
|
|
4640
4670
|
|
|
4641
4671
|
// src/integrations/git.ts
|
|
4642
|
-
import { z as
|
|
4643
|
-
var GitObjectsQuery =
|
|
4644
|
-
organization:
|
|
4672
|
+
import { z as z152 } from "zod";
|
|
4673
|
+
var GitObjectsQuery = z152.object({
|
|
4674
|
+
organization: z152.string().optional(),
|
|
4645
4675
|
// Azure Organization | Bitbucket Workspace slug | Gitlab Group | Github Account (User or Organization)
|
|
4646
|
-
project:
|
|
4676
|
+
project: z152.string().optional(),
|
|
4647
4677
|
// Only for Bitbucket and Azure
|
|
4648
|
-
repository:
|
|
4678
|
+
repository: z152.string().optional(),
|
|
4649
4679
|
// For all providers. For Gitlab, it's called "project".
|
|
4650
|
-
branch:
|
|
4680
|
+
branch: z152.string().optional(),
|
|
4651
4681
|
// For all providers.
|
|
4652
|
-
user:
|
|
4682
|
+
user: z152.string().optional()
|
|
4653
4683
|
// Gitlab user
|
|
4654
4684
|
});
|
|
4655
|
-
var GitOrganization =
|
|
4656
|
-
id:
|
|
4657
|
-
name:
|
|
4658
|
-
url:
|
|
4659
|
-
slug:
|
|
4685
|
+
var GitOrganization = z152.object({
|
|
4686
|
+
id: z152.string(),
|
|
4687
|
+
name: z152.string(),
|
|
4688
|
+
url: z152.string(),
|
|
4689
|
+
slug: z152.string()
|
|
4660
4690
|
});
|
|
4661
|
-
var GitProject =
|
|
4662
|
-
id:
|
|
4663
|
-
name:
|
|
4664
|
-
url:
|
|
4665
|
-
slug:
|
|
4691
|
+
var GitProject = z152.object({
|
|
4692
|
+
id: z152.string(),
|
|
4693
|
+
name: z152.string(),
|
|
4694
|
+
url: z152.string(),
|
|
4695
|
+
slug: z152.string()
|
|
4666
4696
|
});
|
|
4667
|
-
var GitRepository =
|
|
4668
|
-
id:
|
|
4669
|
-
name:
|
|
4670
|
-
url:
|
|
4671
|
-
slug:
|
|
4697
|
+
var GitRepository = z152.object({
|
|
4698
|
+
id: z152.string(),
|
|
4699
|
+
name: z152.string(),
|
|
4700
|
+
url: z152.string(),
|
|
4701
|
+
slug: z152.string(),
|
|
4672
4702
|
/**
|
|
4673
4703
|
* Can be undefined when:
|
|
4674
4704
|
* - there are no branches in the repository yet
|
|
4675
4705
|
* - Git provider doesn't expose this information on a repository via their API
|
|
4676
4706
|
*/
|
|
4677
|
-
defaultBranch:
|
|
4707
|
+
defaultBranch: z152.string().optional()
|
|
4678
4708
|
});
|
|
4679
|
-
var GitBranch =
|
|
4680
|
-
name:
|
|
4681
|
-
lastCommitId:
|
|
4709
|
+
var GitBranch = z152.object({
|
|
4710
|
+
name: z152.string(),
|
|
4711
|
+
lastCommitId: z152.string()
|
|
4682
4712
|
});
|
|
4683
4713
|
|
|
4684
4714
|
// src/integrations/oauth-token.ts
|
|
4685
|
-
import { z as
|
|
4686
|
-
var IntegrationTokenSchemaOld =
|
|
4687
|
-
id:
|
|
4715
|
+
import { z as z153 } from "zod";
|
|
4716
|
+
var IntegrationTokenSchemaOld = z153.object({
|
|
4717
|
+
id: z153.string(),
|
|
4688
4718
|
provider: OAuthProviderSchema,
|
|
4689
|
-
scope:
|
|
4690
|
-
userId:
|
|
4691
|
-
accessToken:
|
|
4692
|
-
refreshToken:
|
|
4693
|
-
expiresAt:
|
|
4694
|
-
externalUserId:
|
|
4719
|
+
scope: z153.string(),
|
|
4720
|
+
userId: z153.string(),
|
|
4721
|
+
accessToken: z153.string(),
|
|
4722
|
+
refreshToken: z153.string(),
|
|
4723
|
+
expiresAt: z153.coerce.date(),
|
|
4724
|
+
externalUserId: z153.string().nullish()
|
|
4695
4725
|
});
|
|
4696
4726
|
|
|
4697
4727
|
// src/integrations/workspace-oauth-requests.ts
|
|
4698
|
-
import { z as
|
|
4699
|
-
var WorkspaceOAuthRequestSchema =
|
|
4700
|
-
id:
|
|
4701
|
-
workspaceId:
|
|
4728
|
+
import { z as z154 } from "zod";
|
|
4729
|
+
var WorkspaceOAuthRequestSchema = z154.object({
|
|
4730
|
+
id: z154.string(),
|
|
4731
|
+
workspaceId: z154.string(),
|
|
4702
4732
|
provider: OAuthProviderSchema,
|
|
4703
|
-
userId:
|
|
4704
|
-
createdAt:
|
|
4733
|
+
userId: z154.string(),
|
|
4734
|
+
createdAt: z154.coerce.date()
|
|
4705
4735
|
});
|
|
4706
4736
|
|
|
4707
4737
|
// src/npm/npm-package.ts
|
|
4708
|
-
import { z as
|
|
4709
|
-
var AnyRecord =
|
|
4738
|
+
import { z as z155 } from "zod";
|
|
4739
|
+
var AnyRecord = z155.record(z155.any());
|
|
4710
4740
|
var NpmPackageVersionDist = AnyRecord.and(
|
|
4711
|
-
|
|
4712
|
-
tarball:
|
|
4741
|
+
z155.object({
|
|
4742
|
+
tarball: z155.string()
|
|
4713
4743
|
})
|
|
4714
4744
|
);
|
|
4715
4745
|
var NpmPackageVersion = AnyRecord.and(
|
|
4716
|
-
|
|
4746
|
+
z155.object({
|
|
4717
4747
|
dist: NpmPackageVersionDist
|
|
4718
4748
|
})
|
|
4719
4749
|
);
|
|
4720
4750
|
var NpmPackage = AnyRecord.and(
|
|
4721
|
-
|
|
4722
|
-
_id:
|
|
4723
|
-
name:
|
|
4751
|
+
z155.object({
|
|
4752
|
+
_id: z155.string(),
|
|
4753
|
+
name: z155.string(),
|
|
4724
4754
|
// e.g. "latest": "1.2.3"
|
|
4725
|
-
"dist-tags":
|
|
4755
|
+
"dist-tags": z155.record(z155.string(), z155.string()),
|
|
4726
4756
|
// "1.2.3": {...}
|
|
4727
|
-
versions:
|
|
4757
|
+
versions: z155.record(NpmPackageVersion)
|
|
4728
4758
|
})
|
|
4729
4759
|
);
|
|
4730
4760
|
|
|
4731
4761
|
// src/npm/npm-proxy-token-payload.ts
|
|
4732
|
-
import { z as
|
|
4733
|
-
var NpmProxyTokenPayload =
|
|
4734
|
-
npmProxyRegistryConfigId:
|
|
4762
|
+
import { z as z156 } from "zod";
|
|
4763
|
+
var NpmProxyTokenPayload = z156.object({
|
|
4764
|
+
npmProxyRegistryConfigId: z156.string()
|
|
4735
4765
|
});
|
|
4736
4766
|
|
|
4737
4767
|
// src/tokens/personal-access-token.ts
|
|
4738
|
-
import { z as
|
|
4768
|
+
import { z as z164 } from "zod";
|
|
4739
4769
|
|
|
4740
4770
|
// src/workspace/user-invite.ts
|
|
4741
|
-
import { z as
|
|
4771
|
+
import { z as z158 } from "zod";
|
|
4742
4772
|
|
|
4743
4773
|
// src/workspace/workspace-role.ts
|
|
4744
|
-
import { z as
|
|
4745
|
-
var WorkspaceRoleSchema =
|
|
4774
|
+
import { z as z157 } from "zod";
|
|
4775
|
+
var WorkspaceRoleSchema = z157.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest"]);
|
|
4746
4776
|
var WorkspaceRole = WorkspaceRoleSchema.enum;
|
|
4747
4777
|
|
|
4748
4778
|
// src/workspace/user-invite.ts
|
|
4749
4779
|
var MAX_MEMBERS_COUNT = 100;
|
|
4750
|
-
var UserInvite =
|
|
4751
|
-
email:
|
|
4780
|
+
var UserInvite = z158.object({
|
|
4781
|
+
email: z158.string().email().trim().transform((value) => value.toLowerCase()),
|
|
4752
4782
|
role: WorkspaceRoleSchema
|
|
4753
4783
|
});
|
|
4754
|
-
var UserInvites =
|
|
4784
|
+
var UserInvites = z158.array(UserInvite).max(MAX_MEMBERS_COUNT);
|
|
4755
4785
|
|
|
4756
4786
|
// src/workspace/workspace-configuration.ts
|
|
4757
|
-
import { z as
|
|
4758
|
-
var WorkspaceConfigurationUpdate =
|
|
4759
|
-
id:
|
|
4787
|
+
import { z as z159 } from "zod";
|
|
4788
|
+
var WorkspaceConfigurationUpdate = z159.object({
|
|
4789
|
+
id: z159.string(),
|
|
4760
4790
|
ipWhitelist: WorkspaceIpSettings.optional(),
|
|
4761
4791
|
sso: SsoProvider.optional(),
|
|
4762
4792
|
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
@@ -4764,32 +4794,32 @@ var WorkspaceConfigurationUpdate = z158.object({
|
|
|
4764
4794
|
});
|
|
4765
4795
|
|
|
4766
4796
|
// src/workspace/workspace-context.ts
|
|
4767
|
-
import { z as
|
|
4768
|
-
var WorkspaceContext =
|
|
4769
|
-
workspaceId:
|
|
4797
|
+
import { z as z160 } from "zod";
|
|
4798
|
+
var WorkspaceContext = z160.object({
|
|
4799
|
+
workspaceId: z160.string(),
|
|
4770
4800
|
product: ProductCodeSchema,
|
|
4771
4801
|
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
4772
|
-
publicDesignSystem:
|
|
4802
|
+
publicDesignSystem: z160.boolean().optional()
|
|
4773
4803
|
});
|
|
4774
4804
|
|
|
4775
4805
|
// src/workspace/workspace-create.ts
|
|
4776
|
-
import { z as
|
|
4806
|
+
import { z as z161 } from "zod";
|
|
4777
4807
|
var WORKSPACE_NAME_MIN_LENGTH = 2;
|
|
4778
4808
|
var WORKSPACE_NAME_MAX_LENGTH = 64;
|
|
4779
4809
|
var HANDLE_MIN_LENGTH = 2;
|
|
4780
4810
|
var HANDLE_MAX_LENGTH = 64;
|
|
4781
|
-
var CreateWorkspaceInput =
|
|
4782
|
-
name:
|
|
4811
|
+
var CreateWorkspaceInput = z161.object({
|
|
4812
|
+
name: z161.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
|
|
4783
4813
|
product: ProductCodeSchema,
|
|
4784
|
-
priceId:
|
|
4785
|
-
billingEmail:
|
|
4786
|
-
handle:
|
|
4814
|
+
priceId: z161.string(),
|
|
4815
|
+
billingEmail: z161.string().email().optional(),
|
|
4816
|
+
handle: z161.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => value?.length > 0).optional(),
|
|
4787
4817
|
invites: UserInvites.optional(),
|
|
4788
|
-
promoCode:
|
|
4818
|
+
promoCode: z161.string().optional(),
|
|
4789
4819
|
status: InternalStatusSchema.optional(),
|
|
4790
4820
|
planInterval: BillingIntervalSchema.optional(),
|
|
4791
|
-
seats:
|
|
4792
|
-
seatLimit:
|
|
4821
|
+
seats: z161.number().optional(),
|
|
4822
|
+
seatLimit: z161.number().optional(),
|
|
4793
4823
|
card: CardSchema.optional(),
|
|
4794
4824
|
sso: SsoProvider.optional(),
|
|
4795
4825
|
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
@@ -4797,47 +4827,47 @@ var CreateWorkspaceInput = z160.object({
|
|
|
4797
4827
|
});
|
|
4798
4828
|
|
|
4799
4829
|
// src/workspace/workspace-invitations.ts
|
|
4800
|
-
import { z as z161 } from "zod";
|
|
4801
|
-
var WorkspaceInvitation = z161.object({
|
|
4802
|
-
id: z161.string(),
|
|
4803
|
-
email: z161.string().email(),
|
|
4804
|
-
createdAt: z161.coerce.date(),
|
|
4805
|
-
resentAt: z161.coerce.date().nullish(),
|
|
4806
|
-
role: z161.nativeEnum(WorkspaceRole),
|
|
4807
|
-
workspaceId: z161.string(),
|
|
4808
|
-
invitedBy: z161.string()
|
|
4809
|
-
});
|
|
4810
|
-
|
|
4811
|
-
// src/workspace/workspace-membership.ts
|
|
4812
4830
|
import { z as z162 } from "zod";
|
|
4813
|
-
var
|
|
4831
|
+
var WorkspaceInvitation = z162.object({
|
|
4814
4832
|
id: z162.string(),
|
|
4815
|
-
|
|
4833
|
+
email: z162.string().email(),
|
|
4834
|
+
createdAt: z162.coerce.date(),
|
|
4835
|
+
resentAt: z162.coerce.date().nullish(),
|
|
4836
|
+
role: z162.nativeEnum(WorkspaceRole),
|
|
4816
4837
|
workspaceId: z162.string(),
|
|
4817
|
-
|
|
4838
|
+
invitedBy: z162.string()
|
|
4839
|
+
});
|
|
4840
|
+
|
|
4841
|
+
// src/workspace/workspace-membership.ts
|
|
4842
|
+
import { z as z163 } from "zod";
|
|
4843
|
+
var WorkspaceMembership = z163.object({
|
|
4844
|
+
id: z163.string(),
|
|
4845
|
+
userId: z163.string(),
|
|
4846
|
+
workspaceId: z163.string(),
|
|
4847
|
+
workspaceRole: z163.nativeEnum(WorkspaceRole),
|
|
4818
4848
|
notificationSettings: UserNotificationSettings
|
|
4819
4849
|
});
|
|
4820
|
-
var UpdateMembershipRolesInput =
|
|
4821
|
-
members:
|
|
4822
|
-
|
|
4823
|
-
userId:
|
|
4824
|
-
role:
|
|
4850
|
+
var UpdateMembershipRolesInput = z163.object({
|
|
4851
|
+
members: z163.array(
|
|
4852
|
+
z163.object({
|
|
4853
|
+
userId: z163.string(),
|
|
4854
|
+
role: z163.nativeEnum(WorkspaceRole)
|
|
4825
4855
|
})
|
|
4826
4856
|
)
|
|
4827
4857
|
});
|
|
4828
4858
|
|
|
4829
4859
|
// src/tokens/personal-access-token.ts
|
|
4830
|
-
var PersonalAccessToken =
|
|
4831
|
-
id:
|
|
4832
|
-
userId:
|
|
4833
|
-
workspaceId:
|
|
4860
|
+
var PersonalAccessToken = z164.object({
|
|
4861
|
+
id: z164.string(),
|
|
4862
|
+
userId: z164.string(),
|
|
4863
|
+
workspaceId: z164.string().optional(),
|
|
4834
4864
|
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
4835
|
-
name:
|
|
4836
|
-
hidden:
|
|
4837
|
-
token:
|
|
4838
|
-
scope:
|
|
4839
|
-
createdAt:
|
|
4840
|
-
expireAt:
|
|
4865
|
+
name: z164.string(),
|
|
4866
|
+
hidden: z164.boolean(),
|
|
4867
|
+
token: z164.string(),
|
|
4868
|
+
scope: z164.string().optional(),
|
|
4869
|
+
createdAt: z164.coerce.date(),
|
|
4870
|
+
expireAt: z164.coerce.date().optional()
|
|
4841
4871
|
});
|
|
4842
4872
|
export {
|
|
4843
4873
|
Address,
|
|
@@ -4850,6 +4880,7 @@ export {
|
|
|
4850
4880
|
AssetProcessStatus,
|
|
4851
4881
|
AssetProperties,
|
|
4852
4882
|
AssetReference,
|
|
4883
|
+
AssetRenderConfiguration,
|
|
4853
4884
|
AssetScope,
|
|
4854
4885
|
AssetType,
|
|
4855
4886
|
AssetValue,
|
|
@@ -5307,6 +5338,7 @@ export {
|
|
|
5307
5338
|
PulsarPropertyType,
|
|
5308
5339
|
RESERVED_SLUGS,
|
|
5309
5340
|
RESERVED_SLUG_PREFIX,
|
|
5341
|
+
RenderedAssetFile,
|
|
5310
5342
|
ResolvedAsset,
|
|
5311
5343
|
RoomType,
|
|
5312
5344
|
RoomTypeEnum,
|
|
@@ -5421,6 +5453,7 @@ export {
|
|
|
5421
5453
|
filterNonNullish,
|
|
5422
5454
|
forceUnwrapNullish,
|
|
5423
5455
|
getCodenameFromText,
|
|
5456
|
+
getFigmaRenderFormatFileExtension,
|
|
5424
5457
|
groupBy,
|
|
5425
5458
|
isDesignTokenImportModelOfType,
|
|
5426
5459
|
isDesignTokenOfType,
|