@supernova-studio/client 0.54.19 → 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 +5199 -845
- package/dist/index.d.ts +5199 -845
- package/dist/index.js +289 -96
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +712 -519
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/client.ts +26 -0
- package/src/api/dto/bff/app-bootstrap-data.ts +20 -0
- package/src/api/dto/bff/index.ts +1 -0
- package/src/api/dto/design-systems/members.ts +2 -2
- package/src/api/dto/index.ts +1 -0
- 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
|
@@ -4965,6 +4965,9 @@ var DTOPagination = z172.object({
|
|
|
4965
4965
|
offset: z172.string().optional()
|
|
4966
4966
|
});
|
|
4967
4967
|
|
|
4968
|
+
// src/api/dto/bff/app-bootstrap-data.ts
|
|
4969
|
+
import { z as z196 } from "zod";
|
|
4970
|
+
|
|
4968
4971
|
// src/api/dto/design-systems/brand.ts
|
|
4969
4972
|
import { z as z173 } from "zod";
|
|
4970
4973
|
var DTOBrand = z173.object({
|
|
@@ -5133,8 +5136,8 @@ var DTODesignSystemMembersUpdateResponse = z178.object({
|
|
|
5133
5136
|
ok: z178.literal(true)
|
|
5134
5137
|
});
|
|
5135
5138
|
var DTODesignSystemMembersUpdatePayload = z178.object({
|
|
5136
|
-
inviteUserIds: z178.string().array(),
|
|
5137
|
-
removeUserIds: z178.string().array()
|
|
5139
|
+
inviteUserIds: z178.string().array().optional(),
|
|
5140
|
+
removeUserIds: z178.string().array().optional()
|
|
5138
5141
|
});
|
|
5139
5142
|
|
|
5140
5143
|
// src/api/dto/design-systems/version.ts
|
|
@@ -5399,20 +5402,155 @@ var DTOElementViewsListResponse = z189.object({
|
|
|
5399
5402
|
elementDataViews: z189.array(DTOElementView)
|
|
5400
5403
|
});
|
|
5401
5404
|
|
|
5402
|
-
// src/api/dto/
|
|
5405
|
+
// src/api/dto/workspaces/git.ts
|
|
5403
5406
|
import { z as z190 } from "zod";
|
|
5407
|
+
var DTOGitOrganization = z190.object({
|
|
5408
|
+
id: z190.string(),
|
|
5409
|
+
name: z190.string(),
|
|
5410
|
+
url: z190.string(),
|
|
5411
|
+
slug: z190.string()
|
|
5412
|
+
});
|
|
5413
|
+
var DTOGitProject = z190.object({
|
|
5414
|
+
id: z190.string(),
|
|
5415
|
+
name: z190.string(),
|
|
5416
|
+
url: z190.string(),
|
|
5417
|
+
slug: z190.string()
|
|
5418
|
+
});
|
|
5419
|
+
var DTOGitRepository = z190.object({
|
|
5420
|
+
id: z190.string(),
|
|
5421
|
+
name: z190.string(),
|
|
5422
|
+
url: z190.string(),
|
|
5423
|
+
slug: z190.string(),
|
|
5424
|
+
defaultBranch: z190.string().optional()
|
|
5425
|
+
});
|
|
5426
|
+
var DTOGitBranch = z190.object({
|
|
5427
|
+
name: z190.string(),
|
|
5428
|
+
lastCommitId: z190.string()
|
|
5429
|
+
});
|
|
5430
|
+
|
|
5431
|
+
// src/api/dto/workspaces/integrations.ts
|
|
5432
|
+
import { z as z191 } from "zod";
|
|
5433
|
+
var DTOIntegrationCredentials = IntegrationCredentials.omit({
|
|
5434
|
+
accessToken: true,
|
|
5435
|
+
refreshToken: true
|
|
5436
|
+
});
|
|
5437
|
+
var DTOIntegration = z191.object({
|
|
5438
|
+
id: z191.string(),
|
|
5439
|
+
workspaceId: z191.string(),
|
|
5440
|
+
type: ExtendedIntegrationType,
|
|
5441
|
+
createdAt: z191.coerce.date(),
|
|
5442
|
+
integrationCredentials: z191.array(DTOIntegrationCredentials).optional(),
|
|
5443
|
+
integrationDesignSystems: z191.array(IntegrationDesignSystem).optional()
|
|
5444
|
+
});
|
|
5445
|
+
var DTOIntegrationOAuthGetResponse = z191.object({
|
|
5446
|
+
url: z191.string()
|
|
5447
|
+
});
|
|
5448
|
+
var DTOIntegrationPostResponse = z191.object({
|
|
5449
|
+
integration: DTOIntegration
|
|
5450
|
+
});
|
|
5451
|
+
var DTOIntegrationsGetListResponse = z191.object({
|
|
5452
|
+
integrations: DTOIntegration.array()
|
|
5453
|
+
});
|
|
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
|
+
|
|
5466
|
+
// src/api/dto/workspaces/membership.ts
|
|
5467
|
+
import { z as z195 } from "zod";
|
|
5468
|
+
|
|
5469
|
+
// src/api/dto/workspaces/workspace.ts
|
|
5470
|
+
import { z as z194 } from "zod";
|
|
5471
|
+
|
|
5472
|
+
// src/api/dto/workspaces/npm-registry.ts
|
|
5473
|
+
import { z as z193 } from "zod";
|
|
5474
|
+
var DTONpmRegistryConfigConstants = {
|
|
5475
|
+
passwordPlaceholder: "redacted"
|
|
5476
|
+
};
|
|
5477
|
+
var DTONpmRegistryConfig = z193.object({
|
|
5478
|
+
// Registry basic configuration
|
|
5479
|
+
registryType: NpmRegistryType,
|
|
5480
|
+
registryUrl: z193.string(),
|
|
5481
|
+
customRegistryUrl: z193.string().optional(),
|
|
5482
|
+
// URL of Supernova NPM packages proxy
|
|
5483
|
+
proxyUrl: z193.string(),
|
|
5484
|
+
// Auth configuration
|
|
5485
|
+
authType: NpmRegistryAuthType,
|
|
5486
|
+
accessToken: z193.literal(DTONpmRegistryConfigConstants.passwordPlaceholder).optional(),
|
|
5487
|
+
username: z193.string().optional(),
|
|
5488
|
+
password: z193.literal(DTONpmRegistryConfigConstants.passwordPlaceholder).optional(),
|
|
5489
|
+
// NPM package scopes for whih the proxy should be enabled
|
|
5490
|
+
enabledScopes: z193.array(z193.string()),
|
|
5491
|
+
// True if client should bypass Supernova proxy and connect directly to the registry
|
|
5492
|
+
// (e.g. when the NPM registry is behind a VPN or firewall which prevents Supernova from accessing it)
|
|
5493
|
+
bypassProxy: z193.boolean()
|
|
5494
|
+
});
|
|
5495
|
+
|
|
5496
|
+
// src/api/dto/workspaces/workspace.ts
|
|
5497
|
+
var DTOWorkspace = z194.object({
|
|
5498
|
+
id: z194.string(),
|
|
5499
|
+
profile: WorkspaceProfile,
|
|
5500
|
+
subscription: Subscription,
|
|
5501
|
+
npmRegistry: DTONpmRegistryConfig.optional()
|
|
5502
|
+
});
|
|
5503
|
+
var DTOWorkspaceCreateInput = z194.object({
|
|
5504
|
+
name: z194.string()
|
|
5505
|
+
});
|
|
5506
|
+
var DTOWorkspaceCreateResponse = z194.object({
|
|
5507
|
+
workspace: DTOWorkspace
|
|
5508
|
+
});
|
|
5509
|
+
|
|
5510
|
+
// src/api/dto/workspaces/membership.ts
|
|
5511
|
+
var DTOWorkspaceRole = z195.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Contributor"]);
|
|
5512
|
+
var DTOUserWorkspaceMembership = z195.object({
|
|
5513
|
+
// Workspace the user is a member of
|
|
5514
|
+
workspace: DTOWorkspace,
|
|
5515
|
+
// Assigned role the user has in the workspace
|
|
5516
|
+
role: DTOWorkspaceRole,
|
|
5517
|
+
// Role that determines actual permissions the user has in the workspace
|
|
5518
|
+
// E.g. this is different from the default role when editors are downgraded to viewers
|
|
5519
|
+
// when a workspace's subscription is downgraded to free tier
|
|
5520
|
+
effectiveRole: DTOWorkspaceRole
|
|
5521
|
+
});
|
|
5522
|
+
var DTOUserWorkspaceMembershipsResponse = z195.object({
|
|
5523
|
+
membership: z195.array(DTOUserWorkspaceMembership)
|
|
5524
|
+
});
|
|
5525
|
+
|
|
5526
|
+
// src/api/dto/bff/app-bootstrap-data.ts
|
|
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()
|
|
5532
|
+
});
|
|
5533
|
+
var DTOAppBootstrapDataResponse = z196.object({
|
|
5534
|
+
workspaceMembership: DTOUserWorkspaceMembership.optional(),
|
|
5535
|
+
designSystem: DTODesignSystem.optional(),
|
|
5536
|
+
version: DTODesignSystemVersion.optional(),
|
|
5537
|
+
brand: DTOBrand.optional()
|
|
5538
|
+
});
|
|
5539
|
+
|
|
5540
|
+
// src/api/dto/documentation/anchor.ts
|
|
5541
|
+
import { z as z197 } from "zod";
|
|
5404
5542
|
var DTODocumentationPageAnchor = DocumentationPageAnchor;
|
|
5405
|
-
var DTOGetDocumentationPageAnchorsResponse =
|
|
5406
|
-
anchors:
|
|
5543
|
+
var DTOGetDocumentationPageAnchorsResponse = z197.object({
|
|
5544
|
+
anchors: z197.array(DTODocumentationPageAnchor)
|
|
5407
5545
|
});
|
|
5408
5546
|
|
|
5409
5547
|
// src/api/dto/documentation/approvals.ts
|
|
5410
|
-
import { z as
|
|
5548
|
+
import { z as z198 } from "zod";
|
|
5411
5549
|
var DTODocumentationPageApprovalState = DocumentationPageApproval;
|
|
5412
|
-
var DTODocumentationGroupApprovalState =
|
|
5413
|
-
persistentId:
|
|
5414
|
-
groupId:
|
|
5415
|
-
designSystemVersionId:
|
|
5550
|
+
var DTODocumentationGroupApprovalState = z198.object({
|
|
5551
|
+
persistentId: z198.string(),
|
|
5552
|
+
groupId: z198.string(),
|
|
5553
|
+
designSystemVersionId: z198.string(),
|
|
5416
5554
|
approvalState: DocumentationPageApprovalState
|
|
5417
5555
|
});
|
|
5418
5556
|
|
|
@@ -5420,68 +5558,68 @@ var DTODocumentationGroupApprovalState = z191.object({
|
|
|
5420
5558
|
var DTOPageBlockItemV2 = PageBlockItemV2;
|
|
5421
5559
|
|
|
5422
5560
|
// src/api/dto/documentation/documentation-page-snapshot.ts
|
|
5423
|
-
import { z as
|
|
5561
|
+
import { z as z203 } from "zod";
|
|
5424
5562
|
|
|
5425
5563
|
// src/api/dto/elements/documentation/page-v2.ts
|
|
5426
|
-
import { z as
|
|
5564
|
+
import { z as z202 } from "zod";
|
|
5427
5565
|
|
|
5428
5566
|
// src/api/dto/elements/documentation/draft-state.ts
|
|
5429
|
-
import { z as
|
|
5567
|
+
import { z as z200 } from "zod";
|
|
5430
5568
|
|
|
5431
5569
|
// src/api/dto/elements/documentation/item-configuration-v2.ts
|
|
5432
|
-
import { z as
|
|
5570
|
+
import { z as z199 } from "zod";
|
|
5433
5571
|
var DTODocumentationItemHeaderV2 = DocumentationItemHeaderV2;
|
|
5434
|
-
var DTODocumentationItemConfigurationV2 =
|
|
5435
|
-
showSidebar:
|
|
5436
|
-
isPrivate:
|
|
5437
|
-
isHidden:
|
|
5572
|
+
var DTODocumentationItemConfigurationV2 = z199.object({
|
|
5573
|
+
showSidebar: z199.boolean(),
|
|
5574
|
+
isPrivate: z199.boolean(),
|
|
5575
|
+
isHidden: z199.boolean(),
|
|
5438
5576
|
header: DTODocumentationItemHeaderV2
|
|
5439
5577
|
});
|
|
5440
5578
|
|
|
5441
5579
|
// src/api/dto/elements/documentation/draft-state.ts
|
|
5442
|
-
var DTODocumentationDraftChangeType =
|
|
5443
|
-
var DTODocumentationDraftStateCreated =
|
|
5444
|
-
changeType:
|
|
5445
|
-
});
|
|
5446
|
-
var DTODocumentationDraftStateUpdated =
|
|
5447
|
-
changeType:
|
|
5448
|
-
changes:
|
|
5449
|
-
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(),
|
|
5450
5588
|
previousConfiguration: DTODocumentationItemConfigurationV2.optional(),
|
|
5451
|
-
previousContentHash:
|
|
5589
|
+
previousContentHash: z200.string().optional()
|
|
5452
5590
|
})
|
|
5453
5591
|
});
|
|
5454
|
-
var DTODocumentationDraftStateDeleted =
|
|
5455
|
-
changeType:
|
|
5456
|
-
deletedAt:
|
|
5457
|
-
deletedByUserId:
|
|
5592
|
+
var DTODocumentationDraftStateDeleted = z200.object({
|
|
5593
|
+
changeType: z200.literal(DTODocumentationDraftChangeType.enum.Deleted),
|
|
5594
|
+
deletedAt: z200.coerce.date(),
|
|
5595
|
+
deletedByUserId: z200.string()
|
|
5458
5596
|
});
|
|
5459
|
-
var DTODocumentationDraftState =
|
|
5597
|
+
var DTODocumentationDraftState = z200.discriminatedUnion("changeType", [
|
|
5460
5598
|
DTODocumentationDraftStateCreated,
|
|
5461
5599
|
DTODocumentationDraftStateUpdated,
|
|
5462
5600
|
DTODocumentationDraftStateDeleted
|
|
5463
5601
|
]);
|
|
5464
5602
|
|
|
5465
5603
|
// src/api/dto/elements/documentation/metadata.ts
|
|
5466
|
-
import { z as
|
|
5467
|
-
var DTODocumentationPublishMetadata =
|
|
5468
|
-
lastPublishedByUserId:
|
|
5469
|
-
lastPublishedAt:
|
|
5604
|
+
import { z as z201 } from "zod";
|
|
5605
|
+
var DTODocumentationPublishMetadata = z201.object({
|
|
5606
|
+
lastPublishedByUserId: z201.string(),
|
|
5607
|
+
lastPublishedAt: z201.coerce.date()
|
|
5470
5608
|
});
|
|
5471
5609
|
|
|
5472
5610
|
// src/api/dto/elements/documentation/page-v2.ts
|
|
5473
|
-
var DTODocumentationPageV2 =
|
|
5474
|
-
id:
|
|
5475
|
-
persistentId:
|
|
5476
|
-
designSystemVersionId:
|
|
5477
|
-
title:
|
|
5611
|
+
var DTODocumentationPageV2 = z202.object({
|
|
5612
|
+
id: z202.string(),
|
|
5613
|
+
persistentId: z202.string(),
|
|
5614
|
+
designSystemVersionId: z202.string(),
|
|
5615
|
+
title: z202.string(),
|
|
5478
5616
|
configuration: DTODocumentationItemConfigurationV2,
|
|
5479
|
-
shortPersistentId:
|
|
5480
|
-
slug:
|
|
5481
|
-
userSlug:
|
|
5482
|
-
createdAt:
|
|
5483
|
-
updatedAt:
|
|
5484
|
-
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(),
|
|
5485
5623
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
5486
5624
|
draftState: DTODocumentationDraftState.optional(),
|
|
5487
5625
|
/** Defined if a page was published at least once and contains metadata about last publish */
|
|
@@ -5489,197 +5627,197 @@ var DTODocumentationPageV2 = z195.object({
|
|
|
5489
5627
|
/** Defines the approval state of the documentation page */
|
|
5490
5628
|
approvalState: DTODocumentationPageApprovalState.optional(),
|
|
5491
5629
|
// Backward compatibility
|
|
5492
|
-
type:
|
|
5630
|
+
type: z202.literal("Page")
|
|
5493
5631
|
});
|
|
5494
|
-
var DTOCreateDocumentationPageInputV2 =
|
|
5632
|
+
var DTOCreateDocumentationPageInputV2 = z202.object({
|
|
5495
5633
|
// Identifier
|
|
5496
|
-
persistentId:
|
|
5634
|
+
persistentId: z202.string().uuid(),
|
|
5497
5635
|
// Page properties
|
|
5498
|
-
title:
|
|
5636
|
+
title: z202.string(),
|
|
5499
5637
|
configuration: DTODocumentationItemConfigurationV2.partial().optional(),
|
|
5500
5638
|
// Page placement properties
|
|
5501
|
-
parentPersistentId:
|
|
5502
|
-
afterPersistentId:
|
|
5639
|
+
parentPersistentId: z202.string().uuid(),
|
|
5640
|
+
afterPersistentId: z202.string().uuid().nullish()
|
|
5503
5641
|
});
|
|
5504
|
-
var DTOUpdateDocumentationPageInputV2 =
|
|
5642
|
+
var DTOUpdateDocumentationPageInputV2 = z202.object({
|
|
5505
5643
|
// Identifier of the group to update
|
|
5506
|
-
id:
|
|
5644
|
+
id: z202.string(),
|
|
5507
5645
|
// Page properties
|
|
5508
|
-
title:
|
|
5646
|
+
title: z202.string().optional(),
|
|
5509
5647
|
configuration: DTODocumentationItemConfigurationV2.partial().optional()
|
|
5510
5648
|
});
|
|
5511
|
-
var DTOMoveDocumentationPageInputV2 =
|
|
5649
|
+
var DTOMoveDocumentationPageInputV2 = z202.object({
|
|
5512
5650
|
// Identifier of the group to update
|
|
5513
|
-
id:
|
|
5651
|
+
id: z202.string(),
|
|
5514
5652
|
// Page placement properties
|
|
5515
|
-
parentPersistentId:
|
|
5516
|
-
afterPersistentId:
|
|
5653
|
+
parentPersistentId: z202.string().uuid(),
|
|
5654
|
+
afterPersistentId: z202.string().uuid().nullish()
|
|
5517
5655
|
});
|
|
5518
|
-
var DTODuplicateDocumentationPageInputV2 =
|
|
5656
|
+
var DTODuplicateDocumentationPageInputV2 = z202.object({
|
|
5519
5657
|
// Identifier of the page to duplicate from
|
|
5520
|
-
id:
|
|
5658
|
+
id: z202.string(),
|
|
5521
5659
|
// New page persistent id
|
|
5522
|
-
persistentId:
|
|
5660
|
+
persistentId: z202.string().uuid(),
|
|
5523
5661
|
// Page placement properties
|
|
5524
|
-
parentPersistentId:
|
|
5525
|
-
afterPersistentId:
|
|
5662
|
+
parentPersistentId: z202.string().uuid(),
|
|
5663
|
+
afterPersistentId: z202.string().uuid().nullish()
|
|
5526
5664
|
});
|
|
5527
|
-
var DTODeleteDocumentationPageInputV2 =
|
|
5665
|
+
var DTODeleteDocumentationPageInputV2 = z202.object({
|
|
5528
5666
|
// Identifier
|
|
5529
|
-
id:
|
|
5667
|
+
id: z202.string()
|
|
5530
5668
|
});
|
|
5531
|
-
var DTORestoreDocumentationPageInput =
|
|
5532
|
-
persistentId:
|
|
5533
|
-
snapshotId:
|
|
5669
|
+
var DTORestoreDocumentationPageInput = z202.object({
|
|
5670
|
+
persistentId: z202.string(),
|
|
5671
|
+
snapshotId: z202.string().optional()
|
|
5534
5672
|
});
|
|
5535
|
-
var DTORestoreDocumentationGroupInput =
|
|
5536
|
-
persistentId:
|
|
5537
|
-
snapshotId:
|
|
5673
|
+
var DTORestoreDocumentationGroupInput = z202.object({
|
|
5674
|
+
persistentId: z202.string(),
|
|
5675
|
+
snapshotId: z202.string().optional()
|
|
5538
5676
|
});
|
|
5539
|
-
var DTODocumentationPageApprovalStateChangeInput =
|
|
5540
|
-
persistentId:
|
|
5677
|
+
var DTODocumentationPageApprovalStateChangeInput = z202.object({
|
|
5678
|
+
persistentId: z202.string(),
|
|
5541
5679
|
approvalState: DocumentationPageApprovalState.optional()
|
|
5542
5680
|
});
|
|
5543
5681
|
|
|
5544
5682
|
// src/api/dto/documentation/documentation-page-snapshot.ts
|
|
5545
|
-
var DTODocumentationPageSnapshot =
|
|
5546
|
-
id:
|
|
5547
|
-
designSystemVersionId:
|
|
5548
|
-
createdAt:
|
|
5549
|
-
updatedAt:
|
|
5683
|
+
var DTODocumentationPageSnapshot = z203.object({
|
|
5684
|
+
id: z203.string(),
|
|
5685
|
+
designSystemVersionId: z203.string(),
|
|
5686
|
+
createdAt: z203.string(),
|
|
5687
|
+
updatedAt: z203.string(),
|
|
5550
5688
|
documentationPage: DTODocumentationPageV2,
|
|
5551
|
-
pageContentHash:
|
|
5689
|
+
pageContentHash: z203.string(),
|
|
5552
5690
|
reason: DesignElementSnapshotReason
|
|
5553
5691
|
});
|
|
5554
5692
|
|
|
5555
5693
|
// src/api/dto/documentation/link-preview.ts
|
|
5556
|
-
import { z as
|
|
5557
|
-
var DTODocumentationLinkPreviewResponse =
|
|
5694
|
+
import { z as z204 } from "zod";
|
|
5695
|
+
var DTODocumentationLinkPreviewResponse = z204.object({
|
|
5558
5696
|
linkPreview: DocumentationLinkPreview
|
|
5559
5697
|
});
|
|
5560
|
-
var DTODocumentationLinkPreviewRequest =
|
|
5561
|
-
url:
|
|
5562
|
-
documentationItemPersistentId:
|
|
5698
|
+
var DTODocumentationLinkPreviewRequest = z204.object({
|
|
5699
|
+
url: z204.string().optional(),
|
|
5700
|
+
documentationItemPersistentId: z204.string().optional()
|
|
5563
5701
|
});
|
|
5564
5702
|
|
|
5565
5703
|
// src/api/dto/documentation/publish.ts
|
|
5566
|
-
import { z as
|
|
5704
|
+
import { z as z208 } from "zod";
|
|
5567
5705
|
|
|
5568
5706
|
// src/api/dto/export/exporter.ts
|
|
5569
|
-
import { z as
|
|
5570
|
-
var DTOExporterType =
|
|
5571
|
-
var DTOExporterSource =
|
|
5572
|
-
var DTOExporterMembershipRole =
|
|
5573
|
-
var DTOExporter =
|
|
5574
|
-
id:
|
|
5575
|
-
name:
|
|
5576
|
-
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(),
|
|
5577
5715
|
exporterType: DTOExporterType,
|
|
5578
|
-
isDefaultDocumentationExporter:
|
|
5579
|
-
iconURL:
|
|
5716
|
+
isDefaultDocumentationExporter: z205.boolean(),
|
|
5717
|
+
iconURL: z205.string().optional(),
|
|
5580
5718
|
configurationProperties: PulsarContributionConfigurationProperty.array(),
|
|
5581
5719
|
customBlocks: PulsarCustomBlock.array(),
|
|
5582
|
-
blockVariants:
|
|
5583
|
-
usesBrands:
|
|
5584
|
-
usesThemes:
|
|
5720
|
+
blockVariants: z205.record(z205.string(), PulsarContributionVariant.array()),
|
|
5721
|
+
usesBrands: z205.boolean(),
|
|
5722
|
+
usesThemes: z205.boolean(),
|
|
5585
5723
|
source: DTOExporterSource,
|
|
5586
|
-
gitUrl:
|
|
5587
|
-
gitBranch:
|
|
5588
|
-
gitDirectory:
|
|
5724
|
+
gitUrl: z205.string().optional(),
|
|
5725
|
+
gitBranch: z205.string().optional(),
|
|
5726
|
+
gitDirectory: z205.string().optional()
|
|
5589
5727
|
});
|
|
5590
|
-
var DTOExporterMembership =
|
|
5591
|
-
workspaceId:
|
|
5592
|
-
exporterId:
|
|
5728
|
+
var DTOExporterMembership = z205.object({
|
|
5729
|
+
workspaceId: z205.string(),
|
|
5730
|
+
exporterId: z205.string(),
|
|
5593
5731
|
role: DTOExporterMembershipRole
|
|
5594
5732
|
});
|
|
5595
|
-
var DTOExporterCreateOutput =
|
|
5733
|
+
var DTOExporterCreateOutput = z205.object({
|
|
5596
5734
|
exporter: DTOExporter,
|
|
5597
5735
|
membership: DTOExporterMembership
|
|
5598
5736
|
});
|
|
5599
|
-
var DTOExporterGitProviderEnum =
|
|
5600
|
-
var DTOExporterCreateInput =
|
|
5601
|
-
url:
|
|
5737
|
+
var DTOExporterGitProviderEnum = z205.enum(["github", "gitlab", "bitbucket", "azure"]);
|
|
5738
|
+
var DTOExporterCreateInput = z205.object({
|
|
5739
|
+
url: z205.string(),
|
|
5602
5740
|
provider: DTOExporterGitProviderEnum
|
|
5603
5741
|
});
|
|
5604
|
-
var DTOExporterUpdateInput =
|
|
5605
|
-
url:
|
|
5742
|
+
var DTOExporterUpdateInput = z205.object({
|
|
5743
|
+
url: z205.string().optional()
|
|
5606
5744
|
});
|
|
5607
5745
|
|
|
5608
5746
|
// src/api/dto/export/filter.ts
|
|
5609
5747
|
var DTOExportJobsListFilter = ExportJobFindByFilter;
|
|
5610
5748
|
|
|
5611
5749
|
// src/api/dto/export/job.ts
|
|
5612
|
-
import { z as
|
|
5613
|
-
var DTOExportJobCreatedBy =
|
|
5614
|
-
userId:
|
|
5615
|
-
userName:
|
|
5750
|
+
import { z as z206 } from "zod";
|
|
5751
|
+
var DTOExportJobCreatedBy = z206.object({
|
|
5752
|
+
userId: z206.string(),
|
|
5753
|
+
userName: z206.string()
|
|
5616
5754
|
});
|
|
5617
|
-
var DTOExportJobDesignSystemPreview =
|
|
5618
|
-
id:
|
|
5755
|
+
var DTOExportJobDesignSystemPreview = z206.object({
|
|
5756
|
+
id: z206.string(),
|
|
5619
5757
|
meta: ObjectMeta
|
|
5620
5758
|
});
|
|
5621
|
-
var DTOExportJobDesignSystemVersionPreview =
|
|
5622
|
-
id:
|
|
5759
|
+
var DTOExportJobDesignSystemVersionPreview = z206.object({
|
|
5760
|
+
id: z206.string(),
|
|
5623
5761
|
meta: ObjectMeta,
|
|
5624
|
-
version:
|
|
5625
|
-
isReadonly:
|
|
5762
|
+
version: z206.string(),
|
|
5763
|
+
isReadonly: z206.boolean()
|
|
5626
5764
|
});
|
|
5627
|
-
var DTOExportJobDestinations =
|
|
5765
|
+
var DTOExportJobDestinations = z206.object({
|
|
5628
5766
|
s3: ExporterDestinationS3.optional(),
|
|
5629
5767
|
azure: ExporterDestinationAzure.optional(),
|
|
5630
5768
|
bitbucket: ExporterDestinationBitbucket.optional(),
|
|
5631
5769
|
github: ExporterDestinationGithub.optional(),
|
|
5632
5770
|
gitlab: ExporterDestinationGitlab.optional(),
|
|
5633
5771
|
documentation: ExporterDestinationDocs.optional(),
|
|
5634
|
-
webhookUrl:
|
|
5772
|
+
webhookUrl: z206.string().optional()
|
|
5635
5773
|
});
|
|
5636
5774
|
var DTOExportJobResult = ExportJobResult.omit({
|
|
5637
5775
|
sndocs: true
|
|
5638
5776
|
}).extend({
|
|
5639
5777
|
documentation: ExportJobDocsDestinationResult.optional()
|
|
5640
5778
|
});
|
|
5641
|
-
var DTOExportJob =
|
|
5642
|
-
id:
|
|
5643
|
-
createdAt:
|
|
5644
|
-
finishedAt:
|
|
5645
|
-
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(),
|
|
5646
5784
|
status: ExportJobStatus,
|
|
5647
|
-
estimatedExecutionTime:
|
|
5785
|
+
estimatedExecutionTime: z206.number().optional(),
|
|
5648
5786
|
createdBy: DTOExportJobCreatedBy.optional(),
|
|
5649
5787
|
designSystem: DTOExportJobDesignSystemPreview,
|
|
5650
5788
|
designSystemVersion: DTOExportJobDesignSystemVersionPreview,
|
|
5651
5789
|
destinations: DTOExportJobDestinations,
|
|
5652
|
-
exporterId:
|
|
5653
|
-
scheduleId:
|
|
5790
|
+
exporterId: z206.string(),
|
|
5791
|
+
scheduleId: z206.string().optional(),
|
|
5654
5792
|
result: DTOExportJobResult.optional(),
|
|
5655
|
-
brandPersistentId:
|
|
5656
|
-
themePersistentId:
|
|
5657
|
-
themePersistentIds:
|
|
5793
|
+
brandPersistentId: z206.string().optional(),
|
|
5794
|
+
themePersistentId: z206.string().optional(),
|
|
5795
|
+
themePersistentIds: z206.string().array().optional()
|
|
5658
5796
|
});
|
|
5659
|
-
var DTOExportJobResponse =
|
|
5797
|
+
var DTOExportJobResponse = z206.object({
|
|
5660
5798
|
job: DTOExportJob
|
|
5661
5799
|
});
|
|
5662
5800
|
|
|
5663
5801
|
// src/api/dto/export/pipeline.ts
|
|
5664
|
-
import { z as
|
|
5665
|
-
var DTOPipeline =
|
|
5666
|
-
id:
|
|
5667
|
-
name:
|
|
5802
|
+
import { z as z207 } from "zod";
|
|
5803
|
+
var DTOPipeline = z207.object({
|
|
5804
|
+
id: z207.string(),
|
|
5805
|
+
name: z207.string(),
|
|
5668
5806
|
eventType: PipelineEventType,
|
|
5669
|
-
isEnabled:
|
|
5670
|
-
workspaceId:
|
|
5671
|
-
designSystemId:
|
|
5672
|
-
exporterId:
|
|
5673
|
-
brandPersistentId:
|
|
5674
|
-
themePersistentId:
|
|
5675
|
-
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(),
|
|
5676
5814
|
...ExportDestinationsMap.shape,
|
|
5677
5815
|
latestJobs: DTOExportJob.array()
|
|
5678
5816
|
});
|
|
5679
5817
|
|
|
5680
5818
|
// src/api/dto/documentation/publish.ts
|
|
5681
5819
|
var DTOPublishDocumentationChanges = ExportJobDocumentationChanges;
|
|
5682
|
-
var DTOPublishDocumentationRequest =
|
|
5820
|
+
var DTOPublishDocumentationRequest = z208.object({
|
|
5683
5821
|
environment: PublishedDocEnvironment,
|
|
5684
5822
|
/**
|
|
5685
5823
|
* If defined, this allows narrowing down what is published to a set of specific pages and groups
|
|
@@ -5687,42 +5825,42 @@ var DTOPublishDocumentationRequest = z201.object({
|
|
|
5687
5825
|
*/
|
|
5688
5826
|
changes: DTOPublishDocumentationChanges.optional()
|
|
5689
5827
|
});
|
|
5690
|
-
var DTOPublishDocumentationResponse =
|
|
5828
|
+
var DTOPublishDocumentationResponse = z208.object({
|
|
5691
5829
|
job: DTOExportJob
|
|
5692
5830
|
});
|
|
5693
5831
|
|
|
5694
5832
|
// src/api/dto/elements/components/figma-component.ts
|
|
5695
|
-
import { z as
|
|
5833
|
+
import { z as z209 } from "zod";
|
|
5696
5834
|
var DTOFigmaComponentProperty = FigmaComponentProperty;
|
|
5697
|
-
var DTOFigmaComponentPropertyMap =
|
|
5698
|
-
var DTOFigmaComponent =
|
|
5699
|
-
id:
|
|
5700
|
-
persistentId:
|
|
5701
|
-
designSystemVersionId:
|
|
5702
|
-
brandId:
|
|
5703
|
-
thumbnailUrl:
|
|
5704
|
-
svgUrl:
|
|
5705
|
-
exportProperties:
|
|
5706
|
-
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()
|
|
5707
5845
|
}),
|
|
5708
|
-
createdAt:
|
|
5709
|
-
updatedAt:
|
|
5846
|
+
createdAt: z209.coerce.date(),
|
|
5847
|
+
updatedAt: z209.coerce.date(),
|
|
5710
5848
|
meta: ObjectMeta,
|
|
5711
5849
|
originComponent: FigmaComponentOrigin.optional(),
|
|
5712
|
-
parentComponentPersistentId:
|
|
5713
|
-
childrenPersistentIds:
|
|
5850
|
+
parentComponentPersistentId: z209.string().optional(),
|
|
5851
|
+
childrenPersistentIds: z209.string().array().optional(),
|
|
5714
5852
|
componentPropertyDefinitions: DTOFigmaComponentPropertyMap.optional(),
|
|
5715
|
-
variantPropertyValues:
|
|
5853
|
+
variantPropertyValues: z209.record(z209.string()).optional()
|
|
5716
5854
|
});
|
|
5717
|
-
var DTOFigmaComponentListResponse =
|
|
5855
|
+
var DTOFigmaComponentListResponse = z209.object({
|
|
5718
5856
|
components: DTOFigmaComponent.array()
|
|
5719
5857
|
});
|
|
5720
5858
|
|
|
5721
5859
|
// src/api/dto/elements/documentation/group-action.ts
|
|
5722
|
-
import { z as
|
|
5860
|
+
import { z as z211 } from "zod";
|
|
5723
5861
|
|
|
5724
5862
|
// src/api/dto/elements/documentation/group-v2.ts
|
|
5725
|
-
import { z as
|
|
5863
|
+
import { z as z210 } from "zod";
|
|
5726
5864
|
var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
5727
5865
|
sortOrder: true,
|
|
5728
5866
|
parentPersistentId: true,
|
|
@@ -5732,13 +5870,13 @@ var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
|
5732
5870
|
data: true,
|
|
5733
5871
|
shortPersistentId: true
|
|
5734
5872
|
}).extend({
|
|
5735
|
-
title:
|
|
5736
|
-
isRoot:
|
|
5737
|
-
childrenIds:
|
|
5873
|
+
title: z210.string(),
|
|
5874
|
+
isRoot: z210.boolean(),
|
|
5875
|
+
childrenIds: z210.array(z210.string()),
|
|
5738
5876
|
groupBehavior: DocumentationGroupBehavior,
|
|
5739
|
-
shortPersistentId:
|
|
5877
|
+
shortPersistentId: z210.string(),
|
|
5740
5878
|
configuration: DTODocumentationItemConfigurationV2,
|
|
5741
|
-
type:
|
|
5879
|
+
type: z210.literal("Group"),
|
|
5742
5880
|
/** Defined when a group has changed since last publish and can be included into a partial publish */
|
|
5743
5881
|
draftState: DTODocumentationDraftState.optional(),
|
|
5744
5882
|
/** Defined if a group was published at least once and contains metadata about last publish */
|
|
@@ -5746,127 +5884,127 @@ var DTODocumentationGroupV2 = ElementGroup.omit({
|
|
|
5746
5884
|
//** An approval state for frontend to utilize. */
|
|
5747
5885
|
approvalState: DTODocumentationGroupApprovalState.optional()
|
|
5748
5886
|
});
|
|
5749
|
-
var DTOCreateDocumentationGroupInput =
|
|
5887
|
+
var DTOCreateDocumentationGroupInput = z210.object({
|
|
5750
5888
|
// Identifier
|
|
5751
|
-
persistentId:
|
|
5889
|
+
persistentId: z210.string().uuid(),
|
|
5752
5890
|
// Group properties
|
|
5753
|
-
title:
|
|
5891
|
+
title: z210.string(),
|
|
5754
5892
|
configuration: DTODocumentationItemConfigurationV2.partial().optional(),
|
|
5755
5893
|
// Group placement properties
|
|
5756
|
-
afterPersistentId:
|
|
5757
|
-
parentPersistentId:
|
|
5894
|
+
afterPersistentId: z210.string().uuid().nullish(),
|
|
5895
|
+
parentPersistentId: z210.string().uuid()
|
|
5758
5896
|
});
|
|
5759
|
-
var DTOUpdateDocumentationGroupInput =
|
|
5897
|
+
var DTOUpdateDocumentationGroupInput = z210.object({
|
|
5760
5898
|
// Identifier of the group to update
|
|
5761
|
-
id:
|
|
5899
|
+
id: z210.string(),
|
|
5762
5900
|
// Group properties
|
|
5763
|
-
title:
|
|
5901
|
+
title: z210.string().optional(),
|
|
5764
5902
|
configuration: DTODocumentationItemConfigurationV2.partial().optional()
|
|
5765
5903
|
});
|
|
5766
|
-
var DTOMoveDocumentationGroupInput =
|
|
5904
|
+
var DTOMoveDocumentationGroupInput = z210.object({
|
|
5767
5905
|
// Identifier of the group to update
|
|
5768
|
-
id:
|
|
5906
|
+
id: z210.string(),
|
|
5769
5907
|
// Group placement properties
|
|
5770
|
-
parentPersistentId:
|
|
5771
|
-
afterPersistentId:
|
|
5908
|
+
parentPersistentId: z210.string().uuid(),
|
|
5909
|
+
afterPersistentId: z210.string().uuid().nullish()
|
|
5772
5910
|
});
|
|
5773
|
-
var DTODuplicateDocumentationGroupInput =
|
|
5911
|
+
var DTODuplicateDocumentationGroupInput = z210.object({
|
|
5774
5912
|
// Identifier of the group to duplicate from
|
|
5775
|
-
id:
|
|
5913
|
+
id: z210.string(),
|
|
5776
5914
|
// New group persistent id
|
|
5777
|
-
persistentId:
|
|
5915
|
+
persistentId: z210.string().uuid(),
|
|
5778
5916
|
// Group placement properties
|
|
5779
|
-
afterPersistentId:
|
|
5780
|
-
parentPersistentId:
|
|
5917
|
+
afterPersistentId: z210.string().uuid().nullish(),
|
|
5918
|
+
parentPersistentId: z210.string().uuid()
|
|
5781
5919
|
});
|
|
5782
|
-
var DTOCreateDocumentationTabInput =
|
|
5920
|
+
var DTOCreateDocumentationTabInput = z210.object({
|
|
5783
5921
|
// New group persistent id
|
|
5784
|
-
persistentId:
|
|
5922
|
+
persistentId: z210.string().uuid(),
|
|
5785
5923
|
// If this is page, we will attempt to convert it to tab
|
|
5786
5924
|
// If this is tab group, we will add a new tab to it
|
|
5787
|
-
fromItemPersistentId:
|
|
5788
|
-
tabName:
|
|
5925
|
+
fromItemPersistentId: z210.string(),
|
|
5926
|
+
tabName: z210.string()
|
|
5789
5927
|
});
|
|
5790
|
-
var DTODeleteDocumentationTabGroupInput =
|
|
5928
|
+
var DTODeleteDocumentationTabGroupInput = z210.object({
|
|
5791
5929
|
// Deleted group id
|
|
5792
|
-
id:
|
|
5930
|
+
id: z210.string()
|
|
5793
5931
|
});
|
|
5794
|
-
var DTODeleteDocumentationGroupInput =
|
|
5932
|
+
var DTODeleteDocumentationGroupInput = z210.object({
|
|
5795
5933
|
// Identifier
|
|
5796
|
-
id:
|
|
5934
|
+
id: z210.string(),
|
|
5797
5935
|
// Deletion options
|
|
5798
|
-
deleteSubtree:
|
|
5936
|
+
deleteSubtree: z210.boolean().default(false)
|
|
5799
5937
|
});
|
|
5800
5938
|
|
|
5801
5939
|
// src/api/dto/elements/documentation/group-action.ts
|
|
5802
|
-
var SuccessPayload =
|
|
5803
|
-
success:
|
|
5940
|
+
var SuccessPayload = z211.object({
|
|
5941
|
+
success: z211.literal(true)
|
|
5804
5942
|
});
|
|
5805
|
-
var DTODocumentationGroupCreateActionOutputV2 =
|
|
5806
|
-
type:
|
|
5943
|
+
var DTODocumentationGroupCreateActionOutputV2 = z211.object({
|
|
5944
|
+
type: z211.literal("DocumentationGroupCreate"),
|
|
5807
5945
|
output: SuccessPayload
|
|
5808
5946
|
});
|
|
5809
|
-
var DTODocumentationTabCreateActionOutputV2 =
|
|
5810
|
-
type:
|
|
5947
|
+
var DTODocumentationTabCreateActionOutputV2 = z211.object({
|
|
5948
|
+
type: z211.literal("DocumentationTabCreate"),
|
|
5811
5949
|
output: SuccessPayload
|
|
5812
5950
|
});
|
|
5813
|
-
var DTODocumentationGroupUpdateActionOutputV2 =
|
|
5814
|
-
type:
|
|
5951
|
+
var DTODocumentationGroupUpdateActionOutputV2 = z211.object({
|
|
5952
|
+
type: z211.literal("DocumentationGroupUpdate"),
|
|
5815
5953
|
output: SuccessPayload
|
|
5816
5954
|
});
|
|
5817
|
-
var DTODocumentationGroupMoveActionOutputV2 =
|
|
5818
|
-
type:
|
|
5955
|
+
var DTODocumentationGroupMoveActionOutputV2 = z211.object({
|
|
5956
|
+
type: z211.literal("DocumentationGroupMove"),
|
|
5819
5957
|
output: SuccessPayload
|
|
5820
5958
|
});
|
|
5821
|
-
var DTODocumentationGroupDuplicateActionOutputV2 =
|
|
5822
|
-
type:
|
|
5959
|
+
var DTODocumentationGroupDuplicateActionOutputV2 = z211.object({
|
|
5960
|
+
type: z211.literal("DocumentationGroupDuplicate"),
|
|
5823
5961
|
output: SuccessPayload
|
|
5824
5962
|
});
|
|
5825
|
-
var DTODocumentationGroupDeleteActionOutputV2 =
|
|
5826
|
-
type:
|
|
5963
|
+
var DTODocumentationGroupDeleteActionOutputV2 = z211.object({
|
|
5964
|
+
type: z211.literal("DocumentationGroupDelete"),
|
|
5827
5965
|
output: SuccessPayload
|
|
5828
5966
|
});
|
|
5829
|
-
var DTODocumentationTabGroupDeleteActionOutputV2 =
|
|
5830
|
-
type:
|
|
5967
|
+
var DTODocumentationTabGroupDeleteActionOutputV2 = z211.object({
|
|
5968
|
+
type: z211.literal("DocumentationTabGroupDelete"),
|
|
5831
5969
|
output: SuccessPayload
|
|
5832
5970
|
});
|
|
5833
|
-
var DTODocumentationGroupCreateActionInputV2 =
|
|
5834
|
-
type:
|
|
5971
|
+
var DTODocumentationGroupCreateActionInputV2 = z211.object({
|
|
5972
|
+
type: z211.literal("DocumentationGroupCreate"),
|
|
5835
5973
|
input: DTOCreateDocumentationGroupInput
|
|
5836
5974
|
});
|
|
5837
|
-
var DTODocumentationTabCreateActionInputV2 =
|
|
5838
|
-
type:
|
|
5975
|
+
var DTODocumentationTabCreateActionInputV2 = z211.object({
|
|
5976
|
+
type: z211.literal("DocumentationTabCreate"),
|
|
5839
5977
|
input: DTOCreateDocumentationTabInput
|
|
5840
5978
|
});
|
|
5841
|
-
var DTODocumentationGroupUpdateActionInputV2 =
|
|
5842
|
-
type:
|
|
5979
|
+
var DTODocumentationGroupUpdateActionInputV2 = z211.object({
|
|
5980
|
+
type: z211.literal("DocumentationGroupUpdate"),
|
|
5843
5981
|
input: DTOUpdateDocumentationGroupInput
|
|
5844
5982
|
});
|
|
5845
|
-
var DTODocumentationGroupMoveActionInputV2 =
|
|
5846
|
-
type:
|
|
5983
|
+
var DTODocumentationGroupMoveActionInputV2 = z211.object({
|
|
5984
|
+
type: z211.literal("DocumentationGroupMove"),
|
|
5847
5985
|
input: DTOMoveDocumentationGroupInput
|
|
5848
5986
|
});
|
|
5849
|
-
var DTODocumentationGroupDuplicateActionInputV2 =
|
|
5850
|
-
type:
|
|
5987
|
+
var DTODocumentationGroupDuplicateActionInputV2 = z211.object({
|
|
5988
|
+
type: z211.literal("DocumentationGroupDuplicate"),
|
|
5851
5989
|
input: DTODuplicateDocumentationGroupInput
|
|
5852
5990
|
});
|
|
5853
|
-
var DTODocumentationGroupDeleteActionInputV2 =
|
|
5854
|
-
type:
|
|
5991
|
+
var DTODocumentationGroupDeleteActionInputV2 = z211.object({
|
|
5992
|
+
type: z211.literal("DocumentationGroupDelete"),
|
|
5855
5993
|
input: DTODeleteDocumentationGroupInput
|
|
5856
5994
|
});
|
|
5857
|
-
var DTODocumentationTabGroupDeleteActionInputV2 =
|
|
5858
|
-
type:
|
|
5995
|
+
var DTODocumentationTabGroupDeleteActionInputV2 = z211.object({
|
|
5996
|
+
type: z211.literal("DocumentationTabGroupDelete"),
|
|
5859
5997
|
input: DTODeleteDocumentationTabGroupInput
|
|
5860
5998
|
});
|
|
5861
5999
|
|
|
5862
6000
|
// src/api/dto/elements/documentation/group-v1.ts
|
|
5863
|
-
import { z as
|
|
6001
|
+
import { z as z213 } from "zod";
|
|
5864
6002
|
|
|
5865
6003
|
// src/api/dto/elements/documentation/item-configuration-v1.ts
|
|
5866
|
-
import { z as
|
|
5867
|
-
var DocumentationColorV1 =
|
|
5868
|
-
aliasTo:
|
|
5869
|
-
value:
|
|
6004
|
+
import { z as z212 } from "zod";
|
|
6005
|
+
var DocumentationColorV1 = z212.object({
|
|
6006
|
+
aliasTo: z212.string().optional(),
|
|
6007
|
+
value: z212.string().optional()
|
|
5870
6008
|
});
|
|
5871
6009
|
var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
5872
6010
|
foregroundColor: true,
|
|
@@ -5875,10 +6013,10 @@ var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
|
5875
6013
|
foregroundColor: DocumentationColorV1.optional(),
|
|
5876
6014
|
backgroundColor: DocumentationColorV1.optional()
|
|
5877
6015
|
});
|
|
5878
|
-
var DTODocumentationItemConfigurationV1 =
|
|
5879
|
-
showSidebar:
|
|
5880
|
-
isPrivate:
|
|
5881
|
-
isHidden:
|
|
6016
|
+
var DTODocumentationItemConfigurationV1 = z212.object({
|
|
6017
|
+
showSidebar: z212.boolean(),
|
|
6018
|
+
isPrivate: z212.boolean(),
|
|
6019
|
+
isHidden: z212.boolean(),
|
|
5882
6020
|
header: DTODocumentationItemHeaderV1
|
|
5883
6021
|
});
|
|
5884
6022
|
|
|
@@ -5892,27 +6030,27 @@ var DTODocumentationGroupStructureV1 = ElementGroup.omit({
|
|
|
5892
6030
|
data: true,
|
|
5893
6031
|
shortPersistentId: true
|
|
5894
6032
|
}).extend({
|
|
5895
|
-
title:
|
|
5896
|
-
isRoot:
|
|
5897
|
-
childrenIds:
|
|
6033
|
+
title: z213.string(),
|
|
6034
|
+
isRoot: z213.boolean(),
|
|
6035
|
+
childrenIds: z213.array(z213.string()),
|
|
5898
6036
|
groupBehavior: DocumentationGroupBehavior,
|
|
5899
|
-
shortPersistentId:
|
|
5900
|
-
type:
|
|
6037
|
+
shortPersistentId: z213.string(),
|
|
6038
|
+
type: z213.literal("Group")
|
|
5901
6039
|
});
|
|
5902
6040
|
var DTODocumentationGroupV1 = DTODocumentationGroupStructureV1.extend({
|
|
5903
6041
|
configuration: DTODocumentationItemConfigurationV1
|
|
5904
6042
|
});
|
|
5905
6043
|
|
|
5906
6044
|
// src/api/dto/elements/documentation/hierarchy.ts
|
|
5907
|
-
import { z as
|
|
5908
|
-
var DTODocumentationHierarchyV2 =
|
|
5909
|
-
pages:
|
|
6045
|
+
import { z as z214 } from "zod";
|
|
6046
|
+
var DTODocumentationHierarchyV2 = z214.object({
|
|
6047
|
+
pages: z214.array(
|
|
5910
6048
|
DTODocumentationPageV2.extend({
|
|
5911
6049
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
5912
6050
|
draftState: DTODocumentationDraftState.optional()
|
|
5913
6051
|
})
|
|
5914
6052
|
),
|
|
5915
|
-
groups:
|
|
6053
|
+
groups: z214.array(
|
|
5916
6054
|
DTODocumentationGroupV2.extend({
|
|
5917
6055
|
/** Defined when a page has changed since last publish and can be included into a partial publish */
|
|
5918
6056
|
draftState: DTODocumentationDraftState.optional()
|
|
@@ -5921,84 +6059,84 @@ var DTODocumentationHierarchyV2 = z207.object({
|
|
|
5921
6059
|
});
|
|
5922
6060
|
|
|
5923
6061
|
// src/api/dto/elements/documentation/page-actions-v2.ts
|
|
5924
|
-
import { z as
|
|
5925
|
-
var SuccessPayload2 =
|
|
5926
|
-
success:
|
|
6062
|
+
import { z as z215 } from "zod";
|
|
6063
|
+
var SuccessPayload2 = z215.object({
|
|
6064
|
+
success: z215.literal(true)
|
|
5927
6065
|
});
|
|
5928
|
-
var DTODocumentationPageCreateActionOutputV2 =
|
|
5929
|
-
type:
|
|
6066
|
+
var DTODocumentationPageCreateActionOutputV2 = z215.object({
|
|
6067
|
+
type: z215.literal("DocumentationPageCreate"),
|
|
5930
6068
|
output: SuccessPayload2
|
|
5931
6069
|
});
|
|
5932
|
-
var DTODocumentationPageUpdateActionOutputV2 =
|
|
5933
|
-
type:
|
|
6070
|
+
var DTODocumentationPageUpdateActionOutputV2 = z215.object({
|
|
6071
|
+
type: z215.literal("DocumentationPageUpdate"),
|
|
5934
6072
|
output: SuccessPayload2
|
|
5935
6073
|
});
|
|
5936
|
-
var DTODocumentationPageMoveActionOutputV2 =
|
|
5937
|
-
type:
|
|
6074
|
+
var DTODocumentationPageMoveActionOutputV2 = z215.object({
|
|
6075
|
+
type: z215.literal("DocumentationPageMove"),
|
|
5938
6076
|
output: SuccessPayload2
|
|
5939
6077
|
});
|
|
5940
|
-
var DTODocumentationPageDuplicateActionOutputV2 =
|
|
5941
|
-
type:
|
|
6078
|
+
var DTODocumentationPageDuplicateActionOutputV2 = z215.object({
|
|
6079
|
+
type: z215.literal("DocumentationPageDuplicate"),
|
|
5942
6080
|
output: SuccessPayload2
|
|
5943
6081
|
});
|
|
5944
|
-
var DTODocumentationPageDeleteActionOutputV2 =
|
|
5945
|
-
type:
|
|
6082
|
+
var DTODocumentationPageDeleteActionOutputV2 = z215.object({
|
|
6083
|
+
type: z215.literal("DocumentationPageDelete"),
|
|
5946
6084
|
output: SuccessPayload2
|
|
5947
6085
|
});
|
|
5948
|
-
var DTODocumentationPageRestoreActionOutput =
|
|
5949
|
-
type:
|
|
6086
|
+
var DTODocumentationPageRestoreActionOutput = z215.object({
|
|
6087
|
+
type: z215.literal("DocumentationPageRestore"),
|
|
5950
6088
|
output: SuccessPayload2
|
|
5951
6089
|
});
|
|
5952
|
-
var DTODocumentationGroupRestoreActionOutput =
|
|
5953
|
-
type:
|
|
6090
|
+
var DTODocumentationGroupRestoreActionOutput = z215.object({
|
|
6091
|
+
type: z215.literal("DocumentationGroupRestore"),
|
|
5954
6092
|
output: SuccessPayload2
|
|
5955
6093
|
});
|
|
5956
|
-
var DTODocumentationPageApprovalStateChangeActionOutput =
|
|
5957
|
-
type:
|
|
6094
|
+
var DTODocumentationPageApprovalStateChangeActionOutput = z215.object({
|
|
6095
|
+
type: z215.literal("DocumentationPageApprovalStateChange"),
|
|
5958
6096
|
output: SuccessPayload2
|
|
5959
6097
|
});
|
|
5960
|
-
var DTODocumentationPageCreateActionInputV2 =
|
|
5961
|
-
type:
|
|
6098
|
+
var DTODocumentationPageCreateActionInputV2 = z215.object({
|
|
6099
|
+
type: z215.literal("DocumentationPageCreate"),
|
|
5962
6100
|
input: DTOCreateDocumentationPageInputV2
|
|
5963
6101
|
});
|
|
5964
|
-
var DTODocumentationPageUpdateActionInputV2 =
|
|
5965
|
-
type:
|
|
6102
|
+
var DTODocumentationPageUpdateActionInputV2 = z215.object({
|
|
6103
|
+
type: z215.literal("DocumentationPageUpdate"),
|
|
5966
6104
|
input: DTOUpdateDocumentationPageInputV2
|
|
5967
6105
|
});
|
|
5968
|
-
var DTODocumentationPageMoveActionInputV2 =
|
|
5969
|
-
type:
|
|
6106
|
+
var DTODocumentationPageMoveActionInputV2 = z215.object({
|
|
6107
|
+
type: z215.literal("DocumentationPageMove"),
|
|
5970
6108
|
input: DTOMoveDocumentationPageInputV2
|
|
5971
6109
|
});
|
|
5972
|
-
var DTODocumentationPageDuplicateActionInputV2 =
|
|
5973
|
-
type:
|
|
6110
|
+
var DTODocumentationPageDuplicateActionInputV2 = z215.object({
|
|
6111
|
+
type: z215.literal("DocumentationPageDuplicate"),
|
|
5974
6112
|
input: DTODuplicateDocumentationPageInputV2
|
|
5975
6113
|
});
|
|
5976
|
-
var DTODocumentationPageDeleteActionInputV2 =
|
|
5977
|
-
type:
|
|
6114
|
+
var DTODocumentationPageDeleteActionInputV2 = z215.object({
|
|
6115
|
+
type: z215.literal("DocumentationPageDelete"),
|
|
5978
6116
|
input: DTODeleteDocumentationPageInputV2
|
|
5979
6117
|
});
|
|
5980
|
-
var DTODocumentationPageRestoreActionInput =
|
|
5981
|
-
type:
|
|
6118
|
+
var DTODocumentationPageRestoreActionInput = z215.object({
|
|
6119
|
+
type: z215.literal("DocumentationPageRestore"),
|
|
5982
6120
|
input: DTORestoreDocumentationPageInput
|
|
5983
6121
|
});
|
|
5984
|
-
var DTODocumentationGroupRestoreActionInput =
|
|
5985
|
-
type:
|
|
6122
|
+
var DTODocumentationGroupRestoreActionInput = z215.object({
|
|
6123
|
+
type: z215.literal("DocumentationGroupRestore"),
|
|
5986
6124
|
input: DTORestoreDocumentationGroupInput
|
|
5987
6125
|
});
|
|
5988
|
-
var DTODocumentationPageApprovalStateChangeActionInput =
|
|
5989
|
-
type:
|
|
6126
|
+
var DTODocumentationPageApprovalStateChangeActionInput = z215.object({
|
|
6127
|
+
type: z215.literal("DocumentationPageApprovalStateChange"),
|
|
5990
6128
|
input: DTODocumentationPageApprovalStateChangeInput
|
|
5991
6129
|
});
|
|
5992
6130
|
|
|
5993
6131
|
// src/api/dto/elements/documentation/page-content.ts
|
|
5994
|
-
import { z as
|
|
6132
|
+
import { z as z216 } from "zod";
|
|
5995
6133
|
var DTODocumentationPageContent = DocumentationPageContent;
|
|
5996
|
-
var DTODocumentationPageContentGetResponse =
|
|
6134
|
+
var DTODocumentationPageContentGetResponse = z216.object({
|
|
5997
6135
|
pageContent: DTODocumentationPageContent
|
|
5998
6136
|
});
|
|
5999
6137
|
|
|
6000
6138
|
// src/api/dto/elements/documentation/page-v1.ts
|
|
6001
|
-
import { z as
|
|
6139
|
+
import { z as z217 } from "zod";
|
|
6002
6140
|
var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
6003
6141
|
data: true,
|
|
6004
6142
|
meta: true,
|
|
@@ -6006,32 +6144,32 @@ var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
|
6006
6144
|
sortOrder: true
|
|
6007
6145
|
}).extend({
|
|
6008
6146
|
configuration: DTODocumentationItemConfigurationV1,
|
|
6009
|
-
blocks:
|
|
6010
|
-
title:
|
|
6011
|
-
path:
|
|
6147
|
+
blocks: z217.array(PageBlockV1),
|
|
6148
|
+
title: z217.string(),
|
|
6149
|
+
path: z217.string()
|
|
6012
6150
|
});
|
|
6013
6151
|
|
|
6014
6152
|
// src/api/dto/elements/figma-nodes/figma-node.ts
|
|
6015
|
-
import { z as
|
|
6153
|
+
import { z as z218 } from "zod";
|
|
6016
6154
|
var DTOFigmaNodeRenderFormat = FigmaNodeRenderFormat;
|
|
6017
|
-
var DTOFigmaNodeOrigin =
|
|
6018
|
-
sourceId:
|
|
6019
|
-
fileId:
|
|
6020
|
-
parentName:
|
|
6155
|
+
var DTOFigmaNodeOrigin = z218.object({
|
|
6156
|
+
sourceId: z218.string(),
|
|
6157
|
+
fileId: z218.string().optional(),
|
|
6158
|
+
parentName: z218.string().optional()
|
|
6021
6159
|
});
|
|
6022
|
-
var DTOFigmaNodeData =
|
|
6160
|
+
var DTOFigmaNodeData = z218.object({
|
|
6023
6161
|
// Id of the node in the Figma file
|
|
6024
|
-
figmaNodeId:
|
|
6162
|
+
figmaNodeId: z218.string(),
|
|
6025
6163
|
// Validity
|
|
6026
|
-
isValid:
|
|
6164
|
+
isValid: z218.boolean(),
|
|
6027
6165
|
// Asset data
|
|
6028
|
-
assetId:
|
|
6029
|
-
assetUrl:
|
|
6166
|
+
assetId: z218.string(),
|
|
6167
|
+
assetUrl: z218.string(),
|
|
6030
6168
|
assetFormat: DTOFigmaNodeRenderFormat,
|
|
6031
6169
|
// Asset metadata
|
|
6032
|
-
assetScale:
|
|
6033
|
-
assetWidth:
|
|
6034
|
-
assetHeight:
|
|
6170
|
+
assetScale: z218.number(),
|
|
6171
|
+
assetWidth: z218.number().optional(),
|
|
6172
|
+
assetHeight: z218.number().optional()
|
|
6035
6173
|
});
|
|
6036
6174
|
var DTOFigmaNode = FigmaNodeReference.omit({
|
|
6037
6175
|
data: true,
|
|
@@ -6040,15 +6178,15 @@ var DTOFigmaNode = FigmaNodeReference.omit({
|
|
|
6040
6178
|
data: DTOFigmaNodeData,
|
|
6041
6179
|
origin: DTOFigmaNodeOrigin
|
|
6042
6180
|
});
|
|
6043
|
-
var DTOFigmaNodeRenderInput =
|
|
6181
|
+
var DTOFigmaNodeRenderInput = z218.object({
|
|
6044
6182
|
/**
|
|
6045
6183
|
* Id of a design system's data source representing a linked Figma file
|
|
6046
6184
|
*/
|
|
6047
|
-
sourceId:
|
|
6185
|
+
sourceId: z218.string(),
|
|
6048
6186
|
/**
|
|
6049
6187
|
* Id of a node within the Figma file
|
|
6050
6188
|
*/
|
|
6051
|
-
figmaFileNodeId:
|
|
6189
|
+
figmaFileNodeId: z218.string(),
|
|
6052
6190
|
/**
|
|
6053
6191
|
* Format in which the node must be rendered, png by default.
|
|
6054
6192
|
*/
|
|
@@ -6056,97 +6194,97 @@ var DTOFigmaNodeRenderInput = z211.object({
|
|
|
6056
6194
|
});
|
|
6057
6195
|
|
|
6058
6196
|
// src/api/dto/elements/figma-nodes/node-actions-v2.ts
|
|
6059
|
-
import { z as
|
|
6060
|
-
var DTOFigmaNodeRenderActionOutput =
|
|
6061
|
-
type:
|
|
6062
|
-
figmaNodes:
|
|
6197
|
+
import { z as z219 } from "zod";
|
|
6198
|
+
var DTOFigmaNodeRenderActionOutput = z219.object({
|
|
6199
|
+
type: z219.literal("FigmaNodeRender"),
|
|
6200
|
+
figmaNodes: z219.array(DTOFigmaNode)
|
|
6063
6201
|
});
|
|
6064
|
-
var DTOFigmaNodeRenderActionInput =
|
|
6065
|
-
type:
|
|
6202
|
+
var DTOFigmaNodeRenderActionInput = z219.object({
|
|
6203
|
+
type: z219.literal("FigmaNodeRender"),
|
|
6066
6204
|
input: DTOFigmaNodeRenderInput.array()
|
|
6067
6205
|
});
|
|
6068
6206
|
|
|
6069
6207
|
// src/api/dto/elements/properties/property-definitions-actions-v2.ts
|
|
6070
|
-
import { z as
|
|
6208
|
+
import { z as z221 } from "zod";
|
|
6071
6209
|
|
|
6072
6210
|
// src/api/dto/elements/properties/property-definitions.ts
|
|
6073
|
-
import { z as
|
|
6211
|
+
import { z as z220 } from "zod";
|
|
6074
6212
|
var CODE_NAME_REGEX2 = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
6075
|
-
var DTOElementPropertyDefinition =
|
|
6076
|
-
id:
|
|
6077
|
-
designSystemVersionId:
|
|
6213
|
+
var DTOElementPropertyDefinition = z220.object({
|
|
6214
|
+
id: z220.string(),
|
|
6215
|
+
designSystemVersionId: z220.string(),
|
|
6078
6216
|
meta: ObjectMeta,
|
|
6079
|
-
persistentId:
|
|
6217
|
+
persistentId: z220.string(),
|
|
6080
6218
|
type: ElementPropertyTypeSchema,
|
|
6081
6219
|
targetElementType: ElementPropertyTargetType,
|
|
6082
|
-
codeName:
|
|
6083
|
-
options:
|
|
6220
|
+
codeName: z220.string().regex(CODE_NAME_REGEX2),
|
|
6221
|
+
options: z220.array(ElementPropertyDefinitionOption).optional(),
|
|
6084
6222
|
linkElementType: ElementPropertyLinkType.optional()
|
|
6085
6223
|
});
|
|
6086
|
-
var DTOElementPropertyDefinitionsGetResponse =
|
|
6087
|
-
definitions:
|
|
6224
|
+
var DTOElementPropertyDefinitionsGetResponse = z220.object({
|
|
6225
|
+
definitions: z220.array(DTOElementPropertyDefinition)
|
|
6088
6226
|
});
|
|
6089
6227
|
var DTOCreateElementPropertyDefinitionInputV2 = DTOElementPropertyDefinition.omit({
|
|
6090
6228
|
id: true,
|
|
6091
6229
|
designSystemVersionId: true
|
|
6092
6230
|
});
|
|
6093
|
-
var DTOUpdateElementPropertyDefinitionInputV2 =
|
|
6094
|
-
id:
|
|
6095
|
-
name:
|
|
6096
|
-
description:
|
|
6097
|
-
codeName:
|
|
6098
|
-
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()
|
|
6099
6237
|
});
|
|
6100
|
-
var DTODeleteElementPropertyDefinitionInputV2 =
|
|
6101
|
-
id:
|
|
6238
|
+
var DTODeleteElementPropertyDefinitionInputV2 = z220.object({
|
|
6239
|
+
id: z220.string()
|
|
6102
6240
|
});
|
|
6103
6241
|
|
|
6104
6242
|
// src/api/dto/elements/properties/property-definitions-actions-v2.ts
|
|
6105
|
-
var SuccessPayload3 =
|
|
6106
|
-
success:
|
|
6243
|
+
var SuccessPayload3 = z221.object({
|
|
6244
|
+
success: z221.literal(true)
|
|
6107
6245
|
});
|
|
6108
|
-
var DTOPropertyDefinitionCreateActionOutputV2 =
|
|
6109
|
-
type:
|
|
6246
|
+
var DTOPropertyDefinitionCreateActionOutputV2 = z221.object({
|
|
6247
|
+
type: z221.literal("PropertyDefinitionCreate"),
|
|
6110
6248
|
definition: DTOElementPropertyDefinition
|
|
6111
6249
|
});
|
|
6112
|
-
var DTOPropertyDefinitionUpdateActionOutputV2 =
|
|
6113
|
-
type:
|
|
6250
|
+
var DTOPropertyDefinitionUpdateActionOutputV2 = z221.object({
|
|
6251
|
+
type: z221.literal("PropertyDefinitionUpdate"),
|
|
6114
6252
|
definition: DTOElementPropertyDefinition
|
|
6115
6253
|
});
|
|
6116
|
-
var DTOPropertyDefinitionDeleteActionOutputV2 =
|
|
6117
|
-
type:
|
|
6254
|
+
var DTOPropertyDefinitionDeleteActionOutputV2 = z221.object({
|
|
6255
|
+
type: z221.literal("PropertyDefinitionDelete"),
|
|
6118
6256
|
output: SuccessPayload3
|
|
6119
6257
|
});
|
|
6120
|
-
var DTOPropertyDefinitionCreateActionInputV2 =
|
|
6121
|
-
type:
|
|
6258
|
+
var DTOPropertyDefinitionCreateActionInputV2 = z221.object({
|
|
6259
|
+
type: z221.literal("PropertyDefinitionCreate"),
|
|
6122
6260
|
input: DTOCreateElementPropertyDefinitionInputV2
|
|
6123
6261
|
});
|
|
6124
|
-
var DTOPropertyDefinitionUpdateActionInputV2 =
|
|
6125
|
-
type:
|
|
6262
|
+
var DTOPropertyDefinitionUpdateActionInputV2 = z221.object({
|
|
6263
|
+
type: z221.literal("PropertyDefinitionUpdate"),
|
|
6126
6264
|
input: DTOUpdateElementPropertyDefinitionInputV2
|
|
6127
6265
|
});
|
|
6128
|
-
var DTOPropertyDefinitionDeleteActionInputV2 =
|
|
6129
|
-
type:
|
|
6266
|
+
var DTOPropertyDefinitionDeleteActionInputV2 = z221.object({
|
|
6267
|
+
type: z221.literal("PropertyDefinitionDelete"),
|
|
6130
6268
|
input: DTODeleteElementPropertyDefinitionInputV2
|
|
6131
6269
|
});
|
|
6132
6270
|
|
|
6133
6271
|
// src/api/dto/elements/properties/property-values.ts
|
|
6134
|
-
import { z as
|
|
6135
|
-
var DTOElementPropertyValue =
|
|
6136
|
-
id:
|
|
6137
|
-
designSystemVersionId:
|
|
6138
|
-
definitionId:
|
|
6139
|
-
targetElementId:
|
|
6140
|
-
value:
|
|
6141
|
-
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()
|
|
6142
6280
|
});
|
|
6143
|
-
var DTOElementPropertyValuesGetResponse =
|
|
6144
|
-
values:
|
|
6281
|
+
var DTOElementPropertyValuesGetResponse = z222.object({
|
|
6282
|
+
values: z222.array(DTOElementPropertyValue)
|
|
6145
6283
|
});
|
|
6146
6284
|
|
|
6147
6285
|
// src/api/dto/elements/elements-action-v2.ts
|
|
6148
|
-
import { z as
|
|
6149
|
-
var DTOElementActionOutput =
|
|
6286
|
+
import { z as z223 } from "zod";
|
|
6287
|
+
var DTOElementActionOutput = z223.discriminatedUnion("type", [
|
|
6150
6288
|
// Documentation pages
|
|
6151
6289
|
DTODocumentationPageCreateActionOutputV2,
|
|
6152
6290
|
DTODocumentationPageUpdateActionOutputV2,
|
|
@@ -6173,7 +6311,7 @@ var DTOElementActionOutput = z216.discriminatedUnion("type", [
|
|
|
6173
6311
|
// Approvals
|
|
6174
6312
|
DTODocumentationPageApprovalStateChangeActionOutput
|
|
6175
6313
|
]);
|
|
6176
|
-
var DTOElementActionInput =
|
|
6314
|
+
var DTOElementActionInput = z223.discriminatedUnion("type", [
|
|
6177
6315
|
// Documentation pages
|
|
6178
6316
|
DTODocumentationPageCreateActionInputV2,
|
|
6179
6317
|
DTODocumentationPageUpdateActionInputV2,
|
|
@@ -6202,166 +6340,208 @@ var DTOElementActionInput = z216.discriminatedUnion("type", [
|
|
|
6202
6340
|
]);
|
|
6203
6341
|
|
|
6204
6342
|
// src/api/dto/elements/get-elements-v2.ts
|
|
6205
|
-
import { z as
|
|
6206
|
-
var DTOElementsGetTypeFilter =
|
|
6207
|
-
var DTOElementsGetQuerySchema =
|
|
6208
|
-
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)))
|
|
6209
6347
|
});
|
|
6210
|
-
var DTOElementsGetOutput =
|
|
6211
|
-
figmaNodes:
|
|
6348
|
+
var DTOElementsGetOutput = z224.object({
|
|
6349
|
+
figmaNodes: z224.array(DTOFigmaNode).optional()
|
|
6212
6350
|
});
|
|
6213
6351
|
|
|
6214
6352
|
// src/api/dto/figma-components/assets/download.ts
|
|
6215
|
-
import { z as
|
|
6216
|
-
var DTOAssetRenderConfiguration =
|
|
6217
|
-
prefix:
|
|
6218
|
-
suffix:
|
|
6219
|
-
scale:
|
|
6220
|
-
format:
|
|
6221
|
-
});
|
|
6222
|
-
var DTORenderedAssetFile =
|
|
6223
|
-
assetId:
|
|
6224
|
-
fileName:
|
|
6225
|
-
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(),
|
|
6226
6364
|
settings: DTOAssetRenderConfiguration,
|
|
6227
|
-
originalName:
|
|
6365
|
+
originalName: z225.string()
|
|
6228
6366
|
});
|
|
6229
|
-
var DTODownloadAssetsRequest =
|
|
6230
|
-
persistentIds:
|
|
6367
|
+
var DTODownloadAssetsRequest = z225.object({
|
|
6368
|
+
persistentIds: z225.array(z225.string().uuid()).optional(),
|
|
6231
6369
|
settings: DTOAssetRenderConfiguration.array()
|
|
6232
6370
|
});
|
|
6233
|
-
var DTODownloadAssetsResponse =
|
|
6371
|
+
var DTODownloadAssetsResponse = z225.object({
|
|
6234
6372
|
items: DTORenderedAssetFile.array()
|
|
6235
6373
|
});
|
|
6236
6374
|
|
|
6237
6375
|
// src/api/dto/liveblocks/auth-response.ts
|
|
6238
|
-
import { z as
|
|
6239
|
-
var DTOLiveblocksAuthResponse =
|
|
6240
|
-
token:
|
|
6376
|
+
import { z as z226 } from "zod";
|
|
6377
|
+
var DTOLiveblocksAuthResponse = z226.object({
|
|
6378
|
+
token: z226.string()
|
|
6241
6379
|
});
|
|
6242
6380
|
|
|
6243
6381
|
// src/api/dto/users/update.ts
|
|
6244
|
-
import { z as
|
|
6245
|
-
var DTOUserProfileUpdateResponse =
|
|
6382
|
+
import { z as z227 } from "zod";
|
|
6383
|
+
var DTOUserProfileUpdateResponse = z227.object({
|
|
6246
6384
|
user: User
|
|
6247
6385
|
});
|
|
6248
6386
|
|
|
6249
6387
|
// src/api/dto/users/user.ts
|
|
6250
|
-
import { z as
|
|
6251
|
-
var DTOUserProfile =
|
|
6252
|
-
name:
|
|
6253
|
-
nickname:
|
|
6254
|
-
avatar:
|
|
6255
|
-
});
|
|
6256
|
-
var DTOUser =
|
|
6257
|
-
id:
|
|
6258
|
-
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(),
|
|
6259
6397
|
profile: DTOUserProfile
|
|
6260
6398
|
});
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
import { z as z222 } from "zod";
|
|
6264
|
-
var DTOGitOrganization = z222.object({
|
|
6265
|
-
id: z222.string(),
|
|
6266
|
-
name: z222.string(),
|
|
6267
|
-
url: z222.string(),
|
|
6268
|
-
slug: z222.string()
|
|
6269
|
-
});
|
|
6270
|
-
var DTOGitProject = z222.object({
|
|
6271
|
-
id: z222.string(),
|
|
6272
|
-
name: z222.string(),
|
|
6273
|
-
url: z222.string(),
|
|
6274
|
-
slug: z222.string()
|
|
6275
|
-
});
|
|
6276
|
-
var DTOGitRepository = z222.object({
|
|
6277
|
-
id: z222.string(),
|
|
6278
|
-
name: z222.string(),
|
|
6279
|
-
url: z222.string(),
|
|
6280
|
-
slug: z222.string(),
|
|
6281
|
-
defaultBranch: z222.string().optional()
|
|
6282
|
-
});
|
|
6283
|
-
var DTOGitBranch = z222.object({
|
|
6284
|
-
name: z222.string(),
|
|
6285
|
-
lastCommitId: z222.string()
|
|
6399
|
+
var DTOUserGetResponse = z228.object({
|
|
6400
|
+
user: DTOUser
|
|
6286
6401
|
});
|
|
6287
6402
|
|
|
6288
|
-
// src/api/
|
|
6289
|
-
import { z as
|
|
6290
|
-
var
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
}
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
});
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
});
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
}
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
});
|
|
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
|
+
};
|
|
6311
6428
|
|
|
6312
|
-
// src/api/
|
|
6313
|
-
|
|
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
|
+
};
|
|
6314
6438
|
|
|
6315
|
-
// src/api/
|
|
6316
|
-
import { z as
|
|
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
|
+
};
|
|
6317
6462
|
|
|
6318
|
-
// src/api/
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
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
|
+
}
|
|
6322
6477
|
};
|
|
6323
|
-
var DTONpmRegistryConfig = z224.object({
|
|
6324
|
-
// Registry basic configuration
|
|
6325
|
-
registryType: NpmRegistryType,
|
|
6326
|
-
registryUrl: z224.string(),
|
|
6327
|
-
customRegistryUrl: z224.string().optional(),
|
|
6328
|
-
// URL of Supernova NPM packages proxy
|
|
6329
|
-
proxyUrl: z224.string(),
|
|
6330
|
-
// Auth configuration
|
|
6331
|
-
authType: NpmRegistryAuthType,
|
|
6332
|
-
accessToken: z224.literal(DTONpmRegistryConfigConstants.passwordPlaceholder).optional(),
|
|
6333
|
-
username: z224.string().optional(),
|
|
6334
|
-
password: z224.literal(DTONpmRegistryConfigConstants.passwordPlaceholder).optional(),
|
|
6335
|
-
// NPM package scopes for whih the proxy should be enabled
|
|
6336
|
-
enabledScopes: z224.array(z224.string()),
|
|
6337
|
-
// True if client should bypass Supernova proxy and connect directly to the registry
|
|
6338
|
-
// (e.g. when the NPM registry is behind a VPN or firewall which prevents Supernova from accessing it)
|
|
6339
|
-
bypassProxy: z224.boolean()
|
|
6340
|
-
});
|
|
6341
6478
|
|
|
6342
|
-
// src/api/
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
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
|
+
};
|
|
6349
6529
|
|
|
6350
|
-
// src/api/
|
|
6351
|
-
var
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
}
|
|
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
|
+
};
|
|
6365
6545
|
|
|
6366
6546
|
// src/utils/hash.ts
|
|
6367
6547
|
function hash(input) {
|
|
@@ -6422,7 +6602,7 @@ function generateHash(input, debug = false) {
|
|
|
6422
6602
|
}
|
|
6423
6603
|
|
|
6424
6604
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
6425
|
-
import { z as
|
|
6605
|
+
import { z as z232 } from "zod";
|
|
6426
6606
|
|
|
6427
6607
|
// src/yjs/version-room/base.ts
|
|
6428
6608
|
var VersionRoomBaseYDoc = class {
|
|
@@ -6951,24 +7131,24 @@ var FrontendVersionRoomYDoc = class {
|
|
|
6951
7131
|
};
|
|
6952
7132
|
|
|
6953
7133
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
6954
|
-
var DocumentationHierarchySettings =
|
|
6955
|
-
routingVersion:
|
|
6956
|
-
isDraftFeatureAdopted:
|
|
6957
|
-
isApprovalFeatureEnabled:
|
|
6958
|
-
approvalRequiredForPublishing:
|
|
7134
|
+
var DocumentationHierarchySettings = z232.object({
|
|
7135
|
+
routingVersion: z232.string(),
|
|
7136
|
+
isDraftFeatureAdopted: z232.boolean(),
|
|
7137
|
+
isApprovalFeatureEnabled: z232.boolean(),
|
|
7138
|
+
approvalRequiredForPublishing: z232.boolean()
|
|
6959
7139
|
});
|
|
6960
7140
|
function yjsToDocumentationHierarchy(doc) {
|
|
6961
7141
|
return new FrontendVersionRoomYDoc(doc).getDocumentationHierarchy();
|
|
6962
7142
|
}
|
|
6963
7143
|
|
|
6964
7144
|
// src/yjs/design-system-content/item-configuration.ts
|
|
6965
|
-
import { z as
|
|
6966
|
-
var DTODocumentationPageRoomHeaderData =
|
|
6967
|
-
title:
|
|
7145
|
+
import { z as z233 } from "zod";
|
|
7146
|
+
var DTODocumentationPageRoomHeaderData = z233.object({
|
|
7147
|
+
title: z233.string(),
|
|
6968
7148
|
configuration: DTODocumentationItemConfigurationV2
|
|
6969
7149
|
});
|
|
6970
|
-
var DTODocumentationPageRoomHeaderDataUpdate =
|
|
6971
|
-
title:
|
|
7150
|
+
var DTODocumentationPageRoomHeaderDataUpdate = z233.object({
|
|
7151
|
+
title: z233.string().optional(),
|
|
6972
7152
|
configuration: DTODocumentationItemConfigurationV2.omit({ header: true }).extend({ header: DocumentationItemHeaderV2.partial() }).optional()
|
|
6973
7153
|
});
|
|
6974
7154
|
function itemConfigurationToYjs(yDoc, item) {
|
|
@@ -7019,7 +7199,7 @@ function yjsToItemConfiguration(yDoc) {
|
|
|
7019
7199
|
header: rawHeader
|
|
7020
7200
|
};
|
|
7021
7201
|
return {
|
|
7022
|
-
title:
|
|
7202
|
+
title: z233.string().parse(title),
|
|
7023
7203
|
configuration: DTODocumentationItemConfigurationV2.parse(rawConfig)
|
|
7024
7204
|
};
|
|
7025
7205
|
}
|
|
@@ -7029,9 +7209,9 @@ var PageBlockEditorModel = PageBlockEditorModelV2;
|
|
|
7029
7209
|
var PageSectionEditorModel = PageSectionEditorModelV2;
|
|
7030
7210
|
|
|
7031
7211
|
// src/yjs/docs-editor/model/page.ts
|
|
7032
|
-
import { z as
|
|
7033
|
-
var DocumentationPageEditorModel =
|
|
7034
|
-
blocks:
|
|
7212
|
+
import { z as z234 } from "zod";
|
|
7213
|
+
var DocumentationPageEditorModel = z234.object({
|
|
7214
|
+
blocks: z234.array(DocumentationPageContentItem)
|
|
7035
7215
|
});
|
|
7036
7216
|
|
|
7037
7217
|
// src/yjs/docs-editor/prosemirror/inner-editor-schema.ts
|
|
@@ -10895,7 +11075,7 @@ var blocks = [
|
|
|
10895
11075
|
|
|
10896
11076
|
// src/yjs/docs-editor/prosemirror-to-blocks.ts
|
|
10897
11077
|
import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
|
|
10898
|
-
import { z as
|
|
11078
|
+
import { z as z235 } from "zod";
|
|
10899
11079
|
function yDocToPage(yDoc, definitions) {
|
|
10900
11080
|
return yXmlFragmentToPage(yDoc.getXmlFragment("default"), definitions);
|
|
10901
11081
|
}
|
|
@@ -10975,7 +11155,7 @@ function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
|
|
|
10975
11155
|
return null;
|
|
10976
11156
|
return {
|
|
10977
11157
|
id,
|
|
10978
|
-
title: getProsemirrorAttribute(prosemirrorNode, "title",
|
|
11158
|
+
title: getProsemirrorAttribute(prosemirrorNode, "title", z235.string()) ?? "",
|
|
10979
11159
|
columns: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(nonNullFilter)
|
|
10980
11160
|
};
|
|
10981
11161
|
}
|
|
@@ -11010,7 +11190,7 @@ function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap, dept
|
|
|
11010
11190
|
});
|
|
11011
11191
|
}
|
|
11012
11192
|
function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap, depth) {
|
|
11013
|
-
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId",
|
|
11193
|
+
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z235.string());
|
|
11014
11194
|
if (!definitionId) {
|
|
11015
11195
|
console.warn(`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`);
|
|
11016
11196
|
return [];
|
|
@@ -11052,7 +11232,7 @@ function parseAsRichText(prosemirrorNode, definition, property) {
|
|
|
11052
11232
|
if (!id)
|
|
11053
11233
|
return null;
|
|
11054
11234
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
11055
|
-
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type",
|
|
11235
|
+
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z235.string().optional()));
|
|
11056
11236
|
return {
|
|
11057
11237
|
id,
|
|
11058
11238
|
type: "Block",
|
|
@@ -11180,10 +11360,10 @@ function parseRichTextAttribute(mark) {
|
|
|
11180
11360
|
return null;
|
|
11181
11361
|
}
|
|
11182
11362
|
function parseProsemirrorLink(mark) {
|
|
11183
|
-
const href = getProsemirrorAttribute(mark, "href",
|
|
11363
|
+
const href = getProsemirrorAttribute(mark, "href", z235.string().optional());
|
|
11184
11364
|
if (!href)
|
|
11185
11365
|
return null;
|
|
11186
|
-
const target = getProsemirrorAttribute(mark, "target",
|
|
11366
|
+
const target = getProsemirrorAttribute(mark, "target", z235.string().optional());
|
|
11187
11367
|
const openInNewTab = target === "_blank";
|
|
11188
11368
|
if (href.startsWith("@")) {
|
|
11189
11369
|
return {
|
|
@@ -11202,10 +11382,10 @@ function parseProsemirrorLink(mark) {
|
|
|
11202
11382
|
}
|
|
11203
11383
|
}
|
|
11204
11384
|
function parseProsemirrorCommentHighlight(mark) {
|
|
11205
|
-
const highlightId = getProsemirrorAttribute(mark, "highlightId",
|
|
11385
|
+
const highlightId = getProsemirrorAttribute(mark, "highlightId", z235.string().optional());
|
|
11206
11386
|
if (!highlightId)
|
|
11207
11387
|
return null;
|
|
11208
|
-
const isResolved = getProsemirrorAttribute(mark, "resolved",
|
|
11388
|
+
const isResolved = getProsemirrorAttribute(mark, "resolved", z235.boolean().optional()) ?? false;
|
|
11209
11389
|
return {
|
|
11210
11390
|
type: "Comment",
|
|
11211
11391
|
commentHighlightId: highlightId,
|
|
@@ -11217,7 +11397,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
11217
11397
|
if (!id)
|
|
11218
11398
|
return null;
|
|
11219
11399
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
11220
|
-
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder",
|
|
11400
|
+
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z235.boolean().optional()) !== false;
|
|
11221
11401
|
const tableChild = prosemirrorNode.content?.find((c) => c.type === "table");
|
|
11222
11402
|
if (!tableChild) {
|
|
11223
11403
|
return emptyTable(id, variantId, 0);
|
|
@@ -11264,9 +11444,9 @@ function parseAsTableCell(prosemirrorNode) {
|
|
|
11264
11444
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
11265
11445
|
if (!id)
|
|
11266
11446
|
return null;
|
|
11267
|
-
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign",
|
|
11447
|
+
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z235.string().optional());
|
|
11268
11448
|
let columnWidth;
|
|
11269
|
-
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth",
|
|
11449
|
+
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z235.array(z235.number()).optional());
|
|
11270
11450
|
if (columnWidthArray) {
|
|
11271
11451
|
columnWidth = roundDimension(columnWidthArray[0]);
|
|
11272
11452
|
}
|
|
@@ -11304,7 +11484,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
11304
11484
|
value: parseRichText(prosemirrorNode.content ?? [])
|
|
11305
11485
|
};
|
|
11306
11486
|
case "image":
|
|
11307
|
-
const items = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
11487
|
+
const items = getProsemirrorAttribute(prosemirrorNode, "items", z235.string());
|
|
11308
11488
|
if (!items)
|
|
11309
11489
|
return null;
|
|
11310
11490
|
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
@@ -11424,7 +11604,7 @@ function definitionExpectsPlaceholderItem(definition) {
|
|
|
11424
11604
|
);
|
|
11425
11605
|
}
|
|
11426
11606
|
function parseBlockItems(prosemirrorNode, definition) {
|
|
11427
|
-
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
11607
|
+
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z235.string());
|
|
11428
11608
|
if (!itemsString)
|
|
11429
11609
|
return null;
|
|
11430
11610
|
const itemsJson = JSON.parse(itemsString);
|
|
@@ -11436,18 +11616,18 @@ function parseBlockItems(prosemirrorNode, definition) {
|
|
|
11436
11616
|
}
|
|
11437
11617
|
function parseAppearance(prosemirrorNode) {
|
|
11438
11618
|
let appearance = {};
|
|
11439
|
-
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance",
|
|
11619
|
+
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance", z235.string().optional());
|
|
11440
11620
|
if (rawAppearanceString) {
|
|
11441
11621
|
const parsedAppearance = PageBlockAppearanceV2.safeParse(JSON.parse(rawAppearanceString));
|
|
11442
11622
|
if (parsedAppearance.success) {
|
|
11443
11623
|
appearance = parsedAppearance.data;
|
|
11444
11624
|
}
|
|
11445
11625
|
}
|
|
11446
|
-
const columns = getProsemirrorAttribute(prosemirrorNode, "columns",
|
|
11626
|
+
const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z235.number().optional());
|
|
11447
11627
|
if (columns) {
|
|
11448
11628
|
appearance.numberOfColumns = columns;
|
|
11449
11629
|
}
|
|
11450
|
-
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor",
|
|
11630
|
+
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z235.string().optional());
|
|
11451
11631
|
if (backgroundColor) {
|
|
11452
11632
|
const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
|
|
11453
11633
|
if (parsedColor.success) {
|
|
@@ -11542,13 +11722,13 @@ function valueSchemaForPropertyType(type) {
|
|
|
11542
11722
|
}
|
|
11543
11723
|
}
|
|
11544
11724
|
function getProsemirrorBlockId(prosemirrorNode) {
|
|
11545
|
-
const id = getProsemirrorAttribute(prosemirrorNode, "id",
|
|
11725
|
+
const id = getProsemirrorAttribute(prosemirrorNode, "id", z235.string());
|
|
11546
11726
|
if (!id)
|
|
11547
11727
|
console.warn(`Prosemirror attribute "id" on ${prosemirrorNode.type} is required`);
|
|
11548
11728
|
return id;
|
|
11549
11729
|
}
|
|
11550
11730
|
function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
11551
|
-
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(
|
|
11731
|
+
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z235.string()));
|
|
11552
11732
|
}
|
|
11553
11733
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
11554
11734
|
const parsedAttr = validationSchema.safeParse(prosemirrorNode.attrs?.[attributeName]);
|
|
@@ -11602,6 +11782,8 @@ export {
|
|
|
11602
11782
|
BackendVersionRoomYDoc,
|
|
11603
11783
|
BlockDefinitionUtils,
|
|
11604
11784
|
BlockParsingUtils,
|
|
11785
|
+
DTOAppBootstrapDataQuery,
|
|
11786
|
+
DTOAppBootstrapDataResponse,
|
|
11605
11787
|
DTOAssetRenderConfiguration,
|
|
11606
11788
|
DTOBrand,
|
|
11607
11789
|
DTOBrandCreateResponse,
|
|
@@ -11793,6 +11975,7 @@ export {
|
|
|
11793
11975
|
DTOUpdateUserNotificationSettingsPayload,
|
|
11794
11976
|
DTOUpdateVersionInput,
|
|
11795
11977
|
DTOUser,
|
|
11978
|
+
DTOUserGetResponse,
|
|
11796
11979
|
DTOUserNotificationSettingsResponse,
|
|
11797
11980
|
DTOUserProfile,
|
|
11798
11981
|
DTOUserProfileUpdatePayload,
|
|
@@ -11800,10 +11983,15 @@ export {
|
|
|
11800
11983
|
DTOUserWorkspaceMembership,
|
|
11801
11984
|
DTOUserWorkspaceMembershipsResponse,
|
|
11802
11985
|
DTOWorkspace,
|
|
11986
|
+
DTOWorkspaceCreateInput,
|
|
11987
|
+
DTOWorkspaceCreateResponse,
|
|
11803
11988
|
DTOWorkspaceIntegrationGetGitObjectsInput,
|
|
11804
11989
|
DTOWorkspaceIntegrationOauthInput,
|
|
11805
11990
|
DTOWorkspaceIntegrationPATInput,
|
|
11991
|
+
DTOWorkspaceInvitationInput,
|
|
11992
|
+
DTOWorkspaceInvitationsListInput,
|
|
11806
11993
|
DTOWorkspaceRole,
|
|
11994
|
+
DesignSystemsEndpoint,
|
|
11807
11995
|
DocumentationHierarchySettings,
|
|
11808
11996
|
DocumentationPageEditorModel,
|
|
11809
11997
|
DocumentationPageV1DTO,
|
|
@@ -11813,9 +12001,14 @@ export {
|
|
|
11813
12001
|
ObjectMeta2 as ObjectMeta,
|
|
11814
12002
|
PageBlockEditorModel,
|
|
11815
12003
|
PageSectionEditorModel,
|
|
12004
|
+
RequestExecutor,
|
|
12005
|
+
RequestExecutorError,
|
|
12006
|
+
SupernovaApiClient,
|
|
12007
|
+
UsersEndpoint,
|
|
11816
12008
|
VersionRoomBaseYDoc,
|
|
11817
12009
|
VersionSQSPayload,
|
|
11818
12010
|
WorkspaceConfigurationPayload,
|
|
12011
|
+
WorkspacesEndpoint,
|
|
11819
12012
|
applyPrivacyConfigurationToNestedItems,
|
|
11820
12013
|
blockToProsemirrorNode,
|
|
11821
12014
|
buildDocPagePublishPaths,
|