@supernova-studio/model 0.54.29 → 0.54.30
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 +485 -500
- package/dist/index.d.ts +485 -500
- package/dist/index.js +47 -54
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +386 -393
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/users/index.ts +0 -1
- package/src/users/user-create.ts +0 -9
package/dist/index.mjs
CHANGED
|
@@ -4436,7 +4436,7 @@ var DesignSystemDump = z131.object({
|
|
|
4436
4436
|
});
|
|
4437
4437
|
|
|
4438
4438
|
// src/data-dumps/user-data-dump.ts
|
|
4439
|
-
import { z as
|
|
4439
|
+
import { z as z145 } from "zod";
|
|
4440
4440
|
|
|
4441
4441
|
// src/users/linked-integrations.ts
|
|
4442
4442
|
import { z as z132 } from "zod";
|
|
@@ -4464,47 +4464,85 @@ var UserLinkedIntegrations = z132.object({
|
|
|
4464
4464
|
bitbucket: IntegrationUserInfo.array().optional()
|
|
4465
4465
|
});
|
|
4466
4466
|
|
|
4467
|
-
// src/users/user
|
|
4467
|
+
// src/users/user.ts
|
|
4468
|
+
import { z as z134 } from "zod";
|
|
4469
|
+
|
|
4470
|
+
// src/users/user-profile.ts
|
|
4468
4471
|
import { z as z133 } from "zod";
|
|
4469
|
-
var
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4472
|
+
var UserOnboardingDepartment = z133.enum(["Design", "Engineering", "Product", "Brand", "Other"]);
|
|
4473
|
+
var UserOnboardingJobLevel = z133.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
4474
|
+
var UserOnboarding = z133.object({
|
|
4475
|
+
companyName: z133.string().optional(),
|
|
4476
|
+
numberOfPeopleInOrg: z133.string().optional(),
|
|
4477
|
+
numberOfPeopleInDesignTeam: z133.string().optional(),
|
|
4478
|
+
department: UserOnboardingDepartment.optional(),
|
|
4479
|
+
jobTitle: z133.string().optional(),
|
|
4480
|
+
phase: z133.string().optional(),
|
|
4481
|
+
jobLevel: UserOnboardingJobLevel.optional(),
|
|
4482
|
+
designSystemName: z133.string().optional(),
|
|
4483
|
+
defaultDestination: z133.string().optional(),
|
|
4484
|
+
figmaUrl: z133.string().optional(),
|
|
4485
|
+
isPageDraftOnboardingFinished: z133.boolean().optional(),
|
|
4486
|
+
isApprovalsOnboardingFinished: z133.boolean().optional()
|
|
4487
|
+
});
|
|
4488
|
+
var UserProfile = z133.object({
|
|
4489
|
+
name: z133.string(),
|
|
4490
|
+
avatar: z133.string().optional(),
|
|
4491
|
+
nickname: z133.string().optional(),
|
|
4492
|
+
onboarding: UserOnboarding.optional()
|
|
4473
4493
|
});
|
|
4474
|
-
var
|
|
4475
|
-
|
|
4494
|
+
var UserProfileUpdate = UserProfile.partial().omit({
|
|
4495
|
+
avatar: true
|
|
4476
4496
|
});
|
|
4477
4497
|
|
|
4478
|
-
// src/users/user
|
|
4479
|
-
|
|
4480
|
-
var
|
|
4498
|
+
// src/users/user.ts
|
|
4499
|
+
var UserSource = z134.enum(["SignUp", "Invite", "SSO"]);
|
|
4500
|
+
var User = z134.object({
|
|
4501
|
+
id: z134.string(),
|
|
4481
4502
|
email: z134.string(),
|
|
4482
|
-
|
|
4483
|
-
|
|
4503
|
+
emailVerified: z134.boolean(),
|
|
4504
|
+
createdAt: z134.coerce.date(),
|
|
4505
|
+
trialExpiresAt: z134.coerce.date().optional(),
|
|
4506
|
+
profile: UserProfile,
|
|
4507
|
+
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
4508
|
+
loggedOutAt: z134.coerce.date().optional(),
|
|
4509
|
+
isProtected: z134.boolean(),
|
|
4510
|
+
source: UserSource.optional()
|
|
4484
4511
|
});
|
|
4485
4512
|
|
|
4486
|
-
// src/users/user-
|
|
4513
|
+
// src/users/user-analytics-cleanup-schedule.ts
|
|
4487
4514
|
import { z as z135 } from "zod";
|
|
4488
|
-
var
|
|
4489
|
-
|
|
4490
|
-
|
|
4515
|
+
var UserAnalyticsCleanupSchedule = z135.object({
|
|
4516
|
+
userId: z135.string(),
|
|
4517
|
+
createdAt: z135.coerce.date(),
|
|
4518
|
+
deleteAt: z135.coerce.date()
|
|
4519
|
+
});
|
|
4520
|
+
var UserAnalyticsCleanupScheduleDbInput = UserAnalyticsCleanupSchedule.omit({
|
|
4521
|
+
createdAt: true
|
|
4491
4522
|
});
|
|
4492
4523
|
|
|
4493
|
-
// src/users/user-
|
|
4524
|
+
// src/users/user-identity.ts
|
|
4494
4525
|
import { z as z136 } from "zod";
|
|
4495
|
-
var
|
|
4526
|
+
var UserIdentity = z136.object({
|
|
4496
4527
|
id: z136.string(),
|
|
4497
|
-
|
|
4498
|
-
email: z136.string(),
|
|
4499
|
-
avatar: z136.string().optional()
|
|
4528
|
+
userId: z136.string()
|
|
4500
4529
|
});
|
|
4501
4530
|
|
|
4502
|
-
// src/users/user-
|
|
4531
|
+
// src/users/user-minified.ts
|
|
4503
4532
|
import { z as z137 } from "zod";
|
|
4504
|
-
var
|
|
4505
|
-
|
|
4533
|
+
var UserMinified = z137.object({
|
|
4534
|
+
id: z137.string(),
|
|
4535
|
+
name: z137.string(),
|
|
4536
|
+
email: z137.string(),
|
|
4537
|
+
avatar: z137.string().optional()
|
|
4538
|
+
});
|
|
4539
|
+
|
|
4540
|
+
// src/users/user-notification-settings.ts
|
|
4541
|
+
import { z as z138 } from "zod";
|
|
4542
|
+
var LiveblocksNotificationSettings = z138.object({
|
|
4543
|
+
sendCommentNotificationEmails: z138.boolean()
|
|
4506
4544
|
});
|
|
4507
|
-
var UserNotificationSettings =
|
|
4545
|
+
var UserNotificationSettings = z138.object({
|
|
4508
4546
|
liveblocksNotificationSettings: LiveblocksNotificationSettings
|
|
4509
4547
|
});
|
|
4510
4548
|
var defaultNotificationSettings = {
|
|
@@ -4513,34 +4551,6 @@ var defaultNotificationSettings = {
|
|
|
4513
4551
|
}
|
|
4514
4552
|
};
|
|
4515
4553
|
|
|
4516
|
-
// src/users/user-profile.ts
|
|
4517
|
-
import { z as z138 } from "zod";
|
|
4518
|
-
var UserOnboardingDepartment = z138.enum(["Design", "Engineering", "Product", "Brand", "Other"]);
|
|
4519
|
-
var UserOnboardingJobLevel = z138.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
4520
|
-
var UserOnboarding = z138.object({
|
|
4521
|
-
companyName: z138.string().optional(),
|
|
4522
|
-
numberOfPeopleInOrg: z138.string().optional(),
|
|
4523
|
-
numberOfPeopleInDesignTeam: z138.string().optional(),
|
|
4524
|
-
department: UserOnboardingDepartment.optional(),
|
|
4525
|
-
jobTitle: z138.string().optional(),
|
|
4526
|
-
phase: z138.string().optional(),
|
|
4527
|
-
jobLevel: UserOnboardingJobLevel.optional(),
|
|
4528
|
-
designSystemName: z138.string().optional(),
|
|
4529
|
-
defaultDestination: z138.string().optional(),
|
|
4530
|
-
figmaUrl: z138.string().optional(),
|
|
4531
|
-
isPageDraftOnboardingFinished: z138.boolean().optional(),
|
|
4532
|
-
isApprovalsOnboardingFinished: z138.boolean().optional()
|
|
4533
|
-
});
|
|
4534
|
-
var UserProfile = z138.object({
|
|
4535
|
-
name: z138.string(),
|
|
4536
|
-
avatar: z138.string().optional(),
|
|
4537
|
-
nickname: z138.string().optional(),
|
|
4538
|
-
onboarding: UserOnboarding.optional()
|
|
4539
|
-
});
|
|
4540
|
-
var UserProfileUpdate = UserProfile.partial().omit({
|
|
4541
|
-
avatar: true
|
|
4542
|
-
});
|
|
4543
|
-
|
|
4544
4554
|
// src/users/user-test.ts
|
|
4545
4555
|
import { z as z139 } from "zod";
|
|
4546
4556
|
var UserTest = z139.object({
|
|
@@ -4548,64 +4558,48 @@ var UserTest = z139.object({
|
|
|
4548
4558
|
email: z139.string()
|
|
4549
4559
|
});
|
|
4550
4560
|
|
|
4551
|
-
// src/users/user.ts
|
|
4552
|
-
import { z as z140 } from "zod";
|
|
4553
|
-
var UserSource = z140.enum(["SignUp", "Invite", "SSO"]);
|
|
4554
|
-
var User = z140.object({
|
|
4555
|
-
id: z140.string(),
|
|
4556
|
-
email: z140.string(),
|
|
4557
|
-
emailVerified: z140.boolean(),
|
|
4558
|
-
createdAt: z140.coerce.date(),
|
|
4559
|
-
trialExpiresAt: z140.coerce.date().optional(),
|
|
4560
|
-
profile: UserProfile,
|
|
4561
|
-
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
4562
|
-
loggedOutAt: z140.coerce.date().optional(),
|
|
4563
|
-
isProtected: z140.boolean(),
|
|
4564
|
-
source: UserSource.optional()
|
|
4565
|
-
});
|
|
4566
|
-
|
|
4567
4561
|
// src/data-dumps/workspace-dump.ts
|
|
4568
|
-
import { z as
|
|
4562
|
+
import { z as z144 } from "zod";
|
|
4569
4563
|
|
|
4570
4564
|
// src/integrations/integration.ts
|
|
4571
|
-
import { z as
|
|
4572
|
-
var IntegrationDesignSystem =
|
|
4573
|
-
designSystemId:
|
|
4574
|
-
brandId:
|
|
4575
|
-
title:
|
|
4576
|
-
userId:
|
|
4577
|
-
date:
|
|
4578
|
-
});
|
|
4579
|
-
var IntegrationCredentialsType =
|
|
4580
|
-
var IntegrationCredentialsState =
|
|
4581
|
-
var IntegrationCredentialsProfile =
|
|
4582
|
-
id: nullishToOptional(
|
|
4583
|
-
email: nullishToOptional(
|
|
4584
|
-
handle: nullishToOptional(
|
|
4585
|
-
type: nullishToOptional(
|
|
4586
|
-
avatarUrl: nullishToOptional(
|
|
4587
|
-
organization: nullishToOptional(
|
|
4588
|
-
collection: nullishToOptional(
|
|
4589
|
-
});
|
|
4590
|
-
var IntegrationCredentials =
|
|
4591
|
-
id:
|
|
4565
|
+
import { z as z140 } from "zod";
|
|
4566
|
+
var IntegrationDesignSystem = z140.object({
|
|
4567
|
+
designSystemId: z140.string(),
|
|
4568
|
+
brandId: z140.string(),
|
|
4569
|
+
title: z140.string().optional(),
|
|
4570
|
+
userId: z140.string().optional(),
|
|
4571
|
+
date: z140.coerce.date().optional()
|
|
4572
|
+
});
|
|
4573
|
+
var IntegrationCredentialsType = z140.enum(["OAuth2", "PAT", "GithubApp"]);
|
|
4574
|
+
var IntegrationCredentialsState = z140.enum(["Active", "Inactive"]);
|
|
4575
|
+
var IntegrationCredentialsProfile = z140.object({
|
|
4576
|
+
id: nullishToOptional(z140.string()),
|
|
4577
|
+
email: nullishToOptional(z140.string()),
|
|
4578
|
+
handle: nullishToOptional(z140.string()),
|
|
4579
|
+
type: nullishToOptional(z140.string()),
|
|
4580
|
+
avatarUrl: nullishToOptional(z140.string()),
|
|
4581
|
+
organization: nullishToOptional(z140.string()),
|
|
4582
|
+
collection: nullishToOptional(z140.string())
|
|
4583
|
+
});
|
|
4584
|
+
var IntegrationCredentials = z140.object({
|
|
4585
|
+
id: z140.string(),
|
|
4592
4586
|
type: IntegrationCredentialsType,
|
|
4593
|
-
integrationId:
|
|
4594
|
-
accessToken:
|
|
4595
|
-
userId:
|
|
4596
|
-
createdAt:
|
|
4597
|
-
refreshToken:
|
|
4598
|
-
tokenName:
|
|
4599
|
-
expiresAt:
|
|
4600
|
-
refreshedAt:
|
|
4601
|
-
username:
|
|
4602
|
-
appInstallationId:
|
|
4587
|
+
integrationId: z140.string(),
|
|
4588
|
+
accessToken: z140.string(),
|
|
4589
|
+
userId: z140.string(),
|
|
4590
|
+
createdAt: z140.coerce.date(),
|
|
4591
|
+
refreshToken: z140.string().optional(),
|
|
4592
|
+
tokenName: z140.string().optional(),
|
|
4593
|
+
expiresAt: z140.coerce.date().optional(),
|
|
4594
|
+
refreshedAt: z140.coerce.date().optional(),
|
|
4595
|
+
username: z140.string().optional(),
|
|
4596
|
+
appInstallationId: z140.string().optional(),
|
|
4603
4597
|
profile: IntegrationCredentialsProfile.optional(),
|
|
4604
|
-
customUrl:
|
|
4598
|
+
customUrl: z140.string().optional(),
|
|
4605
4599
|
state: IntegrationCredentialsState,
|
|
4606
4600
|
user: UserMinified.optional()
|
|
4607
4601
|
});
|
|
4608
|
-
var ExtendedIntegrationType =
|
|
4602
|
+
var ExtendedIntegrationType = z140.enum([
|
|
4609
4603
|
"Figma",
|
|
4610
4604
|
"Github",
|
|
4611
4605
|
"Gitlab",
|
|
@@ -4616,26 +4610,26 @@ var ExtendedIntegrationType = z141.enum([
|
|
|
4616
4610
|
]);
|
|
4617
4611
|
var IntegrationType = ExtendedIntegrationType.exclude(["TokenStudio", "FigmaVariablesPlugin"]);
|
|
4618
4612
|
var GitIntegrationType = IntegrationType.exclude(["Figma"]);
|
|
4619
|
-
var Integration =
|
|
4620
|
-
id:
|
|
4621
|
-
workspaceId:
|
|
4613
|
+
var Integration = z140.object({
|
|
4614
|
+
id: z140.string(),
|
|
4615
|
+
workspaceId: z140.string(),
|
|
4622
4616
|
type: IntegrationType,
|
|
4623
|
-
createdAt:
|
|
4624
|
-
integrationCredentials:
|
|
4625
|
-
});
|
|
4626
|
-
var IntegrationToken =
|
|
4627
|
-
access_token:
|
|
4628
|
-
refresh_token:
|
|
4629
|
-
expires_in:
|
|
4630
|
-
token_type:
|
|
4631
|
-
token_name:
|
|
4632
|
-
token_azure_organization_name:
|
|
4617
|
+
createdAt: z140.coerce.date(),
|
|
4618
|
+
integrationCredentials: z140.array(IntegrationCredentials).optional()
|
|
4619
|
+
});
|
|
4620
|
+
var IntegrationToken = z140.object({
|
|
4621
|
+
access_token: z140.string(),
|
|
4622
|
+
refresh_token: z140.string().optional(),
|
|
4623
|
+
expires_in: z140.union([z140.number().optional(), z140.string().optional()]),
|
|
4624
|
+
token_type: z140.string().optional(),
|
|
4625
|
+
token_name: z140.string().optional(),
|
|
4626
|
+
token_azure_organization_name: z140.string().optional(),
|
|
4633
4627
|
// Azure Cloud PAT only
|
|
4634
|
-
token_azure_collection_name:
|
|
4628
|
+
token_azure_collection_name: z140.string().optional(),
|
|
4635
4629
|
// Azure Server PAT only
|
|
4636
|
-
token_bitbucket_username:
|
|
4630
|
+
token_bitbucket_username: z140.string().optional(),
|
|
4637
4631
|
// Bitbucket only
|
|
4638
|
-
custom_url:
|
|
4632
|
+
custom_url: z140.string().optional().transform((value) => {
|
|
4639
4633
|
if (!value?.trim())
|
|
4640
4634
|
return void 0;
|
|
4641
4635
|
return formatCustomUrl(value);
|
|
@@ -4674,99 +4668,99 @@ function formatCustomUrl(url) {
|
|
|
4674
4668
|
|
|
4675
4669
|
// src/workspace/workspace.ts
|
|
4676
4670
|
import IPCIDR from "ip-cidr";
|
|
4677
|
-
import { z as
|
|
4671
|
+
import { z as z143 } from "zod";
|
|
4678
4672
|
|
|
4679
4673
|
// src/workspace/npm-registry-settings.ts
|
|
4680
|
-
import { z as
|
|
4681
|
-
var NpmRegistryAuthType =
|
|
4682
|
-
var NpmRegistryType =
|
|
4683
|
-
var NpmRegistryBasicAuthConfig =
|
|
4684
|
-
authType:
|
|
4685
|
-
username:
|
|
4686
|
-
password:
|
|
4687
|
-
});
|
|
4688
|
-
var NpmRegistryBearerAuthConfig =
|
|
4689
|
-
authType:
|
|
4690
|
-
accessToken:
|
|
4691
|
-
});
|
|
4692
|
-
var NpmRegistryNoAuthConfig =
|
|
4693
|
-
authType:
|
|
4694
|
-
});
|
|
4695
|
-
var NpmRegistrCustomAuthConfig =
|
|
4696
|
-
authType:
|
|
4697
|
-
authHeaderName:
|
|
4698
|
-
authHeaderValue:
|
|
4699
|
-
});
|
|
4700
|
-
var NpmRegistryAuthConfig =
|
|
4674
|
+
import { z as z141 } from "zod";
|
|
4675
|
+
var NpmRegistryAuthType = z141.enum(["Basic", "Bearer", "None", "Custom"]);
|
|
4676
|
+
var NpmRegistryType = z141.enum(["NPMJS", "GitHub", "AzureDevOps", "Artifactory", "Custom"]);
|
|
4677
|
+
var NpmRegistryBasicAuthConfig = z141.object({
|
|
4678
|
+
authType: z141.literal(NpmRegistryAuthType.Enum.Basic),
|
|
4679
|
+
username: z141.string(),
|
|
4680
|
+
password: z141.string()
|
|
4681
|
+
});
|
|
4682
|
+
var NpmRegistryBearerAuthConfig = z141.object({
|
|
4683
|
+
authType: z141.literal(NpmRegistryAuthType.Enum.Bearer),
|
|
4684
|
+
accessToken: z141.string()
|
|
4685
|
+
});
|
|
4686
|
+
var NpmRegistryNoAuthConfig = z141.object({
|
|
4687
|
+
authType: z141.literal(NpmRegistryAuthType.Enum.None)
|
|
4688
|
+
});
|
|
4689
|
+
var NpmRegistrCustomAuthConfig = z141.object({
|
|
4690
|
+
authType: z141.literal(NpmRegistryAuthType.Enum.Custom),
|
|
4691
|
+
authHeaderName: z141.string(),
|
|
4692
|
+
authHeaderValue: z141.string()
|
|
4693
|
+
});
|
|
4694
|
+
var NpmRegistryAuthConfig = z141.discriminatedUnion("authType", [
|
|
4701
4695
|
NpmRegistryBasicAuthConfig,
|
|
4702
4696
|
NpmRegistryBearerAuthConfig,
|
|
4703
4697
|
NpmRegistryNoAuthConfig,
|
|
4704
4698
|
NpmRegistrCustomAuthConfig
|
|
4705
4699
|
]);
|
|
4706
|
-
var NpmRegistryConfigBase =
|
|
4700
|
+
var NpmRegistryConfigBase = z141.object({
|
|
4707
4701
|
registryType: NpmRegistryType,
|
|
4708
|
-
enabledScopes:
|
|
4709
|
-
customRegistryUrl:
|
|
4710
|
-
bypassProxy:
|
|
4711
|
-
npmProxyRegistryConfigId:
|
|
4712
|
-
npmProxyVersion:
|
|
4702
|
+
enabledScopes: z141.array(z141.string()),
|
|
4703
|
+
customRegistryUrl: z141.string().optional(),
|
|
4704
|
+
bypassProxy: z141.boolean().default(false),
|
|
4705
|
+
npmProxyRegistryConfigId: z141.string().optional(),
|
|
4706
|
+
npmProxyVersion: z141.number().optional()
|
|
4713
4707
|
});
|
|
4714
4708
|
var NpmRegistryConfig = NpmRegistryConfigBase.and(NpmRegistryAuthConfig);
|
|
4715
4709
|
|
|
4716
4710
|
// src/workspace/sso-provider.ts
|
|
4717
|
-
import { z as
|
|
4718
|
-
var SsoProvider =
|
|
4719
|
-
providerId:
|
|
4720
|
-
defaultAutoInviteValue:
|
|
4721
|
-
autoInviteDomains:
|
|
4722
|
-
skipDocsSupernovaLogin:
|
|
4723
|
-
areInvitesDisabled:
|
|
4724
|
-
isTestMode:
|
|
4725
|
-
emailDomains:
|
|
4726
|
-
metadataXml:
|
|
4711
|
+
import { z as z142 } from "zod";
|
|
4712
|
+
var SsoProvider = z142.object({
|
|
4713
|
+
providerId: z142.string(),
|
|
4714
|
+
defaultAutoInviteValue: z142.boolean(),
|
|
4715
|
+
autoInviteDomains: z142.record(z142.string(), z142.boolean()),
|
|
4716
|
+
skipDocsSupernovaLogin: z142.boolean(),
|
|
4717
|
+
areInvitesDisabled: z142.boolean(),
|
|
4718
|
+
isTestMode: z142.boolean(),
|
|
4719
|
+
emailDomains: z142.array(z142.string()),
|
|
4720
|
+
metadataXml: z142.string().nullish()
|
|
4727
4721
|
});
|
|
4728
4722
|
|
|
4729
4723
|
// src/workspace/workspace.ts
|
|
4730
4724
|
var isValidCIDR = (value) => {
|
|
4731
4725
|
return IPCIDR.isValidAddress(value);
|
|
4732
4726
|
};
|
|
4733
|
-
var WorkspaceIpWhitelistEntry =
|
|
4734
|
-
isEnabled:
|
|
4735
|
-
name:
|
|
4736
|
-
range:
|
|
4727
|
+
var WorkspaceIpWhitelistEntry = z143.object({
|
|
4728
|
+
isEnabled: z143.boolean(),
|
|
4729
|
+
name: z143.string(),
|
|
4730
|
+
range: z143.string().refine(isValidCIDR, {
|
|
4737
4731
|
message: "Invalid IP CIDR"
|
|
4738
4732
|
})
|
|
4739
4733
|
});
|
|
4740
|
-
var WorkspaceIpSettings =
|
|
4741
|
-
isEnabledForCloud:
|
|
4742
|
-
isEnabledForDocs:
|
|
4743
|
-
entries:
|
|
4734
|
+
var WorkspaceIpSettings = z143.object({
|
|
4735
|
+
isEnabledForCloud: z143.boolean(),
|
|
4736
|
+
isEnabledForDocs: z143.boolean(),
|
|
4737
|
+
entries: z143.array(WorkspaceIpWhitelistEntry)
|
|
4744
4738
|
});
|
|
4745
|
-
var WorkspaceProfile =
|
|
4746
|
-
name:
|
|
4747
|
-
handle:
|
|
4748
|
-
color:
|
|
4749
|
-
avatar: nullishToOptional(
|
|
4739
|
+
var WorkspaceProfile = z143.object({
|
|
4740
|
+
name: z143.string(),
|
|
4741
|
+
handle: z143.string(),
|
|
4742
|
+
color: z143.string(),
|
|
4743
|
+
avatar: nullishToOptional(z143.string()),
|
|
4750
4744
|
billingDetails: nullishToOptional(BillingDetails)
|
|
4751
4745
|
});
|
|
4752
4746
|
var WorkspaceProfileUpdate = WorkspaceProfile.omit({
|
|
4753
4747
|
avatar: true
|
|
4754
4748
|
});
|
|
4755
|
-
var Workspace =
|
|
4756
|
-
id:
|
|
4749
|
+
var Workspace = z143.object({
|
|
4750
|
+
id: z143.string(),
|
|
4757
4751
|
profile: WorkspaceProfile,
|
|
4758
4752
|
subscription: Subscription,
|
|
4759
4753
|
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
4760
4754
|
sso: nullishToOptional(SsoProvider),
|
|
4761
4755
|
npmRegistrySettings: nullishToOptional(NpmRegistryConfig)
|
|
4762
4756
|
});
|
|
4763
|
-
var WorkspaceWithDesignSystems =
|
|
4757
|
+
var WorkspaceWithDesignSystems = z143.object({
|
|
4764
4758
|
workspace: Workspace,
|
|
4765
|
-
designSystems:
|
|
4759
|
+
designSystems: z143.array(DesignSystem)
|
|
4766
4760
|
});
|
|
4767
4761
|
|
|
4768
4762
|
// src/data-dumps/workspace-dump.ts
|
|
4769
|
-
var WorkspaceDump =
|
|
4763
|
+
var WorkspaceDump = z144.object({
|
|
4770
4764
|
workspace: Workspace,
|
|
4771
4765
|
designSystems: DesignSystemDump.array(),
|
|
4772
4766
|
codeIntegration: CodeIntegrationDump,
|
|
@@ -4774,94 +4768,94 @@ var WorkspaceDump = z145.object({
|
|
|
4774
4768
|
});
|
|
4775
4769
|
|
|
4776
4770
|
// src/data-dumps/user-data-dump.ts
|
|
4777
|
-
var UserDump =
|
|
4771
|
+
var UserDump = z145.object({
|
|
4778
4772
|
user: User,
|
|
4779
4773
|
workspaces: WorkspaceDump.array()
|
|
4780
4774
|
});
|
|
4781
4775
|
|
|
4782
4776
|
// src/docs-server/session.ts
|
|
4783
|
-
import { z as
|
|
4784
|
-
var NpmProxyToken =
|
|
4785
|
-
access:
|
|
4786
|
-
expiresAt:
|
|
4777
|
+
import { z as z146 } from "zod";
|
|
4778
|
+
var NpmProxyToken = z146.object({
|
|
4779
|
+
access: z146.string(),
|
|
4780
|
+
expiresAt: z146.number()
|
|
4787
4781
|
});
|
|
4788
|
-
var SessionData =
|
|
4789
|
-
returnToUrl:
|
|
4782
|
+
var SessionData = z146.object({
|
|
4783
|
+
returnToUrl: z146.string().optional(),
|
|
4790
4784
|
npmProxyToken: NpmProxyToken.optional()
|
|
4791
4785
|
});
|
|
4792
|
-
var Session =
|
|
4793
|
-
id:
|
|
4794
|
-
expiresAt:
|
|
4795
|
-
userId:
|
|
4786
|
+
var Session = z146.object({
|
|
4787
|
+
id: z146.string(),
|
|
4788
|
+
expiresAt: z146.coerce.date(),
|
|
4789
|
+
userId: z146.string().nullable(),
|
|
4796
4790
|
data: SessionData
|
|
4797
4791
|
});
|
|
4798
|
-
var AuthTokens =
|
|
4799
|
-
access:
|
|
4800
|
-
refresh:
|
|
4792
|
+
var AuthTokens = z146.object({
|
|
4793
|
+
access: z146.string(),
|
|
4794
|
+
refresh: z146.string()
|
|
4801
4795
|
});
|
|
4802
|
-
var UserSession =
|
|
4796
|
+
var UserSession = z146.object({
|
|
4803
4797
|
session: Session,
|
|
4804
4798
|
user: User.nullable()
|
|
4805
4799
|
});
|
|
4806
4800
|
|
|
4807
4801
|
// src/events/base.ts
|
|
4808
|
-
import { z as
|
|
4802
|
+
import { z as z149 } from "zod";
|
|
4809
4803
|
|
|
4810
4804
|
// src/events/data-source-imported.ts
|
|
4811
|
-
import { z as
|
|
4812
|
-
var EventDataSourceImported =
|
|
4813
|
-
type:
|
|
4814
|
-
workspaceId:
|
|
4815
|
-
designSystemId:
|
|
4805
|
+
import { z as z147 } from "zod";
|
|
4806
|
+
var EventDataSourceImported = z147.object({
|
|
4807
|
+
type: z147.literal("DataSourceImported"),
|
|
4808
|
+
workspaceId: z147.string(),
|
|
4809
|
+
designSystemId: z147.string()
|
|
4816
4810
|
});
|
|
4817
4811
|
|
|
4818
4812
|
// src/events/version-released.ts
|
|
4819
|
-
import { z as
|
|
4820
|
-
var EventVersionReleased =
|
|
4821
|
-
type:
|
|
4822
|
-
workspaceId:
|
|
4823
|
-
designSystemId:
|
|
4824
|
-
versionId:
|
|
4813
|
+
import { z as z148 } from "zod";
|
|
4814
|
+
var EventVersionReleased = z148.object({
|
|
4815
|
+
type: z148.literal("DesignSystemVersionReleased"),
|
|
4816
|
+
workspaceId: z148.string(),
|
|
4817
|
+
designSystemId: z148.string(),
|
|
4818
|
+
versionId: z148.string()
|
|
4825
4819
|
});
|
|
4826
4820
|
|
|
4827
4821
|
// src/events/base.ts
|
|
4828
|
-
var Event =
|
|
4822
|
+
var Event = z149.discriminatedUnion("type", [EventVersionReleased, EventDataSourceImported]);
|
|
4829
4823
|
|
|
4830
4824
|
// src/export/export-runner/export-context.ts
|
|
4831
|
-
import { z as
|
|
4832
|
-
var ExportJobDocumentationContext =
|
|
4833
|
-
isSingleVersionDocs:
|
|
4834
|
-
versionSlug:
|
|
4825
|
+
import { z as z150 } from "zod";
|
|
4826
|
+
var ExportJobDocumentationContext = z150.object({
|
|
4827
|
+
isSingleVersionDocs: z150.boolean(),
|
|
4828
|
+
versionSlug: z150.string(),
|
|
4835
4829
|
environment: PublishedDocEnvironment
|
|
4836
4830
|
});
|
|
4837
|
-
var ExportJobContext =
|
|
4838
|
-
apiUrl:
|
|
4839
|
-
accessToken:
|
|
4840
|
-
designSystemId:
|
|
4841
|
-
designSystemName:
|
|
4842
|
-
exporterId:
|
|
4843
|
-
versionId:
|
|
4844
|
-
brandId:
|
|
4845
|
-
themeId:
|
|
4846
|
-
themePersistentIds:
|
|
4847
|
-
exporterName:
|
|
4848
|
-
exporterPackageUrl:
|
|
4831
|
+
var ExportJobContext = z150.object({
|
|
4832
|
+
apiUrl: z150.string(),
|
|
4833
|
+
accessToken: z150.string(),
|
|
4834
|
+
designSystemId: z150.string(),
|
|
4835
|
+
designSystemName: z150.string(),
|
|
4836
|
+
exporterId: z150.string(),
|
|
4837
|
+
versionId: z150.string(),
|
|
4838
|
+
brandId: z150.string().optional(),
|
|
4839
|
+
themeId: z150.string().optional(),
|
|
4840
|
+
themePersistentIds: z150.string().array().optional(),
|
|
4841
|
+
exporterName: z150.string(),
|
|
4842
|
+
exporterPackageUrl: z150.string(),
|
|
4849
4843
|
exporterPropertyValues: ExporterPropertyValue.array(),
|
|
4850
4844
|
documentation: ExportJobDocumentationContext.optional()
|
|
4851
4845
|
});
|
|
4852
4846
|
|
|
4853
4847
|
// src/export/export-runner/exporter-payload.ts
|
|
4854
|
-
import { z as
|
|
4855
|
-
var ExporterFunctionPayload =
|
|
4856
|
-
exportJobId:
|
|
4857
|
-
exportContextId:
|
|
4858
|
-
designSystemId:
|
|
4859
|
-
workspaceId:
|
|
4848
|
+
import { z as z151 } from "zod";
|
|
4849
|
+
var ExporterFunctionPayload = z151.object({
|
|
4850
|
+
exportJobId: z151.string(),
|
|
4851
|
+
exportContextId: z151.string(),
|
|
4852
|
+
designSystemId: z151.string(),
|
|
4853
|
+
workspaceId: z151.string()
|
|
4860
4854
|
});
|
|
4861
4855
|
|
|
4862
4856
|
// src/export/export-jobs.ts
|
|
4863
|
-
import { z as
|
|
4864
|
-
var ExportJobDestinationType =
|
|
4857
|
+
import { z as z152 } from "zod";
|
|
4858
|
+
var ExportJobDestinationType = z152.enum([
|
|
4865
4859
|
"s3",
|
|
4866
4860
|
"webhookUrl",
|
|
4867
4861
|
"github",
|
|
@@ -4870,30 +4864,30 @@ var ExportJobDestinationType = z153.enum([
|
|
|
4870
4864
|
"gitlab",
|
|
4871
4865
|
"bitbucket"
|
|
4872
4866
|
]);
|
|
4873
|
-
var ExportJobStatus =
|
|
4874
|
-
var ExportJobLogEntryType =
|
|
4875
|
-
var ExportJobLogEntry =
|
|
4876
|
-
id:
|
|
4877
|
-
time:
|
|
4867
|
+
var ExportJobStatus = z152.enum(["InProgress", "Success", "Failed", "Timeout"]);
|
|
4868
|
+
var ExportJobLogEntryType = z152.enum(["success", "info", "warning", "error", "user"]);
|
|
4869
|
+
var ExportJobLogEntry = z152.object({
|
|
4870
|
+
id: z152.string().optional(),
|
|
4871
|
+
time: z152.coerce.date(),
|
|
4878
4872
|
type: ExportJobLogEntryType,
|
|
4879
|
-
message:
|
|
4873
|
+
message: z152.string()
|
|
4880
4874
|
});
|
|
4881
|
-
var ExportJobPullRequestDestinationResult =
|
|
4882
|
-
pullRequestUrl:
|
|
4875
|
+
var ExportJobPullRequestDestinationResult = z152.object({
|
|
4876
|
+
pullRequestUrl: z152.string()
|
|
4883
4877
|
});
|
|
4884
|
-
var ExportJobS3DestinationResult =
|
|
4885
|
-
bucket:
|
|
4886
|
-
urlPrefix:
|
|
4887
|
-
path:
|
|
4888
|
-
files:
|
|
4889
|
-
url: nullishToOptional(
|
|
4890
|
-
urls: nullishToOptional(
|
|
4878
|
+
var ExportJobS3DestinationResult = z152.object({
|
|
4879
|
+
bucket: z152.string(),
|
|
4880
|
+
urlPrefix: z152.string().optional(),
|
|
4881
|
+
path: z152.string(),
|
|
4882
|
+
files: z152.array(z152.string()),
|
|
4883
|
+
url: nullishToOptional(z152.string()),
|
|
4884
|
+
urls: nullishToOptional(z152.string().array())
|
|
4891
4885
|
});
|
|
4892
|
-
var ExportJobDocsDestinationResult =
|
|
4893
|
-
url:
|
|
4886
|
+
var ExportJobDocsDestinationResult = z152.object({
|
|
4887
|
+
url: z152.string()
|
|
4894
4888
|
});
|
|
4895
|
-
var ExportJobResult =
|
|
4896
|
-
error:
|
|
4889
|
+
var ExportJobResult = z152.object({
|
|
4890
|
+
error: z152.string().optional(),
|
|
4897
4891
|
s3: nullishToOptional(ExportJobS3DestinationResult),
|
|
4898
4892
|
github: nullishToOptional(ExportJobPullRequestDestinationResult),
|
|
4899
4893
|
azure: nullishToOptional(ExportJobPullRequestDestinationResult),
|
|
@@ -4902,22 +4896,22 @@ var ExportJobResult = z153.object({
|
|
|
4902
4896
|
sndocs: nullishToOptional(ExportJobDocsDestinationResult),
|
|
4903
4897
|
logs: nullishToOptional(ExportJobLogEntry.array())
|
|
4904
4898
|
});
|
|
4905
|
-
var ExportJob =
|
|
4906
|
-
id:
|
|
4907
|
-
createdAt:
|
|
4908
|
-
finishedAt:
|
|
4909
|
-
designSystemId:
|
|
4910
|
-
designSystemVersionId:
|
|
4911
|
-
workspaceId:
|
|
4912
|
-
scheduleId:
|
|
4913
|
-
exporterId:
|
|
4914
|
-
brandId:
|
|
4915
|
-
themeId:
|
|
4916
|
-
themePersistentIds:
|
|
4917
|
-
estimatedExecutionTime:
|
|
4899
|
+
var ExportJob = z152.object({
|
|
4900
|
+
id: z152.string(),
|
|
4901
|
+
createdAt: z152.coerce.date(),
|
|
4902
|
+
finishedAt: z152.coerce.date().optional(),
|
|
4903
|
+
designSystemId: z152.string(),
|
|
4904
|
+
designSystemVersionId: z152.string(),
|
|
4905
|
+
workspaceId: z152.string(),
|
|
4906
|
+
scheduleId: z152.string().nullish(),
|
|
4907
|
+
exporterId: z152.string(),
|
|
4908
|
+
brandId: z152.string().optional(),
|
|
4909
|
+
themeId: z152.string().optional(),
|
|
4910
|
+
themePersistentIds: z152.string().array().optional(),
|
|
4911
|
+
estimatedExecutionTime: z152.number().optional(),
|
|
4918
4912
|
status: ExportJobStatus,
|
|
4919
4913
|
result: ExportJobResult.optional(),
|
|
4920
|
-
createdByUserId:
|
|
4914
|
+
createdByUserId: z152.string().optional(),
|
|
4921
4915
|
// Destinations
|
|
4922
4916
|
...ExportDestinationsMap.shape
|
|
4923
4917
|
});
|
|
@@ -4931,40 +4925,40 @@ var ExportJobFindByFilter = ExportJob.pick({
|
|
|
4931
4925
|
themeId: true,
|
|
4932
4926
|
brandId: true
|
|
4933
4927
|
}).extend({
|
|
4934
|
-
destinations:
|
|
4928
|
+
destinations: z152.array(ExportJobDestinationType),
|
|
4935
4929
|
docsEnvironment: PublishedDocEnvironment
|
|
4936
4930
|
}).partial();
|
|
4937
4931
|
|
|
4938
4932
|
// src/export/exporter-workspace-membership-role.ts
|
|
4939
|
-
import { z as
|
|
4940
|
-
var ExporterWorkspaceMembershipRole =
|
|
4933
|
+
import { z as z153 } from "zod";
|
|
4934
|
+
var ExporterWorkspaceMembershipRole = z153.enum(["Owner", "OwnerArchived", "User"]);
|
|
4941
4935
|
|
|
4942
4936
|
// src/export/exporter-workspace-membership.ts
|
|
4943
|
-
import { z as
|
|
4944
|
-
var ExporterWorkspaceMembership =
|
|
4945
|
-
id:
|
|
4946
|
-
workspaceId:
|
|
4947
|
-
exporterId:
|
|
4937
|
+
import { z as z154 } from "zod";
|
|
4938
|
+
var ExporterWorkspaceMembership = z154.object({
|
|
4939
|
+
id: z154.string(),
|
|
4940
|
+
workspaceId: z154.string(),
|
|
4941
|
+
exporterId: z154.string(),
|
|
4948
4942
|
role: ExporterWorkspaceMembershipRole
|
|
4949
4943
|
});
|
|
4950
4944
|
|
|
4951
4945
|
// src/feature-flags/feature-flags.ts
|
|
4952
|
-
import { z as
|
|
4953
|
-
var FlaggedFeature =
|
|
4954
|
-
var FeatureFlagMap =
|
|
4955
|
-
var FeatureFlag =
|
|
4956
|
-
id:
|
|
4946
|
+
import { z as z155 } from "zod";
|
|
4947
|
+
var FlaggedFeature = z155.enum(["FigmaImporterV2", "ShadowOpacityOptional", "DisableImporter", "VariablesOrder"]);
|
|
4948
|
+
var FeatureFlagMap = z155.record(FlaggedFeature, z155.boolean());
|
|
4949
|
+
var FeatureFlag = z155.object({
|
|
4950
|
+
id: z155.string(),
|
|
4957
4951
|
feature: FlaggedFeature,
|
|
4958
|
-
createdAt:
|
|
4959
|
-
enabled:
|
|
4960
|
-
designSystemId:
|
|
4952
|
+
createdAt: z155.coerce.date(),
|
|
4953
|
+
enabled: z155.boolean(),
|
|
4954
|
+
designSystemId: z155.string().optional()
|
|
4961
4955
|
});
|
|
4962
4956
|
|
|
4963
4957
|
// src/integrations/external-oauth-request.ts
|
|
4964
|
-
import { z as
|
|
4958
|
+
import { z as z157 } from "zod";
|
|
4965
4959
|
|
|
4966
4960
|
// src/integrations/oauth-providers.ts
|
|
4967
|
-
import { z as
|
|
4961
|
+
import { z as z156 } from "zod";
|
|
4968
4962
|
var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
4969
4963
|
OAuthProviderNames2["Figma"] = "figma";
|
|
4970
4964
|
OAuthProviderNames2["Azure"] = "azure";
|
|
@@ -4973,137 +4967,137 @@ var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
|
4973
4967
|
OAuthProviderNames2["Bitbucket"] = "bitbucket";
|
|
4974
4968
|
return OAuthProviderNames2;
|
|
4975
4969
|
})(OAuthProviderNames || {});
|
|
4976
|
-
var OAuthProviderSchema =
|
|
4970
|
+
var OAuthProviderSchema = z156.nativeEnum(OAuthProviderNames);
|
|
4977
4971
|
var OAuthProvider = OAuthProviderSchema.enum;
|
|
4978
4972
|
|
|
4979
4973
|
// src/integrations/external-oauth-request.ts
|
|
4980
|
-
var ExternalOAuthRequest =
|
|
4981
|
-
id:
|
|
4974
|
+
var ExternalOAuthRequest = z157.object({
|
|
4975
|
+
id: z157.string(),
|
|
4982
4976
|
provider: OAuthProviderSchema,
|
|
4983
|
-
userId:
|
|
4984
|
-
state:
|
|
4985
|
-
createdAt:
|
|
4977
|
+
userId: z157.string(),
|
|
4978
|
+
state: z157.string(),
|
|
4979
|
+
createdAt: z157.coerce.date()
|
|
4986
4980
|
});
|
|
4987
4981
|
|
|
4988
4982
|
// src/integrations/git.ts
|
|
4989
|
-
import { z as
|
|
4990
|
-
var GitObjectsQuery =
|
|
4991
|
-
organization:
|
|
4983
|
+
import { z as z158 } from "zod";
|
|
4984
|
+
var GitObjectsQuery = z158.object({
|
|
4985
|
+
organization: z158.string().optional(),
|
|
4992
4986
|
// Azure Organization | Bitbucket Workspace slug | Gitlab Group | Github Account (User or Organization)
|
|
4993
|
-
project:
|
|
4987
|
+
project: z158.string().optional(),
|
|
4994
4988
|
// Only for Bitbucket and Azure
|
|
4995
|
-
repository:
|
|
4989
|
+
repository: z158.string().optional(),
|
|
4996
4990
|
// For all providers. For Gitlab, it's called "project".
|
|
4997
|
-
branch:
|
|
4991
|
+
branch: z158.string().optional(),
|
|
4998
4992
|
// For all providers.
|
|
4999
|
-
user:
|
|
4993
|
+
user: z158.string().optional()
|
|
5000
4994
|
// Gitlab user
|
|
5001
4995
|
});
|
|
5002
|
-
var GitOrganization =
|
|
5003
|
-
id:
|
|
5004
|
-
name:
|
|
5005
|
-
url:
|
|
5006
|
-
slug:
|
|
4996
|
+
var GitOrganization = z158.object({
|
|
4997
|
+
id: z158.string(),
|
|
4998
|
+
name: z158.string(),
|
|
4999
|
+
url: z158.string(),
|
|
5000
|
+
slug: z158.string()
|
|
5007
5001
|
});
|
|
5008
|
-
var GitProject =
|
|
5009
|
-
id:
|
|
5010
|
-
name:
|
|
5011
|
-
url:
|
|
5012
|
-
slug:
|
|
5002
|
+
var GitProject = z158.object({
|
|
5003
|
+
id: z158.string(),
|
|
5004
|
+
name: z158.string(),
|
|
5005
|
+
url: z158.string(),
|
|
5006
|
+
slug: z158.string()
|
|
5013
5007
|
});
|
|
5014
|
-
var GitRepository =
|
|
5015
|
-
id:
|
|
5016
|
-
name:
|
|
5017
|
-
url:
|
|
5018
|
-
slug:
|
|
5008
|
+
var GitRepository = z158.object({
|
|
5009
|
+
id: z158.string(),
|
|
5010
|
+
name: z158.string(),
|
|
5011
|
+
url: z158.string(),
|
|
5012
|
+
slug: z158.string(),
|
|
5019
5013
|
/**
|
|
5020
5014
|
* Can be undefined when:
|
|
5021
5015
|
* - there are no branches in the repository yet
|
|
5022
5016
|
* - Git provider doesn't expose this information on a repository via their API
|
|
5023
5017
|
*/
|
|
5024
|
-
defaultBranch:
|
|
5018
|
+
defaultBranch: z158.string().optional()
|
|
5025
5019
|
});
|
|
5026
|
-
var GitBranch =
|
|
5027
|
-
name:
|
|
5028
|
-
lastCommitId:
|
|
5020
|
+
var GitBranch = z158.object({
|
|
5021
|
+
name: z158.string(),
|
|
5022
|
+
lastCommitId: z158.string()
|
|
5029
5023
|
});
|
|
5030
5024
|
|
|
5031
5025
|
// src/integrations/oauth-token.ts
|
|
5032
|
-
import { z as
|
|
5033
|
-
var IntegrationTokenSchemaOld =
|
|
5034
|
-
id:
|
|
5026
|
+
import { z as z159 } from "zod";
|
|
5027
|
+
var IntegrationTokenSchemaOld = z159.object({
|
|
5028
|
+
id: z159.string(),
|
|
5035
5029
|
provider: OAuthProviderSchema,
|
|
5036
|
-
scope:
|
|
5037
|
-
userId:
|
|
5038
|
-
accessToken:
|
|
5039
|
-
refreshToken:
|
|
5040
|
-
expiresAt:
|
|
5041
|
-
externalUserId:
|
|
5030
|
+
scope: z159.string(),
|
|
5031
|
+
userId: z159.string(),
|
|
5032
|
+
accessToken: z159.string(),
|
|
5033
|
+
refreshToken: z159.string(),
|
|
5034
|
+
expiresAt: z159.coerce.date(),
|
|
5035
|
+
externalUserId: z159.string().nullish()
|
|
5042
5036
|
});
|
|
5043
5037
|
|
|
5044
5038
|
// src/integrations/workspace-oauth-requests.ts
|
|
5045
|
-
import { z as
|
|
5046
|
-
var WorkspaceOAuthRequestSchema =
|
|
5047
|
-
id:
|
|
5048
|
-
workspaceId:
|
|
5039
|
+
import { z as z160 } from "zod";
|
|
5040
|
+
var WorkspaceOAuthRequestSchema = z160.object({
|
|
5041
|
+
id: z160.string(),
|
|
5042
|
+
workspaceId: z160.string(),
|
|
5049
5043
|
provider: OAuthProviderSchema,
|
|
5050
|
-
userId:
|
|
5051
|
-
createdAt:
|
|
5044
|
+
userId: z160.string(),
|
|
5045
|
+
createdAt: z160.coerce.date()
|
|
5052
5046
|
});
|
|
5053
5047
|
|
|
5054
5048
|
// src/npm/npm-package.ts
|
|
5055
|
-
import { z as
|
|
5056
|
-
var AnyRecord =
|
|
5049
|
+
import { z as z161 } from "zod";
|
|
5050
|
+
var AnyRecord = z161.record(z161.any());
|
|
5057
5051
|
var NpmPackageVersionDist = AnyRecord.and(
|
|
5058
|
-
|
|
5059
|
-
tarball:
|
|
5052
|
+
z161.object({
|
|
5053
|
+
tarball: z161.string()
|
|
5060
5054
|
})
|
|
5061
5055
|
);
|
|
5062
5056
|
var NpmPackageVersion = AnyRecord.and(
|
|
5063
|
-
|
|
5057
|
+
z161.object({
|
|
5064
5058
|
dist: NpmPackageVersionDist
|
|
5065
5059
|
})
|
|
5066
5060
|
);
|
|
5067
5061
|
var NpmPackage = AnyRecord.and(
|
|
5068
|
-
|
|
5069
|
-
_id:
|
|
5070
|
-
name:
|
|
5062
|
+
z161.object({
|
|
5063
|
+
_id: z161.string(),
|
|
5064
|
+
name: z161.string(),
|
|
5071
5065
|
// e.g. "latest": "1.2.3"
|
|
5072
|
-
"dist-tags":
|
|
5066
|
+
"dist-tags": z161.record(z161.string(), z161.string()),
|
|
5073
5067
|
// "1.2.3": {...}
|
|
5074
|
-
versions:
|
|
5068
|
+
versions: z161.record(NpmPackageVersion)
|
|
5075
5069
|
})
|
|
5076
5070
|
);
|
|
5077
5071
|
|
|
5078
5072
|
// src/npm/npm-proxy-token-payload.ts
|
|
5079
|
-
import { z as
|
|
5080
|
-
var NpmProxyTokenPayload =
|
|
5081
|
-
npmProxyRegistryConfigId:
|
|
5073
|
+
import { z as z162 } from "zod";
|
|
5074
|
+
var NpmProxyTokenPayload = z162.object({
|
|
5075
|
+
npmProxyRegistryConfigId: z162.string()
|
|
5082
5076
|
});
|
|
5083
5077
|
|
|
5084
5078
|
// src/tokens/personal-access-token.ts
|
|
5085
|
-
import { z as
|
|
5079
|
+
import { z as z170 } from "zod";
|
|
5086
5080
|
|
|
5087
5081
|
// src/workspace/user-invite.ts
|
|
5088
|
-
import { z as
|
|
5082
|
+
import { z as z164 } from "zod";
|
|
5089
5083
|
|
|
5090
5084
|
// src/workspace/workspace-role.ts
|
|
5091
|
-
import { z as
|
|
5092
|
-
var WorkspaceRoleSchema =
|
|
5085
|
+
import { z as z163 } from "zod";
|
|
5086
|
+
var WorkspaceRoleSchema = z163.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest", "Contributor"]);
|
|
5093
5087
|
var WorkspaceRole = WorkspaceRoleSchema.enum;
|
|
5094
5088
|
|
|
5095
5089
|
// src/workspace/user-invite.ts
|
|
5096
5090
|
var MAX_MEMBERS_COUNT = 100;
|
|
5097
|
-
var UserInvite =
|
|
5098
|
-
email:
|
|
5091
|
+
var UserInvite = z164.object({
|
|
5092
|
+
email: z164.string().email().trim().transform((value) => value.toLowerCase()),
|
|
5099
5093
|
role: WorkspaceRoleSchema
|
|
5100
5094
|
});
|
|
5101
|
-
var UserInvites =
|
|
5095
|
+
var UserInvites = z164.array(UserInvite).max(MAX_MEMBERS_COUNT);
|
|
5102
5096
|
|
|
5103
5097
|
// src/workspace/workspace-configuration.ts
|
|
5104
|
-
import { z as
|
|
5105
|
-
var WorkspaceConfigurationUpdate =
|
|
5106
|
-
id:
|
|
5098
|
+
import { z as z165 } from "zod";
|
|
5099
|
+
var WorkspaceConfigurationUpdate = z165.object({
|
|
5100
|
+
id: z165.string(),
|
|
5107
5101
|
ipWhitelist: WorkspaceIpSettings.optional(),
|
|
5108
5102
|
sso: SsoProvider.optional(),
|
|
5109
5103
|
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
@@ -5111,32 +5105,32 @@ var WorkspaceConfigurationUpdate = z166.object({
|
|
|
5111
5105
|
});
|
|
5112
5106
|
|
|
5113
5107
|
// src/workspace/workspace-context.ts
|
|
5114
|
-
import { z as
|
|
5115
|
-
var WorkspaceContext =
|
|
5116
|
-
workspaceId:
|
|
5108
|
+
import { z as z166 } from "zod";
|
|
5109
|
+
var WorkspaceContext = z166.object({
|
|
5110
|
+
workspaceId: z166.string(),
|
|
5117
5111
|
product: ProductCodeSchema,
|
|
5118
5112
|
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
5119
|
-
publicDesignSystem:
|
|
5113
|
+
publicDesignSystem: z166.boolean().optional()
|
|
5120
5114
|
});
|
|
5121
5115
|
|
|
5122
5116
|
// src/workspace/workspace-create.ts
|
|
5123
|
-
import { z as
|
|
5117
|
+
import { z as z167 } from "zod";
|
|
5124
5118
|
var WORKSPACE_NAME_MIN_LENGTH = 2;
|
|
5125
5119
|
var WORKSPACE_NAME_MAX_LENGTH = 64;
|
|
5126
5120
|
var HANDLE_MIN_LENGTH = 2;
|
|
5127
5121
|
var HANDLE_MAX_LENGTH = 64;
|
|
5128
|
-
var CreateWorkspaceInput =
|
|
5129
|
-
name:
|
|
5122
|
+
var CreateWorkspaceInput = z167.object({
|
|
5123
|
+
name: z167.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
|
|
5130
5124
|
product: ProductCodeSchema,
|
|
5131
|
-
priceId:
|
|
5132
|
-
billingEmail:
|
|
5133
|
-
handle:
|
|
5125
|
+
priceId: z167.string(),
|
|
5126
|
+
billingEmail: z167.string().email().optional(),
|
|
5127
|
+
handle: z167.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => value?.length > 0).optional(),
|
|
5134
5128
|
invites: UserInvites.optional(),
|
|
5135
|
-
promoCode:
|
|
5129
|
+
promoCode: z167.string().optional(),
|
|
5136
5130
|
status: InternalStatusSchema.optional(),
|
|
5137
5131
|
planInterval: BillingIntervalSchema.optional(),
|
|
5138
|
-
seats:
|
|
5139
|
-
seatLimit:
|
|
5132
|
+
seats: z167.number().optional(),
|
|
5133
|
+
seatLimit: z167.number().optional(),
|
|
5140
5134
|
card: CardSchema.optional(),
|
|
5141
5135
|
sso: SsoProvider.optional(),
|
|
5142
5136
|
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
@@ -5144,47 +5138,47 @@ var CreateWorkspaceInput = z168.object({
|
|
|
5144
5138
|
});
|
|
5145
5139
|
|
|
5146
5140
|
// src/workspace/workspace-invitations.ts
|
|
5147
|
-
import { z as
|
|
5148
|
-
var WorkspaceInvitation =
|
|
5149
|
-
id:
|
|
5150
|
-
email:
|
|
5151
|
-
createdAt:
|
|
5152
|
-
resentAt:
|
|
5153
|
-
role:
|
|
5154
|
-
workspaceId:
|
|
5155
|
-
invitedBy:
|
|
5141
|
+
import { z as z168 } from "zod";
|
|
5142
|
+
var WorkspaceInvitation = z168.object({
|
|
5143
|
+
id: z168.string(),
|
|
5144
|
+
email: z168.string().email(),
|
|
5145
|
+
createdAt: z168.coerce.date(),
|
|
5146
|
+
resentAt: z168.coerce.date().nullish(),
|
|
5147
|
+
role: z168.nativeEnum(WorkspaceRole),
|
|
5148
|
+
workspaceId: z168.string(),
|
|
5149
|
+
invitedBy: z168.string()
|
|
5156
5150
|
});
|
|
5157
5151
|
|
|
5158
5152
|
// src/workspace/workspace-membership.ts
|
|
5159
|
-
import { z as
|
|
5160
|
-
var WorkspaceMembership =
|
|
5161
|
-
id:
|
|
5162
|
-
userId:
|
|
5163
|
-
workspaceId:
|
|
5164
|
-
workspaceRole:
|
|
5153
|
+
import { z as z169 } from "zod";
|
|
5154
|
+
var WorkspaceMembership = z169.object({
|
|
5155
|
+
id: z169.string(),
|
|
5156
|
+
userId: z169.string(),
|
|
5157
|
+
workspaceId: z169.string(),
|
|
5158
|
+
workspaceRole: z169.nativeEnum(WorkspaceRole),
|
|
5165
5159
|
notificationSettings: UserNotificationSettings
|
|
5166
5160
|
});
|
|
5167
|
-
var UpdateMembershipRolesInput =
|
|
5168
|
-
members:
|
|
5169
|
-
|
|
5170
|
-
userId:
|
|
5171
|
-
role:
|
|
5161
|
+
var UpdateMembershipRolesInput = z169.object({
|
|
5162
|
+
members: z169.array(
|
|
5163
|
+
z169.object({
|
|
5164
|
+
userId: z169.string(),
|
|
5165
|
+
role: z169.nativeEnum(WorkspaceRole)
|
|
5172
5166
|
})
|
|
5173
5167
|
)
|
|
5174
5168
|
});
|
|
5175
5169
|
|
|
5176
5170
|
// src/tokens/personal-access-token.ts
|
|
5177
|
-
var PersonalAccessToken =
|
|
5178
|
-
id:
|
|
5179
|
-
userId:
|
|
5180
|
-
workspaceId:
|
|
5171
|
+
var PersonalAccessToken = z170.object({
|
|
5172
|
+
id: z170.string(),
|
|
5173
|
+
userId: z170.string(),
|
|
5174
|
+
workspaceId: z170.string().optional(),
|
|
5181
5175
|
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
5182
|
-
name:
|
|
5183
|
-
hidden:
|
|
5184
|
-
token:
|
|
5185
|
-
scope:
|
|
5186
|
-
createdAt:
|
|
5187
|
-
expireAt:
|
|
5176
|
+
name: z170.string(),
|
|
5177
|
+
hidden: z170.boolean(),
|
|
5178
|
+
token: z170.string(),
|
|
5179
|
+
scope: z170.string().optional(),
|
|
5180
|
+
createdAt: z170.coerce.date(),
|
|
5181
|
+
expireAt: z170.coerce.date().optional()
|
|
5188
5182
|
});
|
|
5189
5183
|
export {
|
|
5190
5184
|
Address,
|
|
@@ -5231,7 +5225,6 @@ export {
|
|
|
5231
5225
|
ContentLoadInstruction,
|
|
5232
5226
|
ContentLoaderPayload,
|
|
5233
5227
|
CreateDesignToken,
|
|
5234
|
-
CreateUserInput,
|
|
5235
5228
|
CreateWorkspaceInput,
|
|
5236
5229
|
CustomDomain,
|
|
5237
5230
|
Customer,
|