@supernova-studio/client 0.55.25 → 0.55.26
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 +51 -51
- package/dist/index.d.ts +51 -51
- package/dist/index.js +229 -226
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1501 -1498
- 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
|
|
|
@@ -3573,12 +3574,228 @@ var ElementGroupSnapshot = DesignElementSnapshotBase.extend({
|
|
|
3573
3574
|
function pickLatestGroupSnapshots(snapshots) {
|
|
3574
3575
|
return pickLatestSnapshots(snapshots, (s) => s.group.id);
|
|
3575
3576
|
}
|
|
3577
|
+
var NpmRegistryAuthType = _zod.z.enum(["Basic", "Bearer", "None", "Custom"]);
|
|
3578
|
+
var NpmRegistryType = _zod.z.enum(["NPMJS", "GitHub", "AzureDevOps", "Artifactory", "Custom"]);
|
|
3579
|
+
var NpmRegistryBasicAuthConfig = _zod.z.object({
|
|
3580
|
+
authType: _zod.z.literal(NpmRegistryAuthType.Enum.Basic),
|
|
3581
|
+
username: _zod.z.string(),
|
|
3582
|
+
password: _zod.z.string()
|
|
3583
|
+
});
|
|
3584
|
+
var NpmRegistryBearerAuthConfig = _zod.z.object({
|
|
3585
|
+
authType: _zod.z.literal(NpmRegistryAuthType.Enum.Bearer),
|
|
3586
|
+
accessToken: _zod.z.string()
|
|
3587
|
+
});
|
|
3588
|
+
var NpmRegistryNoAuthConfig = _zod.z.object({
|
|
3589
|
+
authType: _zod.z.literal(NpmRegistryAuthType.Enum.None)
|
|
3590
|
+
});
|
|
3591
|
+
var NpmRegistrCustomAuthConfig = _zod.z.object({
|
|
3592
|
+
authType: _zod.z.literal(NpmRegistryAuthType.Enum.Custom),
|
|
3593
|
+
authHeaderName: _zod.z.string(),
|
|
3594
|
+
authHeaderValue: _zod.z.string()
|
|
3595
|
+
});
|
|
3596
|
+
var NpmRegistryAuthConfig = _zod.z.discriminatedUnion("authType", [
|
|
3597
|
+
NpmRegistryBasicAuthConfig,
|
|
3598
|
+
NpmRegistryBearerAuthConfig,
|
|
3599
|
+
NpmRegistryNoAuthConfig,
|
|
3600
|
+
NpmRegistrCustomAuthConfig
|
|
3601
|
+
]);
|
|
3602
|
+
var NpmRegistryConfigBase = _zod.z.object({
|
|
3603
|
+
registryType: NpmRegistryType,
|
|
3604
|
+
enabledScopes: _zod.z.array(_zod.z.string()),
|
|
3605
|
+
customRegistryUrl: _zod.z.string().optional(),
|
|
3606
|
+
bypassProxy: _zod.z.boolean().default(false),
|
|
3607
|
+
npmProxyRegistryConfigId: _zod.z.string().optional(),
|
|
3608
|
+
npmProxyVersion: _zod.z.number().optional()
|
|
3609
|
+
});
|
|
3610
|
+
var NpmRegistryConfig = NpmRegistryConfigBase.and(NpmRegistryAuthConfig);
|
|
3611
|
+
var SsoProvider = _zod.z.object({
|
|
3612
|
+
providerId: _zod.z.string(),
|
|
3613
|
+
defaultAutoInviteValue: _zod.z.boolean(),
|
|
3614
|
+
autoInviteDomains: _zod.z.record(_zod.z.string(), _zod.z.boolean()),
|
|
3615
|
+
skipDocsSupernovaLogin: _zod.z.boolean(),
|
|
3616
|
+
areInvitesDisabled: _zod.z.boolean(),
|
|
3617
|
+
isTestMode: _zod.z.boolean(),
|
|
3618
|
+
emailDomains: _zod.z.array(_zod.z.string()),
|
|
3619
|
+
metadataXml: _zod.z.string().nullish()
|
|
3620
|
+
});
|
|
3576
3621
|
var WorkspaceRoleSchema = _zod.z.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest", "Contributor"]);
|
|
3577
3622
|
var WorkspaceRole = WorkspaceRoleSchema.enum;
|
|
3578
|
-
var
|
|
3623
|
+
var MAX_MEMBERS_COUNT = 100;
|
|
3624
|
+
var UserInvite = _zod.z.object({
|
|
3625
|
+
email: _zod.z.string().email().trim().transform((value) => value.toLowerCase()),
|
|
3626
|
+
role: WorkspaceRoleSchema
|
|
3627
|
+
});
|
|
3628
|
+
var UserInvites = _zod.z.array(UserInvite).max(MAX_MEMBERS_COUNT);
|
|
3629
|
+
var isValidCIDR = (value) => {
|
|
3630
|
+
return _ipcidr2.default.isValidAddress(value);
|
|
3631
|
+
};
|
|
3632
|
+
var WorkspaceIpWhitelistEntry = _zod.z.object({
|
|
3633
|
+
isEnabled: _zod.z.boolean(),
|
|
3634
|
+
name: _zod.z.string(),
|
|
3635
|
+
range: _zod.z.string().refine(isValidCIDR, {
|
|
3636
|
+
message: "Invalid IP CIDR"
|
|
3637
|
+
})
|
|
3638
|
+
});
|
|
3639
|
+
var WorkspaceIpSettings = _zod.z.object({
|
|
3640
|
+
isEnabledForCloud: _zod.z.boolean(),
|
|
3641
|
+
isEnabledForDocs: _zod.z.boolean(),
|
|
3642
|
+
entries: _zod.z.array(WorkspaceIpWhitelistEntry)
|
|
3643
|
+
});
|
|
3644
|
+
var WorkspaceProfile = _zod.z.object({
|
|
3645
|
+
name: _zod.z.string(),
|
|
3646
|
+
handle: _zod.z.string(),
|
|
3647
|
+
color: _zod.z.string(),
|
|
3648
|
+
avatar: nullishToOptional(_zod.z.string()),
|
|
3649
|
+
billingDetails: nullishToOptional(BillingDetails)
|
|
3650
|
+
});
|
|
3651
|
+
var WorkspaceProfileUpdate = WorkspaceProfile.omit({
|
|
3652
|
+
avatar: true
|
|
3653
|
+
});
|
|
3654
|
+
var Workspace = _zod.z.object({
|
|
3579
3655
|
id: _zod.z.string(),
|
|
3580
|
-
|
|
3581
|
-
|
|
3656
|
+
profile: WorkspaceProfile,
|
|
3657
|
+
subscription: Subscription,
|
|
3658
|
+
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
3659
|
+
sso: nullishToOptional(SsoProvider),
|
|
3660
|
+
npmRegistrySettings: nullishToOptional(NpmRegistryConfig)
|
|
3661
|
+
});
|
|
3662
|
+
var WorkspaceWithDesignSystems = _zod.z.object({
|
|
3663
|
+
workspace: Workspace,
|
|
3664
|
+
designSystems: _zod.z.array(DesignSystem)
|
|
3665
|
+
});
|
|
3666
|
+
var WorkspaceConfigurationUpdate = _zod.z.object({
|
|
3667
|
+
id: _zod.z.string(),
|
|
3668
|
+
ipWhitelist: WorkspaceIpSettings.optional(),
|
|
3669
|
+
sso: SsoProvider.optional(),
|
|
3670
|
+
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
3671
|
+
profile: WorkspaceProfileUpdate.optional()
|
|
3672
|
+
});
|
|
3673
|
+
var WorkspaceContext = _zod.z.object({
|
|
3674
|
+
workspaceId: _zod.z.string(),
|
|
3675
|
+
product: ProductCodeSchema,
|
|
3676
|
+
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
3677
|
+
publicDesignSystem: _zod.z.boolean().optional()
|
|
3678
|
+
});
|
|
3679
|
+
var WORKSPACE_NAME_MIN_LENGTH = 2;
|
|
3680
|
+
var WORKSPACE_NAME_MAX_LENGTH = 64;
|
|
3681
|
+
var HANDLE_MIN_LENGTH = 2;
|
|
3682
|
+
var HANDLE_MAX_LENGTH = 64;
|
|
3683
|
+
var CreateWorkspaceInput = _zod.z.object({
|
|
3684
|
+
name: _zod.z.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
|
|
3685
|
+
handle: _zod.z.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => _optionalChain([value, 'optionalAccess', _2 => _2.length]) > 0).optional()
|
|
3686
|
+
});
|
|
3687
|
+
var WorkspaceInvitation = _zod.z.object({
|
|
3688
|
+
id: _zod.z.string(),
|
|
3689
|
+
email: _zod.z.string().email(),
|
|
3690
|
+
createdAt: _zod.z.coerce.date(),
|
|
3691
|
+
resentAt: _zod.z.coerce.date().nullish(),
|
|
3692
|
+
role: _zod.z.nativeEnum(WorkspaceRole),
|
|
3693
|
+
workspaceId: _zod.z.string(),
|
|
3694
|
+
invitedBy: _zod.z.string()
|
|
3695
|
+
});
|
|
3696
|
+
var IntegrationAuthType = _zod.z.union([_zod.z.literal("OAuth2"), _zod.z.literal("PAT")]);
|
|
3697
|
+
var ExternalServiceType = _zod.z.union([
|
|
3698
|
+
_zod.z.literal("figma"),
|
|
3699
|
+
_zod.z.literal("github"),
|
|
3700
|
+
_zod.z.literal("azure"),
|
|
3701
|
+
_zod.z.literal("gitlab"),
|
|
3702
|
+
_zod.z.literal("bitbucket")
|
|
3703
|
+
]);
|
|
3704
|
+
var IntegrationUserInfo = _zod.z.object({
|
|
3705
|
+
id: _zod.z.string(),
|
|
3706
|
+
handle: _zod.z.string().optional(),
|
|
3707
|
+
avatarUrl: _zod.z.string().optional(),
|
|
3708
|
+
email: _zod.z.string().optional(),
|
|
3709
|
+
authType: IntegrationAuthType.optional(),
|
|
3710
|
+
customUrl: _zod.z.string().optional()
|
|
3711
|
+
});
|
|
3712
|
+
var UserLinkedIntegrations = _zod.z.object({
|
|
3713
|
+
figma: IntegrationUserInfo.optional(),
|
|
3714
|
+
github: IntegrationUserInfo.array().optional(),
|
|
3715
|
+
azure: IntegrationUserInfo.array().optional(),
|
|
3716
|
+
gitlab: IntegrationUserInfo.array().optional(),
|
|
3717
|
+
bitbucket: IntegrationUserInfo.array().optional()
|
|
3718
|
+
});
|
|
3719
|
+
var UserAnalyticsCleanupSchedule = _zod.z.object({
|
|
3720
|
+
userId: _zod.z.string(),
|
|
3721
|
+
createdAt: _zod.z.coerce.date(),
|
|
3722
|
+
deleteAt: _zod.z.coerce.date()
|
|
3723
|
+
});
|
|
3724
|
+
var UserAnalyticsCleanupScheduleDbInput = UserAnalyticsCleanupSchedule.omit({
|
|
3725
|
+
createdAt: true
|
|
3726
|
+
});
|
|
3727
|
+
var UserIdentity = _zod.z.object({
|
|
3728
|
+
id: _zod.z.string(),
|
|
3729
|
+
userId: _zod.z.string()
|
|
3730
|
+
});
|
|
3731
|
+
var UserMinified = _zod.z.object({
|
|
3732
|
+
id: _zod.z.string(),
|
|
3733
|
+
name: _zod.z.string(),
|
|
3734
|
+
email: _zod.z.string(),
|
|
3735
|
+
avatar: _zod.z.string().optional()
|
|
3736
|
+
});
|
|
3737
|
+
var LiveblocksNotificationSettings = _zod.z.object({
|
|
3738
|
+
sendCommentNotificationEmails: _zod.z.boolean()
|
|
3739
|
+
});
|
|
3740
|
+
var UserNotificationSettings = _zod.z.object({
|
|
3741
|
+
liveblocksNotificationSettings: LiveblocksNotificationSettings
|
|
3742
|
+
});
|
|
3743
|
+
var UserOnboardingDepartment = _zod.z.enum(["Design", "Engineering", "Product", "Brand", "Other"]);
|
|
3744
|
+
var UserOnboardingJobLevel = _zod.z.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
3745
|
+
var UserOnboarding = _zod.z.object({
|
|
3746
|
+
companyName: _zod.z.string().optional(),
|
|
3747
|
+
numberOfPeopleInOrg: _zod.z.string().optional(),
|
|
3748
|
+
numberOfPeopleInDesignTeam: _zod.z.string().optional(),
|
|
3749
|
+
department: UserOnboardingDepartment.optional(),
|
|
3750
|
+
jobTitle: _zod.z.string().optional(),
|
|
3751
|
+
phase: _zod.z.string().optional(),
|
|
3752
|
+
jobLevel: UserOnboardingJobLevel.optional(),
|
|
3753
|
+
designSystemName: _zod.z.string().optional(),
|
|
3754
|
+
defaultDestination: _zod.z.string().optional(),
|
|
3755
|
+
figmaUrl: _zod.z.string().optional(),
|
|
3756
|
+
isPageDraftOnboardingFinished: _zod.z.boolean().optional(),
|
|
3757
|
+
isApprovalsOnboardingFinished: _zod.z.boolean().optional()
|
|
3758
|
+
});
|
|
3759
|
+
var UserProfile = _zod.z.object({
|
|
3760
|
+
name: _zod.z.string(),
|
|
3761
|
+
avatar: _zod.z.string().optional(),
|
|
3762
|
+
nickname: _zod.z.string().optional(),
|
|
3763
|
+
onboarding: UserOnboarding.optional()
|
|
3764
|
+
});
|
|
3765
|
+
var UserProfileUpdate = UserProfile.partial().omit({
|
|
3766
|
+
avatar: true
|
|
3767
|
+
});
|
|
3768
|
+
var UserTest = _zod.z.object({
|
|
3769
|
+
id: _zod.z.string(),
|
|
3770
|
+
email: _zod.z.string()
|
|
3771
|
+
});
|
|
3772
|
+
var UserSource = _zod.z.enum(["SignUp", "Invite", "SSO"]);
|
|
3773
|
+
var User = _zod.z.object({
|
|
3774
|
+
id: _zod.z.string(),
|
|
3775
|
+
email: _zod.z.string(),
|
|
3776
|
+
emailVerified: _zod.z.boolean(),
|
|
3777
|
+
createdAt: _zod.z.coerce.date(),
|
|
3778
|
+
trialExpiresAt: _zod.z.coerce.date().optional(),
|
|
3779
|
+
profile: UserProfile,
|
|
3780
|
+
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
3781
|
+
loggedOutAt: _zod.z.coerce.date().optional(),
|
|
3782
|
+
isProtected: _zod.z.boolean(),
|
|
3783
|
+
source: UserSource.optional()
|
|
3784
|
+
});
|
|
3785
|
+
var WorkspaceMembership = _zod.z.object({
|
|
3786
|
+
id: _zod.z.string(),
|
|
3787
|
+
userId: _zod.z.string(),
|
|
3788
|
+
workspaceId: _zod.z.string(),
|
|
3789
|
+
workspaceRole: _zod.z.nativeEnum(WorkspaceRole),
|
|
3790
|
+
notificationSettings: UserNotificationSettings
|
|
3791
|
+
});
|
|
3792
|
+
var UpdateMembershipRolesInput = _zod.z.object({
|
|
3793
|
+
members: _zod.z.array(
|
|
3794
|
+
_zod.z.object({
|
|
3795
|
+
userId: _zod.z.string(),
|
|
3796
|
+
role: _zod.z.nativeEnum(WorkspaceRole)
|
|
3797
|
+
})
|
|
3798
|
+
)
|
|
3582
3799
|
});
|
|
3583
3800
|
var DesignSystemRole = _zod.z.enum([
|
|
3584
3801
|
WorkspaceRole.Admin,
|
|
@@ -3586,10 +3803,17 @@ var DesignSystemRole = _zod.z.enum([
|
|
|
3586
3803
|
WorkspaceRole.Creator,
|
|
3587
3804
|
WorkspaceRole.Viewer
|
|
3588
3805
|
]);
|
|
3806
|
+
var DesignSystemInvitation = _zod.z.object({
|
|
3807
|
+
id: _zod.z.string(),
|
|
3808
|
+
designSystemId: _zod.z.string(),
|
|
3809
|
+
workspaceInvitationId: _zod.z.string(),
|
|
3810
|
+
designSystemRole: DesignSystemRole.optional()
|
|
3811
|
+
});
|
|
3589
3812
|
var DesignSystemMembership = _zod.z.object({
|
|
3590
3813
|
id: _zod.z.string(),
|
|
3591
3814
|
userId: _zod.z.string(),
|
|
3592
3815
|
designSystemId: _zod.z.string(),
|
|
3816
|
+
designSystemRole: DesignSystemRole.optional(),
|
|
3593
3817
|
workspaceMembershipId: _zod.z.string()
|
|
3594
3818
|
});
|
|
3595
3819
|
var DesignSystemMembers = _zod.z.object({
|
|
@@ -4011,95 +4235,6 @@ var DesignSystemDump = _zod.z.object({
|
|
|
4011
4235
|
customDomain: CustomDomain.optional(),
|
|
4012
4236
|
files: Asset.array()
|
|
4013
4237
|
});
|
|
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
4238
|
var IntegrationDesignSystem = _zod.z.object({
|
|
4104
4239
|
designSystemId: _zod.z.string(),
|
|
4105
4240
|
brandId: _zod.z.string(),
|
|
@@ -4167,7 +4302,7 @@ var IntegrationToken = _zod.z.object({
|
|
|
4167
4302
|
token_bitbucket_username: _zod.z.string().optional(),
|
|
4168
4303
|
// Bitbucket only
|
|
4169
4304
|
custom_url: _zod.z.string().optional().transform((value) => {
|
|
4170
|
-
if (!_optionalChain([value, 'optionalAccess',
|
|
4305
|
+
if (!_optionalChain([value, 'optionalAccess', _3 => _3.trim, 'call', _4 => _4()]))
|
|
4171
4306
|
return void 0;
|
|
4172
4307
|
return formatCustomUrl(value);
|
|
4173
4308
|
})
|
|
@@ -4202,87 +4337,6 @@ function formatCustomUrl(url) {
|
|
|
4202
4337
|
}
|
|
4203
4338
|
return forbiddenCustomUrlDomainList.some((domain) => formattedUrl.includes(domain)) ? void 0 : formattedUrl;
|
|
4204
4339
|
}
|
|
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
4340
|
var WorkspaceDump = _zod.z.object({
|
|
4287
4341
|
workspace: Workspace,
|
|
4288
4342
|
designSystems: DesignSystemDump.array(),
|
|
@@ -4315,57 +4369,6 @@ var UserSession = _zod.z.object({
|
|
|
4315
4369
|
session: Session,
|
|
4316
4370
|
user: User.nullable()
|
|
4317
4371
|
});
|
|
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
4372
|
var DesignSystemInviteEmailRecipient = _zod.z.object({
|
|
4370
4373
|
email: _zod.z.string(),
|
|
4371
4374
|
role: WorkspaceRoleSchema
|