@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.js
CHANGED
|
@@ -3224,10 +3224,12 @@ var ExportJobContext = _zod.z.object({
|
|
|
3224
3224
|
apiUrl: _zod.z.string(),
|
|
3225
3225
|
accessToken: _zod.z.string(),
|
|
3226
3226
|
designSystemId: _zod.z.string(),
|
|
3227
|
+
designSystemName: _zod.z.string(),
|
|
3227
3228
|
exporterId: _zod.z.string(),
|
|
3228
3229
|
versionId: _zod.z.string(),
|
|
3229
3230
|
brandId: _zod.z.string().optional(),
|
|
3230
3231
|
themeId: _zod.z.string().optional(),
|
|
3232
|
+
exporterName: _zod.z.string(),
|
|
3231
3233
|
exporterPackageUrl: _zod.z.string(),
|
|
3232
3234
|
exporterPropertyValues: ExporterPropertyValue.array(),
|
|
3233
3235
|
documentation: ExportJobDocumentationContext.optional()
|
|
@@ -3338,7 +3340,9 @@ var ExportJobS3DestinationResult = _zod.z.object({
|
|
|
3338
3340
|
bucket: _zod.z.string(),
|
|
3339
3341
|
urlPrefix: _zod.z.string().optional(),
|
|
3340
3342
|
path: _zod.z.string(),
|
|
3341
|
-
files: _zod.z.array(_zod.z.string())
|
|
3343
|
+
files: _zod.z.array(_zod.z.string()),
|
|
3344
|
+
url: nullishToOptional(_zod.z.string()),
|
|
3345
|
+
urls: nullishToOptional(_zod.z.string().array())
|
|
3342
3346
|
});
|
|
3343
3347
|
var ExportJobDocsDestinationResult = _zod.z.object({
|
|
3344
3348
|
url: _zod.z.string()
|
|
@@ -3462,7 +3466,7 @@ var PulsarCustomBlock = _zod.z.object({
|
|
|
3462
3466
|
// src/export/exporter.ts
|
|
3463
3467
|
var ExporterType = _zod.z.enum(["code", "documentation"]);
|
|
3464
3468
|
var ExporterSource = _zod.z.enum(["git", "upload"]);
|
|
3465
|
-
var ExporterTag = _zod.z.string()
|
|
3469
|
+
var ExporterTag = _zod.z.string();
|
|
3466
3470
|
var ExporterPulsarDetails = _zod.z.object({
|
|
3467
3471
|
description: _zod.z.string(),
|
|
3468
3472
|
version: _zod.z.string(),
|
|
@@ -3599,230 +3603,6 @@ var GitBranch = _zod.z.object({
|
|
|
3599
3603
|
|
|
3600
3604
|
// src/integrations/integration.ts
|
|
3601
3605
|
|
|
3602
|
-
var IntegrationDesignSystem = _zod.z.object({
|
|
3603
|
-
designSystemId: _zod.z.string(),
|
|
3604
|
-
brandId: _zod.z.string(),
|
|
3605
|
-
title: _zod.z.string().optional(),
|
|
3606
|
-
userId: _zod.z.string().optional(),
|
|
3607
|
-
date: _zod.z.coerce.date().optional()
|
|
3608
|
-
});
|
|
3609
|
-
var IntegrationCredentialsType = _zod.z.enum(["OAuth2", "PAT", "GithubApp"]);
|
|
3610
|
-
var IntegrationCredentialsState = _zod.z.enum(["Active", "Inactive"]);
|
|
3611
|
-
var IntegrationCredentialsProfile = _zod.z.object({
|
|
3612
|
-
id: nullishToOptional(_zod.z.string()),
|
|
3613
|
-
email: nullishToOptional(_zod.z.string()),
|
|
3614
|
-
handle: nullishToOptional(_zod.z.string()),
|
|
3615
|
-
type: nullishToOptional(_zod.z.string()),
|
|
3616
|
-
avatarUrl: nullishToOptional(_zod.z.string()),
|
|
3617
|
-
organization: nullishToOptional(_zod.z.string()),
|
|
3618
|
-
collection: nullishToOptional(_zod.z.string())
|
|
3619
|
-
});
|
|
3620
|
-
var IntegrationCredentials = _zod.z.object({
|
|
3621
|
-
id: _zod.z.string(),
|
|
3622
|
-
type: IntegrationCredentialsType,
|
|
3623
|
-
integrationId: _zod.z.string(),
|
|
3624
|
-
accessToken: _zod.z.string(),
|
|
3625
|
-
userId: _zod.z.string(),
|
|
3626
|
-
createdAt: _zod.z.coerce.date(),
|
|
3627
|
-
refreshToken: _zod.z.string().optional(),
|
|
3628
|
-
tokenName: _zod.z.string().optional(),
|
|
3629
|
-
expiresAt: _zod.z.coerce.date().optional(),
|
|
3630
|
-
refreshedAt: _zod.z.coerce.date().optional(),
|
|
3631
|
-
username: _zod.z.string().optional(),
|
|
3632
|
-
appInstallationId: _zod.z.string().optional(),
|
|
3633
|
-
profile: IntegrationCredentialsProfile.optional(),
|
|
3634
|
-
customUrl: _zod.z.string().optional(),
|
|
3635
|
-
state: IntegrationCredentialsState,
|
|
3636
|
-
user: UserMinified.optional()
|
|
3637
|
-
});
|
|
3638
|
-
var ExtendedIntegrationType = _zod.z.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 = _zod.z.object({
|
|
3650
|
-
id: _zod.z.string(),
|
|
3651
|
-
workspaceId: _zod.z.string(),
|
|
3652
|
-
type: IntegrationType,
|
|
3653
|
-
createdAt: _zod.z.coerce.date(),
|
|
3654
|
-
integrationCredentials: _zod.z.array(IntegrationCredentials).optional()
|
|
3655
|
-
});
|
|
3656
|
-
var IntegrationToken = _zod.z.object({
|
|
3657
|
-
access_token: _zod.z.string(),
|
|
3658
|
-
refresh_token: _zod.z.string().optional(),
|
|
3659
|
-
expires_in: _zod.z.union([_zod.z.number().optional(), _zod.z.string().optional()]),
|
|
3660
|
-
token_type: _zod.z.string().optional(),
|
|
3661
|
-
token_name: _zod.z.string().optional(),
|
|
3662
|
-
token_azure_organization_name: _zod.z.string().optional(),
|
|
3663
|
-
// Azure Cloud PAT only
|
|
3664
|
-
token_azure_collection_name: _zod.z.string().optional(),
|
|
3665
|
-
// Azure Server PAT only
|
|
3666
|
-
token_bitbucket_username: _zod.z.string().optional(),
|
|
3667
|
-
// Bitbucket only
|
|
3668
|
-
custom_url: _zod.z.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
|
-
|
|
3701
|
-
var IntegrationTokenSchemaOld = _zod.z.object({
|
|
3702
|
-
id: _zod.z.string(),
|
|
3703
|
-
provider: OAuthProviderSchema,
|
|
3704
|
-
scope: _zod.z.string(),
|
|
3705
|
-
userId: _zod.z.string(),
|
|
3706
|
-
accessToken: _zod.z.string(),
|
|
3707
|
-
refreshToken: _zod.z.string(),
|
|
3708
|
-
expiresAt: _zod.z.coerce.date(),
|
|
3709
|
-
externalUserId: _zod.z.string().nullish()
|
|
3710
|
-
});
|
|
3711
|
-
|
|
3712
|
-
// src/integrations/workspace-oauth-requests.ts
|
|
3713
|
-
|
|
3714
|
-
var WorkspaceOAuthRequestSchema = _zod.z.object({
|
|
3715
|
-
id: _zod.z.string(),
|
|
3716
|
-
workspaceId: _zod.z.string(),
|
|
3717
|
-
provider: OAuthProviderSchema,
|
|
3718
|
-
userId: _zod.z.string(),
|
|
3719
|
-
createdAt: _zod.z.coerce.date()
|
|
3720
|
-
});
|
|
3721
|
-
|
|
3722
|
-
// src/liveblocks/rooms/design-system-version-room.ts
|
|
3723
|
-
|
|
3724
|
-
var DesignSystemVersionRoom = Entity.extend({
|
|
3725
|
-
designSystemVersionId: _zod.z.string(),
|
|
3726
|
-
liveblocksId: _zod.z.string()
|
|
3727
|
-
});
|
|
3728
|
-
var DesignSystemVersionRoomInternalSettings = _zod.z.object({
|
|
3729
|
-
routingVersion: _zod.z.string()
|
|
3730
|
-
});
|
|
3731
|
-
var DesignSystemVersionRoomInitialState = _zod.z.object({
|
|
3732
|
-
pages: _zod.z.array(DocumentationPageV2),
|
|
3733
|
-
groups: _zod.z.array(ElementGroup),
|
|
3734
|
-
internalSettings: DesignSystemVersionRoomInternalSettings
|
|
3735
|
-
});
|
|
3736
|
-
var DesignSystemVersionRoomUpdate = _zod.z.object({
|
|
3737
|
-
pages: _zod.z.array(DocumentationPageV2),
|
|
3738
|
-
groups: _zod.z.array(ElementGroup),
|
|
3739
|
-
deletedPageIds: _zod.z.array(_zod.z.string()),
|
|
3740
|
-
deletedGroupIds: _zod.z.array(_zod.z.string())
|
|
3741
|
-
});
|
|
3742
|
-
|
|
3743
|
-
// src/liveblocks/rooms/documentation-page-room.ts
|
|
3744
|
-
|
|
3745
|
-
var DocumentationPageRoom = Entity.extend({
|
|
3746
|
-
designSystemVersionId: _zod.z.string(),
|
|
3747
|
-
documentationPageId: _zod.z.string(),
|
|
3748
|
-
liveblocksId: _zod.z.string(),
|
|
3749
|
-
isDirty: _zod.z.boolean()
|
|
3750
|
-
});
|
|
3751
|
-
var DocumentationPageRoomState = _zod.z.object({
|
|
3752
|
-
pageItems: _zod.z.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
3753
|
-
itemConfiguration: DocumentationItemConfigurationV2
|
|
3754
|
-
});
|
|
3755
|
-
var DocumentationPageRoomRoomUpdate = _zod.z.object({
|
|
3756
|
-
page: DocumentationPageV2,
|
|
3757
|
-
pageParent: ElementGroup
|
|
3758
|
-
});
|
|
3759
|
-
var DocumentationPageRoomInitialStateUpdate = DocumentationPageRoomRoomUpdate.extend({
|
|
3760
|
-
pageItems: _zod.z.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
3761
|
-
blockDefinitions: _zod.z.array(PageBlockDefinition)
|
|
3762
|
-
});
|
|
3763
|
-
|
|
3764
|
-
// src/liveblocks/rooms/room-type.ts
|
|
3765
|
-
|
|
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 = _zod.z.nativeEnum(RoomTypeEnum);
|
|
3773
|
-
var RoomType = RoomTypeSchema.enum;
|
|
3774
|
-
|
|
3775
|
-
// src/liveblocks/rooms/workspace-room.ts
|
|
3776
|
-
|
|
3777
|
-
var WorkspaceRoom = Entity.extend({
|
|
3778
|
-
workspaceId: _zod.z.string(),
|
|
3779
|
-
liveblocksId: _zod.z.string()
|
|
3780
|
-
});
|
|
3781
|
-
|
|
3782
|
-
// src/npm/npm-package.ts
|
|
3783
|
-
|
|
3784
|
-
var AnyRecord = _zod.z.record(_zod.z.any());
|
|
3785
|
-
var NpmPackageVersionDist = AnyRecord.and(
|
|
3786
|
-
_zod.z.object({
|
|
3787
|
-
tarball: _zod.z.string()
|
|
3788
|
-
})
|
|
3789
|
-
);
|
|
3790
|
-
var NpmPackageVersion = AnyRecord.and(
|
|
3791
|
-
_zod.z.object({
|
|
3792
|
-
dist: NpmPackageVersionDist
|
|
3793
|
-
})
|
|
3794
|
-
);
|
|
3795
|
-
var NpmPackage = AnyRecord.and(
|
|
3796
|
-
_zod.z.object({
|
|
3797
|
-
_id: _zod.z.string(),
|
|
3798
|
-
name: _zod.z.string(),
|
|
3799
|
-
// e.g. "latest": "1.2.3"
|
|
3800
|
-
"dist-tags": _zod.z.record(_zod.z.string(), _zod.z.string()),
|
|
3801
|
-
// "1.2.3": {...}
|
|
3802
|
-
versions: _zod.z.record(NpmPackageVersion)
|
|
3803
|
-
})
|
|
3804
|
-
);
|
|
3805
|
-
|
|
3806
|
-
// src/npm/npm-proxy-token-payload.ts
|
|
3807
|
-
|
|
3808
|
-
var NpmProxyTokenPayload = _zod.z.object({
|
|
3809
|
-
npmProxyRegistryConfigId: _zod.z.string()
|
|
3810
|
-
});
|
|
3811
|
-
|
|
3812
|
-
// src/tokens/personal-access-token.ts
|
|
3813
|
-
|
|
3814
|
-
var PersonalAccessToken = _zod.z.object({
|
|
3815
|
-
id: _zod.z.string(),
|
|
3816
|
-
userId: _zod.z.string(),
|
|
3817
|
-
workspaceId: _zod.z.string().optional(),
|
|
3818
|
-
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
3819
|
-
name: _zod.z.string(),
|
|
3820
|
-
hidden: _zod.z.boolean(),
|
|
3821
|
-
token: _zod.z.string(),
|
|
3822
|
-
scope: _zod.z.string().optional(),
|
|
3823
|
-
createdAt: _zod.z.coerce.date(),
|
|
3824
|
-
expireAt: _zod.z.coerce.date().optional()
|
|
3825
|
-
});
|
|
3826
3606
|
|
|
3827
3607
|
// src/utils/errors.ts
|
|
3828
3608
|
var SupernovaException = class _SupernovaException extends Error {
|
|
@@ -4692,6 +4472,238 @@ function isSlugReserved(slug) {
|
|
|
4692
4472
|
return RESERVED_SLUGS_SET.has(slug) || isSlugReservedInternal(slug);
|
|
4693
4473
|
}
|
|
4694
4474
|
|
|
4475
|
+
// src/integrations/integration.ts
|
|
4476
|
+
var IntegrationDesignSystem = _zod.z.object({
|
|
4477
|
+
designSystemId: _zod.z.string(),
|
|
4478
|
+
brandId: _zod.z.string(),
|
|
4479
|
+
title: _zod.z.string().optional(),
|
|
4480
|
+
userId: _zod.z.string().optional(),
|
|
4481
|
+
date: _zod.z.coerce.date().optional()
|
|
4482
|
+
});
|
|
4483
|
+
var IntegrationCredentialsType = _zod.z.enum(["OAuth2", "PAT", "GithubApp"]);
|
|
4484
|
+
var IntegrationCredentialsState = _zod.z.enum(["Active", "Inactive"]);
|
|
4485
|
+
var IntegrationCredentialsProfile = _zod.z.object({
|
|
4486
|
+
id: nullishToOptional(_zod.z.string()),
|
|
4487
|
+
email: nullishToOptional(_zod.z.string()),
|
|
4488
|
+
handle: nullishToOptional(_zod.z.string()),
|
|
4489
|
+
type: nullishToOptional(_zod.z.string()),
|
|
4490
|
+
avatarUrl: nullishToOptional(_zod.z.string()),
|
|
4491
|
+
organization: nullishToOptional(_zod.z.string()),
|
|
4492
|
+
collection: nullishToOptional(_zod.z.string())
|
|
4493
|
+
});
|
|
4494
|
+
var IntegrationCredentials = _zod.z.object({
|
|
4495
|
+
id: _zod.z.string(),
|
|
4496
|
+
type: IntegrationCredentialsType,
|
|
4497
|
+
integrationId: _zod.z.string(),
|
|
4498
|
+
accessToken: _zod.z.string(),
|
|
4499
|
+
userId: _zod.z.string(),
|
|
4500
|
+
createdAt: _zod.z.coerce.date(),
|
|
4501
|
+
refreshToken: _zod.z.string().optional(),
|
|
4502
|
+
tokenName: _zod.z.string().optional(),
|
|
4503
|
+
expiresAt: _zod.z.coerce.date().optional(),
|
|
4504
|
+
refreshedAt: _zod.z.coerce.date().optional(),
|
|
4505
|
+
username: _zod.z.string().optional(),
|
|
4506
|
+
appInstallationId: _zod.z.string().optional(),
|
|
4507
|
+
profile: IntegrationCredentialsProfile.optional(),
|
|
4508
|
+
customUrl: _zod.z.string().optional(),
|
|
4509
|
+
state: IntegrationCredentialsState,
|
|
4510
|
+
user: UserMinified.optional()
|
|
4511
|
+
});
|
|
4512
|
+
var ExtendedIntegrationType = _zod.z.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 = _zod.z.object({
|
|
4524
|
+
id: _zod.z.string(),
|
|
4525
|
+
workspaceId: _zod.z.string(),
|
|
4526
|
+
type: IntegrationType,
|
|
4527
|
+
createdAt: _zod.z.coerce.date(),
|
|
4528
|
+
integrationCredentials: _zod.z.array(IntegrationCredentials).optional()
|
|
4529
|
+
});
|
|
4530
|
+
var IntegrationToken = _zod.z.object({
|
|
4531
|
+
access_token: _zod.z.string(),
|
|
4532
|
+
refresh_token: _zod.z.string().optional(),
|
|
4533
|
+
expires_in: _zod.z.union([_zod.z.number().optional(), _zod.z.string().optional()]),
|
|
4534
|
+
token_type: _zod.z.string().optional(),
|
|
4535
|
+
token_name: _zod.z.string().optional(),
|
|
4536
|
+
token_azure_organization_name: _zod.z.string().optional(),
|
|
4537
|
+
// Azure Cloud PAT only
|
|
4538
|
+
token_azure_collection_name: _zod.z.string().optional(),
|
|
4539
|
+
// Azure Server PAT only
|
|
4540
|
+
token_bitbucket_username: _zod.z.string().optional(),
|
|
4541
|
+
// Bitbucket only
|
|
4542
|
+
custom_url: _zod.z.string().optional().transform((value) => {
|
|
4543
|
+
if (!_optionalChain([value, 'optionalAccess', _13 => _13.trim, 'call', _14 => _14()]))
|
|
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
|
+
|
|
4581
|
+
var IntegrationTokenSchemaOld = _zod.z.object({
|
|
4582
|
+
id: _zod.z.string(),
|
|
4583
|
+
provider: OAuthProviderSchema,
|
|
4584
|
+
scope: _zod.z.string(),
|
|
4585
|
+
userId: _zod.z.string(),
|
|
4586
|
+
accessToken: _zod.z.string(),
|
|
4587
|
+
refreshToken: _zod.z.string(),
|
|
4588
|
+
expiresAt: _zod.z.coerce.date(),
|
|
4589
|
+
externalUserId: _zod.z.string().nullish()
|
|
4590
|
+
});
|
|
4591
|
+
|
|
4592
|
+
// src/integrations/workspace-oauth-requests.ts
|
|
4593
|
+
|
|
4594
|
+
var WorkspaceOAuthRequestSchema = _zod.z.object({
|
|
4595
|
+
id: _zod.z.string(),
|
|
4596
|
+
workspaceId: _zod.z.string(),
|
|
4597
|
+
provider: OAuthProviderSchema,
|
|
4598
|
+
userId: _zod.z.string(),
|
|
4599
|
+
createdAt: _zod.z.coerce.date()
|
|
4600
|
+
});
|
|
4601
|
+
|
|
4602
|
+
// src/liveblocks/rooms/design-system-version-room.ts
|
|
4603
|
+
|
|
4604
|
+
var DesignSystemVersionRoom = Entity.extend({
|
|
4605
|
+
designSystemVersionId: _zod.z.string(),
|
|
4606
|
+
liveblocksId: _zod.z.string()
|
|
4607
|
+
});
|
|
4608
|
+
var DesignSystemVersionRoomInternalSettings = _zod.z.object({
|
|
4609
|
+
routingVersion: _zod.z.string()
|
|
4610
|
+
});
|
|
4611
|
+
var DesignSystemVersionRoomInitialState = _zod.z.object({
|
|
4612
|
+
pages: _zod.z.array(DocumentationPageV2),
|
|
4613
|
+
groups: _zod.z.array(ElementGroup),
|
|
4614
|
+
internalSettings: DesignSystemVersionRoomInternalSettings
|
|
4615
|
+
});
|
|
4616
|
+
var DesignSystemVersionRoomUpdate = _zod.z.object({
|
|
4617
|
+
pages: _zod.z.array(DocumentationPageV2),
|
|
4618
|
+
groups: _zod.z.array(ElementGroup),
|
|
4619
|
+
deletedPageIds: _zod.z.array(_zod.z.string()),
|
|
4620
|
+
deletedGroupIds: _zod.z.array(_zod.z.string())
|
|
4621
|
+
});
|
|
4622
|
+
|
|
4623
|
+
// src/liveblocks/rooms/documentation-page-room.ts
|
|
4624
|
+
|
|
4625
|
+
var DocumentationPageRoom = Entity.extend({
|
|
4626
|
+
designSystemVersionId: _zod.z.string(),
|
|
4627
|
+
documentationPageId: _zod.z.string(),
|
|
4628
|
+
liveblocksId: _zod.z.string(),
|
|
4629
|
+
isDirty: _zod.z.boolean()
|
|
4630
|
+
});
|
|
4631
|
+
var DocumentationPageRoomState = _zod.z.object({
|
|
4632
|
+
pageItems: _zod.z.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
4633
|
+
itemConfiguration: DocumentationItemConfigurationV2
|
|
4634
|
+
});
|
|
4635
|
+
var DocumentationPageRoomRoomUpdate = _zod.z.object({
|
|
4636
|
+
page: DocumentationPageV2,
|
|
4637
|
+
pageParent: ElementGroup
|
|
4638
|
+
});
|
|
4639
|
+
var DocumentationPageRoomInitialStateUpdate = DocumentationPageRoomRoomUpdate.extend({
|
|
4640
|
+
pageItems: _zod.z.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
4641
|
+
blockDefinitions: _zod.z.array(PageBlockDefinition)
|
|
4642
|
+
});
|
|
4643
|
+
|
|
4644
|
+
// src/liveblocks/rooms/room-type.ts
|
|
4645
|
+
|
|
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 = _zod.z.nativeEnum(RoomTypeEnum);
|
|
4653
|
+
var RoomType = RoomTypeSchema.enum;
|
|
4654
|
+
|
|
4655
|
+
// src/liveblocks/rooms/workspace-room.ts
|
|
4656
|
+
|
|
4657
|
+
var WorkspaceRoom = Entity.extend({
|
|
4658
|
+
workspaceId: _zod.z.string(),
|
|
4659
|
+
liveblocksId: _zod.z.string()
|
|
4660
|
+
});
|
|
4661
|
+
|
|
4662
|
+
// src/npm/npm-package.ts
|
|
4663
|
+
|
|
4664
|
+
var AnyRecord = _zod.z.record(_zod.z.any());
|
|
4665
|
+
var NpmPackageVersionDist = AnyRecord.and(
|
|
4666
|
+
_zod.z.object({
|
|
4667
|
+
tarball: _zod.z.string()
|
|
4668
|
+
})
|
|
4669
|
+
);
|
|
4670
|
+
var NpmPackageVersion = AnyRecord.and(
|
|
4671
|
+
_zod.z.object({
|
|
4672
|
+
dist: NpmPackageVersionDist
|
|
4673
|
+
})
|
|
4674
|
+
);
|
|
4675
|
+
var NpmPackage = AnyRecord.and(
|
|
4676
|
+
_zod.z.object({
|
|
4677
|
+
_id: _zod.z.string(),
|
|
4678
|
+
name: _zod.z.string(),
|
|
4679
|
+
// e.g. "latest": "1.2.3"
|
|
4680
|
+
"dist-tags": _zod.z.record(_zod.z.string(), _zod.z.string()),
|
|
4681
|
+
// "1.2.3": {...}
|
|
4682
|
+
versions: _zod.z.record(NpmPackageVersion)
|
|
4683
|
+
})
|
|
4684
|
+
);
|
|
4685
|
+
|
|
4686
|
+
// src/npm/npm-proxy-token-payload.ts
|
|
4687
|
+
|
|
4688
|
+
var NpmProxyTokenPayload = _zod.z.object({
|
|
4689
|
+
npmProxyRegistryConfigId: _zod.z.string()
|
|
4690
|
+
});
|
|
4691
|
+
|
|
4692
|
+
// src/tokens/personal-access-token.ts
|
|
4693
|
+
|
|
4694
|
+
var PersonalAccessToken = _zod.z.object({
|
|
4695
|
+
id: _zod.z.string(),
|
|
4696
|
+
userId: _zod.z.string(),
|
|
4697
|
+
workspaceId: _zod.z.string().optional(),
|
|
4698
|
+
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
4699
|
+
name: _zod.z.string(),
|
|
4700
|
+
hidden: _zod.z.boolean(),
|
|
4701
|
+
token: _zod.z.string(),
|
|
4702
|
+
scope: _zod.z.string().optional(),
|
|
4703
|
+
createdAt: _zod.z.coerce.date(),
|
|
4704
|
+
expireAt: _zod.z.coerce.date().optional()
|
|
4705
|
+
});
|
|
4706
|
+
|
|
4695
4707
|
|
|
4696
4708
|
|
|
4697
4709
|
|