@supernova-studio/model 0.47.29 → 0.47.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 +61 -1
- package/dist/index.d.ts +61 -1
- package/dist/index.js +238 -226
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +254 -242
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/export/export-jobs.ts +3 -0
- package/src/export/export-runner/export-context.ts +2 -0
- package/src/export/exporter.ts +1 -1
- package/src/integrations/integration.ts +8 -2
package/dist/index.mjs
CHANGED
|
@@ -3224,10 +3224,12 @@ var ExportJobContext = z131.object({
|
|
|
3224
3224
|
apiUrl: z131.string(),
|
|
3225
3225
|
accessToken: z131.string(),
|
|
3226
3226
|
designSystemId: z131.string(),
|
|
3227
|
+
designSystemName: z131.string(),
|
|
3227
3228
|
exporterId: z131.string(),
|
|
3228
3229
|
versionId: z131.string(),
|
|
3229
3230
|
brandId: z131.string().optional(),
|
|
3230
3231
|
themeId: z131.string().optional(),
|
|
3232
|
+
exporterName: z131.string(),
|
|
3231
3233
|
exporterPackageUrl: z131.string(),
|
|
3232
3234
|
exporterPropertyValues: ExporterPropertyValue.array(),
|
|
3233
3235
|
documentation: ExportJobDocumentationContext.optional()
|
|
@@ -3338,7 +3340,9 @@ var ExportJobS3DestinationResult = z134.object({
|
|
|
3338
3340
|
bucket: z134.string(),
|
|
3339
3341
|
urlPrefix: z134.string().optional(),
|
|
3340
3342
|
path: z134.string(),
|
|
3341
|
-
files: z134.array(z134.string())
|
|
3343
|
+
files: z134.array(z134.string()),
|
|
3344
|
+
url: nullishToOptional(z134.string()),
|
|
3345
|
+
urls: nullishToOptional(z134.string().array())
|
|
3342
3346
|
});
|
|
3343
3347
|
var ExportJobDocsDestinationResult = z134.object({
|
|
3344
3348
|
url: z134.string()
|
|
@@ -3462,7 +3466,7 @@ var PulsarCustomBlock = z138.object({
|
|
|
3462
3466
|
// src/export/exporter.ts
|
|
3463
3467
|
var ExporterType = z139.enum(["code", "documentation"]);
|
|
3464
3468
|
var ExporterSource = z139.enum(["git", "upload"]);
|
|
3465
|
-
var ExporterTag = z139.string()
|
|
3469
|
+
var ExporterTag = z139.string();
|
|
3466
3470
|
var ExporterPulsarDetails = z139.object({
|
|
3467
3471
|
description: z139.string(),
|
|
3468
3472
|
version: z139.string(),
|
|
@@ -3598,231 +3602,7 @@ var GitBranch = z144.object({
|
|
|
3598
3602
|
});
|
|
3599
3603
|
|
|
3600
3604
|
// src/integrations/integration.ts
|
|
3601
|
-
import { z as z145 } from "zod";
|
|
3602
|
-
var IntegrationDesignSystem = z145.object({
|
|
3603
|
-
designSystemId: z145.string(),
|
|
3604
|
-
brandId: z145.string(),
|
|
3605
|
-
title: z145.string().optional(),
|
|
3606
|
-
userId: z145.string().optional(),
|
|
3607
|
-
date: z145.coerce.date().optional()
|
|
3608
|
-
});
|
|
3609
|
-
var IntegrationCredentialsType = z145.enum(["OAuth2", "PAT", "GithubApp"]);
|
|
3610
|
-
var IntegrationCredentialsState = z145.enum(["Active", "Inactive"]);
|
|
3611
|
-
var IntegrationCredentialsProfile = z145.object({
|
|
3612
|
-
id: nullishToOptional(z145.string()),
|
|
3613
|
-
email: nullishToOptional(z145.string()),
|
|
3614
|
-
handle: nullishToOptional(z145.string()),
|
|
3615
|
-
type: nullishToOptional(z145.string()),
|
|
3616
|
-
avatarUrl: nullishToOptional(z145.string()),
|
|
3617
|
-
organization: nullishToOptional(z145.string()),
|
|
3618
|
-
collection: nullishToOptional(z145.string())
|
|
3619
|
-
});
|
|
3620
|
-
var IntegrationCredentials = z145.object({
|
|
3621
|
-
id: z145.string(),
|
|
3622
|
-
type: IntegrationCredentialsType,
|
|
3623
|
-
integrationId: z145.string(),
|
|
3624
|
-
accessToken: z145.string(),
|
|
3625
|
-
userId: z145.string(),
|
|
3626
|
-
createdAt: z145.coerce.date(),
|
|
3627
|
-
refreshToken: z145.string().optional(),
|
|
3628
|
-
tokenName: z145.string().optional(),
|
|
3629
|
-
expiresAt: z145.coerce.date().optional(),
|
|
3630
|
-
refreshedAt: z145.coerce.date().optional(),
|
|
3631
|
-
username: z145.string().optional(),
|
|
3632
|
-
appInstallationId: z145.string().optional(),
|
|
3633
|
-
profile: IntegrationCredentialsProfile.optional(),
|
|
3634
|
-
customUrl: z145.string().optional(),
|
|
3635
|
-
state: IntegrationCredentialsState,
|
|
3636
|
-
user: UserMinified.optional()
|
|
3637
|
-
});
|
|
3638
|
-
var ExtendedIntegrationType = z145.enum([
|
|
3639
|
-
"Figma",
|
|
3640
|
-
"Github",
|
|
3641
|
-
"Gitlab",
|
|
3642
|
-
"Bitbucket",
|
|
3643
|
-
"Azure",
|
|
3644
|
-
"TokenStudio",
|
|
3645
|
-
"FigmaVariablesPlugin"
|
|
3646
|
-
]);
|
|
3647
|
-
var IntegrationType = ExtendedIntegrationType.exclude(["TokenStudio", "FigmaVariablesPlugin"]);
|
|
3648
|
-
var GitIntegrationType = IntegrationType.exclude(["Figma"]);
|
|
3649
|
-
var Integration = z145.object({
|
|
3650
|
-
id: z145.string(),
|
|
3651
|
-
workspaceId: z145.string(),
|
|
3652
|
-
type: IntegrationType,
|
|
3653
|
-
createdAt: z145.coerce.date(),
|
|
3654
|
-
integrationCredentials: z145.array(IntegrationCredentials).optional()
|
|
3655
|
-
});
|
|
3656
|
-
var IntegrationToken = z145.object({
|
|
3657
|
-
access_token: z145.string(),
|
|
3658
|
-
refresh_token: z145.string().optional(),
|
|
3659
|
-
expires_in: z145.union([z145.number().optional(), z145.string().optional()]),
|
|
3660
|
-
token_type: z145.string().optional(),
|
|
3661
|
-
token_name: z145.string().optional(),
|
|
3662
|
-
token_azure_organization_name: z145.string().optional(),
|
|
3663
|
-
// Azure Cloud PAT only
|
|
3664
|
-
token_azure_collection_name: z145.string().optional(),
|
|
3665
|
-
// Azure Server PAT only
|
|
3666
|
-
token_bitbucket_username: z145.string().optional(),
|
|
3667
|
-
// Bitbucket only
|
|
3668
|
-
custom_url: z145.string().url().optional().transform((value) => value && formatCustomUrl(value))
|
|
3669
|
-
}).refine((data) => {
|
|
3670
|
-
if (data.custom_url && data.token_azure_organization_name) {
|
|
3671
|
-
return false;
|
|
3672
|
-
}
|
|
3673
|
-
return true;
|
|
3674
|
-
}, "Custom URL and Azure organization name cannot be present at the same time").transform((data) => {
|
|
3675
|
-
return {
|
|
3676
|
-
accessToken: data.access_token,
|
|
3677
|
-
refreshToken: data.refresh_token,
|
|
3678
|
-
expiresIn: typeof data.expires_in === "string" ? Number(data.expires_in) : data.expires_in,
|
|
3679
|
-
tokenType: data.token_type,
|
|
3680
|
-
tokenName: data.token_name,
|
|
3681
|
-
tokenBitbucketUsername: data.token_bitbucket_username,
|
|
3682
|
-
tokenAzureOrganizationName: data.token_azure_organization_name,
|
|
3683
|
-
tokenAzureCollection: data.token_azure_collection_name,
|
|
3684
|
-
customUrl: data.custom_url
|
|
3685
|
-
};
|
|
3686
|
-
});
|
|
3687
|
-
var forbiddenCustomUrlDomainList = ["github.com", "gitlab.com", "bitbucket.org", "figma.com", "dev.azure.com"];
|
|
3688
|
-
function formatCustomUrl(url) {
|
|
3689
|
-
let formattedUrl = url.trim().toLowerCase();
|
|
3690
|
-
if (!formattedUrl.startsWith("http://") && !formattedUrl.startsWith("https://")) {
|
|
3691
|
-
formattedUrl = "https://" + formattedUrl;
|
|
3692
|
-
}
|
|
3693
|
-
if (formattedUrl.endsWith("/")) {
|
|
3694
|
-
formattedUrl = formattedUrl.slice(0, -1);
|
|
3695
|
-
}
|
|
3696
|
-
return forbiddenCustomUrlDomainList.some((domain) => formattedUrl.includes(domain)) ? void 0 : formattedUrl;
|
|
3697
|
-
}
|
|
3698
|
-
|
|
3699
|
-
// src/integrations/oauth-token.ts
|
|
3700
3605
|
import { z as z146 } from "zod";
|
|
3701
|
-
var IntegrationTokenSchemaOld = z146.object({
|
|
3702
|
-
id: z146.string(),
|
|
3703
|
-
provider: OAuthProviderSchema,
|
|
3704
|
-
scope: z146.string(),
|
|
3705
|
-
userId: z146.string(),
|
|
3706
|
-
accessToken: z146.string(),
|
|
3707
|
-
refreshToken: z146.string(),
|
|
3708
|
-
expiresAt: z146.coerce.date(),
|
|
3709
|
-
externalUserId: z146.string().nullish()
|
|
3710
|
-
});
|
|
3711
|
-
|
|
3712
|
-
// src/integrations/workspace-oauth-requests.ts
|
|
3713
|
-
import { z as z147 } from "zod";
|
|
3714
|
-
var WorkspaceOAuthRequestSchema = z147.object({
|
|
3715
|
-
id: z147.string(),
|
|
3716
|
-
workspaceId: z147.string(),
|
|
3717
|
-
provider: OAuthProviderSchema,
|
|
3718
|
-
userId: z147.string(),
|
|
3719
|
-
createdAt: z147.coerce.date()
|
|
3720
|
-
});
|
|
3721
|
-
|
|
3722
|
-
// src/liveblocks/rooms/design-system-version-room.ts
|
|
3723
|
-
import { z as z148 } from "zod";
|
|
3724
|
-
var DesignSystemVersionRoom = Entity.extend({
|
|
3725
|
-
designSystemVersionId: z148.string(),
|
|
3726
|
-
liveblocksId: z148.string()
|
|
3727
|
-
});
|
|
3728
|
-
var DesignSystemVersionRoomInternalSettings = z148.object({
|
|
3729
|
-
routingVersion: z148.string()
|
|
3730
|
-
});
|
|
3731
|
-
var DesignSystemVersionRoomInitialState = z148.object({
|
|
3732
|
-
pages: z148.array(DocumentationPageV2),
|
|
3733
|
-
groups: z148.array(ElementGroup),
|
|
3734
|
-
internalSettings: DesignSystemVersionRoomInternalSettings
|
|
3735
|
-
});
|
|
3736
|
-
var DesignSystemVersionRoomUpdate = z148.object({
|
|
3737
|
-
pages: z148.array(DocumentationPageV2),
|
|
3738
|
-
groups: z148.array(ElementGroup),
|
|
3739
|
-
deletedPageIds: z148.array(z148.string()),
|
|
3740
|
-
deletedGroupIds: z148.array(z148.string())
|
|
3741
|
-
});
|
|
3742
|
-
|
|
3743
|
-
// src/liveblocks/rooms/documentation-page-room.ts
|
|
3744
|
-
import { z as z149 } from "zod";
|
|
3745
|
-
var DocumentationPageRoom = Entity.extend({
|
|
3746
|
-
designSystemVersionId: z149.string(),
|
|
3747
|
-
documentationPageId: z149.string(),
|
|
3748
|
-
liveblocksId: z149.string(),
|
|
3749
|
-
isDirty: z149.boolean()
|
|
3750
|
-
});
|
|
3751
|
-
var DocumentationPageRoomState = z149.object({
|
|
3752
|
-
pageItems: z149.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
3753
|
-
itemConfiguration: DocumentationItemConfigurationV2
|
|
3754
|
-
});
|
|
3755
|
-
var DocumentationPageRoomRoomUpdate = z149.object({
|
|
3756
|
-
page: DocumentationPageV2,
|
|
3757
|
-
pageParent: ElementGroup
|
|
3758
|
-
});
|
|
3759
|
-
var DocumentationPageRoomInitialStateUpdate = DocumentationPageRoomRoomUpdate.extend({
|
|
3760
|
-
pageItems: z149.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
3761
|
-
blockDefinitions: z149.array(PageBlockDefinition)
|
|
3762
|
-
});
|
|
3763
|
-
|
|
3764
|
-
// src/liveblocks/rooms/room-type.ts
|
|
3765
|
-
import { z as z150 } from "zod";
|
|
3766
|
-
var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
3767
|
-
RoomTypeEnum2["DocumentationPage"] = "documentation-page";
|
|
3768
|
-
RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
|
|
3769
|
-
RoomTypeEnum2["Workspace"] = "workspace";
|
|
3770
|
-
return RoomTypeEnum2;
|
|
3771
|
-
})(RoomTypeEnum || {});
|
|
3772
|
-
var RoomTypeSchema = z150.nativeEnum(RoomTypeEnum);
|
|
3773
|
-
var RoomType = RoomTypeSchema.enum;
|
|
3774
|
-
|
|
3775
|
-
// src/liveblocks/rooms/workspace-room.ts
|
|
3776
|
-
import { z as z151 } from "zod";
|
|
3777
|
-
var WorkspaceRoom = Entity.extend({
|
|
3778
|
-
workspaceId: z151.string(),
|
|
3779
|
-
liveblocksId: z151.string()
|
|
3780
|
-
});
|
|
3781
|
-
|
|
3782
|
-
// src/npm/npm-package.ts
|
|
3783
|
-
import { z as z152 } from "zod";
|
|
3784
|
-
var AnyRecord = z152.record(z152.any());
|
|
3785
|
-
var NpmPackageVersionDist = AnyRecord.and(
|
|
3786
|
-
z152.object({
|
|
3787
|
-
tarball: z152.string()
|
|
3788
|
-
})
|
|
3789
|
-
);
|
|
3790
|
-
var NpmPackageVersion = AnyRecord.and(
|
|
3791
|
-
z152.object({
|
|
3792
|
-
dist: NpmPackageVersionDist
|
|
3793
|
-
})
|
|
3794
|
-
);
|
|
3795
|
-
var NpmPackage = AnyRecord.and(
|
|
3796
|
-
z152.object({
|
|
3797
|
-
_id: z152.string(),
|
|
3798
|
-
name: z152.string(),
|
|
3799
|
-
// e.g. "latest": "1.2.3"
|
|
3800
|
-
"dist-tags": z152.record(z152.string(), z152.string()),
|
|
3801
|
-
// "1.2.3": {...}
|
|
3802
|
-
versions: z152.record(NpmPackageVersion)
|
|
3803
|
-
})
|
|
3804
|
-
);
|
|
3805
|
-
|
|
3806
|
-
// src/npm/npm-proxy-token-payload.ts
|
|
3807
|
-
import { z as z153 } from "zod";
|
|
3808
|
-
var NpmProxyTokenPayload = z153.object({
|
|
3809
|
-
npmProxyRegistryConfigId: z153.string()
|
|
3810
|
-
});
|
|
3811
|
-
|
|
3812
|
-
// src/tokens/personal-access-token.ts
|
|
3813
|
-
import { z as z154 } from "zod";
|
|
3814
|
-
var PersonalAccessToken = z154.object({
|
|
3815
|
-
id: z154.string(),
|
|
3816
|
-
userId: z154.string(),
|
|
3817
|
-
workspaceId: z154.string().optional(),
|
|
3818
|
-
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
3819
|
-
name: z154.string(),
|
|
3820
|
-
hidden: z154.boolean(),
|
|
3821
|
-
token: z154.string(),
|
|
3822
|
-
scope: z154.string().optional(),
|
|
3823
|
-
createdAt: z154.coerce.date(),
|
|
3824
|
-
expireAt: z154.coerce.date().optional()
|
|
3825
|
-
});
|
|
3826
3606
|
|
|
3827
3607
|
// src/utils/errors.ts
|
|
3828
3608
|
var SupernovaException = class _SupernovaException extends Error {
|
|
@@ -3977,26 +3757,26 @@ function uniqueBy(items, prop) {
|
|
|
3977
3757
|
}
|
|
3978
3758
|
|
|
3979
3759
|
// src/utils/content-loader-instruction.ts
|
|
3980
|
-
import { z as
|
|
3981
|
-
var ContentLoadInstruction =
|
|
3982
|
-
from:
|
|
3983
|
-
to:
|
|
3984
|
-
authorizationHeaderKvsId:
|
|
3985
|
-
timeout:
|
|
3986
|
-
});
|
|
3987
|
-
var ContentLoaderPayload =
|
|
3988
|
-
type:
|
|
3760
|
+
import { z as z145 } from "zod";
|
|
3761
|
+
var ContentLoadInstruction = z145.object({
|
|
3762
|
+
from: z145.string(),
|
|
3763
|
+
to: z145.string(),
|
|
3764
|
+
authorizationHeaderKvsId: z145.string().optional(),
|
|
3765
|
+
timeout: z145.number().optional()
|
|
3766
|
+
});
|
|
3767
|
+
var ContentLoaderPayload = z145.object({
|
|
3768
|
+
type: z145.literal("Single"),
|
|
3989
3769
|
instruction: ContentLoadInstruction
|
|
3990
3770
|
}).or(
|
|
3991
|
-
|
|
3992
|
-
type:
|
|
3993
|
-
loadingChunkSize:
|
|
3994
|
-
instructions:
|
|
3771
|
+
z145.object({
|
|
3772
|
+
type: z145.literal("Multiple"),
|
|
3773
|
+
loadingChunkSize: z145.number().optional(),
|
|
3774
|
+
instructions: z145.array(ContentLoadInstruction)
|
|
3995
3775
|
})
|
|
3996
3776
|
).or(
|
|
3997
|
-
|
|
3998
|
-
type:
|
|
3999
|
-
location:
|
|
3777
|
+
z145.object({
|
|
3778
|
+
type: z145.literal("S3"),
|
|
3779
|
+
location: z145.string()
|
|
4000
3780
|
})
|
|
4001
3781
|
);
|
|
4002
3782
|
|
|
@@ -4691,6 +4471,238 @@ var isSlugReservedInternal = (slug) => slug?.startsWith(RESERVED_SLUG_PREFIX);
|
|
|
4691
4471
|
function isSlugReserved(slug) {
|
|
4692
4472
|
return RESERVED_SLUGS_SET.has(slug) || isSlugReservedInternal(slug);
|
|
4693
4473
|
}
|
|
4474
|
+
|
|
4475
|
+
// src/integrations/integration.ts
|
|
4476
|
+
var IntegrationDesignSystem = z146.object({
|
|
4477
|
+
designSystemId: z146.string(),
|
|
4478
|
+
brandId: z146.string(),
|
|
4479
|
+
title: z146.string().optional(),
|
|
4480
|
+
userId: z146.string().optional(),
|
|
4481
|
+
date: z146.coerce.date().optional()
|
|
4482
|
+
});
|
|
4483
|
+
var IntegrationCredentialsType = z146.enum(["OAuth2", "PAT", "GithubApp"]);
|
|
4484
|
+
var IntegrationCredentialsState = z146.enum(["Active", "Inactive"]);
|
|
4485
|
+
var IntegrationCredentialsProfile = z146.object({
|
|
4486
|
+
id: nullishToOptional(z146.string()),
|
|
4487
|
+
email: nullishToOptional(z146.string()),
|
|
4488
|
+
handle: nullishToOptional(z146.string()),
|
|
4489
|
+
type: nullishToOptional(z146.string()),
|
|
4490
|
+
avatarUrl: nullishToOptional(z146.string()),
|
|
4491
|
+
organization: nullishToOptional(z146.string()),
|
|
4492
|
+
collection: nullishToOptional(z146.string())
|
|
4493
|
+
});
|
|
4494
|
+
var IntegrationCredentials = z146.object({
|
|
4495
|
+
id: z146.string(),
|
|
4496
|
+
type: IntegrationCredentialsType,
|
|
4497
|
+
integrationId: z146.string(),
|
|
4498
|
+
accessToken: z146.string(),
|
|
4499
|
+
userId: z146.string(),
|
|
4500
|
+
createdAt: z146.coerce.date(),
|
|
4501
|
+
refreshToken: z146.string().optional(),
|
|
4502
|
+
tokenName: z146.string().optional(),
|
|
4503
|
+
expiresAt: z146.coerce.date().optional(),
|
|
4504
|
+
refreshedAt: z146.coerce.date().optional(),
|
|
4505
|
+
username: z146.string().optional(),
|
|
4506
|
+
appInstallationId: z146.string().optional(),
|
|
4507
|
+
profile: IntegrationCredentialsProfile.optional(),
|
|
4508
|
+
customUrl: z146.string().optional(),
|
|
4509
|
+
state: IntegrationCredentialsState,
|
|
4510
|
+
user: UserMinified.optional()
|
|
4511
|
+
});
|
|
4512
|
+
var ExtendedIntegrationType = z146.enum([
|
|
4513
|
+
"Figma",
|
|
4514
|
+
"Github",
|
|
4515
|
+
"Gitlab",
|
|
4516
|
+
"Bitbucket",
|
|
4517
|
+
"Azure",
|
|
4518
|
+
"TokenStudio",
|
|
4519
|
+
"FigmaVariablesPlugin"
|
|
4520
|
+
]);
|
|
4521
|
+
var IntegrationType = ExtendedIntegrationType.exclude(["TokenStudio", "FigmaVariablesPlugin"]);
|
|
4522
|
+
var GitIntegrationType = IntegrationType.exclude(["Figma"]);
|
|
4523
|
+
var Integration = z146.object({
|
|
4524
|
+
id: z146.string(),
|
|
4525
|
+
workspaceId: z146.string(),
|
|
4526
|
+
type: IntegrationType,
|
|
4527
|
+
createdAt: z146.coerce.date(),
|
|
4528
|
+
integrationCredentials: z146.array(IntegrationCredentials).optional()
|
|
4529
|
+
});
|
|
4530
|
+
var IntegrationToken = z146.object({
|
|
4531
|
+
access_token: z146.string(),
|
|
4532
|
+
refresh_token: z146.string().optional(),
|
|
4533
|
+
expires_in: z146.union([z146.number().optional(), z146.string().optional()]),
|
|
4534
|
+
token_type: z146.string().optional(),
|
|
4535
|
+
token_name: z146.string().optional(),
|
|
4536
|
+
token_azure_organization_name: z146.string().optional(),
|
|
4537
|
+
// Azure Cloud PAT only
|
|
4538
|
+
token_azure_collection_name: z146.string().optional(),
|
|
4539
|
+
// Azure Server PAT only
|
|
4540
|
+
token_bitbucket_username: z146.string().optional(),
|
|
4541
|
+
// Bitbucket only
|
|
4542
|
+
custom_url: z146.string().optional().transform((value) => {
|
|
4543
|
+
if (!value?.trim())
|
|
4544
|
+
return void 0;
|
|
4545
|
+
return formatCustomUrl(value);
|
|
4546
|
+
})
|
|
4547
|
+
}).refine((data) => {
|
|
4548
|
+
return !data.custom_url || tryParseUrl(data.custom_url);
|
|
4549
|
+
}, "Custom URL must be a valid URL").refine((data) => {
|
|
4550
|
+
if (data.custom_url && data.token_azure_organization_name) {
|
|
4551
|
+
return false;
|
|
4552
|
+
}
|
|
4553
|
+
return true;
|
|
4554
|
+
}, "Custom URL and Azure organization name cannot be present at the same time").transform((data) => {
|
|
4555
|
+
return {
|
|
4556
|
+
accessToken: data.access_token,
|
|
4557
|
+
refreshToken: data.refresh_token,
|
|
4558
|
+
expiresIn: typeof data.expires_in === "string" ? Number(data.expires_in) : data.expires_in,
|
|
4559
|
+
tokenType: data.token_type,
|
|
4560
|
+
tokenName: data.token_name,
|
|
4561
|
+
tokenBitbucketUsername: data.token_bitbucket_username,
|
|
4562
|
+
tokenAzureOrganizationName: data.token_azure_organization_name,
|
|
4563
|
+
tokenAzureCollection: data.token_azure_collection_name,
|
|
4564
|
+
customUrl: data.custom_url
|
|
4565
|
+
};
|
|
4566
|
+
});
|
|
4567
|
+
var forbiddenCustomUrlDomainList = ["github.com", "gitlab.com", "bitbucket.org", "figma.com", "dev.azure.com"];
|
|
4568
|
+
function formatCustomUrl(url) {
|
|
4569
|
+
let formattedUrl = url.trim().toLowerCase();
|
|
4570
|
+
if (!formattedUrl.startsWith("http://") && !formattedUrl.startsWith("https://")) {
|
|
4571
|
+
formattedUrl = "https://" + formattedUrl;
|
|
4572
|
+
}
|
|
4573
|
+
if (formattedUrl.endsWith("/")) {
|
|
4574
|
+
formattedUrl = formattedUrl.slice(0, -1);
|
|
4575
|
+
}
|
|
4576
|
+
return forbiddenCustomUrlDomainList.some((domain) => formattedUrl.includes(domain)) ? void 0 : formattedUrl;
|
|
4577
|
+
}
|
|
4578
|
+
|
|
4579
|
+
// src/integrations/oauth-token.ts
|
|
4580
|
+
import { z as z147 } from "zod";
|
|
4581
|
+
var IntegrationTokenSchemaOld = z147.object({
|
|
4582
|
+
id: z147.string(),
|
|
4583
|
+
provider: OAuthProviderSchema,
|
|
4584
|
+
scope: z147.string(),
|
|
4585
|
+
userId: z147.string(),
|
|
4586
|
+
accessToken: z147.string(),
|
|
4587
|
+
refreshToken: z147.string(),
|
|
4588
|
+
expiresAt: z147.coerce.date(),
|
|
4589
|
+
externalUserId: z147.string().nullish()
|
|
4590
|
+
});
|
|
4591
|
+
|
|
4592
|
+
// src/integrations/workspace-oauth-requests.ts
|
|
4593
|
+
import { z as z148 } from "zod";
|
|
4594
|
+
var WorkspaceOAuthRequestSchema = z148.object({
|
|
4595
|
+
id: z148.string(),
|
|
4596
|
+
workspaceId: z148.string(),
|
|
4597
|
+
provider: OAuthProviderSchema,
|
|
4598
|
+
userId: z148.string(),
|
|
4599
|
+
createdAt: z148.coerce.date()
|
|
4600
|
+
});
|
|
4601
|
+
|
|
4602
|
+
// src/liveblocks/rooms/design-system-version-room.ts
|
|
4603
|
+
import { z as z149 } from "zod";
|
|
4604
|
+
var DesignSystemVersionRoom = Entity.extend({
|
|
4605
|
+
designSystemVersionId: z149.string(),
|
|
4606
|
+
liveblocksId: z149.string()
|
|
4607
|
+
});
|
|
4608
|
+
var DesignSystemVersionRoomInternalSettings = z149.object({
|
|
4609
|
+
routingVersion: z149.string()
|
|
4610
|
+
});
|
|
4611
|
+
var DesignSystemVersionRoomInitialState = z149.object({
|
|
4612
|
+
pages: z149.array(DocumentationPageV2),
|
|
4613
|
+
groups: z149.array(ElementGroup),
|
|
4614
|
+
internalSettings: DesignSystemVersionRoomInternalSettings
|
|
4615
|
+
});
|
|
4616
|
+
var DesignSystemVersionRoomUpdate = z149.object({
|
|
4617
|
+
pages: z149.array(DocumentationPageV2),
|
|
4618
|
+
groups: z149.array(ElementGroup),
|
|
4619
|
+
deletedPageIds: z149.array(z149.string()),
|
|
4620
|
+
deletedGroupIds: z149.array(z149.string())
|
|
4621
|
+
});
|
|
4622
|
+
|
|
4623
|
+
// src/liveblocks/rooms/documentation-page-room.ts
|
|
4624
|
+
import { z as z150 } from "zod";
|
|
4625
|
+
var DocumentationPageRoom = Entity.extend({
|
|
4626
|
+
designSystemVersionId: z150.string(),
|
|
4627
|
+
documentationPageId: z150.string(),
|
|
4628
|
+
liveblocksId: z150.string(),
|
|
4629
|
+
isDirty: z150.boolean()
|
|
4630
|
+
});
|
|
4631
|
+
var DocumentationPageRoomState = z150.object({
|
|
4632
|
+
pageItems: z150.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
4633
|
+
itemConfiguration: DocumentationItemConfigurationV2
|
|
4634
|
+
});
|
|
4635
|
+
var DocumentationPageRoomRoomUpdate = z150.object({
|
|
4636
|
+
page: DocumentationPageV2,
|
|
4637
|
+
pageParent: ElementGroup
|
|
4638
|
+
});
|
|
4639
|
+
var DocumentationPageRoomInitialStateUpdate = DocumentationPageRoomRoomUpdate.extend({
|
|
4640
|
+
pageItems: z150.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
4641
|
+
blockDefinitions: z150.array(PageBlockDefinition)
|
|
4642
|
+
});
|
|
4643
|
+
|
|
4644
|
+
// src/liveblocks/rooms/room-type.ts
|
|
4645
|
+
import { z as z151 } from "zod";
|
|
4646
|
+
var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
4647
|
+
RoomTypeEnum2["DocumentationPage"] = "documentation-page";
|
|
4648
|
+
RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
|
|
4649
|
+
RoomTypeEnum2["Workspace"] = "workspace";
|
|
4650
|
+
return RoomTypeEnum2;
|
|
4651
|
+
})(RoomTypeEnum || {});
|
|
4652
|
+
var RoomTypeSchema = z151.nativeEnum(RoomTypeEnum);
|
|
4653
|
+
var RoomType = RoomTypeSchema.enum;
|
|
4654
|
+
|
|
4655
|
+
// src/liveblocks/rooms/workspace-room.ts
|
|
4656
|
+
import { z as z152 } from "zod";
|
|
4657
|
+
var WorkspaceRoom = Entity.extend({
|
|
4658
|
+
workspaceId: z152.string(),
|
|
4659
|
+
liveblocksId: z152.string()
|
|
4660
|
+
});
|
|
4661
|
+
|
|
4662
|
+
// src/npm/npm-package.ts
|
|
4663
|
+
import { z as z153 } from "zod";
|
|
4664
|
+
var AnyRecord = z153.record(z153.any());
|
|
4665
|
+
var NpmPackageVersionDist = AnyRecord.and(
|
|
4666
|
+
z153.object({
|
|
4667
|
+
tarball: z153.string()
|
|
4668
|
+
})
|
|
4669
|
+
);
|
|
4670
|
+
var NpmPackageVersion = AnyRecord.and(
|
|
4671
|
+
z153.object({
|
|
4672
|
+
dist: NpmPackageVersionDist
|
|
4673
|
+
})
|
|
4674
|
+
);
|
|
4675
|
+
var NpmPackage = AnyRecord.and(
|
|
4676
|
+
z153.object({
|
|
4677
|
+
_id: z153.string(),
|
|
4678
|
+
name: z153.string(),
|
|
4679
|
+
// e.g. "latest": "1.2.3"
|
|
4680
|
+
"dist-tags": z153.record(z153.string(), z153.string()),
|
|
4681
|
+
// "1.2.3": {...}
|
|
4682
|
+
versions: z153.record(NpmPackageVersion)
|
|
4683
|
+
})
|
|
4684
|
+
);
|
|
4685
|
+
|
|
4686
|
+
// src/npm/npm-proxy-token-payload.ts
|
|
4687
|
+
import { z as z154 } from "zod";
|
|
4688
|
+
var NpmProxyTokenPayload = z154.object({
|
|
4689
|
+
npmProxyRegistryConfigId: z154.string()
|
|
4690
|
+
});
|
|
4691
|
+
|
|
4692
|
+
// src/tokens/personal-access-token.ts
|
|
4693
|
+
import { z as z155 } from "zod";
|
|
4694
|
+
var PersonalAccessToken = z155.object({
|
|
4695
|
+
id: z155.string(),
|
|
4696
|
+
userId: z155.string(),
|
|
4697
|
+
workspaceId: z155.string().optional(),
|
|
4698
|
+
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
4699
|
+
name: z155.string(),
|
|
4700
|
+
hidden: z155.boolean(),
|
|
4701
|
+
token: z155.string(),
|
|
4702
|
+
scope: z155.string().optional(),
|
|
4703
|
+
createdAt: z155.coerce.date(),
|
|
4704
|
+
expireAt: z155.coerce.date().optional()
|
|
4705
|
+
});
|
|
4694
4706
|
export {
|
|
4695
4707
|
Address,
|
|
4696
4708
|
Asset,
|