@supernova-studio/client 1.30.1 → 1.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +209 -1911
- package/dist/index.d.ts +209 -1911
- package/dist/index.js +36 -56
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +101 -121
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5246,7 +5246,7 @@ var ForgeProjectFile = z181.object({
|
|
|
5246
5246
|
size: z181.number().int().positive().optional(),
|
|
5247
5247
|
checksum: z181.string()
|
|
5248
5248
|
});
|
|
5249
|
-
var ForgeProjectRole = z182.enum(["Viewer", "
|
|
5249
|
+
var ForgeProjectRole = z182.enum(["Viewer", "Builder", "Admin"]);
|
|
5250
5250
|
var ForgeProjectMembership = z182.object({
|
|
5251
5251
|
userId: z182.string(),
|
|
5252
5252
|
forgeProjectId: z182.string(),
|
|
@@ -5277,7 +5277,8 @@ var ForgeProjectIteration = z184.object({
|
|
|
5277
5277
|
mergeMeta: ForgeProjectIterationMergeMeta.optional()
|
|
5278
5278
|
});
|
|
5279
5279
|
var ForgeProjectTag = z185.array(z185.string()).default([]);
|
|
5280
|
-
var ForgeProjectAccessMode = z185.enum(["InviteOnly", "Open"]);
|
|
5280
|
+
var ForgeProjectAccessMode = z185.enum(["InviteOnly", "Open", "Unlisted"]);
|
|
5281
|
+
var ForgeProjectDefaultRole = ForgeProjectRole.exclude(["Admin"]);
|
|
5281
5282
|
var ForgeProject = z185.object({
|
|
5282
5283
|
createdAt: z185.coerce.date(),
|
|
5283
5284
|
createdByUserId: z185.string().optional(),
|
|
@@ -5290,6 +5291,7 @@ var ForgeProject = z185.object({
|
|
|
5290
5291
|
updatedAt: z185.coerce.date().optional(),
|
|
5291
5292
|
workspaceId: z185.string(),
|
|
5292
5293
|
accessMode: ForgeProjectAccessMode,
|
|
5294
|
+
defaultRole: ForgeProjectDefaultRole.default("Viewer"),
|
|
5293
5295
|
isArchived: z185.boolean().optional(),
|
|
5294
5296
|
emoji: z185.string().optional()
|
|
5295
5297
|
});
|
|
@@ -9258,6 +9260,7 @@ var DTOFeatureIterationArtifactDiff = z312.object({
|
|
|
9258
9260
|
});
|
|
9259
9261
|
var DTOFeatureIterationUpdateArtifactsInput = z312.object({
|
|
9260
9262
|
id: Id,
|
|
9263
|
+
name: z312.string().optional(),
|
|
9261
9264
|
artifactDiff: DTOFeatureIterationArtifactDiff
|
|
9262
9265
|
});
|
|
9263
9266
|
var DTOFeatureAgentWorkFinalizeInput = z312.object({
|
|
@@ -9626,7 +9629,6 @@ var DTOCreateForgeProjectInvitation = DTOForgeProjectInvitation.pick({
|
|
|
9626
9629
|
workspaceRole: WorkspaceRoleSchema
|
|
9627
9630
|
});
|
|
9628
9631
|
var DTOUpdateForgeProjectInvitation = DTOCreateForgeProjectInvitation.omit({
|
|
9629
|
-
email: true,
|
|
9630
9632
|
workspaceRole: true
|
|
9631
9633
|
});
|
|
9632
9634
|
var DTORemoveForgeProjectInvitation = DTOCreateForgeProjectInvitation.pick({
|
|
@@ -9693,7 +9695,7 @@ var DTOCreateForgeProjectMember = DTOForgeProjectMember.pick({
|
|
|
9693
9695
|
userId: true,
|
|
9694
9696
|
role: true
|
|
9695
9697
|
});
|
|
9696
|
-
var DTOUpdateForgeProjectMember = DTOCreateForgeProjectMember
|
|
9698
|
+
var DTOUpdateForgeProjectMember = DTOCreateForgeProjectMember;
|
|
9697
9699
|
var DTORemoveForgeProjectMember = DTOForgeProjectMember.pick({
|
|
9698
9700
|
userId: true
|
|
9699
9701
|
});
|
|
@@ -9729,36 +9731,31 @@ var DTOForgeProjectRoomResponse = z326.object({
|
|
|
9729
9731
|
// src/api/dto/forge/project.ts
|
|
9730
9732
|
import { z as z327 } from "zod";
|
|
9731
9733
|
var DTOForgeProject = ForgeProject.omit({ fpContextId: true }).extend({
|
|
9732
|
-
context: ForgeProjectContext
|
|
9733
|
-
members: z327.array(DTOForgeProjectMember),
|
|
9734
|
-
invitations: z327.array(DTOForgeProjectInvitation)
|
|
9734
|
+
context: ForgeProjectContext
|
|
9735
9735
|
});
|
|
9736
|
-
var
|
|
9736
|
+
var DTOForgeProjectCreate = ForgeProject.pick({
|
|
9737
9737
|
instruction: true,
|
|
9738
9738
|
name: true,
|
|
9739
9739
|
meta: true,
|
|
9740
9740
|
tags: true,
|
|
9741
9741
|
accessMode: true,
|
|
9742
|
+
defaultRole: true,
|
|
9742
9743
|
fpContextId: true,
|
|
9743
9744
|
isArchived: true,
|
|
9744
9745
|
emoji: true
|
|
9745
9746
|
}).extend({ membersToInvite: DTOCreateForgeProjectInvitation.array().min(1).optional() });
|
|
9746
|
-
var
|
|
9747
|
-
id: z327.string()
|
|
9748
|
-
membersToRetain: z327.string().array().min(1).optional()
|
|
9747
|
+
var DTOForgeProjectUpdate = DTOForgeProjectCreate.omit({ membersToInvite: true }).partial().extend({
|
|
9748
|
+
id: z327.string()
|
|
9749
9749
|
});
|
|
9750
9750
|
var DTOForgeProjectGetResponse = z327.object({ project: DTOForgeProject.nullable() });
|
|
9751
|
-
var
|
|
9752
|
-
var
|
|
9753
|
-
project: DTOForgeProject
|
|
9754
|
-
});
|
|
9755
|
-
var DTOUpdateForgeProjectResponse = z327.object({
|
|
9751
|
+
var DTOForgeProjectListResponse = z327.object({ projects: z327.array(DTOForgeProject) });
|
|
9752
|
+
var DTOForgeProjectCreateResponse = z327.object({
|
|
9756
9753
|
project: DTOForgeProject
|
|
9757
9754
|
});
|
|
9758
|
-
var
|
|
9755
|
+
var DTOForgeProjectUpdateResponse = z327.object({
|
|
9759
9756
|
project: DTOForgeProject
|
|
9760
9757
|
});
|
|
9761
|
-
var
|
|
9758
|
+
var DTOForgeProjectRemoveResponse = z327.object({ ok: z327.literal(true) });
|
|
9762
9759
|
|
|
9763
9760
|
// src/api/dto/forge/threads.ts
|
|
9764
9761
|
import { z as z328 } from "zod";
|
|
@@ -11189,12 +11186,12 @@ var ForgeProjectsEndpoint = class {
|
|
|
11189
11186
|
this.requestExecutor = requestExecutor;
|
|
11190
11187
|
}
|
|
11191
11188
|
list(workspaceId) {
|
|
11192
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}/forge/projects`,
|
|
11189
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/forge/projects`, DTOForgeProjectListResponse, {
|
|
11193
11190
|
method: "GET"
|
|
11194
11191
|
});
|
|
11195
11192
|
}
|
|
11196
11193
|
create(workspaceId, body) {
|
|
11197
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}/forge/projects`,
|
|
11194
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/forge/projects`, DTOForgeProjectCreateResponse, {
|
|
11198
11195
|
method: "POST",
|
|
11199
11196
|
body
|
|
11200
11197
|
});
|
|
@@ -11211,7 +11208,7 @@ var ForgeProjectsEndpoint = class {
|
|
|
11211
11208
|
update(workspaceId, projectId, body) {
|
|
11212
11209
|
return this.requestExecutor.json(
|
|
11213
11210
|
`/workspaces/${workspaceId}/forge/projects/${projectId}`,
|
|
11214
|
-
|
|
11211
|
+
DTOForgeProjectUpdateResponse,
|
|
11215
11212
|
{
|
|
11216
11213
|
method: "PUT",
|
|
11217
11214
|
body
|
|
@@ -11221,7 +11218,7 @@ var ForgeProjectsEndpoint = class {
|
|
|
11221
11218
|
delete(workspaceId, projectId) {
|
|
11222
11219
|
return this.requestExecutor.json(
|
|
11223
11220
|
`/workspaces/${workspaceId}/forge/projects/${projectId}`,
|
|
11224
|
-
|
|
11221
|
+
DTOForgeProjectRemoveResponse,
|
|
11225
11222
|
{
|
|
11226
11223
|
method: "DELETE"
|
|
11227
11224
|
}
|
|
@@ -11275,7 +11272,6 @@ var ForgeProjectContextsEndpoint = class {
|
|
|
11275
11272
|
};
|
|
11276
11273
|
|
|
11277
11274
|
// src/api/endpoints/forge/project-members.ts
|
|
11278
|
-
import { z as z342 } from "zod";
|
|
11279
11275
|
var ForgeProjectMembersEndpoint = class {
|
|
11280
11276
|
constructor(requestExecutor) {
|
|
11281
11277
|
this.requestExecutor = requestExecutor;
|
|
@@ -11292,23 +11288,16 @@ var ForgeProjectMembersEndpoint = class {
|
|
|
11292
11288
|
});
|
|
11293
11289
|
}
|
|
11294
11290
|
update(projectId, userId, body) {
|
|
11295
|
-
return this.requestExecutor.json(
|
|
11296
|
-
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
method: "PUT",
|
|
11300
|
-
body
|
|
11301
|
-
}
|
|
11302
|
-
);
|
|
11291
|
+
return this.requestExecutor.json(`/forge/projects/${projectId}/members`, DTOForgeProjectMemberCreateResponse, {
|
|
11292
|
+
method: "PUT",
|
|
11293
|
+
body: { ...body, userId }
|
|
11294
|
+
});
|
|
11303
11295
|
}
|
|
11304
11296
|
delete(projectId, userId) {
|
|
11305
|
-
return this.requestExecutor.json(
|
|
11306
|
-
|
|
11307
|
-
|
|
11308
|
-
|
|
11309
|
-
method: "DELETE"
|
|
11310
|
-
}
|
|
11311
|
-
);
|
|
11297
|
+
return this.requestExecutor.json(`/forge/projects/${projectId}/members`, DTOForgeProjectMemberRemoveResponse, {
|
|
11298
|
+
method: "DELETE",
|
|
11299
|
+
body: { userId }
|
|
11300
|
+
});
|
|
11312
11301
|
}
|
|
11313
11302
|
};
|
|
11314
11303
|
|
|
@@ -11458,7 +11447,6 @@ var ForgeProjectIterationsEndpoint = class {
|
|
|
11458
11447
|
};
|
|
11459
11448
|
|
|
11460
11449
|
// src/api/endpoints/forge/project-invitations.ts
|
|
11461
|
-
import { z as z343 } from "zod";
|
|
11462
11450
|
var ForgeProjectInvitationsEndpoint = class {
|
|
11463
11451
|
constructor(requestExecutor) {
|
|
11464
11452
|
this.requestExecutor = requestExecutor;
|
|
@@ -11475,23 +11463,16 @@ var ForgeProjectInvitationsEndpoint = class {
|
|
|
11475
11463
|
});
|
|
11476
11464
|
}
|
|
11477
11465
|
update(projectId, email, body) {
|
|
11478
|
-
return this.requestExecutor.json(
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
method: "PUT",
|
|
11483
|
-
body
|
|
11484
|
-
}
|
|
11485
|
-
);
|
|
11466
|
+
return this.requestExecutor.json(`/forge/projects/${projectId}/members`, DTOForgeProjectInvitationCreateResponse, {
|
|
11467
|
+
method: "PUT",
|
|
11468
|
+
body: { ...body, email }
|
|
11469
|
+
});
|
|
11486
11470
|
}
|
|
11487
11471
|
delete(projectId, email) {
|
|
11488
|
-
return this.requestExecutor.json(
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
method: "DELETE"
|
|
11493
|
-
}
|
|
11494
|
-
);
|
|
11472
|
+
return this.requestExecutor.json(`/forge/projects/${projectId}/members`, DTOForgeProjectMemberRemoveResponse, {
|
|
11473
|
+
method: "DELETE",
|
|
11474
|
+
body: { email }
|
|
11475
|
+
});
|
|
11495
11476
|
}
|
|
11496
11477
|
};
|
|
11497
11478
|
|
|
@@ -11580,7 +11561,7 @@ var ForgesEndpoint = class {
|
|
|
11580
11561
|
};
|
|
11581
11562
|
|
|
11582
11563
|
// src/api/endpoints/workspaces/chat-threads.ts
|
|
11583
|
-
import { z as
|
|
11564
|
+
import { z as z342 } from "zod";
|
|
11584
11565
|
var WorkspaceChatThreadsEndpoint = class {
|
|
11585
11566
|
constructor(requestExecutor) {
|
|
11586
11567
|
this.requestExecutor = requestExecutor;
|
|
@@ -11612,7 +11593,7 @@ var WorkspaceChatThreadsEndpoint = class {
|
|
|
11612
11593
|
);
|
|
11613
11594
|
}
|
|
11614
11595
|
delete(workspaceId, threadId) {
|
|
11615
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}/forge/threads/${threadId}`,
|
|
11596
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/forge/threads/${threadId}`, z342.any(), {
|
|
11616
11597
|
method: "DELETE"
|
|
11617
11598
|
});
|
|
11618
11599
|
}
|
|
@@ -11644,7 +11625,7 @@ var ChatThreadMessagesEndpoint = class {
|
|
|
11644
11625
|
);
|
|
11645
11626
|
}
|
|
11646
11627
|
score(workspaceId, threadId, body) {
|
|
11647
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}/forge/threads/${threadId}/scores`,
|
|
11628
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/forge/threads/${threadId}/scores`, z342.any(), {
|
|
11648
11629
|
method: "POST",
|
|
11649
11630
|
body
|
|
11650
11631
|
});
|
|
@@ -11652,7 +11633,7 @@ var ChatThreadMessagesEndpoint = class {
|
|
|
11652
11633
|
};
|
|
11653
11634
|
|
|
11654
11635
|
// src/api/endpoints/workspaces/integrations.ts
|
|
11655
|
-
import { z as
|
|
11636
|
+
import { z as z343 } from "zod";
|
|
11656
11637
|
var WorkspaceIntegrationsEndpoint = class {
|
|
11657
11638
|
constructor(requestExecutor) {
|
|
11658
11639
|
this.requestExecutor = requestExecutor;
|
|
@@ -11661,7 +11642,7 @@ var WorkspaceIntegrationsEndpoint = class {
|
|
|
11661
11642
|
return this.requestExecutor.json(`/workspaces/${wsId}/integrations`, DTOIntegrationsGetListResponse);
|
|
11662
11643
|
}
|
|
11663
11644
|
delete(wsId, iId) {
|
|
11664
|
-
return this.requestExecutor.json(`/workspaces/${wsId}/integrations/${iId}`,
|
|
11645
|
+
return this.requestExecutor.json(`/workspaces/${wsId}/integrations/${iId}`, z343.unknown(), { method: "DELETE" });
|
|
11665
11646
|
}
|
|
11666
11647
|
};
|
|
11667
11648
|
|
|
@@ -11693,7 +11674,7 @@ var WorkspaceInvitationsEndpoint = class {
|
|
|
11693
11674
|
};
|
|
11694
11675
|
|
|
11695
11676
|
// src/api/endpoints/workspaces/members.ts
|
|
11696
|
-
import { z as
|
|
11677
|
+
import { z as z344 } from "zod";
|
|
11697
11678
|
var WorkspaceMembersEndpoint = class {
|
|
11698
11679
|
constructor(requestExecutor) {
|
|
11699
11680
|
this.requestExecutor = requestExecutor;
|
|
@@ -11710,7 +11691,7 @@ var WorkspaceMembersEndpoint = class {
|
|
|
11710
11691
|
});
|
|
11711
11692
|
}
|
|
11712
11693
|
invite(workspaceId, body) {
|
|
11713
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}/members`,
|
|
11694
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/members`, z344.any(), { method: "POST", body });
|
|
11714
11695
|
}
|
|
11715
11696
|
delete(workspaceId, userId) {
|
|
11716
11697
|
return this.requestExecutor.json(`/workspaces/${workspaceId}/members/${userId}`, DTOWorkspaceResponse, {
|
|
@@ -11739,7 +11720,7 @@ var WorkspaceNpmRegistryEndpoint = class {
|
|
|
11739
11720
|
};
|
|
11740
11721
|
|
|
11741
11722
|
// src/api/endpoints/workspaces/workspaces.ts
|
|
11742
|
-
import { z as
|
|
11723
|
+
import { z as z345 } from "zod";
|
|
11743
11724
|
var WorkspacesEndpoint = class {
|
|
11744
11725
|
constructor(requestExecutor) {
|
|
11745
11726
|
this.requestExecutor = requestExecutor;
|
|
@@ -11771,10 +11752,10 @@ var WorkspacesEndpoint = class {
|
|
|
11771
11752
|
return this.requestExecutor.json(`/workspaces/${workspaceId}`, DTOWorkspaceResponse, { method: "GET" });
|
|
11772
11753
|
}
|
|
11773
11754
|
delete(workspaceId) {
|
|
11774
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}`,
|
|
11755
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}`, z345.any(), { method: "DELETE" });
|
|
11775
11756
|
}
|
|
11776
11757
|
subscription(workspaceId) {
|
|
11777
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}/subscription`,
|
|
11758
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/subscription`, z345.any(), { method: "GET" });
|
|
11778
11759
|
}
|
|
11779
11760
|
getPortalSettings(workspaceId) {
|
|
11780
11761
|
return this.requestExecutor.json(`/workspaces/${workspaceId}/portal/settings`, DTOPortalSettingsGetResponse, {
|
|
@@ -11885,9 +11866,9 @@ ${bodyText}`,
|
|
|
11885
11866
|
|
|
11886
11867
|
// src/api/transport/request-executor.ts
|
|
11887
11868
|
import fetch from "node-fetch";
|
|
11888
|
-
import { z as
|
|
11889
|
-
var ResponseWrapper =
|
|
11890
|
-
result:
|
|
11869
|
+
import { z as z346 } from "zod";
|
|
11870
|
+
var ResponseWrapper = z346.object({
|
|
11871
|
+
result: z346.record(z346.any())
|
|
11891
11872
|
});
|
|
11892
11873
|
var RequestExecutor = class {
|
|
11893
11874
|
constructor(testServerConfig) {
|
|
@@ -11964,25 +11945,25 @@ var SupernovaApiClient = class {
|
|
|
11964
11945
|
};
|
|
11965
11946
|
|
|
11966
11947
|
// src/events/design-system.ts
|
|
11967
|
-
import { z as
|
|
11968
|
-
var DTOEventFigmaNodesRendered =
|
|
11969
|
-
type:
|
|
11970
|
-
designSystemId:
|
|
11971
|
-
versionId:
|
|
11972
|
-
figmaNodePersistentIds:
|
|
11973
|
-
});
|
|
11974
|
-
var DTOEventDataSourcesImported =
|
|
11975
|
-
type:
|
|
11976
|
-
designSystemId:
|
|
11977
|
-
versionId:
|
|
11978
|
-
importJobId:
|
|
11948
|
+
import { z as z347 } from "zod";
|
|
11949
|
+
var DTOEventFigmaNodesRendered = z347.object({
|
|
11950
|
+
type: z347.literal("DesignSystem.FigmaNodesRendered"),
|
|
11951
|
+
designSystemId: z347.string(),
|
|
11952
|
+
versionId: z347.string(),
|
|
11953
|
+
figmaNodePersistentIds: z347.string().array()
|
|
11954
|
+
});
|
|
11955
|
+
var DTOEventDataSourcesImported = z347.object({
|
|
11956
|
+
type: z347.literal("DesignSystem.ImportJobFinished"),
|
|
11957
|
+
designSystemId: z347.string(),
|
|
11958
|
+
versionId: z347.string(),
|
|
11959
|
+
importJobId: z347.string(),
|
|
11979
11960
|
dataSourceType: DataSourceRemoteType,
|
|
11980
|
-
dataSourceIds:
|
|
11961
|
+
dataSourceIds: z347.string().array()
|
|
11981
11962
|
});
|
|
11982
11963
|
|
|
11983
11964
|
// src/events/event.ts
|
|
11984
|
-
import { z as
|
|
11985
|
-
var DTOEvent =
|
|
11965
|
+
import { z as z348 } from "zod";
|
|
11966
|
+
var DTOEvent = z348.discriminatedUnion("type", [DTOEventDataSourcesImported, DTOEventFigmaNodesRendered]);
|
|
11986
11967
|
|
|
11987
11968
|
// src/sync/docs-local-action-executor.ts
|
|
11988
11969
|
function applyActionsLocally(input) {
|
|
@@ -12278,7 +12259,7 @@ var LocalDocsElementActionExecutor = class {
|
|
|
12278
12259
|
import PQueue from "p-queue";
|
|
12279
12260
|
|
|
12280
12261
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
12281
|
-
import { z as
|
|
12262
|
+
import { z as z349 } from "zod";
|
|
12282
12263
|
|
|
12283
12264
|
// src/yjs/version-room/base.ts
|
|
12284
12265
|
var VersionRoomBaseYDoc = class {
|
|
@@ -12828,24 +12809,24 @@ var FrontendVersionRoomYDoc = class {
|
|
|
12828
12809
|
};
|
|
12829
12810
|
|
|
12830
12811
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
12831
|
-
var DocumentationHierarchySettings =
|
|
12832
|
-
routingVersion:
|
|
12833
|
-
isDraftFeatureAdopted:
|
|
12834
|
-
isApprovalFeatureEnabled:
|
|
12835
|
-
approvalRequiredForPublishing:
|
|
12812
|
+
var DocumentationHierarchySettings = z349.object({
|
|
12813
|
+
routingVersion: z349.string(),
|
|
12814
|
+
isDraftFeatureAdopted: z349.boolean(),
|
|
12815
|
+
isApprovalFeatureEnabled: z349.boolean(),
|
|
12816
|
+
approvalRequiredForPublishing: z349.boolean()
|
|
12836
12817
|
});
|
|
12837
12818
|
function yjsToDocumentationHierarchy(doc) {
|
|
12838
12819
|
return new FrontendVersionRoomYDoc(doc).getDocumentationHierarchy();
|
|
12839
12820
|
}
|
|
12840
12821
|
|
|
12841
12822
|
// src/yjs/design-system-content/item-configuration.ts
|
|
12842
|
-
import { z as
|
|
12843
|
-
var DTODocumentationPageRoomHeaderData =
|
|
12844
|
-
title:
|
|
12823
|
+
import { z as z350 } from "zod";
|
|
12824
|
+
var DTODocumentationPageRoomHeaderData = z350.object({
|
|
12825
|
+
title: z350.string(),
|
|
12845
12826
|
configuration: DTODocumentationItemConfigurationV2
|
|
12846
12827
|
});
|
|
12847
|
-
var DTODocumentationPageRoomHeaderDataUpdate =
|
|
12848
|
-
title:
|
|
12828
|
+
var DTODocumentationPageRoomHeaderDataUpdate = z350.object({
|
|
12829
|
+
title: z350.string().optional(),
|
|
12849
12830
|
configuration: DTODocumentationItemConfigurationV2.omit({ header: true }).extend({ header: DocumentationItemHeaderV2.partial() }).optional()
|
|
12850
12831
|
});
|
|
12851
12832
|
function itemConfigurationToYjs(yDoc, item) {
|
|
@@ -12880,9 +12861,9 @@ var PageBlockEditorModel = PageBlockEditorModelV2;
|
|
|
12880
12861
|
var PageSectionEditorModel = PageSectionEditorModelV2;
|
|
12881
12862
|
|
|
12882
12863
|
// src/yjs/docs-editor/model/page.ts
|
|
12883
|
-
import { z as
|
|
12884
|
-
var DocumentationPageEditorModel =
|
|
12885
|
-
blocks:
|
|
12864
|
+
import { z as z351 } from "zod";
|
|
12865
|
+
var DocumentationPageEditorModel = z351.object({
|
|
12866
|
+
blocks: z351.array(DocumentationPageContentItem)
|
|
12886
12867
|
});
|
|
12887
12868
|
|
|
12888
12869
|
// src/yjs/docs-editor/prosemirror/inner-editor-schema.ts
|
|
@@ -16559,7 +16540,7 @@ var blocks = [
|
|
|
16559
16540
|
|
|
16560
16541
|
// src/yjs/docs-editor/prosemirror-to-blocks.ts
|
|
16561
16542
|
import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
|
|
16562
|
-
import { z as
|
|
16543
|
+
import { z as z352 } from "zod";
|
|
16563
16544
|
function yDocToPage(yDoc, definitions) {
|
|
16564
16545
|
return yXmlFragmentToPage(yDoc.getXmlFragment("default"), definitions);
|
|
16565
16546
|
}
|
|
@@ -16635,7 +16616,7 @@ function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
|
|
|
16635
16616
|
if (!id) return null;
|
|
16636
16617
|
return {
|
|
16637
16618
|
id,
|
|
16638
|
-
title: getProsemirrorAttribute(prosemirrorNode, "title",
|
|
16619
|
+
title: getProsemirrorAttribute(prosemirrorNode, "title", z352.string()) ?? "",
|
|
16639
16620
|
columns: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(nonNullFilter)
|
|
16640
16621
|
};
|
|
16641
16622
|
}
|
|
@@ -16669,7 +16650,7 @@ function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap, dept
|
|
|
16669
16650
|
});
|
|
16670
16651
|
}
|
|
16671
16652
|
function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap, depth) {
|
|
16672
|
-
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId",
|
|
16653
|
+
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z352.string());
|
|
16673
16654
|
if (!definitionId) {
|
|
16674
16655
|
console.warn(`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`);
|
|
16675
16656
|
return [];
|
|
@@ -16710,7 +16691,7 @@ function parseAsRichText(prosemirrorNode, definition, property) {
|
|
|
16710
16691
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
16711
16692
|
if (!id) return null;
|
|
16712
16693
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
16713
|
-
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type",
|
|
16694
|
+
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z352.string().optional()));
|
|
16714
16695
|
return {
|
|
16715
16696
|
id,
|
|
16716
16697
|
type: "Block",
|
|
@@ -16833,9 +16814,9 @@ function parseRichTextAttribute(mark) {
|
|
|
16833
16814
|
return null;
|
|
16834
16815
|
}
|
|
16835
16816
|
function parseProsemirrorLink(mark) {
|
|
16836
|
-
const href = getProsemirrorAttribute(mark, "href",
|
|
16817
|
+
const href = getProsemirrorAttribute(mark, "href", z352.string().optional());
|
|
16837
16818
|
if (!href) return null;
|
|
16838
|
-
const target = getProsemirrorAttribute(mark, "target",
|
|
16819
|
+
const target = getProsemirrorAttribute(mark, "target", z352.string().optional());
|
|
16839
16820
|
const openInNewTab = target === "_blank";
|
|
16840
16821
|
if (href.startsWith("@")) {
|
|
16841
16822
|
return {
|
|
@@ -16854,9 +16835,9 @@ function parseProsemirrorLink(mark) {
|
|
|
16854
16835
|
}
|
|
16855
16836
|
}
|
|
16856
16837
|
function parseProsemirrorCommentHighlight(mark) {
|
|
16857
|
-
const highlightId = getProsemirrorAttribute(mark, "highlightId",
|
|
16838
|
+
const highlightId = getProsemirrorAttribute(mark, "highlightId", z352.string().optional());
|
|
16858
16839
|
if (!highlightId) return null;
|
|
16859
|
-
const isResolved = getProsemirrorAttribute(mark, "resolved",
|
|
16840
|
+
const isResolved = getProsemirrorAttribute(mark, "resolved", z352.boolean().optional()) ?? false;
|
|
16860
16841
|
return {
|
|
16861
16842
|
type: "Comment",
|
|
16862
16843
|
commentHighlightId: highlightId,
|
|
@@ -16867,7 +16848,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
16867
16848
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
16868
16849
|
if (!id) return null;
|
|
16869
16850
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
16870
|
-
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder",
|
|
16851
|
+
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z352.boolean().optional()) !== false;
|
|
16871
16852
|
const tableChild = prosemirrorNode.content?.find((c) => c.type === "table");
|
|
16872
16853
|
if (!tableChild) {
|
|
16873
16854
|
return emptyTable(id, variantId, 0);
|
|
@@ -16913,9 +16894,9 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
16913
16894
|
function parseAsTableCell(prosemirrorNode) {
|
|
16914
16895
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
16915
16896
|
if (!id) return null;
|
|
16916
|
-
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign",
|
|
16897
|
+
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z352.string().optional());
|
|
16917
16898
|
let columnWidth;
|
|
16918
|
-
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth",
|
|
16899
|
+
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z352.array(z352.number()).nullish());
|
|
16919
16900
|
if (columnWidthArray) {
|
|
16920
16901
|
columnWidth = roundDimension(columnWidthArray[0]);
|
|
16921
16902
|
}
|
|
@@ -16951,7 +16932,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
16951
16932
|
value: parseRichText(prosemirrorNode.content ?? [])
|
|
16952
16933
|
};
|
|
16953
16934
|
case "image":
|
|
16954
|
-
const items = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
16935
|
+
const items = getProsemirrorAttribute(prosemirrorNode, "items", z352.string());
|
|
16955
16936
|
if (!items) return null;
|
|
16956
16937
|
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
16957
16938
|
if (!parsedItems.success) return null;
|
|
@@ -17065,7 +17046,7 @@ function definitionExpectsPlaceholderItem(definition) {
|
|
|
17065
17046
|
);
|
|
17066
17047
|
}
|
|
17067
17048
|
function parseBlockItems(prosemirrorNode, definition) {
|
|
17068
|
-
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
17049
|
+
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z352.string());
|
|
17069
17050
|
if (!itemsString) return null;
|
|
17070
17051
|
const itemsJson = JSON.parse(itemsString);
|
|
17071
17052
|
if (!Array.isArray(itemsJson)) {
|
|
@@ -17076,18 +17057,18 @@ function parseBlockItems(prosemirrorNode, definition) {
|
|
|
17076
17057
|
}
|
|
17077
17058
|
function parseAppearance(prosemirrorNode) {
|
|
17078
17059
|
let appearance = {};
|
|
17079
|
-
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance",
|
|
17060
|
+
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance", z352.string().optional());
|
|
17080
17061
|
if (rawAppearanceString) {
|
|
17081
17062
|
const parsedAppearance = PageBlockAppearanceV2.safeParse(JSON.parse(rawAppearanceString));
|
|
17082
17063
|
if (parsedAppearance.success) {
|
|
17083
17064
|
appearance = parsedAppearance.data;
|
|
17084
17065
|
}
|
|
17085
17066
|
}
|
|
17086
|
-
const columns = getProsemirrorAttribute(prosemirrorNode, "columns",
|
|
17067
|
+
const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z352.number().optional());
|
|
17087
17068
|
if (columns) {
|
|
17088
17069
|
appearance.numberOfColumns = columns;
|
|
17089
17070
|
}
|
|
17090
|
-
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor",
|
|
17071
|
+
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z352.string().optional());
|
|
17091
17072
|
if (backgroundColor) {
|
|
17092
17073
|
const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
|
|
17093
17074
|
if (parsedColor.success) {
|
|
@@ -17188,12 +17169,12 @@ function valueSchemaForPropertyType(type) {
|
|
|
17188
17169
|
}
|
|
17189
17170
|
}
|
|
17190
17171
|
function getProsemirrorBlockId(prosemirrorNode) {
|
|
17191
|
-
const id = getProsemirrorAttribute(prosemirrorNode, "id",
|
|
17172
|
+
const id = getProsemirrorAttribute(prosemirrorNode, "id", z352.string());
|
|
17192
17173
|
if (!id) console.warn(`Prosemirror attribute "id" on ${prosemirrorNode.type} is required`);
|
|
17193
17174
|
return id;
|
|
17194
17175
|
}
|
|
17195
17176
|
function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
17196
|
-
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(
|
|
17177
|
+
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z352.string()));
|
|
17197
17178
|
}
|
|
17198
17179
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
17199
17180
|
const parsedAttr = validationSchema.safeParse(prosemirrorNode.attrs?.[attributeName]);
|
|
@@ -18283,13 +18264,11 @@ export {
|
|
|
18283
18264
|
DTOCreateForgeIterationMessageResponse,
|
|
18284
18265
|
DTOCreateForgeParticipant,
|
|
18285
18266
|
DTOCreateForgeParticipantResponse,
|
|
18286
|
-
DTOCreateForgeProject,
|
|
18287
18267
|
DTOCreateForgeProjectContext,
|
|
18288
18268
|
DTOCreateForgeProjectInvitation,
|
|
18289
18269
|
DTOCreateForgeProjectIteration,
|
|
18290
18270
|
DTOCreateForgeProjectIterationResponse,
|
|
18291
18271
|
DTOCreateForgeProjectMember,
|
|
18292
|
-
DTOCreateForgeProjectResponse,
|
|
18293
18272
|
DTOCreateForgeSpecArtifact,
|
|
18294
18273
|
DTOCreateVersionInput,
|
|
18295
18274
|
DTOCreditBalance,
|
|
@@ -18631,6 +18610,8 @@ export {
|
|
|
18631
18610
|
DTOForgeProjectContextListResponse,
|
|
18632
18611
|
DTOForgeProjectContextRemoveResponse,
|
|
18633
18612
|
DTOForgeProjectContextUpdateResponse,
|
|
18613
|
+
DTOForgeProjectCreate,
|
|
18614
|
+
DTOForgeProjectCreateResponse,
|
|
18634
18615
|
DTOForgeProjectFeature,
|
|
18635
18616
|
DTOForgeProjectFeatureCreateInput,
|
|
18636
18617
|
DTOForgeProjectFeatureDeleteInput,
|
|
@@ -18657,6 +18638,7 @@ export {
|
|
|
18657
18638
|
DTOForgeProjectIteration,
|
|
18658
18639
|
DTOForgeProjectIterationListResponse,
|
|
18659
18640
|
DTOForgeProjectIterationMergeMeta,
|
|
18641
|
+
DTOForgeProjectListResponse,
|
|
18660
18642
|
DTOForgeProjectMember,
|
|
18661
18643
|
DTOForgeProjectMemberCreateResponse,
|
|
18662
18644
|
DTOForgeProjectMemberGetResponse,
|
|
@@ -18664,9 +18646,11 @@ export {
|
|
|
18664
18646
|
DTOForgeProjectMemberRole,
|
|
18665
18647
|
DTOForgeProjectMemberUpdateResponse,
|
|
18666
18648
|
DTOForgeProjectMembersListResponse,
|
|
18649
|
+
DTOForgeProjectRemoveResponse,
|
|
18667
18650
|
DTOForgeProjectRoom,
|
|
18668
18651
|
DTOForgeProjectRoomResponse,
|
|
18669
|
-
|
|
18652
|
+
DTOForgeProjectUpdate,
|
|
18653
|
+
DTOForgeProjectUpdateResponse,
|
|
18670
18654
|
DTOForgeSection,
|
|
18671
18655
|
DTOForgeSectionCreateInput,
|
|
18672
18656
|
DTOForgeSectionDeleteInput,
|
|
@@ -18740,7 +18724,6 @@ export {
|
|
|
18740
18724
|
DTORegistry,
|
|
18741
18725
|
DTORemoveForgeProjectInvitation,
|
|
18742
18726
|
DTORemoveForgeProjectMember,
|
|
18743
|
-
DTORemoveForgeProjectResponse,
|
|
18744
18727
|
DTORenderedAssetFile,
|
|
18745
18728
|
DTORestoreDocumentationGroupInput,
|
|
18746
18729
|
DTORestoreDocumentationPageInput,
|
|
@@ -18769,7 +18752,6 @@ export {
|
|
|
18769
18752
|
DTOTokenCollectionsListReponse,
|
|
18770
18753
|
DTOTransferOwnershipPayload,
|
|
18771
18754
|
DTOUGetForgeAgentResponse,
|
|
18772
|
-
DTOUGetForgeProjectResponse,
|
|
18773
18755
|
DTOUpdateDocumentationGroupInput,
|
|
18774
18756
|
DTOUpdateDocumentationPageDocumentInputV2,
|
|
18775
18757
|
DTOUpdateDocumentationPageInputV2,
|
|
@@ -18784,13 +18766,11 @@ export {
|
|
|
18784
18766
|
DTOUpdateForgeIterationMessageResponse,
|
|
18785
18767
|
DTOUpdateForgeParticipant,
|
|
18786
18768
|
DTOUpdateForgeParticipantResponse,
|
|
18787
|
-
DTOUpdateForgeProject,
|
|
18788
18769
|
DTOUpdateForgeProjectContext,
|
|
18789
18770
|
DTOUpdateForgeProjectInvitation,
|
|
18790
18771
|
DTOUpdateForgeProjectIteration,
|
|
18791
18772
|
DTOUpdateForgeProjectIterationResponse,
|
|
18792
18773
|
DTOUpdateForgeProjectMember,
|
|
18793
|
-
DTOUpdateForgeProjectResponse,
|
|
18794
18774
|
DTOUpdateForgeSpecArtifact,
|
|
18795
18775
|
DTOUpdateRegistryInput,
|
|
18796
18776
|
DTOUpdateRegistryOutput,
|