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