@supernova-studio/client 0.55.25 → 0.55.27
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 +196 -51
- package/dist/index.d.ts +196 -51
- package/dist/index.js +236 -227
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1508 -1499
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -128,6 +128,8 @@ var _slugify = require('@sindresorhus/slugify'); var _slugify2 = _interopRequire
|
|
|
128
128
|
|
|
129
129
|
|
|
130
130
|
|
|
131
|
+
var _ipcidr = require('ip-cidr'); var _ipcidr2 = _interopRequireDefault(_ipcidr);
|
|
132
|
+
|
|
131
133
|
|
|
132
134
|
|
|
133
135
|
|
|
@@ -151,7 +153,6 @@ var _slugify = require('@sindresorhus/slugify'); var _slugify2 = _interopRequire
|
|
|
151
153
|
|
|
152
154
|
|
|
153
155
|
|
|
154
|
-
var _ipcidr = require('ip-cidr'); var _ipcidr2 = _interopRequireDefault(_ipcidr);
|
|
155
156
|
|
|
156
157
|
|
|
157
158
|
|
|
@@ -652,13 +653,19 @@ var FigmaComponentPropertyBase = _zod.z.object({
|
|
|
652
653
|
id: _zod.z.string(),
|
|
653
654
|
name: _zod.z.string()
|
|
654
655
|
});
|
|
656
|
+
var FigmaComponentInstancePreview = _zod.z.object({
|
|
657
|
+
componentName: _zod.z.string(),
|
|
658
|
+
componentSetName: _zod.z.string().optional(),
|
|
659
|
+
isRemote: _zod.z.boolean()
|
|
660
|
+
});
|
|
655
661
|
var FigmaComponentBooleanProperty = FigmaComponentPropertyBase.extend({
|
|
656
662
|
type: _zod.z.literal(FigmaComponentPropertyType.enum.Boolean),
|
|
657
663
|
defaultValue: _zod.z.boolean()
|
|
658
664
|
});
|
|
659
665
|
var FigmaComponentInstanceSwapProperty = FigmaComponentPropertyBase.extend({
|
|
660
666
|
type: _zod.z.literal(FigmaComponentPropertyType.enum.InstanceSwap),
|
|
661
|
-
defaultValue: _zod.z.string()
|
|
667
|
+
defaultValue: _zod.z.string(),
|
|
668
|
+
defaultValuePreview: FigmaComponentInstancePreview.optional()
|
|
662
669
|
});
|
|
663
670
|
var FigmaComponentVariantProperty = FigmaComponentPropertyBase.extend({
|
|
664
671
|
type: _zod.z.literal(FigmaComponentPropertyType.enum.Variant),
|
|
@@ -3573,12 +3580,228 @@ var ElementGroupSnapshot = DesignElementSnapshotBase.extend({
|
|
|
3573
3580
|
function pickLatestGroupSnapshots(snapshots) {
|
|
3574
3581
|
return pickLatestSnapshots(snapshots, (s) => s.group.id);
|
|
3575
3582
|
}
|
|
3583
|
+
var NpmRegistryAuthType = _zod.z.enum(["Basic", "Bearer", "None", "Custom"]);
|
|
3584
|
+
var NpmRegistryType = _zod.z.enum(["NPMJS", "GitHub", "AzureDevOps", "Artifactory", "Custom"]);
|
|
3585
|
+
var NpmRegistryBasicAuthConfig = _zod.z.object({
|
|
3586
|
+
authType: _zod.z.literal(NpmRegistryAuthType.Enum.Basic),
|
|
3587
|
+
username: _zod.z.string(),
|
|
3588
|
+
password: _zod.z.string()
|
|
3589
|
+
});
|
|
3590
|
+
var NpmRegistryBearerAuthConfig = _zod.z.object({
|
|
3591
|
+
authType: _zod.z.literal(NpmRegistryAuthType.Enum.Bearer),
|
|
3592
|
+
accessToken: _zod.z.string()
|
|
3593
|
+
});
|
|
3594
|
+
var NpmRegistryNoAuthConfig = _zod.z.object({
|
|
3595
|
+
authType: _zod.z.literal(NpmRegistryAuthType.Enum.None)
|
|
3596
|
+
});
|
|
3597
|
+
var NpmRegistrCustomAuthConfig = _zod.z.object({
|
|
3598
|
+
authType: _zod.z.literal(NpmRegistryAuthType.Enum.Custom),
|
|
3599
|
+
authHeaderName: _zod.z.string(),
|
|
3600
|
+
authHeaderValue: _zod.z.string()
|
|
3601
|
+
});
|
|
3602
|
+
var NpmRegistryAuthConfig = _zod.z.discriminatedUnion("authType", [
|
|
3603
|
+
NpmRegistryBasicAuthConfig,
|
|
3604
|
+
NpmRegistryBearerAuthConfig,
|
|
3605
|
+
NpmRegistryNoAuthConfig,
|
|
3606
|
+
NpmRegistrCustomAuthConfig
|
|
3607
|
+
]);
|
|
3608
|
+
var NpmRegistryConfigBase = _zod.z.object({
|
|
3609
|
+
registryType: NpmRegistryType,
|
|
3610
|
+
enabledScopes: _zod.z.array(_zod.z.string()),
|
|
3611
|
+
customRegistryUrl: _zod.z.string().optional(),
|
|
3612
|
+
bypassProxy: _zod.z.boolean().default(false),
|
|
3613
|
+
npmProxyRegistryConfigId: _zod.z.string().optional(),
|
|
3614
|
+
npmProxyVersion: _zod.z.number().optional()
|
|
3615
|
+
});
|
|
3616
|
+
var NpmRegistryConfig = NpmRegistryConfigBase.and(NpmRegistryAuthConfig);
|
|
3617
|
+
var SsoProvider = _zod.z.object({
|
|
3618
|
+
providerId: _zod.z.string(),
|
|
3619
|
+
defaultAutoInviteValue: _zod.z.boolean(),
|
|
3620
|
+
autoInviteDomains: _zod.z.record(_zod.z.string(), _zod.z.boolean()),
|
|
3621
|
+
skipDocsSupernovaLogin: _zod.z.boolean(),
|
|
3622
|
+
areInvitesDisabled: _zod.z.boolean(),
|
|
3623
|
+
isTestMode: _zod.z.boolean(),
|
|
3624
|
+
emailDomains: _zod.z.array(_zod.z.string()),
|
|
3625
|
+
metadataXml: _zod.z.string().nullish()
|
|
3626
|
+
});
|
|
3576
3627
|
var WorkspaceRoleSchema = _zod.z.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest", "Contributor"]);
|
|
3577
3628
|
var WorkspaceRole = WorkspaceRoleSchema.enum;
|
|
3578
|
-
var
|
|
3629
|
+
var MAX_MEMBERS_COUNT = 100;
|
|
3630
|
+
var UserInvite = _zod.z.object({
|
|
3631
|
+
email: _zod.z.string().email().trim().transform((value) => value.toLowerCase()),
|
|
3632
|
+
role: WorkspaceRoleSchema
|
|
3633
|
+
});
|
|
3634
|
+
var UserInvites = _zod.z.array(UserInvite).max(MAX_MEMBERS_COUNT);
|
|
3635
|
+
var isValidCIDR = (value) => {
|
|
3636
|
+
return _ipcidr2.default.isValidAddress(value);
|
|
3637
|
+
};
|
|
3638
|
+
var WorkspaceIpWhitelistEntry = _zod.z.object({
|
|
3639
|
+
isEnabled: _zod.z.boolean(),
|
|
3640
|
+
name: _zod.z.string(),
|
|
3641
|
+
range: _zod.z.string().refine(isValidCIDR, {
|
|
3642
|
+
message: "Invalid IP CIDR"
|
|
3643
|
+
})
|
|
3644
|
+
});
|
|
3645
|
+
var WorkspaceIpSettings = _zod.z.object({
|
|
3646
|
+
isEnabledForCloud: _zod.z.boolean(),
|
|
3647
|
+
isEnabledForDocs: _zod.z.boolean(),
|
|
3648
|
+
entries: _zod.z.array(WorkspaceIpWhitelistEntry)
|
|
3649
|
+
});
|
|
3650
|
+
var WorkspaceProfile = _zod.z.object({
|
|
3651
|
+
name: _zod.z.string(),
|
|
3652
|
+
handle: _zod.z.string(),
|
|
3653
|
+
color: _zod.z.string(),
|
|
3654
|
+
avatar: nullishToOptional(_zod.z.string()),
|
|
3655
|
+
billingDetails: nullishToOptional(BillingDetails)
|
|
3656
|
+
});
|
|
3657
|
+
var WorkspaceProfileUpdate = WorkspaceProfile.omit({
|
|
3658
|
+
avatar: true
|
|
3659
|
+
});
|
|
3660
|
+
var Workspace = _zod.z.object({
|
|
3579
3661
|
id: _zod.z.string(),
|
|
3580
|
-
|
|
3581
|
-
|
|
3662
|
+
profile: WorkspaceProfile,
|
|
3663
|
+
subscription: Subscription,
|
|
3664
|
+
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
3665
|
+
sso: nullishToOptional(SsoProvider),
|
|
3666
|
+
npmRegistrySettings: nullishToOptional(NpmRegistryConfig)
|
|
3667
|
+
});
|
|
3668
|
+
var WorkspaceWithDesignSystems = _zod.z.object({
|
|
3669
|
+
workspace: Workspace,
|
|
3670
|
+
designSystems: _zod.z.array(DesignSystem)
|
|
3671
|
+
});
|
|
3672
|
+
var WorkspaceConfigurationUpdate = _zod.z.object({
|
|
3673
|
+
id: _zod.z.string(),
|
|
3674
|
+
ipWhitelist: WorkspaceIpSettings.optional(),
|
|
3675
|
+
sso: SsoProvider.optional(),
|
|
3676
|
+
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
3677
|
+
profile: WorkspaceProfileUpdate.optional()
|
|
3678
|
+
});
|
|
3679
|
+
var WorkspaceContext = _zod.z.object({
|
|
3680
|
+
workspaceId: _zod.z.string(),
|
|
3681
|
+
product: ProductCodeSchema,
|
|
3682
|
+
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
3683
|
+
publicDesignSystem: _zod.z.boolean().optional()
|
|
3684
|
+
});
|
|
3685
|
+
var WORKSPACE_NAME_MIN_LENGTH = 2;
|
|
3686
|
+
var WORKSPACE_NAME_MAX_LENGTH = 64;
|
|
3687
|
+
var HANDLE_MIN_LENGTH = 2;
|
|
3688
|
+
var HANDLE_MAX_LENGTH = 64;
|
|
3689
|
+
var CreateWorkspaceInput = _zod.z.object({
|
|
3690
|
+
name: _zod.z.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
|
|
3691
|
+
handle: _zod.z.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => _optionalChain([value, 'optionalAccess', _2 => _2.length]) > 0).optional()
|
|
3692
|
+
});
|
|
3693
|
+
var WorkspaceInvitation = _zod.z.object({
|
|
3694
|
+
id: _zod.z.string(),
|
|
3695
|
+
email: _zod.z.string().email(),
|
|
3696
|
+
createdAt: _zod.z.coerce.date(),
|
|
3697
|
+
resentAt: _zod.z.coerce.date().nullish(),
|
|
3698
|
+
role: _zod.z.nativeEnum(WorkspaceRole),
|
|
3699
|
+
workspaceId: _zod.z.string(),
|
|
3700
|
+
invitedBy: _zod.z.string()
|
|
3701
|
+
});
|
|
3702
|
+
var IntegrationAuthType = _zod.z.union([_zod.z.literal("OAuth2"), _zod.z.literal("PAT")]);
|
|
3703
|
+
var ExternalServiceType = _zod.z.union([
|
|
3704
|
+
_zod.z.literal("figma"),
|
|
3705
|
+
_zod.z.literal("github"),
|
|
3706
|
+
_zod.z.literal("azure"),
|
|
3707
|
+
_zod.z.literal("gitlab"),
|
|
3708
|
+
_zod.z.literal("bitbucket")
|
|
3709
|
+
]);
|
|
3710
|
+
var IntegrationUserInfo = _zod.z.object({
|
|
3711
|
+
id: _zod.z.string(),
|
|
3712
|
+
handle: _zod.z.string().optional(),
|
|
3713
|
+
avatarUrl: _zod.z.string().optional(),
|
|
3714
|
+
email: _zod.z.string().optional(),
|
|
3715
|
+
authType: IntegrationAuthType.optional(),
|
|
3716
|
+
customUrl: _zod.z.string().optional()
|
|
3717
|
+
});
|
|
3718
|
+
var UserLinkedIntegrations = _zod.z.object({
|
|
3719
|
+
figma: IntegrationUserInfo.optional(),
|
|
3720
|
+
github: IntegrationUserInfo.array().optional(),
|
|
3721
|
+
azure: IntegrationUserInfo.array().optional(),
|
|
3722
|
+
gitlab: IntegrationUserInfo.array().optional(),
|
|
3723
|
+
bitbucket: IntegrationUserInfo.array().optional()
|
|
3724
|
+
});
|
|
3725
|
+
var UserAnalyticsCleanupSchedule = _zod.z.object({
|
|
3726
|
+
userId: _zod.z.string(),
|
|
3727
|
+
createdAt: _zod.z.coerce.date(),
|
|
3728
|
+
deleteAt: _zod.z.coerce.date()
|
|
3729
|
+
});
|
|
3730
|
+
var UserAnalyticsCleanupScheduleDbInput = UserAnalyticsCleanupSchedule.omit({
|
|
3731
|
+
createdAt: true
|
|
3732
|
+
});
|
|
3733
|
+
var UserIdentity = _zod.z.object({
|
|
3734
|
+
id: _zod.z.string(),
|
|
3735
|
+
userId: _zod.z.string()
|
|
3736
|
+
});
|
|
3737
|
+
var UserMinified = _zod.z.object({
|
|
3738
|
+
id: _zod.z.string(),
|
|
3739
|
+
name: _zod.z.string(),
|
|
3740
|
+
email: _zod.z.string(),
|
|
3741
|
+
avatar: _zod.z.string().optional()
|
|
3742
|
+
});
|
|
3743
|
+
var LiveblocksNotificationSettings = _zod.z.object({
|
|
3744
|
+
sendCommentNotificationEmails: _zod.z.boolean()
|
|
3745
|
+
});
|
|
3746
|
+
var UserNotificationSettings = _zod.z.object({
|
|
3747
|
+
liveblocksNotificationSettings: LiveblocksNotificationSettings
|
|
3748
|
+
});
|
|
3749
|
+
var UserOnboardingDepartment = _zod.z.enum(["Design", "Engineering", "Product", "Brand", "Other"]);
|
|
3750
|
+
var UserOnboardingJobLevel = _zod.z.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
3751
|
+
var UserOnboarding = _zod.z.object({
|
|
3752
|
+
companyName: _zod.z.string().optional(),
|
|
3753
|
+
numberOfPeopleInOrg: _zod.z.string().optional(),
|
|
3754
|
+
numberOfPeopleInDesignTeam: _zod.z.string().optional(),
|
|
3755
|
+
department: UserOnboardingDepartment.optional(),
|
|
3756
|
+
jobTitle: _zod.z.string().optional(),
|
|
3757
|
+
phase: _zod.z.string().optional(),
|
|
3758
|
+
jobLevel: UserOnboardingJobLevel.optional(),
|
|
3759
|
+
designSystemName: _zod.z.string().optional(),
|
|
3760
|
+
defaultDestination: _zod.z.string().optional(),
|
|
3761
|
+
figmaUrl: _zod.z.string().optional(),
|
|
3762
|
+
isPageDraftOnboardingFinished: _zod.z.boolean().optional(),
|
|
3763
|
+
isApprovalsOnboardingFinished: _zod.z.boolean().optional()
|
|
3764
|
+
});
|
|
3765
|
+
var UserProfile = _zod.z.object({
|
|
3766
|
+
name: _zod.z.string(),
|
|
3767
|
+
avatar: _zod.z.string().optional(),
|
|
3768
|
+
nickname: _zod.z.string().optional(),
|
|
3769
|
+
onboarding: UserOnboarding.optional()
|
|
3770
|
+
});
|
|
3771
|
+
var UserProfileUpdate = UserProfile.partial().omit({
|
|
3772
|
+
avatar: true
|
|
3773
|
+
});
|
|
3774
|
+
var UserTest = _zod.z.object({
|
|
3775
|
+
id: _zod.z.string(),
|
|
3776
|
+
email: _zod.z.string()
|
|
3777
|
+
});
|
|
3778
|
+
var UserSource = _zod.z.enum(["SignUp", "Invite", "SSO"]);
|
|
3779
|
+
var User = _zod.z.object({
|
|
3780
|
+
id: _zod.z.string(),
|
|
3781
|
+
email: _zod.z.string(),
|
|
3782
|
+
emailVerified: _zod.z.boolean(),
|
|
3783
|
+
createdAt: _zod.z.coerce.date(),
|
|
3784
|
+
trialExpiresAt: _zod.z.coerce.date().optional(),
|
|
3785
|
+
profile: UserProfile,
|
|
3786
|
+
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
3787
|
+
loggedOutAt: _zod.z.coerce.date().optional(),
|
|
3788
|
+
isProtected: _zod.z.boolean(),
|
|
3789
|
+
source: UserSource.optional()
|
|
3790
|
+
});
|
|
3791
|
+
var WorkspaceMembership = _zod.z.object({
|
|
3792
|
+
id: _zod.z.string(),
|
|
3793
|
+
userId: _zod.z.string(),
|
|
3794
|
+
workspaceId: _zod.z.string(),
|
|
3795
|
+
workspaceRole: _zod.z.nativeEnum(WorkspaceRole),
|
|
3796
|
+
notificationSettings: UserNotificationSettings
|
|
3797
|
+
});
|
|
3798
|
+
var UpdateMembershipRolesInput = _zod.z.object({
|
|
3799
|
+
members: _zod.z.array(
|
|
3800
|
+
_zod.z.object({
|
|
3801
|
+
userId: _zod.z.string(),
|
|
3802
|
+
role: _zod.z.nativeEnum(WorkspaceRole)
|
|
3803
|
+
})
|
|
3804
|
+
)
|
|
3582
3805
|
});
|
|
3583
3806
|
var DesignSystemRole = _zod.z.enum([
|
|
3584
3807
|
WorkspaceRole.Admin,
|
|
@@ -3586,10 +3809,17 @@ var DesignSystemRole = _zod.z.enum([
|
|
|
3586
3809
|
WorkspaceRole.Creator,
|
|
3587
3810
|
WorkspaceRole.Viewer
|
|
3588
3811
|
]);
|
|
3812
|
+
var DesignSystemInvitation = _zod.z.object({
|
|
3813
|
+
id: _zod.z.string(),
|
|
3814
|
+
designSystemId: _zod.z.string(),
|
|
3815
|
+
workspaceInvitationId: _zod.z.string(),
|
|
3816
|
+
designSystemRole: DesignSystemRole.optional()
|
|
3817
|
+
});
|
|
3589
3818
|
var DesignSystemMembership = _zod.z.object({
|
|
3590
3819
|
id: _zod.z.string(),
|
|
3591
3820
|
userId: _zod.z.string(),
|
|
3592
3821
|
designSystemId: _zod.z.string(),
|
|
3822
|
+
designSystemRole: DesignSystemRole.optional(),
|
|
3593
3823
|
workspaceMembershipId: _zod.z.string()
|
|
3594
3824
|
});
|
|
3595
3825
|
var DesignSystemMembers = _zod.z.object({
|
|
@@ -4011,95 +4241,6 @@ var DesignSystemDump = _zod.z.object({
|
|
|
4011
4241
|
customDomain: CustomDomain.optional(),
|
|
4012
4242
|
files: Asset.array()
|
|
4013
4243
|
});
|
|
4014
|
-
var IntegrationAuthType = _zod.z.union([_zod.z.literal("OAuth2"), _zod.z.literal("PAT")]);
|
|
4015
|
-
var ExternalServiceType = _zod.z.union([
|
|
4016
|
-
_zod.z.literal("figma"),
|
|
4017
|
-
_zod.z.literal("github"),
|
|
4018
|
-
_zod.z.literal("azure"),
|
|
4019
|
-
_zod.z.literal("gitlab"),
|
|
4020
|
-
_zod.z.literal("bitbucket")
|
|
4021
|
-
]);
|
|
4022
|
-
var IntegrationUserInfo = _zod.z.object({
|
|
4023
|
-
id: _zod.z.string(),
|
|
4024
|
-
handle: _zod.z.string().optional(),
|
|
4025
|
-
avatarUrl: _zod.z.string().optional(),
|
|
4026
|
-
email: _zod.z.string().optional(),
|
|
4027
|
-
authType: IntegrationAuthType.optional(),
|
|
4028
|
-
customUrl: _zod.z.string().optional()
|
|
4029
|
-
});
|
|
4030
|
-
var UserLinkedIntegrations = _zod.z.object({
|
|
4031
|
-
figma: IntegrationUserInfo.optional(),
|
|
4032
|
-
github: IntegrationUserInfo.array().optional(),
|
|
4033
|
-
azure: IntegrationUserInfo.array().optional(),
|
|
4034
|
-
gitlab: IntegrationUserInfo.array().optional(),
|
|
4035
|
-
bitbucket: IntegrationUserInfo.array().optional()
|
|
4036
|
-
});
|
|
4037
|
-
var UserAnalyticsCleanupSchedule = _zod.z.object({
|
|
4038
|
-
userId: _zod.z.string(),
|
|
4039
|
-
createdAt: _zod.z.coerce.date(),
|
|
4040
|
-
deleteAt: _zod.z.coerce.date()
|
|
4041
|
-
});
|
|
4042
|
-
var UserAnalyticsCleanupScheduleDbInput = UserAnalyticsCleanupSchedule.omit({
|
|
4043
|
-
createdAt: true
|
|
4044
|
-
});
|
|
4045
|
-
var UserIdentity = _zod.z.object({
|
|
4046
|
-
id: _zod.z.string(),
|
|
4047
|
-
userId: _zod.z.string()
|
|
4048
|
-
});
|
|
4049
|
-
var UserMinified = _zod.z.object({
|
|
4050
|
-
id: _zod.z.string(),
|
|
4051
|
-
name: _zod.z.string(),
|
|
4052
|
-
email: _zod.z.string(),
|
|
4053
|
-
avatar: _zod.z.string().optional()
|
|
4054
|
-
});
|
|
4055
|
-
var LiveblocksNotificationSettings = _zod.z.object({
|
|
4056
|
-
sendCommentNotificationEmails: _zod.z.boolean()
|
|
4057
|
-
});
|
|
4058
|
-
var UserNotificationSettings = _zod.z.object({
|
|
4059
|
-
liveblocksNotificationSettings: LiveblocksNotificationSettings
|
|
4060
|
-
});
|
|
4061
|
-
var UserOnboardingDepartment = _zod.z.enum(["Design", "Engineering", "Product", "Brand", "Other"]);
|
|
4062
|
-
var UserOnboardingJobLevel = _zod.z.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
4063
|
-
var UserOnboarding = _zod.z.object({
|
|
4064
|
-
companyName: _zod.z.string().optional(),
|
|
4065
|
-
numberOfPeopleInOrg: _zod.z.string().optional(),
|
|
4066
|
-
numberOfPeopleInDesignTeam: _zod.z.string().optional(),
|
|
4067
|
-
department: UserOnboardingDepartment.optional(),
|
|
4068
|
-
jobTitle: _zod.z.string().optional(),
|
|
4069
|
-
phase: _zod.z.string().optional(),
|
|
4070
|
-
jobLevel: UserOnboardingJobLevel.optional(),
|
|
4071
|
-
designSystemName: _zod.z.string().optional(),
|
|
4072
|
-
defaultDestination: _zod.z.string().optional(),
|
|
4073
|
-
figmaUrl: _zod.z.string().optional(),
|
|
4074
|
-
isPageDraftOnboardingFinished: _zod.z.boolean().optional(),
|
|
4075
|
-
isApprovalsOnboardingFinished: _zod.z.boolean().optional()
|
|
4076
|
-
});
|
|
4077
|
-
var UserProfile = _zod.z.object({
|
|
4078
|
-
name: _zod.z.string(),
|
|
4079
|
-
avatar: _zod.z.string().optional(),
|
|
4080
|
-
nickname: _zod.z.string().optional(),
|
|
4081
|
-
onboarding: UserOnboarding.optional()
|
|
4082
|
-
});
|
|
4083
|
-
var UserProfileUpdate = UserProfile.partial().omit({
|
|
4084
|
-
avatar: true
|
|
4085
|
-
});
|
|
4086
|
-
var UserTest = _zod.z.object({
|
|
4087
|
-
id: _zod.z.string(),
|
|
4088
|
-
email: _zod.z.string()
|
|
4089
|
-
});
|
|
4090
|
-
var UserSource = _zod.z.enum(["SignUp", "Invite", "SSO"]);
|
|
4091
|
-
var User = _zod.z.object({
|
|
4092
|
-
id: _zod.z.string(),
|
|
4093
|
-
email: _zod.z.string(),
|
|
4094
|
-
emailVerified: _zod.z.boolean(),
|
|
4095
|
-
createdAt: _zod.z.coerce.date(),
|
|
4096
|
-
trialExpiresAt: _zod.z.coerce.date().optional(),
|
|
4097
|
-
profile: UserProfile,
|
|
4098
|
-
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
4099
|
-
loggedOutAt: _zod.z.coerce.date().optional(),
|
|
4100
|
-
isProtected: _zod.z.boolean(),
|
|
4101
|
-
source: UserSource.optional()
|
|
4102
|
-
});
|
|
4103
4244
|
var IntegrationDesignSystem = _zod.z.object({
|
|
4104
4245
|
designSystemId: _zod.z.string(),
|
|
4105
4246
|
brandId: _zod.z.string(),
|
|
@@ -4167,7 +4308,7 @@ var IntegrationToken = _zod.z.object({
|
|
|
4167
4308
|
token_bitbucket_username: _zod.z.string().optional(),
|
|
4168
4309
|
// Bitbucket only
|
|
4169
4310
|
custom_url: _zod.z.string().optional().transform((value) => {
|
|
4170
|
-
if (!_optionalChain([value, 'optionalAccess',
|
|
4311
|
+
if (!_optionalChain([value, 'optionalAccess', _3 => _3.trim, 'call', _4 => _4()]))
|
|
4171
4312
|
return void 0;
|
|
4172
4313
|
return formatCustomUrl(value);
|
|
4173
4314
|
})
|
|
@@ -4202,87 +4343,6 @@ function formatCustomUrl(url) {
|
|
|
4202
4343
|
}
|
|
4203
4344
|
return forbiddenCustomUrlDomainList.some((domain) => formattedUrl.includes(domain)) ? void 0 : formattedUrl;
|
|
4204
4345
|
}
|
|
4205
|
-
var NpmRegistryAuthType = _zod.z.enum(["Basic", "Bearer", "None", "Custom"]);
|
|
4206
|
-
var NpmRegistryType = _zod.z.enum(["NPMJS", "GitHub", "AzureDevOps", "Artifactory", "Custom"]);
|
|
4207
|
-
var NpmRegistryBasicAuthConfig = _zod.z.object({
|
|
4208
|
-
authType: _zod.z.literal(NpmRegistryAuthType.Enum.Basic),
|
|
4209
|
-
username: _zod.z.string(),
|
|
4210
|
-
password: _zod.z.string()
|
|
4211
|
-
});
|
|
4212
|
-
var NpmRegistryBearerAuthConfig = _zod.z.object({
|
|
4213
|
-
authType: _zod.z.literal(NpmRegistryAuthType.Enum.Bearer),
|
|
4214
|
-
accessToken: _zod.z.string()
|
|
4215
|
-
});
|
|
4216
|
-
var NpmRegistryNoAuthConfig = _zod.z.object({
|
|
4217
|
-
authType: _zod.z.literal(NpmRegistryAuthType.Enum.None)
|
|
4218
|
-
});
|
|
4219
|
-
var NpmRegistrCustomAuthConfig = _zod.z.object({
|
|
4220
|
-
authType: _zod.z.literal(NpmRegistryAuthType.Enum.Custom),
|
|
4221
|
-
authHeaderName: _zod.z.string(),
|
|
4222
|
-
authHeaderValue: _zod.z.string()
|
|
4223
|
-
});
|
|
4224
|
-
var NpmRegistryAuthConfig = _zod.z.discriminatedUnion("authType", [
|
|
4225
|
-
NpmRegistryBasicAuthConfig,
|
|
4226
|
-
NpmRegistryBearerAuthConfig,
|
|
4227
|
-
NpmRegistryNoAuthConfig,
|
|
4228
|
-
NpmRegistrCustomAuthConfig
|
|
4229
|
-
]);
|
|
4230
|
-
var NpmRegistryConfigBase = _zod.z.object({
|
|
4231
|
-
registryType: NpmRegistryType,
|
|
4232
|
-
enabledScopes: _zod.z.array(_zod.z.string()),
|
|
4233
|
-
customRegistryUrl: _zod.z.string().optional(),
|
|
4234
|
-
bypassProxy: _zod.z.boolean().default(false),
|
|
4235
|
-
npmProxyRegistryConfigId: _zod.z.string().optional(),
|
|
4236
|
-
npmProxyVersion: _zod.z.number().optional()
|
|
4237
|
-
});
|
|
4238
|
-
var NpmRegistryConfig = NpmRegistryConfigBase.and(NpmRegistryAuthConfig);
|
|
4239
|
-
var SsoProvider = _zod.z.object({
|
|
4240
|
-
providerId: _zod.z.string(),
|
|
4241
|
-
defaultAutoInviteValue: _zod.z.boolean(),
|
|
4242
|
-
autoInviteDomains: _zod.z.record(_zod.z.string(), _zod.z.boolean()),
|
|
4243
|
-
skipDocsSupernovaLogin: _zod.z.boolean(),
|
|
4244
|
-
areInvitesDisabled: _zod.z.boolean(),
|
|
4245
|
-
isTestMode: _zod.z.boolean(),
|
|
4246
|
-
emailDomains: _zod.z.array(_zod.z.string()),
|
|
4247
|
-
metadataXml: _zod.z.string().nullish()
|
|
4248
|
-
});
|
|
4249
|
-
var isValidCIDR = (value) => {
|
|
4250
|
-
return _ipcidr2.default.isValidAddress(value);
|
|
4251
|
-
};
|
|
4252
|
-
var WorkspaceIpWhitelistEntry = _zod.z.object({
|
|
4253
|
-
isEnabled: _zod.z.boolean(),
|
|
4254
|
-
name: _zod.z.string(),
|
|
4255
|
-
range: _zod.z.string().refine(isValidCIDR, {
|
|
4256
|
-
message: "Invalid IP CIDR"
|
|
4257
|
-
})
|
|
4258
|
-
});
|
|
4259
|
-
var WorkspaceIpSettings = _zod.z.object({
|
|
4260
|
-
isEnabledForCloud: _zod.z.boolean(),
|
|
4261
|
-
isEnabledForDocs: _zod.z.boolean(),
|
|
4262
|
-
entries: _zod.z.array(WorkspaceIpWhitelistEntry)
|
|
4263
|
-
});
|
|
4264
|
-
var WorkspaceProfile = _zod.z.object({
|
|
4265
|
-
name: _zod.z.string(),
|
|
4266
|
-
handle: _zod.z.string(),
|
|
4267
|
-
color: _zod.z.string(),
|
|
4268
|
-
avatar: nullishToOptional(_zod.z.string()),
|
|
4269
|
-
billingDetails: nullishToOptional(BillingDetails)
|
|
4270
|
-
});
|
|
4271
|
-
var WorkspaceProfileUpdate = WorkspaceProfile.omit({
|
|
4272
|
-
avatar: true
|
|
4273
|
-
});
|
|
4274
|
-
var Workspace = _zod.z.object({
|
|
4275
|
-
id: _zod.z.string(),
|
|
4276
|
-
profile: WorkspaceProfile,
|
|
4277
|
-
subscription: Subscription,
|
|
4278
|
-
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
4279
|
-
sso: nullishToOptional(SsoProvider),
|
|
4280
|
-
npmRegistrySettings: nullishToOptional(NpmRegistryConfig)
|
|
4281
|
-
});
|
|
4282
|
-
var WorkspaceWithDesignSystems = _zod.z.object({
|
|
4283
|
-
workspace: Workspace,
|
|
4284
|
-
designSystems: _zod.z.array(DesignSystem)
|
|
4285
|
-
});
|
|
4286
4346
|
var WorkspaceDump = _zod.z.object({
|
|
4287
4347
|
workspace: Workspace,
|
|
4288
4348
|
designSystems: DesignSystemDump.array(),
|
|
@@ -4315,57 +4375,6 @@ var UserSession = _zod.z.object({
|
|
|
4315
4375
|
session: Session,
|
|
4316
4376
|
user: User.nullable()
|
|
4317
4377
|
});
|
|
4318
|
-
var MAX_MEMBERS_COUNT = 100;
|
|
4319
|
-
var UserInvite = _zod.z.object({
|
|
4320
|
-
email: _zod.z.string().email().trim().transform((value) => value.toLowerCase()),
|
|
4321
|
-
role: WorkspaceRoleSchema
|
|
4322
|
-
});
|
|
4323
|
-
var UserInvites = _zod.z.array(UserInvite).max(MAX_MEMBERS_COUNT);
|
|
4324
|
-
var WorkspaceConfigurationUpdate = _zod.z.object({
|
|
4325
|
-
id: _zod.z.string(),
|
|
4326
|
-
ipWhitelist: WorkspaceIpSettings.optional(),
|
|
4327
|
-
sso: SsoProvider.optional(),
|
|
4328
|
-
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
4329
|
-
profile: WorkspaceProfileUpdate.optional()
|
|
4330
|
-
});
|
|
4331
|
-
var WorkspaceContext = _zod.z.object({
|
|
4332
|
-
workspaceId: _zod.z.string(),
|
|
4333
|
-
product: ProductCodeSchema,
|
|
4334
|
-
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
4335
|
-
publicDesignSystem: _zod.z.boolean().optional()
|
|
4336
|
-
});
|
|
4337
|
-
var WORKSPACE_NAME_MIN_LENGTH = 2;
|
|
4338
|
-
var WORKSPACE_NAME_MAX_LENGTH = 64;
|
|
4339
|
-
var HANDLE_MIN_LENGTH = 2;
|
|
4340
|
-
var HANDLE_MAX_LENGTH = 64;
|
|
4341
|
-
var CreateWorkspaceInput = _zod.z.object({
|
|
4342
|
-
name: _zod.z.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
|
|
4343
|
-
handle: _zod.z.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => _optionalChain([value, 'optionalAccess', _4 => _4.length]) > 0).optional()
|
|
4344
|
-
});
|
|
4345
|
-
var WorkspaceInvitation = _zod.z.object({
|
|
4346
|
-
id: _zod.z.string(),
|
|
4347
|
-
email: _zod.z.string().email(),
|
|
4348
|
-
createdAt: _zod.z.coerce.date(),
|
|
4349
|
-
resentAt: _zod.z.coerce.date().nullish(),
|
|
4350
|
-
role: _zod.z.nativeEnum(WorkspaceRole),
|
|
4351
|
-
workspaceId: _zod.z.string(),
|
|
4352
|
-
invitedBy: _zod.z.string()
|
|
4353
|
-
});
|
|
4354
|
-
var WorkspaceMembership = _zod.z.object({
|
|
4355
|
-
id: _zod.z.string(),
|
|
4356
|
-
userId: _zod.z.string(),
|
|
4357
|
-
workspaceId: _zod.z.string(),
|
|
4358
|
-
workspaceRole: _zod.z.nativeEnum(WorkspaceRole),
|
|
4359
|
-
notificationSettings: UserNotificationSettings
|
|
4360
|
-
});
|
|
4361
|
-
var UpdateMembershipRolesInput = _zod.z.object({
|
|
4362
|
-
members: _zod.z.array(
|
|
4363
|
-
_zod.z.object({
|
|
4364
|
-
userId: _zod.z.string(),
|
|
4365
|
-
role: _zod.z.nativeEnum(WorkspaceRole)
|
|
4366
|
-
})
|
|
4367
|
-
)
|
|
4368
|
-
});
|
|
4369
4378
|
var DesignSystemInviteEmailRecipient = _zod.z.object({
|
|
4370
4379
|
email: _zod.z.string(),
|
|
4371
4380
|
role: WorkspaceRoleSchema
|