@supernova-studio/client 0.46.4 → 0.46.6
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 +144 -0
- package/dist/index.d.ts +144 -0
- package/dist/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +547 -533
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/conversion/integrations/integration.ts +7 -0
package/dist/index.mjs
CHANGED
|
@@ -135,17 +135,17 @@ import { z as z125 } from "zod";
|
|
|
135
135
|
import { z as z123 } from "zod";
|
|
136
136
|
import { z as z124 } from "zod";
|
|
137
137
|
import { z as z126 } from "zod";
|
|
138
|
-
import { z as
|
|
138
|
+
import { z as z134 } from "zod";
|
|
139
139
|
import { z as z127 } from "zod";
|
|
140
140
|
import { z as z128 } from "zod";
|
|
141
141
|
import { z as z129 } from "zod";
|
|
142
142
|
import { z as z130 } from "zod";
|
|
143
143
|
import { z as z131 } from "zod";
|
|
144
144
|
import { z as z132 } from "zod";
|
|
145
|
-
import { z as
|
|
146
|
-
import { z as z136 } from "zod";
|
|
145
|
+
import { z as z133 } from "zod";
|
|
147
146
|
import { z as z135 } from "zod";
|
|
148
147
|
import { z as z137 } from "zod";
|
|
148
|
+
import { z as z136 } from "zod";
|
|
149
149
|
import { z as z138 } from "zod";
|
|
150
150
|
import { z as z139 } from "zod";
|
|
151
151
|
import { z as z140 } from "zod";
|
|
@@ -156,6 +156,7 @@ import { z as z144 } from "zod";
|
|
|
156
156
|
import { z as z145 } from "zod";
|
|
157
157
|
import { z as z146 } from "zod";
|
|
158
158
|
import { z as z147 } from "zod";
|
|
159
|
+
import { z as z148 } from "zod";
|
|
159
160
|
import slugifyImplementation from "@sindresorhus/slugify";
|
|
160
161
|
var PluginOAuthRequestSchema = z.object({
|
|
161
162
|
id: z.string(),
|
|
@@ -2807,68 +2808,74 @@ var UserIdentity = z129.object({
|
|
|
2807
2808
|
id: z129.string(),
|
|
2808
2809
|
userId: z129.string()
|
|
2809
2810
|
});
|
|
2810
|
-
var
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2811
|
+
var UserMinified = z130.object({
|
|
2812
|
+
id: z130.string(),
|
|
2813
|
+
name: z130.string(),
|
|
2814
|
+
email: z130.string(),
|
|
2815
|
+
avatar: z130.string().optional()
|
|
2816
|
+
});
|
|
2817
|
+
var UserOnboardingDepartment = z131.enum(["Design", "Engineering", "Product", "Brand", "Other"]);
|
|
2818
|
+
var UserOnboardingJobLevel = z131.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
2819
|
+
var UserOnboarding = z131.object({
|
|
2820
|
+
companyName: z131.string().optional(),
|
|
2821
|
+
numberOfPeopleInOrg: z131.string().optional(),
|
|
2822
|
+
numberOfPeopleInDesignTeam: z131.string().optional(),
|
|
2816
2823
|
department: UserOnboardingDepartment.optional(),
|
|
2817
|
-
jobTitle:
|
|
2818
|
-
phase:
|
|
2824
|
+
jobTitle: z131.string().optional(),
|
|
2825
|
+
phase: z131.string().optional(),
|
|
2819
2826
|
jobLevel: UserOnboardingJobLevel.optional()
|
|
2820
2827
|
});
|
|
2821
|
-
var UserProfile =
|
|
2822
|
-
name:
|
|
2823
|
-
avatar:
|
|
2824
|
-
nickname:
|
|
2828
|
+
var UserProfile = z131.object({
|
|
2829
|
+
name: z131.string(),
|
|
2830
|
+
avatar: z131.string().optional(),
|
|
2831
|
+
nickname: z131.string().optional(),
|
|
2825
2832
|
onboarding: UserOnboarding.optional()
|
|
2826
2833
|
});
|
|
2827
|
-
var UserTest =
|
|
2828
|
-
id: z131.string(),
|
|
2829
|
-
email: z131.string()
|
|
2830
|
-
});
|
|
2831
|
-
var User = z132.object({
|
|
2834
|
+
var UserTest = z132.object({
|
|
2832
2835
|
id: z132.string(),
|
|
2833
|
-
email: z132.string()
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2836
|
+
email: z132.string()
|
|
2837
|
+
});
|
|
2838
|
+
var User = z133.object({
|
|
2839
|
+
id: z133.string(),
|
|
2840
|
+
email: z133.string(),
|
|
2841
|
+
emailVerified: z133.boolean(),
|
|
2842
|
+
createdAt: z133.coerce.date(),
|
|
2843
|
+
trialExpiresAt: z133.coerce.date().optional(),
|
|
2837
2844
|
profile: UserProfile,
|
|
2838
2845
|
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
2839
|
-
loggedOutAt:
|
|
2840
|
-
isProtected:
|
|
2846
|
+
loggedOutAt: z133.coerce.date().optional(),
|
|
2847
|
+
isProtected: z133.boolean()
|
|
2841
2848
|
});
|
|
2842
|
-
var NpmProxyToken =
|
|
2843
|
-
access:
|
|
2844
|
-
expiresAt:
|
|
2849
|
+
var NpmProxyToken = z134.object({
|
|
2850
|
+
access: z134.string(),
|
|
2851
|
+
expiresAt: z134.number()
|
|
2845
2852
|
});
|
|
2846
|
-
var SessionData =
|
|
2847
|
-
returnToUrl:
|
|
2853
|
+
var SessionData = z134.object({
|
|
2854
|
+
returnToUrl: z134.string().optional(),
|
|
2848
2855
|
npmProxyToken: NpmProxyToken.optional()
|
|
2849
2856
|
});
|
|
2850
|
-
var Session =
|
|
2851
|
-
id:
|
|
2852
|
-
expiresAt:
|
|
2853
|
-
userId:
|
|
2857
|
+
var Session = z134.object({
|
|
2858
|
+
id: z134.string(),
|
|
2859
|
+
expiresAt: z134.coerce.date(),
|
|
2860
|
+
userId: z134.string().nullable(),
|
|
2854
2861
|
data: SessionData
|
|
2855
2862
|
});
|
|
2856
|
-
var AuthTokens =
|
|
2857
|
-
access:
|
|
2858
|
-
refresh:
|
|
2863
|
+
var AuthTokens = z134.object({
|
|
2864
|
+
access: z134.string(),
|
|
2865
|
+
refresh: z134.string()
|
|
2859
2866
|
});
|
|
2860
|
-
var UserSession =
|
|
2867
|
+
var UserSession = z134.object({
|
|
2861
2868
|
session: Session,
|
|
2862
2869
|
user: User.nullable()
|
|
2863
2870
|
});
|
|
2864
|
-
var FlaggedFeature =
|
|
2865
|
-
var FeatureFlagMap =
|
|
2866
|
-
var FeatureFlag =
|
|
2867
|
-
id:
|
|
2871
|
+
var FlaggedFeature = z135.enum(["FigmaImporterV2", "ShadowOpacityOptional", "DisableImporter"]);
|
|
2872
|
+
var FeatureFlagMap = z135.record(FlaggedFeature, z135.boolean());
|
|
2873
|
+
var FeatureFlag = z135.object({
|
|
2874
|
+
id: z135.string(),
|
|
2868
2875
|
feature: FlaggedFeature,
|
|
2869
|
-
createdAt:
|
|
2870
|
-
enabled:
|
|
2871
|
-
designSystemId:
|
|
2876
|
+
createdAt: z135.coerce.date(),
|
|
2877
|
+
enabled: z135.boolean(),
|
|
2878
|
+
designSystemId: z135.string().optional()
|
|
2872
2879
|
});
|
|
2873
2880
|
var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
2874
2881
|
OAuthProviderNames2["Figma"] = "figma";
|
|
@@ -2878,43 +2885,44 @@ var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
|
2878
2885
|
OAuthProviderNames2["Bitbucket"] = "bitbucket";
|
|
2879
2886
|
return OAuthProviderNames2;
|
|
2880
2887
|
})(OAuthProviderNames || {});
|
|
2881
|
-
var OAuthProviderSchema =
|
|
2888
|
+
var OAuthProviderSchema = z136.nativeEnum(OAuthProviderNames);
|
|
2882
2889
|
var OAuthProvider = OAuthProviderSchema.enum;
|
|
2883
|
-
var ExternalOAuthRequest =
|
|
2884
|
-
id: z136.string(),
|
|
2885
|
-
provider: OAuthProviderSchema,
|
|
2886
|
-
userId: z136.string(),
|
|
2887
|
-
state: z136.string(),
|
|
2888
|
-
createdAt: z136.coerce.date()
|
|
2889
|
-
});
|
|
2890
|
-
var IntegrationDesignSystem = z137.object({
|
|
2891
|
-
designSystemId: z137.string(),
|
|
2892
|
-
brandId: z137.string(),
|
|
2893
|
-
title: z137.string().optional(),
|
|
2894
|
-
userId: z137.string().optional(),
|
|
2895
|
-
date: z137.coerce.date().optional()
|
|
2896
|
-
});
|
|
2897
|
-
var IntegrationCredentialsType = z137.enum(["OAuth2", "PAT", "GithubApp"]);
|
|
2898
|
-
var IntegrationCredentialsProfile = z137.object({
|
|
2890
|
+
var ExternalOAuthRequest = z137.object({
|
|
2899
2891
|
id: z137.string(),
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2892
|
+
provider: OAuthProviderSchema,
|
|
2893
|
+
userId: z137.string(),
|
|
2894
|
+
state: z137.string(),
|
|
2895
|
+
createdAt: z137.coerce.date()
|
|
2896
|
+
});
|
|
2897
|
+
var IntegrationDesignSystem = z138.object({
|
|
2898
|
+
designSystemId: z138.string(),
|
|
2899
|
+
brandId: z138.string(),
|
|
2900
|
+
title: z138.string().optional(),
|
|
2901
|
+
userId: z138.string().optional(),
|
|
2902
|
+
date: z138.coerce.date().optional()
|
|
2903
|
+
});
|
|
2904
|
+
var IntegrationCredentialsType = z138.enum(["OAuth2", "PAT", "GithubApp"]);
|
|
2905
|
+
var IntegrationCredentialsProfile = z138.object({
|
|
2906
|
+
id: z138.string(),
|
|
2907
|
+
email: z138.string().optional(),
|
|
2908
|
+
handle: z138.string().optional(),
|
|
2909
|
+
avatarUrl: z138.string().optional()
|
|
2903
2910
|
});
|
|
2904
|
-
var IntegrationCredentials =
|
|
2905
|
-
id:
|
|
2911
|
+
var IntegrationCredentials = z138.object({
|
|
2912
|
+
id: z138.string(),
|
|
2906
2913
|
type: IntegrationCredentialsType,
|
|
2907
|
-
integrationId:
|
|
2908
|
-
accessToken:
|
|
2909
|
-
userId:
|
|
2910
|
-
createdAt:
|
|
2911
|
-
refreshToken:
|
|
2912
|
-
tokenName:
|
|
2913
|
-
expiresAt:
|
|
2914
|
+
integrationId: z138.string(),
|
|
2915
|
+
accessToken: z138.string(),
|
|
2916
|
+
userId: z138.string(),
|
|
2917
|
+
createdAt: z138.coerce.date(),
|
|
2918
|
+
refreshToken: z138.string().optional(),
|
|
2919
|
+
tokenName: z138.string().optional(),
|
|
2920
|
+
expiresAt: z138.coerce.date().optional(),
|
|
2914
2921
|
profile: IntegrationCredentialsProfile.optional(),
|
|
2915
|
-
customUrl:
|
|
2922
|
+
customUrl: z138.string().optional(),
|
|
2923
|
+
user: UserMinified.optional()
|
|
2916
2924
|
});
|
|
2917
|
-
var ExtendedIntegrationType =
|
|
2925
|
+
var ExtendedIntegrationType = z138.enum([
|
|
2918
2926
|
"Figma",
|
|
2919
2927
|
"Github",
|
|
2920
2928
|
"Gitlab",
|
|
@@ -2924,25 +2932,25 @@ var ExtendedIntegrationType = z137.enum([
|
|
|
2924
2932
|
"FigmaVariablesPlugin"
|
|
2925
2933
|
]);
|
|
2926
2934
|
var IntegrationType = ExtendedIntegrationType.exclude(["TokenStudio", "FigmaVariablesPlugin"]);
|
|
2927
|
-
var Integration =
|
|
2928
|
-
id:
|
|
2929
|
-
workspaceId:
|
|
2935
|
+
var Integration = z138.object({
|
|
2936
|
+
id: z138.string(),
|
|
2937
|
+
workspaceId: z138.string(),
|
|
2930
2938
|
type: IntegrationType,
|
|
2931
|
-
createdAt:
|
|
2932
|
-
integrationCredentials:
|
|
2939
|
+
createdAt: z138.coerce.date(),
|
|
2940
|
+
integrationCredentials: z138.array(IntegrationCredentials).optional()
|
|
2933
2941
|
});
|
|
2934
2942
|
var forbiddenCustomUrldomainList = ["github.com", "gitlab.com", "bitbucket.org", "figma.com", "dev.azure.com"];
|
|
2935
|
-
var IntegrationTokenResponse =
|
|
2936
|
-
access_token:
|
|
2937
|
-
refresh_token:
|
|
2938
|
-
expires_in:
|
|
2939
|
-
token_type:
|
|
2940
|
-
token_name:
|
|
2941
|
-
token_azure_organization_name:
|
|
2943
|
+
var IntegrationTokenResponse = z138.object({
|
|
2944
|
+
access_token: z138.string(),
|
|
2945
|
+
refresh_token: z138.string().optional(),
|
|
2946
|
+
expires_in: z138.union([z138.number().optional(), z138.string().optional()]),
|
|
2947
|
+
token_type: z138.string().optional(),
|
|
2948
|
+
token_name: z138.string().optional(),
|
|
2949
|
+
token_azure_organization_name: z138.string().optional(),
|
|
2942
2950
|
// Azure only
|
|
2943
|
-
token_bitbucket_username:
|
|
2951
|
+
token_bitbucket_username: z138.string().optional(),
|
|
2944
2952
|
// Bitbucket only
|
|
2945
|
-
custom_url:
|
|
2953
|
+
custom_url: z138.string().optional().refine((value) => {
|
|
2946
2954
|
if (!value)
|
|
2947
2955
|
return true;
|
|
2948
2956
|
if (forbiddenCustomUrldomainList.some((domain) => value.includes(domain)))
|
|
@@ -2966,58 +2974,58 @@ var IntegrationTokenResponse = z137.object({
|
|
|
2966
2974
|
customUrl: data.custom_url
|
|
2967
2975
|
};
|
|
2968
2976
|
});
|
|
2969
|
-
var IntegrationTokenSchema =
|
|
2970
|
-
id: z138.string(),
|
|
2971
|
-
provider: OAuthProviderSchema,
|
|
2972
|
-
scope: z138.string(),
|
|
2973
|
-
userId: z138.string(),
|
|
2974
|
-
accessToken: z138.string(),
|
|
2975
|
-
refreshToken: z138.string(),
|
|
2976
|
-
expiresAt: z138.coerce.date(),
|
|
2977
|
-
externalUserId: z138.string().nullish()
|
|
2978
|
-
});
|
|
2979
|
-
var WorkspaceOAuthRequestSchema = z139.object({
|
|
2977
|
+
var IntegrationTokenSchema = z139.object({
|
|
2980
2978
|
id: z139.string(),
|
|
2981
|
-
workspaceId: z139.string(),
|
|
2982
2979
|
provider: OAuthProviderSchema,
|
|
2980
|
+
scope: z139.string(),
|
|
2983
2981
|
userId: z139.string(),
|
|
2984
|
-
|
|
2982
|
+
accessToken: z139.string(),
|
|
2983
|
+
refreshToken: z139.string(),
|
|
2984
|
+
expiresAt: z139.coerce.date(),
|
|
2985
|
+
externalUserId: z139.string().nullish()
|
|
2986
|
+
});
|
|
2987
|
+
var WorkspaceOAuthRequestSchema = z140.object({
|
|
2988
|
+
id: z140.string(),
|
|
2989
|
+
workspaceId: z140.string(),
|
|
2990
|
+
provider: OAuthProviderSchema,
|
|
2991
|
+
userId: z140.string(),
|
|
2992
|
+
createdAt: z140.coerce.date()
|
|
2985
2993
|
});
|
|
2986
2994
|
var DesignSystemVersionRoom = Entity.extend({
|
|
2987
|
-
designSystemVersionId:
|
|
2988
|
-
liveblocksId:
|
|
2995
|
+
designSystemVersionId: z141.string(),
|
|
2996
|
+
liveblocksId: z141.string()
|
|
2989
2997
|
});
|
|
2990
|
-
var DesignSystemVersionRoomInternalSettings =
|
|
2991
|
-
routingVersion:
|
|
2998
|
+
var DesignSystemVersionRoomInternalSettings = z141.object({
|
|
2999
|
+
routingVersion: z141.string()
|
|
2992
3000
|
});
|
|
2993
|
-
var DesignSystemVersionRoomInitialState =
|
|
2994
|
-
pages:
|
|
2995
|
-
groups:
|
|
3001
|
+
var DesignSystemVersionRoomInitialState = z141.object({
|
|
3002
|
+
pages: z141.array(DocumentationPageV2),
|
|
3003
|
+
groups: z141.array(ElementGroup),
|
|
2996
3004
|
internalSettings: DesignSystemVersionRoomInternalSettings
|
|
2997
3005
|
});
|
|
2998
|
-
var DesignSystemVersionRoomUpdate =
|
|
2999
|
-
pages:
|
|
3000
|
-
groups:
|
|
3001
|
-
deletedPageIds:
|
|
3002
|
-
deletedGroupIds:
|
|
3006
|
+
var DesignSystemVersionRoomUpdate = z141.object({
|
|
3007
|
+
pages: z141.array(DocumentationPageV2),
|
|
3008
|
+
groups: z141.array(ElementGroup),
|
|
3009
|
+
deletedPageIds: z141.array(z141.string()),
|
|
3010
|
+
deletedGroupIds: z141.array(z141.string())
|
|
3003
3011
|
});
|
|
3004
3012
|
var DocumentationPageRoom = Entity.extend({
|
|
3005
|
-
designSystemVersionId:
|
|
3006
|
-
documentationPageId:
|
|
3007
|
-
liveblocksId:
|
|
3008
|
-
isDirty:
|
|
3013
|
+
designSystemVersionId: z142.string(),
|
|
3014
|
+
documentationPageId: z142.string(),
|
|
3015
|
+
liveblocksId: z142.string(),
|
|
3016
|
+
isDirty: z142.boolean()
|
|
3009
3017
|
});
|
|
3010
|
-
var DocumentationPageRoomState =
|
|
3011
|
-
pageItems:
|
|
3018
|
+
var DocumentationPageRoomState = z142.object({
|
|
3019
|
+
pageItems: z142.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
3012
3020
|
itemConfiguration: DocumentationItemConfigurationV2
|
|
3013
3021
|
});
|
|
3014
|
-
var DocumentationPageRoomRoomUpdate =
|
|
3022
|
+
var DocumentationPageRoomRoomUpdate = z142.object({
|
|
3015
3023
|
page: DocumentationPageV2,
|
|
3016
3024
|
pageParent: ElementGroup
|
|
3017
3025
|
});
|
|
3018
3026
|
var DocumentationPageRoomInitialStateUpdate = DocumentationPageRoomRoomUpdate.extend({
|
|
3019
|
-
pageItems:
|
|
3020
|
-
blockDefinitions:
|
|
3027
|
+
pageItems: z142.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
3028
|
+
blockDefinitions: z142.array(PageBlockDefinition)
|
|
3021
3029
|
});
|
|
3022
3030
|
var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
3023
3031
|
RoomTypeEnum2["DocumentationPage"] = "documentation-page";
|
|
@@ -3025,47 +3033,47 @@ var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
|
3025
3033
|
RoomTypeEnum2["Workspace"] = "workspace";
|
|
3026
3034
|
return RoomTypeEnum2;
|
|
3027
3035
|
})(RoomTypeEnum || {});
|
|
3028
|
-
var RoomTypeSchema =
|
|
3036
|
+
var RoomTypeSchema = z143.nativeEnum(RoomTypeEnum);
|
|
3029
3037
|
var RoomType = RoomTypeSchema.enum;
|
|
3030
3038
|
var WorkspaceRoom = Entity.extend({
|
|
3031
|
-
workspaceId:
|
|
3032
|
-
liveblocksId:
|
|
3039
|
+
workspaceId: z144.string(),
|
|
3040
|
+
liveblocksId: z144.string()
|
|
3033
3041
|
});
|
|
3034
|
-
var AnyRecord =
|
|
3042
|
+
var AnyRecord = z145.record(z145.any());
|
|
3035
3043
|
var NpmPackageVersionDist = AnyRecord.and(
|
|
3036
|
-
|
|
3037
|
-
tarball:
|
|
3044
|
+
z145.object({
|
|
3045
|
+
tarball: z145.string()
|
|
3038
3046
|
})
|
|
3039
3047
|
);
|
|
3040
3048
|
var NpmPackageVersion = AnyRecord.and(
|
|
3041
|
-
|
|
3049
|
+
z145.object({
|
|
3042
3050
|
dist: NpmPackageVersionDist
|
|
3043
3051
|
})
|
|
3044
3052
|
);
|
|
3045
3053
|
var NpmPackage = AnyRecord.and(
|
|
3046
|
-
|
|
3047
|
-
_id:
|
|
3048
|
-
name:
|
|
3054
|
+
z145.object({
|
|
3055
|
+
_id: z145.string(),
|
|
3056
|
+
name: z145.string(),
|
|
3049
3057
|
// e.g. "latest": "1.2.3"
|
|
3050
|
-
"dist-tags":
|
|
3058
|
+
"dist-tags": z145.record(z145.string(), z145.string()),
|
|
3051
3059
|
// "1.2.3": {...}
|
|
3052
|
-
versions:
|
|
3060
|
+
versions: z145.record(NpmPackageVersion)
|
|
3053
3061
|
})
|
|
3054
3062
|
);
|
|
3055
|
-
var NpmProxyTokenPayload =
|
|
3056
|
-
npmProxyRegistryConfigId:
|
|
3063
|
+
var NpmProxyTokenPayload = z146.object({
|
|
3064
|
+
npmProxyRegistryConfigId: z146.string()
|
|
3057
3065
|
});
|
|
3058
|
-
var PersonalAccessToken =
|
|
3059
|
-
id:
|
|
3060
|
-
userId:
|
|
3061
|
-
workspaceId:
|
|
3066
|
+
var PersonalAccessToken = z147.object({
|
|
3067
|
+
id: z147.string(),
|
|
3068
|
+
userId: z147.string(),
|
|
3069
|
+
workspaceId: z147.string().optional(),
|
|
3062
3070
|
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
3063
|
-
name:
|
|
3064
|
-
hidden:
|
|
3065
|
-
token:
|
|
3066
|
-
scope:
|
|
3067
|
-
createdAt:
|
|
3068
|
-
expireAt:
|
|
3071
|
+
name: z147.string(),
|
|
3072
|
+
hidden: z147.boolean(),
|
|
3073
|
+
token: z147.string(),
|
|
3074
|
+
scope: z147.string().optional(),
|
|
3075
|
+
createdAt: z147.coerce.date(),
|
|
3076
|
+
expireAt: z147.coerce.date().optional()
|
|
3069
3077
|
});
|
|
3070
3078
|
var SupernovaException = class _SupernovaException extends Error {
|
|
3071
3079
|
//
|
|
@@ -3153,25 +3161,25 @@ function groupBy(items, keyFn) {
|
|
|
3153
3161
|
}
|
|
3154
3162
|
return result;
|
|
3155
3163
|
}
|
|
3156
|
-
var ContentLoadInstruction =
|
|
3157
|
-
from:
|
|
3158
|
-
to:
|
|
3159
|
-
authorizationHeaderKvsId:
|
|
3160
|
-
timeout:
|
|
3161
|
-
});
|
|
3162
|
-
var ContentLoaderPayload =
|
|
3163
|
-
type:
|
|
3164
|
+
var ContentLoadInstruction = z148.object({
|
|
3165
|
+
from: z148.string(),
|
|
3166
|
+
to: z148.string(),
|
|
3167
|
+
authorizationHeaderKvsId: z148.string().optional(),
|
|
3168
|
+
timeout: z148.number().optional()
|
|
3169
|
+
});
|
|
3170
|
+
var ContentLoaderPayload = z148.object({
|
|
3171
|
+
type: z148.literal("Single"),
|
|
3164
3172
|
instruction: ContentLoadInstruction
|
|
3165
3173
|
}).or(
|
|
3166
|
-
|
|
3167
|
-
type:
|
|
3168
|
-
loadingChunkSize:
|
|
3169
|
-
instructions:
|
|
3174
|
+
z148.object({
|
|
3175
|
+
type: z148.literal("Multiple"),
|
|
3176
|
+
loadingChunkSize: z148.number().optional(),
|
|
3177
|
+
instructions: z148.array(ContentLoadInstruction)
|
|
3170
3178
|
})
|
|
3171
3179
|
).or(
|
|
3172
|
-
|
|
3173
|
-
type:
|
|
3174
|
-
location:
|
|
3180
|
+
z148.object({
|
|
3181
|
+
type: z148.literal("S3"),
|
|
3182
|
+
location: z148.string()
|
|
3175
3183
|
})
|
|
3176
3184
|
);
|
|
3177
3185
|
function slugify(str, options) {
|
|
@@ -4134,6 +4142,12 @@ function documentationPageToDTOV1(page, pagePathMap) {
|
|
|
4134
4142
|
|
|
4135
4143
|
// src/api/conversion/integrations/integration.ts
|
|
4136
4144
|
function integrationToDto(integration) {
|
|
4145
|
+
if (integration.integrationCredentials) {
|
|
4146
|
+
integration.integrationCredentials.forEach((credential) => {
|
|
4147
|
+
credential.accessToken = "";
|
|
4148
|
+
delete credential.refreshToken;
|
|
4149
|
+
});
|
|
4150
|
+
}
|
|
4137
4151
|
return {
|
|
4138
4152
|
id: integration.id,
|
|
4139
4153
|
workspaceId: integration.workspaceId,
|
|
@@ -4145,80 +4159,80 @@ function integrationToDto(integration) {
|
|
|
4145
4159
|
}
|
|
4146
4160
|
|
|
4147
4161
|
// src/api/dto/design-systems/brand.ts
|
|
4148
|
-
import { z as
|
|
4149
|
-
var DTOBrand =
|
|
4150
|
-
id:
|
|
4151
|
-
designSystemVersionId:
|
|
4152
|
-
persistentId:
|
|
4162
|
+
import { z as z149 } from "zod";
|
|
4163
|
+
var DTOBrand = z149.object({
|
|
4164
|
+
id: z149.string(),
|
|
4165
|
+
designSystemVersionId: z149.string(),
|
|
4166
|
+
persistentId: z149.string(),
|
|
4153
4167
|
meta: ObjectMeta
|
|
4154
4168
|
});
|
|
4155
|
-
var DTOBrandGetResponse =
|
|
4156
|
-
var DTOBrandCreateResponse =
|
|
4169
|
+
var DTOBrandGetResponse = z149.object({ brand: DTOBrand });
|
|
4170
|
+
var DTOBrandCreateResponse = z149.object({
|
|
4157
4171
|
brand: DTOBrand
|
|
4158
4172
|
});
|
|
4159
|
-
var DTOBrandsListResponse =
|
|
4173
|
+
var DTOBrandsListResponse = z149.object({ brands: z149.array(DTOBrand) });
|
|
4160
4174
|
|
|
4161
4175
|
// src/api/dto/design-systems/design-system.ts
|
|
4162
|
-
import { z as
|
|
4176
|
+
import { z as z150 } from "zod";
|
|
4163
4177
|
var DTODesignSystem = DesignSystem.omit({
|
|
4164
4178
|
name: true,
|
|
4165
4179
|
description: true,
|
|
4166
4180
|
docExporterId: true
|
|
4167
4181
|
}).extend({
|
|
4168
4182
|
meta: ObjectMeta,
|
|
4169
|
-
docExporterId:
|
|
4183
|
+
docExporterId: z150.string()
|
|
4170
4184
|
});
|
|
4171
4185
|
|
|
4172
4186
|
// src/api/dto/design-systems/exporter-property.ts
|
|
4173
|
-
import { z as
|
|
4174
|
-
var DTOExporterProperty =
|
|
4175
|
-
var DTOExporterPropertyListResponse =
|
|
4187
|
+
import { z as z151 } from "zod";
|
|
4188
|
+
var DTOExporterProperty = z151.any({});
|
|
4189
|
+
var DTOExporterPropertyListResponse = z151.object({ items: z151.array(DTOExporterProperty) });
|
|
4176
4190
|
|
|
4177
4191
|
// src/api/dto/design-systems/version.ts
|
|
4178
|
-
import { z as
|
|
4192
|
+
import { z as z158 } from "zod";
|
|
4179
4193
|
|
|
4180
4194
|
// src/api/payloads/design-systems/brand.ts
|
|
4181
|
-
import { z as
|
|
4182
|
-
var DTOCreateBrandInput =
|
|
4183
|
-
persistentId:
|
|
4184
|
-
meta:
|
|
4185
|
-
name:
|
|
4186
|
-
description:
|
|
4195
|
+
import { z as z152 } from "zod";
|
|
4196
|
+
var DTOCreateBrandInput = z152.object({
|
|
4197
|
+
persistentId: z152.string().uuid(),
|
|
4198
|
+
meta: z152.object({
|
|
4199
|
+
name: z152.string(),
|
|
4200
|
+
description: z152.string()
|
|
4187
4201
|
})
|
|
4188
4202
|
});
|
|
4189
4203
|
|
|
4190
4204
|
// src/api/payloads/design-systems/version.ts
|
|
4191
|
-
import { z as
|
|
4192
|
-
var ObjectMeta2 =
|
|
4193
|
-
name:
|
|
4194
|
-
description:
|
|
4205
|
+
import { z as z153 } from "zod";
|
|
4206
|
+
var ObjectMeta2 = z153.object({
|
|
4207
|
+
name: z153.string().max(150).optional(),
|
|
4208
|
+
description: z153.string().max(2e3).optional()
|
|
4195
4209
|
});
|
|
4196
4210
|
function validateDesignSystemVersion(version) {
|
|
4197
4211
|
const urlCompliantRegex = /^[a-zA-Z0-9+.-]+$/;
|
|
4198
4212
|
return urlCompliantRegex.test(version);
|
|
4199
4213
|
}
|
|
4200
|
-
var DTOCreateVersionInput =
|
|
4214
|
+
var DTOCreateVersionInput = z153.object({
|
|
4201
4215
|
meta: ObjectMeta2,
|
|
4202
|
-
version:
|
|
4216
|
+
version: z153.string().refine(validateDesignSystemVersion, {
|
|
4203
4217
|
message: "Invalid semantic versioning format"
|
|
4204
4218
|
}),
|
|
4205
|
-
changeLog:
|
|
4219
|
+
changeLog: z153.string().max(2e3).optional()
|
|
4206
4220
|
});
|
|
4207
4221
|
|
|
4208
4222
|
// src/api/payloads/documentation/block-definitions.ts
|
|
4209
|
-
import { z as
|
|
4210
|
-
var DTOGetBlockDefinitionsOutput =
|
|
4211
|
-
definitions:
|
|
4223
|
+
import { z as z154 } from "zod";
|
|
4224
|
+
var DTOGetBlockDefinitionsOutput = z154.object({
|
|
4225
|
+
definitions: z154.array(PageBlockDefinition)
|
|
4212
4226
|
});
|
|
4213
4227
|
|
|
4214
4228
|
// src/api/payloads/liveblocks/auth.ts
|
|
4215
|
-
import { z as
|
|
4216
|
-
var DTOLiveblocksAuthRequest =
|
|
4217
|
-
room:
|
|
4229
|
+
import { z as z155 } from "zod";
|
|
4230
|
+
var DTOLiveblocksAuthRequest = z155.object({
|
|
4231
|
+
room: z155.string().optional()
|
|
4218
4232
|
});
|
|
4219
4233
|
|
|
4220
4234
|
// src/api/payloads/workspaces/workspace-configuration.ts
|
|
4221
|
-
import { z as
|
|
4235
|
+
import { z as z156 } from "zod";
|
|
4222
4236
|
var prohibitedSsoKeys = ["providerId", "metadataXml", "emailDomains"];
|
|
4223
4237
|
function validateSsoPayload(ssoPayload) {
|
|
4224
4238
|
const keys = [];
|
|
@@ -4241,21 +4255,21 @@ function validateSsoPayload(ssoPayload) {
|
|
|
4241
4255
|
keys
|
|
4242
4256
|
};
|
|
4243
4257
|
}
|
|
4244
|
-
var NpmRegistryInput =
|
|
4245
|
-
enabledScopes:
|
|
4246
|
-
customRegistryUrl:
|
|
4247
|
-
bypassProxy:
|
|
4248
|
-
npmProxyRegistryConfigId:
|
|
4249
|
-
npmProxyVersion:
|
|
4250
|
-
registryType:
|
|
4251
|
-
authType:
|
|
4252
|
-
authHeaderName:
|
|
4253
|
-
authHeaderValue:
|
|
4254
|
-
accessToken:
|
|
4255
|
-
username:
|
|
4256
|
-
password:
|
|
4257
|
-
});
|
|
4258
|
-
var WorkspaceConfigurationPayload =
|
|
4258
|
+
var NpmRegistryInput = z156.object({
|
|
4259
|
+
enabledScopes: z156.array(z156.string()),
|
|
4260
|
+
customRegistryUrl: z156.string().optional(),
|
|
4261
|
+
bypassProxy: z156.boolean().optional(),
|
|
4262
|
+
npmProxyRegistryConfigId: z156.string().optional(),
|
|
4263
|
+
npmProxyVersion: z156.number().optional(),
|
|
4264
|
+
registryType: z156.string(),
|
|
4265
|
+
authType: z156.string(),
|
|
4266
|
+
authHeaderName: z156.string(),
|
|
4267
|
+
authHeaderValue: z156.string(),
|
|
4268
|
+
accessToken: z156.string(),
|
|
4269
|
+
username: z156.string(),
|
|
4270
|
+
password: z156.string()
|
|
4271
|
+
});
|
|
4272
|
+
var WorkspaceConfigurationPayload = z156.object({
|
|
4259
4273
|
ipWhitelist: WorkspaceIpSettings.partial().optional(),
|
|
4260
4274
|
sso: SsoProvider.partial().optional(),
|
|
4261
4275
|
npmRegistrySettings: NpmRegistryInput.partial().optional(),
|
|
@@ -4263,118 +4277,118 @@ var WorkspaceConfigurationPayload = z155.object({
|
|
|
4263
4277
|
});
|
|
4264
4278
|
|
|
4265
4279
|
// src/api/payloads/workspaces/workspace-integrations.ts
|
|
4266
|
-
import { z as
|
|
4267
|
-
var DTOWorkspaceIntegrationOauthInput =
|
|
4280
|
+
import { z as z157 } from "zod";
|
|
4281
|
+
var DTOWorkspaceIntegrationOauthInput = z157.object({
|
|
4268
4282
|
type: IntegrationType
|
|
4269
4283
|
});
|
|
4270
|
-
var DTOWorkspaceIntegrationPATInput =
|
|
4271
|
-
userId:
|
|
4284
|
+
var DTOWorkspaceIntegrationPATInput = z157.object({
|
|
4285
|
+
userId: z157.string(),
|
|
4272
4286
|
type: IntegrationType,
|
|
4273
4287
|
token: IntegrationTokenResponse
|
|
4274
4288
|
});
|
|
4275
4289
|
|
|
4276
4290
|
// src/api/dto/design-systems/version.ts
|
|
4277
|
-
var DTODesignSystemVersion =
|
|
4278
|
-
id:
|
|
4279
|
-
createdAt:
|
|
4291
|
+
var DTODesignSystemVersion = z158.object({
|
|
4292
|
+
id: z158.string(),
|
|
4293
|
+
createdAt: z158.date(),
|
|
4280
4294
|
meta: ObjectMeta,
|
|
4281
|
-
version:
|
|
4282
|
-
isReadonly:
|
|
4283
|
-
changeLog:
|
|
4284
|
-
designSystemId:
|
|
4295
|
+
version: z158.string(),
|
|
4296
|
+
isReadonly: z158.boolean(),
|
|
4297
|
+
changeLog: z158.string(),
|
|
4298
|
+
designSystemId: z158.string()
|
|
4285
4299
|
});
|
|
4286
|
-
var DTODesignSystemVersionsListResponse =
|
|
4287
|
-
designSystemVersions:
|
|
4300
|
+
var DTODesignSystemVersionsListResponse = z158.object({
|
|
4301
|
+
designSystemVersions: z158.array(DTODesignSystemVersion)
|
|
4288
4302
|
});
|
|
4289
|
-
var DTODesignSystemVersionGetResponse =
|
|
4303
|
+
var DTODesignSystemVersionGetResponse = z158.object({
|
|
4290
4304
|
designSystemVersion: DTODesignSystemVersion
|
|
4291
4305
|
});
|
|
4292
|
-
var DTODesignSystemVersionCreationResponse =
|
|
4306
|
+
var DTODesignSystemVersionCreationResponse = z158.object({
|
|
4293
4307
|
meta: ObjectMeta,
|
|
4294
|
-
version:
|
|
4295
|
-
changeLog:
|
|
4296
|
-
isReadOnly:
|
|
4297
|
-
designSystemId:
|
|
4298
|
-
jobId:
|
|
4299
|
-
});
|
|
4300
|
-
var VersionSQSPayload =
|
|
4301
|
-
jobId:
|
|
4302
|
-
designSystemId:
|
|
4308
|
+
version: z158.string(),
|
|
4309
|
+
changeLog: z158.string(),
|
|
4310
|
+
isReadOnly: z158.boolean(),
|
|
4311
|
+
designSystemId: z158.string(),
|
|
4312
|
+
jobId: z158.string()
|
|
4313
|
+
});
|
|
4314
|
+
var VersionSQSPayload = z158.object({
|
|
4315
|
+
jobId: z158.string(),
|
|
4316
|
+
designSystemId: z158.string(),
|
|
4303
4317
|
input: DTOCreateVersionInput
|
|
4304
4318
|
});
|
|
4305
|
-
var DTODesignSystemVersionJobsResponse =
|
|
4306
|
-
jobs:
|
|
4319
|
+
var DTODesignSystemVersionJobsResponse = z158.object({
|
|
4320
|
+
jobs: z158.array(VersionCreationJob)
|
|
4307
4321
|
});
|
|
4308
|
-
var DTODesignSystemVersionJobStatusResponse =
|
|
4322
|
+
var DTODesignSystemVersionJobStatusResponse = z158.object({
|
|
4309
4323
|
job: VersionCreationJob
|
|
4310
4324
|
});
|
|
4311
4325
|
|
|
4312
4326
|
// src/api/dto/design-systems/view.ts
|
|
4313
|
-
import { z as
|
|
4314
|
-
var DTOElementViewColumnSharedAttributes =
|
|
4315
|
-
id:
|
|
4316
|
-
persistentId:
|
|
4317
|
-
width:
|
|
4327
|
+
import { z as z159 } from "zod";
|
|
4328
|
+
var DTOElementViewColumnSharedAttributes = z159.object({
|
|
4329
|
+
id: z159.string(),
|
|
4330
|
+
persistentId: z159.string(),
|
|
4331
|
+
width: z159.number()
|
|
4318
4332
|
});
|
|
4319
4333
|
var DTOElementViewBasePropertyColumn = DTOElementViewColumnSharedAttributes.extend({
|
|
4320
|
-
type:
|
|
4334
|
+
type: z159.literal("BaseProperty"),
|
|
4321
4335
|
basePropertyType: ElementViewBaseColumnType
|
|
4322
4336
|
});
|
|
4323
4337
|
var DTOElementViewPropertyDefinitionColumn = DTOElementViewColumnSharedAttributes.extend({
|
|
4324
|
-
type:
|
|
4325
|
-
propertyDefinitionId:
|
|
4338
|
+
type: z159.literal("PropertyDefinition"),
|
|
4339
|
+
propertyDefinitionId: z159.string()
|
|
4326
4340
|
});
|
|
4327
4341
|
var DTOElementViewThemeColumn = DTOElementViewColumnSharedAttributes.extend({
|
|
4328
|
-
type:
|
|
4329
|
-
themeId:
|
|
4342
|
+
type: z159.literal("Theme"),
|
|
4343
|
+
themeId: z159.string()
|
|
4330
4344
|
});
|
|
4331
|
-
var DTOElementViewColumn =
|
|
4345
|
+
var DTOElementViewColumn = z159.discriminatedUnion("type", [
|
|
4332
4346
|
DTOElementViewBasePropertyColumn,
|
|
4333
4347
|
DTOElementViewPropertyDefinitionColumn,
|
|
4334
4348
|
DTOElementViewThemeColumn
|
|
4335
4349
|
]);
|
|
4336
|
-
var DTOElementView =
|
|
4350
|
+
var DTOElementView = z159.object({
|
|
4337
4351
|
meta: ObjectMeta,
|
|
4338
|
-
persistentId:
|
|
4352
|
+
persistentId: z159.string(),
|
|
4339
4353
|
targetElementType: ElementPropertyTargetType,
|
|
4340
|
-
id:
|
|
4341
|
-
isDefault:
|
|
4342
|
-
columns:
|
|
4354
|
+
id: z159.string(),
|
|
4355
|
+
isDefault: z159.boolean(),
|
|
4356
|
+
columns: z159.array(DTOElementViewColumn)
|
|
4343
4357
|
});
|
|
4344
|
-
var DTOElementViewsListResponse =
|
|
4345
|
-
elementDataViews:
|
|
4358
|
+
var DTOElementViewsListResponse = z159.object({
|
|
4359
|
+
elementDataViews: z159.array(DTOElementView)
|
|
4346
4360
|
});
|
|
4347
4361
|
|
|
4348
4362
|
// src/api/dto/documentation/anchor.ts
|
|
4349
|
-
import { z as
|
|
4363
|
+
import { z as z160 } from "zod";
|
|
4350
4364
|
var DTODocumentationPageAnchor = DocumentationPageAnchor;
|
|
4351
|
-
var DTOGetDocumentationPageAnchorsResponse =
|
|
4352
|
-
anchors:
|
|
4365
|
+
var DTOGetDocumentationPageAnchorsResponse = z160.object({
|
|
4366
|
+
anchors: z160.array(DTODocumentationPageAnchor)
|
|
4353
4367
|
});
|
|
4354
4368
|
|
|
4355
4369
|
// src/api/dto/documentation/link-preview.ts
|
|
4356
|
-
import { z as
|
|
4357
|
-
var DTODocumentationLinkPreviewResponse =
|
|
4370
|
+
import { z as z161 } from "zod";
|
|
4371
|
+
var DTODocumentationLinkPreviewResponse = z161.object({
|
|
4358
4372
|
linkPreview: DocumentationLinkPreview
|
|
4359
4373
|
});
|
|
4360
|
-
var DTODocumentationLinkPreviewRequest =
|
|
4361
|
-
url:
|
|
4362
|
-
documentationItemPersistentId:
|
|
4374
|
+
var DTODocumentationLinkPreviewRequest = z161.object({
|
|
4375
|
+
url: z161.string().optional(),
|
|
4376
|
+
documentationItemPersistentId: z161.string().optional()
|
|
4363
4377
|
});
|
|
4364
4378
|
|
|
4365
4379
|
// src/api/dto/elements/documentation/group-action.ts
|
|
4366
|
-
import { z as
|
|
4380
|
+
import { z as z164 } from "zod";
|
|
4367
4381
|
|
|
4368
4382
|
// src/api/dto/elements/documentation/group-v2.ts
|
|
4369
|
-
import { z as
|
|
4383
|
+
import { z as z163 } from "zod";
|
|
4370
4384
|
|
|
4371
4385
|
// src/api/dto/elements/documentation/item-configuration-v2.ts
|
|
4372
|
-
import { z as
|
|
4386
|
+
import { z as z162 } from "zod";
|
|
4373
4387
|
var DTODocumentationItemHeaderV2 = DocumentationItemHeaderV2;
|
|
4374
|
-
var DTODocumentationItemConfigurationV2 =
|
|
4375
|
-
showSidebar:
|
|
4376
|
-
isPrivate:
|
|
4377
|
-
isHidden:
|
|
4388
|
+
var DTODocumentationItemConfigurationV2 = z162.object({
|
|
4389
|
+
showSidebar: z162.boolean(),
|
|
4390
|
+
isPrivate: z162.boolean(),
|
|
4391
|
+
isHidden: z162.boolean(),
|
|
4378
4392
|
header: DTODocumentationItemHeaderV2
|
|
4379
4393
|
});
|
|
4380
4394
|
|
|
@@ -4388,136 +4402,136 @@ var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
|
4388
4402
|
data: true,
|
|
4389
4403
|
shortPersistentId: true
|
|
4390
4404
|
}).extend({
|
|
4391
|
-
title:
|
|
4392
|
-
isRoot:
|
|
4393
|
-
childrenIds:
|
|
4405
|
+
title: z163.string(),
|
|
4406
|
+
isRoot: z163.boolean(),
|
|
4407
|
+
childrenIds: z163.array(z163.string()),
|
|
4394
4408
|
groupBehavior: DocumentationGroupBehavior,
|
|
4395
|
-
shortPersistentId:
|
|
4409
|
+
shortPersistentId: z163.string(),
|
|
4396
4410
|
configuration: DTODocumentationItemConfigurationV2,
|
|
4397
|
-
type:
|
|
4411
|
+
type: z163.literal("Group")
|
|
4398
4412
|
});
|
|
4399
4413
|
var DTODocumentationGroupStructureV2 = DTODocumentationGroupV2;
|
|
4400
|
-
var DTOCreateDocumentationGroupInput =
|
|
4414
|
+
var DTOCreateDocumentationGroupInput = z163.object({
|
|
4401
4415
|
// Identifier
|
|
4402
|
-
persistentId:
|
|
4416
|
+
persistentId: z163.string().uuid(),
|
|
4403
4417
|
// Group properties
|
|
4404
|
-
title:
|
|
4418
|
+
title: z163.string(),
|
|
4405
4419
|
configuration: DTODocumentationItemConfigurationV2.optional(),
|
|
4406
4420
|
// Group placement properties
|
|
4407
|
-
afterPersistentId:
|
|
4408
|
-
parentPersistentId:
|
|
4421
|
+
afterPersistentId: z163.string().uuid().nullish(),
|
|
4422
|
+
parentPersistentId: z163.string().uuid()
|
|
4409
4423
|
});
|
|
4410
|
-
var DTOUpdateDocumentationGroupInput =
|
|
4424
|
+
var DTOUpdateDocumentationGroupInput = z163.object({
|
|
4411
4425
|
// Identifier of the group to update
|
|
4412
|
-
id:
|
|
4426
|
+
id: z163.string(),
|
|
4413
4427
|
// Group properties
|
|
4414
|
-
title:
|
|
4428
|
+
title: z163.string().optional(),
|
|
4415
4429
|
configuration: DTODocumentationItemConfigurationV2.partial().optional()
|
|
4416
4430
|
});
|
|
4417
|
-
var DTOMoveDocumentationGroupInput =
|
|
4431
|
+
var DTOMoveDocumentationGroupInput = z163.object({
|
|
4418
4432
|
// Identifier of the group to update
|
|
4419
|
-
id:
|
|
4433
|
+
id: z163.string(),
|
|
4420
4434
|
// Group placement properties
|
|
4421
|
-
parentPersistentId:
|
|
4422
|
-
afterPersistentId:
|
|
4435
|
+
parentPersistentId: z163.string().uuid(),
|
|
4436
|
+
afterPersistentId: z163.string().uuid().nullish()
|
|
4423
4437
|
});
|
|
4424
|
-
var DTODuplicateDocumentationGroupInput =
|
|
4438
|
+
var DTODuplicateDocumentationGroupInput = z163.object({
|
|
4425
4439
|
// Identifier of the group to duplicate from
|
|
4426
|
-
id:
|
|
4440
|
+
id: z163.string(),
|
|
4427
4441
|
// New group persistent id
|
|
4428
|
-
persistentId:
|
|
4442
|
+
persistentId: z163.string().uuid(),
|
|
4429
4443
|
// Group placement properties
|
|
4430
|
-
afterPersistentId:
|
|
4431
|
-
parentPersistentId:
|
|
4444
|
+
afterPersistentId: z163.string().uuid().nullish(),
|
|
4445
|
+
parentPersistentId: z163.string().uuid()
|
|
4432
4446
|
});
|
|
4433
|
-
var DTOCreateDocumentationTabInput =
|
|
4447
|
+
var DTOCreateDocumentationTabInput = z163.object({
|
|
4434
4448
|
// New group persistent id
|
|
4435
|
-
persistentId:
|
|
4449
|
+
persistentId: z163.string().uuid(),
|
|
4436
4450
|
// If this is page, we will attempt to convert it to tab
|
|
4437
4451
|
// If this is tab group, we will add a new tab to it
|
|
4438
|
-
fromItemPersistentId:
|
|
4439
|
-
tabName:
|
|
4452
|
+
fromItemPersistentId: z163.string(),
|
|
4453
|
+
tabName: z163.string()
|
|
4440
4454
|
});
|
|
4441
|
-
var DTODeleteDocumentationTabGroupInput =
|
|
4455
|
+
var DTODeleteDocumentationTabGroupInput = z163.object({
|
|
4442
4456
|
// Deleted group id
|
|
4443
|
-
id:
|
|
4457
|
+
id: z163.string()
|
|
4444
4458
|
});
|
|
4445
|
-
var DTODeleteDocumentationGroupInput =
|
|
4459
|
+
var DTODeleteDocumentationGroupInput = z163.object({
|
|
4446
4460
|
// Identifier
|
|
4447
|
-
id:
|
|
4461
|
+
id: z163.string(),
|
|
4448
4462
|
// Deletion options
|
|
4449
|
-
deleteSubtree:
|
|
4463
|
+
deleteSubtree: z163.boolean().default(false)
|
|
4450
4464
|
});
|
|
4451
4465
|
|
|
4452
4466
|
// src/api/dto/elements/documentation/group-action.ts
|
|
4453
|
-
var SuccessPayload =
|
|
4454
|
-
success:
|
|
4467
|
+
var SuccessPayload = z164.object({
|
|
4468
|
+
success: z164.literal(true)
|
|
4455
4469
|
});
|
|
4456
|
-
var DTODocumentationGroupCreateActionOutputV2 =
|
|
4457
|
-
type:
|
|
4470
|
+
var DTODocumentationGroupCreateActionOutputV2 = z164.object({
|
|
4471
|
+
type: z164.literal("DocumentationGroupCreate"),
|
|
4458
4472
|
output: SuccessPayload
|
|
4459
4473
|
});
|
|
4460
|
-
var DTODocumentationTabCreateActionOutputV2 =
|
|
4461
|
-
type:
|
|
4474
|
+
var DTODocumentationTabCreateActionOutputV2 = z164.object({
|
|
4475
|
+
type: z164.literal("DocumentationTabCreate"),
|
|
4462
4476
|
output: SuccessPayload
|
|
4463
4477
|
});
|
|
4464
|
-
var DTODocumentationGroupUpdateActionOutputV2 =
|
|
4465
|
-
type:
|
|
4478
|
+
var DTODocumentationGroupUpdateActionOutputV2 = z164.object({
|
|
4479
|
+
type: z164.literal("DocumentationGroupUpdate"),
|
|
4466
4480
|
output: SuccessPayload
|
|
4467
4481
|
});
|
|
4468
|
-
var DTODocumentationGroupMoveActionOutputV2 =
|
|
4469
|
-
type:
|
|
4482
|
+
var DTODocumentationGroupMoveActionOutputV2 = z164.object({
|
|
4483
|
+
type: z164.literal("DocumentationGroupMove"),
|
|
4470
4484
|
output: SuccessPayload
|
|
4471
4485
|
});
|
|
4472
|
-
var DTODocumentationGroupDuplicateActionOutputV2 =
|
|
4473
|
-
type:
|
|
4486
|
+
var DTODocumentationGroupDuplicateActionOutputV2 = z164.object({
|
|
4487
|
+
type: z164.literal("DocumentationGroupDuplicate"),
|
|
4474
4488
|
output: SuccessPayload
|
|
4475
4489
|
});
|
|
4476
|
-
var DTODocumentationGroupDeleteActionOutputV2 =
|
|
4477
|
-
type:
|
|
4490
|
+
var DTODocumentationGroupDeleteActionOutputV2 = z164.object({
|
|
4491
|
+
type: z164.literal("DocumentationGroupDelete"),
|
|
4478
4492
|
output: SuccessPayload
|
|
4479
4493
|
});
|
|
4480
|
-
var DTODocumentationTabGroupDeleteActionOutputV2 =
|
|
4481
|
-
type:
|
|
4494
|
+
var DTODocumentationTabGroupDeleteActionOutputV2 = z164.object({
|
|
4495
|
+
type: z164.literal("DocumentationTabGroupDelete"),
|
|
4482
4496
|
output: SuccessPayload
|
|
4483
4497
|
});
|
|
4484
|
-
var DTODocumentationGroupCreateActionInputV2 =
|
|
4485
|
-
type:
|
|
4498
|
+
var DTODocumentationGroupCreateActionInputV2 = z164.object({
|
|
4499
|
+
type: z164.literal("DocumentationGroupCreate"),
|
|
4486
4500
|
input: DTOCreateDocumentationGroupInput
|
|
4487
4501
|
});
|
|
4488
|
-
var DTODocumentationTabCreateActionInputV2 =
|
|
4489
|
-
type:
|
|
4502
|
+
var DTODocumentationTabCreateActionInputV2 = z164.object({
|
|
4503
|
+
type: z164.literal("DocumentationTabCreate"),
|
|
4490
4504
|
input: DTOCreateDocumentationTabInput
|
|
4491
4505
|
});
|
|
4492
|
-
var DTODocumentationGroupUpdateActionInputV2 =
|
|
4493
|
-
type:
|
|
4506
|
+
var DTODocumentationGroupUpdateActionInputV2 = z164.object({
|
|
4507
|
+
type: z164.literal("DocumentationGroupUpdate"),
|
|
4494
4508
|
input: DTOUpdateDocumentationGroupInput
|
|
4495
4509
|
});
|
|
4496
|
-
var DTODocumentationGroupMoveActionInputV2 =
|
|
4497
|
-
type:
|
|
4510
|
+
var DTODocumentationGroupMoveActionInputV2 = z164.object({
|
|
4511
|
+
type: z164.literal("DocumentationGroupMove"),
|
|
4498
4512
|
input: DTOMoveDocumentationGroupInput
|
|
4499
4513
|
});
|
|
4500
|
-
var DTODocumentationGroupDuplicateActionInputV2 =
|
|
4501
|
-
type:
|
|
4514
|
+
var DTODocumentationGroupDuplicateActionInputV2 = z164.object({
|
|
4515
|
+
type: z164.literal("DocumentationGroupDuplicate"),
|
|
4502
4516
|
input: DTODuplicateDocumentationGroupInput
|
|
4503
4517
|
});
|
|
4504
|
-
var DTODocumentationGroupDeleteActionInputV2 =
|
|
4505
|
-
type:
|
|
4518
|
+
var DTODocumentationGroupDeleteActionInputV2 = z164.object({
|
|
4519
|
+
type: z164.literal("DocumentationGroupDelete"),
|
|
4506
4520
|
input: DTODeleteDocumentationGroupInput
|
|
4507
4521
|
});
|
|
4508
|
-
var DTODocumentationTabGroupDeleteActionInputV2 =
|
|
4509
|
-
type:
|
|
4522
|
+
var DTODocumentationTabGroupDeleteActionInputV2 = z164.object({
|
|
4523
|
+
type: z164.literal("DocumentationTabGroupDelete"),
|
|
4510
4524
|
input: DTODeleteDocumentationTabGroupInput
|
|
4511
4525
|
});
|
|
4512
4526
|
|
|
4513
4527
|
// src/api/dto/elements/documentation/group-v1.ts
|
|
4514
|
-
import { z as
|
|
4528
|
+
import { z as z166 } from "zod";
|
|
4515
4529
|
|
|
4516
4530
|
// src/api/dto/elements/documentation/item-configuration-v1.ts
|
|
4517
|
-
import { z as
|
|
4518
|
-
var DocumentationColorV1 =
|
|
4519
|
-
aliasTo:
|
|
4520
|
-
value:
|
|
4531
|
+
import { z as z165 } from "zod";
|
|
4532
|
+
var DocumentationColorV1 = z165.object({
|
|
4533
|
+
aliasTo: z165.string().optional(),
|
|
4534
|
+
value: z165.string().optional()
|
|
4521
4535
|
});
|
|
4522
4536
|
var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
4523
4537
|
foregroundColor: true,
|
|
@@ -4526,10 +4540,10 @@ var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
|
4526
4540
|
foregroundColor: DocumentationColorV1.optional(),
|
|
4527
4541
|
backgroundColor: DocumentationColorV1.optional()
|
|
4528
4542
|
});
|
|
4529
|
-
var DTODocumentationItemConfigurationV1 =
|
|
4530
|
-
showSidebar:
|
|
4531
|
-
isPrivate:
|
|
4532
|
-
isHidden:
|
|
4543
|
+
var DTODocumentationItemConfigurationV1 = z165.object({
|
|
4544
|
+
showSidebar: z165.boolean(),
|
|
4545
|
+
isPrivate: z165.boolean(),
|
|
4546
|
+
isHidden: z165.boolean(),
|
|
4533
4547
|
header: DTODocumentationItemHeaderV1
|
|
4534
4548
|
});
|
|
4535
4549
|
|
|
@@ -4543,130 +4557,130 @@ var DTODocumentationGroupStructureV1 = ElementGroup.omit({
|
|
|
4543
4557
|
data: true,
|
|
4544
4558
|
shortPersistentId: true
|
|
4545
4559
|
}).extend({
|
|
4546
|
-
title:
|
|
4547
|
-
isRoot:
|
|
4548
|
-
childrenIds:
|
|
4560
|
+
title: z166.string(),
|
|
4561
|
+
isRoot: z166.boolean(),
|
|
4562
|
+
childrenIds: z166.array(z166.string()),
|
|
4549
4563
|
groupBehavior: DocumentationGroupBehavior,
|
|
4550
|
-
shortPersistentId:
|
|
4551
|
-
type:
|
|
4564
|
+
shortPersistentId: z166.string(),
|
|
4565
|
+
type: z166.literal("Group")
|
|
4552
4566
|
});
|
|
4553
4567
|
var DTODocumentationGroupV1 = DTODocumentationGroupStructureV1.extend({
|
|
4554
4568
|
configuration: DTODocumentationItemConfigurationV1
|
|
4555
4569
|
});
|
|
4556
4570
|
|
|
4557
4571
|
// src/api/dto/elements/documentation/page-actions-v2.ts
|
|
4558
|
-
import { z as
|
|
4572
|
+
import { z as z168 } from "zod";
|
|
4559
4573
|
|
|
4560
4574
|
// src/api/dto/elements/documentation/page-v2.ts
|
|
4561
|
-
import { z as
|
|
4575
|
+
import { z as z167 } from "zod";
|
|
4562
4576
|
var DTODocumentationPageV2 = DocumentationPageV2.omit({
|
|
4563
4577
|
data: true,
|
|
4564
4578
|
meta: true,
|
|
4565
4579
|
parentPersistentId: true,
|
|
4566
4580
|
sortOrder: true
|
|
4567
4581
|
}).extend({
|
|
4568
|
-
title:
|
|
4569
|
-
path:
|
|
4570
|
-
type:
|
|
4582
|
+
title: z167.string(),
|
|
4583
|
+
path: z167.string(),
|
|
4584
|
+
type: z167.literal("Page"),
|
|
4571
4585
|
configuration: DTODocumentationItemConfigurationV2
|
|
4572
4586
|
});
|
|
4573
4587
|
var DTODocumentationPageStructureV2 = DTODocumentationPageV2;
|
|
4574
|
-
var DTODocumentationHierarchyV2 =
|
|
4575
|
-
pages:
|
|
4576
|
-
groups:
|
|
4588
|
+
var DTODocumentationHierarchyV2 = z167.object({
|
|
4589
|
+
pages: z167.array(DTODocumentationPageStructureV2),
|
|
4590
|
+
groups: z167.array(DTODocumentationGroupStructureV2)
|
|
4577
4591
|
});
|
|
4578
|
-
var DTOCreateDocumentationPageInputV2 =
|
|
4592
|
+
var DTOCreateDocumentationPageInputV2 = z167.object({
|
|
4579
4593
|
// Identifier
|
|
4580
|
-
persistentId:
|
|
4594
|
+
persistentId: z167.string().uuid(),
|
|
4581
4595
|
// Page properties
|
|
4582
|
-
title:
|
|
4596
|
+
title: z167.string(),
|
|
4583
4597
|
configuration: DTODocumentationItemConfigurationV2.optional(),
|
|
4584
4598
|
// Page placement properties
|
|
4585
|
-
parentPersistentId:
|
|
4586
|
-
afterPersistentId:
|
|
4599
|
+
parentPersistentId: z167.string().uuid(),
|
|
4600
|
+
afterPersistentId: z167.string().uuid().nullish()
|
|
4587
4601
|
});
|
|
4588
|
-
var DTOUpdateDocumentationPageInputV2 =
|
|
4602
|
+
var DTOUpdateDocumentationPageInputV2 = z167.object({
|
|
4589
4603
|
// Identifier of the group to update
|
|
4590
|
-
id:
|
|
4604
|
+
id: z167.string(),
|
|
4591
4605
|
// Page properties
|
|
4592
|
-
title:
|
|
4606
|
+
title: z167.string().optional(),
|
|
4593
4607
|
configuration: DTODocumentationItemConfigurationV2.partial().optional()
|
|
4594
4608
|
});
|
|
4595
|
-
var DTOMoveDocumentationPageInputV2 =
|
|
4609
|
+
var DTOMoveDocumentationPageInputV2 = z167.object({
|
|
4596
4610
|
// Identifier of the group to update
|
|
4597
|
-
id:
|
|
4611
|
+
id: z167.string(),
|
|
4598
4612
|
// Page placement properties
|
|
4599
|
-
parentPersistentId:
|
|
4600
|
-
afterPersistentId:
|
|
4613
|
+
parentPersistentId: z167.string().uuid(),
|
|
4614
|
+
afterPersistentId: z167.string().uuid().nullish()
|
|
4601
4615
|
});
|
|
4602
|
-
var DTODuplicateDocumentationPageInputV2 =
|
|
4616
|
+
var DTODuplicateDocumentationPageInputV2 = z167.object({
|
|
4603
4617
|
// Identifier of the page to duplicate from
|
|
4604
|
-
id:
|
|
4618
|
+
id: z167.string(),
|
|
4605
4619
|
// New page persistent id
|
|
4606
|
-
persistentId:
|
|
4620
|
+
persistentId: z167.string().uuid(),
|
|
4607
4621
|
// Page placement properties
|
|
4608
|
-
parentPersistentId:
|
|
4609
|
-
afterPersistentId:
|
|
4622
|
+
parentPersistentId: z167.string().uuid(),
|
|
4623
|
+
afterPersistentId: z167.string().uuid().nullish()
|
|
4610
4624
|
});
|
|
4611
|
-
var DTODeleteDocumentationPageInputV2 =
|
|
4625
|
+
var DTODeleteDocumentationPageInputV2 = z167.object({
|
|
4612
4626
|
// Identifier
|
|
4613
|
-
id:
|
|
4627
|
+
id: z167.string()
|
|
4614
4628
|
});
|
|
4615
4629
|
|
|
4616
4630
|
// src/api/dto/elements/documentation/page-actions-v2.ts
|
|
4617
|
-
var SuccessPayload2 =
|
|
4618
|
-
success:
|
|
4631
|
+
var SuccessPayload2 = z168.object({
|
|
4632
|
+
success: z168.literal(true)
|
|
4619
4633
|
});
|
|
4620
|
-
var DTODocumentationPageCreateActionOutputV2 =
|
|
4621
|
-
type:
|
|
4634
|
+
var DTODocumentationPageCreateActionOutputV2 = z168.object({
|
|
4635
|
+
type: z168.literal("DocumentationPageCreate"),
|
|
4622
4636
|
output: SuccessPayload2
|
|
4623
4637
|
});
|
|
4624
|
-
var DTODocumentationPageUpdateActionOutputV2 =
|
|
4625
|
-
type:
|
|
4638
|
+
var DTODocumentationPageUpdateActionOutputV2 = z168.object({
|
|
4639
|
+
type: z168.literal("DocumentationPageUpdate"),
|
|
4626
4640
|
output: SuccessPayload2
|
|
4627
4641
|
});
|
|
4628
|
-
var DTODocumentationPageMoveActionOutputV2 =
|
|
4629
|
-
type:
|
|
4642
|
+
var DTODocumentationPageMoveActionOutputV2 = z168.object({
|
|
4643
|
+
type: z168.literal("DocumentationPageMove"),
|
|
4630
4644
|
output: SuccessPayload2
|
|
4631
4645
|
});
|
|
4632
|
-
var DTODocumentationPageDuplicateActionOutputV2 =
|
|
4633
|
-
type:
|
|
4646
|
+
var DTODocumentationPageDuplicateActionOutputV2 = z168.object({
|
|
4647
|
+
type: z168.literal("DocumentationPageDuplicate"),
|
|
4634
4648
|
output: SuccessPayload2
|
|
4635
4649
|
});
|
|
4636
|
-
var DTODocumentationPageDeleteActionOutputV2 =
|
|
4637
|
-
type:
|
|
4650
|
+
var DTODocumentationPageDeleteActionOutputV2 = z168.object({
|
|
4651
|
+
type: z168.literal("DocumentationPageDelete"),
|
|
4638
4652
|
output: SuccessPayload2
|
|
4639
4653
|
});
|
|
4640
|
-
var DTODocumentationPageCreateActionInputV2 =
|
|
4641
|
-
type:
|
|
4654
|
+
var DTODocumentationPageCreateActionInputV2 = z168.object({
|
|
4655
|
+
type: z168.literal("DocumentationPageCreate"),
|
|
4642
4656
|
input: DTOCreateDocumentationPageInputV2
|
|
4643
4657
|
});
|
|
4644
|
-
var DTODocumentationPageUpdateActionInputV2 =
|
|
4645
|
-
type:
|
|
4658
|
+
var DTODocumentationPageUpdateActionInputV2 = z168.object({
|
|
4659
|
+
type: z168.literal("DocumentationPageUpdate"),
|
|
4646
4660
|
input: DTOUpdateDocumentationPageInputV2
|
|
4647
4661
|
});
|
|
4648
|
-
var DTODocumentationPageMoveActionInputV2 =
|
|
4649
|
-
type:
|
|
4662
|
+
var DTODocumentationPageMoveActionInputV2 = z168.object({
|
|
4663
|
+
type: z168.literal("DocumentationPageMove"),
|
|
4650
4664
|
input: DTOMoveDocumentationPageInputV2
|
|
4651
4665
|
});
|
|
4652
|
-
var DTODocumentationPageDuplicateActionInputV2 =
|
|
4653
|
-
type:
|
|
4666
|
+
var DTODocumentationPageDuplicateActionInputV2 = z168.object({
|
|
4667
|
+
type: z168.literal("DocumentationPageDuplicate"),
|
|
4654
4668
|
input: DTODuplicateDocumentationPageInputV2
|
|
4655
4669
|
});
|
|
4656
|
-
var DTODocumentationPageDeleteActionInputV2 =
|
|
4657
|
-
type:
|
|
4670
|
+
var DTODocumentationPageDeleteActionInputV2 = z168.object({
|
|
4671
|
+
type: z168.literal("DocumentationPageDelete"),
|
|
4658
4672
|
input: DTODeleteDocumentationPageInputV2
|
|
4659
4673
|
});
|
|
4660
4674
|
|
|
4661
4675
|
// src/api/dto/elements/documentation/page-content.ts
|
|
4662
|
-
import { z as
|
|
4676
|
+
import { z as z169 } from "zod";
|
|
4663
4677
|
var DTODocumentationPageContent = DocumentationPageContent;
|
|
4664
|
-
var DTODocumentationPageContentGetResponse =
|
|
4678
|
+
var DTODocumentationPageContentGetResponse = z169.object({
|
|
4665
4679
|
pageContent: DTODocumentationPageContent
|
|
4666
4680
|
});
|
|
4667
4681
|
|
|
4668
4682
|
// src/api/dto/elements/documentation/page-v1.ts
|
|
4669
|
-
import { z as
|
|
4683
|
+
import { z as z170 } from "zod";
|
|
4670
4684
|
var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
4671
4685
|
data: true,
|
|
4672
4686
|
meta: true,
|
|
@@ -4674,30 +4688,30 @@ var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
|
4674
4688
|
sortOrder: true
|
|
4675
4689
|
}).extend({
|
|
4676
4690
|
configuration: DTODocumentationItemConfigurationV1,
|
|
4677
|
-
blocks:
|
|
4678
|
-
title:
|
|
4679
|
-
path:
|
|
4691
|
+
blocks: z170.array(PageBlockV1),
|
|
4692
|
+
title: z170.string(),
|
|
4693
|
+
path: z170.string()
|
|
4680
4694
|
});
|
|
4681
4695
|
|
|
4682
4696
|
// src/api/dto/elements/figma-nodes/figma-node.ts
|
|
4683
|
-
import { z as
|
|
4684
|
-
var DTOFigmaNodeOrigin =
|
|
4685
|
-
sourceId:
|
|
4686
|
-
fileId:
|
|
4687
|
-
parentName:
|
|
4697
|
+
import { z as z171 } from "zod";
|
|
4698
|
+
var DTOFigmaNodeOrigin = z171.object({
|
|
4699
|
+
sourceId: z171.string(),
|
|
4700
|
+
fileId: z171.string().optional(),
|
|
4701
|
+
parentName: z171.string().optional()
|
|
4688
4702
|
});
|
|
4689
|
-
var DTOFigmaNodeData =
|
|
4703
|
+
var DTOFigmaNodeData = z171.object({
|
|
4690
4704
|
// Id of the node in the Figma file
|
|
4691
|
-
figmaNodeId:
|
|
4705
|
+
figmaNodeId: z171.string(),
|
|
4692
4706
|
// Validity
|
|
4693
|
-
isValid:
|
|
4707
|
+
isValid: z171.boolean(),
|
|
4694
4708
|
// Asset data
|
|
4695
|
-
assetId:
|
|
4696
|
-
assetUrl:
|
|
4709
|
+
assetId: z171.string(),
|
|
4710
|
+
assetUrl: z171.string(),
|
|
4697
4711
|
// Asset metadata
|
|
4698
|
-
assetScale:
|
|
4699
|
-
assetWidth:
|
|
4700
|
-
assetHeight:
|
|
4712
|
+
assetScale: z171.number(),
|
|
4713
|
+
assetWidth: z171.number().optional(),
|
|
4714
|
+
assetHeight: z171.number().optional()
|
|
4701
4715
|
});
|
|
4702
4716
|
var DTOFigmaNode = FigmaFileStructure.omit({
|
|
4703
4717
|
data: true,
|
|
@@ -4706,105 +4720,105 @@ var DTOFigmaNode = FigmaFileStructure.omit({
|
|
|
4706
4720
|
data: DTOFigmaNodeData,
|
|
4707
4721
|
origin: DTOFigmaNodeOrigin
|
|
4708
4722
|
});
|
|
4709
|
-
var DTOFigmaNodeRenderInput =
|
|
4723
|
+
var DTOFigmaNodeRenderInput = z171.object({
|
|
4710
4724
|
// Id of a design system's data source representing a linked Figma file
|
|
4711
|
-
sourceId:
|
|
4725
|
+
sourceId: z171.string(),
|
|
4712
4726
|
// Id of a node within the Figma file
|
|
4713
|
-
figmaFileNodeId:
|
|
4727
|
+
figmaFileNodeId: z171.string()
|
|
4714
4728
|
});
|
|
4715
4729
|
|
|
4716
4730
|
// src/api/dto/elements/figma-nodes/node-actions-v2.ts
|
|
4717
|
-
import { z as
|
|
4718
|
-
var DTOFigmaNodeRenderActionOutput =
|
|
4719
|
-
type:
|
|
4720
|
-
figmaNodes:
|
|
4731
|
+
import { z as z172 } from "zod";
|
|
4732
|
+
var DTOFigmaNodeRenderActionOutput = z172.object({
|
|
4733
|
+
type: z172.literal("FigmaNodeRender"),
|
|
4734
|
+
figmaNodes: z172.array(DTOFigmaNode)
|
|
4721
4735
|
});
|
|
4722
|
-
var DTOFigmaNodeRenderActionInput =
|
|
4723
|
-
type:
|
|
4736
|
+
var DTOFigmaNodeRenderActionInput = z172.object({
|
|
4737
|
+
type: z172.literal("FigmaNodeRender"),
|
|
4724
4738
|
input: DTOFigmaNodeRenderInput.array()
|
|
4725
4739
|
});
|
|
4726
4740
|
|
|
4727
4741
|
// src/api/dto/elements/properties/property-definitions-actions-v2.ts
|
|
4728
|
-
import { z as
|
|
4742
|
+
import { z as z174 } from "zod";
|
|
4729
4743
|
|
|
4730
4744
|
// src/api/dto/elements/properties/property-definitions.ts
|
|
4731
|
-
import { z as
|
|
4745
|
+
import { z as z173 } from "zod";
|
|
4732
4746
|
var CODE_NAME_REGEX2 = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
4733
|
-
var DTOElementPropertyDefinition =
|
|
4734
|
-
id:
|
|
4735
|
-
designSystemVersionId:
|
|
4747
|
+
var DTOElementPropertyDefinition = z173.object({
|
|
4748
|
+
id: z173.string(),
|
|
4749
|
+
designSystemVersionId: z173.string(),
|
|
4736
4750
|
meta: ObjectMeta,
|
|
4737
|
-
persistentId:
|
|
4751
|
+
persistentId: z173.string(),
|
|
4738
4752
|
type: ElementPropertyTypeSchema,
|
|
4739
4753
|
targetElementType: ElementPropertyTargetType,
|
|
4740
|
-
codeName:
|
|
4741
|
-
options:
|
|
4754
|
+
codeName: z173.string().regex(CODE_NAME_REGEX2),
|
|
4755
|
+
options: z173.array(ElementPropertyDefinitionOption).optional(),
|
|
4742
4756
|
linkElementType: ElementPropertyLinkType.optional()
|
|
4743
4757
|
});
|
|
4744
|
-
var DTOElementPropertyDefinitionsGetResponse =
|
|
4745
|
-
definitions:
|
|
4758
|
+
var DTOElementPropertyDefinitionsGetResponse = z173.object({
|
|
4759
|
+
definitions: z173.array(DTOElementPropertyDefinition)
|
|
4746
4760
|
});
|
|
4747
4761
|
var DTOCreateElementPropertyDefinitionInputV2 = DTOElementPropertyDefinition.omit({
|
|
4748
4762
|
id: true,
|
|
4749
4763
|
designSystemVersionId: true
|
|
4750
4764
|
});
|
|
4751
|
-
var DTOUpdateElementPropertyDefinitionInputV2 =
|
|
4752
|
-
id:
|
|
4753
|
-
name:
|
|
4754
|
-
description:
|
|
4755
|
-
codeName:
|
|
4756
|
-
options:
|
|
4765
|
+
var DTOUpdateElementPropertyDefinitionInputV2 = z173.object({
|
|
4766
|
+
id: z173.string(),
|
|
4767
|
+
name: z173.string().optional(),
|
|
4768
|
+
description: z173.string().optional(),
|
|
4769
|
+
codeName: z173.string().regex(CODE_NAME_REGEX2).optional(),
|
|
4770
|
+
options: z173.array(ElementPropertyDefinitionOption).optional()
|
|
4757
4771
|
});
|
|
4758
|
-
var DTODeleteElementPropertyDefinitionInputV2 =
|
|
4759
|
-
id:
|
|
4772
|
+
var DTODeleteElementPropertyDefinitionInputV2 = z173.object({
|
|
4773
|
+
id: z173.string()
|
|
4760
4774
|
});
|
|
4761
4775
|
|
|
4762
4776
|
// src/api/dto/elements/properties/property-definitions-actions-v2.ts
|
|
4763
|
-
var SuccessPayload3 =
|
|
4764
|
-
success:
|
|
4777
|
+
var SuccessPayload3 = z174.object({
|
|
4778
|
+
success: z174.literal(true)
|
|
4765
4779
|
});
|
|
4766
|
-
var DTOPropertyDefinitionCreateActionOutputV2 =
|
|
4767
|
-
type:
|
|
4780
|
+
var DTOPropertyDefinitionCreateActionOutputV2 = z174.object({
|
|
4781
|
+
type: z174.literal("PropertyDefinitionCreate"),
|
|
4768
4782
|
definition: DTOElementPropertyDefinition
|
|
4769
4783
|
});
|
|
4770
|
-
var DTOPropertyDefinitionUpdateActionOutputV2 =
|
|
4771
|
-
type:
|
|
4784
|
+
var DTOPropertyDefinitionUpdateActionOutputV2 = z174.object({
|
|
4785
|
+
type: z174.literal("PropertyDefinitionUpdate"),
|
|
4772
4786
|
definition: DTOElementPropertyDefinition
|
|
4773
4787
|
});
|
|
4774
|
-
var DTOPropertyDefinitionDeleteActionOutputV2 =
|
|
4775
|
-
type:
|
|
4788
|
+
var DTOPropertyDefinitionDeleteActionOutputV2 = z174.object({
|
|
4789
|
+
type: z174.literal("PropertyDefinitionDelete"),
|
|
4776
4790
|
output: SuccessPayload3
|
|
4777
4791
|
});
|
|
4778
|
-
var DTOPropertyDefinitionCreateActionInputV2 =
|
|
4779
|
-
type:
|
|
4792
|
+
var DTOPropertyDefinitionCreateActionInputV2 = z174.object({
|
|
4793
|
+
type: z174.literal("PropertyDefinitionCreate"),
|
|
4780
4794
|
input: DTOCreateElementPropertyDefinitionInputV2
|
|
4781
4795
|
});
|
|
4782
|
-
var DTOPropertyDefinitionUpdateActionInputV2 =
|
|
4783
|
-
type:
|
|
4796
|
+
var DTOPropertyDefinitionUpdateActionInputV2 = z174.object({
|
|
4797
|
+
type: z174.literal("PropertyDefinitionUpdate"),
|
|
4784
4798
|
input: DTOUpdateElementPropertyDefinitionInputV2
|
|
4785
4799
|
});
|
|
4786
|
-
var DTOPropertyDefinitionDeleteActionInputV2 =
|
|
4787
|
-
type:
|
|
4800
|
+
var DTOPropertyDefinitionDeleteActionInputV2 = z174.object({
|
|
4801
|
+
type: z174.literal("PropertyDefinitionDelete"),
|
|
4788
4802
|
input: DTODeleteElementPropertyDefinitionInputV2
|
|
4789
4803
|
});
|
|
4790
4804
|
|
|
4791
4805
|
// src/api/dto/elements/properties/property-values.ts
|
|
4792
|
-
import { z as
|
|
4793
|
-
var DTOElementPropertyValue =
|
|
4794
|
-
id:
|
|
4795
|
-
designSystemVersionId:
|
|
4796
|
-
definitionId:
|
|
4797
|
-
targetElementId:
|
|
4798
|
-
value:
|
|
4799
|
-
valuePreview:
|
|
4806
|
+
import { z as z175 } from "zod";
|
|
4807
|
+
var DTOElementPropertyValue = z175.object({
|
|
4808
|
+
id: z175.string(),
|
|
4809
|
+
designSystemVersionId: z175.string(),
|
|
4810
|
+
definitionId: z175.string(),
|
|
4811
|
+
targetElementId: z175.string(),
|
|
4812
|
+
value: z175.union([z175.string(), z175.number(), z175.boolean()]).optional(),
|
|
4813
|
+
valuePreview: z175.string().optional()
|
|
4800
4814
|
});
|
|
4801
|
-
var DTOElementPropertyValuesGetResponse =
|
|
4802
|
-
values:
|
|
4815
|
+
var DTOElementPropertyValuesGetResponse = z175.object({
|
|
4816
|
+
values: z175.array(DTOElementPropertyValue)
|
|
4803
4817
|
});
|
|
4804
4818
|
|
|
4805
4819
|
// src/api/dto/elements/elements-action-v2.ts
|
|
4806
|
-
import { z as
|
|
4807
|
-
var DTOElementActionOutput =
|
|
4820
|
+
import { z as z176 } from "zod";
|
|
4821
|
+
var DTOElementActionOutput = z176.discriminatedUnion("type", [
|
|
4808
4822
|
// Documentation pages
|
|
4809
4823
|
DTODocumentationPageCreateActionOutputV2,
|
|
4810
4824
|
DTODocumentationPageUpdateActionOutputV2,
|
|
@@ -4826,7 +4840,7 @@ var DTOElementActionOutput = z175.discriminatedUnion("type", [
|
|
|
4826
4840
|
DTOPropertyDefinitionUpdateActionOutputV2,
|
|
4827
4841
|
DTOPropertyDefinitionDeleteActionOutputV2
|
|
4828
4842
|
]);
|
|
4829
|
-
var DTOElementActionInput =
|
|
4843
|
+
var DTOElementActionInput = z176.discriminatedUnion("type", [
|
|
4830
4844
|
// Documentation pages
|
|
4831
4845
|
DTODocumentationPageCreateActionInputV2,
|
|
4832
4846
|
DTODocumentationPageUpdateActionInputV2,
|
|
@@ -4850,73 +4864,73 @@ var DTOElementActionInput = z175.discriminatedUnion("type", [
|
|
|
4850
4864
|
]);
|
|
4851
4865
|
|
|
4852
4866
|
// src/api/dto/elements/get-elements-v2.ts
|
|
4853
|
-
import { z as
|
|
4854
|
-
var DTOElementsGetTypeFilter =
|
|
4855
|
-
var DTOElementsGetQuerySchema =
|
|
4856
|
-
types:
|
|
4867
|
+
import { z as z177 } from "zod";
|
|
4868
|
+
var DTOElementsGetTypeFilter = z177.enum(["FigmaNode"]);
|
|
4869
|
+
var DTOElementsGetQuerySchema = z177.object({
|
|
4870
|
+
types: z177.string().transform((val) => val.split(",").map((v) => DTOElementsGetTypeFilter.parse(v)))
|
|
4857
4871
|
});
|
|
4858
|
-
var DTOElementsGetOutput =
|
|
4859
|
-
figmaNodes:
|
|
4872
|
+
var DTOElementsGetOutput = z177.object({
|
|
4873
|
+
figmaNodes: z177.array(DTOFigmaNode).optional()
|
|
4860
4874
|
});
|
|
4861
4875
|
|
|
4862
4876
|
// src/api/dto/workspaces/integrations.ts
|
|
4863
|
-
import { z as
|
|
4864
|
-
var DTOIntegration =
|
|
4865
|
-
id:
|
|
4866
|
-
workspaceId:
|
|
4877
|
+
import { z as z178 } from "zod";
|
|
4878
|
+
var DTOIntegration = z178.object({
|
|
4879
|
+
id: z178.string(),
|
|
4880
|
+
workspaceId: z178.string(),
|
|
4867
4881
|
type: ExtendedIntegrationType,
|
|
4868
|
-
createdAt:
|
|
4869
|
-
integrationCredentials:
|
|
4870
|
-
integrationDesignSystems:
|
|
4882
|
+
createdAt: z178.coerce.date(),
|
|
4883
|
+
integrationCredentials: z178.array(IntegrationCredentials).optional(),
|
|
4884
|
+
integrationDesignSystems: z178.array(IntegrationDesignSystem).optional()
|
|
4871
4885
|
});
|
|
4872
|
-
var DTOIntegrationOAuthGetResponse =
|
|
4873
|
-
url:
|
|
4886
|
+
var DTOIntegrationOAuthGetResponse = z178.object({
|
|
4887
|
+
url: z178.string()
|
|
4874
4888
|
});
|
|
4875
|
-
var DTOIntegrationPostResponse =
|
|
4889
|
+
var DTOIntegrationPostResponse = z178.object({
|
|
4876
4890
|
integration: DTOIntegration
|
|
4877
4891
|
});
|
|
4878
|
-
var DTOIntegrationsGetListResponse =
|
|
4892
|
+
var DTOIntegrationsGetListResponse = z178.object({
|
|
4879
4893
|
integrations: DTOIntegration.array()
|
|
4880
4894
|
});
|
|
4881
4895
|
|
|
4882
4896
|
// src/api/dto/workspaces/membership.ts
|
|
4883
|
-
import { z as
|
|
4897
|
+
import { z as z181 } from "zod";
|
|
4884
4898
|
|
|
4885
4899
|
// src/api/dto/workspaces/workspace.ts
|
|
4886
|
-
import { z as
|
|
4900
|
+
import { z as z180 } from "zod";
|
|
4887
4901
|
|
|
4888
4902
|
// src/api/dto/workspaces/npm-registry.ts
|
|
4889
|
-
import { z as
|
|
4890
|
-
var DTONpmRegistryConfig =
|
|
4903
|
+
import { z as z179 } from "zod";
|
|
4904
|
+
var DTONpmRegistryConfig = z179.object({
|
|
4891
4905
|
// Registry basic configuration
|
|
4892
4906
|
registryType: NpmRegistryType,
|
|
4893
|
-
registryUrl:
|
|
4894
|
-
customRegistryUrl:
|
|
4907
|
+
registryUrl: z179.string(),
|
|
4908
|
+
customRegistryUrl: z179.string().optional(),
|
|
4895
4909
|
// URL of Supernova NPM packages proxy
|
|
4896
|
-
proxyUrl:
|
|
4910
|
+
proxyUrl: z179.string(),
|
|
4897
4911
|
// Auth configuration
|
|
4898
4912
|
authType: NpmRegistryAuthType,
|
|
4899
|
-
accessToken:
|
|
4900
|
-
username:
|
|
4901
|
-
password:
|
|
4913
|
+
accessToken: z179.literal("redacted").optional(),
|
|
4914
|
+
username: z179.string().optional(),
|
|
4915
|
+
password: z179.literal("redacted").optional(),
|
|
4902
4916
|
// NPM package scopes for whih the proxy should be enabled
|
|
4903
|
-
enabledScopes:
|
|
4917
|
+
enabledScopes: z179.array(z179.string()),
|
|
4904
4918
|
// True if client should bypass Supernova proxy and connect directly to the registry
|
|
4905
4919
|
// (e.g. when the NPM registry is behind a VPN or firewall which prevents Supernova from accessing it)
|
|
4906
|
-
bypassProxy:
|
|
4920
|
+
bypassProxy: z179.boolean()
|
|
4907
4921
|
});
|
|
4908
4922
|
|
|
4909
4923
|
// src/api/dto/workspaces/workspace.ts
|
|
4910
|
-
var DTOWorkspace =
|
|
4911
|
-
id:
|
|
4924
|
+
var DTOWorkspace = z180.object({
|
|
4925
|
+
id: z180.string(),
|
|
4912
4926
|
profile: WorkspaceProfile,
|
|
4913
4927
|
subscription: Subscription,
|
|
4914
4928
|
npmRegistry: DTONpmRegistryConfig.optional()
|
|
4915
4929
|
});
|
|
4916
4930
|
|
|
4917
4931
|
// src/api/dto/workspaces/membership.ts
|
|
4918
|
-
var DTOWorkspaceRole =
|
|
4919
|
-
var DTOUserWorkspaceMembership =
|
|
4932
|
+
var DTOWorkspaceRole = z181.enum(["Owner", "Admin", "Creator", "Viewer", "Billing"]);
|
|
4933
|
+
var DTOUserWorkspaceMembership = z181.object({
|
|
4920
4934
|
// Workspace the user is a member of
|
|
4921
4935
|
workspace: DTOWorkspace,
|
|
4922
4936
|
// Assigned role the user has in the workspace
|
|
@@ -4926,14 +4940,14 @@ var DTOUserWorkspaceMembership = z180.object({
|
|
|
4926
4940
|
// when a workspace's subscription is downgraded to free tier
|
|
4927
4941
|
effectiveRole: DTOWorkspaceRole
|
|
4928
4942
|
});
|
|
4929
|
-
var DTOUserWorkspaceMembershipsResponse =
|
|
4930
|
-
membership:
|
|
4943
|
+
var DTOUserWorkspaceMembershipsResponse = z181.object({
|
|
4944
|
+
membership: z181.array(DTOUserWorkspaceMembership)
|
|
4931
4945
|
});
|
|
4932
4946
|
|
|
4933
4947
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
4934
|
-
import { z as
|
|
4935
|
-
var DocumentationHierarchySettings =
|
|
4936
|
-
routingVersion:
|
|
4948
|
+
import { z as z182 } from "zod";
|
|
4949
|
+
var DocumentationHierarchySettings = z182.object({
|
|
4950
|
+
routingVersion: z182.string()
|
|
4937
4951
|
});
|
|
4938
4952
|
function documentationHierarchyToYjs(doc, transaction) {
|
|
4939
4953
|
doc.transact((trx) => {
|
|
@@ -5004,13 +5018,13 @@ function getInternalSettingsYMap(doc) {
|
|
|
5004
5018
|
}
|
|
5005
5019
|
|
|
5006
5020
|
// src/yjs/design-system-content/item-configuration.ts
|
|
5007
|
-
import { z as
|
|
5008
|
-
var DTODocumentationPageRoomHeaderData =
|
|
5009
|
-
title:
|
|
5021
|
+
import { z as z183 } from "zod";
|
|
5022
|
+
var DTODocumentationPageRoomHeaderData = z183.object({
|
|
5023
|
+
title: z183.string(),
|
|
5010
5024
|
configuration: DTODocumentationItemConfigurationV2
|
|
5011
5025
|
});
|
|
5012
|
-
var DTODocumentationPageRoomHeaderDataUpdate =
|
|
5013
|
-
title:
|
|
5026
|
+
var DTODocumentationPageRoomHeaderDataUpdate = z183.object({
|
|
5027
|
+
title: z183.string().optional(),
|
|
5014
5028
|
configuration: DTODocumentationItemConfigurationV2.omit({ header: true }).extend({ header: DocumentationItemHeaderV2.partial() }).optional()
|
|
5015
5029
|
});
|
|
5016
5030
|
function itemConfigurationToYjs(yDoc, item) {
|
|
@@ -5061,7 +5075,7 @@ function yjsToItemConfiguration(yDoc) {
|
|
|
5061
5075
|
header: rawHeader
|
|
5062
5076
|
};
|
|
5063
5077
|
return {
|
|
5064
|
-
title:
|
|
5078
|
+
title: z183.string().parse(title),
|
|
5065
5079
|
configuration: DTODocumentationItemConfigurationV2.parse(rawConfig)
|
|
5066
5080
|
};
|
|
5067
5081
|
}
|
|
@@ -5071,9 +5085,9 @@ var PageBlockEditorModel = PageBlockEditorModelV2;
|
|
|
5071
5085
|
var PageSectionEditorModel = PageSectionEditorModelV2;
|
|
5072
5086
|
|
|
5073
5087
|
// src/yjs/docs-editor/model/page.ts
|
|
5074
|
-
import { z as
|
|
5075
|
-
var DocumentationPageEditorModel =
|
|
5076
|
-
blocks:
|
|
5088
|
+
import { z as z184 } from "zod";
|
|
5089
|
+
var DocumentationPageEditorModel = z184.object({
|
|
5090
|
+
blocks: z184.array(PageBlockEditorModel.or(PageSectionEditorModel))
|
|
5077
5091
|
});
|
|
5078
5092
|
|
|
5079
5093
|
// src/yjs/docs-editor/prosemirror/schema.ts
|
|
@@ -8045,7 +8059,7 @@ var blocks = [
|
|
|
8045
8059
|
|
|
8046
8060
|
// src/yjs/docs-editor/prosemirror-to-blocks.ts
|
|
8047
8061
|
import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
|
|
8048
|
-
import { z as
|
|
8062
|
+
import { z as z185 } from "zod";
|
|
8049
8063
|
function yDocToPage(yDoc, definitions) {
|
|
8050
8064
|
return yXmlFragmentToPage(yDoc.getXmlFragment("default"), definitions);
|
|
8051
8065
|
}
|
|
@@ -8088,7 +8102,7 @@ function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
|
|
|
8088
8102
|
return null;
|
|
8089
8103
|
return {
|
|
8090
8104
|
id,
|
|
8091
|
-
title: getProsemirrorAttribute(prosemirrorNode, "title",
|
|
8105
|
+
title: getProsemirrorAttribute(prosemirrorNode, "title", z185.string()) ?? "",
|
|
8092
8106
|
columns: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(nonNullFilter)
|
|
8093
8107
|
};
|
|
8094
8108
|
}
|
|
@@ -8123,7 +8137,7 @@ function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap, dept
|
|
|
8123
8137
|
});
|
|
8124
8138
|
}
|
|
8125
8139
|
function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap, depth) {
|
|
8126
|
-
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId",
|
|
8140
|
+
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z185.string());
|
|
8127
8141
|
if (!definitionId) {
|
|
8128
8142
|
console.warn(`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`);
|
|
8129
8143
|
return [];
|
|
@@ -8165,7 +8179,7 @@ function parseAsRichText(prosemirrorNode, definition, property) {
|
|
|
8165
8179
|
if (!id)
|
|
8166
8180
|
return null;
|
|
8167
8181
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
8168
|
-
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type",
|
|
8182
|
+
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z185.string().optional()));
|
|
8169
8183
|
return {
|
|
8170
8184
|
// TODO Artem: indent
|
|
8171
8185
|
id,
|
|
@@ -8292,10 +8306,10 @@ function parseRichTextAttribute(mark) {
|
|
|
8292
8306
|
return null;
|
|
8293
8307
|
}
|
|
8294
8308
|
function parseProsemirrorLink(mark) {
|
|
8295
|
-
const href = getProsemirrorAttribute(mark, "href",
|
|
8309
|
+
const href = getProsemirrorAttribute(mark, "href", z185.string().optional());
|
|
8296
8310
|
if (!href)
|
|
8297
8311
|
return null;
|
|
8298
|
-
const target = getProsemirrorAttribute(mark, "target",
|
|
8312
|
+
const target = getProsemirrorAttribute(mark, "target", z185.string().optional());
|
|
8299
8313
|
const openInNewTab = target === "_blank";
|
|
8300
8314
|
if (href.startsWith("@")) {
|
|
8301
8315
|
return {
|
|
@@ -8318,7 +8332,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
8318
8332
|
if (!id)
|
|
8319
8333
|
return null;
|
|
8320
8334
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
8321
|
-
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder",
|
|
8335
|
+
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z185.boolean().optional()) !== false;
|
|
8322
8336
|
const tableChild = prosemirrorNode.content?.find((c) => c.type === "table");
|
|
8323
8337
|
if (!tableChild) {
|
|
8324
8338
|
return emptyTable(id, variantId, 0);
|
|
@@ -8365,9 +8379,9 @@ function parseAsTableCell(prosemirrorNode) {
|
|
|
8365
8379
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
8366
8380
|
if (!id)
|
|
8367
8381
|
return null;
|
|
8368
|
-
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign",
|
|
8382
|
+
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z185.string().optional());
|
|
8369
8383
|
let columnWidth;
|
|
8370
|
-
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth",
|
|
8384
|
+
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z185.array(z185.number()).optional());
|
|
8371
8385
|
if (columnWidthArray) {
|
|
8372
8386
|
columnWidth = columnWidthArray[0];
|
|
8373
8387
|
}
|
|
@@ -8405,7 +8419,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
8405
8419
|
value: parseRichText(prosemirrorNode.content ?? [])
|
|
8406
8420
|
};
|
|
8407
8421
|
case "image":
|
|
8408
|
-
const items = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
8422
|
+
const items = getProsemirrorAttribute(prosemirrorNode, "items", z185.string());
|
|
8409
8423
|
if (!items)
|
|
8410
8424
|
return null;
|
|
8411
8425
|
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
@@ -8510,7 +8524,7 @@ function parseAsCustomBlock(prosemirrorNode, definition) {
|
|
|
8510
8524
|
};
|
|
8511
8525
|
}
|
|
8512
8526
|
function parseBlockItems(prosemirrorNode, definition) {
|
|
8513
|
-
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
8527
|
+
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z185.string());
|
|
8514
8528
|
if (!itemsString)
|
|
8515
8529
|
return null;
|
|
8516
8530
|
const itemsJson = JSON.parse(itemsString);
|
|
@@ -8522,18 +8536,18 @@ function parseBlockItems(prosemirrorNode, definition) {
|
|
|
8522
8536
|
}
|
|
8523
8537
|
function parseAppearance(prosemirrorNode) {
|
|
8524
8538
|
let appearance = {};
|
|
8525
|
-
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance",
|
|
8539
|
+
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance", z185.string().optional());
|
|
8526
8540
|
if (rawAppearanceString) {
|
|
8527
8541
|
const parsedAppearance = PageBlockAppearanceV2.safeParse(JSON.parse(rawAppearanceString));
|
|
8528
8542
|
if (parsedAppearance.success) {
|
|
8529
8543
|
appearance = parsedAppearance.data;
|
|
8530
8544
|
}
|
|
8531
8545
|
}
|
|
8532
|
-
const columns = getProsemirrorAttribute(prosemirrorNode, "columns",
|
|
8546
|
+
const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z185.number().optional());
|
|
8533
8547
|
if (columns) {
|
|
8534
8548
|
appearance.numberOfColumns = columns;
|
|
8535
8549
|
}
|
|
8536
|
-
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor",
|
|
8550
|
+
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z185.string().optional());
|
|
8537
8551
|
if (backgroundColor) {
|
|
8538
8552
|
const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
|
|
8539
8553
|
if (parsedColor.success) {
|
|
@@ -8624,13 +8638,13 @@ function valueSchemaForPropertyType(type) {
|
|
|
8624
8638
|
}
|
|
8625
8639
|
}
|
|
8626
8640
|
function getProsemirrorBlockId(prosemirrorNode) {
|
|
8627
|
-
const id = getProsemirrorAttribute(prosemirrorNode, "id",
|
|
8641
|
+
const id = getProsemirrorAttribute(prosemirrorNode, "id", z185.string());
|
|
8628
8642
|
if (!id)
|
|
8629
8643
|
console.warn(`Prosemirror attribute "id" on ${prosemirrorNode.type} is required`);
|
|
8630
8644
|
return id;
|
|
8631
8645
|
}
|
|
8632
8646
|
function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
8633
|
-
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(
|
|
8647
|
+
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z185.string()));
|
|
8634
8648
|
}
|
|
8635
8649
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
8636
8650
|
const parsedAttr = validationSchema.safeParse(prosemirrorNode.attrs?.[attributeName]);
|