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