@supernova-studio/client 0.47.56 → 0.47.58
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 +94 -23
- package/dist/index.d.ts +94 -23
- package/dist/index.js +61 -64
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +586 -589
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/dto/design-systems/elements-diff.ts +14 -0
- package/src/api/dto/design-systems/index.ts +1 -0
- package/src/api/dto/documentation/publish.ts +5 -0
- package/src/yjs/version-room/backend.ts +9 -27
- package/src/yjs/version-room/base.ts +10 -50
- package/src/yjs/version-room/frontend.ts +31 -9
package/dist/index.mjs
CHANGED
|
@@ -2462,6 +2462,7 @@ var DocumentationCommentThread = z104.object({
|
|
|
2462
2462
|
var DesignElementSnapshotReason = z105.enum(["Publish", "Deletion"]);
|
|
2463
2463
|
var DesignElementSnapshotBase = z105.object({
|
|
2464
2464
|
id: z105.string(),
|
|
2465
|
+
persistentId: z105.string(),
|
|
2465
2466
|
designSystemVersionId: z105.string(),
|
|
2466
2467
|
createdAt: z105.coerce.date(),
|
|
2467
2468
|
updatedAt: z105.coerce.date(),
|
|
@@ -2848,12 +2849,12 @@ var DesignSystemVersionRoomInitialState = z123.object({
|
|
|
2848
2849
|
var DesignSystemVersionRoomUpdate = z123.object({
|
|
2849
2850
|
pages: z123.array(DocumentationPageV2),
|
|
2850
2851
|
groups: z123.array(ElementGroup),
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2852
|
+
pageIdsToDelete: z123.array(z123.string()),
|
|
2853
|
+
groupIdsToDelete: z123.array(z123.string()),
|
|
2854
|
+
pageSnapshots: z123.array(DocumentationPageSnapshot),
|
|
2855
|
+
groupSnapshots: z123.array(ElementGroupSnapshot),
|
|
2856
|
+
pageSnapshotIdsToDelete: z123.array(z123.string()),
|
|
2857
|
+
groupSnapshotIdsToDelete: z123.array(z123.string())
|
|
2857
2858
|
});
|
|
2858
2859
|
var DocumentationPageRoom = Entity.extend({
|
|
2859
2860
|
designSystemVersionId: z124.string(),
|
|
@@ -4722,103 +4723,115 @@ var DTODesignSystem = DesignSystem.omit({
|
|
|
4722
4723
|
docExporterId: z167.string()
|
|
4723
4724
|
});
|
|
4724
4725
|
|
|
4725
|
-
// src/api/dto/design-systems/
|
|
4726
|
+
// src/api/dto/design-systems/elements-diff.ts
|
|
4726
4727
|
import { z as z168 } from "zod";
|
|
4727
|
-
var
|
|
4728
|
-
|
|
4728
|
+
var DTODiffCountBase = z168.object({
|
|
4729
|
+
created: z168.number(),
|
|
4730
|
+
updated: z168.number(),
|
|
4731
|
+
deleted: z168.number()
|
|
4732
|
+
});
|
|
4733
|
+
var DTODesignElementsDataDiffResponse = z168.object({
|
|
4734
|
+
tokens: DTODiffCountBase,
|
|
4735
|
+
assets: DTODiffCountBase
|
|
4736
|
+
});
|
|
4737
|
+
|
|
4738
|
+
// src/api/dto/design-systems/exporter-property.ts
|
|
4739
|
+
import { z as z169 } from "zod";
|
|
4740
|
+
var DTOExporterProperty = z169.any({});
|
|
4741
|
+
var DTOExporterPropertyListResponse = z169.object({ items: z169.array(DTOExporterProperty) });
|
|
4729
4742
|
|
|
4730
4743
|
// src/api/dto/design-systems/version.ts
|
|
4731
|
-
import { z as
|
|
4744
|
+
import { z as z179 } from "zod";
|
|
4732
4745
|
|
|
4733
4746
|
// src/api/payloads/design-systems/brand.ts
|
|
4734
|
-
import { z as
|
|
4735
|
-
var DTOCreateBrandInput =
|
|
4736
|
-
persistentId:
|
|
4737
|
-
meta:
|
|
4738
|
-
name:
|
|
4739
|
-
description:
|
|
4747
|
+
import { z as z170 } from "zod";
|
|
4748
|
+
var DTOCreateBrandInput = z170.object({
|
|
4749
|
+
persistentId: z170.string().uuid(),
|
|
4750
|
+
meta: z170.object({
|
|
4751
|
+
name: z170.string(),
|
|
4752
|
+
description: z170.string()
|
|
4740
4753
|
})
|
|
4741
4754
|
});
|
|
4742
4755
|
|
|
4743
4756
|
// src/api/payloads/design-systems/version.ts
|
|
4744
|
-
import { z as
|
|
4745
|
-
var ObjectMeta2 =
|
|
4746
|
-
name:
|
|
4747
|
-
description:
|
|
4757
|
+
import { z as z171 } from "zod";
|
|
4758
|
+
var ObjectMeta2 = z171.object({
|
|
4759
|
+
name: z171.string().max(150).optional(),
|
|
4760
|
+
description: z171.string().max(2e3).optional()
|
|
4748
4761
|
});
|
|
4749
4762
|
function validateDesignSystemVersion(version) {
|
|
4750
4763
|
const urlCompliantRegex = /^[a-zA-Z0-9+.-]+$/;
|
|
4751
4764
|
return urlCompliantRegex.test(version);
|
|
4752
4765
|
}
|
|
4753
|
-
var DTOCreateVersionInput =
|
|
4766
|
+
var DTOCreateVersionInput = z171.object({
|
|
4754
4767
|
meta: ObjectMeta2,
|
|
4755
|
-
version:
|
|
4768
|
+
version: z171.string().refine(validateDesignSystemVersion, {
|
|
4756
4769
|
message: "Invalid semantic versioning format"
|
|
4757
4770
|
}),
|
|
4758
|
-
changeLog:
|
|
4771
|
+
changeLog: z171.string().optional()
|
|
4759
4772
|
});
|
|
4760
|
-
var DTOUpdateVersionInput =
|
|
4773
|
+
var DTOUpdateVersionInput = z171.object({
|
|
4761
4774
|
meta: ObjectMeta2,
|
|
4762
|
-
version:
|
|
4775
|
+
version: z171.string(),
|
|
4763
4776
|
// required for PUT, but not editable
|
|
4764
|
-
changeLog:
|
|
4777
|
+
changeLog: z171.string()
|
|
4765
4778
|
});
|
|
4766
4779
|
|
|
4767
4780
|
// src/api/payloads/documentation/block-definitions.ts
|
|
4768
|
-
import { z as
|
|
4769
|
-
var DTOGetBlockDefinitionsOutput =
|
|
4770
|
-
definitions:
|
|
4781
|
+
import { z as z172 } from "zod";
|
|
4782
|
+
var DTOGetBlockDefinitionsOutput = z172.object({
|
|
4783
|
+
definitions: z172.array(PageBlockDefinition)
|
|
4771
4784
|
});
|
|
4772
4785
|
|
|
4773
4786
|
// src/api/payloads/documentation/design-data-doc-diff.ts
|
|
4774
|
-
import { z as
|
|
4775
|
-
var DTODocumentationPublishTypeQueryParams =
|
|
4776
|
-
environment:
|
|
4787
|
+
import { z as z173 } from "zod";
|
|
4788
|
+
var DTODocumentationPublishTypeQueryParams = z173.object({
|
|
4789
|
+
environment: z173.enum(["Live", "Preview"])
|
|
4777
4790
|
});
|
|
4778
4791
|
|
|
4779
4792
|
// src/api/payloads/export/pipeline.ts
|
|
4780
|
-
import { z as
|
|
4781
|
-
var DTOPipelineCreateBody =
|
|
4782
|
-
name:
|
|
4783
|
-
exporterId:
|
|
4784
|
-
designSystemId:
|
|
4785
|
-
isEnabled:
|
|
4793
|
+
import { z as z174 } from "zod";
|
|
4794
|
+
var DTOPipelineCreateBody = z174.object({
|
|
4795
|
+
name: z174.string(),
|
|
4796
|
+
exporterId: z174.string(),
|
|
4797
|
+
designSystemId: z174.string(),
|
|
4798
|
+
isEnabled: z174.boolean(),
|
|
4786
4799
|
eventType: PipelineEventType,
|
|
4787
|
-
brandPersistentId:
|
|
4788
|
-
themePersistentId:
|
|
4800
|
+
brandPersistentId: z174.string().optional(),
|
|
4801
|
+
themePersistentId: z174.string().optional(),
|
|
4789
4802
|
destination: PipelineDestinationType.optional(),
|
|
4790
4803
|
gitQuery: GitObjectsQuery,
|
|
4791
|
-
destinations:
|
|
4804
|
+
destinations: z174.object({
|
|
4792
4805
|
s3: ExporterDestinationS3.nullish(),
|
|
4793
4806
|
azure: ExporterDestinationAzure.nullish(),
|
|
4794
4807
|
bitbucket: ExporterDestinationBitbucket.nullish(),
|
|
4795
4808
|
github: ExporterDestinationGithub.nullish(),
|
|
4796
4809
|
gitlab: ExporterDestinationGitlab.nullish(),
|
|
4797
4810
|
documentation: ExporterDestinationDocs.nullish(),
|
|
4798
|
-
webhookUrl:
|
|
4811
|
+
webhookUrl: z174.string().nullish()
|
|
4799
4812
|
})
|
|
4800
4813
|
});
|
|
4801
4814
|
var DTOPipelineUpdateBody = DTOPipelineCreateBody.extend({
|
|
4802
|
-
id:
|
|
4815
|
+
id: z174.string()
|
|
4803
4816
|
});
|
|
4804
|
-
var DTOPipelineTriggerBody =
|
|
4805
|
-
designSystemVersionId:
|
|
4817
|
+
var DTOPipelineTriggerBody = z174.object({
|
|
4818
|
+
designSystemVersionId: z174.string()
|
|
4806
4819
|
});
|
|
4807
4820
|
|
|
4808
4821
|
// src/api/payloads/liveblocks/auth.ts
|
|
4809
|
-
import { z as
|
|
4810
|
-
var DTOLiveblocksAuthRequest =
|
|
4811
|
-
room:
|
|
4822
|
+
import { z as z175 } from "zod";
|
|
4823
|
+
var DTOLiveblocksAuthRequest = z175.object({
|
|
4824
|
+
room: z175.string().optional()
|
|
4812
4825
|
});
|
|
4813
4826
|
|
|
4814
4827
|
// src/api/payloads/users/notifications/notification-settings.ts
|
|
4815
|
-
import { z as
|
|
4816
|
-
var DTOUpdateUserNotificationSettingsPayload =
|
|
4828
|
+
import { z as z176 } from "zod";
|
|
4829
|
+
var DTOUpdateUserNotificationSettingsPayload = z176.object({
|
|
4817
4830
|
notificationSettings: UserNotificationSettings
|
|
4818
4831
|
});
|
|
4819
|
-
var DTOUserNotificationSettingsResponse =
|
|
4820
|
-
userId:
|
|
4821
|
-
workspaceId:
|
|
4832
|
+
var DTOUserNotificationSettingsResponse = z176.object({
|
|
4833
|
+
userId: z176.string(),
|
|
4834
|
+
workspaceId: z176.string(),
|
|
4822
4835
|
notificationSettings: UserNotificationSettings
|
|
4823
4836
|
});
|
|
4824
4837
|
|
|
@@ -4826,7 +4839,7 @@ var DTOUserNotificationSettingsResponse = z175.object({
|
|
|
4826
4839
|
var DTOUserProfileUpdatePayload = UserProfileUpdate;
|
|
4827
4840
|
|
|
4828
4841
|
// src/api/payloads/workspaces/workspace-configuration.ts
|
|
4829
|
-
import { z as
|
|
4842
|
+
import { z as z177 } from "zod";
|
|
4830
4843
|
var prohibitedSsoKeys = ["providerId", "metadataXml", "emailDomains"];
|
|
4831
4844
|
function validateSsoPayload(ssoPayload) {
|
|
4832
4845
|
const keys = [];
|
|
@@ -4849,21 +4862,21 @@ function validateSsoPayload(ssoPayload) {
|
|
|
4849
4862
|
keys
|
|
4850
4863
|
};
|
|
4851
4864
|
}
|
|
4852
|
-
var NpmRegistryInput =
|
|
4853
|
-
enabledScopes:
|
|
4854
|
-
customRegistryUrl:
|
|
4855
|
-
bypassProxy:
|
|
4856
|
-
npmProxyRegistryConfigId:
|
|
4857
|
-
npmProxyVersion:
|
|
4858
|
-
registryType:
|
|
4859
|
-
authType:
|
|
4860
|
-
authHeaderName:
|
|
4861
|
-
authHeaderValue:
|
|
4862
|
-
accessToken:
|
|
4863
|
-
username:
|
|
4864
|
-
password:
|
|
4865
|
-
});
|
|
4866
|
-
var WorkspaceConfigurationPayload =
|
|
4865
|
+
var NpmRegistryInput = z177.object({
|
|
4866
|
+
enabledScopes: z177.array(z177.string()),
|
|
4867
|
+
customRegistryUrl: z177.string().optional(),
|
|
4868
|
+
bypassProxy: z177.boolean().optional(),
|
|
4869
|
+
npmProxyRegistryConfigId: z177.string().optional(),
|
|
4870
|
+
npmProxyVersion: z177.number().optional(),
|
|
4871
|
+
registryType: z177.string(),
|
|
4872
|
+
authType: z177.string(),
|
|
4873
|
+
authHeaderName: z177.string(),
|
|
4874
|
+
authHeaderValue: z177.string(),
|
|
4875
|
+
accessToken: z177.string(),
|
|
4876
|
+
username: z177.string(),
|
|
4877
|
+
password: z177.string()
|
|
4878
|
+
});
|
|
4879
|
+
var WorkspaceConfigurationPayload = z177.object({
|
|
4867
4880
|
ipWhitelist: WorkspaceIpSettings.partial().optional(),
|
|
4868
4881
|
sso: SsoProvider.partial().optional(),
|
|
4869
4882
|
npmRegistrySettings: NpmRegistryInput.partial().optional(),
|
|
@@ -4871,343 +4884,347 @@ var WorkspaceConfigurationPayload = z176.object({
|
|
|
4871
4884
|
});
|
|
4872
4885
|
|
|
4873
4886
|
// src/api/payloads/workspaces/workspace-integrations.ts
|
|
4874
|
-
import { z as
|
|
4875
|
-
var DTOWorkspaceIntegrationOauthInput =
|
|
4887
|
+
import { z as z178 } from "zod";
|
|
4888
|
+
var DTOWorkspaceIntegrationOauthInput = z178.object({
|
|
4876
4889
|
type: IntegrationType
|
|
4877
4890
|
});
|
|
4878
|
-
var DTOWorkspaceIntegrationPATInput =
|
|
4879
|
-
userId:
|
|
4891
|
+
var DTOWorkspaceIntegrationPATInput = z178.object({
|
|
4892
|
+
userId: z178.string(),
|
|
4880
4893
|
type: IntegrationType,
|
|
4881
4894
|
token: IntegrationToken
|
|
4882
4895
|
});
|
|
4883
|
-
var DTOWorkspaceIntegrationGetGitObjectsInput =
|
|
4884
|
-
organization:
|
|
4896
|
+
var DTOWorkspaceIntegrationGetGitObjectsInput = z178.object({
|
|
4897
|
+
organization: z178.string().optional(),
|
|
4885
4898
|
// Azure Organization | Bitbucket Workspace slug | Gitlab Group and Sub-Groups | Github Account (User or Organization)
|
|
4886
|
-
project:
|
|
4899
|
+
project: z178.string().optional(),
|
|
4887
4900
|
// Only for Bitbucket and Azure
|
|
4888
|
-
repository:
|
|
4901
|
+
repository: z178.string().optional(),
|
|
4889
4902
|
// For all providers. Pay attention for Gitlab, they call repositories "projects".
|
|
4890
|
-
branch:
|
|
4903
|
+
branch: z178.string().optional(),
|
|
4891
4904
|
// For all providers, useful for PR creations.
|
|
4892
|
-
user:
|
|
4905
|
+
user: z178.string().optional()
|
|
4893
4906
|
// Only for Gitlab User Repositories
|
|
4894
4907
|
});
|
|
4895
4908
|
|
|
4896
4909
|
// src/api/dto/design-systems/version.ts
|
|
4897
|
-
var DTODesignSystemVersion =
|
|
4898
|
-
id:
|
|
4899
|
-
createdAt:
|
|
4910
|
+
var DTODesignSystemVersion = z179.object({
|
|
4911
|
+
id: z179.string(),
|
|
4912
|
+
createdAt: z179.date(),
|
|
4900
4913
|
meta: ObjectMeta,
|
|
4901
|
-
version:
|
|
4902
|
-
isReadonly:
|
|
4903
|
-
changeLog:
|
|
4904
|
-
designSystemId:
|
|
4914
|
+
version: z179.string(),
|
|
4915
|
+
isReadonly: z179.boolean(),
|
|
4916
|
+
changeLog: z179.string(),
|
|
4917
|
+
designSystemId: z179.string()
|
|
4905
4918
|
});
|
|
4906
|
-
var DTODesignSystemVersionsListResponse =
|
|
4907
|
-
designSystemVersions:
|
|
4919
|
+
var DTODesignSystemVersionsListResponse = z179.object({
|
|
4920
|
+
designSystemVersions: z179.array(DTODesignSystemVersion)
|
|
4908
4921
|
});
|
|
4909
|
-
var DTODesignSystemVersionGetResponse =
|
|
4922
|
+
var DTODesignSystemVersionGetResponse = z179.object({
|
|
4910
4923
|
designSystemVersion: DTODesignSystemVersion
|
|
4911
4924
|
});
|
|
4912
|
-
var DTODesignSystemVersionCreationResponse =
|
|
4925
|
+
var DTODesignSystemVersionCreationResponse = z179.object({
|
|
4913
4926
|
meta: ObjectMeta,
|
|
4914
|
-
version:
|
|
4915
|
-
changeLog:
|
|
4916
|
-
isReadOnly:
|
|
4917
|
-
designSystemId:
|
|
4918
|
-
jobId:
|
|
4919
|
-
});
|
|
4920
|
-
var VersionSQSPayload =
|
|
4921
|
-
jobId:
|
|
4922
|
-
designSystemId:
|
|
4927
|
+
version: z179.string(),
|
|
4928
|
+
changeLog: z179.string(),
|
|
4929
|
+
isReadOnly: z179.boolean(),
|
|
4930
|
+
designSystemId: z179.string(),
|
|
4931
|
+
jobId: z179.string()
|
|
4932
|
+
});
|
|
4933
|
+
var VersionSQSPayload = z179.object({
|
|
4934
|
+
jobId: z179.string(),
|
|
4935
|
+
designSystemId: z179.string(),
|
|
4923
4936
|
input: DTOCreateVersionInput
|
|
4924
4937
|
});
|
|
4925
|
-
var DTODesignSystemVersionJobsResponse =
|
|
4926
|
-
jobs:
|
|
4938
|
+
var DTODesignSystemVersionJobsResponse = z179.object({
|
|
4939
|
+
jobs: z179.array(VersionCreationJob)
|
|
4927
4940
|
});
|
|
4928
|
-
var DTODesignSystemVersionJobStatusResponse =
|
|
4941
|
+
var DTODesignSystemVersionJobStatusResponse = z179.object({
|
|
4929
4942
|
job: VersionCreationJob
|
|
4930
4943
|
});
|
|
4931
4944
|
|
|
4932
4945
|
// src/api/dto/design-systems/view.ts
|
|
4933
|
-
import { z as
|
|
4934
|
-
var DTOElementViewColumnSharedAttributes =
|
|
4935
|
-
id:
|
|
4936
|
-
persistentId:
|
|
4937
|
-
width:
|
|
4946
|
+
import { z as z180 } from "zod";
|
|
4947
|
+
var DTOElementViewColumnSharedAttributes = z180.object({
|
|
4948
|
+
id: z180.string(),
|
|
4949
|
+
persistentId: z180.string(),
|
|
4950
|
+
width: z180.number()
|
|
4938
4951
|
});
|
|
4939
4952
|
var DTOElementViewBasePropertyColumn = DTOElementViewColumnSharedAttributes.extend({
|
|
4940
|
-
type:
|
|
4953
|
+
type: z180.literal("BaseProperty"),
|
|
4941
4954
|
basePropertyType: ElementViewBaseColumnType
|
|
4942
4955
|
});
|
|
4943
4956
|
var DTOElementViewPropertyDefinitionColumn = DTOElementViewColumnSharedAttributes.extend({
|
|
4944
|
-
type:
|
|
4945
|
-
propertyDefinitionId:
|
|
4957
|
+
type: z180.literal("PropertyDefinition"),
|
|
4958
|
+
propertyDefinitionId: z180.string()
|
|
4946
4959
|
});
|
|
4947
4960
|
var DTOElementViewThemeColumn = DTOElementViewColumnSharedAttributes.extend({
|
|
4948
|
-
type:
|
|
4949
|
-
themeId:
|
|
4961
|
+
type: z180.literal("Theme"),
|
|
4962
|
+
themeId: z180.string()
|
|
4950
4963
|
});
|
|
4951
|
-
var DTOElementViewColumn =
|
|
4964
|
+
var DTOElementViewColumn = z180.discriminatedUnion("type", [
|
|
4952
4965
|
DTOElementViewBasePropertyColumn,
|
|
4953
4966
|
DTOElementViewPropertyDefinitionColumn,
|
|
4954
4967
|
DTOElementViewThemeColumn
|
|
4955
4968
|
]);
|
|
4956
|
-
var DTOElementView =
|
|
4969
|
+
var DTOElementView = z180.object({
|
|
4957
4970
|
meta: ObjectMeta,
|
|
4958
|
-
persistentId:
|
|
4971
|
+
persistentId: z180.string(),
|
|
4959
4972
|
targetElementType: ElementPropertyTargetType,
|
|
4960
|
-
id:
|
|
4961
|
-
isDefault:
|
|
4962
|
-
columns:
|
|
4973
|
+
id: z180.string(),
|
|
4974
|
+
isDefault: z180.boolean(),
|
|
4975
|
+
columns: z180.array(DTOElementViewColumn)
|
|
4963
4976
|
});
|
|
4964
|
-
var DTOElementViewsListResponse =
|
|
4965
|
-
elementDataViews:
|
|
4977
|
+
var DTOElementViewsListResponse = z180.object({
|
|
4978
|
+
elementDataViews: z180.array(DTOElementView)
|
|
4966
4979
|
});
|
|
4967
4980
|
|
|
4968
4981
|
// src/api/dto/documentation/anchor.ts
|
|
4969
|
-
import { z as
|
|
4982
|
+
import { z as z181 } from "zod";
|
|
4970
4983
|
var DTODocumentationPageAnchor = DocumentationPageAnchor;
|
|
4971
|
-
var DTOGetDocumentationPageAnchorsResponse =
|
|
4972
|
-
anchors:
|
|
4984
|
+
var DTOGetDocumentationPageAnchorsResponse = z181.object({
|
|
4985
|
+
anchors: z181.array(DTODocumentationPageAnchor)
|
|
4973
4986
|
});
|
|
4974
4987
|
|
|
4975
4988
|
// src/api/dto/documentation/documentation-page-snapshot.ts
|
|
4976
|
-
import { z as
|
|
4989
|
+
import { z as z185 } from "zod";
|
|
4977
4990
|
|
|
4978
4991
|
// src/api/dto/elements/documentation/page-v2.ts
|
|
4979
|
-
import { z as
|
|
4992
|
+
import { z as z184 } from "zod";
|
|
4980
4993
|
|
|
4981
4994
|
// src/api/dto/elements/documentation/draft-state.ts
|
|
4982
|
-
import { z as
|
|
4995
|
+
import { z as z183 } from "zod";
|
|
4983
4996
|
|
|
4984
4997
|
// src/api/dto/elements/documentation/item-configuration-v2.ts
|
|
4985
|
-
import { z as
|
|
4998
|
+
import { z as z182 } from "zod";
|
|
4986
4999
|
var DTODocumentationItemHeaderV2 = DocumentationItemHeaderV2;
|
|
4987
|
-
var DTODocumentationItemConfigurationV2 =
|
|
4988
|
-
showSidebar:
|
|
4989
|
-
isPrivate:
|
|
4990
|
-
isHidden:
|
|
5000
|
+
var DTODocumentationItemConfigurationV2 = z182.object({
|
|
5001
|
+
showSidebar: z182.boolean(),
|
|
5002
|
+
isPrivate: z182.boolean(),
|
|
5003
|
+
isHidden: z182.boolean(),
|
|
4991
5004
|
header: DTODocumentationItemHeaderV2
|
|
4992
5005
|
});
|
|
4993
5006
|
|
|
4994
5007
|
// src/api/dto/elements/documentation/draft-state.ts
|
|
4995
|
-
var DTODocumentationDraftChangeType =
|
|
4996
|
-
var DTODocumentationDraftStateCreated =
|
|
4997
|
-
changeType:
|
|
4998
|
-
});
|
|
4999
|
-
var DTODocumentationDraftStateUpdated =
|
|
5000
|
-
changeType:
|
|
5001
|
-
changes:
|
|
5002
|
-
previousTitle:
|
|
5008
|
+
var DTODocumentationDraftChangeType = z183.enum(["Created", "Updated", "Deleted"]);
|
|
5009
|
+
var DTODocumentationDraftStateCreated = z183.object({
|
|
5010
|
+
changeType: z183.literal(DTODocumentationDraftChangeType.enum.Created)
|
|
5011
|
+
});
|
|
5012
|
+
var DTODocumentationDraftStateUpdated = z183.object({
|
|
5013
|
+
changeType: z183.literal(DTODocumentationDraftChangeType.enum.Updated),
|
|
5014
|
+
changes: z183.object({
|
|
5015
|
+
previousTitle: z183.string().optional(),
|
|
5003
5016
|
previousConfiguration: DTODocumentationItemConfigurationV2.optional(),
|
|
5004
|
-
previousContentHash:
|
|
5017
|
+
previousContentHash: z183.string().optional()
|
|
5005
5018
|
})
|
|
5006
5019
|
});
|
|
5007
|
-
var DTODocumentationDraftStateDeleted =
|
|
5008
|
-
changeType:
|
|
5020
|
+
var DTODocumentationDraftStateDeleted = z183.object({
|
|
5021
|
+
changeType: z183.literal(DTODocumentationDraftChangeType.enum.Deleted)
|
|
5009
5022
|
});
|
|
5010
|
-
var DTODocumentationDraftState =
|
|
5023
|
+
var DTODocumentationDraftState = z183.discriminatedUnion("changeType", [
|
|
5011
5024
|
DTODocumentationDraftStateCreated,
|
|
5012
5025
|
DTODocumentationDraftStateUpdated,
|
|
5013
5026
|
DTODocumentationDraftStateDeleted
|
|
5014
5027
|
]);
|
|
5015
5028
|
|
|
5016
5029
|
// src/api/dto/elements/documentation/page-v2.ts
|
|
5017
|
-
var DTODocumentationPageV2 =
|
|
5018
|
-
id:
|
|
5019
|
-
persistentId:
|
|
5020
|
-
designSystemVersionId:
|
|
5021
|
-
title:
|
|
5030
|
+
var DTODocumentationPageV2 = z184.object({
|
|
5031
|
+
id: z184.string(),
|
|
5032
|
+
persistentId: z184.string(),
|
|
5033
|
+
designSystemVersionId: z184.string(),
|
|
5034
|
+
title: z184.string(),
|
|
5022
5035
|
configuration: DTODocumentationItemConfigurationV2,
|
|
5023
|
-
shortPersistentId:
|
|
5024
|
-
slug:
|
|
5025
|
-
userSlug:
|
|
5026
|
-
createdAt:
|
|
5027
|
-
updatedAt:
|
|
5028
|
-
path:
|
|
5036
|
+
shortPersistentId: z184.string(),
|
|
5037
|
+
slug: z184.string().optional(),
|
|
5038
|
+
userSlug: z184.string().optional(),
|
|
5039
|
+
createdAt: z184.coerce.date(),
|
|
5040
|
+
updatedAt: z184.coerce.date(),
|
|
5041
|
+
path: z184.string(),
|
|
5029
5042
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
5030
5043
|
draftState: DTODocumentationDraftState.optional(),
|
|
5031
5044
|
// Backward compatibility
|
|
5032
|
-
type:
|
|
5045
|
+
type: z184.literal("Page")
|
|
5033
5046
|
});
|
|
5034
|
-
var DTOCreateDocumentationPageInputV2 =
|
|
5047
|
+
var DTOCreateDocumentationPageInputV2 = z184.object({
|
|
5035
5048
|
// Identifier
|
|
5036
|
-
persistentId:
|
|
5049
|
+
persistentId: z184.string().uuid(),
|
|
5037
5050
|
// Page properties
|
|
5038
|
-
title:
|
|
5051
|
+
title: z184.string(),
|
|
5039
5052
|
configuration: DTODocumentationItemConfigurationV2.partial().optional(),
|
|
5040
5053
|
// Page placement properties
|
|
5041
|
-
parentPersistentId:
|
|
5042
|
-
afterPersistentId:
|
|
5054
|
+
parentPersistentId: z184.string().uuid(),
|
|
5055
|
+
afterPersistentId: z184.string().uuid().nullish()
|
|
5043
5056
|
});
|
|
5044
|
-
var DTOUpdateDocumentationPageInputV2 =
|
|
5057
|
+
var DTOUpdateDocumentationPageInputV2 = z184.object({
|
|
5045
5058
|
// Identifier of the group to update
|
|
5046
|
-
id:
|
|
5059
|
+
id: z184.string(),
|
|
5047
5060
|
// Page properties
|
|
5048
|
-
title:
|
|
5061
|
+
title: z184.string().optional(),
|
|
5049
5062
|
configuration: DTODocumentationItemConfigurationV2.partial().optional()
|
|
5050
5063
|
});
|
|
5051
|
-
var DTOMoveDocumentationPageInputV2 =
|
|
5064
|
+
var DTOMoveDocumentationPageInputV2 = z184.object({
|
|
5052
5065
|
// Identifier of the group to update
|
|
5053
|
-
id:
|
|
5066
|
+
id: z184.string(),
|
|
5054
5067
|
// Page placement properties
|
|
5055
|
-
parentPersistentId:
|
|
5056
|
-
afterPersistentId:
|
|
5068
|
+
parentPersistentId: z184.string().uuid(),
|
|
5069
|
+
afterPersistentId: z184.string().uuid().nullish()
|
|
5057
5070
|
});
|
|
5058
|
-
var DTODuplicateDocumentationPageInputV2 =
|
|
5071
|
+
var DTODuplicateDocumentationPageInputV2 = z184.object({
|
|
5059
5072
|
// Identifier of the page to duplicate from
|
|
5060
|
-
id:
|
|
5073
|
+
id: z184.string(),
|
|
5061
5074
|
// New page persistent id
|
|
5062
|
-
persistentId:
|
|
5075
|
+
persistentId: z184.string().uuid(),
|
|
5063
5076
|
// Page placement properties
|
|
5064
|
-
parentPersistentId:
|
|
5065
|
-
afterPersistentId:
|
|
5077
|
+
parentPersistentId: z184.string().uuid(),
|
|
5078
|
+
afterPersistentId: z184.string().uuid().nullish()
|
|
5066
5079
|
});
|
|
5067
|
-
var DTODeleteDocumentationPageInputV2 =
|
|
5080
|
+
var DTODeleteDocumentationPageInputV2 = z184.object({
|
|
5068
5081
|
// Identifier
|
|
5069
|
-
id:
|
|
5082
|
+
id: z184.string()
|
|
5070
5083
|
});
|
|
5071
5084
|
|
|
5072
5085
|
// src/api/dto/documentation/documentation-page-snapshot.ts
|
|
5073
|
-
var DTODocumentationPageSnapshot =
|
|
5074
|
-
id:
|
|
5075
|
-
designSystemVersionId:
|
|
5076
|
-
createdAt:
|
|
5077
|
-
updatedAt:
|
|
5086
|
+
var DTODocumentationPageSnapshot = z185.object({
|
|
5087
|
+
id: z185.string(),
|
|
5088
|
+
designSystemVersionId: z185.string(),
|
|
5089
|
+
createdAt: z185.string(),
|
|
5090
|
+
updatedAt: z185.string(),
|
|
5078
5091
|
documentationPage: DTODocumentationPageV2,
|
|
5079
|
-
pageContentHash:
|
|
5092
|
+
pageContentHash: z185.string(),
|
|
5080
5093
|
reason: DesignElementSnapshotReason
|
|
5081
5094
|
});
|
|
5082
5095
|
|
|
5083
5096
|
// src/api/dto/documentation/link-preview.ts
|
|
5084
|
-
import { z as
|
|
5085
|
-
var DTODocumentationLinkPreviewResponse =
|
|
5097
|
+
import { z as z186 } from "zod";
|
|
5098
|
+
var DTODocumentationLinkPreviewResponse = z186.object({
|
|
5086
5099
|
linkPreview: DocumentationLinkPreview
|
|
5087
5100
|
});
|
|
5088
|
-
var DTODocumentationLinkPreviewRequest =
|
|
5089
|
-
url:
|
|
5090
|
-
documentationItemPersistentId:
|
|
5101
|
+
var DTODocumentationLinkPreviewRequest = z186.object({
|
|
5102
|
+
url: z186.string().optional(),
|
|
5103
|
+
documentationItemPersistentId: z186.string().optional()
|
|
5091
5104
|
});
|
|
5092
5105
|
|
|
5093
5106
|
// src/api/dto/documentation/publish.ts
|
|
5094
|
-
import { z as
|
|
5107
|
+
import { z as z190 } from "zod";
|
|
5095
5108
|
|
|
5096
5109
|
// src/api/dto/export/exporter.ts
|
|
5097
|
-
import { z as
|
|
5098
|
-
var DTOExporterType =
|
|
5099
|
-
var DTOExporterSource =
|
|
5100
|
-
var DTOExporterMembershipRole =
|
|
5101
|
-
var DTOExporter =
|
|
5102
|
-
id:
|
|
5103
|
-
name:
|
|
5104
|
-
isPrivate:
|
|
5110
|
+
import { z as z187 } from "zod";
|
|
5111
|
+
var DTOExporterType = z187.enum(["documentation", "code"]);
|
|
5112
|
+
var DTOExporterSource = z187.enum(["git", "upload"]);
|
|
5113
|
+
var DTOExporterMembershipRole = z187.enum(["Owner", "OwnerArchived", "User"]);
|
|
5114
|
+
var DTOExporter = z187.object({
|
|
5115
|
+
id: z187.string(),
|
|
5116
|
+
name: z187.string(),
|
|
5117
|
+
isPrivate: z187.boolean(),
|
|
5105
5118
|
exporterType: DTOExporterType,
|
|
5106
|
-
isDefaultDocumentationExporter:
|
|
5107
|
-
iconURL:
|
|
5119
|
+
isDefaultDocumentationExporter: z187.boolean(),
|
|
5120
|
+
iconURL: z187.string().optional(),
|
|
5108
5121
|
configurationProperties: PulsarContributionConfigurationProperty.array(),
|
|
5109
5122
|
customBlocks: PulsarCustomBlock.array(),
|
|
5110
|
-
blockVariants:
|
|
5111
|
-
usesBrands:
|
|
5112
|
-
usesThemes:
|
|
5123
|
+
blockVariants: z187.record(z187.string(), PulsarContributionVariant.array()),
|
|
5124
|
+
usesBrands: z187.boolean(),
|
|
5125
|
+
usesThemes: z187.boolean(),
|
|
5113
5126
|
source: DTOExporterSource,
|
|
5114
|
-
gitUrl:
|
|
5115
|
-
gitBranch:
|
|
5116
|
-
gitDirectory:
|
|
5127
|
+
gitUrl: z187.string().optional(),
|
|
5128
|
+
gitBranch: z187.string().optional(),
|
|
5129
|
+
gitDirectory: z187.string().optional()
|
|
5117
5130
|
});
|
|
5118
|
-
var DTOExporterMembership =
|
|
5119
|
-
workspaceId:
|
|
5120
|
-
exporterId:
|
|
5131
|
+
var DTOExporterMembership = z187.object({
|
|
5132
|
+
workspaceId: z187.string(),
|
|
5133
|
+
exporterId: z187.string(),
|
|
5121
5134
|
role: DTOExporterMembershipRole
|
|
5122
5135
|
});
|
|
5123
|
-
var DTOExporterCreateOutput =
|
|
5136
|
+
var DTOExporterCreateOutput = z187.object({
|
|
5124
5137
|
exporter: DTOExporter,
|
|
5125
5138
|
membership: DTOExporterMembership
|
|
5126
5139
|
});
|
|
5127
|
-
var DTOExporterGitProviderEnum =
|
|
5128
|
-
var DTOExporterCreateInput =
|
|
5129
|
-
url:
|
|
5140
|
+
var DTOExporterGitProviderEnum = z187.enum(["github", "gitlab", "bitbucket", "azure"]);
|
|
5141
|
+
var DTOExporterCreateInput = z187.object({
|
|
5142
|
+
url: z187.string(),
|
|
5130
5143
|
provider: DTOExporterGitProviderEnum
|
|
5131
5144
|
});
|
|
5132
|
-
var DTOExporterUpdateInput =
|
|
5133
|
-
url:
|
|
5145
|
+
var DTOExporterUpdateInput = z187.object({
|
|
5146
|
+
url: z187.string().optional()
|
|
5134
5147
|
});
|
|
5135
5148
|
|
|
5136
5149
|
// src/api/dto/export/job.ts
|
|
5137
|
-
import { z as
|
|
5138
|
-
var DTOExportJobCreatedBy =
|
|
5139
|
-
userId:
|
|
5140
|
-
userName:
|
|
5150
|
+
import { z as z188 } from "zod";
|
|
5151
|
+
var DTOExportJobCreatedBy = z188.object({
|
|
5152
|
+
userId: z188.string(),
|
|
5153
|
+
userName: z188.string()
|
|
5141
5154
|
});
|
|
5142
|
-
var DTOExportJobDesignSystemPreview =
|
|
5143
|
-
id:
|
|
5155
|
+
var DTOExportJobDesignSystemPreview = z188.object({
|
|
5156
|
+
id: z188.string(),
|
|
5144
5157
|
meta: ObjectMeta
|
|
5145
5158
|
});
|
|
5146
|
-
var DTOExportJobDesignSystemVersionPreview =
|
|
5147
|
-
id:
|
|
5159
|
+
var DTOExportJobDesignSystemVersionPreview = z188.object({
|
|
5160
|
+
id: z188.string(),
|
|
5148
5161
|
meta: ObjectMeta,
|
|
5149
|
-
version:
|
|
5150
|
-
isReadonly:
|
|
5162
|
+
version: z188.string(),
|
|
5163
|
+
isReadonly: z188.boolean()
|
|
5151
5164
|
});
|
|
5152
|
-
var DTOExportJobDestinations =
|
|
5165
|
+
var DTOExportJobDestinations = z188.object({
|
|
5153
5166
|
s3: ExporterDestinationS3.optional(),
|
|
5154
5167
|
azure: ExporterDestinationAzure.optional(),
|
|
5155
5168
|
bitbucket: ExporterDestinationBitbucket.optional(),
|
|
5156
5169
|
github: ExporterDestinationGithub.optional(),
|
|
5157
5170
|
gitlab: ExporterDestinationGitlab.optional(),
|
|
5158
5171
|
documentation: ExporterDestinationDocs.optional(),
|
|
5159
|
-
webhookUrl:
|
|
5172
|
+
webhookUrl: z188.string().optional()
|
|
5160
5173
|
});
|
|
5161
|
-
var DTOExportJob =
|
|
5162
|
-
id:
|
|
5163
|
-
createdAt:
|
|
5164
|
-
finishedAt:
|
|
5165
|
-
index:
|
|
5174
|
+
var DTOExportJob = z188.object({
|
|
5175
|
+
id: z188.string(),
|
|
5176
|
+
createdAt: z188.coerce.date(),
|
|
5177
|
+
finishedAt: z188.coerce.date().optional(),
|
|
5178
|
+
index: z188.number().optional(),
|
|
5166
5179
|
status: ExportJobStatus,
|
|
5167
|
-
estimatedExecutionTime:
|
|
5180
|
+
estimatedExecutionTime: z188.number().optional(),
|
|
5168
5181
|
createdBy: DTOExportJobCreatedBy.optional(),
|
|
5169
5182
|
designSystem: DTOExportJobDesignSystemPreview,
|
|
5170
5183
|
designSystemVersion: DTOExportJobDesignSystemVersionPreview,
|
|
5171
5184
|
destinations: DTOExportJobDestinations,
|
|
5172
|
-
exporterId:
|
|
5173
|
-
scheduleId:
|
|
5185
|
+
exporterId: z188.string(),
|
|
5186
|
+
scheduleId: z188.string().optional(),
|
|
5174
5187
|
result: ExportJobResult.optional(),
|
|
5175
|
-
brandPersistentId:
|
|
5176
|
-
themePersistentId:
|
|
5188
|
+
brandPersistentId: z188.string().optional(),
|
|
5189
|
+
themePersistentId: z188.string().optional()
|
|
5177
5190
|
});
|
|
5178
|
-
var DTOExportJobResponse =
|
|
5191
|
+
var DTOExportJobResponse = z188.object({
|
|
5179
5192
|
job: DTOExportJob
|
|
5180
5193
|
});
|
|
5181
5194
|
|
|
5182
5195
|
// src/api/dto/export/pipeline.ts
|
|
5183
|
-
import { z as
|
|
5184
|
-
var DTOPipeline =
|
|
5185
|
-
id:
|
|
5186
|
-
name:
|
|
5196
|
+
import { z as z189 } from "zod";
|
|
5197
|
+
var DTOPipeline = z189.object({
|
|
5198
|
+
id: z189.string(),
|
|
5199
|
+
name: z189.string(),
|
|
5187
5200
|
eventType: PipelineEventType,
|
|
5188
|
-
isEnabled:
|
|
5189
|
-
workspaceId:
|
|
5190
|
-
designSystemId:
|
|
5191
|
-
exporterId:
|
|
5192
|
-
brandPersistentId:
|
|
5193
|
-
themePersistentId:
|
|
5201
|
+
isEnabled: z189.boolean(),
|
|
5202
|
+
workspaceId: z189.string(),
|
|
5203
|
+
designSystemId: z189.string(),
|
|
5204
|
+
exporterId: z189.string(),
|
|
5205
|
+
brandPersistentId: z189.string().optional(),
|
|
5206
|
+
themePersistentId: z189.string().optional(),
|
|
5194
5207
|
...ExportDestinationsMap.shape,
|
|
5195
5208
|
latestJobs: DTOExportJob.array()
|
|
5196
5209
|
});
|
|
5197
5210
|
|
|
5198
5211
|
// src/api/dto/documentation/publish.ts
|
|
5199
|
-
var DTOPublishDocumentationRequest =
|
|
5200
|
-
environment: PublishedDocEnvironment
|
|
5212
|
+
var DTOPublishDocumentationRequest = z190.object({
|
|
5213
|
+
environment: PublishedDocEnvironment,
|
|
5214
|
+
changes: z190.object({
|
|
5215
|
+
pagePersistentIds: z190.string().array(),
|
|
5216
|
+
groupPersistentIds: z190.string().array()
|
|
5217
|
+
})
|
|
5201
5218
|
});
|
|
5202
|
-
var DTOPublishDocumentationResponse =
|
|
5219
|
+
var DTOPublishDocumentationResponse = z190.object({
|
|
5203
5220
|
job: DTOExportJob
|
|
5204
5221
|
});
|
|
5205
5222
|
|
|
5206
5223
|
// src/api/dto/elements/documentation/group-action.ts
|
|
5207
|
-
import { z as
|
|
5224
|
+
import { z as z192 } from "zod";
|
|
5208
5225
|
|
|
5209
5226
|
// src/api/dto/elements/documentation/group-v2.ts
|
|
5210
|
-
import { z as
|
|
5227
|
+
import { z as z191 } from "zod";
|
|
5211
5228
|
var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
5212
5229
|
sortOrder: true,
|
|
5213
5230
|
parentPersistentId: true,
|
|
@@ -5217,137 +5234,137 @@ var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
|
5217
5234
|
data: true,
|
|
5218
5235
|
shortPersistentId: true
|
|
5219
5236
|
}).extend({
|
|
5220
|
-
title:
|
|
5221
|
-
isRoot:
|
|
5222
|
-
childrenIds:
|
|
5237
|
+
title: z191.string(),
|
|
5238
|
+
isRoot: z191.boolean(),
|
|
5239
|
+
childrenIds: z191.array(z191.string()),
|
|
5223
5240
|
groupBehavior: DocumentationGroupBehavior,
|
|
5224
|
-
shortPersistentId:
|
|
5241
|
+
shortPersistentId: z191.string(),
|
|
5225
5242
|
configuration: DTODocumentationItemConfigurationV2,
|
|
5226
|
-
type:
|
|
5243
|
+
type: z191.literal("Group"),
|
|
5227
5244
|
/** Defined when a group has changed since last publish and can be included into a partial publish */
|
|
5228
5245
|
draftState: DTODocumentationDraftState.optional()
|
|
5229
5246
|
});
|
|
5230
|
-
var DTOCreateDocumentationGroupInput =
|
|
5247
|
+
var DTOCreateDocumentationGroupInput = z191.object({
|
|
5231
5248
|
// Identifier
|
|
5232
|
-
persistentId:
|
|
5249
|
+
persistentId: z191.string().uuid(),
|
|
5233
5250
|
// Group properties
|
|
5234
|
-
title:
|
|
5251
|
+
title: z191.string(),
|
|
5235
5252
|
configuration: DTODocumentationItemConfigurationV2.partial().optional(),
|
|
5236
5253
|
// Group placement properties
|
|
5237
|
-
afterPersistentId:
|
|
5238
|
-
parentPersistentId:
|
|
5254
|
+
afterPersistentId: z191.string().uuid().nullish(),
|
|
5255
|
+
parentPersistentId: z191.string().uuid()
|
|
5239
5256
|
});
|
|
5240
|
-
var DTOUpdateDocumentationGroupInput =
|
|
5257
|
+
var DTOUpdateDocumentationGroupInput = z191.object({
|
|
5241
5258
|
// Identifier of the group to update
|
|
5242
|
-
id:
|
|
5259
|
+
id: z191.string(),
|
|
5243
5260
|
// Group properties
|
|
5244
|
-
title:
|
|
5261
|
+
title: z191.string().optional(),
|
|
5245
5262
|
configuration: DTODocumentationItemConfigurationV2.partial().optional()
|
|
5246
5263
|
});
|
|
5247
|
-
var DTOMoveDocumentationGroupInput =
|
|
5264
|
+
var DTOMoveDocumentationGroupInput = z191.object({
|
|
5248
5265
|
// Identifier of the group to update
|
|
5249
|
-
id:
|
|
5266
|
+
id: z191.string(),
|
|
5250
5267
|
// Group placement properties
|
|
5251
|
-
parentPersistentId:
|
|
5252
|
-
afterPersistentId:
|
|
5268
|
+
parentPersistentId: z191.string().uuid(),
|
|
5269
|
+
afterPersistentId: z191.string().uuid().nullish()
|
|
5253
5270
|
});
|
|
5254
|
-
var DTODuplicateDocumentationGroupInput =
|
|
5271
|
+
var DTODuplicateDocumentationGroupInput = z191.object({
|
|
5255
5272
|
// Identifier of the group to duplicate from
|
|
5256
|
-
id:
|
|
5273
|
+
id: z191.string(),
|
|
5257
5274
|
// New group persistent id
|
|
5258
|
-
persistentId:
|
|
5275
|
+
persistentId: z191.string().uuid(),
|
|
5259
5276
|
// Group placement properties
|
|
5260
|
-
afterPersistentId:
|
|
5261
|
-
parentPersistentId:
|
|
5277
|
+
afterPersistentId: z191.string().uuid().nullish(),
|
|
5278
|
+
parentPersistentId: z191.string().uuid()
|
|
5262
5279
|
});
|
|
5263
|
-
var DTOCreateDocumentationTabInput =
|
|
5280
|
+
var DTOCreateDocumentationTabInput = z191.object({
|
|
5264
5281
|
// New group persistent id
|
|
5265
|
-
persistentId:
|
|
5282
|
+
persistentId: z191.string().uuid(),
|
|
5266
5283
|
// If this is page, we will attempt to convert it to tab
|
|
5267
5284
|
// If this is tab group, we will add a new tab to it
|
|
5268
|
-
fromItemPersistentId:
|
|
5269
|
-
tabName:
|
|
5285
|
+
fromItemPersistentId: z191.string(),
|
|
5286
|
+
tabName: z191.string()
|
|
5270
5287
|
});
|
|
5271
|
-
var DTODeleteDocumentationTabGroupInput =
|
|
5288
|
+
var DTODeleteDocumentationTabGroupInput = z191.object({
|
|
5272
5289
|
// Deleted group id
|
|
5273
|
-
id:
|
|
5290
|
+
id: z191.string()
|
|
5274
5291
|
});
|
|
5275
|
-
var DTODeleteDocumentationGroupInput =
|
|
5292
|
+
var DTODeleteDocumentationGroupInput = z191.object({
|
|
5276
5293
|
// Identifier
|
|
5277
|
-
id:
|
|
5294
|
+
id: z191.string(),
|
|
5278
5295
|
// Deletion options
|
|
5279
|
-
deleteSubtree:
|
|
5296
|
+
deleteSubtree: z191.boolean().default(false)
|
|
5280
5297
|
});
|
|
5281
5298
|
|
|
5282
5299
|
// src/api/dto/elements/documentation/group-action.ts
|
|
5283
|
-
var SuccessPayload =
|
|
5284
|
-
success:
|
|
5300
|
+
var SuccessPayload = z192.object({
|
|
5301
|
+
success: z192.literal(true)
|
|
5285
5302
|
});
|
|
5286
|
-
var DTODocumentationGroupCreateActionOutputV2 =
|
|
5287
|
-
type:
|
|
5303
|
+
var DTODocumentationGroupCreateActionOutputV2 = z192.object({
|
|
5304
|
+
type: z192.literal("DocumentationGroupCreate"),
|
|
5288
5305
|
output: SuccessPayload
|
|
5289
5306
|
});
|
|
5290
|
-
var DTODocumentationTabCreateActionOutputV2 =
|
|
5291
|
-
type:
|
|
5307
|
+
var DTODocumentationTabCreateActionOutputV2 = z192.object({
|
|
5308
|
+
type: z192.literal("DocumentationTabCreate"),
|
|
5292
5309
|
output: SuccessPayload
|
|
5293
5310
|
});
|
|
5294
|
-
var DTODocumentationGroupUpdateActionOutputV2 =
|
|
5295
|
-
type:
|
|
5311
|
+
var DTODocumentationGroupUpdateActionOutputV2 = z192.object({
|
|
5312
|
+
type: z192.literal("DocumentationGroupUpdate"),
|
|
5296
5313
|
output: SuccessPayload
|
|
5297
5314
|
});
|
|
5298
|
-
var DTODocumentationGroupMoveActionOutputV2 =
|
|
5299
|
-
type:
|
|
5315
|
+
var DTODocumentationGroupMoveActionOutputV2 = z192.object({
|
|
5316
|
+
type: z192.literal("DocumentationGroupMove"),
|
|
5300
5317
|
output: SuccessPayload
|
|
5301
5318
|
});
|
|
5302
|
-
var DTODocumentationGroupDuplicateActionOutputV2 =
|
|
5303
|
-
type:
|
|
5319
|
+
var DTODocumentationGroupDuplicateActionOutputV2 = z192.object({
|
|
5320
|
+
type: z192.literal("DocumentationGroupDuplicate"),
|
|
5304
5321
|
output: SuccessPayload
|
|
5305
5322
|
});
|
|
5306
|
-
var DTODocumentationGroupDeleteActionOutputV2 =
|
|
5307
|
-
type:
|
|
5323
|
+
var DTODocumentationGroupDeleteActionOutputV2 = z192.object({
|
|
5324
|
+
type: z192.literal("DocumentationGroupDelete"),
|
|
5308
5325
|
output: SuccessPayload
|
|
5309
5326
|
});
|
|
5310
|
-
var DTODocumentationTabGroupDeleteActionOutputV2 =
|
|
5311
|
-
type:
|
|
5327
|
+
var DTODocumentationTabGroupDeleteActionOutputV2 = z192.object({
|
|
5328
|
+
type: z192.literal("DocumentationTabGroupDelete"),
|
|
5312
5329
|
output: SuccessPayload
|
|
5313
5330
|
});
|
|
5314
|
-
var DTODocumentationGroupCreateActionInputV2 =
|
|
5315
|
-
type:
|
|
5331
|
+
var DTODocumentationGroupCreateActionInputV2 = z192.object({
|
|
5332
|
+
type: z192.literal("DocumentationGroupCreate"),
|
|
5316
5333
|
input: DTOCreateDocumentationGroupInput
|
|
5317
5334
|
});
|
|
5318
|
-
var DTODocumentationTabCreateActionInputV2 =
|
|
5319
|
-
type:
|
|
5335
|
+
var DTODocumentationTabCreateActionInputV2 = z192.object({
|
|
5336
|
+
type: z192.literal("DocumentationTabCreate"),
|
|
5320
5337
|
input: DTOCreateDocumentationTabInput
|
|
5321
5338
|
});
|
|
5322
|
-
var DTODocumentationGroupUpdateActionInputV2 =
|
|
5323
|
-
type:
|
|
5339
|
+
var DTODocumentationGroupUpdateActionInputV2 = z192.object({
|
|
5340
|
+
type: z192.literal("DocumentationGroupUpdate"),
|
|
5324
5341
|
input: DTOUpdateDocumentationGroupInput
|
|
5325
5342
|
});
|
|
5326
|
-
var DTODocumentationGroupMoveActionInputV2 =
|
|
5327
|
-
type:
|
|
5343
|
+
var DTODocumentationGroupMoveActionInputV2 = z192.object({
|
|
5344
|
+
type: z192.literal("DocumentationGroupMove"),
|
|
5328
5345
|
input: DTOMoveDocumentationGroupInput
|
|
5329
5346
|
});
|
|
5330
|
-
var DTODocumentationGroupDuplicateActionInputV2 =
|
|
5331
|
-
type:
|
|
5347
|
+
var DTODocumentationGroupDuplicateActionInputV2 = z192.object({
|
|
5348
|
+
type: z192.literal("DocumentationGroupDuplicate"),
|
|
5332
5349
|
input: DTODuplicateDocumentationGroupInput
|
|
5333
5350
|
});
|
|
5334
|
-
var DTODocumentationGroupDeleteActionInputV2 =
|
|
5335
|
-
type:
|
|
5351
|
+
var DTODocumentationGroupDeleteActionInputV2 = z192.object({
|
|
5352
|
+
type: z192.literal("DocumentationGroupDelete"),
|
|
5336
5353
|
input: DTODeleteDocumentationGroupInput
|
|
5337
5354
|
});
|
|
5338
|
-
var DTODocumentationTabGroupDeleteActionInputV2 =
|
|
5339
|
-
type:
|
|
5355
|
+
var DTODocumentationTabGroupDeleteActionInputV2 = z192.object({
|
|
5356
|
+
type: z192.literal("DocumentationTabGroupDelete"),
|
|
5340
5357
|
input: DTODeleteDocumentationTabGroupInput
|
|
5341
5358
|
});
|
|
5342
5359
|
|
|
5343
5360
|
// src/api/dto/elements/documentation/group-v1.ts
|
|
5344
|
-
import { z as
|
|
5361
|
+
import { z as z194 } from "zod";
|
|
5345
5362
|
|
|
5346
5363
|
// src/api/dto/elements/documentation/item-configuration-v1.ts
|
|
5347
|
-
import { z as
|
|
5348
|
-
var DocumentationColorV1 =
|
|
5349
|
-
aliasTo:
|
|
5350
|
-
value:
|
|
5364
|
+
import { z as z193 } from "zod";
|
|
5365
|
+
var DocumentationColorV1 = z193.object({
|
|
5366
|
+
aliasTo: z193.string().optional(),
|
|
5367
|
+
value: z193.string().optional()
|
|
5351
5368
|
});
|
|
5352
5369
|
var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
5353
5370
|
foregroundColor: true,
|
|
@@ -5356,10 +5373,10 @@ var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
|
5356
5373
|
foregroundColor: DocumentationColorV1.optional(),
|
|
5357
5374
|
backgroundColor: DocumentationColorV1.optional()
|
|
5358
5375
|
});
|
|
5359
|
-
var DTODocumentationItemConfigurationV1 =
|
|
5360
|
-
showSidebar:
|
|
5361
|
-
isPrivate:
|
|
5362
|
-
isHidden:
|
|
5376
|
+
var DTODocumentationItemConfigurationV1 = z193.object({
|
|
5377
|
+
showSidebar: z193.boolean(),
|
|
5378
|
+
isPrivate: z193.boolean(),
|
|
5379
|
+
isHidden: z193.boolean(),
|
|
5363
5380
|
header: DTODocumentationItemHeaderV1
|
|
5364
5381
|
});
|
|
5365
5382
|
|
|
@@ -5373,39 +5390,39 @@ var DTODocumentationGroupStructureV1 = ElementGroup.omit({
|
|
|
5373
5390
|
data: true,
|
|
5374
5391
|
shortPersistentId: true
|
|
5375
5392
|
}).extend({
|
|
5376
|
-
title:
|
|
5377
|
-
isRoot:
|
|
5378
|
-
childrenIds:
|
|
5393
|
+
title: z194.string(),
|
|
5394
|
+
isRoot: z194.boolean(),
|
|
5395
|
+
childrenIds: z194.array(z194.string()),
|
|
5379
5396
|
groupBehavior: DocumentationGroupBehavior,
|
|
5380
|
-
shortPersistentId:
|
|
5381
|
-
type:
|
|
5397
|
+
shortPersistentId: z194.string(),
|
|
5398
|
+
type: z194.literal("Group")
|
|
5382
5399
|
});
|
|
5383
5400
|
var DTODocumentationGroupV1 = DTODocumentationGroupStructureV1.extend({
|
|
5384
5401
|
configuration: DTODocumentationItemConfigurationV1
|
|
5385
5402
|
});
|
|
5386
5403
|
|
|
5387
5404
|
// src/api/dto/elements/documentation/hierarchy.ts
|
|
5388
|
-
import { z as
|
|
5389
|
-
var DTODocumentationHierarchyV2 =
|
|
5390
|
-
pages:
|
|
5405
|
+
import { z as z195 } from "zod";
|
|
5406
|
+
var DTODocumentationHierarchyV2 = z195.object({
|
|
5407
|
+
pages: z195.array(
|
|
5391
5408
|
DTODocumentationPageV2.extend({
|
|
5392
5409
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
5393
5410
|
draftState: DTODocumentationDraftState.optional()
|
|
5394
5411
|
})
|
|
5395
5412
|
),
|
|
5396
|
-
groups:
|
|
5413
|
+
groups: z195.array(
|
|
5397
5414
|
DTODocumentationGroupV2.extend({
|
|
5398
5415
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
5399
5416
|
draftState: DTODocumentationDraftState.optional()
|
|
5400
5417
|
})
|
|
5401
5418
|
),
|
|
5402
|
-
deletedPages:
|
|
5419
|
+
deletedPages: z195.array(
|
|
5403
5420
|
DTODocumentationPageV2.extend({
|
|
5404
5421
|
/** Deleted page is always a draft change */
|
|
5405
5422
|
draftState: DTODocumentationDraftState
|
|
5406
5423
|
})
|
|
5407
5424
|
),
|
|
5408
|
-
deletedGroups:
|
|
5425
|
+
deletedGroups: z195.array(
|
|
5409
5426
|
DTODocumentationGroupV2.extend({
|
|
5410
5427
|
/** Deleted page is always a draft change */
|
|
5411
5428
|
draftState: DTODocumentationDraftState
|
|
@@ -5414,60 +5431,60 @@ var DTODocumentationHierarchyV2 = z194.object({
|
|
|
5414
5431
|
});
|
|
5415
5432
|
|
|
5416
5433
|
// src/api/dto/elements/documentation/page-actions-v2.ts
|
|
5417
|
-
import { z as
|
|
5418
|
-
var SuccessPayload2 =
|
|
5419
|
-
success:
|
|
5434
|
+
import { z as z196 } from "zod";
|
|
5435
|
+
var SuccessPayload2 = z196.object({
|
|
5436
|
+
success: z196.literal(true)
|
|
5420
5437
|
});
|
|
5421
|
-
var DTODocumentationPageCreateActionOutputV2 =
|
|
5422
|
-
type:
|
|
5438
|
+
var DTODocumentationPageCreateActionOutputV2 = z196.object({
|
|
5439
|
+
type: z196.literal("DocumentationPageCreate"),
|
|
5423
5440
|
output: SuccessPayload2
|
|
5424
5441
|
});
|
|
5425
|
-
var DTODocumentationPageUpdateActionOutputV2 =
|
|
5426
|
-
type:
|
|
5442
|
+
var DTODocumentationPageUpdateActionOutputV2 = z196.object({
|
|
5443
|
+
type: z196.literal("DocumentationPageUpdate"),
|
|
5427
5444
|
output: SuccessPayload2
|
|
5428
5445
|
});
|
|
5429
|
-
var DTODocumentationPageMoveActionOutputV2 =
|
|
5430
|
-
type:
|
|
5446
|
+
var DTODocumentationPageMoveActionOutputV2 = z196.object({
|
|
5447
|
+
type: z196.literal("DocumentationPageMove"),
|
|
5431
5448
|
output: SuccessPayload2
|
|
5432
5449
|
});
|
|
5433
|
-
var DTODocumentationPageDuplicateActionOutputV2 =
|
|
5434
|
-
type:
|
|
5450
|
+
var DTODocumentationPageDuplicateActionOutputV2 = z196.object({
|
|
5451
|
+
type: z196.literal("DocumentationPageDuplicate"),
|
|
5435
5452
|
output: SuccessPayload2
|
|
5436
5453
|
});
|
|
5437
|
-
var DTODocumentationPageDeleteActionOutputV2 =
|
|
5438
|
-
type:
|
|
5454
|
+
var DTODocumentationPageDeleteActionOutputV2 = z196.object({
|
|
5455
|
+
type: z196.literal("DocumentationPageDelete"),
|
|
5439
5456
|
output: SuccessPayload2
|
|
5440
5457
|
});
|
|
5441
|
-
var DTODocumentationPageCreateActionInputV2 =
|
|
5442
|
-
type:
|
|
5458
|
+
var DTODocumentationPageCreateActionInputV2 = z196.object({
|
|
5459
|
+
type: z196.literal("DocumentationPageCreate"),
|
|
5443
5460
|
input: DTOCreateDocumentationPageInputV2
|
|
5444
5461
|
});
|
|
5445
|
-
var DTODocumentationPageUpdateActionInputV2 =
|
|
5446
|
-
type:
|
|
5462
|
+
var DTODocumentationPageUpdateActionInputV2 = z196.object({
|
|
5463
|
+
type: z196.literal("DocumentationPageUpdate"),
|
|
5447
5464
|
input: DTOUpdateDocumentationPageInputV2
|
|
5448
5465
|
});
|
|
5449
|
-
var DTODocumentationPageMoveActionInputV2 =
|
|
5450
|
-
type:
|
|
5466
|
+
var DTODocumentationPageMoveActionInputV2 = z196.object({
|
|
5467
|
+
type: z196.literal("DocumentationPageMove"),
|
|
5451
5468
|
input: DTOMoveDocumentationPageInputV2
|
|
5452
5469
|
});
|
|
5453
|
-
var DTODocumentationPageDuplicateActionInputV2 =
|
|
5454
|
-
type:
|
|
5470
|
+
var DTODocumentationPageDuplicateActionInputV2 = z196.object({
|
|
5471
|
+
type: z196.literal("DocumentationPageDuplicate"),
|
|
5455
5472
|
input: DTODuplicateDocumentationPageInputV2
|
|
5456
5473
|
});
|
|
5457
|
-
var DTODocumentationPageDeleteActionInputV2 =
|
|
5458
|
-
type:
|
|
5474
|
+
var DTODocumentationPageDeleteActionInputV2 = z196.object({
|
|
5475
|
+
type: z196.literal("DocumentationPageDelete"),
|
|
5459
5476
|
input: DTODeleteDocumentationPageInputV2
|
|
5460
5477
|
});
|
|
5461
5478
|
|
|
5462
5479
|
// src/api/dto/elements/documentation/page-content.ts
|
|
5463
|
-
import { z as
|
|
5480
|
+
import { z as z197 } from "zod";
|
|
5464
5481
|
var DTODocumentationPageContent = DocumentationPageContent;
|
|
5465
|
-
var DTODocumentationPageContentGetResponse =
|
|
5482
|
+
var DTODocumentationPageContentGetResponse = z197.object({
|
|
5466
5483
|
pageContent: DTODocumentationPageContent
|
|
5467
5484
|
});
|
|
5468
5485
|
|
|
5469
5486
|
// src/api/dto/elements/documentation/page-v1.ts
|
|
5470
|
-
import { z as
|
|
5487
|
+
import { z as z198 } from "zod";
|
|
5471
5488
|
var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
5472
5489
|
data: true,
|
|
5473
5490
|
meta: true,
|
|
@@ -5475,30 +5492,30 @@ var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
|
5475
5492
|
sortOrder: true
|
|
5476
5493
|
}).extend({
|
|
5477
5494
|
configuration: DTODocumentationItemConfigurationV1,
|
|
5478
|
-
blocks:
|
|
5479
|
-
title:
|
|
5480
|
-
path:
|
|
5495
|
+
blocks: z198.array(PageBlockV1),
|
|
5496
|
+
title: z198.string(),
|
|
5497
|
+
path: z198.string()
|
|
5481
5498
|
});
|
|
5482
5499
|
|
|
5483
5500
|
// src/api/dto/elements/figma-nodes/figma-node.ts
|
|
5484
|
-
import { z as
|
|
5485
|
-
var DTOFigmaNodeOrigin =
|
|
5486
|
-
sourceId:
|
|
5487
|
-
fileId:
|
|
5488
|
-
parentName:
|
|
5501
|
+
import { z as z199 } from "zod";
|
|
5502
|
+
var DTOFigmaNodeOrigin = z199.object({
|
|
5503
|
+
sourceId: z199.string(),
|
|
5504
|
+
fileId: z199.string().optional(),
|
|
5505
|
+
parentName: z199.string().optional()
|
|
5489
5506
|
});
|
|
5490
|
-
var DTOFigmaNodeData =
|
|
5507
|
+
var DTOFigmaNodeData = z199.object({
|
|
5491
5508
|
// Id of the node in the Figma file
|
|
5492
|
-
figmaNodeId:
|
|
5509
|
+
figmaNodeId: z199.string(),
|
|
5493
5510
|
// Validity
|
|
5494
|
-
isValid:
|
|
5511
|
+
isValid: z199.boolean(),
|
|
5495
5512
|
// Asset data
|
|
5496
|
-
assetId:
|
|
5497
|
-
assetUrl:
|
|
5513
|
+
assetId: z199.string(),
|
|
5514
|
+
assetUrl: z199.string(),
|
|
5498
5515
|
// Asset metadata
|
|
5499
|
-
assetScale:
|
|
5500
|
-
assetWidth:
|
|
5501
|
-
assetHeight:
|
|
5516
|
+
assetScale: z199.number(),
|
|
5517
|
+
assetWidth: z199.number().optional(),
|
|
5518
|
+
assetHeight: z199.number().optional()
|
|
5502
5519
|
});
|
|
5503
5520
|
var DTOFigmaNode = FigmaFileStructure.omit({
|
|
5504
5521
|
data: true,
|
|
@@ -5507,105 +5524,105 @@ var DTOFigmaNode = FigmaFileStructure.omit({
|
|
|
5507
5524
|
data: DTOFigmaNodeData,
|
|
5508
5525
|
origin: DTOFigmaNodeOrigin
|
|
5509
5526
|
});
|
|
5510
|
-
var DTOFigmaNodeRenderInput =
|
|
5527
|
+
var DTOFigmaNodeRenderInput = z199.object({
|
|
5511
5528
|
// Id of a design system's data source representing a linked Figma file
|
|
5512
|
-
sourceId:
|
|
5529
|
+
sourceId: z199.string(),
|
|
5513
5530
|
// Id of a node within the Figma file
|
|
5514
|
-
figmaFileNodeId:
|
|
5531
|
+
figmaFileNodeId: z199.string()
|
|
5515
5532
|
});
|
|
5516
5533
|
|
|
5517
5534
|
// src/api/dto/elements/figma-nodes/node-actions-v2.ts
|
|
5518
|
-
import { z as
|
|
5519
|
-
var DTOFigmaNodeRenderActionOutput =
|
|
5520
|
-
type:
|
|
5521
|
-
figmaNodes:
|
|
5535
|
+
import { z as z200 } from "zod";
|
|
5536
|
+
var DTOFigmaNodeRenderActionOutput = z200.object({
|
|
5537
|
+
type: z200.literal("FigmaNodeRender"),
|
|
5538
|
+
figmaNodes: z200.array(DTOFigmaNode)
|
|
5522
5539
|
});
|
|
5523
|
-
var DTOFigmaNodeRenderActionInput =
|
|
5524
|
-
type:
|
|
5540
|
+
var DTOFigmaNodeRenderActionInput = z200.object({
|
|
5541
|
+
type: z200.literal("FigmaNodeRender"),
|
|
5525
5542
|
input: DTOFigmaNodeRenderInput.array()
|
|
5526
5543
|
});
|
|
5527
5544
|
|
|
5528
5545
|
// src/api/dto/elements/properties/property-definitions-actions-v2.ts
|
|
5529
|
-
import { z as
|
|
5546
|
+
import { z as z202 } from "zod";
|
|
5530
5547
|
|
|
5531
5548
|
// src/api/dto/elements/properties/property-definitions.ts
|
|
5532
|
-
import { z as
|
|
5549
|
+
import { z as z201 } from "zod";
|
|
5533
5550
|
var CODE_NAME_REGEX2 = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
5534
|
-
var DTOElementPropertyDefinition =
|
|
5535
|
-
id:
|
|
5536
|
-
designSystemVersionId:
|
|
5551
|
+
var DTOElementPropertyDefinition = z201.object({
|
|
5552
|
+
id: z201.string(),
|
|
5553
|
+
designSystemVersionId: z201.string(),
|
|
5537
5554
|
meta: ObjectMeta,
|
|
5538
|
-
persistentId:
|
|
5555
|
+
persistentId: z201.string(),
|
|
5539
5556
|
type: ElementPropertyTypeSchema,
|
|
5540
5557
|
targetElementType: ElementPropertyTargetType,
|
|
5541
|
-
codeName:
|
|
5542
|
-
options:
|
|
5558
|
+
codeName: z201.string().regex(CODE_NAME_REGEX2),
|
|
5559
|
+
options: z201.array(ElementPropertyDefinitionOption).optional(),
|
|
5543
5560
|
linkElementType: ElementPropertyLinkType.optional()
|
|
5544
5561
|
});
|
|
5545
|
-
var DTOElementPropertyDefinitionsGetResponse =
|
|
5546
|
-
definitions:
|
|
5562
|
+
var DTOElementPropertyDefinitionsGetResponse = z201.object({
|
|
5563
|
+
definitions: z201.array(DTOElementPropertyDefinition)
|
|
5547
5564
|
});
|
|
5548
5565
|
var DTOCreateElementPropertyDefinitionInputV2 = DTOElementPropertyDefinition.omit({
|
|
5549
5566
|
id: true,
|
|
5550
5567
|
designSystemVersionId: true
|
|
5551
5568
|
});
|
|
5552
|
-
var DTOUpdateElementPropertyDefinitionInputV2 =
|
|
5553
|
-
id:
|
|
5554
|
-
name:
|
|
5555
|
-
description:
|
|
5556
|
-
codeName:
|
|
5557
|
-
options:
|
|
5569
|
+
var DTOUpdateElementPropertyDefinitionInputV2 = z201.object({
|
|
5570
|
+
id: z201.string(),
|
|
5571
|
+
name: z201.string().optional(),
|
|
5572
|
+
description: z201.string().optional(),
|
|
5573
|
+
codeName: z201.string().regex(CODE_NAME_REGEX2).optional(),
|
|
5574
|
+
options: z201.array(ElementPropertyDefinitionOption).optional()
|
|
5558
5575
|
});
|
|
5559
|
-
var DTODeleteElementPropertyDefinitionInputV2 =
|
|
5560
|
-
id:
|
|
5576
|
+
var DTODeleteElementPropertyDefinitionInputV2 = z201.object({
|
|
5577
|
+
id: z201.string()
|
|
5561
5578
|
});
|
|
5562
5579
|
|
|
5563
5580
|
// src/api/dto/elements/properties/property-definitions-actions-v2.ts
|
|
5564
|
-
var SuccessPayload3 =
|
|
5565
|
-
success:
|
|
5581
|
+
var SuccessPayload3 = z202.object({
|
|
5582
|
+
success: z202.literal(true)
|
|
5566
5583
|
});
|
|
5567
|
-
var DTOPropertyDefinitionCreateActionOutputV2 =
|
|
5568
|
-
type:
|
|
5584
|
+
var DTOPropertyDefinitionCreateActionOutputV2 = z202.object({
|
|
5585
|
+
type: z202.literal("PropertyDefinitionCreate"),
|
|
5569
5586
|
definition: DTOElementPropertyDefinition
|
|
5570
5587
|
});
|
|
5571
|
-
var DTOPropertyDefinitionUpdateActionOutputV2 =
|
|
5572
|
-
type:
|
|
5588
|
+
var DTOPropertyDefinitionUpdateActionOutputV2 = z202.object({
|
|
5589
|
+
type: z202.literal("PropertyDefinitionUpdate"),
|
|
5573
5590
|
definition: DTOElementPropertyDefinition
|
|
5574
5591
|
});
|
|
5575
|
-
var DTOPropertyDefinitionDeleteActionOutputV2 =
|
|
5576
|
-
type:
|
|
5592
|
+
var DTOPropertyDefinitionDeleteActionOutputV2 = z202.object({
|
|
5593
|
+
type: z202.literal("PropertyDefinitionDelete"),
|
|
5577
5594
|
output: SuccessPayload3
|
|
5578
5595
|
});
|
|
5579
|
-
var DTOPropertyDefinitionCreateActionInputV2 =
|
|
5580
|
-
type:
|
|
5596
|
+
var DTOPropertyDefinitionCreateActionInputV2 = z202.object({
|
|
5597
|
+
type: z202.literal("PropertyDefinitionCreate"),
|
|
5581
5598
|
input: DTOCreateElementPropertyDefinitionInputV2
|
|
5582
5599
|
});
|
|
5583
|
-
var DTOPropertyDefinitionUpdateActionInputV2 =
|
|
5584
|
-
type:
|
|
5600
|
+
var DTOPropertyDefinitionUpdateActionInputV2 = z202.object({
|
|
5601
|
+
type: z202.literal("PropertyDefinitionUpdate"),
|
|
5585
5602
|
input: DTOUpdateElementPropertyDefinitionInputV2
|
|
5586
5603
|
});
|
|
5587
|
-
var DTOPropertyDefinitionDeleteActionInputV2 =
|
|
5588
|
-
type:
|
|
5604
|
+
var DTOPropertyDefinitionDeleteActionInputV2 = z202.object({
|
|
5605
|
+
type: z202.literal("PropertyDefinitionDelete"),
|
|
5589
5606
|
input: DTODeleteElementPropertyDefinitionInputV2
|
|
5590
5607
|
});
|
|
5591
5608
|
|
|
5592
5609
|
// src/api/dto/elements/properties/property-values.ts
|
|
5593
|
-
import { z as
|
|
5594
|
-
var DTOElementPropertyValue =
|
|
5595
|
-
id:
|
|
5596
|
-
designSystemVersionId:
|
|
5597
|
-
definitionId:
|
|
5598
|
-
targetElementId:
|
|
5599
|
-
value:
|
|
5600
|
-
valuePreview:
|
|
5610
|
+
import { z as z203 } from "zod";
|
|
5611
|
+
var DTOElementPropertyValue = z203.object({
|
|
5612
|
+
id: z203.string(),
|
|
5613
|
+
designSystemVersionId: z203.string(),
|
|
5614
|
+
definitionId: z203.string(),
|
|
5615
|
+
targetElementId: z203.string(),
|
|
5616
|
+
value: z203.union([z203.string(), z203.number(), z203.boolean()]).optional(),
|
|
5617
|
+
valuePreview: z203.string().optional()
|
|
5601
5618
|
});
|
|
5602
|
-
var DTOElementPropertyValuesGetResponse =
|
|
5603
|
-
values:
|
|
5619
|
+
var DTOElementPropertyValuesGetResponse = z203.object({
|
|
5620
|
+
values: z203.array(DTOElementPropertyValue)
|
|
5604
5621
|
});
|
|
5605
5622
|
|
|
5606
5623
|
// src/api/dto/elements/elements-action-v2.ts
|
|
5607
|
-
import { z as
|
|
5608
|
-
var DTOElementActionOutput =
|
|
5624
|
+
import { z as z204 } from "zod";
|
|
5625
|
+
var DTOElementActionOutput = z204.discriminatedUnion("type", [
|
|
5609
5626
|
// Documentation pages
|
|
5610
5627
|
DTODocumentationPageCreateActionOutputV2,
|
|
5611
5628
|
DTODocumentationPageUpdateActionOutputV2,
|
|
@@ -5627,7 +5644,7 @@ var DTOElementActionOutput = z203.discriminatedUnion("type", [
|
|
|
5627
5644
|
DTOPropertyDefinitionUpdateActionOutputV2,
|
|
5628
5645
|
DTOPropertyDefinitionDeleteActionOutputV2
|
|
5629
5646
|
]);
|
|
5630
|
-
var DTOElementActionInput =
|
|
5647
|
+
var DTOElementActionInput = z204.discriminatedUnion("type", [
|
|
5631
5648
|
// Documentation pages
|
|
5632
5649
|
DTODocumentationPageCreateActionInputV2,
|
|
5633
5650
|
DTODocumentationPageUpdateActionInputV2,
|
|
@@ -5651,141 +5668,141 @@ var DTOElementActionInput = z203.discriminatedUnion("type", [
|
|
|
5651
5668
|
]);
|
|
5652
5669
|
|
|
5653
5670
|
// src/api/dto/elements/get-elements-v2.ts
|
|
5654
|
-
import { z as
|
|
5655
|
-
var DTOElementsGetTypeFilter =
|
|
5656
|
-
var DTOElementsGetQuerySchema =
|
|
5657
|
-
types:
|
|
5671
|
+
import { z as z205 } from "zod";
|
|
5672
|
+
var DTOElementsGetTypeFilter = z205.enum(["FigmaNode"]);
|
|
5673
|
+
var DTOElementsGetQuerySchema = z205.object({
|
|
5674
|
+
types: z205.string().transform((val) => val.split(",").map((v) => DTOElementsGetTypeFilter.parse(v)))
|
|
5658
5675
|
});
|
|
5659
|
-
var DTOElementsGetOutput =
|
|
5660
|
-
figmaNodes:
|
|
5676
|
+
var DTOElementsGetOutput = z205.object({
|
|
5677
|
+
figmaNodes: z205.array(DTOFigmaNode).optional()
|
|
5661
5678
|
});
|
|
5662
5679
|
|
|
5663
5680
|
// src/api/dto/figma-components/assets/download.ts
|
|
5664
|
-
import { z as
|
|
5665
|
-
var DTOAssetRenderConfiguration =
|
|
5666
|
-
prefix:
|
|
5667
|
-
suffix:
|
|
5668
|
-
scale:
|
|
5669
|
-
format:
|
|
5670
|
-
});
|
|
5671
|
-
var DTORenderedAssetFile =
|
|
5672
|
-
assetId:
|
|
5673
|
-
fileName:
|
|
5674
|
-
sourceUrl:
|
|
5681
|
+
import { z as z206 } from "zod";
|
|
5682
|
+
var DTOAssetRenderConfiguration = z206.object({
|
|
5683
|
+
prefix: z206.string().optional(),
|
|
5684
|
+
suffix: z206.string().optional(),
|
|
5685
|
+
scale: z206.enum(["x1", "x2", "x3", "x4"]),
|
|
5686
|
+
format: z206.enum(["png", "pdf", "svg"])
|
|
5687
|
+
});
|
|
5688
|
+
var DTORenderedAssetFile = z206.object({
|
|
5689
|
+
assetId: z206.string(),
|
|
5690
|
+
fileName: z206.string(),
|
|
5691
|
+
sourceUrl: z206.string(),
|
|
5675
5692
|
settings: DTOAssetRenderConfiguration,
|
|
5676
|
-
originalName:
|
|
5693
|
+
originalName: z206.string()
|
|
5677
5694
|
});
|
|
5678
|
-
var DTODownloadAssetsRequest =
|
|
5679
|
-
persistentIds:
|
|
5695
|
+
var DTODownloadAssetsRequest = z206.object({
|
|
5696
|
+
persistentIds: z206.array(z206.string().uuid()).optional(),
|
|
5680
5697
|
settings: DTOAssetRenderConfiguration.array()
|
|
5681
5698
|
});
|
|
5682
|
-
var DTODownloadAssetsResponse =
|
|
5699
|
+
var DTODownloadAssetsResponse = z206.object({
|
|
5683
5700
|
items: DTORenderedAssetFile.array()
|
|
5684
5701
|
});
|
|
5685
5702
|
|
|
5686
5703
|
// src/api/dto/liveblocks/auth-response.ts
|
|
5687
|
-
import { z as
|
|
5688
|
-
var DTOLiveblocksAuthResponse =
|
|
5689
|
-
token:
|
|
5704
|
+
import { z as z207 } from "zod";
|
|
5705
|
+
var DTOLiveblocksAuthResponse = z207.object({
|
|
5706
|
+
token: z207.string()
|
|
5690
5707
|
});
|
|
5691
5708
|
|
|
5692
5709
|
// src/api/dto/users/profile/update.ts
|
|
5693
|
-
import { z as
|
|
5694
|
-
var DTOUserProfileUpdateResponse =
|
|
5710
|
+
import { z as z208 } from "zod";
|
|
5711
|
+
var DTOUserProfileUpdateResponse = z208.object({
|
|
5695
5712
|
user: User
|
|
5696
5713
|
});
|
|
5697
5714
|
|
|
5698
5715
|
// src/api/dto/workspaces/git.ts
|
|
5699
|
-
import { z as
|
|
5700
|
-
var DTOGitOrganization =
|
|
5701
|
-
id:
|
|
5702
|
-
name:
|
|
5703
|
-
url:
|
|
5704
|
-
slug:
|
|
5705
|
-
});
|
|
5706
|
-
var DTOGitProject =
|
|
5707
|
-
id:
|
|
5708
|
-
name:
|
|
5709
|
-
url:
|
|
5710
|
-
slug:
|
|
5711
|
-
});
|
|
5712
|
-
var DTOGitRepository =
|
|
5713
|
-
id:
|
|
5714
|
-
name:
|
|
5715
|
-
url:
|
|
5716
|
-
slug:
|
|
5717
|
-
defaultBranch:
|
|
5718
|
-
});
|
|
5719
|
-
var DTOGitBranch =
|
|
5720
|
-
name:
|
|
5721
|
-
lastCommitId:
|
|
5716
|
+
import { z as z209 } from "zod";
|
|
5717
|
+
var DTOGitOrganization = z209.object({
|
|
5718
|
+
id: z209.string(),
|
|
5719
|
+
name: z209.string(),
|
|
5720
|
+
url: z209.string(),
|
|
5721
|
+
slug: z209.string()
|
|
5722
|
+
});
|
|
5723
|
+
var DTOGitProject = z209.object({
|
|
5724
|
+
id: z209.string(),
|
|
5725
|
+
name: z209.string(),
|
|
5726
|
+
url: z209.string(),
|
|
5727
|
+
slug: z209.string()
|
|
5728
|
+
});
|
|
5729
|
+
var DTOGitRepository = z209.object({
|
|
5730
|
+
id: z209.string(),
|
|
5731
|
+
name: z209.string(),
|
|
5732
|
+
url: z209.string(),
|
|
5733
|
+
slug: z209.string(),
|
|
5734
|
+
defaultBranch: z209.string().optional()
|
|
5735
|
+
});
|
|
5736
|
+
var DTOGitBranch = z209.object({
|
|
5737
|
+
name: z209.string(),
|
|
5738
|
+
lastCommitId: z209.string()
|
|
5722
5739
|
});
|
|
5723
5740
|
|
|
5724
5741
|
// src/api/dto/workspaces/integrations.ts
|
|
5725
|
-
import { z as
|
|
5742
|
+
import { z as z210 } from "zod";
|
|
5726
5743
|
var DTOIntegrationCredentials = IntegrationCredentials.omit({
|
|
5727
5744
|
accessToken: true,
|
|
5728
5745
|
refreshToken: true
|
|
5729
5746
|
});
|
|
5730
|
-
var DTOIntegration =
|
|
5731
|
-
id:
|
|
5732
|
-
workspaceId:
|
|
5747
|
+
var DTOIntegration = z210.object({
|
|
5748
|
+
id: z210.string(),
|
|
5749
|
+
workspaceId: z210.string(),
|
|
5733
5750
|
type: ExtendedIntegrationType,
|
|
5734
|
-
createdAt:
|
|
5735
|
-
integrationCredentials:
|
|
5736
|
-
integrationDesignSystems:
|
|
5751
|
+
createdAt: z210.coerce.date(),
|
|
5752
|
+
integrationCredentials: z210.array(DTOIntegrationCredentials).optional(),
|
|
5753
|
+
integrationDesignSystems: z210.array(IntegrationDesignSystem).optional()
|
|
5737
5754
|
});
|
|
5738
|
-
var DTOIntegrationOAuthGetResponse =
|
|
5739
|
-
url:
|
|
5755
|
+
var DTOIntegrationOAuthGetResponse = z210.object({
|
|
5756
|
+
url: z210.string()
|
|
5740
5757
|
});
|
|
5741
|
-
var DTOIntegrationPostResponse =
|
|
5758
|
+
var DTOIntegrationPostResponse = z210.object({
|
|
5742
5759
|
integration: DTOIntegration
|
|
5743
5760
|
});
|
|
5744
|
-
var DTOIntegrationsGetListResponse =
|
|
5761
|
+
var DTOIntegrationsGetListResponse = z210.object({
|
|
5745
5762
|
integrations: DTOIntegration.array()
|
|
5746
5763
|
});
|
|
5747
5764
|
|
|
5748
5765
|
// src/api/dto/workspaces/membership.ts
|
|
5749
|
-
import { z as
|
|
5766
|
+
import { z as z213 } from "zod";
|
|
5750
5767
|
|
|
5751
5768
|
// src/api/dto/workspaces/workspace.ts
|
|
5752
|
-
import { z as
|
|
5769
|
+
import { z as z212 } from "zod";
|
|
5753
5770
|
|
|
5754
5771
|
// src/api/dto/workspaces/npm-registry.ts
|
|
5755
|
-
import { z as
|
|
5772
|
+
import { z as z211 } from "zod";
|
|
5756
5773
|
var DTONpmRegistryConfigConstants = {
|
|
5757
5774
|
passwordPlaceholder: "redacted"
|
|
5758
5775
|
};
|
|
5759
|
-
var DTONpmRegistryConfig =
|
|
5776
|
+
var DTONpmRegistryConfig = z211.object({
|
|
5760
5777
|
// Registry basic configuration
|
|
5761
5778
|
registryType: NpmRegistryType,
|
|
5762
|
-
registryUrl:
|
|
5763
|
-
customRegistryUrl:
|
|
5779
|
+
registryUrl: z211.string(),
|
|
5780
|
+
customRegistryUrl: z211.string().optional(),
|
|
5764
5781
|
// URL of Supernova NPM packages proxy
|
|
5765
|
-
proxyUrl:
|
|
5782
|
+
proxyUrl: z211.string(),
|
|
5766
5783
|
// Auth configuration
|
|
5767
5784
|
authType: NpmRegistryAuthType,
|
|
5768
|
-
accessToken:
|
|
5769
|
-
username:
|
|
5770
|
-
password:
|
|
5785
|
+
accessToken: z211.literal(DTONpmRegistryConfigConstants.passwordPlaceholder).optional(),
|
|
5786
|
+
username: z211.string().optional(),
|
|
5787
|
+
password: z211.literal(DTONpmRegistryConfigConstants.passwordPlaceholder).optional(),
|
|
5771
5788
|
// NPM package scopes for whih the proxy should be enabled
|
|
5772
|
-
enabledScopes:
|
|
5789
|
+
enabledScopes: z211.array(z211.string()),
|
|
5773
5790
|
// True if client should bypass Supernova proxy and connect directly to the registry
|
|
5774
5791
|
// (e.g. when the NPM registry is behind a VPN or firewall which prevents Supernova from accessing it)
|
|
5775
|
-
bypassProxy:
|
|
5792
|
+
bypassProxy: z211.boolean()
|
|
5776
5793
|
});
|
|
5777
5794
|
|
|
5778
5795
|
// src/api/dto/workspaces/workspace.ts
|
|
5779
|
-
var DTOWorkspace =
|
|
5780
|
-
id:
|
|
5796
|
+
var DTOWorkspace = z212.object({
|
|
5797
|
+
id: z212.string(),
|
|
5781
5798
|
profile: WorkspaceProfile,
|
|
5782
5799
|
subscription: Subscription,
|
|
5783
5800
|
npmRegistry: DTONpmRegistryConfig.optional()
|
|
5784
5801
|
});
|
|
5785
5802
|
|
|
5786
5803
|
// src/api/dto/workspaces/membership.ts
|
|
5787
|
-
var DTOWorkspaceRole =
|
|
5788
|
-
var DTOUserWorkspaceMembership =
|
|
5804
|
+
var DTOWorkspaceRole = z213.enum(["Owner", "Admin", "Creator", "Viewer", "Billing"]);
|
|
5805
|
+
var DTOUserWorkspaceMembership = z213.object({
|
|
5789
5806
|
// Workspace the user is a member of
|
|
5790
5807
|
workspace: DTOWorkspace,
|
|
5791
5808
|
// Assigned role the user has in the workspace
|
|
@@ -5795,8 +5812,8 @@ var DTOUserWorkspaceMembership = z212.object({
|
|
|
5795
5812
|
// when a workspace's subscription is downgraded to free tier
|
|
5796
5813
|
effectiveRole: DTOWorkspaceRole
|
|
5797
5814
|
});
|
|
5798
|
-
var DTOUserWorkspaceMembershipsResponse =
|
|
5799
|
-
membership:
|
|
5815
|
+
var DTOUserWorkspaceMembershipsResponse = z213.object({
|
|
5816
|
+
membership: z213.array(DTOUserWorkspaceMembership)
|
|
5800
5817
|
});
|
|
5801
5818
|
|
|
5802
5819
|
// src/utils/hash.ts
|
|
@@ -5848,7 +5865,7 @@ function generateHash(input) {
|
|
|
5848
5865
|
}
|
|
5849
5866
|
|
|
5850
5867
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
5851
|
-
import { z as
|
|
5868
|
+
import { z as z214 } from "zod";
|
|
5852
5869
|
|
|
5853
5870
|
// src/yjs/version-room/frontend.ts
|
|
5854
5871
|
import deepEqual from "deep-equal";
|
|
@@ -5923,64 +5940,34 @@ var VersionRoomBaseYDoc = class {
|
|
|
5923
5940
|
return this.yDoc.getMap("documentationInternalSettings");
|
|
5924
5941
|
}
|
|
5925
5942
|
//
|
|
5926
|
-
// Documentation page
|
|
5943
|
+
// Documentation page snapshot
|
|
5927
5944
|
//
|
|
5928
|
-
|
|
5945
|
+
getPageSnapshots() {
|
|
5929
5946
|
return this.getObjects(this.documentationPagePublishedStatesYMap, DocumentationPageSnapshot);
|
|
5930
5947
|
}
|
|
5931
|
-
|
|
5948
|
+
updatePageSnapshots(snapshots) {
|
|
5932
5949
|
this.setObjects(this.documentationPagePublishedStatesYMap, snapshots);
|
|
5933
5950
|
}
|
|
5934
|
-
|
|
5951
|
+
deletePageSnapshots(ids) {
|
|
5935
5952
|
this.deleteObjects(this.documentationPagePublishedStatesYMap, ids);
|
|
5936
5953
|
}
|
|
5937
5954
|
get documentationPagePublishedStatesYMap() {
|
|
5938
|
-
return this.yDoc.getMap("
|
|
5955
|
+
return this.yDoc.getMap("documentationPageSnapshots");
|
|
5939
5956
|
}
|
|
5940
5957
|
//
|
|
5941
|
-
// Documentation
|
|
5958
|
+
// Documentation group snapshots
|
|
5942
5959
|
//
|
|
5943
|
-
|
|
5944
|
-
return this.getObjects(this.documentationPageDeletedStatesYMap, DocumentationPageSnapshot);
|
|
5945
|
-
}
|
|
5946
|
-
updatePageDeletedSnapshots(snapshots) {
|
|
5947
|
-
this.setObjects(this.documentationPageDeletedStatesYMap, snapshots);
|
|
5948
|
-
}
|
|
5949
|
-
deletePageDeletedSnapshots(ids) {
|
|
5950
|
-
this.deleteObjects(this.documentationPageDeletedStatesYMap, ids);
|
|
5951
|
-
}
|
|
5952
|
-
get documentationPageDeletedStatesYMap() {
|
|
5953
|
-
return this.yDoc.getMap("documentationPageDeletedSnapshots");
|
|
5954
|
-
}
|
|
5955
|
-
//
|
|
5956
|
-
// Documentation group published snapshots
|
|
5957
|
-
//
|
|
5958
|
-
getGroupPublishedSnapshots() {
|
|
5960
|
+
getGroupSnapshots() {
|
|
5959
5961
|
return this.getObjects(this.documentationGroupPublishedStatesYMap, ElementGroupSnapshot);
|
|
5960
5962
|
}
|
|
5961
|
-
|
|
5963
|
+
updateGroupSnapshots(snapshots) {
|
|
5962
5964
|
this.setObjects(this.documentationGroupPublishedStatesYMap, snapshots);
|
|
5963
5965
|
}
|
|
5964
|
-
|
|
5966
|
+
deleteGroupSnapshots(ids) {
|
|
5965
5967
|
this.deleteObjects(this.documentationGroupPublishedStatesYMap, ids);
|
|
5966
5968
|
}
|
|
5967
5969
|
get documentationGroupPublishedStatesYMap() {
|
|
5968
|
-
return this.yDoc.getMap("
|
|
5969
|
-
}
|
|
5970
|
-
//
|
|
5971
|
-
// Documentation group deleted snapshots
|
|
5972
|
-
//
|
|
5973
|
-
getGroupDeletedSnapshots() {
|
|
5974
|
-
return this.getObjects(this.documentationGroupDeletedStatesYMap, ElementGroupSnapshot);
|
|
5975
|
-
}
|
|
5976
|
-
updateGroupDeletedSnapshots(snapshots) {
|
|
5977
|
-
this.setObjects(this.documentationGroupDeletedStatesYMap, snapshots);
|
|
5978
|
-
}
|
|
5979
|
-
deleteGroupDeletedSnapshots(ids) {
|
|
5980
|
-
this.deleteObjects(this.documentationGroupDeletedStatesYMap, ids);
|
|
5981
|
-
}
|
|
5982
|
-
get documentationGroupDeletedStatesYMap() {
|
|
5983
|
-
return this.yDoc.getMap("documentationGroupDeletedSnapshots");
|
|
5970
|
+
return this.yDoc.getMap("documentationGroupSnapshots");
|
|
5984
5971
|
}
|
|
5985
5972
|
//
|
|
5986
5973
|
// Utils
|
|
@@ -6029,21 +6016,33 @@ var FrontendVersionRoomYDoc = class {
|
|
|
6029
6016
|
const doc = new VersionRoomBaseYDoc(this.yDoc);
|
|
6030
6017
|
const pages = doc.getPages();
|
|
6031
6018
|
const groups = doc.getGroups();
|
|
6019
|
+
const pageSnapshots = doc.getPageSnapshots();
|
|
6020
|
+
const groupSnapshots = doc.getGroupSnapshots();
|
|
6032
6021
|
const settings = doc.getDocumentationInternalSettings();
|
|
6033
6022
|
const pageDTOs = documentationPagesToDTOV2(pages, groups, settings.routingVersion);
|
|
6034
|
-
const pageDraftStates = this.buildPageDraftStates(pages);
|
|
6023
|
+
const pageDraftStates = this.buildPageDraftStates(pages, pageSnapshots);
|
|
6035
6024
|
pageDTOs.forEach((p) => {
|
|
6036
6025
|
const draftState = pageDraftStates.get(p.id);
|
|
6037
6026
|
draftState && (p.draftState = draftState);
|
|
6038
6027
|
});
|
|
6039
6028
|
const groupDTOs = elementGroupsToDocumentationGroupDTOV2(groups, pages);
|
|
6040
|
-
const groupDraftStates = this.buildGroupDraftStates(groups);
|
|
6029
|
+
const groupDraftStates = this.buildGroupDraftStates(groups, groupSnapshots);
|
|
6041
6030
|
groupDTOs.forEach((g) => {
|
|
6042
6031
|
const draftState = groupDraftStates.get(g.id);
|
|
6043
6032
|
draftState && (g.draftState = draftState);
|
|
6044
6033
|
});
|
|
6045
|
-
const
|
|
6046
|
-
const
|
|
6034
|
+
const pageIds = new Set(pages.map((p) => p.id));
|
|
6035
|
+
const deletedPagesMap = mapByUnique(
|
|
6036
|
+
pageSnapshots.filter((s) => !pageIds.has(s.page.id)).map((s) => s.page),
|
|
6037
|
+
(p) => p.id
|
|
6038
|
+
);
|
|
6039
|
+
const deletedPages = Array.from(deletedPagesMap.values());
|
|
6040
|
+
const groupIds = new Set(groups.map((p) => p.id));
|
|
6041
|
+
const deletedGroupsMap = mapByUnique(
|
|
6042
|
+
groupSnapshots.filter((s) => !groupIds.has(s.group.id)).map((s) => s.group),
|
|
6043
|
+
(g) => g.id
|
|
6044
|
+
);
|
|
6045
|
+
const deletedGroups = Array.from(deletedGroupsMap.values());
|
|
6047
6046
|
const deletedPageDTOs = documentationPagesToDTOV2(
|
|
6048
6047
|
deletedPages,
|
|
6049
6048
|
[...groups, ...deletedGroups],
|
|
@@ -6064,10 +6063,10 @@ var FrontendVersionRoomYDoc = class {
|
|
|
6064
6063
|
//
|
|
6065
6064
|
// Drafts - Pages
|
|
6066
6065
|
//
|
|
6067
|
-
buildPageDraftStates(pages) {
|
|
6066
|
+
buildPageDraftStates(pages, pageSnapshots) {
|
|
6068
6067
|
const doc = new VersionRoomBaseYDoc(this.yDoc);
|
|
6069
6068
|
const pageHashes = doc.getDocumentationPageContentHashes();
|
|
6070
|
-
const publishedSnapshots =
|
|
6069
|
+
const publishedSnapshots = pageSnapshots.filter((s) => s.reason === "Publish");
|
|
6071
6070
|
const publishedSnapshotsByPageId = mapByUnique(publishedSnapshots, (s) => s.page.id);
|
|
6072
6071
|
const publishedPagesById = mapByUnique(
|
|
6073
6072
|
publishedSnapshots.map((s) => s.page),
|
|
@@ -6099,9 +6098,9 @@ var FrontendVersionRoomYDoc = class {
|
|
|
6099
6098
|
//
|
|
6100
6099
|
// Drafts - Groups
|
|
6101
6100
|
//
|
|
6102
|
-
buildGroupDraftStates(groups) {
|
|
6101
|
+
buildGroupDraftStates(groups, groupSnapshots) {
|
|
6103
6102
|
const doc = new VersionRoomBaseYDoc(this.yDoc);
|
|
6104
|
-
const publishedSnapshots =
|
|
6103
|
+
const publishedSnapshots = groupSnapshots.filter((s) => s.reason === "Publish");
|
|
6105
6104
|
const publishedSnapshotsByGroupId = mapByUnique(publishedSnapshots, (s) => s.group.id);
|
|
6106
6105
|
const publishedGroupsById = mapByUnique(
|
|
6107
6106
|
publishedSnapshots.map((s) => s.group),
|
|
@@ -6175,22 +6174,22 @@ var FrontendVersionRoomYDoc = class {
|
|
|
6175
6174
|
};
|
|
6176
6175
|
|
|
6177
6176
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
6178
|
-
var DocumentationHierarchySettings =
|
|
6179
|
-
routingVersion:
|
|
6180
|
-
isDraftFeatureAdopted:
|
|
6177
|
+
var DocumentationHierarchySettings = z214.object({
|
|
6178
|
+
routingVersion: z214.string(),
|
|
6179
|
+
isDraftFeatureAdopted: z214.boolean()
|
|
6181
6180
|
});
|
|
6182
6181
|
function yjsToDocumentationHierarchy(doc) {
|
|
6183
6182
|
return new FrontendVersionRoomYDoc(doc).getDocumentationHierarchy();
|
|
6184
6183
|
}
|
|
6185
6184
|
|
|
6186
6185
|
// src/yjs/design-system-content/item-configuration.ts
|
|
6187
|
-
import { z as
|
|
6188
|
-
var DTODocumentationPageRoomHeaderData =
|
|
6189
|
-
title:
|
|
6186
|
+
import { z as z215 } from "zod";
|
|
6187
|
+
var DTODocumentationPageRoomHeaderData = z215.object({
|
|
6188
|
+
title: z215.string(),
|
|
6190
6189
|
configuration: DTODocumentationItemConfigurationV2
|
|
6191
6190
|
});
|
|
6192
|
-
var DTODocumentationPageRoomHeaderDataUpdate =
|
|
6193
|
-
title:
|
|
6191
|
+
var DTODocumentationPageRoomHeaderDataUpdate = z215.object({
|
|
6192
|
+
title: z215.string().optional(),
|
|
6194
6193
|
configuration: DTODocumentationItemConfigurationV2.omit({ header: true }).extend({ header: DocumentationItemHeaderV2.partial() }).optional()
|
|
6195
6194
|
});
|
|
6196
6195
|
function itemConfigurationToYjs(yDoc, item) {
|
|
@@ -6241,7 +6240,7 @@ function yjsToItemConfiguration(yDoc) {
|
|
|
6241
6240
|
header: rawHeader
|
|
6242
6241
|
};
|
|
6243
6242
|
return {
|
|
6244
|
-
title:
|
|
6243
|
+
title: z215.string().parse(title),
|
|
6245
6244
|
configuration: DTODocumentationItemConfigurationV2.parse(rawConfig)
|
|
6246
6245
|
};
|
|
6247
6246
|
}
|
|
@@ -6251,9 +6250,9 @@ var PageBlockEditorModel = PageBlockEditorModelV2;
|
|
|
6251
6250
|
var PageSectionEditorModel = PageSectionEditorModelV2;
|
|
6252
6251
|
|
|
6253
6252
|
// src/yjs/docs-editor/model/page.ts
|
|
6254
|
-
import { z as
|
|
6255
|
-
var DocumentationPageEditorModel =
|
|
6256
|
-
blocks:
|
|
6253
|
+
import { z as z216 } from "zod";
|
|
6254
|
+
var DocumentationPageEditorModel = z216.object({
|
|
6255
|
+
blocks: z216.array(DocumentationPageContentItem)
|
|
6257
6256
|
});
|
|
6258
6257
|
|
|
6259
6258
|
// src/yjs/docs-editor/prosemirror/schema.ts
|
|
@@ -9226,7 +9225,7 @@ var blocks = [
|
|
|
9226
9225
|
|
|
9227
9226
|
// src/yjs/docs-editor/prosemirror-to-blocks.ts
|
|
9228
9227
|
import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
|
|
9229
|
-
import { z as
|
|
9228
|
+
import { z as z217 } from "zod";
|
|
9230
9229
|
function yDocToPage(yDoc, definitions) {
|
|
9231
9230
|
return yXmlFragmentToPage(yDoc.getXmlFragment("default"), definitions);
|
|
9232
9231
|
}
|
|
@@ -9269,7 +9268,7 @@ function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
|
|
|
9269
9268
|
return null;
|
|
9270
9269
|
return {
|
|
9271
9270
|
id,
|
|
9272
|
-
title: getProsemirrorAttribute(prosemirrorNode, "title",
|
|
9271
|
+
title: getProsemirrorAttribute(prosemirrorNode, "title", z217.string()) ?? "",
|
|
9273
9272
|
columns: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(nonNullFilter)
|
|
9274
9273
|
};
|
|
9275
9274
|
}
|
|
@@ -9304,7 +9303,7 @@ function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap, dept
|
|
|
9304
9303
|
});
|
|
9305
9304
|
}
|
|
9306
9305
|
function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap, depth) {
|
|
9307
|
-
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId",
|
|
9306
|
+
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z217.string());
|
|
9308
9307
|
if (!definitionId) {
|
|
9309
9308
|
console.warn(`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`);
|
|
9310
9309
|
return [];
|
|
@@ -9346,7 +9345,7 @@ function parseAsRichText(prosemirrorNode, definition, property) {
|
|
|
9346
9345
|
if (!id)
|
|
9347
9346
|
return null;
|
|
9348
9347
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
9349
|
-
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type",
|
|
9348
|
+
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z217.string().optional()));
|
|
9350
9349
|
return {
|
|
9351
9350
|
id,
|
|
9352
9351
|
type: "Block",
|
|
@@ -9472,10 +9471,10 @@ function parseRichTextAttribute(mark) {
|
|
|
9472
9471
|
return null;
|
|
9473
9472
|
}
|
|
9474
9473
|
function parseProsemirrorLink(mark) {
|
|
9475
|
-
const href = getProsemirrorAttribute(mark, "href",
|
|
9474
|
+
const href = getProsemirrorAttribute(mark, "href", z217.string().optional());
|
|
9476
9475
|
if (!href)
|
|
9477
9476
|
return null;
|
|
9478
|
-
const target = getProsemirrorAttribute(mark, "target",
|
|
9477
|
+
const target = getProsemirrorAttribute(mark, "target", z217.string().optional());
|
|
9479
9478
|
const openInNewTab = target === "_blank";
|
|
9480
9479
|
if (href.startsWith("@")) {
|
|
9481
9480
|
return {
|
|
@@ -9498,7 +9497,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
9498
9497
|
if (!id)
|
|
9499
9498
|
return null;
|
|
9500
9499
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
9501
|
-
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder",
|
|
9500
|
+
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z217.boolean().optional()) !== false;
|
|
9502
9501
|
const tableChild = prosemirrorNode.content?.find((c) => c.type === "table");
|
|
9503
9502
|
if (!tableChild) {
|
|
9504
9503
|
return emptyTable(id, variantId, 0);
|
|
@@ -9545,9 +9544,9 @@ function parseAsTableCell(prosemirrorNode) {
|
|
|
9545
9544
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
9546
9545
|
if (!id)
|
|
9547
9546
|
return null;
|
|
9548
|
-
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign",
|
|
9547
|
+
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z217.string().optional());
|
|
9549
9548
|
let columnWidth;
|
|
9550
|
-
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth",
|
|
9549
|
+
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z217.array(z217.number()).optional());
|
|
9551
9550
|
if (columnWidthArray) {
|
|
9552
9551
|
columnWidth = columnWidthArray[0];
|
|
9553
9552
|
}
|
|
@@ -9585,7 +9584,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
9585
9584
|
value: parseRichText(prosemirrorNode.content ?? [])
|
|
9586
9585
|
};
|
|
9587
9586
|
case "image":
|
|
9588
|
-
const items = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
9587
|
+
const items = getProsemirrorAttribute(prosemirrorNode, "items", z217.string());
|
|
9589
9588
|
if (!items)
|
|
9590
9589
|
return null;
|
|
9591
9590
|
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
@@ -9702,7 +9701,7 @@ function definitionExpectsPlaceholderItem(definition) {
|
|
|
9702
9701
|
);
|
|
9703
9702
|
}
|
|
9704
9703
|
function parseBlockItems(prosemirrorNode, definition) {
|
|
9705
|
-
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
9704
|
+
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z217.string());
|
|
9706
9705
|
if (!itemsString)
|
|
9707
9706
|
return null;
|
|
9708
9707
|
const itemsJson = JSON.parse(itemsString);
|
|
@@ -9714,18 +9713,18 @@ function parseBlockItems(prosemirrorNode, definition) {
|
|
|
9714
9713
|
}
|
|
9715
9714
|
function parseAppearance(prosemirrorNode) {
|
|
9716
9715
|
let appearance = {};
|
|
9717
|
-
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance",
|
|
9716
|
+
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance", z217.string().optional());
|
|
9718
9717
|
if (rawAppearanceString) {
|
|
9719
9718
|
const parsedAppearance = PageBlockAppearanceV2.safeParse(JSON.parse(rawAppearanceString));
|
|
9720
9719
|
if (parsedAppearance.success) {
|
|
9721
9720
|
appearance = parsedAppearance.data;
|
|
9722
9721
|
}
|
|
9723
9722
|
}
|
|
9724
|
-
const columns = getProsemirrorAttribute(prosemirrorNode, "columns",
|
|
9723
|
+
const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z217.number().optional());
|
|
9725
9724
|
if (columns) {
|
|
9726
9725
|
appearance.numberOfColumns = columns;
|
|
9727
9726
|
}
|
|
9728
|
-
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor",
|
|
9727
|
+
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z217.string().optional());
|
|
9729
9728
|
if (backgroundColor) {
|
|
9730
9729
|
const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
|
|
9731
9730
|
if (parsedColor.success) {
|
|
@@ -9818,13 +9817,13 @@ function valueSchemaForPropertyType(type) {
|
|
|
9818
9817
|
}
|
|
9819
9818
|
}
|
|
9820
9819
|
function getProsemirrorBlockId(prosemirrorNode) {
|
|
9821
|
-
const id = getProsemirrorAttribute(prosemirrorNode, "id",
|
|
9820
|
+
const id = getProsemirrorAttribute(prosemirrorNode, "id", z217.string());
|
|
9822
9821
|
if (!id)
|
|
9823
9822
|
console.warn(`Prosemirror attribute "id" on ${prosemirrorNode.type} is required`);
|
|
9824
9823
|
return id;
|
|
9825
9824
|
}
|
|
9826
9825
|
function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
9827
|
-
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(
|
|
9826
|
+
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z217.string()));
|
|
9828
9827
|
}
|
|
9829
9828
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
9830
9829
|
const parsedAttr = validationSchema.safeParse(prosemirrorNode.attrs?.[attributeName]);
|
|
@@ -9860,14 +9859,10 @@ var BackendVersionRoomYDoc = class {
|
|
|
9860
9859
|
transaction.pages && yDoc.updatePages(transaction.pages);
|
|
9861
9860
|
transaction.groupIdsToDelete && yDoc.deleteGroups(transaction.groupIdsToDelete);
|
|
9862
9861
|
transaction.groups && yDoc.updateGroups(transaction.groups);
|
|
9863
|
-
transaction.
|
|
9864
|
-
transaction.
|
|
9865
|
-
transaction.
|
|
9866
|
-
transaction.
|
|
9867
|
-
transaction.deletedPageSnapshotIdsToDelete && yDoc.deletePageDeletedSnapshots(transaction.deletedPageSnapshotIdsToDelete);
|
|
9868
|
-
transaction.deletedPageSnapshots && yDoc.updatePageDeletedSnapshots(transaction.deletedPageSnapshots);
|
|
9869
|
-
transaction.deletedGroupSnapshotIdsToDelete && yDoc.deleteGroupDeletedSnapshots(transaction.deletedGroupSnapshotIdsToDelete);
|
|
9870
|
-
transaction.deletedGroupSnapshots && yDoc.updateGroupDeletedSnapshots(transaction.deletedGroupSnapshots);
|
|
9862
|
+
transaction.pageSnapshotIdsToDelete && yDoc.deletePageSnapshots(transaction.pageSnapshotIdsToDelete);
|
|
9863
|
+
transaction.pageSnapshots && yDoc.updatePageSnapshots(transaction.pageSnapshots);
|
|
9864
|
+
transaction.groupSnapshotIdsToDelete && yDoc.deleteGroupSnapshots(transaction.groupSnapshotIdsToDelete);
|
|
9865
|
+
transaction.groupSnapshots && yDoc.updateGroupSnapshots(transaction.groupSnapshots);
|
|
9871
9866
|
transaction.internalSettings && yDoc.updateDocumentationInternalSettings(transaction.internalSettings);
|
|
9872
9867
|
});
|
|
9873
9868
|
}
|
|
@@ -9903,6 +9898,7 @@ export {
|
|
|
9903
9898
|
DTODeleteDocumentationPageInputV2,
|
|
9904
9899
|
DTODeleteDocumentationTabGroupInput,
|
|
9905
9900
|
DTODeleteElementPropertyDefinitionInputV2,
|
|
9901
|
+
DTODesignElementsDataDiffResponse,
|
|
9906
9902
|
DTODesignSystem,
|
|
9907
9903
|
DTODesignSystemVersion,
|
|
9908
9904
|
DTODesignSystemVersionCreationResponse,
|
|
@@ -9910,6 +9906,7 @@ export {
|
|
|
9910
9906
|
DTODesignSystemVersionJobStatusResponse,
|
|
9911
9907
|
DTODesignSystemVersionJobsResponse,
|
|
9912
9908
|
DTODesignSystemVersionsListResponse,
|
|
9909
|
+
DTODiffCountBase,
|
|
9913
9910
|
DTODocumentationDraftChangeType,
|
|
9914
9911
|
DTODocumentationDraftState,
|
|
9915
9912
|
DTODocumentationDraftStateCreated,
|