@supernova-studio/client 0.54.26 → 0.54.28
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 +1564 -292
- package/dist/index.d.ts +1564 -292
- package/dist/index.js +111 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +164 -68
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/dto/design-systems/design-system.ts +2 -2
- package/src/api/dto/users/authenticated-user.ts +42 -0
- package/src/api/dto/users/index.ts +1 -0
- package/src/api/dto/workspaces/membership.ts +1 -1
- package/src/api/dto/workspaces/workspace.ts +2 -2
- package/src/api/endpoints/design-system-members.ts +24 -0
- package/src/api/endpoints/design-systems.ts +11 -12
- package/src/api/endpoints/index.ts +2 -0
- package/src/api/endpoints/users.ts +11 -2
- package/src/api/endpoints/workspace-members.ts +31 -0
- package/src/api/endpoints/workspaces.ts +11 -5
- package/src/api/transport/request-executor.ts +5 -1
package/dist/index.mjs
CHANGED
|
@@ -5093,7 +5093,7 @@ var DTODesignSystem = DesignSystem.omit({
|
|
|
5093
5093
|
sources: z175.array(z175.any()),
|
|
5094
5094
|
role: WorkspaceRoleSchema.optional()
|
|
5095
5095
|
});
|
|
5096
|
-
var
|
|
5096
|
+
var DTODesignSystemResponse = z175.object({
|
|
5097
5097
|
designSystem: DTODesignSystem
|
|
5098
5098
|
});
|
|
5099
5099
|
var DTODesignSystemsListResponse = z175.object({
|
|
@@ -5504,7 +5504,7 @@ var DTOWorkspace = z194.object({
|
|
|
5504
5504
|
var DTOWorkspaceCreateInput = z194.object({
|
|
5505
5505
|
name: z194.string()
|
|
5506
5506
|
});
|
|
5507
|
-
var
|
|
5507
|
+
var DTOWorkspaceResponse = z194.object({
|
|
5508
5508
|
workspace: DTOWorkspace
|
|
5509
5509
|
});
|
|
5510
5510
|
|
|
@@ -6379,49 +6379,101 @@ var DTOLiveblocksAuthResponse = z226.object({
|
|
|
6379
6379
|
token: z226.string()
|
|
6380
6380
|
});
|
|
6381
6381
|
|
|
6382
|
-
// src/api/dto/users/
|
|
6383
|
-
import { z as
|
|
6384
|
-
var DTOUserProfileUpdateResponse = z227.object({
|
|
6385
|
-
user: User
|
|
6386
|
-
});
|
|
6382
|
+
// src/api/dto/users/authenticated-user.ts
|
|
6383
|
+
import { z as z228 } from "zod";
|
|
6387
6384
|
|
|
6388
6385
|
// src/api/dto/users/user.ts
|
|
6389
|
-
import { z as
|
|
6390
|
-
var DTOUserProfile =
|
|
6391
|
-
name:
|
|
6392
|
-
nickname:
|
|
6393
|
-
avatar:
|
|
6394
|
-
});
|
|
6395
|
-
var DTOUser =
|
|
6396
|
-
id:
|
|
6397
|
-
email:
|
|
6386
|
+
import { z as z227 } from "zod";
|
|
6387
|
+
var DTOUserProfile = z227.object({
|
|
6388
|
+
name: z227.string(),
|
|
6389
|
+
nickname: z227.string().optional(),
|
|
6390
|
+
avatar: z227.string().optional()
|
|
6391
|
+
});
|
|
6392
|
+
var DTOUser = z227.object({
|
|
6393
|
+
id: z227.string(),
|
|
6394
|
+
email: z227.string(),
|
|
6398
6395
|
profile: DTOUserProfile
|
|
6399
6396
|
});
|
|
6400
|
-
var DTOUserGetResponse =
|
|
6397
|
+
var DTOUserGetResponse = z227.object({
|
|
6401
6398
|
user: DTOUser
|
|
6402
6399
|
});
|
|
6403
6400
|
|
|
6404
|
-
// src/api/
|
|
6401
|
+
// src/api/dto/users/authenticated-user.ts
|
|
6402
|
+
var DTOUserOnboardingDepartment = z228.enum(["Design", "Engineering", "Brand", "Other"]);
|
|
6403
|
+
var DTOUserOnboardingJobLevel = z228.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
6404
|
+
var DTOUserSource = z228.enum(["SignUp", "Invite", "SSO"]);
|
|
6405
|
+
var DTOUserOnboarding = z228.object({
|
|
6406
|
+
companyName: z228.string().optional(),
|
|
6407
|
+
numberOfPeopleInOrg: z228.string().optional(),
|
|
6408
|
+
numberOfPeopleInDesignTeam: z228.string().optional(),
|
|
6409
|
+
department: DTOUserOnboardingDepartment.optional(),
|
|
6410
|
+
jobTitle: z228.string().optional(),
|
|
6411
|
+
phase: z228.string().optional(),
|
|
6412
|
+
jobLevel: DTOUserOnboardingJobLevel.optional(),
|
|
6413
|
+
designSystemName: z228.string().optional(),
|
|
6414
|
+
defaultDestination: z228.string().optional(),
|
|
6415
|
+
isPageDraftOnboardingFinished: z228.boolean().optional()
|
|
6416
|
+
});
|
|
6417
|
+
var DTOAuthenticatedUserProfile = DTOUserProfile.extend({
|
|
6418
|
+
onboarding: DTOUserOnboarding.optional()
|
|
6419
|
+
});
|
|
6420
|
+
var DTOAuthenticatedUser = DTOUser.extend({
|
|
6421
|
+
profile: DTOAuthenticatedUserProfile,
|
|
6422
|
+
createdAt: z228.coerce.date(),
|
|
6423
|
+
loggedOutAt: z228.coerce.date().optional(),
|
|
6424
|
+
source: DTOUserSource.optional()
|
|
6425
|
+
});
|
|
6426
|
+
var DTOAuthenticatedUserResponse = z228.object({
|
|
6427
|
+
user: DTOAuthenticatedUser
|
|
6428
|
+
});
|
|
6429
|
+
|
|
6430
|
+
// src/api/dto/users/update.ts
|
|
6405
6431
|
import { z as z229 } from "zod";
|
|
6432
|
+
var DTOUserProfileUpdateResponse = z229.object({
|
|
6433
|
+
user: User
|
|
6434
|
+
});
|
|
6435
|
+
|
|
6436
|
+
// src/api/endpoints/design-system-members.ts
|
|
6437
|
+
var DesignSystemMembersEndpoint = class {
|
|
6438
|
+
constructor(requestExecutor) {
|
|
6439
|
+
this.requestExecutor = requestExecutor;
|
|
6440
|
+
}
|
|
6441
|
+
list(dsId) {
|
|
6442
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/members`, DTODesignSystemMemberListResponse, {
|
|
6443
|
+
method: "GET"
|
|
6444
|
+
});
|
|
6445
|
+
}
|
|
6446
|
+
update(dsId, body) {
|
|
6447
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/members`, DTODesignSystemMembersUpdateResponse, {
|
|
6448
|
+
method: "POST",
|
|
6449
|
+
body
|
|
6450
|
+
});
|
|
6451
|
+
}
|
|
6452
|
+
};
|
|
6453
|
+
|
|
6454
|
+
// src/api/endpoints/design-systems.ts
|
|
6455
|
+
import { z as z230 } from "zod";
|
|
6406
6456
|
var DesignSystemsEndpoint = class {
|
|
6407
6457
|
constructor(requestExecutor) {
|
|
6408
6458
|
this.requestExecutor = requestExecutor;
|
|
6459
|
+
__publicField(this, "members");
|
|
6460
|
+
this.members = new DesignSystemMembersEndpoint(requestExecutor);
|
|
6409
6461
|
}
|
|
6410
6462
|
create(body) {
|
|
6411
|
-
return this.requestExecutor.json("/design-systems",
|
|
6463
|
+
return this.requestExecutor.json("/design-systems", DTODesignSystemResponse, { method: "POST", body });
|
|
6412
6464
|
}
|
|
6413
6465
|
list(wsId) {
|
|
6414
6466
|
return this.requestExecutor.json(`/workspaces/${wsId}/design-systems`, DTODesignSystemsListResponse);
|
|
6415
6467
|
}
|
|
6416
6468
|
get(dsId) {
|
|
6417
|
-
return this.requestExecutor.json(`/design-systems/${dsId}`,
|
|
6469
|
+
return this.requestExecutor.json(`/design-systems/${dsId}`, z230.any());
|
|
6418
6470
|
}
|
|
6419
6471
|
delete(dsId) {
|
|
6420
|
-
return this.requestExecutor.json(`/design-systems/${dsId}`,
|
|
6472
|
+
return this.requestExecutor.json(`/design-systems/${dsId}`, z230.any(), { method: "DELETE" });
|
|
6421
6473
|
}
|
|
6422
|
-
|
|
6423
|
-
return this.requestExecutor.json(`/design-systems/${dsId}
|
|
6424
|
-
method: "
|
|
6474
|
+
update(dsId, body) {
|
|
6475
|
+
return this.requestExecutor.json(`/design-systems/${dsId}`, DTODesignSystemResponse, {
|
|
6476
|
+
method: "PUT",
|
|
6425
6477
|
body
|
|
6426
6478
|
});
|
|
6427
6479
|
}
|
|
@@ -6433,18 +6485,53 @@ var UsersEndpoint = class {
|
|
|
6433
6485
|
this.requestExecutor = requestExecutor;
|
|
6434
6486
|
}
|
|
6435
6487
|
getMe() {
|
|
6436
|
-
return this.requestExecutor.json("/users/me",
|
|
6488
|
+
return this.requestExecutor.json("/users/me", DTOAuthenticatedUserResponse);
|
|
6489
|
+
}
|
|
6490
|
+
listWorkspaces(uid) {
|
|
6491
|
+
return this.requestExecutor.json(`/users/${uid}/workspaces`, DTOUserWorkspaceMembershipsResponse);
|
|
6492
|
+
}
|
|
6493
|
+
delete(uid) {
|
|
6494
|
+
return this.requestExecutor.json(`/users/${uid}`, DTOAuthenticatedUserResponse, { method: "DELETE" });
|
|
6495
|
+
}
|
|
6496
|
+
};
|
|
6497
|
+
|
|
6498
|
+
// src/api/endpoints/workspace-members.ts
|
|
6499
|
+
import { z as z231 } from "zod";
|
|
6500
|
+
var WorkspaceMembersEndpoint = class {
|
|
6501
|
+
constructor(requestExecutor) {
|
|
6502
|
+
this.requestExecutor = requestExecutor;
|
|
6503
|
+
}
|
|
6504
|
+
list(workspaceId) {
|
|
6505
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/members`, DTOUserWorkspaceMembershipsResponse, {
|
|
6506
|
+
method: "GET"
|
|
6507
|
+
});
|
|
6508
|
+
}
|
|
6509
|
+
update(workspaceId, body) {
|
|
6510
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/members/role`, DTOWorkspaceResponse, {
|
|
6511
|
+
method: "PUT",
|
|
6512
|
+
body
|
|
6513
|
+
});
|
|
6514
|
+
}
|
|
6515
|
+
invite(workspaceId, body) {
|
|
6516
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/members`, z231.any(), { method: "POST", body });
|
|
6517
|
+
}
|
|
6518
|
+
delete(workspaceId, userId) {
|
|
6519
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/members/${userId}`, DTOWorkspaceResponse, {
|
|
6520
|
+
method: "DELETE"
|
|
6521
|
+
});
|
|
6437
6522
|
}
|
|
6438
6523
|
};
|
|
6439
6524
|
|
|
6440
6525
|
// src/api/endpoints/workspaces.ts
|
|
6441
|
-
import { z as
|
|
6526
|
+
import { z as z232 } from "zod";
|
|
6442
6527
|
var WorkspacesEndpoint = class {
|
|
6443
6528
|
constructor(requestExecutor) {
|
|
6444
6529
|
this.requestExecutor = requestExecutor;
|
|
6530
|
+
__publicField(this, "members");
|
|
6531
|
+
this.members = new WorkspaceMembersEndpoint(requestExecutor);
|
|
6445
6532
|
}
|
|
6446
6533
|
create(body) {
|
|
6447
|
-
return this.requestExecutor.json("/workspaces",
|
|
6534
|
+
return this.requestExecutor.json("/workspaces", DTOWorkspaceResponse, {
|
|
6448
6535
|
method: "POST",
|
|
6449
6536
|
body: {
|
|
6450
6537
|
...body,
|
|
@@ -6454,10 +6541,10 @@ var WorkspacesEndpoint = class {
|
|
|
6454
6541
|
});
|
|
6455
6542
|
}
|
|
6456
6543
|
delete(workspaceId) {
|
|
6457
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}`,
|
|
6544
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}`, z232.any(), { method: "DELETE" });
|
|
6458
6545
|
}
|
|
6459
|
-
|
|
6460
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}/
|
|
6546
|
+
subscription(workspaceId) {
|
|
6547
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/subscription`, z232.any(), { method: "GET" });
|
|
6461
6548
|
}
|
|
6462
6549
|
};
|
|
6463
6550
|
|
|
@@ -6479,9 +6566,9 @@ ${bodyText}`);
|
|
|
6479
6566
|
|
|
6480
6567
|
// src/api/transport/request-executor.ts
|
|
6481
6568
|
import fetch from "node-fetch";
|
|
6482
|
-
import { z as
|
|
6483
|
-
var ResponseWrapper =
|
|
6484
|
-
result:
|
|
6569
|
+
import { z as z233 } from "zod";
|
|
6570
|
+
var ResponseWrapper = z233.object({
|
|
6571
|
+
result: z233.record(z233.any())
|
|
6485
6572
|
});
|
|
6486
6573
|
var RequestExecutor = class {
|
|
6487
6574
|
constructor(testServerConfig) {
|
|
@@ -6603,7 +6690,7 @@ function generateHash(input, debug = false) {
|
|
|
6603
6690
|
}
|
|
6604
6691
|
|
|
6605
6692
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
6606
|
-
import { z as
|
|
6693
|
+
import { z as z234 } from "zod";
|
|
6607
6694
|
|
|
6608
6695
|
// src/yjs/version-room/base.ts
|
|
6609
6696
|
var VersionRoomBaseYDoc = class {
|
|
@@ -7132,24 +7219,24 @@ var FrontendVersionRoomYDoc = class {
|
|
|
7132
7219
|
};
|
|
7133
7220
|
|
|
7134
7221
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
7135
|
-
var DocumentationHierarchySettings =
|
|
7136
|
-
routingVersion:
|
|
7137
|
-
isDraftFeatureAdopted:
|
|
7138
|
-
isApprovalFeatureEnabled:
|
|
7139
|
-
approvalRequiredForPublishing:
|
|
7222
|
+
var DocumentationHierarchySettings = z234.object({
|
|
7223
|
+
routingVersion: z234.string(),
|
|
7224
|
+
isDraftFeatureAdopted: z234.boolean(),
|
|
7225
|
+
isApprovalFeatureEnabled: z234.boolean(),
|
|
7226
|
+
approvalRequiredForPublishing: z234.boolean()
|
|
7140
7227
|
});
|
|
7141
7228
|
function yjsToDocumentationHierarchy(doc) {
|
|
7142
7229
|
return new FrontendVersionRoomYDoc(doc).getDocumentationHierarchy();
|
|
7143
7230
|
}
|
|
7144
7231
|
|
|
7145
7232
|
// src/yjs/design-system-content/item-configuration.ts
|
|
7146
|
-
import { z as
|
|
7147
|
-
var DTODocumentationPageRoomHeaderData =
|
|
7148
|
-
title:
|
|
7233
|
+
import { z as z235 } from "zod";
|
|
7234
|
+
var DTODocumentationPageRoomHeaderData = z235.object({
|
|
7235
|
+
title: z235.string(),
|
|
7149
7236
|
configuration: DTODocumentationItemConfigurationV2
|
|
7150
7237
|
});
|
|
7151
|
-
var DTODocumentationPageRoomHeaderDataUpdate =
|
|
7152
|
-
title:
|
|
7238
|
+
var DTODocumentationPageRoomHeaderDataUpdate = z235.object({
|
|
7239
|
+
title: z235.string().optional(),
|
|
7153
7240
|
configuration: DTODocumentationItemConfigurationV2.omit({ header: true }).extend({ header: DocumentationItemHeaderV2.partial() }).optional()
|
|
7154
7241
|
});
|
|
7155
7242
|
function itemConfigurationToYjs(yDoc, item) {
|
|
@@ -7200,7 +7287,7 @@ function yjsToItemConfiguration(yDoc) {
|
|
|
7200
7287
|
header: rawHeader
|
|
7201
7288
|
};
|
|
7202
7289
|
return {
|
|
7203
|
-
title:
|
|
7290
|
+
title: z235.string().parse(title),
|
|
7204
7291
|
configuration: DTODocumentationItemConfigurationV2.parse(rawConfig)
|
|
7205
7292
|
};
|
|
7206
7293
|
}
|
|
@@ -7210,9 +7297,9 @@ var PageBlockEditorModel = PageBlockEditorModelV2;
|
|
|
7210
7297
|
var PageSectionEditorModel = PageSectionEditorModelV2;
|
|
7211
7298
|
|
|
7212
7299
|
// src/yjs/docs-editor/model/page.ts
|
|
7213
|
-
import { z as
|
|
7214
|
-
var DocumentationPageEditorModel =
|
|
7215
|
-
blocks:
|
|
7300
|
+
import { z as z236 } from "zod";
|
|
7301
|
+
var DocumentationPageEditorModel = z236.object({
|
|
7302
|
+
blocks: z236.array(DocumentationPageContentItem)
|
|
7216
7303
|
});
|
|
7217
7304
|
|
|
7218
7305
|
// src/yjs/docs-editor/prosemirror/inner-editor-schema.ts
|
|
@@ -10563,7 +10650,7 @@ var blocks = [
|
|
|
10563
10650
|
|
|
10564
10651
|
// src/yjs/docs-editor/prosemirror-to-blocks.ts
|
|
10565
10652
|
import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
|
|
10566
|
-
import { z as
|
|
10653
|
+
import { z as z237 } from "zod";
|
|
10567
10654
|
function yDocToPage(yDoc, definitions) {
|
|
10568
10655
|
return yXmlFragmentToPage(yDoc.getXmlFragment("default"), definitions);
|
|
10569
10656
|
}
|
|
@@ -10643,7 +10730,7 @@ function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
|
|
|
10643
10730
|
return null;
|
|
10644
10731
|
return {
|
|
10645
10732
|
id,
|
|
10646
|
-
title: getProsemirrorAttribute(prosemirrorNode, "title",
|
|
10733
|
+
title: getProsemirrorAttribute(prosemirrorNode, "title", z237.string()) ?? "",
|
|
10647
10734
|
columns: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(nonNullFilter)
|
|
10648
10735
|
};
|
|
10649
10736
|
}
|
|
@@ -10678,7 +10765,7 @@ function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap, dept
|
|
|
10678
10765
|
});
|
|
10679
10766
|
}
|
|
10680
10767
|
function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap, depth) {
|
|
10681
|
-
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId",
|
|
10768
|
+
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z237.string());
|
|
10682
10769
|
if (!definitionId) {
|
|
10683
10770
|
console.warn(`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`);
|
|
10684
10771
|
return [];
|
|
@@ -10720,7 +10807,7 @@ function parseAsRichText(prosemirrorNode, definition, property) {
|
|
|
10720
10807
|
if (!id)
|
|
10721
10808
|
return null;
|
|
10722
10809
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
10723
|
-
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type",
|
|
10810
|
+
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z237.string().optional()));
|
|
10724
10811
|
return {
|
|
10725
10812
|
id,
|
|
10726
10813
|
type: "Block",
|
|
@@ -10848,10 +10935,10 @@ function parseRichTextAttribute(mark) {
|
|
|
10848
10935
|
return null;
|
|
10849
10936
|
}
|
|
10850
10937
|
function parseProsemirrorLink(mark) {
|
|
10851
|
-
const href = getProsemirrorAttribute(mark, "href",
|
|
10938
|
+
const href = getProsemirrorAttribute(mark, "href", z237.string().optional());
|
|
10852
10939
|
if (!href)
|
|
10853
10940
|
return null;
|
|
10854
|
-
const target = getProsemirrorAttribute(mark, "target",
|
|
10941
|
+
const target = getProsemirrorAttribute(mark, "target", z237.string().optional());
|
|
10855
10942
|
const openInNewTab = target === "_blank";
|
|
10856
10943
|
if (href.startsWith("@")) {
|
|
10857
10944
|
return {
|
|
@@ -10870,10 +10957,10 @@ function parseProsemirrorLink(mark) {
|
|
|
10870
10957
|
}
|
|
10871
10958
|
}
|
|
10872
10959
|
function parseProsemirrorCommentHighlight(mark) {
|
|
10873
|
-
const highlightId = getProsemirrorAttribute(mark, "highlightId",
|
|
10960
|
+
const highlightId = getProsemirrorAttribute(mark, "highlightId", z237.string().optional());
|
|
10874
10961
|
if (!highlightId)
|
|
10875
10962
|
return null;
|
|
10876
|
-
const isResolved = getProsemirrorAttribute(mark, "resolved",
|
|
10963
|
+
const isResolved = getProsemirrorAttribute(mark, "resolved", z237.boolean().optional()) ?? false;
|
|
10877
10964
|
return {
|
|
10878
10965
|
type: "Comment",
|
|
10879
10966
|
commentHighlightId: highlightId,
|
|
@@ -10885,7 +10972,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
10885
10972
|
if (!id)
|
|
10886
10973
|
return null;
|
|
10887
10974
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
10888
|
-
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder",
|
|
10975
|
+
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z237.boolean().optional()) !== false;
|
|
10889
10976
|
const tableChild = prosemirrorNode.content?.find((c) => c.type === "table");
|
|
10890
10977
|
if (!tableChild) {
|
|
10891
10978
|
return emptyTable(id, variantId, 0);
|
|
@@ -10932,9 +11019,9 @@ function parseAsTableCell(prosemirrorNode) {
|
|
|
10932
11019
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
10933
11020
|
if (!id)
|
|
10934
11021
|
return null;
|
|
10935
|
-
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign",
|
|
11022
|
+
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z237.string().optional());
|
|
10936
11023
|
let columnWidth;
|
|
10937
|
-
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth",
|
|
11024
|
+
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z237.array(z237.number()).nullish());
|
|
10938
11025
|
if (columnWidthArray) {
|
|
10939
11026
|
columnWidth = roundDimension(columnWidthArray[0]);
|
|
10940
11027
|
}
|
|
@@ -10972,7 +11059,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
10972
11059
|
value: parseRichText(prosemirrorNode.content ?? [])
|
|
10973
11060
|
};
|
|
10974
11061
|
case "image":
|
|
10975
|
-
const items = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
11062
|
+
const items = getProsemirrorAttribute(prosemirrorNode, "items", z237.string());
|
|
10976
11063
|
if (!items)
|
|
10977
11064
|
return null;
|
|
10978
11065
|
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
@@ -11092,7 +11179,7 @@ function definitionExpectsPlaceholderItem(definition) {
|
|
|
11092
11179
|
);
|
|
11093
11180
|
}
|
|
11094
11181
|
function parseBlockItems(prosemirrorNode, definition) {
|
|
11095
|
-
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
11182
|
+
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z237.string());
|
|
11096
11183
|
if (!itemsString)
|
|
11097
11184
|
return null;
|
|
11098
11185
|
const itemsJson = JSON.parse(itemsString);
|
|
@@ -11104,18 +11191,18 @@ function parseBlockItems(prosemirrorNode, definition) {
|
|
|
11104
11191
|
}
|
|
11105
11192
|
function parseAppearance(prosemirrorNode) {
|
|
11106
11193
|
let appearance = {};
|
|
11107
|
-
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance",
|
|
11194
|
+
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance", z237.string().optional());
|
|
11108
11195
|
if (rawAppearanceString) {
|
|
11109
11196
|
const parsedAppearance = PageBlockAppearanceV2.safeParse(JSON.parse(rawAppearanceString));
|
|
11110
11197
|
if (parsedAppearance.success) {
|
|
11111
11198
|
appearance = parsedAppearance.data;
|
|
11112
11199
|
}
|
|
11113
11200
|
}
|
|
11114
|
-
const columns = getProsemirrorAttribute(prosemirrorNode, "columns",
|
|
11201
|
+
const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z237.number().optional());
|
|
11115
11202
|
if (columns) {
|
|
11116
11203
|
appearance.numberOfColumns = columns;
|
|
11117
11204
|
}
|
|
11118
|
-
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor",
|
|
11205
|
+
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z237.string().optional());
|
|
11119
11206
|
if (backgroundColor) {
|
|
11120
11207
|
const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
|
|
11121
11208
|
if (parsedColor.success) {
|
|
@@ -11210,13 +11297,13 @@ function valueSchemaForPropertyType(type) {
|
|
|
11210
11297
|
}
|
|
11211
11298
|
}
|
|
11212
11299
|
function getProsemirrorBlockId(prosemirrorNode) {
|
|
11213
|
-
const id = getProsemirrorAttribute(prosemirrorNode, "id",
|
|
11300
|
+
const id = getProsemirrorAttribute(prosemirrorNode, "id", z237.string());
|
|
11214
11301
|
if (!id)
|
|
11215
11302
|
console.warn(`Prosemirror attribute "id" on ${prosemirrorNode.type} is required`);
|
|
11216
11303
|
return id;
|
|
11217
11304
|
}
|
|
11218
11305
|
function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
11219
|
-
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(
|
|
11306
|
+
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z237.string()));
|
|
11220
11307
|
}
|
|
11221
11308
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
11222
11309
|
const parsedAttr = validationSchema.safeParse(prosemirrorNode.attrs?.[attributeName]);
|
|
@@ -11273,6 +11360,9 @@ export {
|
|
|
11273
11360
|
DTOAppBootstrapDataQuery,
|
|
11274
11361
|
DTOAppBootstrapDataResponse,
|
|
11275
11362
|
DTOAssetRenderConfiguration,
|
|
11363
|
+
DTOAuthenticatedUser,
|
|
11364
|
+
DTOAuthenticatedUserProfile,
|
|
11365
|
+
DTOAuthenticatedUserResponse,
|
|
11276
11366
|
DTOBrand,
|
|
11277
11367
|
DTOBrandCreateResponse,
|
|
11278
11368
|
DTOBrandGetResponse,
|
|
@@ -11297,11 +11387,11 @@ export {
|
|
|
11297
11387
|
DTODesignElementsDataDiffResponse,
|
|
11298
11388
|
DTODesignSystem,
|
|
11299
11389
|
DTODesignSystemCreateInput,
|
|
11300
|
-
DTODesignSystemCreateResponse,
|
|
11301
11390
|
DTODesignSystemMember,
|
|
11302
11391
|
DTODesignSystemMemberListResponse,
|
|
11303
11392
|
DTODesignSystemMembersUpdatePayload,
|
|
11304
11393
|
DTODesignSystemMembersUpdateResponse,
|
|
11394
|
+
DTODesignSystemResponse,
|
|
11305
11395
|
DTODesignSystemUpdateInput,
|
|
11306
11396
|
DTODesignSystemVersion,
|
|
11307
11397
|
DTODesignSystemVersionCreationResponse,
|
|
@@ -11465,20 +11555,25 @@ export {
|
|
|
11465
11555
|
DTOUser,
|
|
11466
11556
|
DTOUserGetResponse,
|
|
11467
11557
|
DTOUserNotificationSettingsResponse,
|
|
11558
|
+
DTOUserOnboarding,
|
|
11559
|
+
DTOUserOnboardingDepartment,
|
|
11560
|
+
DTOUserOnboardingJobLevel,
|
|
11468
11561
|
DTOUserProfile,
|
|
11469
11562
|
DTOUserProfileUpdatePayload,
|
|
11470
11563
|
DTOUserProfileUpdateResponse,
|
|
11564
|
+
DTOUserSource,
|
|
11471
11565
|
DTOUserWorkspaceMembership,
|
|
11472
11566
|
DTOUserWorkspaceMembershipsResponse,
|
|
11473
11567
|
DTOWorkspace,
|
|
11474
11568
|
DTOWorkspaceCreateInput,
|
|
11475
|
-
DTOWorkspaceCreateResponse,
|
|
11476
11569
|
DTOWorkspaceIntegrationGetGitObjectsInput,
|
|
11477
11570
|
DTOWorkspaceIntegrationOauthInput,
|
|
11478
11571
|
DTOWorkspaceIntegrationPATInput,
|
|
11479
11572
|
DTOWorkspaceInvitationInput,
|
|
11480
11573
|
DTOWorkspaceInvitationsListInput,
|
|
11574
|
+
DTOWorkspaceResponse,
|
|
11481
11575
|
DTOWorkspaceRole,
|
|
11576
|
+
DesignSystemMembersEndpoint,
|
|
11482
11577
|
DesignSystemsEndpoint,
|
|
11483
11578
|
DocumentationHierarchySettings,
|
|
11484
11579
|
DocumentationPageEditorModel,
|
|
@@ -11496,6 +11591,7 @@ export {
|
|
|
11496
11591
|
VersionRoomBaseYDoc,
|
|
11497
11592
|
VersionSQSPayload,
|
|
11498
11593
|
WorkspaceConfigurationPayload,
|
|
11594
|
+
WorkspaceMembersEndpoint,
|
|
11499
11595
|
WorkspacesEndpoint,
|
|
11500
11596
|
applyPrivacyConfigurationToNestedItems,
|
|
11501
11597
|
blockToProsemirrorNode,
|