@supernova-studio/client 0.45.0 → 0.46.0
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 +315 -122
- package/dist/index.d.ts +315 -122
- package/dist/index.js +315 -282
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +568 -535
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/conversion/documentation/documentation-group-v1-to-dto.ts +30 -5
- package/src/api/conversion/documentation/documentation-group-v2-to-dto.ts +28 -8
- package/src/api/conversion/documentation/documentation-item-configuration-v1-to-dto.ts +18 -16
- package/src/api/conversion/documentation/documentation-item-configuration-v2-to-dto.ts +15 -13
- package/src/api/conversion/documentation/documentation-page-to-dto-utils.ts +62 -0
- package/src/api/conversion/documentation/documentation-page-v1-to-dto.ts +47 -26
- package/src/api/conversion/documentation/documentation-page-v2-to-dto.ts +23 -9
- package/src/api/conversion/index.ts +0 -2
- package/src/api/dto/design-systems/version.ts +17 -0
- package/src/api/dto/workspaces/integrations.ts +2 -2
- package/src/api/payloads/design-systems/version.ts +5 -2
- package/src/api/payloads/workspaces/workspace-integrations.ts +9 -1
- package/src/yjs/design-system-content/index.ts +0 -1
- package/src/api/conversion/design-system/index.ts +0 -1
- package/src/api/conversion/design-system/version-to-dto.ts +0 -17
- package/src/api/conversion/design-systems/brand.ts +0 -14
- package/src/api/conversion/design-systems/elements/index.ts +0 -1
- package/src/api/conversion/design-systems/elements/properties/index.ts +0 -2
- package/src/api/conversion/design-systems/elements/properties/property-definition.ts +0 -21
- package/src/api/conversion/design-systems/elements/properties/property-value.ts +0 -28
- package/src/api/conversion/design-systems/index.ts +0 -3
- package/src/api/conversion/design-systems/view.ts +0 -18
package/dist/index.mjs
CHANGED
|
@@ -1,91 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
meta: {
|
|
8
|
-
name: version.name,
|
|
9
|
-
description: version.comment
|
|
10
|
-
},
|
|
11
|
-
version: version.version,
|
|
12
|
-
changeLog: version.changeLog,
|
|
13
|
-
isReadonly: version.isReadonly
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// src/api/conversion/design-systems/elements/properties/property-definition.ts
|
|
18
|
-
function elementPropertyDefinitionToDto(elementProperyDefinition) {
|
|
19
|
-
return {
|
|
20
|
-
id: elementProperyDefinition.id,
|
|
21
|
-
designSystemVersionId: elementProperyDefinition.designSystemVersionId,
|
|
22
|
-
meta: {
|
|
23
|
-
name: elementProperyDefinition.name,
|
|
24
|
-
description: elementProperyDefinition.description
|
|
25
|
-
},
|
|
26
|
-
persistentId: elementProperyDefinition.persistentId,
|
|
27
|
-
type: elementProperyDefinition.type,
|
|
28
|
-
targetElementType: elementProperyDefinition.targetElementType,
|
|
29
|
-
codeName: elementProperyDefinition.codeName,
|
|
30
|
-
options: elementProperyDefinition.options,
|
|
31
|
-
linkElementType: elementProperyDefinition.linkElementType
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// src/api/conversion/design-systems/elements/properties/property-value.ts
|
|
36
|
-
function elementPropertyValueToDto(elementPropertyValue) {
|
|
37
|
-
let value;
|
|
38
|
-
let valuePreview;
|
|
39
|
-
if (elementPropertyValue.stringValue) {
|
|
40
|
-
value = elementPropertyValue.stringValue;
|
|
41
|
-
} else if (elementPropertyValue.numberValue) {
|
|
42
|
-
value = elementPropertyValue.numberValue;
|
|
43
|
-
} else if (typeof elementPropertyValue.booleanValue === "boolean") {
|
|
44
|
-
value = elementPropertyValue.booleanValue;
|
|
45
|
-
} else if (elementPropertyValue.referenceValue) {
|
|
46
|
-
value = elementPropertyValue.referenceValue;
|
|
47
|
-
valuePreview = elementPropertyValue.referenceValuePreview;
|
|
48
|
-
} else {
|
|
49
|
-
value = void 0;
|
|
50
|
-
}
|
|
51
|
-
return {
|
|
52
|
-
id: elementPropertyValue.id,
|
|
53
|
-
designSystemVersionId: elementPropertyValue.designSystemVersionId,
|
|
54
|
-
definitionId: elementPropertyValue.definitionPersistentId,
|
|
55
|
-
targetElementId: elementPropertyValue.targetElementPersistentId,
|
|
56
|
-
value,
|
|
57
|
-
valuePreview
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// src/api/conversion/design-systems/brand.ts
|
|
62
|
-
function designSystemBrandToDto(brand) {
|
|
63
|
-
return {
|
|
64
|
-
id: brand.id,
|
|
65
|
-
designSystemVersionId: brand.designSystemVersionId,
|
|
66
|
-
persistentId: brand.persistentId,
|
|
67
|
-
meta: {
|
|
68
|
-
name: brand.name,
|
|
69
|
-
description: brand.description
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// src/api/conversion/design-systems/view.ts
|
|
75
|
-
function elementViewToDto(elementView, columns) {
|
|
76
|
-
columns.sort((lhs, rhs) => lhs.sortPosition - rhs.sortPosition);
|
|
77
|
-
return {
|
|
78
|
-
id: elementView.id,
|
|
79
|
-
persistentId: elementView.persistentId,
|
|
80
|
-
targetElementType: elementView.targetElementType,
|
|
81
|
-
isDefault: elementView.isDefault,
|
|
82
|
-
meta: {
|
|
83
|
-
name: elementView.name,
|
|
84
|
-
description: elementView.description
|
|
85
|
-
},
|
|
86
|
-
columns
|
|
87
|
-
};
|
|
88
|
-
}
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
89
7
|
|
|
90
8
|
// ../model/dist/index.mjs
|
|
91
9
|
import { z } from "zod";
|
|
@@ -1287,8 +1205,8 @@ var defaultDocumentationItemHeaderV2 = {
|
|
|
1287
1205
|
};
|
|
1288
1206
|
var DocumentationItemConfigurationV2 = z41.object({
|
|
1289
1207
|
showSidebar: z41.boolean(),
|
|
1290
|
-
isPrivate: z41.boolean(),
|
|
1291
|
-
isHidden: z41.boolean(),
|
|
1208
|
+
isPrivate: z41.boolean().optional(),
|
|
1209
|
+
isHidden: z41.boolean().optional(),
|
|
1292
1210
|
header: DocumentationItemHeaderV2
|
|
1293
1211
|
});
|
|
1294
1212
|
var DocumentationPageDataV2 = z42.object({
|
|
@@ -2613,6 +2531,7 @@ var PublishedDocPage = z118.object({
|
|
|
2613
2531
|
pathV1: z118.string(),
|
|
2614
2532
|
pathV2: z118.string(),
|
|
2615
2533
|
storagePath: z118.string(),
|
|
2534
|
+
fallbackPublicPath: z118.string().optional(),
|
|
2616
2535
|
locale: z118.string().optional(),
|
|
2617
2536
|
isPrivate: z118.boolean(),
|
|
2618
2537
|
isHidden: z118.boolean(),
|
|
@@ -2978,13 +2897,13 @@ var ExternalOAuthRequest = z137.object({
|
|
|
2978
2897
|
state: z137.string(),
|
|
2979
2898
|
createdAt: z137.coerce.date()
|
|
2980
2899
|
});
|
|
2981
|
-
var IntegrationCredentialsType = z138.enum(["OAuth2", "PAT"]);
|
|
2900
|
+
var IntegrationCredentialsType = z138.enum(["OAuth2", "PAT", "GithubApp"]);
|
|
2982
2901
|
var IntegrationCredentialsProfile = z138.object({
|
|
2983
2902
|
id: z138.string(),
|
|
2984
2903
|
username: z138.string().optional(),
|
|
2985
2904
|
avatarUrl: z138.string().optional()
|
|
2986
2905
|
});
|
|
2987
|
-
var
|
|
2906
|
+
var IntegrationCredentials = z138.object({
|
|
2988
2907
|
id: z138.string(),
|
|
2989
2908
|
type: IntegrationCredentialsType,
|
|
2990
2909
|
integrationId: z138.string(),
|
|
@@ -2992,7 +2911,8 @@ var IntegrationCredentialsSchema = z138.object({
|
|
|
2992
2911
|
userId: z138.string(),
|
|
2993
2912
|
createdAt: z138.coerce.date(),
|
|
2994
2913
|
refreshToken: z138.string().optional(),
|
|
2995
|
-
profile: IntegrationCredentialsProfile.optional()
|
|
2914
|
+
profile: IntegrationCredentialsProfile.optional(),
|
|
2915
|
+
customUrl: z138.string().optional()
|
|
2996
2916
|
});
|
|
2997
2917
|
var IntegrationType = z138.enum(["Figma", "Github", "Gitlab", "Bitbucket", "Azure"]);
|
|
2998
2918
|
var Integration = z138.object({
|
|
@@ -3000,7 +2920,29 @@ var Integration = z138.object({
|
|
|
3000
2920
|
workspaceId: z138.string(),
|
|
3001
2921
|
type: IntegrationType,
|
|
3002
2922
|
createdAt: z138.coerce.date(),
|
|
3003
|
-
integrationCredentials: z138.array(
|
|
2923
|
+
integrationCredentials: z138.array(IntegrationCredentials).optional()
|
|
2924
|
+
});
|
|
2925
|
+
var forbiddenCustomUrldomainList = ["github.com", "gitlab.com", "bitbucket.org", "figma.com", "dev.azure.com"];
|
|
2926
|
+
var IntegrationTokenResponse = z138.object({
|
|
2927
|
+
access_token: z138.string(),
|
|
2928
|
+
refresh_token: z138.string().optional(),
|
|
2929
|
+
expires_in: z138.number().optional(),
|
|
2930
|
+
token_type: z138.string().optional(),
|
|
2931
|
+
custom_url: z138.string().optional().refine((value) => {
|
|
2932
|
+
if (!value)
|
|
2933
|
+
return true;
|
|
2934
|
+
if (forbiddenCustomUrldomainList.some((domain) => value.includes(domain)))
|
|
2935
|
+
return false;
|
|
2936
|
+
return true;
|
|
2937
|
+
}, "Custom URL validation failed")
|
|
2938
|
+
}).transform((data) => {
|
|
2939
|
+
return {
|
|
2940
|
+
accessToken: data.access_token,
|
|
2941
|
+
refreshToken: data.refresh_token,
|
|
2942
|
+
expiresIn: data.expires_in,
|
|
2943
|
+
tokenType: data.token_type,
|
|
2944
|
+
customUrl: data.custom_url
|
|
2945
|
+
};
|
|
3004
2946
|
});
|
|
3005
2947
|
var IntegrationTokenSchema = z139.object({
|
|
3006
2948
|
id: z139.string(),
|
|
@@ -3788,7 +3730,7 @@ var RESERVED_SLUGS = [
|
|
|
3788
3730
|
var RESERVED_SLUGS_SET = new Set(RESERVED_SLUGS);
|
|
3789
3731
|
|
|
3790
3732
|
// src/api/conversion/documentation/documentation-item-configuration-v2-to-dto.ts
|
|
3791
|
-
var
|
|
3733
|
+
var getDtoDefaultItemConfigurationV2 = () => ({
|
|
3792
3734
|
showSidebar: true,
|
|
3793
3735
|
isHidden: false,
|
|
3794
3736
|
isPrivate: false,
|
|
@@ -3799,18 +3741,97 @@ var dtoDefaultItemConfigurationV2 = {
|
|
|
3799
3741
|
showBackgroundOverlay: false,
|
|
3800
3742
|
showCoverText: true
|
|
3801
3743
|
}
|
|
3802
|
-
};
|
|
3744
|
+
});
|
|
3803
3745
|
function documentationItemConfigurationToDTOV2(config) {
|
|
3746
|
+
const dtoDefaultItemConfigurationV2 = getDtoDefaultItemConfigurationV2();
|
|
3804
3747
|
if (!config)
|
|
3805
3748
|
return dtoDefaultItemConfigurationV2;
|
|
3806
3749
|
return {
|
|
3807
3750
|
header: config.header,
|
|
3808
|
-
isHidden: config.isHidden ?? dtoDefaultItemConfigurationV2.
|
|
3751
|
+
isHidden: config.isHidden ?? dtoDefaultItemConfigurationV2.isHidden,
|
|
3809
3752
|
isPrivate: config.isPrivate ?? dtoDefaultItemConfigurationV2.isPrivate,
|
|
3810
3753
|
showSidebar: config.showSidebar
|
|
3811
3754
|
};
|
|
3812
3755
|
}
|
|
3813
3756
|
|
|
3757
|
+
// src/api/conversion/documentation/documentation-page-to-dto-utils.ts
|
|
3758
|
+
function buildDocPagePublishPaths(groups, pages, routingVersion) {
|
|
3759
|
+
const groupPersistentIdToGroupMap = mapByUnique(groups, (group) => group.persistentId);
|
|
3760
|
+
const result = /* @__PURE__ */ new Map();
|
|
3761
|
+
for (const page of pages) {
|
|
3762
|
+
const parentChain = calculateElementParentChain(page.parentPersistentId, groupPersistentIdToGroupMap);
|
|
3763
|
+
let pathV1 = `${page.userSlug || page.slug}.html`;
|
|
3764
|
+
let pathV2 = `${slugify(page.meta.name)}-${page.shortPersistentId}`;
|
|
3765
|
+
for (const parent of parentChain) {
|
|
3766
|
+
if (!parent.parentPersistentId)
|
|
3767
|
+
continue;
|
|
3768
|
+
pathV1 = `${parent.userSlug || parent.slug}/${pathV1}`;
|
|
3769
|
+
pathV2 = `${slugify(parent.meta.name)}/${pathV2}`;
|
|
3770
|
+
}
|
|
3771
|
+
pathV1 = `/${pathV1}`;
|
|
3772
|
+
pathV2 = `/${pathV2}`;
|
|
3773
|
+
if (routingVersion === "2") {
|
|
3774
|
+
result.set(page.persistentId, pathV2);
|
|
3775
|
+
} else {
|
|
3776
|
+
result.set(page.persistentId, pathV1);
|
|
3777
|
+
}
|
|
3778
|
+
}
|
|
3779
|
+
return result;
|
|
3780
|
+
}
|
|
3781
|
+
function calculateElementParentChain(elementParentPersistentId, groupPersistentIdToGroupMap) {
|
|
3782
|
+
const result = [];
|
|
3783
|
+
let parentId = elementParentPersistentId;
|
|
3784
|
+
while (parentId) {
|
|
3785
|
+
const parent = groupPersistentIdToGroupMap.get(parentId);
|
|
3786
|
+
if (parent)
|
|
3787
|
+
result.push(parent);
|
|
3788
|
+
parentId = parent?.parentPersistentId;
|
|
3789
|
+
}
|
|
3790
|
+
return result;
|
|
3791
|
+
}
|
|
3792
|
+
function applyPrivacyConfigurationToNestedItems(pages, groups, getDefaultItemConfiguration) {
|
|
3793
|
+
const fixedGroups = groups.map((group) => ({
|
|
3794
|
+
...group,
|
|
3795
|
+
data: {
|
|
3796
|
+
...group.data,
|
|
3797
|
+
configuration: group.data?.configuration ?? getDefaultItemConfiguration()
|
|
3798
|
+
}
|
|
3799
|
+
}));
|
|
3800
|
+
const groupPersistentIdToGroupMap = mapByUnique(fixedGroups, (group) => group.persistentId);
|
|
3801
|
+
for (const groupToFix of fixedGroups) {
|
|
3802
|
+
let isHidden = groupToFix.data.configuration.isHidden;
|
|
3803
|
+
let isPrivate = groupToFix.data.configuration.isPrivate;
|
|
3804
|
+
let nextParentId = groupToFix.parentPersistentId;
|
|
3805
|
+
while ((!isHidden || !isPrivate) && nextParentId) {
|
|
3806
|
+
const parent = groupPersistentIdToGroupMap.get(nextParentId);
|
|
3807
|
+
if (!parent)
|
|
3808
|
+
break;
|
|
3809
|
+
isHidden = isHidden || parent.data?.configuration?.isHidden || false;
|
|
3810
|
+
isPrivate = isPrivate || parent.data?.configuration?.isPrivate || false;
|
|
3811
|
+
nextParentId = parent.parentPersistentId;
|
|
3812
|
+
}
|
|
3813
|
+
groupToFix.data.configuration.isHidden = isHidden;
|
|
3814
|
+
groupToFix.data.configuration.isPrivate = isPrivate;
|
|
3815
|
+
}
|
|
3816
|
+
const fixedPages = [];
|
|
3817
|
+
for (const page of pages) {
|
|
3818
|
+
const configuration = page.data?.configuration ?? getDefaultItemConfiguration();
|
|
3819
|
+
const parent = groupPersistentIdToGroupMap.get(page.parentPersistentId);
|
|
3820
|
+
fixedPages.push({
|
|
3821
|
+
...page,
|
|
3822
|
+
data: {
|
|
3823
|
+
...page.data,
|
|
3824
|
+
configuration: {
|
|
3825
|
+
...configuration,
|
|
3826
|
+
isHidden: configuration.isHidden || parent?.data?.configuration?.isHidden || false,
|
|
3827
|
+
isPrivate: configuration.isPrivate || parent?.data?.configuration?.isPrivate || false
|
|
3828
|
+
}
|
|
3829
|
+
}
|
|
3830
|
+
});
|
|
3831
|
+
}
|
|
3832
|
+
return { pages: fixedPages, groups: fixedGroups };
|
|
3833
|
+
}
|
|
3834
|
+
|
|
3814
3835
|
// src/api/conversion/documentation/documentation-group-v2-to-dto.ts
|
|
3815
3836
|
function elementGroupsToDocumentationGroupStructureDTOV2(groups, pages) {
|
|
3816
3837
|
const childrenIdsMap = calculateChildrenIdsMapV2(pages, groups);
|
|
@@ -3818,12 +3839,12 @@ function elementGroupsToDocumentationGroupStructureDTOV2(groups, pages) {
|
|
|
3818
3839
|
}
|
|
3819
3840
|
function elementGroupsToDocumentationGroupDTOV2(groups, pages) {
|
|
3820
3841
|
const childrenIdsMap = calculateChildrenIdsMapV2(pages, groups);
|
|
3821
|
-
return groups.map((group) =>
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3842
|
+
return groups.map((group) => elementGroupToDocumentationGroupStructureDTOV2(group, childrenIdsMap));
|
|
3843
|
+
}
|
|
3844
|
+
function elementGroupsToDocumentationGroupFixedConfigurationDTOV2(groups, pages) {
|
|
3845
|
+
const childrenIdsMap = calculateChildrenIdsMapV2(pages, groups);
|
|
3846
|
+
const { groups: fixedGroups } = applyPrivacyConfigurationToNestedItems(pages, groups, getDtoDefaultItemConfigurationV2);
|
|
3847
|
+
return fixedGroups.map((group) => elementGroupToDocumentationGroupStructureDTOV2(group, childrenIdsMap));
|
|
3827
3848
|
}
|
|
3828
3849
|
function elementGroupToDocumentationGroupStructureDTOV2(group, childrenIdsMap) {
|
|
3829
3850
|
const childrenIds = childrenIdsMap.get(group.persistentId) ?? [];
|
|
@@ -3862,42 +3883,6 @@ function calculateChildrenIdsMapV2(elements, groups) {
|
|
|
3862
3883
|
return childrenIdsMap;
|
|
3863
3884
|
}
|
|
3864
3885
|
|
|
3865
|
-
// src/api/conversion/documentation/documentation-page-to-dto-utils.ts
|
|
3866
|
-
function buildDocPagePublishPaths(groups, pages, routingVersion) {
|
|
3867
|
-
const groupPersistentIdToGroupMap = mapByUnique(groups, (group) => group.persistentId);
|
|
3868
|
-
const result = /* @__PURE__ */ new Map();
|
|
3869
|
-
for (const page of pages) {
|
|
3870
|
-
const parentChain = calculateElementParentChain(page.parentPersistentId, groupPersistentIdToGroupMap);
|
|
3871
|
-
let pathV1 = `${page.userSlug || page.slug}.html`;
|
|
3872
|
-
let pathV2 = `${slugify(page.meta.name)}-${page.shortPersistentId}`;
|
|
3873
|
-
for (const parent of parentChain) {
|
|
3874
|
-
if (!parent.parentPersistentId)
|
|
3875
|
-
continue;
|
|
3876
|
-
pathV1 = `${parent.userSlug || parent.slug}/${pathV1}`;
|
|
3877
|
-
pathV2 = `${slugify(parent.meta.name)}/${pathV2}`;
|
|
3878
|
-
}
|
|
3879
|
-
pathV1 = `/${pathV1}`;
|
|
3880
|
-
pathV2 = `/${pathV2}`;
|
|
3881
|
-
if (routingVersion === "2") {
|
|
3882
|
-
result.set(page.persistentId, pathV2);
|
|
3883
|
-
} else {
|
|
3884
|
-
result.set(page.persistentId, pathV1);
|
|
3885
|
-
}
|
|
3886
|
-
}
|
|
3887
|
-
return result;
|
|
3888
|
-
}
|
|
3889
|
-
function calculateElementParentChain(elementParentPersistentId, groupPersistentIdToGroupMap) {
|
|
3890
|
-
const result = [];
|
|
3891
|
-
let parentId = elementParentPersistentId;
|
|
3892
|
-
while (parentId) {
|
|
3893
|
-
const parent = groupPersistentIdToGroupMap.get(parentId);
|
|
3894
|
-
if (parent)
|
|
3895
|
-
result.push(parent);
|
|
3896
|
-
parentId = parent?.parentPersistentId;
|
|
3897
|
-
}
|
|
3898
|
-
return result;
|
|
3899
|
-
}
|
|
3900
|
-
|
|
3901
3886
|
// src/api/conversion/documentation/documentation-page-v2-to-dto.ts
|
|
3902
3887
|
function documentationPagesToStructureDTOV2(pages, groups, routingVersion) {
|
|
3903
3888
|
const pathsMap = buildDocPagePublishPaths(groups, pages, routingVersion);
|
|
@@ -3905,12 +3890,12 @@ function documentationPagesToStructureDTOV2(pages, groups, routingVersion) {
|
|
|
3905
3890
|
}
|
|
3906
3891
|
function documentationPagesToDTOV2(pages, groups, routingVersion) {
|
|
3907
3892
|
const pathsMap = buildDocPagePublishPaths(groups, pages, routingVersion);
|
|
3908
|
-
return pages.map((page) =>
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3893
|
+
return pages.map((page) => documentationPageToStructureDTOV2(page, pathsMap));
|
|
3894
|
+
}
|
|
3895
|
+
function documentationPagesFixedConfigurationToDTOV2(pages, groups, routingVersion) {
|
|
3896
|
+
const pathsMap = buildDocPagePublishPaths(groups, pages, routingVersion);
|
|
3897
|
+
const { pages: fixedPages } = applyPrivacyConfigurationToNestedItems(pages, groups, getDtoDefaultItemConfigurationV2);
|
|
3898
|
+
return fixedPages.map((page) => documentationPageToStructureDTOV2(page, pathsMap));
|
|
3914
3899
|
}
|
|
3915
3900
|
function documentationPageToStructureDTOV2(page, pagePathMap) {
|
|
3916
3901
|
let path = pagePathMap.get(page.persistentId);
|
|
@@ -3943,7 +3928,7 @@ function documentationElementsToHierarchyDto(docPages, docGroups, routingVersion
|
|
|
3943
3928
|
}
|
|
3944
3929
|
|
|
3945
3930
|
// src/api/conversion/documentation/documentation-item-configuration-v1-to-dto.ts
|
|
3946
|
-
var
|
|
3931
|
+
var getDtoDefaultItemConfigurationV1 = () => ({
|
|
3947
3932
|
showSidebar: true,
|
|
3948
3933
|
isHidden: false,
|
|
3949
3934
|
isPrivate: false,
|
|
@@ -3954,12 +3939,14 @@ var dtoDefaultItemConfigurationV1 = {
|
|
|
3954
3939
|
showBackgroundOverlay: false,
|
|
3955
3940
|
showCoverText: true
|
|
3956
3941
|
}
|
|
3957
|
-
};
|
|
3942
|
+
});
|
|
3958
3943
|
function documentationItemConfigurationToDTOV1(config) {
|
|
3959
|
-
const
|
|
3960
|
-
|
|
3944
|
+
const dtoDefaultItemConfigurationV1 = getDtoDefaultItemConfigurationV1();
|
|
3945
|
+
if (!config)
|
|
3946
|
+
return dtoDefaultItemConfigurationV1;
|
|
3947
|
+
const { backgroundColor, foregroundColor, ...headerRest } = config.header;
|
|
3961
3948
|
return {
|
|
3962
|
-
showSidebar,
|
|
3949
|
+
showSidebar: config.showSidebar,
|
|
3963
3950
|
isHidden: config.isHidden ?? dtoDefaultItemConfigurationV1.isHidden,
|
|
3964
3951
|
isPrivate: config.isPrivate ?? dtoDefaultItemConfigurationV1.isPrivate,
|
|
3965
3952
|
header: {
|
|
@@ -3993,7 +3980,17 @@ function elementGroupsToDocumentationGroupDTOV1(groups, pages) {
|
|
|
3993
3980
|
return groups.map((group) => {
|
|
3994
3981
|
return {
|
|
3995
3982
|
...elementGroupToDocumentationGroupStructureDTOV1(group, childrenIdsMap),
|
|
3996
|
-
configuration:
|
|
3983
|
+
configuration: documentationItemConfigurationToDTOV1(group.data?.configuration)
|
|
3984
|
+
};
|
|
3985
|
+
});
|
|
3986
|
+
}
|
|
3987
|
+
function elementGroupsToDocumentationGroupFixedConfigurationDTOV1(groups, pages) {
|
|
3988
|
+
const childrenIdsMap = calculateChildrenIdsMapV1(pages, groups);
|
|
3989
|
+
const { groups: fixedGroups } = applyPrivacyConfigurationToNestedItems(pages, groups, getDtoDefaultItemConfigurationV1);
|
|
3990
|
+
return fixedGroups.map((group) => {
|
|
3991
|
+
return {
|
|
3992
|
+
...elementGroupToDocumentationGroupStructureDTOV1(group, childrenIdsMap),
|
|
3993
|
+
configuration: documentationItemConfigurationToDTOV1(group.data?.configuration)
|
|
3997
3994
|
};
|
|
3998
3995
|
});
|
|
3999
3996
|
}
|
|
@@ -4036,27 +4033,33 @@ function calculateChildrenIdsMapV1(elements, groups) {
|
|
|
4036
4033
|
// src/api/conversion/documentation/documentation-page-v1-to-dto.ts
|
|
4037
4034
|
function documentationPagesToDTOV1(pages, groups, routingVersion) {
|
|
4038
4035
|
const pathsMap = buildDocPagePublishPaths(groups, pages, routingVersion);
|
|
4039
|
-
return pages.map((page) =>
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4036
|
+
return pages.map((page) => documentationPageToDTOV1(page, pathsMap));
|
|
4037
|
+
}
|
|
4038
|
+
function documentationPagesFixedConfigurationToDTOV1(pages, groups, routingVersion) {
|
|
4039
|
+
const pathsMap = buildDocPagePublishPaths(groups, pages, routingVersion);
|
|
4040
|
+
const { pages: fixedPages } = applyPrivacyConfigurationToNestedItems(pages, groups, getDtoDefaultItemConfigurationV1);
|
|
4041
|
+
return fixedPages.map((page) => documentationPageToDTOV1(page, pathsMap));
|
|
4042
|
+
}
|
|
4043
|
+
function documentationPageToDTOV1(page, pagePathMap) {
|
|
4044
|
+
let path = pagePathMap.get(page.persistentId);
|
|
4045
|
+
if (!path)
|
|
4046
|
+
throw SupernovaException.conflict(`Path for page ${page.id} was not calculated`);
|
|
4047
|
+
if (path.startsWith("/"))
|
|
4048
|
+
path = path.substring(1);
|
|
4049
|
+
return {
|
|
4050
|
+
id: page.id,
|
|
4051
|
+
designSystemVersionId: page.designSystemVersionId,
|
|
4052
|
+
persistentId: page.persistentId,
|
|
4053
|
+
shortPersistentId: page.shortPersistentId,
|
|
4054
|
+
title: page.meta.name,
|
|
4055
|
+
blocks: page.data.blocks,
|
|
4056
|
+
slug: page.slug,
|
|
4057
|
+
userSlug: page.userSlug,
|
|
4058
|
+
configuration: documentationItemConfigurationToDTOV1(page.data.configuration),
|
|
4059
|
+
createdAt: page.createdAt,
|
|
4060
|
+
updatedAt: page.updatedAt,
|
|
4061
|
+
path
|
|
4062
|
+
};
|
|
4060
4063
|
}
|
|
4061
4064
|
|
|
4062
4065
|
// src/api/conversion/integrations/integration.ts
|
|
@@ -4101,89 +4104,198 @@ var DTOExporterProperty = z147.any({});
|
|
|
4101
4104
|
var DTOExporterPropertyListResponse = z147.object({ items: z147.array(DTOExporterProperty) });
|
|
4102
4105
|
|
|
4103
4106
|
// src/api/dto/design-systems/version.ts
|
|
4107
|
+
import { z as z154 } from "zod";
|
|
4108
|
+
|
|
4109
|
+
// src/api/payloads/design-systems/brand.ts
|
|
4104
4110
|
import { z as z148 } from "zod";
|
|
4105
|
-
var
|
|
4106
|
-
|
|
4107
|
-
|
|
4111
|
+
var DTOCreateBrandInput = z148.object({
|
|
4112
|
+
persistentId: z148.string().uuid(),
|
|
4113
|
+
meta: z148.object({
|
|
4114
|
+
name: z148.string(),
|
|
4115
|
+
description: z148.string()
|
|
4116
|
+
})
|
|
4117
|
+
});
|
|
4118
|
+
|
|
4119
|
+
// src/api/payloads/design-systems/version.ts
|
|
4120
|
+
import { z as z149 } from "zod";
|
|
4121
|
+
var ObjectMeta2 = z149.object({
|
|
4122
|
+
name: z149.string().max(150).optional(),
|
|
4123
|
+
description: z149.string().max(2e3).optional()
|
|
4124
|
+
});
|
|
4125
|
+
function validateSemver(version) {
|
|
4126
|
+
const semverRegex = /^(\d+)(\.\d+)?(\.\d+)?$/;
|
|
4127
|
+
return semverRegex.test(version);
|
|
4128
|
+
}
|
|
4129
|
+
var DTOCreateVersionInput = z149.object({
|
|
4130
|
+
meta: ObjectMeta2,
|
|
4131
|
+
version: z149.string().refine(validateSemver, {
|
|
4132
|
+
message: "Invalid semantic versioning format"
|
|
4133
|
+
}),
|
|
4134
|
+
changeLog: z149.string().max(2e3).optional()
|
|
4135
|
+
});
|
|
4136
|
+
|
|
4137
|
+
// src/api/payloads/documentation/block-definitions.ts
|
|
4138
|
+
import { z as z150 } from "zod";
|
|
4139
|
+
var DTOGetBlockDefinitionsOutput = z150.object({
|
|
4140
|
+
definitions: z150.array(PageBlockDefinition)
|
|
4141
|
+
});
|
|
4142
|
+
|
|
4143
|
+
// src/api/payloads/liveblocks/auth.ts
|
|
4144
|
+
import { z as z151 } from "zod";
|
|
4145
|
+
var DTOLiveblocksAuthRequest = z151.object({
|
|
4146
|
+
room: z151.string().optional()
|
|
4147
|
+
});
|
|
4148
|
+
|
|
4149
|
+
// src/api/payloads/workspaces/workspace-configuration.ts
|
|
4150
|
+
import { z as z152 } from "zod";
|
|
4151
|
+
var prohibitedSsoKeys = ["providerId", "metadataXml", "emailDomains"];
|
|
4152
|
+
function validateSsoPayload(ssoPayload) {
|
|
4153
|
+
const keys = [];
|
|
4154
|
+
let valid = true;
|
|
4155
|
+
if (!ssoPayload) {
|
|
4156
|
+
valid = true;
|
|
4157
|
+
return {
|
|
4158
|
+
valid,
|
|
4159
|
+
keys: []
|
|
4160
|
+
};
|
|
4161
|
+
}
|
|
4162
|
+
for (const key of Object.keys(ssoPayload)) {
|
|
4163
|
+
if (prohibitedSsoKeys.includes(key)) {
|
|
4164
|
+
keys.push(key);
|
|
4165
|
+
valid = false;
|
|
4166
|
+
}
|
|
4167
|
+
}
|
|
4168
|
+
return {
|
|
4169
|
+
valid,
|
|
4170
|
+
keys
|
|
4171
|
+
};
|
|
4172
|
+
}
|
|
4173
|
+
var NpmRegistryInput = z152.object({
|
|
4174
|
+
enabledScopes: z152.array(z152.string()),
|
|
4175
|
+
customRegistryUrl: z152.string().optional(),
|
|
4176
|
+
bypassProxy: z152.boolean().optional(),
|
|
4177
|
+
npmProxyRegistryConfigId: z152.string().optional(),
|
|
4178
|
+
npmProxyVersion: z152.number().optional(),
|
|
4179
|
+
registryType: z152.string(),
|
|
4180
|
+
authType: z152.string(),
|
|
4181
|
+
authHeaderName: z152.string(),
|
|
4182
|
+
authHeaderValue: z152.string(),
|
|
4183
|
+
accessToken: z152.string(),
|
|
4184
|
+
username: z152.string(),
|
|
4185
|
+
password: z152.string()
|
|
4186
|
+
});
|
|
4187
|
+
var WorkspaceConfigurationPayload = z152.object({
|
|
4188
|
+
ipWhitelist: WorkspaceIpSettings.partial().optional(),
|
|
4189
|
+
sso: SsoProvider.partial().optional(),
|
|
4190
|
+
npmRegistrySettings: NpmRegistryInput.partial().optional(),
|
|
4191
|
+
profile: WorkspaceProfile.partial().optional()
|
|
4192
|
+
});
|
|
4193
|
+
|
|
4194
|
+
// src/api/payloads/workspaces/workspace-integrations.ts
|
|
4195
|
+
import { z as z153 } from "zod";
|
|
4196
|
+
var DTOWorkspaceIntegrationOauthInput = z153.object({
|
|
4197
|
+
type: IntegrationType
|
|
4198
|
+
});
|
|
4199
|
+
var DTOWorkspaceIntegrationPATInput = z153.object({
|
|
4200
|
+
userId: z153.string(),
|
|
4201
|
+
type: IntegrationType,
|
|
4202
|
+
token: IntegrationTokenResponse
|
|
4203
|
+
});
|
|
4204
|
+
|
|
4205
|
+
// src/api/dto/design-systems/version.ts
|
|
4206
|
+
var DTODesignSystemVersion = z154.object({
|
|
4207
|
+
id: z154.string(),
|
|
4208
|
+
createdAt: z154.date(),
|
|
4108
4209
|
meta: ObjectMeta,
|
|
4109
|
-
version:
|
|
4110
|
-
isReadonly:
|
|
4111
|
-
changeLog:
|
|
4112
|
-
designSystemId:
|
|
4210
|
+
version: z154.string(),
|
|
4211
|
+
isReadonly: z154.boolean(),
|
|
4212
|
+
changeLog: z154.string(),
|
|
4213
|
+
designSystemId: z154.string()
|
|
4113
4214
|
});
|
|
4114
|
-
var DTODesignSystemVersionsListResponse =
|
|
4115
|
-
designSystemVersions:
|
|
4215
|
+
var DTODesignSystemVersionsListResponse = z154.object({
|
|
4216
|
+
designSystemVersions: z154.array(DTODesignSystemVersion)
|
|
4116
4217
|
});
|
|
4117
|
-
var DTODesignSystemVersionGetResponse =
|
|
4218
|
+
var DTODesignSystemVersionGetResponse = z154.object({
|
|
4118
4219
|
designSystemVersion: DTODesignSystemVersion
|
|
4119
4220
|
});
|
|
4221
|
+
var DTODesignSystemVersionCreationResponse = z154.object({
|
|
4222
|
+
meta: ObjectMeta,
|
|
4223
|
+
version: z154.string(),
|
|
4224
|
+
changeLog: z154.string(),
|
|
4225
|
+
isReadOnly: z154.boolean(),
|
|
4226
|
+
designSystemId: z154.string()
|
|
4227
|
+
});
|
|
4228
|
+
var VersionSQSPayload = z154.object({
|
|
4229
|
+
designSystemId: z154.string(),
|
|
4230
|
+
input: DTOCreateVersionInput
|
|
4231
|
+
});
|
|
4120
4232
|
|
|
4121
4233
|
// src/api/dto/design-systems/view.ts
|
|
4122
|
-
import { z as
|
|
4123
|
-
var DTOElementViewColumnSharedAttributes =
|
|
4124
|
-
id:
|
|
4125
|
-
persistentId:
|
|
4126
|
-
width:
|
|
4234
|
+
import { z as z155 } from "zod";
|
|
4235
|
+
var DTOElementViewColumnSharedAttributes = z155.object({
|
|
4236
|
+
id: z155.string(),
|
|
4237
|
+
persistentId: z155.string(),
|
|
4238
|
+
width: z155.number()
|
|
4127
4239
|
});
|
|
4128
4240
|
var DTOElementViewBasePropertyColumn = DTOElementViewColumnSharedAttributes.extend({
|
|
4129
|
-
type:
|
|
4241
|
+
type: z155.literal("BaseProperty"),
|
|
4130
4242
|
basePropertyType: ElementViewBaseColumnType
|
|
4131
4243
|
});
|
|
4132
4244
|
var DTOElementViewPropertyDefinitionColumn = DTOElementViewColumnSharedAttributes.extend({
|
|
4133
|
-
type:
|
|
4134
|
-
propertyDefinitionId:
|
|
4245
|
+
type: z155.literal("PropertyDefinition"),
|
|
4246
|
+
propertyDefinitionId: z155.string()
|
|
4135
4247
|
});
|
|
4136
4248
|
var DTOElementViewThemeColumn = DTOElementViewColumnSharedAttributes.extend({
|
|
4137
|
-
type:
|
|
4138
|
-
themeId:
|
|
4249
|
+
type: z155.literal("Theme"),
|
|
4250
|
+
themeId: z155.string()
|
|
4139
4251
|
});
|
|
4140
|
-
var DTOElementViewColumn =
|
|
4252
|
+
var DTOElementViewColumn = z155.discriminatedUnion("type", [
|
|
4141
4253
|
DTOElementViewBasePropertyColumn,
|
|
4142
4254
|
DTOElementViewPropertyDefinitionColumn,
|
|
4143
4255
|
DTOElementViewThemeColumn
|
|
4144
4256
|
]);
|
|
4145
|
-
var DTOElementView =
|
|
4257
|
+
var DTOElementView = z155.object({
|
|
4146
4258
|
meta: ObjectMeta,
|
|
4147
|
-
persistentId:
|
|
4259
|
+
persistentId: z155.string(),
|
|
4148
4260
|
targetElementType: ElementPropertyTargetType,
|
|
4149
|
-
id:
|
|
4150
|
-
isDefault:
|
|
4151
|
-
columns:
|
|
4261
|
+
id: z155.string(),
|
|
4262
|
+
isDefault: z155.boolean(),
|
|
4263
|
+
columns: z155.array(DTOElementViewColumn)
|
|
4152
4264
|
});
|
|
4153
|
-
var DTOElementViewsListResponse =
|
|
4154
|
-
elementDataViews:
|
|
4265
|
+
var DTOElementViewsListResponse = z155.object({
|
|
4266
|
+
elementDataViews: z155.array(DTOElementView)
|
|
4155
4267
|
});
|
|
4156
4268
|
|
|
4157
4269
|
// src/api/dto/documentation/anchor.ts
|
|
4158
|
-
import { z as
|
|
4270
|
+
import { z as z156 } from "zod";
|
|
4159
4271
|
var DTODocumentationPageAnchor = DocumentationPageAnchor;
|
|
4160
|
-
var DTOGetDocumentationPageAnchorsResponse =
|
|
4161
|
-
anchors:
|
|
4272
|
+
var DTOGetDocumentationPageAnchorsResponse = z156.object({
|
|
4273
|
+
anchors: z156.array(DTODocumentationPageAnchor)
|
|
4162
4274
|
});
|
|
4163
4275
|
|
|
4164
4276
|
// src/api/dto/documentation/link-preview.ts
|
|
4165
|
-
import { z as
|
|
4166
|
-
var DTODocumentationLinkPreviewResponse =
|
|
4277
|
+
import { z as z157 } from "zod";
|
|
4278
|
+
var DTODocumentationLinkPreviewResponse = z157.object({
|
|
4167
4279
|
linkPreview: DocumentationLinkPreview
|
|
4168
4280
|
});
|
|
4169
|
-
var DTODocumentationLinkPreviewRequest =
|
|
4170
|
-
url:
|
|
4171
|
-
documentationItemPersistentId:
|
|
4281
|
+
var DTODocumentationLinkPreviewRequest = z157.object({
|
|
4282
|
+
url: z157.string().optional(),
|
|
4283
|
+
documentationItemPersistentId: z157.string().optional()
|
|
4172
4284
|
});
|
|
4173
4285
|
|
|
4174
4286
|
// src/api/dto/elements/documentation/group-action.ts
|
|
4175
|
-
import { z as
|
|
4287
|
+
import { z as z160 } from "zod";
|
|
4176
4288
|
|
|
4177
4289
|
// src/api/dto/elements/documentation/group-v2.ts
|
|
4178
|
-
import { z as
|
|
4290
|
+
import { z as z159 } from "zod";
|
|
4179
4291
|
|
|
4180
4292
|
// src/api/dto/elements/documentation/item-configuration-v2.ts
|
|
4181
|
-
import { z as
|
|
4293
|
+
import { z as z158 } from "zod";
|
|
4182
4294
|
var DTODocumentationItemHeaderV2 = DocumentationItemHeaderV2;
|
|
4183
|
-
var DTODocumentationItemConfigurationV2 =
|
|
4184
|
-
showSidebar:
|
|
4185
|
-
isPrivate:
|
|
4186
|
-
isHidden:
|
|
4295
|
+
var DTODocumentationItemConfigurationV2 = z158.object({
|
|
4296
|
+
showSidebar: z158.boolean(),
|
|
4297
|
+
isPrivate: z158.boolean(),
|
|
4298
|
+
isHidden: z158.boolean(),
|
|
4187
4299
|
header: DTODocumentationItemHeaderV2
|
|
4188
4300
|
});
|
|
4189
4301
|
|
|
@@ -4197,136 +4309,136 @@ var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
|
4197
4309
|
data: true,
|
|
4198
4310
|
shortPersistentId: true
|
|
4199
4311
|
}).extend({
|
|
4200
|
-
title:
|
|
4201
|
-
isRoot:
|
|
4202
|
-
childrenIds:
|
|
4312
|
+
title: z159.string(),
|
|
4313
|
+
isRoot: z159.boolean(),
|
|
4314
|
+
childrenIds: z159.array(z159.string()),
|
|
4203
4315
|
groupBehavior: DocumentationGroupBehavior,
|
|
4204
|
-
shortPersistentId:
|
|
4316
|
+
shortPersistentId: z159.string(),
|
|
4205
4317
|
configuration: DTODocumentationItemConfigurationV2,
|
|
4206
|
-
type:
|
|
4318
|
+
type: z159.literal("Group")
|
|
4207
4319
|
});
|
|
4208
4320
|
var DTODocumentationGroupStructureV2 = DTODocumentationGroupV2;
|
|
4209
|
-
var DTOCreateDocumentationGroupInput =
|
|
4321
|
+
var DTOCreateDocumentationGroupInput = z159.object({
|
|
4210
4322
|
// Identifier
|
|
4211
|
-
persistentId:
|
|
4323
|
+
persistentId: z159.string().uuid(),
|
|
4212
4324
|
// Group properties
|
|
4213
|
-
title:
|
|
4325
|
+
title: z159.string(),
|
|
4214
4326
|
configuration: DTODocumentationItemConfigurationV2.optional(),
|
|
4215
4327
|
// Group placement properties
|
|
4216
|
-
afterPersistentId:
|
|
4217
|
-
parentPersistentId:
|
|
4328
|
+
afterPersistentId: z159.string().uuid().nullish(),
|
|
4329
|
+
parentPersistentId: z159.string().uuid()
|
|
4218
4330
|
});
|
|
4219
|
-
var DTOUpdateDocumentationGroupInput =
|
|
4331
|
+
var DTOUpdateDocumentationGroupInput = z159.object({
|
|
4220
4332
|
// Identifier of the group to update
|
|
4221
|
-
id:
|
|
4333
|
+
id: z159.string(),
|
|
4222
4334
|
// Group properties
|
|
4223
|
-
title:
|
|
4335
|
+
title: z159.string().optional(),
|
|
4224
4336
|
configuration: DTODocumentationItemConfigurationV2.partial().optional()
|
|
4225
4337
|
});
|
|
4226
|
-
var DTOMoveDocumentationGroupInput =
|
|
4338
|
+
var DTOMoveDocumentationGroupInput = z159.object({
|
|
4227
4339
|
// Identifier of the group to update
|
|
4228
|
-
id:
|
|
4340
|
+
id: z159.string(),
|
|
4229
4341
|
// Group placement properties
|
|
4230
|
-
parentPersistentId:
|
|
4231
|
-
afterPersistentId:
|
|
4342
|
+
parentPersistentId: z159.string().uuid(),
|
|
4343
|
+
afterPersistentId: z159.string().uuid().nullish()
|
|
4232
4344
|
});
|
|
4233
|
-
var DTODuplicateDocumentationGroupInput =
|
|
4345
|
+
var DTODuplicateDocumentationGroupInput = z159.object({
|
|
4234
4346
|
// Identifier of the group to duplicate from
|
|
4235
|
-
id:
|
|
4347
|
+
id: z159.string(),
|
|
4236
4348
|
// New group persistent id
|
|
4237
|
-
persistentId:
|
|
4349
|
+
persistentId: z159.string().uuid(),
|
|
4238
4350
|
// Group placement properties
|
|
4239
|
-
afterPersistentId:
|
|
4240
|
-
parentPersistentId:
|
|
4351
|
+
afterPersistentId: z159.string().uuid().nullish(),
|
|
4352
|
+
parentPersistentId: z159.string().uuid()
|
|
4241
4353
|
});
|
|
4242
|
-
var DTOCreateDocumentationTabInput =
|
|
4354
|
+
var DTOCreateDocumentationTabInput = z159.object({
|
|
4243
4355
|
// New group persistent id
|
|
4244
|
-
persistentId:
|
|
4356
|
+
persistentId: z159.string().uuid(),
|
|
4245
4357
|
// If this is page, we will attempt to convert it to tab
|
|
4246
4358
|
// If this is tab group, we will add a new tab to it
|
|
4247
|
-
fromItemPersistentId:
|
|
4248
|
-
tabName:
|
|
4359
|
+
fromItemPersistentId: z159.string(),
|
|
4360
|
+
tabName: z159.string()
|
|
4249
4361
|
});
|
|
4250
|
-
var DTODeleteDocumentationTabGroupInput =
|
|
4362
|
+
var DTODeleteDocumentationTabGroupInput = z159.object({
|
|
4251
4363
|
// Deleted group id
|
|
4252
|
-
id:
|
|
4364
|
+
id: z159.string()
|
|
4253
4365
|
});
|
|
4254
|
-
var DTODeleteDocumentationGroupInput =
|
|
4366
|
+
var DTODeleteDocumentationGroupInput = z159.object({
|
|
4255
4367
|
// Identifier
|
|
4256
|
-
id:
|
|
4368
|
+
id: z159.string(),
|
|
4257
4369
|
// Deletion options
|
|
4258
|
-
deleteSubtree:
|
|
4370
|
+
deleteSubtree: z159.boolean().default(false)
|
|
4259
4371
|
});
|
|
4260
4372
|
|
|
4261
4373
|
// src/api/dto/elements/documentation/group-action.ts
|
|
4262
|
-
var SuccessPayload =
|
|
4263
|
-
success:
|
|
4374
|
+
var SuccessPayload = z160.object({
|
|
4375
|
+
success: z160.literal(true)
|
|
4264
4376
|
});
|
|
4265
|
-
var DTODocumentationGroupCreateActionOutputV2 =
|
|
4266
|
-
type:
|
|
4377
|
+
var DTODocumentationGroupCreateActionOutputV2 = z160.object({
|
|
4378
|
+
type: z160.literal("DocumentationGroupCreate"),
|
|
4267
4379
|
output: SuccessPayload
|
|
4268
4380
|
});
|
|
4269
|
-
var DTODocumentationTabCreateActionOutputV2 =
|
|
4270
|
-
type:
|
|
4381
|
+
var DTODocumentationTabCreateActionOutputV2 = z160.object({
|
|
4382
|
+
type: z160.literal("DocumentationTabCreate"),
|
|
4271
4383
|
output: SuccessPayload
|
|
4272
4384
|
});
|
|
4273
|
-
var DTODocumentationGroupUpdateActionOutputV2 =
|
|
4274
|
-
type:
|
|
4385
|
+
var DTODocumentationGroupUpdateActionOutputV2 = z160.object({
|
|
4386
|
+
type: z160.literal("DocumentationGroupUpdate"),
|
|
4275
4387
|
output: SuccessPayload
|
|
4276
4388
|
});
|
|
4277
|
-
var DTODocumentationGroupMoveActionOutputV2 =
|
|
4278
|
-
type:
|
|
4389
|
+
var DTODocumentationGroupMoveActionOutputV2 = z160.object({
|
|
4390
|
+
type: z160.literal("DocumentationGroupMove"),
|
|
4279
4391
|
output: SuccessPayload
|
|
4280
4392
|
});
|
|
4281
|
-
var DTODocumentationGroupDuplicateActionOutputV2 =
|
|
4282
|
-
type:
|
|
4393
|
+
var DTODocumentationGroupDuplicateActionOutputV2 = z160.object({
|
|
4394
|
+
type: z160.literal("DocumentationGroupDuplicate"),
|
|
4283
4395
|
output: SuccessPayload
|
|
4284
4396
|
});
|
|
4285
|
-
var DTODocumentationGroupDeleteActionOutputV2 =
|
|
4286
|
-
type:
|
|
4397
|
+
var DTODocumentationGroupDeleteActionOutputV2 = z160.object({
|
|
4398
|
+
type: z160.literal("DocumentationGroupDelete"),
|
|
4287
4399
|
output: SuccessPayload
|
|
4288
4400
|
});
|
|
4289
|
-
var DTODocumentationTabGroupDeleteActionOutputV2 =
|
|
4290
|
-
type:
|
|
4401
|
+
var DTODocumentationTabGroupDeleteActionOutputV2 = z160.object({
|
|
4402
|
+
type: z160.literal("DocumentationTabGroupDelete"),
|
|
4291
4403
|
output: SuccessPayload
|
|
4292
4404
|
});
|
|
4293
|
-
var DTODocumentationGroupCreateActionInputV2 =
|
|
4294
|
-
type:
|
|
4405
|
+
var DTODocumentationGroupCreateActionInputV2 = z160.object({
|
|
4406
|
+
type: z160.literal("DocumentationGroupCreate"),
|
|
4295
4407
|
input: DTOCreateDocumentationGroupInput
|
|
4296
4408
|
});
|
|
4297
|
-
var DTODocumentationTabCreateActionInputV2 =
|
|
4298
|
-
type:
|
|
4409
|
+
var DTODocumentationTabCreateActionInputV2 = z160.object({
|
|
4410
|
+
type: z160.literal("DocumentationTabCreate"),
|
|
4299
4411
|
input: DTOCreateDocumentationTabInput
|
|
4300
4412
|
});
|
|
4301
|
-
var DTODocumentationGroupUpdateActionInputV2 =
|
|
4302
|
-
type:
|
|
4413
|
+
var DTODocumentationGroupUpdateActionInputV2 = z160.object({
|
|
4414
|
+
type: z160.literal("DocumentationGroupUpdate"),
|
|
4303
4415
|
input: DTOUpdateDocumentationGroupInput
|
|
4304
4416
|
});
|
|
4305
|
-
var DTODocumentationGroupMoveActionInputV2 =
|
|
4306
|
-
type:
|
|
4417
|
+
var DTODocumentationGroupMoveActionInputV2 = z160.object({
|
|
4418
|
+
type: z160.literal("DocumentationGroupMove"),
|
|
4307
4419
|
input: DTOMoveDocumentationGroupInput
|
|
4308
4420
|
});
|
|
4309
|
-
var DTODocumentationGroupDuplicateActionInputV2 =
|
|
4310
|
-
type:
|
|
4421
|
+
var DTODocumentationGroupDuplicateActionInputV2 = z160.object({
|
|
4422
|
+
type: z160.literal("DocumentationGroupDuplicate"),
|
|
4311
4423
|
input: DTODuplicateDocumentationGroupInput
|
|
4312
4424
|
});
|
|
4313
|
-
var DTODocumentationGroupDeleteActionInputV2 =
|
|
4314
|
-
type:
|
|
4425
|
+
var DTODocumentationGroupDeleteActionInputV2 = z160.object({
|
|
4426
|
+
type: z160.literal("DocumentationGroupDelete"),
|
|
4315
4427
|
input: DTODeleteDocumentationGroupInput
|
|
4316
4428
|
});
|
|
4317
|
-
var DTODocumentationTabGroupDeleteActionInputV2 =
|
|
4318
|
-
type:
|
|
4429
|
+
var DTODocumentationTabGroupDeleteActionInputV2 = z160.object({
|
|
4430
|
+
type: z160.literal("DocumentationTabGroupDelete"),
|
|
4319
4431
|
input: DTODeleteDocumentationTabGroupInput
|
|
4320
4432
|
});
|
|
4321
4433
|
|
|
4322
4434
|
// src/api/dto/elements/documentation/group-v1.ts
|
|
4323
|
-
import { z as
|
|
4435
|
+
import { z as z162 } from "zod";
|
|
4324
4436
|
|
|
4325
4437
|
// src/api/dto/elements/documentation/item-configuration-v1.ts
|
|
4326
|
-
import { z as
|
|
4327
|
-
var DocumentationColorV1 =
|
|
4328
|
-
aliasTo:
|
|
4329
|
-
value:
|
|
4438
|
+
import { z as z161 } from "zod";
|
|
4439
|
+
var DocumentationColorV1 = z161.object({
|
|
4440
|
+
aliasTo: z161.string().optional(),
|
|
4441
|
+
value: z161.string().optional()
|
|
4330
4442
|
});
|
|
4331
4443
|
var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
4332
4444
|
foregroundColor: true,
|
|
@@ -4335,10 +4447,10 @@ var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
|
4335
4447
|
foregroundColor: DocumentationColorV1.optional(),
|
|
4336
4448
|
backgroundColor: DocumentationColorV1.optional()
|
|
4337
4449
|
});
|
|
4338
|
-
var DTODocumentationItemConfigurationV1 =
|
|
4339
|
-
showSidebar:
|
|
4340
|
-
isPrivate:
|
|
4341
|
-
isHidden:
|
|
4450
|
+
var DTODocumentationItemConfigurationV1 = z161.object({
|
|
4451
|
+
showSidebar: z161.boolean(),
|
|
4452
|
+
isPrivate: z161.boolean(),
|
|
4453
|
+
isHidden: z161.boolean(),
|
|
4342
4454
|
header: DTODocumentationItemHeaderV1
|
|
4343
4455
|
});
|
|
4344
4456
|
|
|
@@ -4352,130 +4464,130 @@ var DTODocumentationGroupStructureV1 = ElementGroup.omit({
|
|
|
4352
4464
|
data: true,
|
|
4353
4465
|
shortPersistentId: true
|
|
4354
4466
|
}).extend({
|
|
4355
|
-
title:
|
|
4356
|
-
isRoot:
|
|
4357
|
-
childrenIds:
|
|
4467
|
+
title: z162.string(),
|
|
4468
|
+
isRoot: z162.boolean(),
|
|
4469
|
+
childrenIds: z162.array(z162.string()),
|
|
4358
4470
|
groupBehavior: DocumentationGroupBehavior,
|
|
4359
|
-
shortPersistentId:
|
|
4360
|
-
type:
|
|
4471
|
+
shortPersistentId: z162.string(),
|
|
4472
|
+
type: z162.literal("Group")
|
|
4361
4473
|
});
|
|
4362
4474
|
var DTODocumentationGroupV1 = DTODocumentationGroupStructureV1.extend({
|
|
4363
4475
|
configuration: DTODocumentationItemConfigurationV1
|
|
4364
4476
|
});
|
|
4365
4477
|
|
|
4366
4478
|
// src/api/dto/elements/documentation/page-actions-v2.ts
|
|
4367
|
-
import { z as
|
|
4479
|
+
import { z as z164 } from "zod";
|
|
4368
4480
|
|
|
4369
4481
|
// src/api/dto/elements/documentation/page-v2.ts
|
|
4370
|
-
import { z as
|
|
4482
|
+
import { z as z163 } from "zod";
|
|
4371
4483
|
var DTODocumentationPageV2 = DocumentationPageV2.omit({
|
|
4372
4484
|
data: true,
|
|
4373
4485
|
meta: true,
|
|
4374
4486
|
parentPersistentId: true,
|
|
4375
4487
|
sortOrder: true
|
|
4376
4488
|
}).extend({
|
|
4377
|
-
title:
|
|
4378
|
-
path:
|
|
4379
|
-
type:
|
|
4489
|
+
title: z163.string(),
|
|
4490
|
+
path: z163.string(),
|
|
4491
|
+
type: z163.literal("Page"),
|
|
4380
4492
|
configuration: DTODocumentationItemConfigurationV2
|
|
4381
4493
|
});
|
|
4382
4494
|
var DTODocumentationPageStructureV2 = DTODocumentationPageV2;
|
|
4383
|
-
var DTODocumentationHierarchyV2 =
|
|
4384
|
-
pages:
|
|
4385
|
-
groups:
|
|
4495
|
+
var DTODocumentationHierarchyV2 = z163.object({
|
|
4496
|
+
pages: z163.array(DTODocumentationPageStructureV2),
|
|
4497
|
+
groups: z163.array(DTODocumentationGroupStructureV2)
|
|
4386
4498
|
});
|
|
4387
|
-
var DTOCreateDocumentationPageInputV2 =
|
|
4499
|
+
var DTOCreateDocumentationPageInputV2 = z163.object({
|
|
4388
4500
|
// Identifier
|
|
4389
|
-
persistentId:
|
|
4501
|
+
persistentId: z163.string().uuid(),
|
|
4390
4502
|
// Page properties
|
|
4391
|
-
title:
|
|
4503
|
+
title: z163.string(),
|
|
4392
4504
|
configuration: DTODocumentationItemConfigurationV2.optional(),
|
|
4393
4505
|
// Page placement properties
|
|
4394
|
-
parentPersistentId:
|
|
4395
|
-
afterPersistentId:
|
|
4506
|
+
parentPersistentId: z163.string().uuid(),
|
|
4507
|
+
afterPersistentId: z163.string().uuid().nullish()
|
|
4396
4508
|
});
|
|
4397
|
-
var DTOUpdateDocumentationPageInputV2 =
|
|
4509
|
+
var DTOUpdateDocumentationPageInputV2 = z163.object({
|
|
4398
4510
|
// Identifier of the group to update
|
|
4399
|
-
id:
|
|
4511
|
+
id: z163.string(),
|
|
4400
4512
|
// Page properties
|
|
4401
|
-
title:
|
|
4513
|
+
title: z163.string().optional(),
|
|
4402
4514
|
configuration: DTODocumentationItemConfigurationV2.partial().optional()
|
|
4403
4515
|
});
|
|
4404
|
-
var DTOMoveDocumentationPageInputV2 =
|
|
4516
|
+
var DTOMoveDocumentationPageInputV2 = z163.object({
|
|
4405
4517
|
// Identifier of the group to update
|
|
4406
|
-
id:
|
|
4518
|
+
id: z163.string(),
|
|
4407
4519
|
// Page placement properties
|
|
4408
|
-
parentPersistentId:
|
|
4409
|
-
afterPersistentId:
|
|
4520
|
+
parentPersistentId: z163.string().uuid(),
|
|
4521
|
+
afterPersistentId: z163.string().uuid().nullish()
|
|
4410
4522
|
});
|
|
4411
|
-
var DTODuplicateDocumentationPageInputV2 =
|
|
4523
|
+
var DTODuplicateDocumentationPageInputV2 = z163.object({
|
|
4412
4524
|
// Identifier of the page to duplicate from
|
|
4413
|
-
id:
|
|
4525
|
+
id: z163.string(),
|
|
4414
4526
|
// New page persistent id
|
|
4415
|
-
persistentId:
|
|
4527
|
+
persistentId: z163.string().uuid(),
|
|
4416
4528
|
// Page placement properties
|
|
4417
|
-
parentPersistentId:
|
|
4418
|
-
afterPersistentId:
|
|
4529
|
+
parentPersistentId: z163.string().uuid(),
|
|
4530
|
+
afterPersistentId: z163.string().uuid().nullish()
|
|
4419
4531
|
});
|
|
4420
|
-
var DTODeleteDocumentationPageInputV2 =
|
|
4532
|
+
var DTODeleteDocumentationPageInputV2 = z163.object({
|
|
4421
4533
|
// Identifier
|
|
4422
|
-
id:
|
|
4534
|
+
id: z163.string()
|
|
4423
4535
|
});
|
|
4424
4536
|
|
|
4425
4537
|
// src/api/dto/elements/documentation/page-actions-v2.ts
|
|
4426
|
-
var SuccessPayload2 =
|
|
4427
|
-
success:
|
|
4538
|
+
var SuccessPayload2 = z164.object({
|
|
4539
|
+
success: z164.literal(true)
|
|
4428
4540
|
});
|
|
4429
|
-
var DTODocumentationPageCreateActionOutputV2 =
|
|
4430
|
-
type:
|
|
4541
|
+
var DTODocumentationPageCreateActionOutputV2 = z164.object({
|
|
4542
|
+
type: z164.literal("DocumentationPageCreate"),
|
|
4431
4543
|
output: SuccessPayload2
|
|
4432
4544
|
});
|
|
4433
|
-
var DTODocumentationPageUpdateActionOutputV2 =
|
|
4434
|
-
type:
|
|
4545
|
+
var DTODocumentationPageUpdateActionOutputV2 = z164.object({
|
|
4546
|
+
type: z164.literal("DocumentationPageUpdate"),
|
|
4435
4547
|
output: SuccessPayload2
|
|
4436
4548
|
});
|
|
4437
|
-
var DTODocumentationPageMoveActionOutputV2 =
|
|
4438
|
-
type:
|
|
4549
|
+
var DTODocumentationPageMoveActionOutputV2 = z164.object({
|
|
4550
|
+
type: z164.literal("DocumentationPageMove"),
|
|
4439
4551
|
output: SuccessPayload2
|
|
4440
4552
|
});
|
|
4441
|
-
var DTODocumentationPageDuplicateActionOutputV2 =
|
|
4442
|
-
type:
|
|
4553
|
+
var DTODocumentationPageDuplicateActionOutputV2 = z164.object({
|
|
4554
|
+
type: z164.literal("DocumentationPageDuplicate"),
|
|
4443
4555
|
output: SuccessPayload2
|
|
4444
4556
|
});
|
|
4445
|
-
var DTODocumentationPageDeleteActionOutputV2 =
|
|
4446
|
-
type:
|
|
4557
|
+
var DTODocumentationPageDeleteActionOutputV2 = z164.object({
|
|
4558
|
+
type: z164.literal("DocumentationPageDelete"),
|
|
4447
4559
|
output: SuccessPayload2
|
|
4448
4560
|
});
|
|
4449
|
-
var DTODocumentationPageCreateActionInputV2 =
|
|
4450
|
-
type:
|
|
4561
|
+
var DTODocumentationPageCreateActionInputV2 = z164.object({
|
|
4562
|
+
type: z164.literal("DocumentationPageCreate"),
|
|
4451
4563
|
input: DTOCreateDocumentationPageInputV2
|
|
4452
4564
|
});
|
|
4453
|
-
var DTODocumentationPageUpdateActionInputV2 =
|
|
4454
|
-
type:
|
|
4565
|
+
var DTODocumentationPageUpdateActionInputV2 = z164.object({
|
|
4566
|
+
type: z164.literal("DocumentationPageUpdate"),
|
|
4455
4567
|
input: DTOUpdateDocumentationPageInputV2
|
|
4456
4568
|
});
|
|
4457
|
-
var DTODocumentationPageMoveActionInputV2 =
|
|
4458
|
-
type:
|
|
4569
|
+
var DTODocumentationPageMoveActionInputV2 = z164.object({
|
|
4570
|
+
type: z164.literal("DocumentationPageMove"),
|
|
4459
4571
|
input: DTOMoveDocumentationPageInputV2
|
|
4460
4572
|
});
|
|
4461
|
-
var DTODocumentationPageDuplicateActionInputV2 =
|
|
4462
|
-
type:
|
|
4573
|
+
var DTODocumentationPageDuplicateActionInputV2 = z164.object({
|
|
4574
|
+
type: z164.literal("DocumentationPageDuplicate"),
|
|
4463
4575
|
input: DTODuplicateDocumentationPageInputV2
|
|
4464
4576
|
});
|
|
4465
|
-
var DTODocumentationPageDeleteActionInputV2 =
|
|
4466
|
-
type:
|
|
4577
|
+
var DTODocumentationPageDeleteActionInputV2 = z164.object({
|
|
4578
|
+
type: z164.literal("DocumentationPageDelete"),
|
|
4467
4579
|
input: DTODeleteDocumentationPageInputV2
|
|
4468
4580
|
});
|
|
4469
4581
|
|
|
4470
4582
|
// src/api/dto/elements/documentation/page-content.ts
|
|
4471
|
-
import { z as
|
|
4583
|
+
import { z as z165 } from "zod";
|
|
4472
4584
|
var DTODocumentationPageContent = DocumentationPageContent;
|
|
4473
|
-
var DTODocumentationPageContentGetResponse =
|
|
4585
|
+
var DTODocumentationPageContentGetResponse = z165.object({
|
|
4474
4586
|
pageContent: DTODocumentationPageContent
|
|
4475
4587
|
});
|
|
4476
4588
|
|
|
4477
4589
|
// src/api/dto/elements/documentation/page-v1.ts
|
|
4478
|
-
import { z as
|
|
4590
|
+
import { z as z166 } from "zod";
|
|
4479
4591
|
var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
4480
4592
|
data: true,
|
|
4481
4593
|
meta: true,
|
|
@@ -4483,130 +4595,130 @@ var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
|
4483
4595
|
sortOrder: true
|
|
4484
4596
|
}).extend({
|
|
4485
4597
|
configuration: DTODocumentationItemConfigurationV1,
|
|
4486
|
-
blocks:
|
|
4487
|
-
title:
|
|
4488
|
-
path:
|
|
4598
|
+
blocks: z166.array(PageBlockV1),
|
|
4599
|
+
title: z166.string(),
|
|
4600
|
+
path: z166.string()
|
|
4489
4601
|
});
|
|
4490
4602
|
|
|
4491
4603
|
// src/api/dto/elements/figma-nodes/figma-node.ts
|
|
4492
|
-
import { z as
|
|
4493
|
-
var DTOFigmaNodeData =
|
|
4604
|
+
import { z as z167 } from "zod";
|
|
4605
|
+
var DTOFigmaNodeData = z167.object({
|
|
4494
4606
|
// Id of the node in the Figma file
|
|
4495
|
-
figmaNodeId:
|
|
4607
|
+
figmaNodeId: z167.string(),
|
|
4496
4608
|
// Validity
|
|
4497
|
-
isValid:
|
|
4609
|
+
isValid: z167.boolean(),
|
|
4498
4610
|
// Asset data
|
|
4499
|
-
assetId:
|
|
4500
|
-
assetUrl:
|
|
4611
|
+
assetId: z167.string(),
|
|
4612
|
+
assetUrl: z167.string(),
|
|
4501
4613
|
// Asset metadata
|
|
4502
|
-
assetScale:
|
|
4503
|
-
assetWidth:
|
|
4504
|
-
assetHeight:
|
|
4614
|
+
assetScale: z167.number(),
|
|
4615
|
+
assetWidth: z167.number().optional(),
|
|
4616
|
+
assetHeight: z167.number().optional()
|
|
4505
4617
|
});
|
|
4506
4618
|
var DTOFigmaNode = FigmaFileStructure.omit({
|
|
4507
4619
|
data: true
|
|
4508
4620
|
}).extend({
|
|
4509
4621
|
data: DTOFigmaNodeData
|
|
4510
4622
|
});
|
|
4511
|
-
var DTOFigmaNodeRenderInput =
|
|
4623
|
+
var DTOFigmaNodeRenderInput = z167.object({
|
|
4512
4624
|
// Id of a design system's data source representing a linked Figma file
|
|
4513
|
-
sourceId:
|
|
4625
|
+
sourceId: z167.string(),
|
|
4514
4626
|
// Id of a node within the Figma file
|
|
4515
|
-
figmaFileNodeId:
|
|
4627
|
+
figmaFileNodeId: z167.string()
|
|
4516
4628
|
});
|
|
4517
4629
|
|
|
4518
4630
|
// src/api/dto/elements/figma-nodes/node-actions-v2.ts
|
|
4519
|
-
import { z as
|
|
4520
|
-
var DTOFigmaNodeRenderActionOutput =
|
|
4521
|
-
type:
|
|
4522
|
-
figmaNodes:
|
|
4631
|
+
import { z as z168 } from "zod";
|
|
4632
|
+
var DTOFigmaNodeRenderActionOutput = z168.object({
|
|
4633
|
+
type: z168.literal("FigmaNodeRender"),
|
|
4634
|
+
figmaNodes: z168.array(DTOFigmaNode)
|
|
4523
4635
|
});
|
|
4524
|
-
var DTOFigmaNodeRenderActionInput =
|
|
4525
|
-
type:
|
|
4636
|
+
var DTOFigmaNodeRenderActionInput = z168.object({
|
|
4637
|
+
type: z168.literal("FigmaNodeRender"),
|
|
4526
4638
|
input: DTOFigmaNodeRenderInput.array()
|
|
4527
4639
|
});
|
|
4528
4640
|
|
|
4529
4641
|
// src/api/dto/elements/properties/property-definitions-actions-v2.ts
|
|
4530
|
-
import { z as
|
|
4642
|
+
import { z as z170 } from "zod";
|
|
4531
4643
|
|
|
4532
4644
|
// src/api/dto/elements/properties/property-definitions.ts
|
|
4533
|
-
import { z as
|
|
4645
|
+
import { z as z169 } from "zod";
|
|
4534
4646
|
var CODE_NAME_REGEX2 = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
4535
|
-
var DTOElementPropertyDefinition =
|
|
4536
|
-
id:
|
|
4537
|
-
designSystemVersionId:
|
|
4647
|
+
var DTOElementPropertyDefinition = z169.object({
|
|
4648
|
+
id: z169.string(),
|
|
4649
|
+
designSystemVersionId: z169.string(),
|
|
4538
4650
|
meta: ObjectMeta,
|
|
4539
|
-
persistentId:
|
|
4651
|
+
persistentId: z169.string(),
|
|
4540
4652
|
type: ElementPropertyTypeSchema,
|
|
4541
4653
|
targetElementType: ElementPropertyTargetType,
|
|
4542
|
-
codeName:
|
|
4543
|
-
options:
|
|
4654
|
+
codeName: z169.string().regex(CODE_NAME_REGEX2),
|
|
4655
|
+
options: z169.array(ElementPropertyDefinitionOption).optional(),
|
|
4544
4656
|
linkElementType: ElementPropertyLinkType.optional()
|
|
4545
4657
|
});
|
|
4546
|
-
var DTOElementPropertyDefinitionsGetResponse =
|
|
4547
|
-
definitions:
|
|
4658
|
+
var DTOElementPropertyDefinitionsGetResponse = z169.object({
|
|
4659
|
+
definitions: z169.array(DTOElementPropertyDefinition)
|
|
4548
4660
|
});
|
|
4549
4661
|
var DTOCreateElementPropertyDefinitionInputV2 = DTOElementPropertyDefinition.omit({
|
|
4550
4662
|
id: true,
|
|
4551
4663
|
designSystemVersionId: true
|
|
4552
4664
|
});
|
|
4553
|
-
var DTOUpdateElementPropertyDefinitionInputV2 =
|
|
4554
|
-
id:
|
|
4555
|
-
name:
|
|
4556
|
-
description:
|
|
4557
|
-
codeName:
|
|
4558
|
-
options:
|
|
4665
|
+
var DTOUpdateElementPropertyDefinitionInputV2 = z169.object({
|
|
4666
|
+
id: z169.string(),
|
|
4667
|
+
name: z169.string().optional(),
|
|
4668
|
+
description: z169.string().optional(),
|
|
4669
|
+
codeName: z169.string().regex(CODE_NAME_REGEX2).optional(),
|
|
4670
|
+
options: z169.array(ElementPropertyDefinitionOption).optional()
|
|
4559
4671
|
});
|
|
4560
|
-
var DTODeleteElementPropertyDefinitionInputV2 =
|
|
4561
|
-
id:
|
|
4672
|
+
var DTODeleteElementPropertyDefinitionInputV2 = z169.object({
|
|
4673
|
+
id: z169.string()
|
|
4562
4674
|
});
|
|
4563
4675
|
|
|
4564
4676
|
// src/api/dto/elements/properties/property-definitions-actions-v2.ts
|
|
4565
|
-
var SuccessPayload3 =
|
|
4566
|
-
success:
|
|
4677
|
+
var SuccessPayload3 = z170.object({
|
|
4678
|
+
success: z170.literal(true)
|
|
4567
4679
|
});
|
|
4568
|
-
var DTOPropertyDefinitionCreateActionOutputV2 =
|
|
4569
|
-
type:
|
|
4680
|
+
var DTOPropertyDefinitionCreateActionOutputV2 = z170.object({
|
|
4681
|
+
type: z170.literal("PropertyDefinitionCreate"),
|
|
4570
4682
|
definition: DTOElementPropertyDefinition
|
|
4571
4683
|
});
|
|
4572
|
-
var DTOPropertyDefinitionUpdateActionOutputV2 =
|
|
4573
|
-
type:
|
|
4684
|
+
var DTOPropertyDefinitionUpdateActionOutputV2 = z170.object({
|
|
4685
|
+
type: z170.literal("PropertyDefinitionUpdate"),
|
|
4574
4686
|
definition: DTOElementPropertyDefinition
|
|
4575
4687
|
});
|
|
4576
|
-
var DTOPropertyDefinitionDeleteActionOutputV2 =
|
|
4577
|
-
type:
|
|
4688
|
+
var DTOPropertyDefinitionDeleteActionOutputV2 = z170.object({
|
|
4689
|
+
type: z170.literal("PropertyDefinitionDelete"),
|
|
4578
4690
|
output: SuccessPayload3
|
|
4579
4691
|
});
|
|
4580
|
-
var DTOPropertyDefinitionCreateActionInputV2 =
|
|
4581
|
-
type:
|
|
4692
|
+
var DTOPropertyDefinitionCreateActionInputV2 = z170.object({
|
|
4693
|
+
type: z170.literal("PropertyDefinitionCreate"),
|
|
4582
4694
|
input: DTOCreateElementPropertyDefinitionInputV2
|
|
4583
4695
|
});
|
|
4584
|
-
var DTOPropertyDefinitionUpdateActionInputV2 =
|
|
4585
|
-
type:
|
|
4696
|
+
var DTOPropertyDefinitionUpdateActionInputV2 = z170.object({
|
|
4697
|
+
type: z170.literal("PropertyDefinitionUpdate"),
|
|
4586
4698
|
input: DTOUpdateElementPropertyDefinitionInputV2
|
|
4587
4699
|
});
|
|
4588
|
-
var DTOPropertyDefinitionDeleteActionInputV2 =
|
|
4589
|
-
type:
|
|
4700
|
+
var DTOPropertyDefinitionDeleteActionInputV2 = z170.object({
|
|
4701
|
+
type: z170.literal("PropertyDefinitionDelete"),
|
|
4590
4702
|
input: DTODeleteElementPropertyDefinitionInputV2
|
|
4591
4703
|
});
|
|
4592
4704
|
|
|
4593
4705
|
// src/api/dto/elements/properties/property-values.ts
|
|
4594
|
-
import { z as
|
|
4595
|
-
var DTOElementPropertyValue =
|
|
4596
|
-
id:
|
|
4597
|
-
designSystemVersionId:
|
|
4598
|
-
definitionId:
|
|
4599
|
-
targetElementId:
|
|
4600
|
-
value:
|
|
4601
|
-
valuePreview:
|
|
4706
|
+
import { z as z171 } from "zod";
|
|
4707
|
+
var DTOElementPropertyValue = z171.object({
|
|
4708
|
+
id: z171.string(),
|
|
4709
|
+
designSystemVersionId: z171.string(),
|
|
4710
|
+
definitionId: z171.string(),
|
|
4711
|
+
targetElementId: z171.string(),
|
|
4712
|
+
value: z171.union([z171.string(), z171.number(), z171.boolean()]).optional(),
|
|
4713
|
+
valuePreview: z171.string().optional()
|
|
4602
4714
|
});
|
|
4603
|
-
var DTOElementPropertyValuesGetResponse =
|
|
4604
|
-
values:
|
|
4715
|
+
var DTOElementPropertyValuesGetResponse = z171.object({
|
|
4716
|
+
values: z171.array(DTOElementPropertyValue)
|
|
4605
4717
|
});
|
|
4606
4718
|
|
|
4607
4719
|
// src/api/dto/elements/elements-action-v2.ts
|
|
4608
|
-
import { z as
|
|
4609
|
-
var DTOElementActionOutput =
|
|
4720
|
+
import { z as z172 } from "zod";
|
|
4721
|
+
var DTOElementActionOutput = z172.discriminatedUnion("type", [
|
|
4610
4722
|
// Documentation pages
|
|
4611
4723
|
DTODocumentationPageCreateActionOutputV2,
|
|
4612
4724
|
DTODocumentationPageUpdateActionOutputV2,
|
|
@@ -4628,7 +4740,7 @@ var DTOElementActionOutput = z166.discriminatedUnion("type", [
|
|
|
4628
4740
|
DTOPropertyDefinitionUpdateActionOutputV2,
|
|
4629
4741
|
DTOPropertyDefinitionDeleteActionOutputV2
|
|
4630
4742
|
]);
|
|
4631
|
-
var DTOElementActionInput =
|
|
4743
|
+
var DTOElementActionInput = z172.discriminatedUnion("type", [
|
|
4632
4744
|
// Documentation pages
|
|
4633
4745
|
DTODocumentationPageCreateActionInputV2,
|
|
4634
4746
|
DTODocumentationPageUpdateActionInputV2,
|
|
@@ -4652,72 +4764,72 @@ var DTOElementActionInput = z166.discriminatedUnion("type", [
|
|
|
4652
4764
|
]);
|
|
4653
4765
|
|
|
4654
4766
|
// src/api/dto/elements/get-elements-v2.ts
|
|
4655
|
-
import { z as
|
|
4656
|
-
var DTOElementsGetTypeFilter =
|
|
4657
|
-
var DTOElementsGetQuerySchema =
|
|
4658
|
-
types:
|
|
4767
|
+
import { z as z173 } from "zod";
|
|
4768
|
+
var DTOElementsGetTypeFilter = z173.enum(["FigmaNode"]);
|
|
4769
|
+
var DTOElementsGetQuerySchema = z173.object({
|
|
4770
|
+
types: z173.string().transform((val) => val.split(",").map((v) => DTOElementsGetTypeFilter.parse(v)))
|
|
4659
4771
|
});
|
|
4660
|
-
var DTOElementsGetOutput =
|
|
4661
|
-
figmaNodes:
|
|
4772
|
+
var DTOElementsGetOutput = z173.object({
|
|
4773
|
+
figmaNodes: z173.array(DTOFigmaNode).optional()
|
|
4662
4774
|
});
|
|
4663
4775
|
|
|
4664
4776
|
// src/api/dto/workspaces/integrations.ts
|
|
4665
|
-
import { z as
|
|
4666
|
-
var DTOIntegration =
|
|
4667
|
-
id:
|
|
4668
|
-
workspaceId:
|
|
4777
|
+
import { z as z174 } from "zod";
|
|
4778
|
+
var DTOIntegration = z174.object({
|
|
4779
|
+
id: z174.string(),
|
|
4780
|
+
workspaceId: z174.string(),
|
|
4669
4781
|
type: IntegrationType,
|
|
4670
|
-
createdAt:
|
|
4671
|
-
integrationCredentials:
|
|
4782
|
+
createdAt: z174.coerce.date(),
|
|
4783
|
+
integrationCredentials: z174.array(IntegrationCredentials).optional()
|
|
4672
4784
|
});
|
|
4673
|
-
var DTOIntegrationOAuthGetResponse =
|
|
4674
|
-
url:
|
|
4785
|
+
var DTOIntegrationOAuthGetResponse = z174.object({
|
|
4786
|
+
url: z174.string()
|
|
4675
4787
|
});
|
|
4676
|
-
var DTOIntegrationPostResponse =
|
|
4788
|
+
var DTOIntegrationPostResponse = z174.object({
|
|
4677
4789
|
integration: DTOIntegration
|
|
4678
4790
|
});
|
|
4679
|
-
var DTOIntegrationsGetListResponse =
|
|
4791
|
+
var DTOIntegrationsGetListResponse = z174.object({
|
|
4680
4792
|
integrations: DTOIntegration.array()
|
|
4681
4793
|
});
|
|
4682
4794
|
|
|
4683
4795
|
// src/api/dto/workspaces/membership.ts
|
|
4684
|
-
import { z as
|
|
4796
|
+
import { z as z177 } from "zod";
|
|
4685
4797
|
|
|
4686
4798
|
// src/api/dto/workspaces/workspace.ts
|
|
4687
|
-
import { z as
|
|
4799
|
+
import { z as z176 } from "zod";
|
|
4688
4800
|
|
|
4689
4801
|
// src/api/dto/workspaces/npm-registry.ts
|
|
4690
|
-
import { z as
|
|
4691
|
-
var DTONpmRegistryConfig =
|
|
4802
|
+
import { z as z175 } from "zod";
|
|
4803
|
+
var DTONpmRegistryConfig = z175.object({
|
|
4692
4804
|
// Registry basic configuration
|
|
4693
4805
|
registryType: NpmRegistryType,
|
|
4694
|
-
registryUrl:
|
|
4695
|
-
customRegistryUrl:
|
|
4806
|
+
registryUrl: z175.string(),
|
|
4807
|
+
customRegistryUrl: z175.string().optional(),
|
|
4696
4808
|
// URL of Supernova NPM packages proxy
|
|
4697
|
-
proxyUrl:
|
|
4809
|
+
proxyUrl: z175.string(),
|
|
4698
4810
|
// Auth configuration
|
|
4699
4811
|
authType: NpmRegistryAuthType,
|
|
4700
|
-
accessToken:
|
|
4701
|
-
username:
|
|
4702
|
-
password:
|
|
4812
|
+
accessToken: z175.literal("redacted").optional(),
|
|
4813
|
+
username: z175.string().optional(),
|
|
4814
|
+
password: z175.literal("redacted").optional(),
|
|
4703
4815
|
// NPM package scopes for whih the proxy should be enabled
|
|
4704
|
-
enabledScopes:
|
|
4816
|
+
enabledScopes: z175.array(z175.string()),
|
|
4705
4817
|
// True if client should bypass Supernova proxy and connect directly to the registry
|
|
4706
4818
|
// (e.g. when the NPM registry is behind a VPN or firewall which prevents Supernova from accessing it)
|
|
4707
|
-
bypassProxy:
|
|
4819
|
+
bypassProxy: z175.boolean()
|
|
4708
4820
|
});
|
|
4709
4821
|
|
|
4710
4822
|
// src/api/dto/workspaces/workspace.ts
|
|
4711
|
-
var DTOWorkspace =
|
|
4712
|
-
id:
|
|
4823
|
+
var DTOWorkspace = z176.object({
|
|
4824
|
+
id: z176.string(),
|
|
4713
4825
|
profile: WorkspaceProfile,
|
|
4714
4826
|
subscription: Subscription,
|
|
4715
4827
|
npmRegistry: DTONpmRegistryConfig.optional()
|
|
4716
4828
|
});
|
|
4717
4829
|
|
|
4718
4830
|
// src/api/dto/workspaces/membership.ts
|
|
4719
|
-
var DTOWorkspaceRole =
|
|
4720
|
-
var DTOUserWorkspaceMembership =
|
|
4831
|
+
var DTOWorkspaceRole = z177.enum(["Owner", "Admin", "Creator", "Viewer", "Billing"]);
|
|
4832
|
+
var DTOUserWorkspaceMembership = z177.object({
|
|
4721
4833
|
// Workspace the user is a member of
|
|
4722
4834
|
workspace: DTOWorkspace,
|
|
4723
4835
|
// Assigned role the user has in the workspace
|
|
@@ -4727,95 +4839,8 @@ var DTOUserWorkspaceMembership = z171.object({
|
|
|
4727
4839
|
// when a workspace's subscription is downgraded to free tier
|
|
4728
4840
|
effectiveRole: DTOWorkspaceRole
|
|
4729
4841
|
});
|
|
4730
|
-
var DTOUserWorkspaceMembershipsResponse =
|
|
4731
|
-
membership:
|
|
4732
|
-
});
|
|
4733
|
-
|
|
4734
|
-
// src/api/payloads/design-systems/brand.ts
|
|
4735
|
-
import { z as z172 } from "zod";
|
|
4736
|
-
var DTOCreateBrandInput = z172.object({
|
|
4737
|
-
persistentId: z172.string().uuid(),
|
|
4738
|
-
meta: z172.object({
|
|
4739
|
-
name: z172.string(),
|
|
4740
|
-
description: z172.string()
|
|
4741
|
-
})
|
|
4742
|
-
});
|
|
4743
|
-
|
|
4744
|
-
// src/api/payloads/design-systems/version.ts
|
|
4745
|
-
import { z as z173 } from "zod";
|
|
4746
|
-
function validateSemver(version) {
|
|
4747
|
-
const semverRegex = /^(\d+)(\.\d+)?(\.\d+)?$/;
|
|
4748
|
-
return semverRegex.test(version);
|
|
4749
|
-
}
|
|
4750
|
-
var DTOCreateVersionInput = z173.object({
|
|
4751
|
-
meta: ObjectMeta,
|
|
4752
|
-
version: z173.string().refine(validateSemver, {
|
|
4753
|
-
message: "Invalid semantic versioning format"
|
|
4754
|
-
}),
|
|
4755
|
-
changeLog: z173.string()
|
|
4756
|
-
});
|
|
4757
|
-
|
|
4758
|
-
// src/api/payloads/documentation/block-definitions.ts
|
|
4759
|
-
import { z as z174 } from "zod";
|
|
4760
|
-
var DTOGetBlockDefinitionsOutput = z174.object({
|
|
4761
|
-
definitions: z174.array(PageBlockDefinition)
|
|
4762
|
-
});
|
|
4763
|
-
|
|
4764
|
-
// src/api/payloads/liveblocks/auth.ts
|
|
4765
|
-
import { z as z175 } from "zod";
|
|
4766
|
-
var DTOLiveblocksAuthRequest = z175.object({
|
|
4767
|
-
room: z175.string().optional()
|
|
4768
|
-
});
|
|
4769
|
-
|
|
4770
|
-
// src/api/payloads/workspaces/workspace-configuration.ts
|
|
4771
|
-
import { z as z176 } from "zod";
|
|
4772
|
-
var prohibitedSsoKeys = ["providerId", "metadataXml", "emailDomains"];
|
|
4773
|
-
function validateSsoPayload(ssoPayload) {
|
|
4774
|
-
const keys = [];
|
|
4775
|
-
let valid = true;
|
|
4776
|
-
if (!ssoPayload) {
|
|
4777
|
-
valid = true;
|
|
4778
|
-
return {
|
|
4779
|
-
valid,
|
|
4780
|
-
keys: []
|
|
4781
|
-
};
|
|
4782
|
-
}
|
|
4783
|
-
for (const key of Object.keys(ssoPayload)) {
|
|
4784
|
-
if (prohibitedSsoKeys.includes(key)) {
|
|
4785
|
-
keys.push(key);
|
|
4786
|
-
valid = false;
|
|
4787
|
-
}
|
|
4788
|
-
}
|
|
4789
|
-
return {
|
|
4790
|
-
valid,
|
|
4791
|
-
keys
|
|
4792
|
-
};
|
|
4793
|
-
}
|
|
4794
|
-
var NpmRegistryInput = z176.object({
|
|
4795
|
-
enabledScopes: z176.array(z176.string()),
|
|
4796
|
-
customRegistryUrl: z176.string().optional(),
|
|
4797
|
-
bypassProxy: z176.boolean().optional(),
|
|
4798
|
-
npmProxyRegistryConfigId: z176.string().optional(),
|
|
4799
|
-
npmProxyVersion: z176.number().optional(),
|
|
4800
|
-
registryType: z176.string(),
|
|
4801
|
-
authType: z176.string(),
|
|
4802
|
-
authHeaderName: z176.string(),
|
|
4803
|
-
authHeaderValue: z176.string(),
|
|
4804
|
-
accessToken: z176.string(),
|
|
4805
|
-
username: z176.string(),
|
|
4806
|
-
password: z176.string()
|
|
4807
|
-
});
|
|
4808
|
-
var WorkspaceConfigurationPayload = z176.object({
|
|
4809
|
-
ipWhitelist: WorkspaceIpSettings.partial().optional(),
|
|
4810
|
-
sso: SsoProvider.partial().optional(),
|
|
4811
|
-
npmRegistrySettings: NpmRegistryInput.partial().optional(),
|
|
4812
|
-
profile: WorkspaceProfile.partial().optional()
|
|
4813
|
-
});
|
|
4814
|
-
|
|
4815
|
-
// src/api/payloads/workspaces/workspace-integrations.ts
|
|
4816
|
-
import { z as z177 } from "zod";
|
|
4817
|
-
var DTOWorkspaceIntegrationOauthInput = z177.object({
|
|
4818
|
-
type: IntegrationType
|
|
4842
|
+
var DTOUserWorkspaceMembershipsResponse = z177.object({
|
|
4843
|
+
membership: z177.array(DTOUserWorkspaceMembership)
|
|
4819
4844
|
});
|
|
4820
4845
|
|
|
4821
4846
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
@@ -5711,6 +5736,9 @@ var BlockDefinitionUtils = {
|
|
|
5711
5736
|
|
|
5712
5737
|
// src/yjs/docs-editor/list-tree-builder.ts
|
|
5713
5738
|
var ListTreeBuilder = class {
|
|
5739
|
+
constructor() {
|
|
5740
|
+
__publicField(this, "rootNode");
|
|
5741
|
+
}
|
|
5714
5742
|
addWithProperty(block, multiRichTextProperty) {
|
|
5715
5743
|
const parsedOptions = PageBlockDefinitionMutiRichTextOptions.optional().parse(multiRichTextProperty.options);
|
|
5716
5744
|
return this.add(block, multiRichTextProperty.id, parsedOptions?.multiRichTextStyle || "OL");
|
|
@@ -8556,6 +8584,7 @@ export {
|
|
|
8556
8584
|
DTODeleteElementPropertyDefinitionInputV2,
|
|
8557
8585
|
DTODesignSystem,
|
|
8558
8586
|
DTODesignSystemVersion,
|
|
8587
|
+
DTODesignSystemVersionCreationResponse,
|
|
8559
8588
|
DTODesignSystemVersionGetResponse,
|
|
8560
8589
|
DTODesignSystemVersionsListResponse,
|
|
8561
8590
|
DTODocumentationGroupCreateActionInputV2,
|
|
@@ -8647,35 +8676,39 @@ export {
|
|
|
8647
8676
|
DTOUserWorkspaceMembershipsResponse,
|
|
8648
8677
|
DTOWorkspace,
|
|
8649
8678
|
DTOWorkspaceIntegrationOauthInput,
|
|
8679
|
+
DTOWorkspaceIntegrationPATInput,
|
|
8650
8680
|
DTOWorkspaceRole,
|
|
8651
8681
|
DocumentationHierarchySettings,
|
|
8652
8682
|
DocumentationPageEditorModel,
|
|
8653
8683
|
DocumentationPageV1DTO,
|
|
8654
8684
|
ListTreeBuilder,
|
|
8655
8685
|
NpmRegistryInput,
|
|
8686
|
+
ObjectMeta2 as ObjectMeta,
|
|
8656
8687
|
PageBlockEditorModel,
|
|
8657
8688
|
PageSectionEditorModel,
|
|
8689
|
+
VersionSQSPayload,
|
|
8658
8690
|
WorkspaceConfigurationPayload,
|
|
8691
|
+
applyPrivacyConfigurationToNestedItems,
|
|
8659
8692
|
blockToProsemirrorNode,
|
|
8660
8693
|
buildDocPagePublishPaths,
|
|
8661
8694
|
calculateElementParentChain,
|
|
8662
|
-
designSystemBrandToDto,
|
|
8663
|
-
designSystemVersionToDto,
|
|
8664
8695
|
documentationElementsToHierarchyDto,
|
|
8665
8696
|
documentationHierarchyToYjs,
|
|
8666
8697
|
documentationItemConfigurationToDTOV1,
|
|
8667
8698
|
documentationItemConfigurationToDTOV2,
|
|
8699
|
+
documentationPagesFixedConfigurationToDTOV1,
|
|
8700
|
+
documentationPagesFixedConfigurationToDTOV2,
|
|
8668
8701
|
documentationPagesToDTOV1,
|
|
8669
8702
|
documentationPagesToDTOV2,
|
|
8670
8703
|
documentationPagesToStructureDTOV2,
|
|
8671
|
-
dtoDefaultItemConfigurationV1,
|
|
8672
8704
|
elementGroupsToDocumentationGroupDTOV1,
|
|
8673
8705
|
elementGroupsToDocumentationGroupDTOV2,
|
|
8706
|
+
elementGroupsToDocumentationGroupFixedConfigurationDTOV1,
|
|
8707
|
+
elementGroupsToDocumentationGroupFixedConfigurationDTOV2,
|
|
8674
8708
|
elementGroupsToDocumentationGroupStructureDTOV1,
|
|
8675
8709
|
elementGroupsToDocumentationGroupStructureDTOV2,
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
elementViewToDto,
|
|
8710
|
+
getDtoDefaultItemConfigurationV1,
|
|
8711
|
+
getDtoDefaultItemConfigurationV2,
|
|
8679
8712
|
getMockPageBlockDefinitions,
|
|
8680
8713
|
integrationToDto,
|
|
8681
8714
|
itemConfigurationToYjs,
|