@supernova-studio/client 0.54.20 → 0.54.21
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 +2472 -420
- package/dist/index.d.ts +2472 -420
- package/dist/index.js +177 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +622 -448
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/client.ts +26 -0
- package/src/api/dto/design-systems/members.ts +2 -2
- package/src/api/dto/users/user.ts +5 -0
- package/src/api/dto/workspaces/index.ts +1 -0
- package/src/api/dto/workspaces/invitations.ts +15 -0
- package/src/api/dto/workspaces/workspace.ts +15 -0
- package/src/api/endpoints/design-systems.ts +36 -0
- package/src/api/endpoints/index.ts +3 -0
- package/src/api/endpoints/users.ts +10 -0
- package/src/api/endpoints/workspaces.ts +26 -0
- package/src/api/index.ts +3 -0
- package/src/api/transport/index.ts +2 -0
- package/src/api/transport/request-executor-error.ts +18 -0
- package/src/api/transport/request-executor.ts +72 -0
package/dist/index.mjs
CHANGED
|
@@ -4966,7 +4966,7 @@ var DTOPagination = z172.object({
|
|
|
4966
4966
|
});
|
|
4967
4967
|
|
|
4968
4968
|
// src/api/dto/bff/app-bootstrap-data.ts
|
|
4969
|
-
import { z as
|
|
4969
|
+
import { z as z196 } from "zod";
|
|
4970
4970
|
|
|
4971
4971
|
// src/api/dto/design-systems/brand.ts
|
|
4972
4972
|
import { z as z173 } from "zod";
|
|
@@ -5136,8 +5136,8 @@ var DTODesignSystemMembersUpdateResponse = z178.object({
|
|
|
5136
5136
|
ok: z178.literal(true)
|
|
5137
5137
|
});
|
|
5138
5138
|
var DTODesignSystemMembersUpdatePayload = z178.object({
|
|
5139
|
-
inviteUserIds: z178.string().array(),
|
|
5140
|
-
removeUserIds: z178.string().array()
|
|
5139
|
+
inviteUserIds: z178.string().array().optional(),
|
|
5140
|
+
removeUserIds: z178.string().array().optional()
|
|
5141
5141
|
});
|
|
5142
5142
|
|
|
5143
5143
|
// src/api/dto/design-systems/version.ts
|
|
@@ -5452,47 +5452,64 @@ var DTOIntegrationsGetListResponse = z191.object({
|
|
|
5452
5452
|
integrations: DTOIntegration.array()
|
|
5453
5453
|
});
|
|
5454
5454
|
|
|
5455
|
+
// src/api/dto/workspaces/invitations.ts
|
|
5456
|
+
import { z as z192 } from "zod";
|
|
5457
|
+
var DTOWorkspaceInvitationInput = z192.object({
|
|
5458
|
+
email: z192.string().email(),
|
|
5459
|
+
role: WorkspaceRoleSchema
|
|
5460
|
+
});
|
|
5461
|
+
var DTOWorkspaceInvitationsListInput = z192.object({
|
|
5462
|
+
invites: DTOWorkspaceInvitationInput.array().max(100),
|
|
5463
|
+
designSystemId: z192.string().optional()
|
|
5464
|
+
});
|
|
5465
|
+
|
|
5455
5466
|
// src/api/dto/workspaces/membership.ts
|
|
5456
|
-
import { z as
|
|
5467
|
+
import { z as z195 } from "zod";
|
|
5457
5468
|
|
|
5458
5469
|
// src/api/dto/workspaces/workspace.ts
|
|
5459
|
-
import { z as
|
|
5470
|
+
import { z as z194 } from "zod";
|
|
5460
5471
|
|
|
5461
5472
|
// src/api/dto/workspaces/npm-registry.ts
|
|
5462
|
-
import { z as
|
|
5473
|
+
import { z as z193 } from "zod";
|
|
5463
5474
|
var DTONpmRegistryConfigConstants = {
|
|
5464
5475
|
passwordPlaceholder: "redacted"
|
|
5465
5476
|
};
|
|
5466
|
-
var DTONpmRegistryConfig =
|
|
5477
|
+
var DTONpmRegistryConfig = z193.object({
|
|
5467
5478
|
// Registry basic configuration
|
|
5468
5479
|
registryType: NpmRegistryType,
|
|
5469
|
-
registryUrl:
|
|
5470
|
-
customRegistryUrl:
|
|
5480
|
+
registryUrl: z193.string(),
|
|
5481
|
+
customRegistryUrl: z193.string().optional(),
|
|
5471
5482
|
// URL of Supernova NPM packages proxy
|
|
5472
|
-
proxyUrl:
|
|
5483
|
+
proxyUrl: z193.string(),
|
|
5473
5484
|
// Auth configuration
|
|
5474
5485
|
authType: NpmRegistryAuthType,
|
|
5475
|
-
accessToken:
|
|
5476
|
-
username:
|
|
5477
|
-
password:
|
|
5486
|
+
accessToken: z193.literal(DTONpmRegistryConfigConstants.passwordPlaceholder).optional(),
|
|
5487
|
+
username: z193.string().optional(),
|
|
5488
|
+
password: z193.literal(DTONpmRegistryConfigConstants.passwordPlaceholder).optional(),
|
|
5478
5489
|
// NPM package scopes for whih the proxy should be enabled
|
|
5479
|
-
enabledScopes:
|
|
5490
|
+
enabledScopes: z193.array(z193.string()),
|
|
5480
5491
|
// True if client should bypass Supernova proxy and connect directly to the registry
|
|
5481
5492
|
// (e.g. when the NPM registry is behind a VPN or firewall which prevents Supernova from accessing it)
|
|
5482
|
-
bypassProxy:
|
|
5493
|
+
bypassProxy: z193.boolean()
|
|
5483
5494
|
});
|
|
5484
5495
|
|
|
5485
5496
|
// src/api/dto/workspaces/workspace.ts
|
|
5486
|
-
var DTOWorkspace =
|
|
5487
|
-
id:
|
|
5497
|
+
var DTOWorkspace = z194.object({
|
|
5498
|
+
id: z194.string(),
|
|
5488
5499
|
profile: WorkspaceProfile,
|
|
5489
5500
|
subscription: Subscription,
|
|
5490
5501
|
npmRegistry: DTONpmRegistryConfig.optional()
|
|
5491
5502
|
});
|
|
5503
|
+
var DTOWorkspaceCreateInput = z194.object({
|
|
5504
|
+
name: z194.string()
|
|
5505
|
+
});
|
|
5506
|
+
var DTOWorkspaceCreateResponse = z194.object({
|
|
5507
|
+
workspace: DTOWorkspace
|
|
5508
|
+
});
|
|
5492
5509
|
|
|
5493
5510
|
// src/api/dto/workspaces/membership.ts
|
|
5494
|
-
var DTOWorkspaceRole =
|
|
5495
|
-
var DTOUserWorkspaceMembership =
|
|
5511
|
+
var DTOWorkspaceRole = z195.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Contributor"]);
|
|
5512
|
+
var DTOUserWorkspaceMembership = z195.object({
|
|
5496
5513
|
// Workspace the user is a member of
|
|
5497
5514
|
workspace: DTOWorkspace,
|
|
5498
5515
|
// Assigned role the user has in the workspace
|
|
@@ -5502,18 +5519,18 @@ var DTOUserWorkspaceMembership = z194.object({
|
|
|
5502
5519
|
// when a workspace's subscription is downgraded to free tier
|
|
5503
5520
|
effectiveRole: DTOWorkspaceRole
|
|
5504
5521
|
});
|
|
5505
|
-
var DTOUserWorkspaceMembershipsResponse =
|
|
5506
|
-
membership:
|
|
5522
|
+
var DTOUserWorkspaceMembershipsResponse = z195.object({
|
|
5523
|
+
membership: z195.array(DTOUserWorkspaceMembership)
|
|
5507
5524
|
});
|
|
5508
5525
|
|
|
5509
5526
|
// src/api/dto/bff/app-bootstrap-data.ts
|
|
5510
|
-
var DTOAppBootstrapDataQuery =
|
|
5511
|
-
preferredWorkspaceId:
|
|
5512
|
-
preferredDesignSystemId:
|
|
5513
|
-
preferredVersionId:
|
|
5514
|
-
preferredBrandId:
|
|
5527
|
+
var DTOAppBootstrapDataQuery = z196.object({
|
|
5528
|
+
preferredWorkspaceId: z196.string().optional(),
|
|
5529
|
+
preferredDesignSystemId: z196.string().optional(),
|
|
5530
|
+
preferredVersionId: z196.string().optional(),
|
|
5531
|
+
preferredBrandId: z196.string().optional()
|
|
5515
5532
|
});
|
|
5516
|
-
var DTOAppBootstrapDataResponse =
|
|
5533
|
+
var DTOAppBootstrapDataResponse = z196.object({
|
|
5517
5534
|
workspaceMembership: DTOUserWorkspaceMembership.optional(),
|
|
5518
5535
|
designSystem: DTODesignSystem.optional(),
|
|
5519
5536
|
version: DTODesignSystemVersion.optional(),
|
|
@@ -5521,19 +5538,19 @@ var DTOAppBootstrapDataResponse = z195.object({
|
|
|
5521
5538
|
});
|
|
5522
5539
|
|
|
5523
5540
|
// src/api/dto/documentation/anchor.ts
|
|
5524
|
-
import { z as
|
|
5541
|
+
import { z as z197 } from "zod";
|
|
5525
5542
|
var DTODocumentationPageAnchor = DocumentationPageAnchor;
|
|
5526
|
-
var DTOGetDocumentationPageAnchorsResponse =
|
|
5527
|
-
anchors:
|
|
5543
|
+
var DTOGetDocumentationPageAnchorsResponse = z197.object({
|
|
5544
|
+
anchors: z197.array(DTODocumentationPageAnchor)
|
|
5528
5545
|
});
|
|
5529
5546
|
|
|
5530
5547
|
// src/api/dto/documentation/approvals.ts
|
|
5531
|
-
import { z as
|
|
5548
|
+
import { z as z198 } from "zod";
|
|
5532
5549
|
var DTODocumentationPageApprovalState = DocumentationPageApproval;
|
|
5533
|
-
var DTODocumentationGroupApprovalState =
|
|
5534
|
-
persistentId:
|
|
5535
|
-
groupId:
|
|
5536
|
-
designSystemVersionId:
|
|
5550
|
+
var DTODocumentationGroupApprovalState = z198.object({
|
|
5551
|
+
persistentId: z198.string(),
|
|
5552
|
+
groupId: z198.string(),
|
|
5553
|
+
designSystemVersionId: z198.string(),
|
|
5537
5554
|
approvalState: DocumentationPageApprovalState
|
|
5538
5555
|
});
|
|
5539
5556
|
|
|
@@ -5541,68 +5558,68 @@ var DTODocumentationGroupApprovalState = z197.object({
|
|
|
5541
5558
|
var DTOPageBlockItemV2 = PageBlockItemV2;
|
|
5542
5559
|
|
|
5543
5560
|
// src/api/dto/documentation/documentation-page-snapshot.ts
|
|
5544
|
-
import { z as
|
|
5561
|
+
import { z as z203 } from "zod";
|
|
5545
5562
|
|
|
5546
5563
|
// src/api/dto/elements/documentation/page-v2.ts
|
|
5547
|
-
import { z as
|
|
5564
|
+
import { z as z202 } from "zod";
|
|
5548
5565
|
|
|
5549
5566
|
// src/api/dto/elements/documentation/draft-state.ts
|
|
5550
|
-
import { z as
|
|
5567
|
+
import { z as z200 } from "zod";
|
|
5551
5568
|
|
|
5552
5569
|
// src/api/dto/elements/documentation/item-configuration-v2.ts
|
|
5553
|
-
import { z as
|
|
5570
|
+
import { z as z199 } from "zod";
|
|
5554
5571
|
var DTODocumentationItemHeaderV2 = DocumentationItemHeaderV2;
|
|
5555
|
-
var DTODocumentationItemConfigurationV2 =
|
|
5556
|
-
showSidebar:
|
|
5557
|
-
isPrivate:
|
|
5558
|
-
isHidden:
|
|
5572
|
+
var DTODocumentationItemConfigurationV2 = z199.object({
|
|
5573
|
+
showSidebar: z199.boolean(),
|
|
5574
|
+
isPrivate: z199.boolean(),
|
|
5575
|
+
isHidden: z199.boolean(),
|
|
5559
5576
|
header: DTODocumentationItemHeaderV2
|
|
5560
5577
|
});
|
|
5561
5578
|
|
|
5562
5579
|
// src/api/dto/elements/documentation/draft-state.ts
|
|
5563
|
-
var DTODocumentationDraftChangeType =
|
|
5564
|
-
var DTODocumentationDraftStateCreated =
|
|
5565
|
-
changeType:
|
|
5566
|
-
});
|
|
5567
|
-
var DTODocumentationDraftStateUpdated =
|
|
5568
|
-
changeType:
|
|
5569
|
-
changes:
|
|
5570
|
-
previousTitle:
|
|
5580
|
+
var DTODocumentationDraftChangeType = z200.enum(["Created", "Updated", "Deleted"]);
|
|
5581
|
+
var DTODocumentationDraftStateCreated = z200.object({
|
|
5582
|
+
changeType: z200.literal(DTODocumentationDraftChangeType.enum.Created)
|
|
5583
|
+
});
|
|
5584
|
+
var DTODocumentationDraftStateUpdated = z200.object({
|
|
5585
|
+
changeType: z200.literal(DTODocumentationDraftChangeType.enum.Updated),
|
|
5586
|
+
changes: z200.object({
|
|
5587
|
+
previousTitle: z200.string().optional(),
|
|
5571
5588
|
previousConfiguration: DTODocumentationItemConfigurationV2.optional(),
|
|
5572
|
-
previousContentHash:
|
|
5589
|
+
previousContentHash: z200.string().optional()
|
|
5573
5590
|
})
|
|
5574
5591
|
});
|
|
5575
|
-
var DTODocumentationDraftStateDeleted =
|
|
5576
|
-
changeType:
|
|
5577
|
-
deletedAt:
|
|
5578
|
-
deletedByUserId:
|
|
5592
|
+
var DTODocumentationDraftStateDeleted = z200.object({
|
|
5593
|
+
changeType: z200.literal(DTODocumentationDraftChangeType.enum.Deleted),
|
|
5594
|
+
deletedAt: z200.coerce.date(),
|
|
5595
|
+
deletedByUserId: z200.string()
|
|
5579
5596
|
});
|
|
5580
|
-
var DTODocumentationDraftState =
|
|
5597
|
+
var DTODocumentationDraftState = z200.discriminatedUnion("changeType", [
|
|
5581
5598
|
DTODocumentationDraftStateCreated,
|
|
5582
5599
|
DTODocumentationDraftStateUpdated,
|
|
5583
5600
|
DTODocumentationDraftStateDeleted
|
|
5584
5601
|
]);
|
|
5585
5602
|
|
|
5586
5603
|
// src/api/dto/elements/documentation/metadata.ts
|
|
5587
|
-
import { z as
|
|
5588
|
-
var DTODocumentationPublishMetadata =
|
|
5589
|
-
lastPublishedByUserId:
|
|
5590
|
-
lastPublishedAt:
|
|
5604
|
+
import { z as z201 } from "zod";
|
|
5605
|
+
var DTODocumentationPublishMetadata = z201.object({
|
|
5606
|
+
lastPublishedByUserId: z201.string(),
|
|
5607
|
+
lastPublishedAt: z201.coerce.date()
|
|
5591
5608
|
});
|
|
5592
5609
|
|
|
5593
5610
|
// src/api/dto/elements/documentation/page-v2.ts
|
|
5594
|
-
var DTODocumentationPageV2 =
|
|
5595
|
-
id:
|
|
5596
|
-
persistentId:
|
|
5597
|
-
designSystemVersionId:
|
|
5598
|
-
title:
|
|
5611
|
+
var DTODocumentationPageV2 = z202.object({
|
|
5612
|
+
id: z202.string(),
|
|
5613
|
+
persistentId: z202.string(),
|
|
5614
|
+
designSystemVersionId: z202.string(),
|
|
5615
|
+
title: z202.string(),
|
|
5599
5616
|
configuration: DTODocumentationItemConfigurationV2,
|
|
5600
|
-
shortPersistentId:
|
|
5601
|
-
slug:
|
|
5602
|
-
userSlug:
|
|
5603
|
-
createdAt:
|
|
5604
|
-
updatedAt:
|
|
5605
|
-
path:
|
|
5617
|
+
shortPersistentId: z202.string(),
|
|
5618
|
+
slug: z202.string().optional(),
|
|
5619
|
+
userSlug: z202.string().optional(),
|
|
5620
|
+
createdAt: z202.coerce.date(),
|
|
5621
|
+
updatedAt: z202.coerce.date(),
|
|
5622
|
+
path: z202.string(),
|
|
5606
5623
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
5607
5624
|
draftState: DTODocumentationDraftState.optional(),
|
|
5608
5625
|
/** Defined if a page was published at least once and contains metadata about last publish */
|
|
@@ -5610,197 +5627,197 @@ var DTODocumentationPageV2 = z201.object({
|
|
|
5610
5627
|
/** Defines the approval state of the documentation page */
|
|
5611
5628
|
approvalState: DTODocumentationPageApprovalState.optional(),
|
|
5612
5629
|
// Backward compatibility
|
|
5613
|
-
type:
|
|
5630
|
+
type: z202.literal("Page")
|
|
5614
5631
|
});
|
|
5615
|
-
var DTOCreateDocumentationPageInputV2 =
|
|
5632
|
+
var DTOCreateDocumentationPageInputV2 = z202.object({
|
|
5616
5633
|
// Identifier
|
|
5617
|
-
persistentId:
|
|
5634
|
+
persistentId: z202.string().uuid(),
|
|
5618
5635
|
// Page properties
|
|
5619
|
-
title:
|
|
5636
|
+
title: z202.string(),
|
|
5620
5637
|
configuration: DTODocumentationItemConfigurationV2.partial().optional(),
|
|
5621
5638
|
// Page placement properties
|
|
5622
|
-
parentPersistentId:
|
|
5623
|
-
afterPersistentId:
|
|
5639
|
+
parentPersistentId: z202.string().uuid(),
|
|
5640
|
+
afterPersistentId: z202.string().uuid().nullish()
|
|
5624
5641
|
});
|
|
5625
|
-
var DTOUpdateDocumentationPageInputV2 =
|
|
5642
|
+
var DTOUpdateDocumentationPageInputV2 = z202.object({
|
|
5626
5643
|
// Identifier of the group to update
|
|
5627
|
-
id:
|
|
5644
|
+
id: z202.string(),
|
|
5628
5645
|
// Page properties
|
|
5629
|
-
title:
|
|
5646
|
+
title: z202.string().optional(),
|
|
5630
5647
|
configuration: DTODocumentationItemConfigurationV2.partial().optional()
|
|
5631
5648
|
});
|
|
5632
|
-
var DTOMoveDocumentationPageInputV2 =
|
|
5649
|
+
var DTOMoveDocumentationPageInputV2 = z202.object({
|
|
5633
5650
|
// Identifier of the group to update
|
|
5634
|
-
id:
|
|
5651
|
+
id: z202.string(),
|
|
5635
5652
|
// Page placement properties
|
|
5636
|
-
parentPersistentId:
|
|
5637
|
-
afterPersistentId:
|
|
5653
|
+
parentPersistentId: z202.string().uuid(),
|
|
5654
|
+
afterPersistentId: z202.string().uuid().nullish()
|
|
5638
5655
|
});
|
|
5639
|
-
var DTODuplicateDocumentationPageInputV2 =
|
|
5656
|
+
var DTODuplicateDocumentationPageInputV2 = z202.object({
|
|
5640
5657
|
// Identifier of the page to duplicate from
|
|
5641
|
-
id:
|
|
5658
|
+
id: z202.string(),
|
|
5642
5659
|
// New page persistent id
|
|
5643
|
-
persistentId:
|
|
5660
|
+
persistentId: z202.string().uuid(),
|
|
5644
5661
|
// Page placement properties
|
|
5645
|
-
parentPersistentId:
|
|
5646
|
-
afterPersistentId:
|
|
5662
|
+
parentPersistentId: z202.string().uuid(),
|
|
5663
|
+
afterPersistentId: z202.string().uuid().nullish()
|
|
5647
5664
|
});
|
|
5648
|
-
var DTODeleteDocumentationPageInputV2 =
|
|
5665
|
+
var DTODeleteDocumentationPageInputV2 = z202.object({
|
|
5649
5666
|
// Identifier
|
|
5650
|
-
id:
|
|
5667
|
+
id: z202.string()
|
|
5651
5668
|
});
|
|
5652
|
-
var DTORestoreDocumentationPageInput =
|
|
5653
|
-
persistentId:
|
|
5654
|
-
snapshotId:
|
|
5669
|
+
var DTORestoreDocumentationPageInput = z202.object({
|
|
5670
|
+
persistentId: z202.string(),
|
|
5671
|
+
snapshotId: z202.string().optional()
|
|
5655
5672
|
});
|
|
5656
|
-
var DTORestoreDocumentationGroupInput =
|
|
5657
|
-
persistentId:
|
|
5658
|
-
snapshotId:
|
|
5673
|
+
var DTORestoreDocumentationGroupInput = z202.object({
|
|
5674
|
+
persistentId: z202.string(),
|
|
5675
|
+
snapshotId: z202.string().optional()
|
|
5659
5676
|
});
|
|
5660
|
-
var DTODocumentationPageApprovalStateChangeInput =
|
|
5661
|
-
persistentId:
|
|
5677
|
+
var DTODocumentationPageApprovalStateChangeInput = z202.object({
|
|
5678
|
+
persistentId: z202.string(),
|
|
5662
5679
|
approvalState: DocumentationPageApprovalState.optional()
|
|
5663
5680
|
});
|
|
5664
5681
|
|
|
5665
5682
|
// src/api/dto/documentation/documentation-page-snapshot.ts
|
|
5666
|
-
var DTODocumentationPageSnapshot =
|
|
5667
|
-
id:
|
|
5668
|
-
designSystemVersionId:
|
|
5669
|
-
createdAt:
|
|
5670
|
-
updatedAt:
|
|
5683
|
+
var DTODocumentationPageSnapshot = z203.object({
|
|
5684
|
+
id: z203.string(),
|
|
5685
|
+
designSystemVersionId: z203.string(),
|
|
5686
|
+
createdAt: z203.string(),
|
|
5687
|
+
updatedAt: z203.string(),
|
|
5671
5688
|
documentationPage: DTODocumentationPageV2,
|
|
5672
|
-
pageContentHash:
|
|
5689
|
+
pageContentHash: z203.string(),
|
|
5673
5690
|
reason: DesignElementSnapshotReason
|
|
5674
5691
|
});
|
|
5675
5692
|
|
|
5676
5693
|
// src/api/dto/documentation/link-preview.ts
|
|
5677
|
-
import { z as
|
|
5678
|
-
var DTODocumentationLinkPreviewResponse =
|
|
5694
|
+
import { z as z204 } from "zod";
|
|
5695
|
+
var DTODocumentationLinkPreviewResponse = z204.object({
|
|
5679
5696
|
linkPreview: DocumentationLinkPreview
|
|
5680
5697
|
});
|
|
5681
|
-
var DTODocumentationLinkPreviewRequest =
|
|
5682
|
-
url:
|
|
5683
|
-
documentationItemPersistentId:
|
|
5698
|
+
var DTODocumentationLinkPreviewRequest = z204.object({
|
|
5699
|
+
url: z204.string().optional(),
|
|
5700
|
+
documentationItemPersistentId: z204.string().optional()
|
|
5684
5701
|
});
|
|
5685
5702
|
|
|
5686
5703
|
// src/api/dto/documentation/publish.ts
|
|
5687
|
-
import { z as
|
|
5704
|
+
import { z as z208 } from "zod";
|
|
5688
5705
|
|
|
5689
5706
|
// src/api/dto/export/exporter.ts
|
|
5690
|
-
import { z as
|
|
5691
|
-
var DTOExporterType =
|
|
5692
|
-
var DTOExporterSource =
|
|
5693
|
-
var DTOExporterMembershipRole =
|
|
5694
|
-
var DTOExporter =
|
|
5695
|
-
id:
|
|
5696
|
-
name:
|
|
5697
|
-
isPrivate:
|
|
5707
|
+
import { z as z205 } from "zod";
|
|
5708
|
+
var DTOExporterType = z205.enum(["documentation", "code"]);
|
|
5709
|
+
var DTOExporterSource = z205.enum(["git", "upload"]);
|
|
5710
|
+
var DTOExporterMembershipRole = z205.enum(["Owner", "OwnerArchived", "User"]);
|
|
5711
|
+
var DTOExporter = z205.object({
|
|
5712
|
+
id: z205.string(),
|
|
5713
|
+
name: z205.string(),
|
|
5714
|
+
isPrivate: z205.boolean(),
|
|
5698
5715
|
exporterType: DTOExporterType,
|
|
5699
|
-
isDefaultDocumentationExporter:
|
|
5700
|
-
iconURL:
|
|
5716
|
+
isDefaultDocumentationExporter: z205.boolean(),
|
|
5717
|
+
iconURL: z205.string().optional(),
|
|
5701
5718
|
configurationProperties: PulsarContributionConfigurationProperty.array(),
|
|
5702
5719
|
customBlocks: PulsarCustomBlock.array(),
|
|
5703
|
-
blockVariants:
|
|
5704
|
-
usesBrands:
|
|
5705
|
-
usesThemes:
|
|
5720
|
+
blockVariants: z205.record(z205.string(), PulsarContributionVariant.array()),
|
|
5721
|
+
usesBrands: z205.boolean(),
|
|
5722
|
+
usesThemes: z205.boolean(),
|
|
5706
5723
|
source: DTOExporterSource,
|
|
5707
|
-
gitUrl:
|
|
5708
|
-
gitBranch:
|
|
5709
|
-
gitDirectory:
|
|
5724
|
+
gitUrl: z205.string().optional(),
|
|
5725
|
+
gitBranch: z205.string().optional(),
|
|
5726
|
+
gitDirectory: z205.string().optional()
|
|
5710
5727
|
});
|
|
5711
|
-
var DTOExporterMembership =
|
|
5712
|
-
workspaceId:
|
|
5713
|
-
exporterId:
|
|
5728
|
+
var DTOExporterMembership = z205.object({
|
|
5729
|
+
workspaceId: z205.string(),
|
|
5730
|
+
exporterId: z205.string(),
|
|
5714
5731
|
role: DTOExporterMembershipRole
|
|
5715
5732
|
});
|
|
5716
|
-
var DTOExporterCreateOutput =
|
|
5733
|
+
var DTOExporterCreateOutput = z205.object({
|
|
5717
5734
|
exporter: DTOExporter,
|
|
5718
5735
|
membership: DTOExporterMembership
|
|
5719
5736
|
});
|
|
5720
|
-
var DTOExporterGitProviderEnum =
|
|
5721
|
-
var DTOExporterCreateInput =
|
|
5722
|
-
url:
|
|
5737
|
+
var DTOExporterGitProviderEnum = z205.enum(["github", "gitlab", "bitbucket", "azure"]);
|
|
5738
|
+
var DTOExporterCreateInput = z205.object({
|
|
5739
|
+
url: z205.string(),
|
|
5723
5740
|
provider: DTOExporterGitProviderEnum
|
|
5724
5741
|
});
|
|
5725
|
-
var DTOExporterUpdateInput =
|
|
5726
|
-
url:
|
|
5742
|
+
var DTOExporterUpdateInput = z205.object({
|
|
5743
|
+
url: z205.string().optional()
|
|
5727
5744
|
});
|
|
5728
5745
|
|
|
5729
5746
|
// src/api/dto/export/filter.ts
|
|
5730
5747
|
var DTOExportJobsListFilter = ExportJobFindByFilter;
|
|
5731
5748
|
|
|
5732
5749
|
// src/api/dto/export/job.ts
|
|
5733
|
-
import { z as
|
|
5734
|
-
var DTOExportJobCreatedBy =
|
|
5735
|
-
userId:
|
|
5736
|
-
userName:
|
|
5750
|
+
import { z as z206 } from "zod";
|
|
5751
|
+
var DTOExportJobCreatedBy = z206.object({
|
|
5752
|
+
userId: z206.string(),
|
|
5753
|
+
userName: z206.string()
|
|
5737
5754
|
});
|
|
5738
|
-
var DTOExportJobDesignSystemPreview =
|
|
5739
|
-
id:
|
|
5755
|
+
var DTOExportJobDesignSystemPreview = z206.object({
|
|
5756
|
+
id: z206.string(),
|
|
5740
5757
|
meta: ObjectMeta
|
|
5741
5758
|
});
|
|
5742
|
-
var DTOExportJobDesignSystemVersionPreview =
|
|
5743
|
-
id:
|
|
5759
|
+
var DTOExportJobDesignSystemVersionPreview = z206.object({
|
|
5760
|
+
id: z206.string(),
|
|
5744
5761
|
meta: ObjectMeta,
|
|
5745
|
-
version:
|
|
5746
|
-
isReadonly:
|
|
5762
|
+
version: z206.string(),
|
|
5763
|
+
isReadonly: z206.boolean()
|
|
5747
5764
|
});
|
|
5748
|
-
var DTOExportJobDestinations =
|
|
5765
|
+
var DTOExportJobDestinations = z206.object({
|
|
5749
5766
|
s3: ExporterDestinationS3.optional(),
|
|
5750
5767
|
azure: ExporterDestinationAzure.optional(),
|
|
5751
5768
|
bitbucket: ExporterDestinationBitbucket.optional(),
|
|
5752
5769
|
github: ExporterDestinationGithub.optional(),
|
|
5753
5770
|
gitlab: ExporterDestinationGitlab.optional(),
|
|
5754
5771
|
documentation: ExporterDestinationDocs.optional(),
|
|
5755
|
-
webhookUrl:
|
|
5772
|
+
webhookUrl: z206.string().optional()
|
|
5756
5773
|
});
|
|
5757
5774
|
var DTOExportJobResult = ExportJobResult.omit({
|
|
5758
5775
|
sndocs: true
|
|
5759
5776
|
}).extend({
|
|
5760
5777
|
documentation: ExportJobDocsDestinationResult.optional()
|
|
5761
5778
|
});
|
|
5762
|
-
var DTOExportJob =
|
|
5763
|
-
id:
|
|
5764
|
-
createdAt:
|
|
5765
|
-
finishedAt:
|
|
5766
|
-
index:
|
|
5779
|
+
var DTOExportJob = z206.object({
|
|
5780
|
+
id: z206.string(),
|
|
5781
|
+
createdAt: z206.coerce.date(),
|
|
5782
|
+
finishedAt: z206.coerce.date().optional(),
|
|
5783
|
+
index: z206.number().optional(),
|
|
5767
5784
|
status: ExportJobStatus,
|
|
5768
|
-
estimatedExecutionTime:
|
|
5785
|
+
estimatedExecutionTime: z206.number().optional(),
|
|
5769
5786
|
createdBy: DTOExportJobCreatedBy.optional(),
|
|
5770
5787
|
designSystem: DTOExportJobDesignSystemPreview,
|
|
5771
5788
|
designSystemVersion: DTOExportJobDesignSystemVersionPreview,
|
|
5772
5789
|
destinations: DTOExportJobDestinations,
|
|
5773
|
-
exporterId:
|
|
5774
|
-
scheduleId:
|
|
5790
|
+
exporterId: z206.string(),
|
|
5791
|
+
scheduleId: z206.string().optional(),
|
|
5775
5792
|
result: DTOExportJobResult.optional(),
|
|
5776
|
-
brandPersistentId:
|
|
5777
|
-
themePersistentId:
|
|
5778
|
-
themePersistentIds:
|
|
5793
|
+
brandPersistentId: z206.string().optional(),
|
|
5794
|
+
themePersistentId: z206.string().optional(),
|
|
5795
|
+
themePersistentIds: z206.string().array().optional()
|
|
5779
5796
|
});
|
|
5780
|
-
var DTOExportJobResponse =
|
|
5797
|
+
var DTOExportJobResponse = z206.object({
|
|
5781
5798
|
job: DTOExportJob
|
|
5782
5799
|
});
|
|
5783
5800
|
|
|
5784
5801
|
// src/api/dto/export/pipeline.ts
|
|
5785
|
-
import { z as
|
|
5786
|
-
var DTOPipeline =
|
|
5787
|
-
id:
|
|
5788
|
-
name:
|
|
5802
|
+
import { z as z207 } from "zod";
|
|
5803
|
+
var DTOPipeline = z207.object({
|
|
5804
|
+
id: z207.string(),
|
|
5805
|
+
name: z207.string(),
|
|
5789
5806
|
eventType: PipelineEventType,
|
|
5790
|
-
isEnabled:
|
|
5791
|
-
workspaceId:
|
|
5792
|
-
designSystemId:
|
|
5793
|
-
exporterId:
|
|
5794
|
-
brandPersistentId:
|
|
5795
|
-
themePersistentId:
|
|
5796
|
-
themePersistentIds:
|
|
5807
|
+
isEnabled: z207.boolean(),
|
|
5808
|
+
workspaceId: z207.string(),
|
|
5809
|
+
designSystemId: z207.string(),
|
|
5810
|
+
exporterId: z207.string(),
|
|
5811
|
+
brandPersistentId: z207.string().optional(),
|
|
5812
|
+
themePersistentId: z207.string().optional(),
|
|
5813
|
+
themePersistentIds: z207.string().array().optional(),
|
|
5797
5814
|
...ExportDestinationsMap.shape,
|
|
5798
5815
|
latestJobs: DTOExportJob.array()
|
|
5799
5816
|
});
|
|
5800
5817
|
|
|
5801
5818
|
// src/api/dto/documentation/publish.ts
|
|
5802
5819
|
var DTOPublishDocumentationChanges = ExportJobDocumentationChanges;
|
|
5803
|
-
var DTOPublishDocumentationRequest =
|
|
5820
|
+
var DTOPublishDocumentationRequest = z208.object({
|
|
5804
5821
|
environment: PublishedDocEnvironment,
|
|
5805
5822
|
/**
|
|
5806
5823
|
* If defined, this allows narrowing down what is published to a set of specific pages and groups
|
|
@@ -5808,42 +5825,42 @@ var DTOPublishDocumentationRequest = z207.object({
|
|
|
5808
5825
|
*/
|
|
5809
5826
|
changes: DTOPublishDocumentationChanges.optional()
|
|
5810
5827
|
});
|
|
5811
|
-
var DTOPublishDocumentationResponse =
|
|
5828
|
+
var DTOPublishDocumentationResponse = z208.object({
|
|
5812
5829
|
job: DTOExportJob
|
|
5813
5830
|
});
|
|
5814
5831
|
|
|
5815
5832
|
// src/api/dto/elements/components/figma-component.ts
|
|
5816
|
-
import { z as
|
|
5833
|
+
import { z as z209 } from "zod";
|
|
5817
5834
|
var DTOFigmaComponentProperty = FigmaComponentProperty;
|
|
5818
|
-
var DTOFigmaComponentPropertyMap =
|
|
5819
|
-
var DTOFigmaComponent =
|
|
5820
|
-
id:
|
|
5821
|
-
persistentId:
|
|
5822
|
-
designSystemVersionId:
|
|
5823
|
-
brandId:
|
|
5824
|
-
thumbnailUrl:
|
|
5825
|
-
svgUrl:
|
|
5826
|
-
exportProperties:
|
|
5827
|
-
isAsset:
|
|
5835
|
+
var DTOFigmaComponentPropertyMap = z209.record(DTOFigmaComponentProperty);
|
|
5836
|
+
var DTOFigmaComponent = z209.object({
|
|
5837
|
+
id: z209.string(),
|
|
5838
|
+
persistentId: z209.string(),
|
|
5839
|
+
designSystemVersionId: z209.string(),
|
|
5840
|
+
brandId: z209.string(),
|
|
5841
|
+
thumbnailUrl: z209.string().optional(),
|
|
5842
|
+
svgUrl: z209.string().optional(),
|
|
5843
|
+
exportProperties: z209.object({
|
|
5844
|
+
isAsset: z209.boolean()
|
|
5828
5845
|
}),
|
|
5829
|
-
createdAt:
|
|
5830
|
-
updatedAt:
|
|
5846
|
+
createdAt: z209.coerce.date(),
|
|
5847
|
+
updatedAt: z209.coerce.date(),
|
|
5831
5848
|
meta: ObjectMeta,
|
|
5832
5849
|
originComponent: FigmaComponentOrigin.optional(),
|
|
5833
|
-
parentComponentPersistentId:
|
|
5834
|
-
childrenPersistentIds:
|
|
5850
|
+
parentComponentPersistentId: z209.string().optional(),
|
|
5851
|
+
childrenPersistentIds: z209.string().array().optional(),
|
|
5835
5852
|
componentPropertyDefinitions: DTOFigmaComponentPropertyMap.optional(),
|
|
5836
|
-
variantPropertyValues:
|
|
5853
|
+
variantPropertyValues: z209.record(z209.string()).optional()
|
|
5837
5854
|
});
|
|
5838
|
-
var DTOFigmaComponentListResponse =
|
|
5855
|
+
var DTOFigmaComponentListResponse = z209.object({
|
|
5839
5856
|
components: DTOFigmaComponent.array()
|
|
5840
5857
|
});
|
|
5841
5858
|
|
|
5842
5859
|
// src/api/dto/elements/documentation/group-action.ts
|
|
5843
|
-
import { z as
|
|
5860
|
+
import { z as z211 } from "zod";
|
|
5844
5861
|
|
|
5845
5862
|
// src/api/dto/elements/documentation/group-v2.ts
|
|
5846
|
-
import { z as
|
|
5863
|
+
import { z as z210 } from "zod";
|
|
5847
5864
|
var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
5848
5865
|
sortOrder: true,
|
|
5849
5866
|
parentPersistentId: true,
|
|
@@ -5853,13 +5870,13 @@ var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
|
5853
5870
|
data: true,
|
|
5854
5871
|
shortPersistentId: true
|
|
5855
5872
|
}).extend({
|
|
5856
|
-
title:
|
|
5857
|
-
isRoot:
|
|
5858
|
-
childrenIds:
|
|
5873
|
+
title: z210.string(),
|
|
5874
|
+
isRoot: z210.boolean(),
|
|
5875
|
+
childrenIds: z210.array(z210.string()),
|
|
5859
5876
|
groupBehavior: DocumentationGroupBehavior,
|
|
5860
|
-
shortPersistentId:
|
|
5877
|
+
shortPersistentId: z210.string(),
|
|
5861
5878
|
configuration: DTODocumentationItemConfigurationV2,
|
|
5862
|
-
type:
|
|
5879
|
+
type: z210.literal("Group"),
|
|
5863
5880
|
/** Defined when a group has changed since last publish and can be included into a partial publish */
|
|
5864
5881
|
draftState: DTODocumentationDraftState.optional(),
|
|
5865
5882
|
/** Defined if a group was published at least once and contains metadata about last publish */
|
|
@@ -5867,127 +5884,127 @@ var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
|
5867
5884
|
//** An approval state for frontend to utilize. */
|
|
5868
5885
|
approvalState: DTODocumentationGroupApprovalState.optional()
|
|
5869
5886
|
});
|
|
5870
|
-
var DTOCreateDocumentationGroupInput =
|
|
5887
|
+
var DTOCreateDocumentationGroupInput = z210.object({
|
|
5871
5888
|
// Identifier
|
|
5872
|
-
persistentId:
|
|
5889
|
+
persistentId: z210.string().uuid(),
|
|
5873
5890
|
// Group properties
|
|
5874
|
-
title:
|
|
5891
|
+
title: z210.string(),
|
|
5875
5892
|
configuration: DTODocumentationItemConfigurationV2.partial().optional(),
|
|
5876
5893
|
// Group placement properties
|
|
5877
|
-
afterPersistentId:
|
|
5878
|
-
parentPersistentId:
|
|
5894
|
+
afterPersistentId: z210.string().uuid().nullish(),
|
|
5895
|
+
parentPersistentId: z210.string().uuid()
|
|
5879
5896
|
});
|
|
5880
|
-
var DTOUpdateDocumentationGroupInput =
|
|
5897
|
+
var DTOUpdateDocumentationGroupInput = z210.object({
|
|
5881
5898
|
// Identifier of the group to update
|
|
5882
|
-
id:
|
|
5899
|
+
id: z210.string(),
|
|
5883
5900
|
// Group properties
|
|
5884
|
-
title:
|
|
5901
|
+
title: z210.string().optional(),
|
|
5885
5902
|
configuration: DTODocumentationItemConfigurationV2.partial().optional()
|
|
5886
5903
|
});
|
|
5887
|
-
var DTOMoveDocumentationGroupInput =
|
|
5904
|
+
var DTOMoveDocumentationGroupInput = z210.object({
|
|
5888
5905
|
// Identifier of the group to update
|
|
5889
|
-
id:
|
|
5906
|
+
id: z210.string(),
|
|
5890
5907
|
// Group placement properties
|
|
5891
|
-
parentPersistentId:
|
|
5892
|
-
afterPersistentId:
|
|
5908
|
+
parentPersistentId: z210.string().uuid(),
|
|
5909
|
+
afterPersistentId: z210.string().uuid().nullish()
|
|
5893
5910
|
});
|
|
5894
|
-
var DTODuplicateDocumentationGroupInput =
|
|
5911
|
+
var DTODuplicateDocumentationGroupInput = z210.object({
|
|
5895
5912
|
// Identifier of the group to duplicate from
|
|
5896
|
-
id:
|
|
5913
|
+
id: z210.string(),
|
|
5897
5914
|
// New group persistent id
|
|
5898
|
-
persistentId:
|
|
5915
|
+
persistentId: z210.string().uuid(),
|
|
5899
5916
|
// Group placement properties
|
|
5900
|
-
afterPersistentId:
|
|
5901
|
-
parentPersistentId:
|
|
5917
|
+
afterPersistentId: z210.string().uuid().nullish(),
|
|
5918
|
+
parentPersistentId: z210.string().uuid()
|
|
5902
5919
|
});
|
|
5903
|
-
var DTOCreateDocumentationTabInput =
|
|
5920
|
+
var DTOCreateDocumentationTabInput = z210.object({
|
|
5904
5921
|
// New group persistent id
|
|
5905
|
-
persistentId:
|
|
5922
|
+
persistentId: z210.string().uuid(),
|
|
5906
5923
|
// If this is page, we will attempt to convert it to tab
|
|
5907
5924
|
// If this is tab group, we will add a new tab to it
|
|
5908
|
-
fromItemPersistentId:
|
|
5909
|
-
tabName:
|
|
5925
|
+
fromItemPersistentId: z210.string(),
|
|
5926
|
+
tabName: z210.string()
|
|
5910
5927
|
});
|
|
5911
|
-
var DTODeleteDocumentationTabGroupInput =
|
|
5928
|
+
var DTODeleteDocumentationTabGroupInput = z210.object({
|
|
5912
5929
|
// Deleted group id
|
|
5913
|
-
id:
|
|
5930
|
+
id: z210.string()
|
|
5914
5931
|
});
|
|
5915
|
-
var DTODeleteDocumentationGroupInput =
|
|
5932
|
+
var DTODeleteDocumentationGroupInput = z210.object({
|
|
5916
5933
|
// Identifier
|
|
5917
|
-
id:
|
|
5934
|
+
id: z210.string(),
|
|
5918
5935
|
// Deletion options
|
|
5919
|
-
deleteSubtree:
|
|
5936
|
+
deleteSubtree: z210.boolean().default(false)
|
|
5920
5937
|
});
|
|
5921
5938
|
|
|
5922
5939
|
// src/api/dto/elements/documentation/group-action.ts
|
|
5923
|
-
var SuccessPayload =
|
|
5924
|
-
success:
|
|
5940
|
+
var SuccessPayload = z211.object({
|
|
5941
|
+
success: z211.literal(true)
|
|
5925
5942
|
});
|
|
5926
|
-
var DTODocumentationGroupCreateActionOutputV2 =
|
|
5927
|
-
type:
|
|
5943
|
+
var DTODocumentationGroupCreateActionOutputV2 = z211.object({
|
|
5944
|
+
type: z211.literal("DocumentationGroupCreate"),
|
|
5928
5945
|
output: SuccessPayload
|
|
5929
5946
|
});
|
|
5930
|
-
var DTODocumentationTabCreateActionOutputV2 =
|
|
5931
|
-
type:
|
|
5947
|
+
var DTODocumentationTabCreateActionOutputV2 = z211.object({
|
|
5948
|
+
type: z211.literal("DocumentationTabCreate"),
|
|
5932
5949
|
output: SuccessPayload
|
|
5933
5950
|
});
|
|
5934
|
-
var DTODocumentationGroupUpdateActionOutputV2 =
|
|
5935
|
-
type:
|
|
5951
|
+
var DTODocumentationGroupUpdateActionOutputV2 = z211.object({
|
|
5952
|
+
type: z211.literal("DocumentationGroupUpdate"),
|
|
5936
5953
|
output: SuccessPayload
|
|
5937
5954
|
});
|
|
5938
|
-
var DTODocumentationGroupMoveActionOutputV2 =
|
|
5939
|
-
type:
|
|
5955
|
+
var DTODocumentationGroupMoveActionOutputV2 = z211.object({
|
|
5956
|
+
type: z211.literal("DocumentationGroupMove"),
|
|
5940
5957
|
output: SuccessPayload
|
|
5941
5958
|
});
|
|
5942
|
-
var DTODocumentationGroupDuplicateActionOutputV2 =
|
|
5943
|
-
type:
|
|
5959
|
+
var DTODocumentationGroupDuplicateActionOutputV2 = z211.object({
|
|
5960
|
+
type: z211.literal("DocumentationGroupDuplicate"),
|
|
5944
5961
|
output: SuccessPayload
|
|
5945
5962
|
});
|
|
5946
|
-
var DTODocumentationGroupDeleteActionOutputV2 =
|
|
5947
|
-
type:
|
|
5963
|
+
var DTODocumentationGroupDeleteActionOutputV2 = z211.object({
|
|
5964
|
+
type: z211.literal("DocumentationGroupDelete"),
|
|
5948
5965
|
output: SuccessPayload
|
|
5949
5966
|
});
|
|
5950
|
-
var DTODocumentationTabGroupDeleteActionOutputV2 =
|
|
5951
|
-
type:
|
|
5967
|
+
var DTODocumentationTabGroupDeleteActionOutputV2 = z211.object({
|
|
5968
|
+
type: z211.literal("DocumentationTabGroupDelete"),
|
|
5952
5969
|
output: SuccessPayload
|
|
5953
5970
|
});
|
|
5954
|
-
var DTODocumentationGroupCreateActionInputV2 =
|
|
5955
|
-
type:
|
|
5971
|
+
var DTODocumentationGroupCreateActionInputV2 = z211.object({
|
|
5972
|
+
type: z211.literal("DocumentationGroupCreate"),
|
|
5956
5973
|
input: DTOCreateDocumentationGroupInput
|
|
5957
5974
|
});
|
|
5958
|
-
var DTODocumentationTabCreateActionInputV2 =
|
|
5959
|
-
type:
|
|
5975
|
+
var DTODocumentationTabCreateActionInputV2 = z211.object({
|
|
5976
|
+
type: z211.literal("DocumentationTabCreate"),
|
|
5960
5977
|
input: DTOCreateDocumentationTabInput
|
|
5961
5978
|
});
|
|
5962
|
-
var DTODocumentationGroupUpdateActionInputV2 =
|
|
5963
|
-
type:
|
|
5979
|
+
var DTODocumentationGroupUpdateActionInputV2 = z211.object({
|
|
5980
|
+
type: z211.literal("DocumentationGroupUpdate"),
|
|
5964
5981
|
input: DTOUpdateDocumentationGroupInput
|
|
5965
5982
|
});
|
|
5966
|
-
var DTODocumentationGroupMoveActionInputV2 =
|
|
5967
|
-
type:
|
|
5983
|
+
var DTODocumentationGroupMoveActionInputV2 = z211.object({
|
|
5984
|
+
type: z211.literal("DocumentationGroupMove"),
|
|
5968
5985
|
input: DTOMoveDocumentationGroupInput
|
|
5969
5986
|
});
|
|
5970
|
-
var DTODocumentationGroupDuplicateActionInputV2 =
|
|
5971
|
-
type:
|
|
5987
|
+
var DTODocumentationGroupDuplicateActionInputV2 = z211.object({
|
|
5988
|
+
type: z211.literal("DocumentationGroupDuplicate"),
|
|
5972
5989
|
input: DTODuplicateDocumentationGroupInput
|
|
5973
5990
|
});
|
|
5974
|
-
var DTODocumentationGroupDeleteActionInputV2 =
|
|
5975
|
-
type:
|
|
5991
|
+
var DTODocumentationGroupDeleteActionInputV2 = z211.object({
|
|
5992
|
+
type: z211.literal("DocumentationGroupDelete"),
|
|
5976
5993
|
input: DTODeleteDocumentationGroupInput
|
|
5977
5994
|
});
|
|
5978
|
-
var DTODocumentationTabGroupDeleteActionInputV2 =
|
|
5979
|
-
type:
|
|
5995
|
+
var DTODocumentationTabGroupDeleteActionInputV2 = z211.object({
|
|
5996
|
+
type: z211.literal("DocumentationTabGroupDelete"),
|
|
5980
5997
|
input: DTODeleteDocumentationTabGroupInput
|
|
5981
5998
|
});
|
|
5982
5999
|
|
|
5983
6000
|
// src/api/dto/elements/documentation/group-v1.ts
|
|
5984
|
-
import { z as
|
|
6001
|
+
import { z as z213 } from "zod";
|
|
5985
6002
|
|
|
5986
6003
|
// src/api/dto/elements/documentation/item-configuration-v1.ts
|
|
5987
|
-
import { z as
|
|
5988
|
-
var DocumentationColorV1 =
|
|
5989
|
-
aliasTo:
|
|
5990
|
-
value:
|
|
6004
|
+
import { z as z212 } from "zod";
|
|
6005
|
+
var DocumentationColorV1 = z212.object({
|
|
6006
|
+
aliasTo: z212.string().optional(),
|
|
6007
|
+
value: z212.string().optional()
|
|
5991
6008
|
});
|
|
5992
6009
|
var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
5993
6010
|
foregroundColor: true,
|
|
@@ -5996,10 +6013,10 @@ var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
|
5996
6013
|
foregroundColor: DocumentationColorV1.optional(),
|
|
5997
6014
|
backgroundColor: DocumentationColorV1.optional()
|
|
5998
6015
|
});
|
|
5999
|
-
var DTODocumentationItemConfigurationV1 =
|
|
6000
|
-
showSidebar:
|
|
6001
|
-
isPrivate:
|
|
6002
|
-
isHidden:
|
|
6016
|
+
var DTODocumentationItemConfigurationV1 = z212.object({
|
|
6017
|
+
showSidebar: z212.boolean(),
|
|
6018
|
+
isPrivate: z212.boolean(),
|
|
6019
|
+
isHidden: z212.boolean(),
|
|
6003
6020
|
header: DTODocumentationItemHeaderV1
|
|
6004
6021
|
});
|
|
6005
6022
|
|
|
@@ -6013,27 +6030,27 @@ var DTODocumentationGroupStructureV1 = ElementGroup.omit({
|
|
|
6013
6030
|
data: true,
|
|
6014
6031
|
shortPersistentId: true
|
|
6015
6032
|
}).extend({
|
|
6016
|
-
title:
|
|
6017
|
-
isRoot:
|
|
6018
|
-
childrenIds:
|
|
6033
|
+
title: z213.string(),
|
|
6034
|
+
isRoot: z213.boolean(),
|
|
6035
|
+
childrenIds: z213.array(z213.string()),
|
|
6019
6036
|
groupBehavior: DocumentationGroupBehavior,
|
|
6020
|
-
shortPersistentId:
|
|
6021
|
-
type:
|
|
6037
|
+
shortPersistentId: z213.string(),
|
|
6038
|
+
type: z213.literal("Group")
|
|
6022
6039
|
});
|
|
6023
6040
|
var DTODocumentationGroupV1 = DTODocumentationGroupStructureV1.extend({
|
|
6024
6041
|
configuration: DTODocumentationItemConfigurationV1
|
|
6025
6042
|
});
|
|
6026
6043
|
|
|
6027
6044
|
// src/api/dto/elements/documentation/hierarchy.ts
|
|
6028
|
-
import { z as
|
|
6029
|
-
var DTODocumentationHierarchyV2 =
|
|
6030
|
-
pages:
|
|
6045
|
+
import { z as z214 } from "zod";
|
|
6046
|
+
var DTODocumentationHierarchyV2 = z214.object({
|
|
6047
|
+
pages: z214.array(
|
|
6031
6048
|
DTODocumentationPageV2.extend({
|
|
6032
6049
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
6033
6050
|
draftState: DTODocumentationDraftState.optional()
|
|
6034
6051
|
})
|
|
6035
6052
|
),
|
|
6036
|
-
groups:
|
|
6053
|
+
groups: z214.array(
|
|
6037
6054
|
DTODocumentationGroupV2.extend({
|
|
6038
6055
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
6039
6056
|
draftState: DTODocumentationDraftState.optional()
|
|
@@ -6042,84 +6059,84 @@ var DTODocumentationHierarchyV2 = z213.object({
|
|
|
6042
6059
|
});
|
|
6043
6060
|
|
|
6044
6061
|
// src/api/dto/elements/documentation/page-actions-v2.ts
|
|
6045
|
-
import { z as
|
|
6046
|
-
var SuccessPayload2 =
|
|
6047
|
-
success:
|
|
6062
|
+
import { z as z215 } from "zod";
|
|
6063
|
+
var SuccessPayload2 = z215.object({
|
|
6064
|
+
success: z215.literal(true)
|
|
6048
6065
|
});
|
|
6049
|
-
var DTODocumentationPageCreateActionOutputV2 =
|
|
6050
|
-
type:
|
|
6066
|
+
var DTODocumentationPageCreateActionOutputV2 = z215.object({
|
|
6067
|
+
type: z215.literal("DocumentationPageCreate"),
|
|
6051
6068
|
output: SuccessPayload2
|
|
6052
6069
|
});
|
|
6053
|
-
var DTODocumentationPageUpdateActionOutputV2 =
|
|
6054
|
-
type:
|
|
6070
|
+
var DTODocumentationPageUpdateActionOutputV2 = z215.object({
|
|
6071
|
+
type: z215.literal("DocumentationPageUpdate"),
|
|
6055
6072
|
output: SuccessPayload2
|
|
6056
6073
|
});
|
|
6057
|
-
var DTODocumentationPageMoveActionOutputV2 =
|
|
6058
|
-
type:
|
|
6074
|
+
var DTODocumentationPageMoveActionOutputV2 = z215.object({
|
|
6075
|
+
type: z215.literal("DocumentationPageMove"),
|
|
6059
6076
|
output: SuccessPayload2
|
|
6060
6077
|
});
|
|
6061
|
-
var DTODocumentationPageDuplicateActionOutputV2 =
|
|
6062
|
-
type:
|
|
6078
|
+
var DTODocumentationPageDuplicateActionOutputV2 = z215.object({
|
|
6079
|
+
type: z215.literal("DocumentationPageDuplicate"),
|
|
6063
6080
|
output: SuccessPayload2
|
|
6064
6081
|
});
|
|
6065
|
-
var DTODocumentationPageDeleteActionOutputV2 =
|
|
6066
|
-
type:
|
|
6082
|
+
var DTODocumentationPageDeleteActionOutputV2 = z215.object({
|
|
6083
|
+
type: z215.literal("DocumentationPageDelete"),
|
|
6067
6084
|
output: SuccessPayload2
|
|
6068
6085
|
});
|
|
6069
|
-
var DTODocumentationPageRestoreActionOutput =
|
|
6070
|
-
type:
|
|
6086
|
+
var DTODocumentationPageRestoreActionOutput = z215.object({
|
|
6087
|
+
type: z215.literal("DocumentationPageRestore"),
|
|
6071
6088
|
output: SuccessPayload2
|
|
6072
6089
|
});
|
|
6073
|
-
var DTODocumentationGroupRestoreActionOutput =
|
|
6074
|
-
type:
|
|
6090
|
+
var DTODocumentationGroupRestoreActionOutput = z215.object({
|
|
6091
|
+
type: z215.literal("DocumentationGroupRestore"),
|
|
6075
6092
|
output: SuccessPayload2
|
|
6076
6093
|
});
|
|
6077
|
-
var DTODocumentationPageApprovalStateChangeActionOutput =
|
|
6078
|
-
type:
|
|
6094
|
+
var DTODocumentationPageApprovalStateChangeActionOutput = z215.object({
|
|
6095
|
+
type: z215.literal("DocumentationPageApprovalStateChange"),
|
|
6079
6096
|
output: SuccessPayload2
|
|
6080
6097
|
});
|
|
6081
|
-
var DTODocumentationPageCreateActionInputV2 =
|
|
6082
|
-
type:
|
|
6098
|
+
var DTODocumentationPageCreateActionInputV2 = z215.object({
|
|
6099
|
+
type: z215.literal("DocumentationPageCreate"),
|
|
6083
6100
|
input: DTOCreateDocumentationPageInputV2
|
|
6084
6101
|
});
|
|
6085
|
-
var DTODocumentationPageUpdateActionInputV2 =
|
|
6086
|
-
type:
|
|
6102
|
+
var DTODocumentationPageUpdateActionInputV2 = z215.object({
|
|
6103
|
+
type: z215.literal("DocumentationPageUpdate"),
|
|
6087
6104
|
input: DTOUpdateDocumentationPageInputV2
|
|
6088
6105
|
});
|
|
6089
|
-
var DTODocumentationPageMoveActionInputV2 =
|
|
6090
|
-
type:
|
|
6106
|
+
var DTODocumentationPageMoveActionInputV2 = z215.object({
|
|
6107
|
+
type: z215.literal("DocumentationPageMove"),
|
|
6091
6108
|
input: DTOMoveDocumentationPageInputV2
|
|
6092
6109
|
});
|
|
6093
|
-
var DTODocumentationPageDuplicateActionInputV2 =
|
|
6094
|
-
type:
|
|
6110
|
+
var DTODocumentationPageDuplicateActionInputV2 = z215.object({
|
|
6111
|
+
type: z215.literal("DocumentationPageDuplicate"),
|
|
6095
6112
|
input: DTODuplicateDocumentationPageInputV2
|
|
6096
6113
|
});
|
|
6097
|
-
var DTODocumentationPageDeleteActionInputV2 =
|
|
6098
|
-
type:
|
|
6114
|
+
var DTODocumentationPageDeleteActionInputV2 = z215.object({
|
|
6115
|
+
type: z215.literal("DocumentationPageDelete"),
|
|
6099
6116
|
input: DTODeleteDocumentationPageInputV2
|
|
6100
6117
|
});
|
|
6101
|
-
var DTODocumentationPageRestoreActionInput =
|
|
6102
|
-
type:
|
|
6118
|
+
var DTODocumentationPageRestoreActionInput = z215.object({
|
|
6119
|
+
type: z215.literal("DocumentationPageRestore"),
|
|
6103
6120
|
input: DTORestoreDocumentationPageInput
|
|
6104
6121
|
});
|
|
6105
|
-
var DTODocumentationGroupRestoreActionInput =
|
|
6106
|
-
type:
|
|
6122
|
+
var DTODocumentationGroupRestoreActionInput = z215.object({
|
|
6123
|
+
type: z215.literal("DocumentationGroupRestore"),
|
|
6107
6124
|
input: DTORestoreDocumentationGroupInput
|
|
6108
6125
|
});
|
|
6109
|
-
var DTODocumentationPageApprovalStateChangeActionInput =
|
|
6110
|
-
type:
|
|
6126
|
+
var DTODocumentationPageApprovalStateChangeActionInput = z215.object({
|
|
6127
|
+
type: z215.literal("DocumentationPageApprovalStateChange"),
|
|
6111
6128
|
input: DTODocumentationPageApprovalStateChangeInput
|
|
6112
6129
|
});
|
|
6113
6130
|
|
|
6114
6131
|
// src/api/dto/elements/documentation/page-content.ts
|
|
6115
|
-
import { z as
|
|
6132
|
+
import { z as z216 } from "zod";
|
|
6116
6133
|
var DTODocumentationPageContent = DocumentationPageContent;
|
|
6117
|
-
var DTODocumentationPageContentGetResponse =
|
|
6134
|
+
var DTODocumentationPageContentGetResponse = z216.object({
|
|
6118
6135
|
pageContent: DTODocumentationPageContent
|
|
6119
6136
|
});
|
|
6120
6137
|
|
|
6121
6138
|
// src/api/dto/elements/documentation/page-v1.ts
|
|
6122
|
-
import { z as
|
|
6139
|
+
import { z as z217 } from "zod";
|
|
6123
6140
|
var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
6124
6141
|
data: true,
|
|
6125
6142
|
meta: true,
|
|
@@ -6127,32 +6144,32 @@ var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
|
6127
6144
|
sortOrder: true
|
|
6128
6145
|
}).extend({
|
|
6129
6146
|
configuration: DTODocumentationItemConfigurationV1,
|
|
6130
|
-
blocks:
|
|
6131
|
-
title:
|
|
6132
|
-
path:
|
|
6147
|
+
blocks: z217.array(PageBlockV1),
|
|
6148
|
+
title: z217.string(),
|
|
6149
|
+
path: z217.string()
|
|
6133
6150
|
});
|
|
6134
6151
|
|
|
6135
6152
|
// src/api/dto/elements/figma-nodes/figma-node.ts
|
|
6136
|
-
import { z as
|
|
6153
|
+
import { z as z218 } from "zod";
|
|
6137
6154
|
var DTOFigmaNodeRenderFormat = FigmaNodeRenderFormat;
|
|
6138
|
-
var DTOFigmaNodeOrigin =
|
|
6139
|
-
sourceId:
|
|
6140
|
-
fileId:
|
|
6141
|
-
parentName:
|
|
6155
|
+
var DTOFigmaNodeOrigin = z218.object({
|
|
6156
|
+
sourceId: z218.string(),
|
|
6157
|
+
fileId: z218.string().optional(),
|
|
6158
|
+
parentName: z218.string().optional()
|
|
6142
6159
|
});
|
|
6143
|
-
var DTOFigmaNodeData =
|
|
6160
|
+
var DTOFigmaNodeData = z218.object({
|
|
6144
6161
|
// Id of the node in the Figma file
|
|
6145
|
-
figmaNodeId:
|
|
6162
|
+
figmaNodeId: z218.string(),
|
|
6146
6163
|
// Validity
|
|
6147
|
-
isValid:
|
|
6164
|
+
isValid: z218.boolean(),
|
|
6148
6165
|
// Asset data
|
|
6149
|
-
assetId:
|
|
6150
|
-
assetUrl:
|
|
6166
|
+
assetId: z218.string(),
|
|
6167
|
+
assetUrl: z218.string(),
|
|
6151
6168
|
assetFormat: DTOFigmaNodeRenderFormat,
|
|
6152
6169
|
// Asset metadata
|
|
6153
|
-
assetScale:
|
|
6154
|
-
assetWidth:
|
|
6155
|
-
assetHeight:
|
|
6170
|
+
assetScale: z218.number(),
|
|
6171
|
+
assetWidth: z218.number().optional(),
|
|
6172
|
+
assetHeight: z218.number().optional()
|
|
6156
6173
|
});
|
|
6157
6174
|
var DTOFigmaNode = FigmaNodeReference.omit({
|
|
6158
6175
|
data: true,
|
|
@@ -6161,15 +6178,15 @@ var DTOFigmaNode = FigmaNodeReference.omit({
|
|
|
6161
6178
|
data: DTOFigmaNodeData,
|
|
6162
6179
|
origin: DTOFigmaNodeOrigin
|
|
6163
6180
|
});
|
|
6164
|
-
var DTOFigmaNodeRenderInput =
|
|
6181
|
+
var DTOFigmaNodeRenderInput = z218.object({
|
|
6165
6182
|
/**
|
|
6166
6183
|
* Id of a design system's data source representing a linked Figma file
|
|
6167
6184
|
*/
|
|
6168
|
-
sourceId:
|
|
6185
|
+
sourceId: z218.string(),
|
|
6169
6186
|
/**
|
|
6170
6187
|
* Id of a node within the Figma file
|
|
6171
6188
|
*/
|
|
6172
|
-
figmaFileNodeId:
|
|
6189
|
+
figmaFileNodeId: z218.string(),
|
|
6173
6190
|
/**
|
|
6174
6191
|
* Format in which the node must be rendered, png by default.
|
|
6175
6192
|
*/
|
|
@@ -6177,97 +6194,97 @@ var DTOFigmaNodeRenderInput = z217.object({
|
|
|
6177
6194
|
});
|
|
6178
6195
|
|
|
6179
6196
|
// src/api/dto/elements/figma-nodes/node-actions-v2.ts
|
|
6180
|
-
import { z as
|
|
6181
|
-
var DTOFigmaNodeRenderActionOutput =
|
|
6182
|
-
type:
|
|
6183
|
-
figmaNodes:
|
|
6197
|
+
import { z as z219 } from "zod";
|
|
6198
|
+
var DTOFigmaNodeRenderActionOutput = z219.object({
|
|
6199
|
+
type: z219.literal("FigmaNodeRender"),
|
|
6200
|
+
figmaNodes: z219.array(DTOFigmaNode)
|
|
6184
6201
|
});
|
|
6185
|
-
var DTOFigmaNodeRenderActionInput =
|
|
6186
|
-
type:
|
|
6202
|
+
var DTOFigmaNodeRenderActionInput = z219.object({
|
|
6203
|
+
type: z219.literal("FigmaNodeRender"),
|
|
6187
6204
|
input: DTOFigmaNodeRenderInput.array()
|
|
6188
6205
|
});
|
|
6189
6206
|
|
|
6190
6207
|
// src/api/dto/elements/properties/property-definitions-actions-v2.ts
|
|
6191
|
-
import { z as
|
|
6208
|
+
import { z as z221 } from "zod";
|
|
6192
6209
|
|
|
6193
6210
|
// src/api/dto/elements/properties/property-definitions.ts
|
|
6194
|
-
import { z as
|
|
6211
|
+
import { z as z220 } from "zod";
|
|
6195
6212
|
var CODE_NAME_REGEX2 = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
6196
|
-
var DTOElementPropertyDefinition =
|
|
6197
|
-
id:
|
|
6198
|
-
designSystemVersionId:
|
|
6213
|
+
var DTOElementPropertyDefinition = z220.object({
|
|
6214
|
+
id: z220.string(),
|
|
6215
|
+
designSystemVersionId: z220.string(),
|
|
6199
6216
|
meta: ObjectMeta,
|
|
6200
|
-
persistentId:
|
|
6217
|
+
persistentId: z220.string(),
|
|
6201
6218
|
type: ElementPropertyTypeSchema,
|
|
6202
6219
|
targetElementType: ElementPropertyTargetType,
|
|
6203
|
-
codeName:
|
|
6204
|
-
options:
|
|
6220
|
+
codeName: z220.string().regex(CODE_NAME_REGEX2),
|
|
6221
|
+
options: z220.array(ElementPropertyDefinitionOption).optional(),
|
|
6205
6222
|
linkElementType: ElementPropertyLinkType.optional()
|
|
6206
6223
|
});
|
|
6207
|
-
var DTOElementPropertyDefinitionsGetResponse =
|
|
6208
|
-
definitions:
|
|
6224
|
+
var DTOElementPropertyDefinitionsGetResponse = z220.object({
|
|
6225
|
+
definitions: z220.array(DTOElementPropertyDefinition)
|
|
6209
6226
|
});
|
|
6210
6227
|
var DTOCreateElementPropertyDefinitionInputV2 = DTOElementPropertyDefinition.omit({
|
|
6211
6228
|
id: true,
|
|
6212
6229
|
designSystemVersionId: true
|
|
6213
6230
|
});
|
|
6214
|
-
var DTOUpdateElementPropertyDefinitionInputV2 =
|
|
6215
|
-
id:
|
|
6216
|
-
name:
|
|
6217
|
-
description:
|
|
6218
|
-
codeName:
|
|
6219
|
-
options:
|
|
6231
|
+
var DTOUpdateElementPropertyDefinitionInputV2 = z220.object({
|
|
6232
|
+
id: z220.string(),
|
|
6233
|
+
name: z220.string().optional(),
|
|
6234
|
+
description: z220.string().optional(),
|
|
6235
|
+
codeName: z220.string().regex(CODE_NAME_REGEX2).optional(),
|
|
6236
|
+
options: z220.array(ElementPropertyDefinitionOption).optional()
|
|
6220
6237
|
});
|
|
6221
|
-
var DTODeleteElementPropertyDefinitionInputV2 =
|
|
6222
|
-
id:
|
|
6238
|
+
var DTODeleteElementPropertyDefinitionInputV2 = z220.object({
|
|
6239
|
+
id: z220.string()
|
|
6223
6240
|
});
|
|
6224
6241
|
|
|
6225
6242
|
// src/api/dto/elements/properties/property-definitions-actions-v2.ts
|
|
6226
|
-
var SuccessPayload3 =
|
|
6227
|
-
success:
|
|
6243
|
+
var SuccessPayload3 = z221.object({
|
|
6244
|
+
success: z221.literal(true)
|
|
6228
6245
|
});
|
|
6229
|
-
var DTOPropertyDefinitionCreateActionOutputV2 =
|
|
6230
|
-
type:
|
|
6246
|
+
var DTOPropertyDefinitionCreateActionOutputV2 = z221.object({
|
|
6247
|
+
type: z221.literal("PropertyDefinitionCreate"),
|
|
6231
6248
|
definition: DTOElementPropertyDefinition
|
|
6232
6249
|
});
|
|
6233
|
-
var DTOPropertyDefinitionUpdateActionOutputV2 =
|
|
6234
|
-
type:
|
|
6250
|
+
var DTOPropertyDefinitionUpdateActionOutputV2 = z221.object({
|
|
6251
|
+
type: z221.literal("PropertyDefinitionUpdate"),
|
|
6235
6252
|
definition: DTOElementPropertyDefinition
|
|
6236
6253
|
});
|
|
6237
|
-
var DTOPropertyDefinitionDeleteActionOutputV2 =
|
|
6238
|
-
type:
|
|
6254
|
+
var DTOPropertyDefinitionDeleteActionOutputV2 = z221.object({
|
|
6255
|
+
type: z221.literal("PropertyDefinitionDelete"),
|
|
6239
6256
|
output: SuccessPayload3
|
|
6240
6257
|
});
|
|
6241
|
-
var DTOPropertyDefinitionCreateActionInputV2 =
|
|
6242
|
-
type:
|
|
6258
|
+
var DTOPropertyDefinitionCreateActionInputV2 = z221.object({
|
|
6259
|
+
type: z221.literal("PropertyDefinitionCreate"),
|
|
6243
6260
|
input: DTOCreateElementPropertyDefinitionInputV2
|
|
6244
6261
|
});
|
|
6245
|
-
var DTOPropertyDefinitionUpdateActionInputV2 =
|
|
6246
|
-
type:
|
|
6262
|
+
var DTOPropertyDefinitionUpdateActionInputV2 = z221.object({
|
|
6263
|
+
type: z221.literal("PropertyDefinitionUpdate"),
|
|
6247
6264
|
input: DTOUpdateElementPropertyDefinitionInputV2
|
|
6248
6265
|
});
|
|
6249
|
-
var DTOPropertyDefinitionDeleteActionInputV2 =
|
|
6250
|
-
type:
|
|
6266
|
+
var DTOPropertyDefinitionDeleteActionInputV2 = z221.object({
|
|
6267
|
+
type: z221.literal("PropertyDefinitionDelete"),
|
|
6251
6268
|
input: DTODeleteElementPropertyDefinitionInputV2
|
|
6252
6269
|
});
|
|
6253
6270
|
|
|
6254
6271
|
// src/api/dto/elements/properties/property-values.ts
|
|
6255
|
-
import { z as
|
|
6256
|
-
var DTOElementPropertyValue =
|
|
6257
|
-
id:
|
|
6258
|
-
designSystemVersionId:
|
|
6259
|
-
definitionId:
|
|
6260
|
-
targetElementId:
|
|
6261
|
-
value:
|
|
6262
|
-
valuePreview:
|
|
6272
|
+
import { z as z222 } from "zod";
|
|
6273
|
+
var DTOElementPropertyValue = z222.object({
|
|
6274
|
+
id: z222.string(),
|
|
6275
|
+
designSystemVersionId: z222.string(),
|
|
6276
|
+
definitionId: z222.string(),
|
|
6277
|
+
targetElementId: z222.string(),
|
|
6278
|
+
value: z222.union([z222.string(), z222.number(), z222.boolean()]).optional(),
|
|
6279
|
+
valuePreview: z222.string().optional()
|
|
6263
6280
|
});
|
|
6264
|
-
var DTOElementPropertyValuesGetResponse =
|
|
6265
|
-
values:
|
|
6281
|
+
var DTOElementPropertyValuesGetResponse = z222.object({
|
|
6282
|
+
values: z222.array(DTOElementPropertyValue)
|
|
6266
6283
|
});
|
|
6267
6284
|
|
|
6268
6285
|
// src/api/dto/elements/elements-action-v2.ts
|
|
6269
|
-
import { z as
|
|
6270
|
-
var DTOElementActionOutput =
|
|
6286
|
+
import { z as z223 } from "zod";
|
|
6287
|
+
var DTOElementActionOutput = z223.discriminatedUnion("type", [
|
|
6271
6288
|
// Documentation pages
|
|
6272
6289
|
DTODocumentationPageCreateActionOutputV2,
|
|
6273
6290
|
DTODocumentationPageUpdateActionOutputV2,
|
|
@@ -6294,7 +6311,7 @@ var DTOElementActionOutput = z222.discriminatedUnion("type", [
|
|
|
6294
6311
|
// Approvals
|
|
6295
6312
|
DTODocumentationPageApprovalStateChangeActionOutput
|
|
6296
6313
|
]);
|
|
6297
|
-
var DTOElementActionInput =
|
|
6314
|
+
var DTOElementActionInput = z223.discriminatedUnion("type", [
|
|
6298
6315
|
// Documentation pages
|
|
6299
6316
|
DTODocumentationPageCreateActionInputV2,
|
|
6300
6317
|
DTODocumentationPageUpdateActionInputV2,
|
|
@@ -6323,62 +6340,208 @@ var DTOElementActionInput = z222.discriminatedUnion("type", [
|
|
|
6323
6340
|
]);
|
|
6324
6341
|
|
|
6325
6342
|
// src/api/dto/elements/get-elements-v2.ts
|
|
6326
|
-
import { z as
|
|
6327
|
-
var DTOElementsGetTypeFilter =
|
|
6328
|
-
var DTOElementsGetQuerySchema =
|
|
6329
|
-
types:
|
|
6343
|
+
import { z as z224 } from "zod";
|
|
6344
|
+
var DTOElementsGetTypeFilter = z224.enum(["FigmaNode"]);
|
|
6345
|
+
var DTOElementsGetQuerySchema = z224.object({
|
|
6346
|
+
types: z224.string().transform((val) => val.split(",").map((v) => DTOElementsGetTypeFilter.parse(v)))
|
|
6330
6347
|
});
|
|
6331
|
-
var DTOElementsGetOutput =
|
|
6332
|
-
figmaNodes:
|
|
6348
|
+
var DTOElementsGetOutput = z224.object({
|
|
6349
|
+
figmaNodes: z224.array(DTOFigmaNode).optional()
|
|
6333
6350
|
});
|
|
6334
6351
|
|
|
6335
6352
|
// src/api/dto/figma-components/assets/download.ts
|
|
6336
|
-
import { z as
|
|
6337
|
-
var DTOAssetRenderConfiguration =
|
|
6338
|
-
prefix:
|
|
6339
|
-
suffix:
|
|
6340
|
-
scale:
|
|
6341
|
-
format:
|
|
6342
|
-
});
|
|
6343
|
-
var DTORenderedAssetFile =
|
|
6344
|
-
assetId:
|
|
6345
|
-
fileName:
|
|
6346
|
-
sourceUrl:
|
|
6353
|
+
import { z as z225 } from "zod";
|
|
6354
|
+
var DTOAssetRenderConfiguration = z225.object({
|
|
6355
|
+
prefix: z225.string().optional(),
|
|
6356
|
+
suffix: z225.string().optional(),
|
|
6357
|
+
scale: z225.enum(["x1", "x2", "x3", "x4"]),
|
|
6358
|
+
format: z225.enum(["png", "pdf", "svg"])
|
|
6359
|
+
});
|
|
6360
|
+
var DTORenderedAssetFile = z225.object({
|
|
6361
|
+
assetId: z225.string(),
|
|
6362
|
+
fileName: z225.string(),
|
|
6363
|
+
sourceUrl: z225.string(),
|
|
6347
6364
|
settings: DTOAssetRenderConfiguration,
|
|
6348
|
-
originalName:
|
|
6365
|
+
originalName: z225.string()
|
|
6349
6366
|
});
|
|
6350
|
-
var DTODownloadAssetsRequest =
|
|
6351
|
-
persistentIds:
|
|
6367
|
+
var DTODownloadAssetsRequest = z225.object({
|
|
6368
|
+
persistentIds: z225.array(z225.string().uuid()).optional(),
|
|
6352
6369
|
settings: DTOAssetRenderConfiguration.array()
|
|
6353
6370
|
});
|
|
6354
|
-
var DTODownloadAssetsResponse =
|
|
6371
|
+
var DTODownloadAssetsResponse = z225.object({
|
|
6355
6372
|
items: DTORenderedAssetFile.array()
|
|
6356
6373
|
});
|
|
6357
6374
|
|
|
6358
6375
|
// src/api/dto/liveblocks/auth-response.ts
|
|
6359
|
-
import { z as
|
|
6360
|
-
var DTOLiveblocksAuthResponse =
|
|
6361
|
-
token:
|
|
6376
|
+
import { z as z226 } from "zod";
|
|
6377
|
+
var DTOLiveblocksAuthResponse = z226.object({
|
|
6378
|
+
token: z226.string()
|
|
6362
6379
|
});
|
|
6363
6380
|
|
|
6364
6381
|
// src/api/dto/users/update.ts
|
|
6365
|
-
import { z as
|
|
6366
|
-
var DTOUserProfileUpdateResponse =
|
|
6382
|
+
import { z as z227 } from "zod";
|
|
6383
|
+
var DTOUserProfileUpdateResponse = z227.object({
|
|
6367
6384
|
user: User
|
|
6368
6385
|
});
|
|
6369
6386
|
|
|
6370
6387
|
// src/api/dto/users/user.ts
|
|
6371
|
-
import { z as
|
|
6372
|
-
var DTOUserProfile =
|
|
6373
|
-
name:
|
|
6374
|
-
nickname:
|
|
6375
|
-
avatar:
|
|
6376
|
-
});
|
|
6377
|
-
var DTOUser =
|
|
6378
|
-
id:
|
|
6379
|
-
email:
|
|
6388
|
+
import { z as z228 } from "zod";
|
|
6389
|
+
var DTOUserProfile = z228.object({
|
|
6390
|
+
name: z228.string(),
|
|
6391
|
+
nickname: z228.string().optional(),
|
|
6392
|
+
avatar: z228.string().optional()
|
|
6393
|
+
});
|
|
6394
|
+
var DTOUser = z228.object({
|
|
6395
|
+
id: z228.string(),
|
|
6396
|
+
email: z228.string(),
|
|
6380
6397
|
profile: DTOUserProfile
|
|
6381
6398
|
});
|
|
6399
|
+
var DTOUserGetResponse = z228.object({
|
|
6400
|
+
user: DTOUser
|
|
6401
|
+
});
|
|
6402
|
+
|
|
6403
|
+
// src/api/endpoints/design-systems.ts
|
|
6404
|
+
import { z as z229 } from "zod";
|
|
6405
|
+
var DesignSystemsEndpoint = class {
|
|
6406
|
+
constructor(requestExecutor) {
|
|
6407
|
+
this.requestExecutor = requestExecutor;
|
|
6408
|
+
}
|
|
6409
|
+
create(body) {
|
|
6410
|
+
return this.requestExecutor.json("/design-systems", DTODesignSystemCreateResponse, { method: "POST", body });
|
|
6411
|
+
}
|
|
6412
|
+
list(wsId) {
|
|
6413
|
+
return this.requestExecutor.json(`/workspaces/${wsId}/design-systems`, DTODesignSystemsListResponse);
|
|
6414
|
+
}
|
|
6415
|
+
get(dsId) {
|
|
6416
|
+
return this.requestExecutor.json(`/design-systems/${dsId}`, z229.any());
|
|
6417
|
+
}
|
|
6418
|
+
delete(dsId) {
|
|
6419
|
+
return this.requestExecutor.json(`/design-systems/${dsId}`, z229.any(), { method: "DELETE" });
|
|
6420
|
+
}
|
|
6421
|
+
editMembers(dsId, body) {
|
|
6422
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/members`, DTODesignSystemMembersUpdateResponse, {
|
|
6423
|
+
method: "POST",
|
|
6424
|
+
body
|
|
6425
|
+
});
|
|
6426
|
+
}
|
|
6427
|
+
};
|
|
6428
|
+
|
|
6429
|
+
// src/api/endpoints/users.ts
|
|
6430
|
+
var UsersEndpoint = class {
|
|
6431
|
+
constructor(requestExecutor) {
|
|
6432
|
+
this.requestExecutor = requestExecutor;
|
|
6433
|
+
}
|
|
6434
|
+
getMe() {
|
|
6435
|
+
return this.requestExecutor.json("/users/me", DTOUserGetResponse);
|
|
6436
|
+
}
|
|
6437
|
+
};
|
|
6438
|
+
|
|
6439
|
+
// src/api/endpoints/workspaces.ts
|
|
6440
|
+
import { z as z230 } from "zod";
|
|
6441
|
+
var WorkspacesEndpoint = class {
|
|
6442
|
+
constructor(requestExecutor) {
|
|
6443
|
+
this.requestExecutor = requestExecutor;
|
|
6444
|
+
}
|
|
6445
|
+
create(body) {
|
|
6446
|
+
return this.requestExecutor.json("/workspaces", DTOWorkspaceCreateResponse, {
|
|
6447
|
+
method: "POST",
|
|
6448
|
+
body: {
|
|
6449
|
+
...body,
|
|
6450
|
+
product: "free",
|
|
6451
|
+
priceId: "yearly"
|
|
6452
|
+
}
|
|
6453
|
+
});
|
|
6454
|
+
}
|
|
6455
|
+
delete(workspaceId) {
|
|
6456
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}`, z230.any(), { method: "DELETE" });
|
|
6457
|
+
}
|
|
6458
|
+
invite(workspaceId, body) {
|
|
6459
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/members`, z230.any(), { method: "POST", body });
|
|
6460
|
+
}
|
|
6461
|
+
};
|
|
6462
|
+
|
|
6463
|
+
// src/api/transport/request-executor-error.ts
|
|
6464
|
+
var RequestExecutorError = class _RequestExecutorError extends Error {
|
|
6465
|
+
constructor(type, message, cause) {
|
|
6466
|
+
super(`${type}: ${message}`, { cause });
|
|
6467
|
+
__publicField(this, "type");
|
|
6468
|
+
this.type = type;
|
|
6469
|
+
}
|
|
6470
|
+
static serverError(endpoint, status, bodyText) {
|
|
6471
|
+
return new _RequestExecutorError("ServerError", `Endpoint ${endpoint} returned ${status}
|
|
6472
|
+
${bodyText}`);
|
|
6473
|
+
}
|
|
6474
|
+
static responseParsingError(endpoint, cause) {
|
|
6475
|
+
return new _RequestExecutorError("ResponseParsingError", `Endpoint ${endpoint} returned incompatible JSON`, cause);
|
|
6476
|
+
}
|
|
6477
|
+
};
|
|
6478
|
+
|
|
6479
|
+
// src/api/transport/request-executor.ts
|
|
6480
|
+
import fetch from "node-fetch";
|
|
6481
|
+
import { z as z231 } from "zod";
|
|
6482
|
+
var ResponseWrapper = z231.object({
|
|
6483
|
+
result: z231.record(z231.any())
|
|
6484
|
+
});
|
|
6485
|
+
var RequestExecutor = class {
|
|
6486
|
+
constructor(testServerConfig) {
|
|
6487
|
+
__publicField(this, "testServerConfig");
|
|
6488
|
+
this.testServerConfig = testServerConfig;
|
|
6489
|
+
}
|
|
6490
|
+
async json(path, schema, requestInit = {}) {
|
|
6491
|
+
const defaultHeaders = {
|
|
6492
|
+
Accept: "application/json"
|
|
6493
|
+
};
|
|
6494
|
+
if (requestInit.body)
|
|
6495
|
+
defaultHeaders["Content-Type"] = "application/json";
|
|
6496
|
+
if (this.testServerConfig.accessToken) {
|
|
6497
|
+
defaultHeaders["Authorization"] = `Bearer ${this.testServerConfig.accessToken}`;
|
|
6498
|
+
}
|
|
6499
|
+
let body;
|
|
6500
|
+
if (requestInit.body && typeof requestInit.body === "object")
|
|
6501
|
+
body = JSON.stringify(requestInit.body);
|
|
6502
|
+
const response = await fetch(this.fullUrl(path), {
|
|
6503
|
+
...requestInit,
|
|
6504
|
+
headers: {
|
|
6505
|
+
...requestInit.headers,
|
|
6506
|
+
...defaultHeaders
|
|
6507
|
+
},
|
|
6508
|
+
body
|
|
6509
|
+
});
|
|
6510
|
+
const endpoint = `${requestInit.method ?? "GET"} ${path}`;
|
|
6511
|
+
if (!response.ok) {
|
|
6512
|
+
const bodyString = await response.text();
|
|
6513
|
+
throw RequestExecutorError.serverError(endpoint, response.status, bodyString);
|
|
6514
|
+
}
|
|
6515
|
+
const wrapperParseResult = ResponseWrapper.safeParse(await response.json());
|
|
6516
|
+
if (!wrapperParseResult.success) {
|
|
6517
|
+
throw RequestExecutorError.responseParsingError(endpoint, wrapperParseResult.error);
|
|
6518
|
+
}
|
|
6519
|
+
const responseParseResult = schema.safeParse(wrapperParseResult.data.result);
|
|
6520
|
+
if (!responseParseResult.success) {
|
|
6521
|
+
throw RequestExecutorError.responseParsingError(endpoint, responseParseResult.error);
|
|
6522
|
+
}
|
|
6523
|
+
return responseParseResult.data;
|
|
6524
|
+
}
|
|
6525
|
+
fullUrl(path) {
|
|
6526
|
+
return `https://${this.testServerConfig.host}/api/v2${path}`;
|
|
6527
|
+
}
|
|
6528
|
+
};
|
|
6529
|
+
|
|
6530
|
+
// src/api/client.ts
|
|
6531
|
+
var SupernovaApiClient = class {
|
|
6532
|
+
constructor(config) {
|
|
6533
|
+
__publicField(this, "users");
|
|
6534
|
+
__publicField(this, "workspaces");
|
|
6535
|
+
__publicField(this, "designSystems");
|
|
6536
|
+
const requestExecutor = new RequestExecutor({
|
|
6537
|
+
host: config.host,
|
|
6538
|
+
accessToken: config.accessToken
|
|
6539
|
+
});
|
|
6540
|
+
this.users = new UsersEndpoint(requestExecutor);
|
|
6541
|
+
this.workspaces = new WorkspacesEndpoint(requestExecutor);
|
|
6542
|
+
this.designSystems = new DesignSystemsEndpoint(requestExecutor);
|
|
6543
|
+
}
|
|
6544
|
+
};
|
|
6382
6545
|
|
|
6383
6546
|
// src/utils/hash.ts
|
|
6384
6547
|
function hash(input) {
|
|
@@ -6439,7 +6602,7 @@ function generateHash(input, debug = false) {
|
|
|
6439
6602
|
}
|
|
6440
6603
|
|
|
6441
6604
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
6442
|
-
import { z as
|
|
6605
|
+
import { z as z232 } from "zod";
|
|
6443
6606
|
|
|
6444
6607
|
// src/yjs/version-room/base.ts
|
|
6445
6608
|
var VersionRoomBaseYDoc = class {
|
|
@@ -6968,24 +7131,24 @@ var FrontendVersionRoomYDoc = class {
|
|
|
6968
7131
|
};
|
|
6969
7132
|
|
|
6970
7133
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
6971
|
-
var DocumentationHierarchySettings =
|
|
6972
|
-
routingVersion:
|
|
6973
|
-
isDraftFeatureAdopted:
|
|
6974
|
-
isApprovalFeatureEnabled:
|
|
6975
|
-
approvalRequiredForPublishing:
|
|
7134
|
+
var DocumentationHierarchySettings = z232.object({
|
|
7135
|
+
routingVersion: z232.string(),
|
|
7136
|
+
isDraftFeatureAdopted: z232.boolean(),
|
|
7137
|
+
isApprovalFeatureEnabled: z232.boolean(),
|
|
7138
|
+
approvalRequiredForPublishing: z232.boolean()
|
|
6976
7139
|
});
|
|
6977
7140
|
function yjsToDocumentationHierarchy(doc) {
|
|
6978
7141
|
return new FrontendVersionRoomYDoc(doc).getDocumentationHierarchy();
|
|
6979
7142
|
}
|
|
6980
7143
|
|
|
6981
7144
|
// src/yjs/design-system-content/item-configuration.ts
|
|
6982
|
-
import { z as
|
|
6983
|
-
var DTODocumentationPageRoomHeaderData =
|
|
6984
|
-
title:
|
|
7145
|
+
import { z as z233 } from "zod";
|
|
7146
|
+
var DTODocumentationPageRoomHeaderData = z233.object({
|
|
7147
|
+
title: z233.string(),
|
|
6985
7148
|
configuration: DTODocumentationItemConfigurationV2
|
|
6986
7149
|
});
|
|
6987
|
-
var DTODocumentationPageRoomHeaderDataUpdate =
|
|
6988
|
-
title:
|
|
7150
|
+
var DTODocumentationPageRoomHeaderDataUpdate = z233.object({
|
|
7151
|
+
title: z233.string().optional(),
|
|
6989
7152
|
configuration: DTODocumentationItemConfigurationV2.omit({ header: true }).extend({ header: DocumentationItemHeaderV2.partial() }).optional()
|
|
6990
7153
|
});
|
|
6991
7154
|
function itemConfigurationToYjs(yDoc, item) {
|
|
@@ -7036,7 +7199,7 @@ function yjsToItemConfiguration(yDoc) {
|
|
|
7036
7199
|
header: rawHeader
|
|
7037
7200
|
};
|
|
7038
7201
|
return {
|
|
7039
|
-
title:
|
|
7202
|
+
title: z233.string().parse(title),
|
|
7040
7203
|
configuration: DTODocumentationItemConfigurationV2.parse(rawConfig)
|
|
7041
7204
|
};
|
|
7042
7205
|
}
|
|
@@ -7046,9 +7209,9 @@ var PageBlockEditorModel = PageBlockEditorModelV2;
|
|
|
7046
7209
|
var PageSectionEditorModel = PageSectionEditorModelV2;
|
|
7047
7210
|
|
|
7048
7211
|
// src/yjs/docs-editor/model/page.ts
|
|
7049
|
-
import { z as
|
|
7050
|
-
var DocumentationPageEditorModel =
|
|
7051
|
-
blocks:
|
|
7212
|
+
import { z as z234 } from "zod";
|
|
7213
|
+
var DocumentationPageEditorModel = z234.object({
|
|
7214
|
+
blocks: z234.array(DocumentationPageContentItem)
|
|
7052
7215
|
});
|
|
7053
7216
|
|
|
7054
7217
|
// src/yjs/docs-editor/prosemirror/inner-editor-schema.ts
|
|
@@ -10912,7 +11075,7 @@ var blocks = [
|
|
|
10912
11075
|
|
|
10913
11076
|
// src/yjs/docs-editor/prosemirror-to-blocks.ts
|
|
10914
11077
|
import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
|
|
10915
|
-
import { z as
|
|
11078
|
+
import { z as z235 } from "zod";
|
|
10916
11079
|
function yDocToPage(yDoc, definitions) {
|
|
10917
11080
|
return yXmlFragmentToPage(yDoc.getXmlFragment("default"), definitions);
|
|
10918
11081
|
}
|
|
@@ -10992,7 +11155,7 @@ function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
|
|
|
10992
11155
|
return null;
|
|
10993
11156
|
return {
|
|
10994
11157
|
id,
|
|
10995
|
-
title: getProsemirrorAttribute(prosemirrorNode, "title",
|
|
11158
|
+
title: getProsemirrorAttribute(prosemirrorNode, "title", z235.string()) ?? "",
|
|
10996
11159
|
columns: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(nonNullFilter)
|
|
10997
11160
|
};
|
|
10998
11161
|
}
|
|
@@ -11027,7 +11190,7 @@ function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap, dept
|
|
|
11027
11190
|
});
|
|
11028
11191
|
}
|
|
11029
11192
|
function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap, depth) {
|
|
11030
|
-
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId",
|
|
11193
|
+
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z235.string());
|
|
11031
11194
|
if (!definitionId) {
|
|
11032
11195
|
console.warn(`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`);
|
|
11033
11196
|
return [];
|
|
@@ -11069,7 +11232,7 @@ function parseAsRichText(prosemirrorNode, definition, property) {
|
|
|
11069
11232
|
if (!id)
|
|
11070
11233
|
return null;
|
|
11071
11234
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
11072
|
-
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type",
|
|
11235
|
+
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z235.string().optional()));
|
|
11073
11236
|
return {
|
|
11074
11237
|
id,
|
|
11075
11238
|
type: "Block",
|
|
@@ -11197,10 +11360,10 @@ function parseRichTextAttribute(mark) {
|
|
|
11197
11360
|
return null;
|
|
11198
11361
|
}
|
|
11199
11362
|
function parseProsemirrorLink(mark) {
|
|
11200
|
-
const href = getProsemirrorAttribute(mark, "href",
|
|
11363
|
+
const href = getProsemirrorAttribute(mark, "href", z235.string().optional());
|
|
11201
11364
|
if (!href)
|
|
11202
11365
|
return null;
|
|
11203
|
-
const target = getProsemirrorAttribute(mark, "target",
|
|
11366
|
+
const target = getProsemirrorAttribute(mark, "target", z235.string().optional());
|
|
11204
11367
|
const openInNewTab = target === "_blank";
|
|
11205
11368
|
if (href.startsWith("@")) {
|
|
11206
11369
|
return {
|
|
@@ -11219,10 +11382,10 @@ function parseProsemirrorLink(mark) {
|
|
|
11219
11382
|
}
|
|
11220
11383
|
}
|
|
11221
11384
|
function parseProsemirrorCommentHighlight(mark) {
|
|
11222
|
-
const highlightId = getProsemirrorAttribute(mark, "highlightId",
|
|
11385
|
+
const highlightId = getProsemirrorAttribute(mark, "highlightId", z235.string().optional());
|
|
11223
11386
|
if (!highlightId)
|
|
11224
11387
|
return null;
|
|
11225
|
-
const isResolved = getProsemirrorAttribute(mark, "resolved",
|
|
11388
|
+
const isResolved = getProsemirrorAttribute(mark, "resolved", z235.boolean().optional()) ?? false;
|
|
11226
11389
|
return {
|
|
11227
11390
|
type: "Comment",
|
|
11228
11391
|
commentHighlightId: highlightId,
|
|
@@ -11234,7 +11397,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
11234
11397
|
if (!id)
|
|
11235
11398
|
return null;
|
|
11236
11399
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
11237
|
-
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder",
|
|
11400
|
+
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z235.boolean().optional()) !== false;
|
|
11238
11401
|
const tableChild = prosemirrorNode.content?.find((c) => c.type === "table");
|
|
11239
11402
|
if (!tableChild) {
|
|
11240
11403
|
return emptyTable(id, variantId, 0);
|
|
@@ -11281,9 +11444,9 @@ function parseAsTableCell(prosemirrorNode) {
|
|
|
11281
11444
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
11282
11445
|
if (!id)
|
|
11283
11446
|
return null;
|
|
11284
|
-
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign",
|
|
11447
|
+
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z235.string().optional());
|
|
11285
11448
|
let columnWidth;
|
|
11286
|
-
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth",
|
|
11449
|
+
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z235.array(z235.number()).optional());
|
|
11287
11450
|
if (columnWidthArray) {
|
|
11288
11451
|
columnWidth = roundDimension(columnWidthArray[0]);
|
|
11289
11452
|
}
|
|
@@ -11321,7 +11484,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
11321
11484
|
value: parseRichText(prosemirrorNode.content ?? [])
|
|
11322
11485
|
};
|
|
11323
11486
|
case "image":
|
|
11324
|
-
const items = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
11487
|
+
const items = getProsemirrorAttribute(prosemirrorNode, "items", z235.string());
|
|
11325
11488
|
if (!items)
|
|
11326
11489
|
return null;
|
|
11327
11490
|
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
@@ -11441,7 +11604,7 @@ function definitionExpectsPlaceholderItem(definition) {
|
|
|
11441
11604
|
);
|
|
11442
11605
|
}
|
|
11443
11606
|
function parseBlockItems(prosemirrorNode, definition) {
|
|
11444
|
-
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
11607
|
+
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z235.string());
|
|
11445
11608
|
if (!itemsString)
|
|
11446
11609
|
return null;
|
|
11447
11610
|
const itemsJson = JSON.parse(itemsString);
|
|
@@ -11453,18 +11616,18 @@ function parseBlockItems(prosemirrorNode, definition) {
|
|
|
11453
11616
|
}
|
|
11454
11617
|
function parseAppearance(prosemirrorNode) {
|
|
11455
11618
|
let appearance = {};
|
|
11456
|
-
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance",
|
|
11619
|
+
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance", z235.string().optional());
|
|
11457
11620
|
if (rawAppearanceString) {
|
|
11458
11621
|
const parsedAppearance = PageBlockAppearanceV2.safeParse(JSON.parse(rawAppearanceString));
|
|
11459
11622
|
if (parsedAppearance.success) {
|
|
11460
11623
|
appearance = parsedAppearance.data;
|
|
11461
11624
|
}
|
|
11462
11625
|
}
|
|
11463
|
-
const columns = getProsemirrorAttribute(prosemirrorNode, "columns",
|
|
11626
|
+
const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z235.number().optional());
|
|
11464
11627
|
if (columns) {
|
|
11465
11628
|
appearance.numberOfColumns = columns;
|
|
11466
11629
|
}
|
|
11467
|
-
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor",
|
|
11630
|
+
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z235.string().optional());
|
|
11468
11631
|
if (backgroundColor) {
|
|
11469
11632
|
const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
|
|
11470
11633
|
if (parsedColor.success) {
|
|
@@ -11559,13 +11722,13 @@ function valueSchemaForPropertyType(type) {
|
|
|
11559
11722
|
}
|
|
11560
11723
|
}
|
|
11561
11724
|
function getProsemirrorBlockId(prosemirrorNode) {
|
|
11562
|
-
const id = getProsemirrorAttribute(prosemirrorNode, "id",
|
|
11725
|
+
const id = getProsemirrorAttribute(prosemirrorNode, "id", z235.string());
|
|
11563
11726
|
if (!id)
|
|
11564
11727
|
console.warn(`Prosemirror attribute "id" on ${prosemirrorNode.type} is required`);
|
|
11565
11728
|
return id;
|
|
11566
11729
|
}
|
|
11567
11730
|
function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
11568
|
-
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(
|
|
11731
|
+
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z235.string()));
|
|
11569
11732
|
}
|
|
11570
11733
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
11571
11734
|
const parsedAttr = validationSchema.safeParse(prosemirrorNode.attrs?.[attributeName]);
|
|
@@ -11812,6 +11975,7 @@ export {
|
|
|
11812
11975
|
DTOUpdateUserNotificationSettingsPayload,
|
|
11813
11976
|
DTOUpdateVersionInput,
|
|
11814
11977
|
DTOUser,
|
|
11978
|
+
DTOUserGetResponse,
|
|
11815
11979
|
DTOUserNotificationSettingsResponse,
|
|
11816
11980
|
DTOUserProfile,
|
|
11817
11981
|
DTOUserProfileUpdatePayload,
|
|
@@ -11819,10 +11983,15 @@ export {
|
|
|
11819
11983
|
DTOUserWorkspaceMembership,
|
|
11820
11984
|
DTOUserWorkspaceMembershipsResponse,
|
|
11821
11985
|
DTOWorkspace,
|
|
11986
|
+
DTOWorkspaceCreateInput,
|
|
11987
|
+
DTOWorkspaceCreateResponse,
|
|
11822
11988
|
DTOWorkspaceIntegrationGetGitObjectsInput,
|
|
11823
11989
|
DTOWorkspaceIntegrationOauthInput,
|
|
11824
11990
|
DTOWorkspaceIntegrationPATInput,
|
|
11991
|
+
DTOWorkspaceInvitationInput,
|
|
11992
|
+
DTOWorkspaceInvitationsListInput,
|
|
11825
11993
|
DTOWorkspaceRole,
|
|
11994
|
+
DesignSystemsEndpoint,
|
|
11826
11995
|
DocumentationHierarchySettings,
|
|
11827
11996
|
DocumentationPageEditorModel,
|
|
11828
11997
|
DocumentationPageV1DTO,
|
|
@@ -11832,9 +12001,14 @@ export {
|
|
|
11832
12001
|
ObjectMeta2 as ObjectMeta,
|
|
11833
12002
|
PageBlockEditorModel,
|
|
11834
12003
|
PageSectionEditorModel,
|
|
12004
|
+
RequestExecutor,
|
|
12005
|
+
RequestExecutorError,
|
|
12006
|
+
SupernovaApiClient,
|
|
12007
|
+
UsersEndpoint,
|
|
11835
12008
|
VersionRoomBaseYDoc,
|
|
11836
12009
|
VersionSQSPayload,
|
|
11837
12010
|
WorkspaceConfigurationPayload,
|
|
12011
|
+
WorkspacesEndpoint,
|
|
11838
12012
|
applyPrivacyConfigurationToNestedItems,
|
|
11839
12013
|
blockToProsemirrorNode,
|
|
11840
12014
|
buildDocPagePublishPaths,
|